From d990f83678892ce9f55a617a572ab246db20ed08 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期五, 30 一月 2026 11:20:44 +0800
Subject: [PATCH] 修改简道云人员推送删除功能bug
---
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/WarningServiceImpl.java | 47 ++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 42 insertions(+), 5 deletions(-)
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/WarningServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/WarningServiceImpl.java
index 5758472..c166a4a 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/WarningServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/WarningServiceImpl.java
@@ -7,6 +7,8 @@
import com.doumee.core.constants.ResponseStatus;
import com.doumee.core.dingTalk.DingTalk;
import com.doumee.core.exception.BusinessException;
+import com.doumee.core.haikang.model.HKConstants;
+import com.doumee.core.haikang.model.param.BaseResponse;
import com.doumee.core.haikang.model.param.request.EventSubRequest;
import com.doumee.core.haikang.service.HKService;
import com.doumee.core.utils.Constants;
@@ -294,7 +296,8 @@
if(Constants.equalsInteger(model.getStatus(),param.getStatus())){
return;
}
- if(StringUtils.isNotBlank(param.getCode())&&Constants.equalsInteger(model.getType(),Constants.ZERO)||Constants.equalsInteger(model.getType(),Constants.ONE)){
+
+ if(StringUtils.isNotBlank(model.getCode())&&(Constants.equalsInteger(model.getType(),Constants.ZERO)||Constants.equalsInteger(model.getType(),Constants.ONE))){
EventSubRequest eventParam = new EventSubRequest();
String path =systemDictDataBiz.queryByCode(Constants.HK_PARAM, Constants.HK_PUSH_URL).getCode();
eventParam.setEventDest(path+"/notice");
@@ -305,15 +308,50 @@
}
HKService.cancelEventSub(eventParam);//鍏堝彇娑�
if(Constants.equalsInteger(param.getStatus(),Constants.ONE)){
- HKService.eventSub(eventParam);//瀹夐槻浜嬩欢
+ BaseResponse response = HKService.eventSub(eventParam);//瀹夐槻浜嬩欢
+ if(Objects.nonNull(response)&&StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE)){
+ model.setSubscribeStatus(Constants.ONE);
+ }else{
+ model.setSubscribeStatus(Constants.TWO);
+ model.setSubscribeInfo(response.getMsg());
+ }
+
+ startCheckThirdDest(eventParam);
+
+ }else{
+ model.setSubscribeStatus(Constants.ZERO);
}
}
-
-
model.setStatus(param.getStatus());
model.setEditDate(new Date());
model.setEditor(param.getLoginUserInfo().getId());
warningMapper.updateById(model);
+ }
+
+ /**
+ * 妫�鏌ヤ笁鏂规槸鍚﹂渶瑕佽闃呮捣搴蜂簨浠�
+ * @param eventParam
+ */
+
+ private void startCheckThirdDest(EventSubRequest eventParam) {
+ try {
+ String thirdpath =systemDictDataBiz.queryByCode(Constants.HK_PARAM, Constants.HK_PUSH_THIRD_URL).getCode();
+ if(StringUtils.isNotBlank(thirdpath)){
+ String[] ss = thirdpath.split(";");
+ for(String s : ss){
+ eventParam.setEventDest(s);
+ BaseResponse response = HKService.eventSub(eventParam);
+ if(Objects.nonNull(response)&&StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE)){
+ log.error("========璁㈤槄鍏朵粬涓夋柟鍦板潃鎴愬姛:"+s);
+ }else{
+ log.error("========璁㈤槄鍏朵粬涓夋柟鍦板潃閿欒:"+s);
+ }
+ }
+ }
+ }catch (Exception e){
+ log.error("========璁㈤槄鍏朵粬涓夋柟鍦板潃閿欒"+e.getMessage());
+ }
+
}
@@ -386,7 +424,6 @@
if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(memberList)&&memberList.size()>Constants.ZERO){
List<String> ddUserIdList = memberList.stream().map(j->j.getErpId()).collect(Collectors.toList());
//鍙戦�佹帹閫侀拤閽夋秷鎭�
-
Boolean isSuccess = dingTalk.workInfoOANotice(Long.valueOf(systemDictDataBiz.queryByCode(Constants.DD_TALK,Constants.AGENT_ID).getCode()),
String.join(",",ddUserIdList),
ddNoticeConfigMapper.selectCount(new QueryWrapper<DdNoticeConfig>().lambda()
--
Gitblit v1.9.3