Kaynağa Gözat

添加渠道过滤

zhouxianguang 6 yıl önce
ebeveyn
işleme
d00424792f

+ 13 - 4
rankin-user-service/src/main/java/cn/rankin/userservice/controller/TerminalUserController.java

@@ -168,6 +168,14 @@ public class TerminalUserController
             log.info("/user/auth/list | request code={}", code);
             terminalUser.setCode(code);
         }
+
+        String merchantId = terminalUserSearchDTO.getMerchantId();
+        if (!StringUtils.isEmpty(merchantId))
+        {
+            log.info("/user/auth/list | request merchantId={}", merchantId);
+            terminalUser.setMerchantId(merchantId);
+        }
+
         LinkedHashMap<String, BaseOrderEnum> sort = new LinkedHashMap<>();
         sort.put("gmtModified", BaseOrderEnum.DESC);
 
@@ -197,13 +205,14 @@ public class TerminalUserController
 
         Map<String, TerminalUser> terminalUserMap = ListUtil.convert(terminalUserList, "id", TerminalUser.class);
 
-        log.info("map size:" + terminalUserMap.size());
         authList.forEach(authVo ->
         {
             TerminalUser termianlUser = terminalUserMap.get(authVo.getUid());
-            log.info(authVo.getUid() + ":" + termianlUser);
-            TerminalUserAuthVo vo = Converter.getTerminalUserAuthVo(termianlUser, authVo);
-            terminalUserAuthVos.add(vo);
+            if(termianlUser!=null)
+            {
+                TerminalUserAuthVo vo = Converter.getTerminalUserAuthVo(termianlUser, authVo);
+                terminalUserAuthVos.add(vo);
+            }
         });
 
         //设置分页数据