소스 검색

达人更新问题

zhaoxian 2 년 전
부모
커밋
abc0b3458e

+ 2 - 1
ruixuan-live/src/main/java/com/ruixuan/isc/entity/KuaishouPromoter.java

@@ -156,7 +156,7 @@ public class KuaishouPromoter {
     public KuaishouPromoter() {
     }
 
-    public KuaishouPromoter(Long id, String promoterNickName, String province, String promoterUrl, String fansNumber, String avgVideoSales, String videoSales, String totalSale) {
+    public KuaishouPromoter(Long id, String promoterNickName, String province, String promoterUrl, String fansNumber, String avgVideoSales, String videoSales, String totalSale,Long promoterId) {
         this.id = id;
         this.promoterNickName = promoterNickName;
         this.province = province;
@@ -165,5 +165,6 @@ public class KuaishouPromoter {
         this.avgVideoSales = avgVideoSales;
         this.videoSales = videoSales;
         this.totalSale = totalSale;
+        this.promoterId = promoterId;
     }
 }

+ 4 - 3
ruixuan-live/src/main/java/com/ruixuan/isc/service/impl/KuaishouPromoterServiceImpl.java

@@ -245,7 +245,7 @@ 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返回结果:{}", (System.currentTimeMillis() - startTime) / 1000, result);
+            log.info("更新达人信息,用时:{}s\n返回结果:{}", (System.currentTimeMillis() - startTime) / 1000, result);
             if (Check.isNotNull(result) && Check.isNotNull(result.getString("promoterNickName"))) {
                 KuaishouPromoter kuaishouPromoter = new KuaishouPromoter(
                         id,
@@ -255,9 +255,10 @@ public class KuaishouPromoterServiceImpl implements IKuaishouPromoterService {
                         result.getString("fanNum"),
                         result.getString("avgVideoSales"),
                         result.getString("videoSales"),
-                        result.getString("totalSale")
+                        result.getString("totalSale"),
+                        promoterId
                 );
-                kuaishouPromoterMapper.updateKuaishouPromoter(kuaishouPromoter);
+                kuaishouPromoterMapper.updateKuaishouPromoterByPromoterId(kuaishouPromoter);
             }
         } catch (Exception e) {
             e.printStackTrace();