diff --git a/api/app/lib/controllers/departmentTrain/index.js b/api/app/lib/controllers/departmentTrain/index.js index 02f14b8..f14bd62 100644 --- a/api/app/lib/controllers/departmentTrain/index.js +++ b/api/app/lib/controllers/departmentTrain/index.js @@ -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}`);