|
|
@@ -5,13 +5,16 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.mokamrp.privates.entity.ResHandle;
|
|
|
import com.mokamrp.privates.entity.pangu.FosterwxCashAccountScheduleHandle;
|
|
|
import com.mokamrp.privates.mapper.pangu.FosterwxCashAccountScheduleMapper;
|
|
|
+import com.mokamrp.privates.mapper.pangu.FosterwxCashScheduleTaskListMapper;
|
|
|
import com.mokamrp.privates.mapper.pangu.pojo.FosterwxCashAccountSchedule;
|
|
|
+import com.mokamrp.privates.mapper.pangu.pojo.FosterwxCashScheduleTaskList;
|
|
|
import com.mokamrp.privates.mapper.pangu.pojo.FosterwxCashTaskList;
|
|
|
import com.mokamrp.privates.service.pangu.FosterwxCashAccountScheduleService;
|
|
|
import com.mokamrp.privates.service.pangu.FosterwxCashTaskTemplateService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.time.LocalDateTime;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
|
@@ -31,6 +34,9 @@ public class FosterwxCashAccountScheduleServiceImpl extends ServiceImpl<Fosterwx
|
|
|
@Autowired
|
|
|
public FosterwxCashTaskTemplateService fosterwxCashTaskTemplateService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ public FosterwxCashScheduleTaskListMapper fosterwxCashScheduleTaskListMapper;
|
|
|
+
|
|
|
/**
|
|
|
* 获取数据列表 支持分页
|
|
|
* @param handle
|
|
|
@@ -63,6 +69,7 @@ public class FosterwxCashAccountScheduleServiceImpl extends ServiceImpl<Fosterwx
|
|
|
/**
|
|
|
* 根据id创建任务列表
|
|
|
* @param id
|
|
|
+ *
|
|
|
*/
|
|
|
@Override
|
|
|
public void createTask(Integer id) {
|
|
|
@@ -73,7 +80,23 @@ public class FosterwxCashAccountScheduleServiceImpl extends ServiceImpl<Fosterwx
|
|
|
ResHandle<List<FosterwxCashTaskList>> resHandle = fosterwxCashTaskTemplateService.getTaskByTemplateId(fosterwxCashAccountSchedule.getId());
|
|
|
|
|
|
resHandle.getList().forEach(fosterwxCashTaskList -> {
|
|
|
+ FosterwxCashScheduleTaskList fosterwxCashScheduleTaskList = new FosterwxCashScheduleTaskList();
|
|
|
+ fosterwxCashScheduleTaskList.setScheduleId(fosterwxCashAccountSchedule.getId());
|
|
|
+ fosterwxCashScheduleTaskList.setTemplateId(fosterwxCashAccountSchedule.getTemplateId());
|
|
|
+ fosterwxCashScheduleTaskList.setGroupId(fosterwxCashAccountSchedule.getGroupId());
|
|
|
+ fosterwxCashScheduleTaskList.setTaskType(fosterwxCashTaskList.getTaskType());
|
|
|
+ fosterwxCashScheduleTaskList.setRemark(fosterwxCashTaskList.getRemark());
|
|
|
+ fosterwxCashScheduleTaskList.setTaskContent("");
|
|
|
+ fosterwxCashScheduleTaskList.setStatus(1);
|
|
|
+ fosterwxCashScheduleTaskList.setErrInfo("");
|
|
|
+ fosterwxCashScheduleTaskList.setSendTime(LocalDateTime.of(fosterwxCashAccountSchedule.getScheduleDate(), fosterwxCashTaskList.getSendAt()));
|
|
|
+ fosterwxCashScheduleTaskList.setCreateUid(fosterwxCashAccountSchedule.getCreateUid());
|
|
|
+ fosterwxCashScheduleTaskList.setCreateUser(fosterwxCashAccountSchedule.getCreateUser());
|
|
|
+ fosterwxCashScheduleTaskList.setUpdateUid(fosterwxCashAccountSchedule.getCreateUid());
|
|
|
+ fosterwxCashScheduleTaskList.setCreateAt(LocalDateTime.now());
|
|
|
+ fosterwxCashScheduleTaskList.setUpdateAt(LocalDateTime.now());
|
|
|
|
|
|
+ fosterwxCashScheduleTaskListMapper.insert(fosterwxCashScheduleTaskList);
|
|
|
});
|
|
|
}
|
|
|
}
|