feat: fix#15077

This commit is contained in:
XieYongHong 2023-06-07 17:46:43 +08:00
parent 7a8340d3e8
commit d50c028de6
1 changed files with 7 additions and 6 deletions

View File

@ -243,12 +243,13 @@ const checkNoticeDelete = async () => {
const itemType = variableDefinitionsMap.get(variableKey)
let hasUser = false
console.log(itemType, notifyType)
if (itemType === 'user') { //
let resp = undefined;
if (notifyType === 'dingTalk') {
resp = await noticeConfig.queryDingTalkUsers(item!.notifierId);
if (['dingTalk', 'weixin'].includes(notifyType)) {
resp = notifyType === 'dingTalk' ? await noticeConfig.queryDingTalkUsers(item!.notifierId) : await noticeConfig.queryWechatUsers(item!.notifierId);
} else {
resp = await noticeConfig.queryWechatUsers(item!.notifierId);
hasUser = true
}
if (resp && resp.success) {
@ -267,10 +268,10 @@ const checkNoticeDelete = async () => {
if (itemType === 'org') { //
let resp = undefined;
if (notifyType === 'dingTalk') {
resp = await noticeConfig.dingTalkDept(item!.notifierId)
if (['dingTalk', 'weixin'].includes(notifyType)) {
resp = notifyType === 'dingTalk' ? await noticeConfig.dingTalkDept(item!.notifierId) : await noticeConfig.weChatDept(item!.notifierId)
} else {
resp = await noticeConfig.weChatDept(item!.notifierId)
hasUser = true
}
if (resp && resp.success) {