Răsfoiți Sursa

消息修改

czh 2 ani în urmă
părinte
comite
b48e2db20e

+ 0 - 1
sckw-modules/sckw-manage/src/main/java/com/sckw/manage/service/CommonBusinessService.java

@@ -27,7 +27,6 @@ import com.sckw.system.api.model.dto.res.EntCacheResDto;
 import com.sckw.system.api.model.dto.res.SysDictResDto;
 import com.sckw.system.api.model.dto.res.UserCacheResDto;
 import jakarta.annotation.Resource;
-import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.dubbo.config.annotation.DubboReference;
 import org.springframework.beans.factory.annotation.Autowired;

+ 6 - 2
sckw-modules/sckw-system/src/main/java/com/sckw/system/service/CommonService.java

@@ -21,7 +21,9 @@ import com.sckw.system.model.KwsEnterprise;
 import com.sckw.system.model.KwsMenu;
 import com.sckw.system.model.KwsMenuRights;
 import com.sckw.system.model.vo.res.FindEntListResVo;
+import jakarta.annotation.Resource;
 import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.cloud.stream.function.StreamBridge;
 import org.springframework.stereotype.Service;
@@ -32,7 +34,7 @@ import org.springframework.stereotype.Service;
  * @date 2023/6/30
  */
 @Service
-@RequiredArgsConstructor
+@Slf4j
 public class CommonService {
 
     @Autowired
@@ -44,7 +46,8 @@ public class CommonService {
     @Autowired
     private KwsMenuDao kwsMenuDao;
 
-    private final StreamBridge streamBridge;
+    @Resource
+    private StreamBridge streamBridge;
 
 
     /**
@@ -149,6 +152,7 @@ public class CommonService {
                 .setMsgUrls(msgUrls)
                 .setUserInfos(userInfos)
                 .setCreateBy(LoginUserHolder.getUserId());
+        log.info("send-message:{}", JSON.toJSONString(msg));
         AsyncThreadUtils.submit(new AsyncProcess(msg, streamBridge));
     }
 

+ 8 - 3
sckw-modules/sckw-system/src/main/java/com/sckw/system/service/KwsEnterpriseService.java

@@ -403,7 +403,7 @@ public class KwsEnterpriseService {
                 throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.INSERT_FAIL);
             }
 
-            commonService.sendSystemMessage(Collections.singletonList(new UserInfo().setUserId(userId).setEntId(entId)),
+            commonService.sendSystemMessage(Collections.singletonList(new UserInfo().setUserId(userId).setEntId(reqVo.getEntPid())),
                     MessageEnum.ENT_CERTIFICATE,
                     map,
                     entDeptUrl, "");
@@ -498,6 +498,11 @@ public class KwsEnterpriseService {
         map.put("entName", kwsEnterprise.getFirmName());
         map.put("createByName", LoginUserHolder.getUserName());
         MessageEnum messageEnum;
+        EntCacheResDto entCacheResDto = remoteSystemService.queryEntTreeById(entId);
+        if (Objects.isNull(entCacheResDto)) {
+            return;
+        }
+
         if (reqVo.getStatus().equals(ApprovalEnum.OK.getCode())) {
             if (Objects.isNull(kwsEntDept)) {
                 messageEnum = MessageEnum.ENT_CERTIFICATE_PASS;
@@ -513,12 +518,12 @@ public class KwsEnterpriseService {
         }
 
         if (Objects.isNull(kwsEntDept)) {
-            commonService.sendSystemMessage(Collections.singletonList(new UserInfo().setUserId(kwsEnterprise.getCreateBy()).setEntId(entId)),
+            commonService.sendSystemMessage(Collections.singletonList(new UserInfo().setUserId(entCacheResDto.getContactsId()).setEntId(entCacheResDto.getId())),
                     messageEnum,
                     map,
                     entCertificateUrl, appEntCertificateUrl);
         } else {
-            commonService.sendSystemMessage(Collections.singletonList(new UserInfo().setUserId(kwsEnterprise.getCreateBy()).setEntId(entId)),
+            commonService.sendSystemMessage(Collections.singletonList(new UserInfo().setUserId(entCacheResDto.getContactsId()).setEntId(entCacheResDto.getId())),
                     messageEnum,
                     map,
                     entDeptUrl, "");