|
@@ -123,6 +123,10 @@ public class KuaishouPromoterServiceImpl implements IKuaishouPromoterService {
|
|
|
public List<JSONObject> selectKuaishouPromoterList2(Long promoterId, String promoterNickName, String status, String parameter, String orderBy) {
|
|
|
if (Check.isNull(parameter)) {
|
|
|
parameter = "promoterId";
|
|
|
+ } else if ("avgVideoSales".equals(parameter)) {
|
|
|
+ parameter = "SUBSTRING_INDEX(avgVideoSales,'-',-1)+0";
|
|
|
+ } else if ("videoSales".equals(parameter)) {
|
|
|
+ parameter = "SUBSTRING_INDEX(videoSales,'-',-1)+0";
|
|
|
}
|
|
|
if (Check.isNull(orderBy)) {
|
|
|
orderBy = "desc";
|
|
@@ -160,7 +164,6 @@ public class KuaishouPromoterServiceImpl implements IKuaishouPromoterService {
|
|
|
Long startTime = System.currentTimeMillis();
|
|
|
String content = HttpUtil.httpGetRequest(internalIpPath + "kuaiShou/promoter/getPromoterInfo?promoterId=" + promoter.getPromoterId());
|
|
|
result = JSONObject.parseObject(content);
|
|
|
- log.info("获取达人详情数据,用时:{}s", (System.currentTimeMillis() - startTime) / 1000);
|
|
|
data.put("promoterInfo", promoter);
|
|
|
data.put("result", result);
|
|
|
//跟进记录
|
|
@@ -245,7 +248,6 @@ public class KuaishouPromoterServiceImpl implements IKuaishouPromoterService {
|
|
|
Long startTime = System.currentTimeMillis();
|
|
|
String content = HttpUtil.httpPostRequest(startIpPath + "promoterInfo/getPromoterId", param, null);
|
|
|
JSONObject result = JSONObject.parseObject(content);
|
|
|
- log.info("更新达人信息,用时:{}s\n返回结果:{}", (System.currentTimeMillis() - startTime) / 1000, result);
|
|
|
if (Check.isNotNull(result) && Check.isNotNull(result.getString("promoterNickName"))) {
|
|
|
KuaishouPromoter kuaishouPromoter = new KuaishouPromoter(
|
|
|
id,
|
|
@@ -294,6 +296,20 @@ public class KuaishouPromoterServiceImpl implements IKuaishouPromoterService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ public Result getGongHaiVideoSales(Long promoterId) {
|
|
|
+ Map<String, Object> param = new HashMap<>();
|
|
|
+ param.put("promoterId", promoterId);
|
|
|
+ String url = startIpPath + "promoterInfo/updatePromoter";
|
|
|
+ String content = HttpUtil.httpPostRequest(url, param, null);
|
|
|
+ if ("0".equals(content)) {
|
|
|
+ return Result.success();
|
|
|
+ } else {
|
|
|
+ log.error("查询达人公海销售额失败,达人ID:{}\nurl:{}", promoterId, url);
|
|
|
+ return Result.error("失败");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
public Result updatePromoterLabel(JSONObject result) {
|
|
|
Long promoterId = result.getLong("promoterId");
|
|
|
Long userId = result.getLong("userId");
|