Explorar o código

Merge branch 'dev-lqc' into test

lqc %!s(int64=4) %!d(string=hai) anos
pai
achega
5f7e1c33eb

+ 5 - 5
src/main/java/com/mokamrp/privates/controller/pangu/FosterwxCashWorkClientController.java

@@ -12,8 +12,8 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
 import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
@@ -53,9 +53,9 @@ public class FosterwxCashWorkClientController {
     private FosterwxCashWorkwxTaskListService fosterwxCashWorkwxTaskListService;
 
 
-    @PostMapping("/getTaskInfo")
+    @PostMapping(value = "/getTaskInfo", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
     @ApiOperation(value = "返回凌晨到当前时间的未发送的数据,主体 昵称/团队id 昵称 两两一组必须有数据")
-    public Object getTaskInfo(@RequestBody FosterwxWorkServeHandle handle) {
+    public Object getTaskInfo(FosterwxWorkServeHandle handle) {
         log.info("客户端请求的信息:{}", handle);
 
         String errInfo = checkParam(handle);
@@ -207,9 +207,9 @@ public class FosterwxCashWorkClientController {
         return "参数没有设置全,无法根据现有信息获取任务";
     }
 
-    @PostMapping("/saveBoxInfo")
+    @PostMapping(value = "/saveBoxInfo", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
     @ApiOperation(value = "保存小程序信息,已经保存过的小程序更新处理")
-    public Object saveBoxInfo(@RequestBody FosterwxCashWorkBoxClientInfo fosterwxCashWorkBoxClientInfo) {
+    public Object saveBoxInfo(FosterwxCashWorkBoxClientInfo fosterwxCashWorkBoxClientInfo) {
         if (fosterwxCashWorkBoxClientInfoService.count(new LambdaQueryWrapper<FosterwxCashWorkBoxClientInfo>().eq(FosterwxCashWorkBoxClientInfo::getGhid, fosterwxCashWorkBoxClientInfo.getGhid())) == 0) {
             fosterwxCashWorkBoxClientInfoService.save(fosterwxCashWorkBoxClientInfo);
         } else {

+ 11 - 0
src/main/java/com/mokamrp/privates/mapper/pangu/pojo/FosterwxCashScheduleTaskList.java

@@ -138,6 +138,9 @@ public class FosterwxCashScheduleTaskList extends Model<FosterwxCashScheduleTask
     private FosterwxCashTaskList fosterwxCashTaskList;
 
     @TableField(exist = false)
+    private FosterwxCashWorkwxTaskList fosterwxCashWorkwxTaskList;
+
+    @TableField(exist = false)
     private List<FosterwxCashWorkwxTaskList> fosterwxCashWorkwxTaskListList;
 
     @TableField(exist = false)
@@ -373,4 +376,12 @@ public class FosterwxCashScheduleTaskList extends Model<FosterwxCashScheduleTask
                 ", updateAt=" + updateAt +
                 "}";
     }
+
+    public FosterwxCashWorkwxTaskList getFosterwxCashWorkwxTaskList() {
+        return fosterwxCashWorkwxTaskList;
+    }
+
+    public void setFosterwxCashWorkwxTaskList(FosterwxCashWorkwxTaskList fosterwxCashWorkwxTaskList) {
+        this.fosterwxCashWorkwxTaskList = fosterwxCashWorkwxTaskList;
+    }
 }

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

@@ -166,6 +166,7 @@ public class FosterwxCashAccountScheduleServiceImpl extends ServiceImpl<Fosterwx
                 fosterwxCashScheduleTaskList.setErrInfo("");
             }
 
+            fosterwxCashScheduleTaskList.setType(fosterwxCashAccountSchedule.getType());
             fosterwxCashScheduleTaskList.setSendTime(LocalDateTime.of(fosterwxCashAccountSchedule.getScheduleDate(), fosterwxCashWorkwxTaskList.getSendAt()));
             fosterwxCashScheduleTaskList.setCreateUid(fosterwxCashAccountSchedule.getCreateUid());
             fosterwxCashScheduleTaskList.setCreateUser(fosterwxCashAccountSchedule.getCreateUser());

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

@@ -14,6 +14,7 @@ import com.mokamrp.privates.service.CoralApiService;
 import com.mokamrp.privates.service.pangu.FosterwxCashOasBoxService;
 import com.mokamrp.privates.service.pangu.FosterwxCashScheduleTaskListService;
 import com.mokamrp.privates.service.pangu.FosterwxCashTaskListService;
+import com.mokamrp.privates.service.pangu.FosterwxCashWorkwxTaskListService;
 import com.mokamrp.privates.utils.pangu.redis.task.TaskRedis;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -43,6 +44,9 @@ public class FosterwxCashScheduleTaskListServiceImpl extends ServiceImpl<Fosterw
     public FosterwxCashTaskListService fosterwxCashTaskListService;
 
     @Autowired
+    public FosterwxCashWorkwxTaskListService fosterwxCashWorkwxTaskListService;
+
+    @Autowired
     public FosterwxCashOasBoxService fosterwxCashOasBoxService;
 
     @Autowired
@@ -147,7 +151,15 @@ public class FosterwxCashScheduleTaskListServiceImpl extends ServiceImpl<Fosterw
             }
 
             fosterwxCashScheduleTaskListMapper.updateById(fosterwxCashScheduleTaskList);
-            fosterwxCashScheduleTaskList.setFosterwxCashTaskList(fosterwxCashTaskListService.getById(fosterwxCashScheduleTaskList.getTaskId()));
+            if (1 == fosterwxCashScheduleTaskList.getType()) {
+                fosterwxCashScheduleTaskList.setFosterwxCashTaskList(fosterwxCashTaskListService.getById(fosterwxCashScheduleTaskList.getTaskId()));
+            } else {
+                fosterwxCashScheduleTaskList.setFosterwxCashWorkwxTaskList(fosterwxCashWorkwxTaskListService.getOne(new LambdaQueryWrapper<FosterwxCashWorkwxTaskList>().
+                        eq(FosterwxCashWorkwxTaskList::getTemplateId, fosterwxCashScheduleTaskList.getTemplateId()).
+                        eq(FosterwxCashWorkwxTaskList::getCatalogId, fosterwxCashScheduleTaskList.getTaskId()).
+                        eq(FosterwxCashWorkwxTaskList::getId, fosterwxCashScheduleTaskList.getChildTaskId()).
+                        last("LIMIT 1")));
+            }
             tempList.add(fosterwxCashScheduleTaskList);
             count++;
             editList.remove(i);