|
|
@ -1,4 +1,7 @@ |
|
|
|
'use strict'; |
|
|
|
|
|
|
|
const moment = require("moment/moment"); |
|
|
|
|
|
|
|
async function get(ctx) { |
|
|
|
try { |
|
|
|
const { limit, page } = ctx.query; |
|
|
@ -45,7 +48,7 @@ async function modify(ctx) { |
|
|
|
if (!existRes) { |
|
|
|
throw '当前部门培训记录信息不存在'; |
|
|
|
} |
|
|
|
await models.DeptTraining.update({ ...rest }, { where: { id: id } }); |
|
|
|
await models.DeptTraining.update({ updateDate: moment(), ...rest }, { where: { id: id } }); |
|
|
|
ctx.status = 204; |
|
|
|
} catch (error) { |
|
|
|
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); |
|
|
|