Просмотр исходного кода

Merge branch 'dev-lqc' into test

lqc 4 лет назад
Родитель
Сommit
b4cf04dbfb

+ 3 - 3
src/main/java/com/mokamrp/privates/controller/pangu/FosterwxCashAccountScheduleController.java

@@ -126,7 +126,7 @@ public class FosterwxCashAccountScheduleController extends BaseController<Foster
     @PostMapping("/immediateCreate")
     @Transactional(rollbackFor = Exception.class)
     @ApiOperation(value = "立即生成")
-    public Object immediateCreate(FosterwxCashAccountScheduleHandle handle) {
+    public Object immediateCreate(@RequestBody FosterwxCashAccountScheduleHandle handle) {
         Arrays.asList(handle.getIds().split(REGEX)).forEach(id -> {
             List<FosterwxCashScheduleTaskList> newsList = fosterwxCashAccountScheduleService.createTask(Integer.valueOf(id));
             // 由于不能浪费公众号发文为 需要整合起来一起发送
@@ -139,7 +139,7 @@ public class FosterwxCashAccountScheduleController extends BaseController<Foster
 
     @PostMapping("/preview")
     @ApiOperation(value = "预览按钮")
-    public Object priview(FosterwxCashAccountScheduleHandle handle) {
+    public Object priview(@RequestBody FosterwxCashAccountScheduleHandle handle) {
         ResHandle<List<FosterwxCashTaskList>> resHandle = fosterwxCashTaskTemplateService.getTaskByTemplateId(handle.getTemplateId());
 
         return AjaxResult.success(resHandle);
@@ -147,7 +147,7 @@ public class FosterwxCashAccountScheduleController extends BaseController<Foster
 
     @PostMapping("/cancelTask")
     @ApiOperation(value = "取消任务按钮")
-    public Object cancelTask(FosterwxCashAccountScheduleHandle handle, @AuthUser User user) {
+    public Object cancelTask(@RequestBody FosterwxCashAccountScheduleHandle handle, @AuthUser User user) {
         Arrays.asList(handle.getIds().split(REGEX)).forEach(id -> {
             fosterwxCashAccountScheduleService.updateById(new FosterwxCashAccountSchedule() {{
                 setId(Integer.valueOf(id));

+ 1 - 1
src/main/java/com/mokamrp/privates/controller/pangu/FosterwxCashScheduleTaskListController.java

@@ -59,7 +59,7 @@ public class FosterwxCashScheduleTaskListController extends BaseController<Foste
 
     @PostMapping("/cancelTask")
     @ApiOperation(value = "取消任务按钮")
-    public Object cancelTask(FosterwxCashScheduleTaskListHandle handle, @AuthUser User user) {
+    public Object cancelTask(@RequestBody FosterwxCashScheduleTaskListHandle handle, @AuthUser User user) {
         Arrays.asList(handle.getIds().split(REGEX)).forEach(id -> fosterwxCashScheduleTaskListService.cancelTask(Integer.valueOf(id), user.getId()));
 
         return AjaxResult.success("取消任务成功");

+ 1 - 0
src/main/java/com/mokamrp/privates/service/pangu/impl/FosterwxCashAccountScheduleServiceImpl.java

@@ -104,6 +104,7 @@ public class FosterwxCashAccountScheduleServiceImpl extends ServiceImpl<Fosterwx
                 fosterwxCashScheduleTaskList.setRemark(fosterwxCashTaskList.getRemark());
                 fosterwxCashScheduleTaskList.setTaskContent("");
                 fosterwxCashScheduleTaskList.setGhId("");
+                fosterwxCashScheduleTaskList.setSendUrl("");
                 fosterwxCashScheduleTaskList.setStatus(1);
                 fosterwxCashScheduleTaskList.setErrInfo("");
                 fosterwxCashScheduleTaskList.setSendTime(LocalDateTime.of(fosterwxCashAccountSchedule.getScheduleDate(), fosterwxCashTaskList.getSendAt()));

+ 4 - 1
src/main/java/com/mokamrp/privates/service/pangu/impl/FosterwxCashScheduleTaskListServiceImpl.java

@@ -101,6 +101,7 @@ public class FosterwxCashScheduleTaskListServiceImpl extends ServiceImpl<Fosterw
         if (newsList.isEmpty()) return;
 
         String ghid = "";
+        Integer groupId = newsList.get(0).getGroupId();
         FosterwxCashOasBox fosterwxCashOasBox = fosterwxCashOasBoxService.getRandOas(newsList.get(0).getGroupId());
         if (null != fosterwxCashOasBox) {
             ghid = fosterwxCashOasBox.getGhId();
@@ -127,6 +128,8 @@ public class FosterwxCashScheduleTaskListServiceImpl extends ServiceImpl<Fosterw
             fosterwxCashScheduleTaskList.setErrInfo("");
             // 分配的公众号
             fosterwxCashScheduleTaskList.setGhId(ghid);
+            // 发文链接
+            fosterwxCashScheduleTaskList.setSendUrl("");
 
             fosterwxCashScheduleTaskListMapper.updateById(fosterwxCashScheduleTaskList);
             fosterwxCashScheduleTaskList.setFosterwxCashTaskList(fosterwxCashTaskListService.getById(fosterwxCashScheduleTaskList.getTaskId()));
@@ -135,7 +138,7 @@ public class FosterwxCashScheduleTaskListServiceImpl extends ServiceImpl<Fosterw
             newsList.remove(i);
             i--;
         }
-        fosterwxCashOasBoxService.addSendTextCnt(newsList.get(0).getGroupId(), ghid);
+        fosterwxCashOasBoxService.addSendTextCnt(groupId, ghid);
         taskRedis.createUrlByTyper(JSON.toJSONString(tempList));
         tempList.clear();
     }