Quellcode durchsuchen

Merge branch 'master' of http://gogs.efunbox.cn:3000/Rankin/rankin

guozhaoshun vor 6 Jahren
Ursprung
Commit
309977d6d9

+ 2 - 0
rankin-data-api/src/main/java/cn/rankin/data/api/auth/dto/AuthQueryDTO.java

@@ -23,4 +23,6 @@ public class AuthQueryDTO implements Serializable {
     private Integer pageSize = 10;
 
     private Integer fastExpired = 0;
+
+    private String uids;
 }

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

@@ -83,6 +83,7 @@ public class TerminalUserController
         }
 
         String merchantId = terminalUserSearchDTO.getMerchantId();
+        log.info("merchantId:" + merchantId);
         if (!StringUtils.isEmpty(merchantId))
         {
             terminalUser.setMerchantId(merchantId);
@@ -168,6 +169,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);
 
@@ -184,6 +193,16 @@ public class TerminalUserController
             TerminalUser user = terminalUserList.get(0);
             authQueryDTO.setUid(user.getId());
         }
+        else
+        {
+            String uids = "";
+            for (TerminalUser obj : terminalUserList)
+            {
+                uids += obj.getId()+"#";
+            }
+            uids = uids.substring(0,uids.length()-1);
+            authQueryDTO.setUids(uids);
+        }
 
         Page<AuthVo> authPage = remoteAuthProxy.findAuthList(authQueryDTO);
 
@@ -197,13 +216,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);
+            }
         });
 
         //设置分页数据