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

+ 27 - 0
src/main/java/com/mokamrp/privates/entity/pangu/FosterCashTaskJobController.java

@@ -0,0 +1,27 @@
+package com.mokamrp.privates.entity.pangu;
+
+import com.mokamrp.privates.help.AjaxResult;
+import com.mokamrp.privates.task.pangu.SyncCreateCashTask;
+import io.swagger.annotations.Api;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @Classname FosterCashTaskJobController
+ * @Description TODO
+ * @Date 2021/10/28 5:09 下午
+ * @Created by luqiucheng
+ */
+@RestController
+@Api(tags = "触发任务接口")
+public class FosterCashTaskJobController {
+    @Autowired
+    private SyncCreateCashTask syncCreateCashTask;
+
+    @GetMapping("syncCreateCashTask")
+    public Object syncCreateCashTask() {
+        syncCreateCashTask.syncCreateCashTask();
+        return AjaxResult.success("触发成功");
+    }
+}

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

@@ -57,7 +57,7 @@ public class SyncCreateCashTask {
         // 获取明天日期
         LocalDate nextDay = LocalDate.now().plusDays(1);
 
-        List<FosterwxCashAccountSchedule> fosterwxCashAccountSchedules = fosterwxCashAccountScheduleService.list(new LambdaQueryWrapper<FosterwxCashAccountSchedule>().eq(FosterwxCashAccountSchedule::getType, 1).eq(FosterwxCashAccountSchedule::getScheduleDate, nextDay).eq(FosterwxCashAccountSchedule::getStatus, 2));
+        List<FosterwxCashAccountSchedule> fosterwxCashAccountSchedules = fosterwxCashAccountScheduleService.list(new LambdaQueryWrapper<FosterwxCashAccountSchedule>().eq(FosterwxCashAccountSchedule::getScheduleDate, nextDay).eq(FosterwxCashAccountSchedule::getStatus, 2));
 
         List<FosterwxCashScheduleTaskList> newsList = new ArrayList<>();
         fosterwxCashAccountSchedules.forEach(fosterwxCashAccountSchedule -> {