|
@@ -74,6 +74,8 @@ public class AnalysisDiyCustomerComponent {
|
|
|
private Long[] roleStoreIds; //3.6门店经销商
|
|
|
private Long[] roleBusiness;//7.5厨卫业务人员角色
|
|
|
private Long[] roleXls;//13.1新零售经销商角色
|
|
|
+
|
|
|
+ private Long[] roleSfa;//5.1家装顾问挂sfa角色
|
|
|
/**
|
|
|
* 获取并解析DIY经销商用户
|
|
|
* 因为经销商用户并不涉及用信息更新等方面 所以只插入不更新
|
|
@@ -104,6 +106,11 @@ public class AnalysisDiyCustomerComponent {
|
|
|
roleXls = new Long[]{roleId};
|
|
|
}
|
|
|
|
|
|
+ if(roleSfa == null){
|
|
|
+ Long roleId = Long.parseLong(configService.selectConfigByKey("libang.user.sfa.roleid"));
|
|
|
+ roleSfa = new Long[]{roleId};
|
|
|
+ }
|
|
|
+
|
|
|
if (roleGuideIds == null) {
|
|
|
Long roleId = Long.parseLong(configService.selectConfigByKey("libang.guide.roleid"));
|
|
|
roleGuideIds = new Long[]{roleId};
|
|
@@ -429,6 +436,24 @@ public class AnalysisDiyCustomerComponent {
|
|
|
total+=xlsMANAGER.size();
|
|
|
}
|
|
|
|
|
|
+ //5.1获家装顾问师人员列表
|
|
|
+ String homeCustomerJson ="";
|
|
|
+ try{
|
|
|
+ homeCustomerJson = HttpUtils.sendSSLGet(customerAccessTokenUtil.getUrl(UrlType.HOMEDECORATION,null));
|
|
|
+ }catch (Exception e){
|
|
|
+ log.error("获取家装顾问师经销商人员接口错误!");
|
|
|
+ customerAccessTokenUtil.reSetToken();
|
|
|
+ throw e;
|
|
|
+ }
|
|
|
+
|
|
|
+ JSONObject homeJson = JSONObject.parseObject(homeCustomerJson);
|
|
|
+ code = homeJson.getInteger("code");
|
|
|
+ if(code==0){
|
|
|
+ JSONArray homeCustomer = new JSONArray();
|
|
|
+ homeCustomer.addAll(xlsJson.getJSONArray("userlist"));
|
|
|
+ success+=buildSysUser(homeCustomer,loginNameSet,diyNameSet,9,failDetails,packageId,chainsMap);
|
|
|
+ total+=homeCustomer.size();
|
|
|
+ }
|
|
|
|
|
|
/*try {
|
|
|
JSONObject bossListJson = JSONObject.parseObject(HttpUtils.sendSSLGet(customerAccessTokenUtil.getUrl(UrlType.BOSSLIST, null)));
|
|
@@ -676,6 +701,8 @@ public class AnalysisDiyCustomerComponent {
|
|
|
user.setRoleIds(HouseRoleIds);
|
|
|
}else if(isManager == 7){
|
|
|
user.setRoleIds(roleXls);
|
|
|
+ }else if(isManager == 9){
|
|
|
+ user.setRoleIds(roleSfa);
|
|
|
}else{
|
|
|
user.setRoleIds(roleIds);
|
|
|
}
|
|
@@ -745,6 +772,8 @@ public class AnalysisDiyCustomerComponent {
|
|
|
sysUserService.insertUserRole(user.getUserId(), HouseRoleIds[0]);
|
|
|
}else if (isManager ==7){
|
|
|
sysUserService.insertUserRole(user.getUserId(), roleXls[0]);
|
|
|
+ }else if(isManager == 9){
|
|
|
+ sysUserService.insertUserRole(user.getUserId(), roleSfa[0]);
|
|
|
}else {
|
|
|
sysUserService.insertUserRole(user.getUserId(), roleIds[0]);
|
|
|
}
|