|
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.dgtly.common.exception.BusinessException;
|
|
import com.dgtly.common.exception.BusinessException;
|
|
|
import com.dgtly.common.utils.ShiroSaltUtil;
|
|
import com.dgtly.common.utils.ShiroSaltUtil;
|
|
|
|
|
+import com.dgtly.common.utils.StringUtils;
|
|
|
import com.dgtly.common.utils.UserIdentityUtil;
|
|
import com.dgtly.common.utils.UserIdentityUtil;
|
|
|
import com.dgtly.common.utils.http.HttpUtils;
|
|
import com.dgtly.common.utils.http.HttpUtils;
|
|
|
import com.dgtly.common.utils.security.EncryptPassWordClass;
|
|
import com.dgtly.common.utils.security.EncryptPassWordClass;
|
|
@@ -668,6 +669,57 @@ public class AnalysisDiyCustomerComponent {
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 获取经销商负责人
|
|
|
|
|
+ * @param depCode
|
|
|
|
|
+ * @param userNo
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
|
|
+ public String getManagerList(String depCode , String userNo){
|
|
|
|
|
+ try {
|
|
|
|
|
+ String url = customerAccessTokenUtil.getUrl(UrlType.MANAGERLIST, null);
|
|
|
|
|
+ //获取经销商负责人
|
|
|
|
|
+ //拼接请求参数
|
|
|
|
|
+ if (StringUtils.isNotEmpty(depCode)){
|
|
|
|
|
+ url = url+"&depCode="+depCode;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (StringUtils.isNotEmpty(userNo)){
|
|
|
|
|
+ url = url+"&userNo="+userNo;
|
|
|
|
|
+ }
|
|
|
|
|
+ JSONObject managerListJson = JSONObject.parseObject(HttpUtils.sendSSLGet(url));
|
|
|
|
|
+ log.info("获取经销商负责人请求地址{},结果为:{}",url,managerListJson);
|
|
|
|
|
+ int code = managerListJson.getInteger("code");
|
|
|
|
|
+ if (code == 0) {
|
|
|
|
|
+ JSONArray dataArray = managerListJson.getJSONArray("data");
|
|
|
|
|
+ JSONObject data = dataArray.getJSONObject(0);
|
|
|
|
|
+ String name = data.getString("name");
|
|
|
|
|
+ String status = data.getString("status");
|
|
|
|
|
+ String userid = data.getString("userid");
|
|
|
|
|
+ String customerCode = data.getString("depCode");
|
|
|
|
|
+ String customerName = data.getString("depName");
|
|
|
|
|
+ String userNum = data.getString("userNo");
|
|
|
|
|
+ String enable = data.getString("enable");
|
|
|
|
|
+ Boolean isSync = data.getBoolean("isSync");
|
|
|
|
|
+ Boolean isDelete = data.getBoolean("isDelete");
|
|
|
|
|
+ String mobile = data.getString("mobile");
|
|
|
|
|
+ if(isDelete){
|
|
|
|
|
+ return "该用户状态已删除";
|
|
|
|
|
+ }
|
|
|
|
|
+ if (StringUtils.isEmpty(userid)) {
|
|
|
|
|
+ return "该用户为空";
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ return "";
|
|
|
|
|
+ }else {
|
|
|
|
|
+ return "获取数据失败";
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ log.error("获取厨卫经理列表接口错误!");
|
|
|
|
|
+ customerAccessTokenUtil.reSetToken();
|
|
|
|
|
+ throw e;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
|
* @description: 厨卫人员拉取
|
|
* @description: 厨卫人员拉取
|
|
@@ -780,6 +832,8 @@ public class AnalysisDiyCustomerComponent {
|
|
|
return null;
|
|
return null;
|
|
|
}*/
|
|
}*/
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 构建 插入用户List
|
|
* 构建 插入用户List
|
|
|
* @param
|
|
* @param
|