|
|
@@ -2,6 +2,7 @@ package com.dk.mdm.service.mst;
|
|
|
|
|
|
import com.dk.common.infrastructure.annotaiton.Pagination;
|
|
|
import com.dk.common.infrastructure.constant.Constant;
|
|
|
+import com.dk.common.infrastructure.xxl.XxlJobUtils;
|
|
|
import com.dk.common.model.pojo.PageList;
|
|
|
import com.dk.common.response.ResponseResultUtil;
|
|
|
import com.dk.common.response.ResponseResultVO;
|
|
|
@@ -21,6 +22,7 @@ import org.springframework.stereotype.Service;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
+import java.time.ZoneOffset;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
@@ -37,6 +39,8 @@ public class FollowPlanService extends BaseService<FollowPlan> {
|
|
|
@Autowired
|
|
|
private FollowPlanMapper followPlanMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private XxlJobUtils xxlJobUtils;
|
|
|
|
|
|
@Autowired
|
|
|
private FollowPlanConvert followPlanConvert;
|
|
|
@@ -96,6 +100,12 @@ public class FollowPlanService extends BaseService<FollowPlan> {
|
|
|
customerService.updateByUuid(customerSave);
|
|
|
}
|
|
|
|
|
|
+ //设置ID
|
|
|
+ String nextId = uniqueNoteCode.get("outId").toString();
|
|
|
+ int id = xxlJobUtils.create(Math.toIntExact(
|
|
|
+ (followPlanVO.getNextFollowTime().toInstant(ZoneOffset.of("+8")).toEpochMilli() - System.currentTimeMillis()) / 1000
|
|
|
+ ), nextId, Constant.XxlJobInfo.FOLLOW.getValue());
|
|
|
+ followPlan.setXxlJobId(id);
|
|
|
followPlanMapper.insert(followPlan);
|
|
|
return ResponseResultUtil.success(followPlan);
|
|
|
}
|