|
@ -7,7 +7,7 @@ async function bindAnxin2pep (ctx) { |
|
|
const models = ctx.fs.dc.models; |
|
|
const models = ctx.fs.dc.models; |
|
|
const { clickHouse } = ctx.app.fs |
|
|
const { clickHouse } = ctx.app.fs |
|
|
const { userId, pepUserId } = ctx.fs.api |
|
|
const { userId, pepUserId } = ctx.fs.api |
|
|
const { bindId, name, pepProjectId, anxinProjectId = [], appId = [] } = ctx.request.body |
|
|
const { bindId, name, pepProjectId, anxinProjectId = [], appId = [], mappingClass } = ctx.request.body |
|
|
|
|
|
|
|
|
if (name && pepProjectId) { |
|
|
if (name && pepProjectId) { |
|
|
throw '项企项目与自定义项目名称仅可选择一项' |
|
|
throw '项企项目与自定义项目名称仅可选择一项' |
|
@ -18,7 +18,7 @@ async function bindAnxin2pep (ctx) { |
|
|
|
|
|
|
|
|
let storageData = { |
|
|
let storageData = { |
|
|
name, pepProjectId, anxinProjectId, |
|
|
name, pepProjectId, anxinProjectId, |
|
|
updateTime: now, |
|
|
updateTime: now, mappingClass, |
|
|
del: false, |
|
|
del: false, |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -111,6 +111,7 @@ async function bindAnxin2pep (ctx) { |
|
|
}, |
|
|
}, |
|
|
transaction |
|
|
transaction |
|
|
}) |
|
|
}) |
|
|
|
|
|
bindId_ = existRes.id |
|
|
} else { |
|
|
} else { |
|
|
// 没有删除 重复添加
|
|
|
// 没有删除 重复添加
|
|
|
throw '当前项企项目已绑定' |
|
|
throw '当前项企项目已绑定' |
|
|