Переглянути джерело

Merge remote-tracking branch 'origin/master'

yumeng 2 роки тому
батько
коміт
bf2a9bd0b5

+ 1 - 1
ruixuan-live/src/main/java/com/ruixuan/isc/controller/KuaishouPromoterController.java

@@ -84,7 +84,7 @@ public class KuaishouPromoterController extends BaseController {
      */
     @GetMapping(value = "/supplementInfo")
     @ApiOperation(value = "补全失败的数据")
-    public String supplementInfo() {
+    public Result supplementInfo() {
         return kuaishouPromoterService.supplementInfo();
     }
 

+ 1 - 1
ruixuan-live/src/main/java/com/ruixuan/isc/service/IKuaishouPromoterService.java

@@ -64,7 +64,7 @@ public interface IKuaishouPromoterService {
 
     List<JSONObject> selectKuaishouPromoterList2(Long promoterId, String promoterNickName,String status, String parameter, String orderBy);
 
-    String supplementInfo();
+    Result supplementInfo();
 
     int addFollowUpRecords(JSONObject result);
 

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

@@ -271,7 +271,7 @@ public class KuaishouPromoterServiceImpl implements IKuaishouPromoterService {
     }
 
     @Override
-    public String supplementInfo() {
+    public Result supplementInfo() {
         List<KuaishouPromoter> list = kuaishouPromoterMapper.getFailInfo();
         Thread thread = new Thread() {
             @Override
@@ -284,7 +284,9 @@ public class KuaishouPromoterServiceImpl implements IKuaishouPromoterService {
             }
         };
         thread.start();
-        return "共计" + list.size() + "条,数据补充中...";
+        List<Long> promoters = new ArrayList<>();
+        list.forEach(kuaishouPromoter -> promoters.add(kuaishouPromoter.getPromoterId()));
+        return Result.success("共计" + list.size() + "条,数据补充中...", promoters);
     }
 
     @Override
@@ -313,7 +315,7 @@ public class KuaishouPromoterServiceImpl implements IKuaishouPromoterService {
 
     @Override
     public KuaishouPromoter getOnlyPromoterInfoByUserId(Long promoterId, Long userId) {
-        return kuaishouPromoterMapper.getOnlyPromoterInfoByUserId(promoterId,userId);
+        return kuaishouPromoterMapper.getOnlyPromoterInfoByUserId(promoterId, userId);
     }
 
     @Override