招商阶段短信通知与回调逻辑更改
This commit is contained in:
@@ -184,6 +184,8 @@ public enum ErrorCodeEnum {
|
||||
|
||||
NEW_STORE_FALSE(109011, "新店开业流程API调用失败", null),
|
||||
|
||||
AUDIT_RESULT_FALSE(109012, "意向加盟合同API本次调用结果与上一次不一致", null),
|
||||
|
||||
|
||||
INSERT_OPENING_OPERATION_PLAN_AUDIT_FALSE(103001,"插入运营方案审核信息失败",null),
|
||||
INSERT_OPENING_OPERATION_PLAN_FALSE(103002,"插入运营方案失败",null),
|
||||
|
||||
@@ -29,6 +29,7 @@ public class LineInfoDO {
|
||||
/**
|
||||
* 申请人姓名
|
||||
*/
|
||||
@Column(name = "username")
|
||||
private String username;
|
||||
|
||||
/**
|
||||
@@ -166,6 +167,7 @@ public class LineInfoDO {
|
||||
/**
|
||||
* 加盟商编码
|
||||
*/
|
||||
@Column(name = "partner_num")
|
||||
private String partnerNum;
|
||||
|
||||
}
|
||||
@@ -119,6 +119,7 @@ public class ApplyLicenseServiceImpl implements ApplyLicenseService {
|
||||
requestMap.put("storeName", shopInfoDO.getShopName());
|
||||
requestMap.put("partnerName,", lineInfoDO.getUsername());
|
||||
requestMap.put("partnerMobile", lineInfoDO.getMobile());
|
||||
log.info("submitLicense SMS requestMap:{}",JSONObject.toJSONString(requestMap));
|
||||
commonService.sendMessage(Collections.singletonList(shopInfoDO.getSupervisorUserId()), MessageEnum.MESSAGE_17, requestMap);
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -8,10 +8,7 @@ import com.cool.store.entity.BankdocDO;
|
||||
import com.cool.store.entity.BanktypeDO;
|
||||
import com.cool.store.entity.LineAuditInfoDO;
|
||||
import com.cool.store.entity.LineInfoDO;
|
||||
import com.cool.store.enums.AuditResultTypeEnum;
|
||||
import com.cool.store.enums.LineStatusEnum;
|
||||
import com.cool.store.enums.WorkflowSubStageEnum;
|
||||
import com.cool.store.enums.WorkflowSubStageStatusEnum;
|
||||
import com.cool.store.enums.*;
|
||||
import com.cool.store.mapper.LinePayMapper;
|
||||
import com.cool.store.request.AuditRejectRequest;
|
||||
import com.cool.store.request.BranchBankPageRequest;
|
||||
@@ -48,6 +45,9 @@ public class BankServiceImpl extends LineFlowService implements BankService {
|
||||
@Resource
|
||||
private LineAuditInfoDAO lineAuditInfoDAO;
|
||||
|
||||
@Resource
|
||||
CommonService commonService;
|
||||
|
||||
@Override
|
||||
public List<BanktypeDO> listBank() {
|
||||
List<BanktypeDO> bankList = bankDAO.listBank();
|
||||
@@ -71,6 +71,7 @@ public class BankServiceImpl extends LineFlowService implements BankService {
|
||||
WorkflowSubStageEnum nextStage = workflowSubStageEnum.getNextStage();
|
||||
//更新线索阶段
|
||||
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(), userId);
|
||||
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.INTENTION_PAYMENT_SUCCESS);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -84,9 +84,9 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_63.getCode());
|
||||
lineInfoMapper.updateByPrimaryKeySelective(lineInfoDO);
|
||||
Map<String, String> requestMap = new HashMap<>();
|
||||
requestMap.put("partnerUsername",lineInfoDO.getUsername());
|
||||
requestMap.put("partnerMobile",lineInfoDO.getMobile());
|
||||
requestMap.put("lineId",String.valueOf(lineInfoDO.getId()));
|
||||
requestMap.put("partnerUsername", lineInfoDO.getUsername());
|
||||
requestMap.put("partnerMobile", lineInfoDO.getMobile());
|
||||
requestMap.put("lineId", String.valueOf(lineInfoDO.getId()));
|
||||
requestMap.put("submitTime", DateUtils.dateTimeNow(DateUtils.SPECIAL_DATE_START));
|
||||
commonService.sendMessage(Collections.singletonList(lineInfoDO.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_30,
|
||||
@@ -160,6 +160,7 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
lineInfo.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_65.getCode());
|
||||
lineInfo.setUpdateUserId(userId);
|
||||
lineInfoDAO.updateLineInfo(lineInfo);
|
||||
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.INTENTION_PROTOCOL_FAIL);
|
||||
}
|
||||
//待OA审核code 75 处理逻辑
|
||||
if (lineInfo.getWorkflowSubStageStatus().equals(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_75.getCode())) {
|
||||
@@ -168,8 +169,8 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
lineInfoDAO.updateLineInfo(lineInfo);
|
||||
//message
|
||||
Map<String, String> requestMap = new HashMap<>();
|
||||
requestMap.put("partnerUsername",lineInfo.getUsername());
|
||||
requestMap.put("lineId",String.valueOf(lineInfo.getId()));
|
||||
requestMap.put("partnerUsername", lineInfo.getUsername());
|
||||
requestMap.put("lineId", String.valueOf(lineInfo.getId()));
|
||||
requestMap.put("submitTime", DateUtils.dateTimeNow(DateUtils.SPECIAL_DATE_START));
|
||||
commonService.sendMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_31,
|
||||
@@ -272,33 +273,39 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
|
||||
@Override
|
||||
public Boolean auditResult(AuditResultRequest request) {
|
||||
try {
|
||||
String kdzBusinessId = request.getKdzBusinessId();
|
||||
String lineId = getLineId(kdzBusinessId);
|
||||
if (StringUtil.isBlank(lineId)) {
|
||||
throw new ServiceException(ErrorCodeEnum.BUSINESS_ID_NOT_EXIST);
|
||||
}
|
||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(Long.valueOf(lineId));
|
||||
if (Objects.isNull(lineInfoDO)) {
|
||||
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
||||
}
|
||||
if (request.getAuditResult() == 1) {
|
||||
AuditPassRequest auditPassRequest = new AuditPassRequest();
|
||||
auditPassRequest.setLineId(lineInfoDO.getId());
|
||||
auditPassRequest.setPassReason(request.getCause());
|
||||
auditPassRequest.setWorkflowSubStage(lineInfoDO.getWorkflowSubStage());
|
||||
commonService.getLineFlowService(auditPassRequest.getWorkflowSubStage()).auditPass(auditPassRequest, null);
|
||||
} else if (request.getAuditResult() == 0) {
|
||||
AuditRejectRequest auditRejectRequest = new AuditRejectRequest();
|
||||
auditRejectRequest.setLineId(lineInfoDO.getId());
|
||||
auditRejectRequest.setWorkflowSubStage(lineInfoDO.getWorkflowSubStage());
|
||||
auditRejectRequest.setRejectPublicReason(request.getCause());
|
||||
auditRejectRequest.setRejectRealReason(request.getFailureCause());
|
||||
commonService.getLineFlowService(auditRejectRequest.getWorkflowSubStage()).auditReject(auditRejectRequest, null);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException(ErrorCodeEnum.UNKNOWN);
|
||||
String kdzBusinessId = request.getKdzBusinessId();
|
||||
String lineId = getLineId(kdzBusinessId);
|
||||
String redisKey = "kdzBusinessId:" + kdzBusinessId;
|
||||
if (StringUtil.isBlank(lineId)) {
|
||||
throw new ServiceException(ErrorCodeEnum.BUSINESS_ID_NOT_EXIST);
|
||||
}
|
||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(Long.valueOf(lineId));
|
||||
if (Objects.isNull(lineInfoDO)) {
|
||||
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
||||
}
|
||||
String auditResult = redisUtilPool.getString(redisKey);
|
||||
if (WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_70.getCode().equals(lineInfoDO.getWorkflowSubStageStatus())){
|
||||
//鲜丰系统不稳定,会出现调用成功但内部状态未更改的情况,这时直接返回true即可
|
||||
return true;
|
||||
}
|
||||
if (StringUtil.isNotBlank(auditResult) && !auditResult.equals(String.valueOf(request.getAuditResult()))) {
|
||||
throw new ServiceException(ErrorCodeEnum.AUDIT_RESULT_FALSE);
|
||||
}
|
||||
if (request.getAuditResult() == 1) {
|
||||
AuditPassRequest auditPassRequest = new AuditPassRequest();
|
||||
auditPassRequest.setLineId(lineInfoDO.getId());
|
||||
auditPassRequest.setPassReason(request.getCause());
|
||||
auditPassRequest.setWorkflowSubStage(lineInfoDO.getWorkflowSubStage());
|
||||
commonService.getLineFlowService(auditPassRequest.getWorkflowSubStage()).auditPass(auditPassRequest, null);
|
||||
} else if (request.getAuditResult() == 0) {
|
||||
AuditRejectRequest auditRejectRequest = new AuditRejectRequest();
|
||||
auditRejectRequest.setLineId(lineInfoDO.getId());
|
||||
auditRejectRequest.setWorkflowSubStage(lineInfoDO.getWorkflowSubStage());
|
||||
auditRejectRequest.setRejectPublicReason(request.getCause());
|
||||
auditRejectRequest.setRejectRealReason(request.getFailureCause());
|
||||
commonService.getLineFlowService(auditRejectRequest.getWorkflowSubStage()).auditReject(auditRejectRequest, null);
|
||||
}
|
||||
redisUtilPool.setString(redisKey, JSONObject.toJSONString(request.getAuditResult()));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -102,6 +102,7 @@ public class TrainingExperienceServiceImpl extends LineFlowService implements Tr
|
||||
lineInfoDO.setWorkflowSubStage(WorkflowSubStageEnum.SECOND_INTERVIEWS.getCode());
|
||||
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.SECOND_INTERVIEWS_100.getCode());
|
||||
lineInfoMapper.updateByPrimaryKeySelective(lineInfoDO);
|
||||
commonService.sendSms(lineInfoDO.getMobile(),SMSMsgEnum.SECOND_INTERVIEW_APPOINTMENT);
|
||||
} else {
|
||||
lineInfoDO.setWorkflowSubStage(WorkflowSubStageEnum.STORE_EXPERIENCE.getCode());
|
||||
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_95.getCode());
|
||||
|
||||
@@ -107,6 +107,13 @@ public class XxlJobHandler {
|
||||
List<Long> lineIds = leaseBaseInfoDOS.stream().map(LeaseBaseInfoDO::getLineId).collect(Collectors.toList());
|
||||
WorkflowSubStageStatusEnum storeExperience90 = WorkflowSubStageStatusEnum.STORE_EXPERIENCE_90;
|
||||
lineInfoMapper.toExperiencing(lineIds, storeExperience90.getCode());
|
||||
|
||||
List<LineInfoDO> lineInfos = lineInfoMapper.getByLineIds(lineIds);
|
||||
Map<Long, String> lineInfoMap = lineInfos.stream().collect(Collectors.toMap(LineInfoDO::getId, LineInfoDO::getMobile));
|
||||
leaseBaseInfoDOS.forEach(e -> {
|
||||
commonService.sendSms(lineInfoMap.get(e.getLineId()), SMSMsgEnum.SHOP_EXPERIENCE);
|
||||
});
|
||||
|
||||
log.info("------实训体验状态变更结束------");
|
||||
XxlJobHelper.handleSuccess();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user