Explorar o código

解决 经销商认证页面,只有单个经销商的不能显示经销商问题

sunyaming %!s(int64=3) %!d(string=hai) anos
pai
achega
edeb2780ed

+ 8 - 13
suishenbang-wxportal/suishenbang-wxportal-api/src/main/java/com/dgtly/wxportal/controller/EsignController.java

@@ -5,6 +5,7 @@ import com.dgtly.common.config.ServerConfig;
 import com.dgtly.common.core.controller.ApiBaseController;
 import com.dgtly.common.core.domain.AjaxResult;
 import com.dgtly.common.core.domain.ParameterObject;
+import com.dgtly.common.utils.StringUtils;
 import com.dgtly.system.domain.AssRelcustomerinfo;
 import com.dgtly.system.domain.CustomersExt;
 import com.dgtly.system.domain.SysUser;
@@ -538,19 +539,13 @@ public class EsignController extends ApiBaseController {
                 sysUserExt.setPostName(sysUser.getSysUserExt().getPostName());
                 sysUserExtList.add(sysUserExt);
             }
-            SysUserExt sysUserExt = new SysUserExt();
-            sysUserExt.setUserId(sysUser.getSysUserExt().getUserId());
-            sysUserExt.setOrgCode(assRelcustomerinfoList.get(0).getMainkunnr());
-            sysUserExt.setOrgName(assRelcustomerinfoList.get(0).getMainname1());
-            sysUserExt.setSalesLevel(sysUser.getSysUserExt().getSalesLevel());
-            sysUserExt.setBossEmployeeId(sysUser.getSysUserExt().getBossEmployeeId());
-            sysUserExt.setBossName(sysUser.getSysUserExt().getBossName());
-            sysUserExt.setSapEmployeeId(sysUser.getSysUserExt().getSapEmployeeId());
-            sysUserExt.setCustomerCode(sysUser.getSysUserExt().getCustomerCode());
-            sysUserExt.setIsCustomerManager(sysUser.getSysUserExt().getIsCustomerManager());
-            sysUserExt.setPostCode(sysUser.getSysUserExt().getPostCode());
-            sysUserExt.setPostName(sysUser.getSysUserExt().getPostName());
-            sysUserExtList.add(sysUserExt);
+        }
+        //只有是经销商级别的存入sysUserExtList中
+        if(null != sysUser.getSysUserExt() &&
+                StringUtils.isNotEmpty( sysUser.getSysUserExt().getSalesLevel())&&
+                sysUser.getSysUserExt().getSalesLevel().equals("customer_level"))
+        {
+            sysUserExtList.add(sysUser.getSysUserExt());
         }
         sysUser.setSysUserExtLsit(sysUserExtList);
         if (sysUser!=null){