Browse Source

(*)岗位评级删除接口

master
周沫沫历险记 2 years ago
parent
commit
4b760f2d32
  1. 3
      api/app/lib/controllers/member/index.js

3
api/app/lib/controllers/member/index.js

@ -817,6 +817,7 @@ async function postPositionRating(ctx) {
} }
} }
async function delPositionRating(ctx) { async function delPositionRating(ctx) {
const transaction = await ctx.fs.dc.orm.transaction();
try { try {
const { models } = ctx.fs.dc; const { models } = ctx.fs.dc;
const { id } = ctx.params; const { id } = ctx.params;
@ -824,7 +825,7 @@ async function delPositionRating(ctx) {
const oldData = await models.PositionRating.findOne({ where: { id: id } }); const oldData = await models.PositionRating.findOne({ where: { id: id } });
if (oldData) { if (oldData) {
//todo 更新memeber技术等级字段 //todo 更新memeber技术等级字段
await models.PositionRating.destory({ where: { id: id }, transaction }); await models.PositionRating.destroy({ where: { id: id }, transaction });
} }
ctx.status = 204; ctx.status = 204;
} catch (error) { } catch (error) {

Loading…
Cancel
Save