|
|
@ -29,14 +29,14 @@ async function allDeps (ctx) { |
|
|
|
async function editUser (ctx) { |
|
|
|
try { |
|
|
|
const models = ctx.fs.dc.models; |
|
|
|
const { pepUserId, role = [], correlationProject = [] } = ctx.request.body |
|
|
|
const { pomsUserId, pepUserId, role = [], correlationProject = [] } = ctx.request.body |
|
|
|
|
|
|
|
const existUserRes = await models.User.findOne({ |
|
|
|
where: { |
|
|
|
pepUserId |
|
|
|
} |
|
|
|
}) |
|
|
|
if (existUserRes && !existUserRes.deleted && !pepUserId) { |
|
|
|
if (existUserRes && !existUserRes.deleted && !pomsUserId) { |
|
|
|
// 新增已存在未删除
|
|
|
|
throw '人员账号已添加' |
|
|
|
} |
|
|
|