bug修改

This commit is contained in:
zhangchenbiao
2024-04-28 17:55:04 +08:00
parent 272dca701f
commit 71a68b3a59
9 changed files with 43 additions and 10 deletions

View File

@@ -75,7 +75,7 @@ public class CommonService {
return (AuditResultService) applicationContext.getBean(auditEnum.getClazz());
}
public void sendMessage(List<String> userIds, Long lineId, MessageEnum message, String... param){
public void sendMessage(List<String> userIds, MessageEnum message, String... param){
if(CollectionUtils.isEmpty(userIds)){
return;
}
@@ -83,7 +83,7 @@ public class CommonService {
if(CollectionUtils.isEmpty(userIds)){
return;
}
String mobileParam = MessageFormat.format("{0}&eid={1}&corpId={2}&appType=dingding2&lineId={3}", "", enterpriseId, dingCorpId, String.valueOf(lineId));
String mobileParam = MessageFormat.format("{0}&eid={1}&corpId={2}&appType=dingding2&lineId={3}", "", enterpriseId, dingCorpId, null);
try {
String messageUrl = coolStoreDomainUrl + "dd-noticemsg?miniAppId={0}&appId={1}&corpId={2}&appUrl=" + URLEncoder.encode("pages/common-web-view/index?routerUrl=notice&target=" + mobileParam, StandardCharsets.UTF_8.name());
SendMessageDTO messageDTO = new SendMessageDTO();
@@ -131,8 +131,10 @@ public class CommonService {
.phoneNumberJson(JSONObject.toJSONString(poneNumbers))
.signNameJson(JSONObject.toJSONString(Arrays.asList(signName)))
.templateCode(templateCode.getTemplateCode())
.templateParamJson(templateParam.toJSONString())
.build();
if(Objects.nonNull(templateParam)){
sendBatchSmsRequest.toBuilder().templateParamJson(templateParam.toJSONString());
}
CompletableFuture<SendBatchSmsResponse> response = client.sendBatchSms(sendBatchSmsRequest);
SendBatchSmsResponse resp = response.get();
log.info("短信发送response:{}", JSONObject.toJSONString(resp));

View File

@@ -156,7 +156,7 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
}
LineInterviewDO addInterview = LineInterviewDO.convertDO(lineInfo, startTime, endTime, UUIDUtils.get8UUID(), interviewerUserId, interviewType.getCode(), eventId);
lineInterviewDAO.addInterviewInfo(addInterview);
commonService.sendMessage(Arrays.asList(interviewerUserId), lineInfo.getId(), MessageEnum.MESSAGE_2, lineInfo.getUsername(), hyOpenAreaInfoDAO.selectNameMapById(lineInfo.getWantShopAreaId()), DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM, startTime));
commonService.sendMessage(Arrays.asList(interviewerUserId), MessageEnum.MESSAGE_2, lineInfo.getUsername(), hyOpenAreaInfoDAO.selectNameMapById(lineInfo.getWantShopAreaId()), DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM, startTime));
return Boolean.TRUE;
}
@@ -428,6 +428,8 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
shopService.initShop(lineInfo);
//二审稽核
auditStatusService.insert(lineInfo.getId(),interviewInfo.getId(),auditId,AuditStageEnum.TWO.getCode());
//发送短信
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.SECOND_INTERVIEW_PASS, null);
}
return lineInterviewDAO.updateInterviewInfo(updateInterviewInfo) > 0;
}

View File

@@ -81,6 +81,8 @@ public class PointServiceImpl implements PointService {
private ShopAuditInfoDAO shopAuditInfoDAO;
@Resource
private SysRoleService sysRoleService;
@Resource
private CommonService commonService;
@Value("${mybatis.configuration.variables.enterpriseId}")
private String enterpriseId;
@@ -351,6 +353,7 @@ public class PointServiceImpl implements PointService {
if(SelectStatusEnum.SELECT_STATUS_1.getCode().equals(pointInfo.getSelectStatus())){
shopStageInfoDAO.batchUpdateShopStageStatus(pointInfo.getShopId(), Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_12, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_20));
}
commonService.sendMessage(Arrays.asList(pointInfo.getDevelopmentManager()), MessageEnum.MESSAGE_7, pointInfo.getPointName(), pointInfo.getAddress());
}
return pointInfoDAO.updatePointInfo(updatePoint);
}
@@ -400,6 +403,8 @@ public class PointServiceImpl implements PointService {
if(Objects.nonNull(nextAuditRecord)){
//更新下一阶段任务的收到任务时间
pointAuditRecordDAO.updatePointAuditRecord(PointAuditRecordDO.convert(nextAuditRecord.getId(), new Date()));
List<String> sendMessageUserIds = JSONObject.parseArray(nextAuditRecord.getHandlerUserIds(), String.class);
commonService.sendMessage(sendMessageUserIds, MessageEnum.MESSAGE_8, pointInfo.getPointName(), pointInfo.getAddress());
//审批通过的情况下 生成下一个节点的待办数据
return pointTodoInfoDAO.addPointTodoInfo(PointAuditRecordDO.convertTODO(nextAuditRecord));
}
@@ -408,8 +413,8 @@ public class PointServiceImpl implements PointService {
pointInfoUpdate.setPointStatus(PointStatusEnum.POINT_STATUS_5.getCode());
if(SelectStatusEnum.SELECT_STATUS_1.getCode().equals(pointInfo.getSelectStatus())){
shopStageInfoDAO.batchUpdateShopStageStatus(pointInfo.getShopId(), Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_12, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_20));
}
commonService.sendMessage(Arrays.asList(pointInfo.getDevelopmentManager()), MessageEnum.MESSAGE_7, pointInfo.getPointName(), pointInfo.getAddress());
return pointInfoDAO.updatePointInfo(pointInfoUpdate);
}