|
@@ -4,12 +4,15 @@ import com.fdkankan.dingtalk.DingTalkSendUtils;
|
|
|
import com.fdkankan.task.entity.Repair;
|
|
|
import com.fdkankan.task.entity.TbSceneNum;
|
|
|
import com.fdkankan.task.jobhandler.sale.SaleXxlJobUtil;
|
|
|
+import com.fdkankan.task.jobhandler.util.Utils;
|
|
|
import com.fdkankan.task.mapper.RepairMapper;
|
|
|
import com.fdkankan.task.mapper.TbSceneNumMapper;
|
|
|
import com.mybatisflex.annotation.UseDataSource;
|
|
|
import com.mybatisflex.core.datasource.DataSourceKey;
|
|
|
import com.mybatisflex.core.query.QueryWrapper;
|
|
|
+import com.xxl.job.core.context.XxlJobHelper;
|
|
|
import com.xxl.job.core.handler.annotation.XxlJob;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -42,10 +45,15 @@ public class ZfbXxlJob {
|
|
|
*/
|
|
|
@XxlJob("oldZfbGenOldCode")
|
|
|
@UseDataSource("old-zfb")
|
|
|
- public void zfbGenOldCode(Integer count){
|
|
|
+ public void zfbGenOldCode(){
|
|
|
String taskId = UUID.randomUUID().toString().replace("-", "");
|
|
|
logger.info("oldZfbGenOldCode---------------start,taskId:{}",taskId);
|
|
|
try {
|
|
|
+ Integer count = 10000;
|
|
|
+ String param = XxlJobHelper.getJobParam(); // 获取参数
|
|
|
+ if(StringUtils.isNotBlank(param) && Utils.isNumber(param)){
|
|
|
+ count = Integer.valueOf(param);
|
|
|
+ }
|
|
|
genSceneNumService.genOldCode(count);
|
|
|
}catch (Exception e){
|
|
|
logger.info("oldZfbGenOldCode-error,taskId:{},{}",taskId,e);
|
|
@@ -57,10 +65,15 @@ public class ZfbXxlJob {
|
|
|
|
|
|
@XxlJob("newZfbGenOldCode")
|
|
|
@UseDataSource("new-zfb")
|
|
|
- public void newZfbGenOldCode(Integer count){
|
|
|
+ public void newZfbGenOldCode(){
|
|
|
String taskId = UUID.randomUUID().toString().replace("-", "");
|
|
|
logger.info("newZfbGenOldCode---------------start,taskId:{}",taskId);
|
|
|
try {
|
|
|
+ Integer count = 10000;
|
|
|
+ String param = XxlJobHelper.getJobParam(); // 获取参数
|
|
|
+ if(StringUtils.isNotBlank(param) && Utils.isNumber(param)){
|
|
|
+ count = Integer.valueOf(param);
|
|
|
+ }
|
|
|
genSceneNumService.genOldCode(count);
|
|
|
}catch (Exception e){
|
|
|
logger.info("newZfbGenOldCode-error,taskId:{},{}",taskId,e);
|
|
@@ -73,10 +86,15 @@ public class ZfbXxlJob {
|
|
|
|
|
|
@XxlJob("newZfbGenNewCode")
|
|
|
@UseDataSource("new-zfb")
|
|
|
- public void newZfbGenNewCode(Integer count){
|
|
|
+ public void newZfbGenNewCode(){
|
|
|
String taskId = UUID.randomUUID().toString().replace("-", "");
|
|
|
logger.info("newZfbGenNewCode---------------start,taskId:{}",taskId);
|
|
|
try {
|
|
|
+ Integer count = 10000;
|
|
|
+ String param = XxlJobHelper.getJobParam(); // 获取参数
|
|
|
+ if(StringUtils.isNotBlank(param) && Utils.isNumber(param)){
|
|
|
+ count = Integer.valueOf(param);
|
|
|
+ }
|
|
|
genSceneNumService.genNewCode(count);
|
|
|
}catch (Exception e){
|
|
|
logger.info("newZfbGenNewCode-error,taskId:{},{}",taskId,e);
|