Kaynağa Gözat

Merge remote-tracking branch 'origin/dev' into dev

xucaiqin 2 yıl önce
ebeveyn
işleme
9fa9033680

+ 9 - 0
sckw-modules-api/sckw-system-api/src/main/java/com/sckw/system/api/RemoteSystemService.java

@@ -40,6 +40,15 @@ public interface RemoteSystemService {
      */
      */
     List<SysDictResDto> queryDictByType(String type);
     List<SysDictResDto> queryDictByType(String type);
 
 
+    /**
+     * @param type 类型
+     * @return SysDictResDto
+     * @desc: 根据类型id查字典,先查redis,没查到查数据库,查出来了存redis
+     * @author: czh
+     * @date: 2023/7/5
+     */
+    Map<String, Map<String, String>> queryDictByType(List<String> type);
+
     /**
     /**
      * @param type 字典类型,value key
      * @param type 字典类型,value key
      * @return SysDictResDto
      * @return SysDictResDto

+ 6 - 2
sckw-modules/sckw-order/src/main/resources/mapper/KwoTradeOrderMapper.xml

@@ -15,8 +15,12 @@
         FROM kwo_trade_order o
         FROM kwo_trade_order o
                  LEFT JOIN kwo_trade_order_unit u
                  LEFT JOIN kwo_trade_order_unit u
                            ON o.id = u.t_order_id
                            ON o.id = u.t_order_id
-        WHERE o.del_flag = 0
-          AND o.status != 0 and u.del_flag = 0 AND u.top_ent_id = #{topEntId}
+        <where>
+            o.del_flag = 0 AND o.status NOT IN (0, 2) AND u.del_flag = 0
+            <if test="topEntId != null ">
+                and u.top_ent_id = #{topEntId}
+            </if>
+        </where>
         GROUP BY u.unit_type
         GROUP BY u.unit_type
     </select>
     </select>
 
 

+ 19 - 0
sckw-modules/sckw-system/src/main/java/com/sckw/system/dubbo/RemoteSystemServiceImpl.java

@@ -122,6 +122,25 @@ public class RemoteSystemServiceImpl implements RemoteSystemService {
         return JSONObject.parseArray(dictCache, SysDictResDto.class);
         return JSONObject.parseArray(dictCache, SysDictResDto.class);
     }
     }
 
 
+    @Override
+    public Map<String, Map<String, String>> queryDictByType(List<String> list) {
+        if (CollectionUtils.isEmpty(list)) {
+            return Collections.emptyMap();
+        }
+
+        Map<String, Map<String, String>> map = new HashMap<>();
+        for (String type : list) {
+            List<SysDictResDto> sysDictResDtos = queryDictByType(type);
+            if (CollectionUtils.isEmpty(sysDictResDtos)) {
+                continue;
+            }
+
+            Map<String, String> collect = sysDictResDtos.stream().collect(Collectors.toMap(SysDictResDto::getValue, SysDictResDto::getLabel, (n, o) -> n));
+            map.put(type, collect);
+        }
+        return map;
+    }
+
     /**
     /**
      * @param type 字典类型,value key
      * @param type 字典类型,value key
      * @return SysDictResDto
      * @return SysDictResDto

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

@@ -4,6 +4,7 @@ import java.util.*;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSON;
 import com.sckw.core.exception.SystemException;
 import com.sckw.core.exception.SystemException;
 import com.sckw.core.model.constant.Global;
 import com.sckw.core.model.constant.Global;
+import com.sckw.core.model.enums.ClientTypeEnum;
 import com.sckw.core.utils.*;
 import com.sckw.core.utils.*;
 import com.sckw.core.web.constant.HttpStatus;
 import com.sckw.core.web.constant.HttpStatus;
 import com.sckw.core.web.context.LoginUserHolder;
 import com.sckw.core.web.context.LoginUserHolder;
@@ -135,12 +136,15 @@ public class CommonService {
     }
     }
 
 
 
 
-    public void sendSystemMessage(List<UserInfo> userInfos, MessageEnum messageEnum, Map<String, Object> map, String msgUrl) {
+    public void sendSystemMessage(List<UserInfo> userInfos, MessageEnum messageEnum, Map<String, Object> map, String msgUrl, String appMsgUrl) {
         SckwMessage msg = new SckwMessage();
         SckwMessage msg = new SckwMessage();
+        Map<String, String> msgUrls = new HashMap<>(Global.NUMERICAL_FOUR);
+        msgUrls.put(ClientTypeEnum.pc.getValue(), msgUrl);
+        msgUrls.put(ClientTypeEnum.app.getValue(), appMsgUrl);
         msg.setRequestId(UUIDUtils.get32UUID())
         msg.setRequestId(UUIDUtils.get32UUID())
                 .setMessageEnum(messageEnum)
                 .setMessageEnum(messageEnum)
                 .setParams(map)
                 .setParams(map)
-                .setMsgUrl(msgUrl)
+                .setMsgUrls(msgUrls)
                 .setUserInfos(userInfos)
                 .setUserInfos(userInfos)
                 .setCreateBy(LoginUserHolder.getUserId());
                 .setCreateBy(LoginUserHolder.getUserId());
         AsyncThreadUtils.submit(new AsyncProcess(msg, streamBridge));
         AsyncThreadUtils.submit(new AsyncProcess(msg, streamBridge));

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

@@ -79,6 +79,9 @@ public class KwsEnterpriseService {
     @Value(value = "${jumpUrl.entCertificate}")
     @Value(value = "${jumpUrl.entCertificate}")
     private String entCertificateUrl;
     private String entCertificateUrl;
 
 
+    @Value(value = "${jumpUrl.entCertificate}")
+    private String appEntCertificateUrl;
+
     /**
     /**
      * @param params 入库
      * @param params 入库
      * @desc: 单表入库
      * @desc: 单表入库
@@ -386,7 +389,7 @@ public class KwsEnterpriseService {
         commonService.sendSystemMessage(Collections.singletonList(new UserInfo().setUserId(userId).setEntId(entId)),
         commonService.sendSystemMessage(Collections.singletonList(new UserInfo().setUserId(userId).setEntId(entId)),
                 MessageEnum.ENT_CERTIFICATE,
                 MessageEnum.ENT_CERTIFICATE,
                 map,
                 map,
-                entCertificateUrl);
+                entCertificateUrl,"");
     }
     }
 
 
     /**
     /**
@@ -484,7 +487,7 @@ public class KwsEnterpriseService {
         commonService.sendSystemMessage(Collections.singletonList(new UserInfo().setUserId(kwsEnterprise.getCreateBy()).setEntId(entId)),
         commonService.sendSystemMessage(Collections.singletonList(new UserInfo().setUserId(kwsEnterprise.getCreateBy()).setEntId(entId)),
                 messageEnum,
                 messageEnum,
                 map,
                 map,
-                entCertificateUrl);
+                entCertificateUrl,"");
     }
     }
 
 
     /**
     /**
@@ -620,7 +623,8 @@ public class KwsEnterpriseService {
         commonService.sendSystemMessage(Collections.singletonList(new UserInfo().setUserId(LoginUserHolder.getUserId()).setEntId(LoginUserHolder.getEntId())),
         commonService.sendSystemMessage(Collections.singletonList(new UserInfo().setUserId(LoginUserHolder.getUserId()).setEntId(LoginUserHolder.getEntId())),
                 MessageEnum.ENT_DEPT_CERTIFICATE,
                 MessageEnum.ENT_DEPT_CERTIFICATE,
                 map,
                 map,
-                entCertificateUrl);
+                entCertificateUrl,
+                appEntCertificateUrl);
     }
     }
 
 
 
 

+ 4 - 6
sckw-modules/sckw-system/src/main/java/com/sckw/system/service/KwsUserService.java

@@ -98,7 +98,7 @@ public class KwsUserService {
 
 
         /*2、填充密码*/
         /*2、填充密码*/
         fillPassword(kwsUser);
         fillPassword(kwsUser);
-        synchronized(this) {
+        synchronized (this) {
             //再次校验数据
             //再次校验数据
             checkAccountValid(kwsUser.getAccount(), kwsUser.getSystemType());
             checkAccountValid(kwsUser.getAccount(), kwsUser.getSystemType());
             /*3、存库*/
             /*3、存库*/
@@ -369,10 +369,7 @@ public class KwsUserService {
      * 分页查询
      * 分页查询
      */
      */
     public List<KwsUserResVo> findPage(Map<String, Object> params) {
     public List<KwsUserResVo> findPage(Map<String, Object> params) {
-        if (Objects.equals(LoginUserHolder.getSystemType(), SystemTypeEnum.COMPANY.getCode())) {
-            params.put("entId", LoginUserHolder.getEntId());
-        }
-
+        params.put("entId", LoginUserHolder.getEntId());
         return kwsUserDao.findPage(params);
         return kwsUserDao.findPage(params);
     }
     }
 
 
@@ -626,6 +623,7 @@ public class KwsUserService {
 
 
     /**
     /**
      * 根据用户姓名模糊查用户信息
      * 根据用户姓名模糊查用户信息
+     *
      * @param name 用户姓名
      * @param name 用户姓名
      * @return list
      * @return list
      */
      */
@@ -665,5 +663,5 @@ public class KwsUserService {
         });
         });
         ExcelUtil.downData(response, KwsUserExcel.class, result);
         ExcelUtil.downData(response, KwsUserExcel.class, result);
     }
     }
-    
+
 }
 }