支持跳过

This commit is contained in:
苏竹红
2024-07-16 16:12:15 +08:00
parent 53f63f22ce
commit 56e915919c
12 changed files with 62 additions and 41 deletions

View File

@@ -31,7 +31,6 @@ public enum RocketMqGroupEnum {
* 事件消息监听
*/
FEI_SHU_EVENT_LISTENER("fei_shu_event_listener", new ArrayList<>(Arrays.asList(RocketMqTagEnum.USER_EVENT, RocketMqTagEnum.AUTH_SCOPE_CHANGE, RocketMqTagEnum.DEPT_EVENT))),
SYNC_TRAINING_PERSON("sync_training_person", new ArrayList<>(Arrays.asList(RocketMqTagEnum.SYNC_TRAINING_PERSON, RocketMqTagEnum.SYNC_TRAINING_SHOP_PERSON))),
;

View File

@@ -15,9 +15,6 @@ public enum RocketMqTagEnum {
USER_EVENT("user_event","钉钉通讯录变更事件"),
DEPT_EVENT("dept_event","部门事件"),
STORE_DING_QUEUE("store_ding_queue", "微应用钉钉消息发送"),
SYNC_TRAINING_PERSON("sync_training_person", "建店完成后拉取培训人员"),
SYNC_TRAINING_SHOP_PERSON("sync_training_shop_person", "建店完成后拉取店下的培训人员"),
;

View File

@@ -84,20 +84,5 @@ public class ConsumerClient {
// return consumerBean;
// }
/**
* 鲜丰门店下培训人员拉取
*/
@Bean(initMethod = "start", destroyMethod = "shutdown")
public ConsumerBean xfsgTrainingPersonSyncQueueBean() {
RocketMqGroupEnum groupEnum = RocketMqGroupEnum.SYNC_TRAINING_PERSON;
ConsumerBean consumerBean = new ConsumerBean();
//配置文件
Properties properties = getCommonProperties(groupEnum);
consumerBean.setProperties(properties);
Map<Subscription, MessageListener> commonSubscriptionTable = getCommonSubscriptionTable(groupEnum, xfsgTrainingPersonSyncListener);
//订阅多个topic如上面设置
consumerBean.setSubscriptionTable(commonSubscriptionTable);
return consumerBean;
}
}

View File

@@ -65,14 +65,14 @@ public class XfsgTrainingPersonSyncListener implements MessageListener {
boolean lock = redisUtilPool.setNxExpire(lockKey, message.getMsgID(), CommonConstants.NORMAL_LOCK_TIMES);
if(lock){
try {
switch (RocketMqTagEnum.getByTag(message.getTag())){
case SYNC_TRAINING_PERSON:
syncXfsgTrainingPerson(text);
break;
case SYNC_TRAINING_SHOP_PERSON:
syncXfsgTrainingShopPerson(text);
break;
}
// switch (RocketMqTagEnum.getByTag(message.getTag())){
// case SYNC_TRAINING_PERSON:
// syncXfsgTrainingPerson(text);
// break;
// case SYNC_TRAINING_SHOP_PERSON:
// syncXfsgTrainingShopPerson(text);
// break;
// }
}catch (Exception e){
log.error("XfsgTrainingPersonSyncListener consume error",e);
return Action.ReconsumeLater;

View File

@@ -27,6 +27,13 @@ public interface IntentAgreementService {
Boolean initiating(IntentAgreementSubmitRequest request,LoginUserInfo user);
/**
* 跳过意向协议
* @param lineId
* @return
*/
Boolean skipIntentAgreement(Long lineId,LoginUserInfo user);
ResponseResult save(FranchiseeSaveRequest request, LoginUserInfo user) throws ApiException;
InitiatingRequest getOaDetail(String mobile, String idCardNo);

View File

@@ -1,5 +1,7 @@
package com.cool.store.service;
import com.cool.store.context.CurrentUserHolder;
import com.cool.store.context.LoginUserInfo;
import com.cool.store.request.LinePaySubmitRequest;
import com.cool.store.vo.LinePayVO;
import com.cool.store.vo.PartnerUserInfoVO;
@@ -18,7 +20,7 @@ public interface LinePayService {
* @param lineId
* @return
*/
Boolean skipPay(Long lineId);
Boolean skipPay(Long lineId, LoginUserInfo user );
Long submitPayInfo(LinePaySubmitRequest followLog, PartnerUserInfoVO partnerUser);

View File

@@ -190,6 +190,25 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
return false;
}
@Override
public Boolean skipIntentAgreement(Long lineId,LoginUserInfo user) {
log.info("skipIntentAgreement lineId:{},操作人:{}",lineId,user.getName());
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(lineId);
if (lineInfo == null){
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
}
LineInfoDO updateLine = new LineInfoDO();
updateLine.setId(lineInfo.getId());
updateLine.setWorkflowStage(WorkflowStageEnum.STORE.getCode());
updateLine.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_125.getCode());
updateLine.setDevelopmentManager(lineInfo.getInvestmentManager());
updateLine.setUpdateUserId(user.getUserId());
lineInfoDAO.updateLineInfo(updateLine);
//初始化店铺
shopService.initShop(lineInfo);
return Boolean.TRUE;
}
private void verifyDate(InitiatingRequest request) {
if (request.getSignStartTime() == null || request.getSignEndTime() == null) {
throw new ServiceException(ErrorCodeEnum.TIME_NULL_FALSE);

View File

@@ -3,6 +3,7 @@ package com.cool.store.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSONObject;
import com.cool.store.context.LoginUserInfo;
import com.cool.store.dao.HyPartnerUserInfoDAO;
import com.cool.store.dao.LineInfoDAO;
import com.cool.store.dao.LinePayDAO;
@@ -76,13 +77,16 @@ public class LinePayServiceImpl implements LinePayService {
}
@Override
public Boolean skipPay(Long lineId) {
public Boolean skipPay(Long lineId, LoginUserInfo user) {
log.info("skipIntentAgreement lineId:{},操作人:{}",lineId,user.getName());
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(lineId);
if (lineInfo == null) {
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
}
lineInfo.setWorkflowSubStage(WorkflowSubStageEnum.SIGN_INTENT_AGREEMENT.getCode());
lineInfo.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_70.getCode());
lineInfo.setUpdateTime(new Date());
lineInfo.setUpdateUserId(user.getUserId());
lineInfoDAO.insertOrUpdate(lineInfo);
return Boolean.TRUE;
}

View File

@@ -479,8 +479,6 @@ public class SysStoreAppServiceImpl implements SysStoreAppService, AuditResultSe
preparationService.contractAndBuildStoreCompletion(shopId);
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
commonService.sendSms(lineInfoDO.getMobile(), SMSMsgEnum.SYS_BUILD_STORE_DONE);
// 异步处理
simpleMessageService.send(JSONObject.toJSONString(shopInfoDO), RocketMqTagEnum.SYNC_TRAINING_SHOP_PERSON);
}
shopAuditInfoMapper.insertSelective(shopAuditInfoDO);
//更新阶段状态

View File

@@ -146,4 +146,14 @@ public class LineInfoController {
return ResponseResult.success(lineService.addLine(addLineRequest));
}
@ApiOperation("跳过意向金")
@GetMapping("/skipPay")
@ApiImplicitParams({
@ApiImplicitParam(name = "lineId", value = "线索id", required = true)
})
public ResponseResult<Boolean> skipPay(@RequestParam("lineId")Long lineId) {
return ResponseResult.success(linePayService.skipPay(lineId,CurrentUserHolder.getUser()));
}
}

View File

@@ -11,6 +11,8 @@ import com.cool.store.response.ResponseResult;
import com.cool.store.response.SigningBaseInfoResponse;
import com.cool.store.service.IntentAgreementService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
@@ -58,7 +60,14 @@ public class PCIntentAgreementController {
return ResponseResult.success(intentAgreementService.getOaDetail(mobile,idCardNo));
}
@ApiOperation("跳过意向协议")
@GetMapping("/skipIntentAgreement")
@ApiImplicitParams({
@ApiImplicitParam(name = "lineId", value = "线索id", required = true)
})
public ResponseResult<Boolean> skipIntentAgreement(@RequestParam("lineId")Long lineId) {
return ResponseResult.success(intentAgreementService.skipIntentAgreement(lineId,CurrentUserHolder.getUser()));
}
}

View File

@@ -39,15 +39,6 @@ public class LinePayController {
return ResponseResult.success(linePayService.getLinePayInfo(lineId, PayBusinessTypeEnum.INTENT_MONEY.getCode(),null));
}
@ApiOperation("跳过意向金")
@GetMapping("/skipPay")
@ApiImplicitParams({
@ApiImplicitParam(name = "lineId", value = "线索id", required = true)
})
public ResponseResult<Boolean> skipPay(@RequestParam("lineId")Long lineId) {
return ResponseResult.success(linePayService.skipPay(lineId));
}
@ApiOperation("缴纳意向金/加盟费")
@PostMapping("/submitPayInfo")
public ResponseResult<Long> submitPayInfo(@RequestBody LinePaySubmitRequest request){