From 4248fbfb4f6a43cbb4884523f599d7719d1ba1c6 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 09 五月 2025 13:56:05 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/ApproveServiceImpl.java |   53 +++++++++++++++++++++++------------------------------
 1 files changed, 23 insertions(+), 30 deletions(-)

diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/ApproveServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/ApproveServiceImpl.java
index 8eff348..d4ecce3 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/ApproveServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/ApproveServiceImpl.java
@@ -302,7 +302,7 @@
                         noticesJoinMapper.selectCount(new QueryWrapper<Notices>().lambda().eq(Notices::getParam3,memberId))
                 );
                 //鎶勯�佹垜鐨勬暟鎹�
-                 internalHomeVO.setNoticeCopyNum(
+                internalHomeVO.setNoticeCopyNum(
                         noticesList.stream().filter(i->Constants.equalsInteger(i.getUserId(),memberId)
                                 &&Constants.equalsInteger(i.getSendacopy(),Constants.ONE)
                                 &&Constants.equalsInteger(i.getReaded(),Constants.ZERO)
@@ -493,7 +493,7 @@
         approveList.add(createUserApprove);
 
         //鏌ヨ鎵�鏈夊緟澶勭悊浜�
-        String token = systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode();
+//        String token = systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode();
         //瀹℃壒涓氬姟鏁版嵁
         for (int i = 0; i < approveParamList.size(); i++) {
             ApproveParam approveParam = approveParamList.get(i);
@@ -519,22 +519,25 @@
                         title = this.createNoticesData(noticeType,businessId,title,jsonMap);
                     }
                     if(j==0){
-                        //榛樿鐢熸垚涓�鏉� 鐢宠浜虹殑鏁版嵁 鏍囪鍒犻櫎鐘舵�佺敤浜庡鐞嗗埌 浠诲姟涓績锛堟垜鍙戣捣锛変娇鐢�
-                        Notices notices = new Notices();
-                        notices.setCreateDate(new Date());
-                        notices.setIsdeleted(Constants.ONE);
-                        notices.setObjId(businessId);
-                        notices.setObjType(noticeType);
-                        notices.setType(noticeType);
-                        notices.setTitle(title);
-                        notices.setParam1(JSONObject.toJSONString(jsonMap));
-                        notices.setStatus(Constants.ZERO);
-                        notices.setReaded(Constants.ZERO);
-                        notices.setSendacopy(Constants.ZERO);
-                        notices.setParam2("0");
-                        notices.setParam3(createMember.getId().toString());
-                        notices.setInfo("澶勭悊涓�");
-                        noticesJoinMapper.insert(notices);
+                        //璁垮浜哄憳涓嶇敓鎴愭璁板綍
+                       if(!(Constants.equalsInteger(noticeType,Constants.noticesObjectType.visit)&&Constants.equalsInteger(applyMember.getType(),Constants.ONE))){
+                            //榛樿鐢熸垚涓�鏉� 鐢宠浜虹殑鏁版嵁 鏍囪鍒犻櫎鐘舵�佺敤浜庡鐞嗗埌 浠诲姟涓績锛堟垜鍙戣捣锛変娇鐢�
+                            Notices notices = new Notices();
+                            notices.setCreateDate(new Date());
+                            notices.setIsdeleted(Constants.ONE);
+                            notices.setObjId(businessId);
+                            notices.setObjType(noticeType);
+                            notices.setType(noticeType);
+                            notices.setTitle(title);
+                            notices.setParam1(JSONObject.toJSONString(jsonMap));
+                            notices.setStatus(Constants.ZERO);
+                            notices.setReaded(Constants.ZERO);
+                            notices.setSendacopy(Constants.ZERO);
+                            notices.setParam2("0");
+                            notices.setParam3(createMember.getId().toString());
+                            notices.setInfo("澶勭悊涓�");
+                            noticesJoinMapper.insert(notices);
+                        }
                     }
                     if(CollectionUtils.isEmpty(memberList)){
                         throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鏈煡璇㈠埌瀹℃壒浜轰俊鎭�");
@@ -597,8 +600,7 @@
                             wxPlatNotice.sendPlatformBookTemplateNotice(systemDictDataBiz,
                                     wxNoticeConfigMapper,
                                     platformBooksMapper.selectById(businessId),
-                                    WxPlatConstants.platformBookContent.platformBookWaitAudit,
-                                    token,
+                                    WxPlatConstants.platformBookContent.platformBookWaitAudit, 
                                     Arrays.asList(member.getSystemOpenid().split(",")),
                                     Constants.ONE);
                         }
@@ -614,7 +616,6 @@
                         if(StringUtils.isNotBlank(member.getSystemOpenid())){
                             wxPlatNotice.sendVisitTemplateNotice(systemDictDataBiz,
                                     wxNoticeConfigMapper,visitsMapper.selectById(businessId), WxPlatConstants.visitContent.visitWaitAudit,
-                                    token,
                                     Arrays.asList(member.getSystemOpenid().split(","))
                             );
                         }
@@ -629,7 +630,6 @@
                         if(StringUtils.isNotBlank(member.getSystemOpenid())){
                             wxPlatNotice.sendVisitTemplateNotice(systemDictDataBiz,
                                     wxNoticeConfigMapper,visitsMapper.selectById(businessId), WxPlatConstants.visitReportContent.visitReportWaitAudit,
-                                    token,
                                     Arrays.asList(member.getSystemOpenid().split(","))
                             );
                         }
@@ -651,7 +651,6 @@
                                             wxNoticeConfigMapper,
                                             carUseBookMapper.selectById(businessId),
                                             WxPlatConstants.carUseBookContent.carUseBookWaitAudit,
-                                            token,
                                             Arrays.asList(member.getSystemOpenid().split(",")),
                                             Constants.ONE);
                                 }
@@ -1441,7 +1440,6 @@
                         wxNoticeConfigMapper,
                         platformBooksMapper.selectById(approveDTO.getObjId()),
                         WxPlatConstants.platformBookContent.platformBookWaitAudit,
-                        systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(),
                         openIdList,
                         Constants.ONE);
             }
