zxfqwert 3 月之前
父節點
當前提交
b9285a4272

+ 5 - 2
suishenbang-wxportal/suishenbang-wxportal-api/src/main/java/com/dgtly/wxportal/controller/WxController.java

@@ -503,12 +503,13 @@ public class WxController extends ApiBaseController {
             return AjaxResult.error(302, "查无此人");
         }
         String pass = EncryptPassWordClass.encryptPassword(user.getLoginName(), password, user.getSalt());
+        List<Map<String, Object>> result = new ArrayList<>();
+
         if (pass.equals(user.getPassword())) {
             List<Map<String, Object>> loginTypeList = jdbcTemplate.queryForList("select dict_label,dict_value  from sys_dict_data where  dict_type='system_login_type'  ");
             if ("1".equals(user.getIsShopAccount())) {
-                List<Map<String, Object>> result = new ArrayList<>();
                 for (int i = 0; i < loginTypeList.size(); i++) {
-                    ConcurrentHashMap m = new ConcurrentHashMap<>();
+                    Map m = new HashMap();
                     m.put("shopType", loginTypeList.get(i).get("dict_label"));
                     m.put("shopTypeValue", loginTypeList.get(i).get("dict_value"));
                     List<Map<String, Object>> shopList = jdbcTemplate.queryForList("select shop_code,shop_name,sales_level from sys_user_shop_ext where  user_id=? and is_shop_type=? and del_flag='0'", user.getUserId(), loginTypeList.get(i).get("dict_value"));
@@ -516,6 +517,8 @@ public class WxController extends ApiBaseController {
                     result.add(m);
                 }
                 user.setLoginTypeList(result);
+            }else{
+                user.setLoginTypeList(result);
             }
                 List<Ztree> author = sysUserOrderAuthorService.userAuthorTreeDataFmt(user.getUserId());
                 if (author.size() > 0 && author.get(0).getChildren().size() > 1) {