修改定时任务

This commit is contained in:
shuo.wang
2024-05-13 14:43:06 +08:00
parent 34b5bbb27f
commit 8c3312df65
3 changed files with 41 additions and 6 deletions

View File

@@ -125,16 +125,16 @@ public enum MessageEnum {
URLEncoder.encode("pages/common-web-view/index?noticeType=xfsg&routerUrl=notice&target=trainerUser&timestamp="+System.currentTimeMillis()+"&userDetailId="+ paramMap.get("userDetailId"), StandardCharsets.UTF_8.name());
case MESSAGE_24:
return "dingtalk://dingtalkclient/action/open_micro_app?appId="+appId+"&corpId="+corpId+"&page=" +
URLEncoder.encode("pages/common-web-view/index?noticeType=xfsg&routerUrl=notice&target=employeeTraining&timestamp="+System.currentTimeMillis(), StandardCharsets.UTF_8.name());
URLEncoder.encode("pages/common-web-view/index?noticeType=xfsg&routerUrl=notice&target=threeAcceptance&timestamp="+System.currentTimeMillis(), StandardCharsets.UTF_8.name());
case MESSAGE_25:
return "dingtalk://dingtalkclient/action/open_micro_app?appId="+appId+"&corpId="+corpId+"&page=" +
URLEncoder.encode("pages/common-web-view/index?noticeType=xfsg&routerUrl=notice&target=employeeTraining&timestamp="+System.currentTimeMillis(), StandardCharsets.UTF_8.name());
URLEncoder.encode("pages/common-web-view/index?noticeType=xfsg&routerUrl=notice&target=threeAcceptance&timestamp="+System.currentTimeMillis(), StandardCharsets.UTF_8.name());
case MESSAGE_26:
return "dingtalk://dingtalkclient/action/open_micro_app?appId="+appId+"&corpId="+corpId+"&page=" +
URLEncoder.encode("pages/common-web-view/index?noticeType=xfsg&routerUrl=notice&target=employeeTraining&timestamp="+System.currentTimeMillis()+"&shopId="+ paramMap.get("shopId"), StandardCharsets.UTF_8.name());
return domainUrl + "/dd-noticemsg?appId=" + appId+"&corpId="+corpId+"&page=" +
URLEncoder.encode("pages/common-web-view/index?noticeType=xfsg&routerUrl=notice&target=openPlan&timestamp="+System.currentTimeMillis()+"&lineId="+ paramMap.get("lineId")+"&shopId="+ paramMap.get("shopId"), StandardCharsets.UTF_8.name());
case MESSAGE_27:
return "dingtalk://dingtalkclient/action/open_micro_app?appId="+appId+"&corpId="+corpId+"&page=" +
URLEncoder.encode("pages/common-web-view/index?noticeType=xfsg&routerUrl=notice&target=employeeTraining&timestamp="+System.currentTimeMillis()+"&shopId="+ paramMap.get("shopId"), StandardCharsets.UTF_8.name());
return domainUrl + "/dd-noticemsg?appId=" + appId+"&corpId="+corpId+"&page=" +
URLEncoder.encode("pages/common-web-view/index?noticeType=xfsg&routerUrl=notice&target=orderList&timestamp="+System.currentTimeMillis()+"&lineId="+ paramMap.get("lineId"), StandardCharsets.UTF_8.name());
default:
return "";

View File

@@ -205,6 +205,7 @@ public class PreparationServiceImpl implements PreparationService {
Map<String, String> messageMap = new HashMap<>();
messageMap.put("storeName",shopInfo.getShopName());
messageMap.put("shopId",shopId.toString());
messageMap.put("lineId", shopInfo.getLineId().toString());
messageMap.put("partnerUsername",lineInfo.getUsername());
messageMap.put("partnerMobile",lineInfo.getMobile());
commonService.sendMessage(Arrays.asList(shopInfo.getSupervisorUserId()), MessageEnum.MESSAGE_26, messageMap);
@@ -215,6 +216,7 @@ public class PreparationServiceImpl implements PreparationService {
Map<String, String> messageMap1 = new HashMap<>();
messageMap1.put("storeName",shopInfo.getShopName());
messageMap1.put("shopId",shopId.toString());
messageMap1.put("lineId", shopInfo.getLineId().toString());
messageMap1.put("partnerUsername",lineInfo.getUsername());
messageMap1.put("partnerMobile",lineInfo.getMobile());
commonService.sendMessage(Arrays.asList(shopInfo.getSupervisorUserId()), MessageEnum.MESSAGE_27, messageMap1);

View File

@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.cool.store.dao.*;
import com.cool.store.dto.OpenCityDTO;
import com.cool.store.entity.*;
import com.cool.store.job.XxlJobHandler;
import com.cool.store.mapper.HyOpenAreaInfoMapper;
import com.cool.store.request.xfsgFirstOrderListRequest;
import com.cool.store.response.ResponseResult;
@@ -50,6 +51,8 @@ public class TestController {
@Resource
private RegionService regionService;
@Resource
private XxlJobHandler xxlJobHandler;
@PostMapping("/getFirstOrders")
public ResponseResult<xfsgFirstOderListResponse> getFirstOrders(@RequestBody xfsgFirstOrderListRequest storeCodeList) {
xfsgFirstOderListResponse firstOrderList = coolStoreStartFlowService.getFirstOrderList(storeCodeList);
@@ -174,4 +177,34 @@ public class TestController {
RegionPathNameVO regionPathNameVO = regionService.getAllRegionName(regionId);
return ResponseResult.success(regionPathNameVO);
}
@GetMapping("/updateFirstOrder")
public ResponseResult updateFirstOrder(){
xxlJobHandler.updateFirstOrder();
return ResponseResult.success();
}
@GetMapping("updateEntryTime")
public ResponseResult updateEntryTime(){
xxlJobHandler.updateEntryTime();
return ResponseResult.success();
}
@GetMapping("/fitmentAcceptanceHandler")
public ResponseResult fitmentAcceptanceHandler(){
xxlJobHandler.fitmentAcceptanceHandler();
return ResponseResult.success();
}
@GetMapping("/threeAcceptanceBookingMessage")
public ResponseResult threeAcceptanceBookingMessage(){
xxlJobHandler.threeAcceptanceBookingMessage();
return ResponseResult.success();
}
@GetMapping("/threeAcceptanceMessage")
public ResponseResult threeAcceptanceMessage(){
xxlJobHandler.threeAcceptanceMessage();
return ResponseResult.success();
}
@GetMapping("/waitThreeAcceptanceMessage")
public ResponseResult waitThreeAcceptanceMessage(){
xxlJobHandler.waitThreeAcceptanceMessage();
return ResponseResult.success();
}
}