@@ -1465,8 +1463,7 @@
                         //鍙戦�佸井淇″叕浼楀彿閫氱煡
                         wxPlatNotice.sendCarUseBookTemplateNotice(systemDictDataBiz,
                                 wxNoticeConfigMapper,carUseBook,
-                                WxPlatConstants.carUseBookContent.carUseBookWaitAudit,
-                                systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(),
+                                WxPlatConstants.carUseBookContent.carUseBookWaitAudit, 
                                 openIdList,1);
                     }
                 }
@@ -1492,7 +1489,6 @@
                         wxPlatNotice.sendVisitTemplateNotice(systemDictDataBiz,
                                 wxNoticeConfigMapper,visitsMapper.selectById(approveDTO.getObjId()),
                                 approveDTO.getObjType().equals(Constants.approveObjectType.visitReporting)?WxPlatConstants.visitReportContent.visitReportWaitAudit:WxPlatConstants.visitContent.visitWaitAudit,
-                                systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(),
                                 openIdList
                         );
                     }
@@ -1749,7 +1745,6 @@
                 if(Objects.nonNull(visits) && StringUtils.isNotBlank(visits.getOpenid())){
                     wxPlatNotice.sendVisitTemplateNotice(systemDictDataBiz,
                             wxNoticeConfigMapper,visits, objCode,
-                            systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(),
                             Arrays.asList(visits.getOpenid().split(","))
                     );
                 }
@@ -1776,7 +1771,6 @@
                     wxPlatNotice.sendCarUseBookTemplateNotice(systemDictDataBiz,
                             wxNoticeConfigMapper,carUseBook,
                             Constants.equalsInteger(approveDTO.getStatus(),Constants.TWO)?WxPlatConstants.carUseBookContent.carUseBookAuditSuccess: WxPlatConstants.carUseBookContent.carUseBookAuditFail,
-                            systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(),
                             Arrays.asList(systemUser.getOpenid().split(",")),0);
                 }
             }
@@ -1847,7 +1841,6 @@
                 wxPlatNotice.sendPlatformBookTemplateNotice(systemDictDataBiz,
                         wxNoticeConfigMapper, platformBooks,
                         Constants.equalsInteger(approveDTO.getStatus(),Constants.TWO)?WxPlatConstants.platformBookContent.platformBookAuditSuccess: WxPlatConstants.platformBookContent.platformBookAuditFail,
-                        systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(),
                         Arrays.asList(driver.getOpenid().split(",")),0);
             }
 

--
Gitblit v1.9.3