Merge branch 'cc_20240411_supportskip' into 'master'

Cc 20240411 supportskip

See merge request hangzhou/java/custom_zxjp!10
This commit is contained in:
苏竹红
2024-07-18 02:59:18 +00:00
14 changed files with 108 additions and 43 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

@@ -32,4 +32,6 @@ public interface IntentAgreementMapper {
* @return
*/
List<SigningBaseInfoDO> selectByLineIds(List<Long> lineIds);
SigningBaseInfoDO selectByMobile(String mobile,String idCard);
}

View File

@@ -140,4 +140,18 @@
</if>
</select>
<select id="selectByMobile" resultType="com.cool.store.entity.SigningBaseInfoDO">
select
<include refid="Base_Column_List"/>
from xfsg_signing_base_info
where deleted = 0
<if test="mobile!=null and mobile!=''">
and mobile = #{mobile}
</if>
<if test="idCard!=null and idCard!=''">
and id_card_no = #{idCard}
</if>
limit 1
</select>
</mapper>

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;
@@ -13,6 +15,13 @@ public interface LinePayService {
LinePayVO getLinePayInfo(Long lineId,Integer businessType,Long shopId);
/**
* 跳过缴纳意向金
* @param lineId
* @return
*/
Boolean skipPay(Long lineId, LoginUserInfo user );
Long submitPayInfo(LinePaySubmitRequest followLog, PartnerUserInfoVO partnerUser);

View File

@@ -191,20 +191,10 @@ public class ApplyLicenseServiceImpl implements ApplyLicenseService {
submitLicenseResponse.setProcessRecords(listByShopIdAndType);
}
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(shopId);
SystemBuildingShopDO systemBuildingShopDO = systemBuildingShopMapper.selectByShopId(shopId);
if (Objects.nonNull(systemBuildingShopDO) && Objects.nonNull(systemBuildingShopDO.getSupervisorId())){
EnterpriseUserDO userInfoByJobnumber = enterpriseUserMapper.getUserInfoByJobnumber(systemBuildingShopDO.getSupervisorId());
if (Objects.nonNull(userInfoByJobnumber)){
submitLicenseResponse.setApprover(userInfoByJobnumber.getName());
}
}else {
EnterpriseUserDO enterpriseUserDO = userAuthMappingService.hierarchicalSearch(UserRoleEnum.SUPERVISION, shopInfoDO.getRegionId());
if (Objects.nonNull(enterpriseUserDO)){
submitLicenseResponse.setApprover(enterpriseUserDO.getName());
}
if (shopInfoDO!=null&&shopInfoDO.getSupervisorUserId()!=null){
EnterpriseUserDO user = enterpriseUserMapper.getUserInfoById(shopInfoDO.getSupervisorUserId());
submitLicenseResponse.setApprover(user.getName());
}
//3.既没有提交数据,也没有在鲜丰端查到证照信息,则返回空自由填写
return submitLicenseResponse;
}

View File

@@ -190,6 +190,28 @@ 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);
}
if ( !WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_70.getCode().equals(lineInfo.getWorkflowSubStageStatus())) {
throw new ServiceException(ErrorCodeEnum.LINE_STATUS_NOT_ALLOW_OPERATE);
}
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);
@@ -201,6 +223,10 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
@Override
public InitiatingRequest getOaDetail(String mobile, String idCardNo) {
SigningBaseInfoDO signingBaseInfoDO = intentAgreementMapper.selectByMobile(mobile, idCardNo);
if (signingBaseInfoDO==null){
return null;
}
String redisKey = "OA:" + mobile + idCardNo;
String responseString = redisUtilPool.getString(redisKey);
if (StringUtils.isNotBlank(responseString)) {

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;
@@ -75,6 +76,24 @@ public class LinePayServiceImpl implements LinePayService {
return result;
}
@Override
public Boolean skipPay(Long lineId, LoginUserInfo user) {
log.info("skipPay lineId:{},操作人:{}",lineId,user.getName());
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(lineId);
if (lineInfo == null) {
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
}
if ( !WorkflowSubStageStatusEnum.PAY_DEPOSIT_45.getCode().equals(lineInfo.getWorkflowSubStageStatus())) {
throw new ServiceException(ErrorCodeEnum.LINE_STATUS_NOT_ALLOW_OPERATE);
}
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;
}
@Override
@Transactional(rollbackFor = Exception.class)
public Long submitPayInfo(LinePaySubmitRequest request, PartnerUserInfoVO partnerUser) {

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

@@ -153,4 +153,14 @@ public class LineInfoController {
return ResponseResult.success(lineService.changeJoinMode(changeInvestmentRequest));
}
@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()));
}
}