|
@@ -80,12 +80,12 @@ public class QueryStatusHandler {
|
|
|
@XxlJob("queryStatusHandler")
|
|
@XxlJob("queryStatusHandler")
|
|
|
public void queryStatus() {
|
|
public void queryStatus() {
|
|
|
Random random = new Random();
|
|
Random random = new Random();
|
|
|
- HashMap<String,Object> components = getComponents();
|
|
|
|
|
- HashMap<String,String> time = get24HourTime();
|
|
|
|
|
|
|
+ HashMap<String, Object> components = getComponents();
|
|
|
|
|
+ HashMap<String, String> time = get24HourTime();
|
|
|
//获取24小时内未支付的订单
|
|
//获取24小时内未支付的订单
|
|
|
List<InsAreaCompany> noPayList = insAreaCompanyMapper.getNoPayList(time.get("startTime"), time.get("endTime"));
|
|
List<InsAreaCompany> noPayList = insAreaCompanyMapper.getNoPayList(time.get("startTime"), time.get("endTime"));
|
|
|
noPayList.forEach(insAreaCompany -> {
|
|
noPayList.forEach(insAreaCompany -> {
|
|
|
- if(insAreaCompany.getAgreementId() != null) {
|
|
|
|
|
|
|
+ if (insAreaCompany.getAgreementId() != null) {
|
|
|
//实例化
|
|
//实例化
|
|
|
try {
|
|
try {
|
|
|
//添加延迟
|
|
//添加延迟
|
|
@@ -107,7 +107,7 @@ public class QueryStatusHandler {
|
|
|
InsOrders insOrders = insOrdersMapper.selectOne(new LambdaQueryWrapper<InsOrders>().eq(InsOrders::getOrderno, insAreaCompany.getOrderno()));
|
|
InsOrders insOrders = insOrdersMapper.selectOne(new LambdaQueryWrapper<InsOrders>().eq(InsOrders::getOrderno, insAreaCompany.getOrderno()));
|
|
|
//设置主订单为已承保
|
|
//设置主订单为已承保
|
|
|
insOrders.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
|
|
insOrders.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
|
|
|
- insOrdersMapper.updateById(insOrders);
|
|
|
|
|
|
|
+ insOrdersMapper.updateStatus(insOrders.getOrderno(),InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
|
|
|
|
|
|
|
|
//添加轨迹信息
|
|
//添加轨迹信息
|
|
|
InsOrdersTrack insOrdersTrack = new InsOrdersTrack();
|
|
InsOrdersTrack insOrdersTrack = new InsOrdersTrack();
|
|
@@ -122,7 +122,7 @@ public class QueryStatusHandler {
|
|
|
insOrdersTrackService.save(insOrdersTrack);
|
|
insOrdersTrackService.save(insOrdersTrack);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- }catch(Exception e){
|
|
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -130,31 +130,31 @@ public class QueryStatusHandler {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
- private HashMap<String,Object> getComponents(){
|
|
|
|
|
- HashMap<String,Object> components = new HashMap<>();
|
|
|
|
|
- components.put("configureParametersComponents",configureParametersComponents);
|
|
|
|
|
- components.put("daJiaRequestApiComponents",daJiaRequestApiComponents);
|
|
|
|
|
- components.put("yongchengRequestApiComponents",yongchengRequestApiComponents);
|
|
|
|
|
- components.put("guorenRequestApiComponent",guorenRequestApiComponent);
|
|
|
|
|
- components.put("huaTaiRequestApiComponents",huaTaiRequestApiComponents);
|
|
|
|
|
- components.put("zhongmeiRequestApiComponents",zhongmeiRequestApiComponents);
|
|
|
|
|
- components.put("zijinRequestApiComponents",zijinRequestApiComponents);
|
|
|
|
|
- components.put("insCrawlerOrderComponents",insCrawlerOrderComponents);
|
|
|
|
|
- components.put("ptlCrawlerApiService",ptlCrawlerApiService);
|
|
|
|
|
- components.put("ptlAgreementAttributionService",ptlAgreementAttributionService);
|
|
|
|
|
|
|
+ private HashMap<String, Object> getComponents() {
|
|
|
|
|
+ HashMap<String, Object> components = new HashMap<>();
|
|
|
|
|
+ components.put("configureParametersComponents", configureParametersComponents);
|
|
|
|
|
+ components.put("daJiaRequestApiComponents", daJiaRequestApiComponents);
|
|
|
|
|
+ components.put("yongchengRequestApiComponents", yongchengRequestApiComponents);
|
|
|
|
|
+ components.put("guorenRequestApiComponent", guorenRequestApiComponent);
|
|
|
|
|
+ components.put("huaTaiRequestApiComponents", huaTaiRequestApiComponents);
|
|
|
|
|
+ components.put("zhongmeiRequestApiComponents", zhongmeiRequestApiComponents);
|
|
|
|
|
+ components.put("zijinRequestApiComponents", zijinRequestApiComponents);
|
|
|
|
|
+ components.put("insCrawlerOrderComponents", insCrawlerOrderComponents);
|
|
|
|
|
+ components.put("ptlCrawlerApiService", ptlCrawlerApiService);
|
|
|
|
|
+ components.put("ptlAgreementAttributionService", ptlAgreementAttributionService);
|
|
|
return components;
|
|
return components;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private HashMap<String,String> get24HourTime(){
|
|
|
|
|
- HashMap<String,String> components = new HashMap<>();
|
|
|
|
|
|
|
+ private HashMap<String, String> get24HourTime() {
|
|
|
|
|
+ HashMap<String, String> components = new HashMap<>();
|
|
|
// 获取当前时间
|
|
// 获取当前时间
|
|
|
LocalDateTime currentTime = LocalDateTime.now();
|
|
LocalDateTime currentTime = LocalDateTime.now();
|
|
|
// 获取前24小时的时间
|
|
// 获取前24小时的时间
|
|
|
LocalDateTime previous24Hours = currentTime.minus(Duration.ofHours(24));
|
|
LocalDateTime previous24Hours = currentTime.minus(Duration.ofHours(24));
|
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
LocalDateTime current = LocalDateTime.now();
|
|
LocalDateTime current = LocalDateTime.now();
|
|
|
- components.put("startTime",previous24Hours.format(formatter));
|
|
|
|
|
- components.put("endTime",current.format(formatter));
|
|
|
|
|
|
|
+ components.put("startTime", previous24Hours.format(formatter));
|
|
|
|
|
+ components.put("endTime", current.format(formatter));
|
|
|
return components;
|
|
return components;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|