支持跳过
This commit is contained in:
@@ -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))),
|
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))),
|
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
@@ -15,9 +15,6 @@ public enum RocketMqTagEnum {
|
|||||||
USER_EVENT("user_event","钉钉通讯录变更事件"),
|
USER_EVENT("user_event","钉钉通讯录变更事件"),
|
||||||
DEPT_EVENT("dept_event","部门事件"),
|
DEPT_EVENT("dept_event","部门事件"),
|
||||||
STORE_DING_QUEUE("store_ding_queue", "微应用钉钉消息发送"),
|
STORE_DING_QUEUE("store_ding_queue", "微应用钉钉消息发送"),
|
||||||
SYNC_TRAINING_PERSON("sync_training_person", "建店完成后拉取培训人员"),
|
|
||||||
|
|
||||||
SYNC_TRAINING_SHOP_PERSON("sync_training_shop_person", "建店完成后拉取店下的培训人员"),
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -84,20 +84,5 @@ public class ConsumerClient {
|
|||||||
// return consumerBean;
|
// 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,14 +65,14 @@ public class XfsgTrainingPersonSyncListener implements MessageListener {
|
|||||||
boolean lock = redisUtilPool.setNxExpire(lockKey, message.getMsgID(), CommonConstants.NORMAL_LOCK_TIMES);
|
boolean lock = redisUtilPool.setNxExpire(lockKey, message.getMsgID(), CommonConstants.NORMAL_LOCK_TIMES);
|
||||||
if(lock){
|
if(lock){
|
||||||
try {
|
try {
|
||||||
switch (RocketMqTagEnum.getByTag(message.getTag())){
|
// switch (RocketMqTagEnum.getByTag(message.getTag())){
|
||||||
case SYNC_TRAINING_PERSON:
|
// case SYNC_TRAINING_PERSON:
|
||||||
syncXfsgTrainingPerson(text);
|
// syncXfsgTrainingPerson(text);
|
||||||
break;
|
// break;
|
||||||
case SYNC_TRAINING_SHOP_PERSON:
|
// case SYNC_TRAINING_SHOP_PERSON:
|
||||||
syncXfsgTrainingShopPerson(text);
|
// syncXfsgTrainingShopPerson(text);
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
log.error("XfsgTrainingPersonSyncListener consume error",e);
|
log.error("XfsgTrainingPersonSyncListener consume error",e);
|
||||||
return Action.ReconsumeLater;
|
return Action.ReconsumeLater;
|
||||||
|
|||||||
@@ -27,6 +27,13 @@ public interface IntentAgreementService {
|
|||||||
|
|
||||||
Boolean initiating(IntentAgreementSubmitRequest request,LoginUserInfo user);
|
Boolean initiating(IntentAgreementSubmitRequest request,LoginUserInfo user);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跳过意向协议
|
||||||
|
* @param lineId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean skipIntentAgreement(Long lineId,LoginUserInfo user);
|
||||||
|
|
||||||
ResponseResult save(FranchiseeSaveRequest request, LoginUserInfo user) throws ApiException;
|
ResponseResult save(FranchiseeSaveRequest request, LoginUserInfo user) throws ApiException;
|
||||||
|
|
||||||
InitiatingRequest getOaDetail(String mobile, String idCardNo);
|
InitiatingRequest getOaDetail(String mobile, String idCardNo);
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package com.cool.store.service;
|
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.request.LinePaySubmitRequest;
|
||||||
import com.cool.store.vo.LinePayVO;
|
import com.cool.store.vo.LinePayVO;
|
||||||
import com.cool.store.vo.PartnerUserInfoVO;
|
import com.cool.store.vo.PartnerUserInfoVO;
|
||||||
@@ -18,7 +20,7 @@ public interface LinePayService {
|
|||||||
* @param lineId
|
* @param lineId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Boolean skipPay(Long lineId);
|
Boolean skipPay(Long lineId, LoginUserInfo user );
|
||||||
|
|
||||||
Long submitPayInfo(LinePaySubmitRequest followLog, PartnerUserInfoVO partnerUser);
|
Long submitPayInfo(LinePaySubmitRequest followLog, PartnerUserInfoVO partnerUser);
|
||||||
|
|
||||||
|
|||||||
@@ -190,6 +190,25 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
|||||||
return false;
|
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) {
|
private void verifyDate(InitiatingRequest request) {
|
||||||
if (request.getSignStartTime() == null || request.getSignEndTime() == null) {
|
if (request.getSignStartTime() == null || request.getSignEndTime() == null) {
|
||||||
throw new ServiceException(ErrorCodeEnum.TIME_NULL_FALSE);
|
throw new ServiceException(ErrorCodeEnum.TIME_NULL_FALSE);
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.cool.store.service.impl;
|
|||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.cool.store.context.LoginUserInfo;
|
||||||
import com.cool.store.dao.HyPartnerUserInfoDAO;
|
import com.cool.store.dao.HyPartnerUserInfoDAO;
|
||||||
import com.cool.store.dao.LineInfoDAO;
|
import com.cool.store.dao.LineInfoDAO;
|
||||||
import com.cool.store.dao.LinePayDAO;
|
import com.cool.store.dao.LinePayDAO;
|
||||||
@@ -76,13 +77,16 @@ public class LinePayServiceImpl implements LinePayService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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);
|
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(lineId);
|
||||||
if (lineInfo == null) {
|
if (lineInfo == null) {
|
||||||
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
||||||
}
|
}
|
||||||
lineInfo.setWorkflowSubStage(WorkflowSubStageEnum.SIGN_INTENT_AGREEMENT.getCode());
|
lineInfo.setWorkflowSubStage(WorkflowSubStageEnum.SIGN_INTENT_AGREEMENT.getCode());
|
||||||
lineInfo.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_70.getCode());
|
lineInfo.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_70.getCode());
|
||||||
|
lineInfo.setUpdateTime(new Date());
|
||||||
|
lineInfo.setUpdateUserId(user.getUserId());
|
||||||
lineInfoDAO.insertOrUpdate(lineInfo);
|
lineInfoDAO.insertOrUpdate(lineInfo);
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -479,8 +479,6 @@ public class SysStoreAppServiceImpl implements SysStoreAppService, AuditResultSe
|
|||||||
preparationService.contractAndBuildStoreCompletion(shopId);
|
preparationService.contractAndBuildStoreCompletion(shopId);
|
||||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
||||||
commonService.sendSms(lineInfoDO.getMobile(), SMSMsgEnum.SYS_BUILD_STORE_DONE);
|
commonService.sendSms(lineInfoDO.getMobile(), SMSMsgEnum.SYS_BUILD_STORE_DONE);
|
||||||
// 异步处理
|
|
||||||
simpleMessageService.send(JSONObject.toJSONString(shopInfoDO), RocketMqTagEnum.SYNC_TRAINING_SHOP_PERSON);
|
|
||||||
}
|
}
|
||||||
shopAuditInfoMapper.insertSelective(shopAuditInfoDO);
|
shopAuditInfoMapper.insertSelective(shopAuditInfoDO);
|
||||||
//更新阶段状态
|
//更新阶段状态
|
||||||
|
|||||||
@@ -146,4 +146,14 @@ public class LineInfoController {
|
|||||||
return ResponseResult.success(lineService.addLine(addLineRequest));
|
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()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ import com.cool.store.response.ResponseResult;
|
|||||||
import com.cool.store.response.SigningBaseInfoResponse;
|
import com.cool.store.response.SigningBaseInfoResponse;
|
||||||
import com.cool.store.service.IntentAgreementService;
|
import com.cool.store.service.IntentAgreementService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -58,7 +60,14 @@ public class PCIntentAgreementController {
|
|||||||
return ResponseResult.success(intentAgreementService.getOaDetail(mobile,idCardNo));
|
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()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,15 +39,6 @@ public class LinePayController {
|
|||||||
return ResponseResult.success(linePayService.getLinePayInfo(lineId, PayBusinessTypeEnum.INTENT_MONEY.getCode(),null));
|
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("缴纳意向金/加盟费")
|
@ApiOperation("缴纳意向金/加盟费")
|
||||||
@PostMapping("/submitPayInfo")
|
@PostMapping("/submitPayInfo")
|
||||||
public ResponseResult<Long> submitPayInfo(@RequestBody LinePaySubmitRequest request){
|
public ResponseResult<Long> submitPayInfo(@RequestBody LinePaySubmitRequest request){
|
||||||
|
|||||||
Reference in New Issue
Block a user