Ver código fonte

Merge branch 'dev-lqc' into test

lqc 4 anos atrás
pai
commit
4d2786c6b3

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

@@ -48,6 +48,7 @@ public class FosterwxCashScheduleTaskListController extends BaseController<Foste
      */
 
     @PostMapping("/list")
+    @ApiOperation(value = "获取任务列表")
     public Object list(@Valid @RequestBody FosterwxCashScheduleTaskListHandle handle, BindingResult bindingResult) {
         if (bindingResult.hasErrors()) {
             return AjaxResult.error(HttpStatus.ERROR, bindingResult.getFieldError().getDefaultMessage());

+ 6 - 2
src/main/java/com/mokamrp/privates/entity/pangu/FosterwxCashAccountScheduleHandle.java

@@ -1,7 +1,9 @@
 package com.mokamrp.privates.entity.pangu;
 
-import com.baomidou.mybatisplus.extension.activerecord.Model;
 import lombok.Data;
+import lombok.NonNull;
+
+import java.time.LocalDate;
 
 /**
  * <p>
@@ -12,7 +14,7 @@ import lombok.Data;
  * @since 2021-10-08
  */
 @Data
-public class FosterwxCashAccountScheduleHandle{
+public class FosterwxCashAccountScheduleHandle {
     private Integer page;
     private Integer pageSize;
     private Integer id;
@@ -21,4 +23,6 @@ public class FosterwxCashAccountScheduleHandle{
     private Integer createUid;
     private String createUser;
     private String ids;
+    @NonNull
+    private LocalDate scheduleDate;
 }

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

@@ -37,6 +37,7 @@ public class FosterwxCashAccountScheduleServiceImpl extends ServiceImpl<Fosterwx
         Integer pagesize = handle.getPageSize();
         Integer page = handle.getPage();
         LambdaQueryWrapper<FosterwxCashAccountSchedule> fosterwxCashAccountScheduleLambdaQueryWrapper = new LambdaQueryWrapper<>();
+        fosterwxCashAccountScheduleLambdaQueryWrapper.eq(FosterwxCashAccountSchedule::getScheduleDate, handle.getScheduleDate());
         // 任务模板
         if (null != handle.getTemplateId())
             fosterwxCashAccountScheduleLambdaQueryWrapper.eq(FosterwxCashAccountSchedule::getTemplateId, handle.getTemplateId());

+ 16 - 0
src/main/java/com/mokamrp/privates/task/pangu/SyncCreateCashTask.java

@@ -0,0 +1,16 @@
+package com.mokamrp.privates.task.pangu;
+
+import net.javacrumbs.shedlock.core.SchedulerLock;
+import org.springframework.scheduling.annotation.Scheduled;
+
+/**
+ * 每天五点定时生成第二天的任务列表
+ */
+public class SyncCreateCashTask {
+
+    @Scheduled(cron = "0 0 17 * * ?")
+    @SchedulerLock(name = "pangu:SyncCreateCashTask", lockAtLeastForString = "PT5S", lockAtMostForString = "PT15M")
+    public void execute() {
+
+    }
+}