|
|
@@ -21,7 +21,6 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import java.time.LocalDate;
|
|
|
import java.time.LocalDateTime;
|
|
|
-import java.time.LocalTime;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
@@ -83,8 +82,9 @@ public class FosterwxCashWorkClientController {
|
|
|
if (null == fosterwxCashWorkwxMobile) return AjaxResult.error("该账号未划入变现分组");
|
|
|
|
|
|
LocalDate now = LocalDate.now();
|
|
|
- LocalDateTime firstDateTime = LocalDateTime.of(now, LocalTime.MIN);
|
|
|
LocalDateTime lastDateTime = LocalDateTime.now();
|
|
|
+ // 只获取一个小时前的
|
|
|
+ LocalDateTime firstDateTime = lastDateTime.minusHours(1);
|
|
|
|
|
|
LambdaQueryWrapper<FosterwxCashScheduleTaskList> fosterwxCashScheduleTaskListLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
// 企微任务
|
|
|
@@ -99,7 +99,7 @@ public class FosterwxCashWorkClientController {
|
|
|
List<FosterwxCashScheduleTaskList> fosterwxCashScheduleTaskListList = fosterwxCashScheduleTaskListService.list(fosterwxCashScheduleTaskListLambdaQueryWrapper);
|
|
|
|
|
|
List<FosterwxCashBoxClientInfo> fosterwxCashBoxClientInfoList = new ArrayList<>();
|
|
|
- fosterwxCashScheduleTaskListList.forEach(fosterwxCashScheduleTaskList -> {
|
|
|
+ for (FosterwxCashScheduleTaskList fosterwxCashScheduleTaskList : fosterwxCashScheduleTaskListList) {
|
|
|
// fosterwxCashScheduleTaskListService.updateById(new FosterwxCashScheduleTaskList() {{
|
|
|
// setId(fosterwxCashScheduleTaskList.getId());
|
|
|
// setStatus(5);
|
|
|
@@ -113,6 +113,13 @@ public class FosterwxCashWorkClientController {
|
|
|
fosterwxCashScheduleTaskMobile.setCreateAt(LocalDateTime.now());
|
|
|
fosterwxCashScheduleTaskMobile.setUpdateAt(LocalDateTime.now());
|
|
|
|
|
|
+ // 如果已经获取到任务过了就不在获取
|
|
|
+ if (fosterwxCashScheduleTaskMobileService.count(new LambdaQueryWrapper<FosterwxCashScheduleTaskMobile>().
|
|
|
+ eq(FosterwxCashScheduleTaskMobile::getTaskId, fosterwxCashScheduleTaskList.getId()).
|
|
|
+ eq(FosterwxCashScheduleTaskMobile::getGroupId, fosterwxCashScheduleTaskList.getGroupId()).
|
|
|
+ eq(FosterwxCashScheduleTaskMobile::getMobileId, fosterwxMobile.getId())) > 0)
|
|
|
+ continue;
|
|
|
+
|
|
|
fosterwxCashScheduleTaskMobileService.save(fosterwxCashScheduleTaskMobile);
|
|
|
|
|
|
// 获取任务详情
|
|
|
@@ -125,7 +132,7 @@ public class FosterwxCashWorkClientController {
|
|
|
fosterwxCashBoxClientInfo.setTaskType(fosterwxCashScheduleTaskList.getTaskType());
|
|
|
fosterwxCashBoxClientInfo.setId(fosterwxCashScheduleTaskMobile.getId());
|
|
|
if (3 == fosterwxCashScheduleTaskList.getTaskType()) {
|
|
|
- LambdaQueryWrapper<FosterwxCashWorkBoxClientInfo> fosterwxCashWorkBoxClientInfoLambdaQueryWrapper = new LambdaQueryWrapper<FosterwxCashWorkBoxClientInfo>();
|
|
|
+ LambdaQueryWrapper<FosterwxCashWorkBoxClientInfo> fosterwxCashWorkBoxClientInfoLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
// fosterwxCashWorkBoxClientInfoLambdaQueryWrapper.like(FosterwxCashWorkBoxClientInfo::getWxid, fosterwxCashScheduleTaskList.getBoxGhid());
|
|
|
switch (fosterwxCashWorkwxTaskList.getBoxType()) {
|
|
|
case 8:
|
|
|
@@ -177,7 +184,7 @@ public class FosterwxCashWorkClientController {
|
|
|
}
|
|
|
|
|
|
fosterwxCashBoxClientInfoList.add(fosterwxCashBoxClientInfo);
|
|
|
- });
|
|
|
+ }
|
|
|
|
|
|
return AjaxResult.success(fosterwxCashBoxClientInfoList);
|
|
|
}
|