Merge remote-tracking branch 'origin/dev/feat/partner1.6_20231226' into dev/feat/partner1.6_20231226
This commit is contained in:
@@ -12,7 +12,7 @@ public enum SignUpStatusEnum {
|
|||||||
Sign_UP_FAIL_1("会销结束","你报名的展会已结束 请确认!"),
|
Sign_UP_FAIL_1("会销结束","你报名的展会已结束 请确认!"),
|
||||||
Sign_UP_FAIL_2("不符合报名条件","该线索已录入系统但不符合报名要求,当前处于【{0}:{1}】状态,建议客户经理以当前状态正常推进,勿占用展会名额。"),
|
Sign_UP_FAIL_2("不符合报名条件","该线索已录入系统但不符合报名要求,当前处于【{0}:{1}】状态,建议客户经理以当前状态正常推进,勿占用展会名额。"),
|
||||||
Sign_UP_FAIL_3("报名同一个会销组内会销","线索已报名本批次会销组中的“{0}”场次,切勿重复录入"),
|
Sign_UP_FAIL_3("报名同一个会销组内会销","线索已报名本批次会销组中的“{0}”场次,切勿重复录入"),
|
||||||
Sign_UP_FAIL_4("不符合报名条件—黑名单","该线索已录入系统但不符合报名要求,当前处于【{0}】状态,建议客户经理以当前状态正常推进,勿占用展会名额。");
|
Sign_UP_FAIL_4("不符合报名条件—黑名单","该线索已录入系统但不符合报名要求,当前处于【黑名单】状态,建议客户经理以当前状态正常推进,勿占用展会名额。");
|
||||||
|
|
||||||
private String signUpTitle;
|
private String signUpTitle;
|
||||||
private String signUpFailMsg;
|
private String signUpFailMsg;
|
||||||
|
|||||||
@@ -1027,6 +1027,7 @@
|
|||||||
|
|
||||||
<select id="lineInterviewList" resultType="com.cool.store.dto.partner.LineInterviewDTO">
|
<select id="lineInterviewList" resultType="com.cool.store.dto.partner.LineInterviewDTO">
|
||||||
select
|
select
|
||||||
|
a.id as id ,
|
||||||
a.partner_line_id as lineId,
|
a.partner_line_id as lineId,
|
||||||
a.interviewer as interviewer,
|
a.interviewer as interviewer,
|
||||||
b.mobile as interviewerMobile,
|
b.mobile as interviewerMobile,
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ import lombok.Data;
|
|||||||
@Data
|
@Data
|
||||||
public class LineInterviewDTO {
|
public class LineInterviewDTO {
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
private Long lineId;
|
private Long lineId;
|
||||||
|
|
||||||
private String investmentManager;
|
private String investmentManager;
|
||||||
|
|||||||
@@ -48,4 +48,6 @@ public class ExhibitionLineVO {
|
|||||||
|
|
||||||
private String interviewerMobile;
|
private String interviewerMobile;
|
||||||
|
|
||||||
|
private Integer interviewPlanId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ public class SignUpExhibitionVO {
|
|||||||
|
|
||||||
private String signUpFailMsg;
|
private String signUpFailMsg;
|
||||||
|
|
||||||
|
public SignUpExhibitionVO(){}
|
||||||
public SignUpExhibitionVO(Boolean signUpStatus, Integer signUpFailCode,String signUpFailMsg) {
|
public SignUpExhibitionVO(Boolean signUpStatus, Integer signUpFailCode,String signUpFailMsg) {
|
||||||
this.signUpStatus = signUpStatus;
|
this.signUpStatus = signUpStatus;
|
||||||
this.signUpFailCode = signUpFailCode;
|
this.signUpFailCode = signUpFailCode;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.cool.store.vo.partner;
|
package com.cool.store.vo.partner;
|
||||||
|
|
||||||
|
import com.cool.store.vo.exhibition.SignUpExhibitionVO;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -9,7 +10,7 @@ import lombok.Data;
|
|||||||
* @Version 1.0
|
* @Version 1.0
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class PartnerUserBaseVO {
|
public class PartnerUserBaseVO extends SignUpExhibitionVO {
|
||||||
|
|
||||||
@ApiModelProperty("手机号")
|
@ApiModelProperty("手机号")
|
||||||
private String mobile;
|
private String mobile;
|
||||||
|
|||||||
@@ -19,5 +19,5 @@ public interface PartnerUserInfoService {
|
|||||||
|
|
||||||
ApplyBaseInfoVO updatePartnerUserInfo(PartnerUserInfoRequest partnerUserInfoRequest) throws ApiException;
|
ApplyBaseInfoVO updatePartnerUserInfo(PartnerUserInfoRequest partnerUserInfoRequest) throws ApiException;
|
||||||
|
|
||||||
PartnerUserBaseVO getPartnerInfo(String mobile);
|
PartnerUserBaseVO getPartnerInfo(String mobile,Integer exhibitionId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,15 +4,11 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import com.cool.store.constants.CommonConstants;
|
import com.cool.store.constants.CommonConstants;
|
||||||
import com.cool.store.constants.RedisConstant;
|
import com.cool.store.constants.RedisConstant;
|
||||||
import com.cool.store.context.PartnerUserHolder;
|
import com.cool.store.context.PartnerUserHolder;
|
||||||
import com.cool.store.dao.HyOpenAreaInfoDAO;
|
import com.cool.store.dao.*;
|
||||||
import com.cool.store.dao.HyPartnerUserInfoDAO;
|
|
||||||
import com.cool.store.dto.log.UserInfoUpdateDTO;
|
import com.cool.store.dto.log.UserInfoUpdateDTO;
|
||||||
import com.cool.store.dto.partner.MobileCheckDTO;
|
import com.cool.store.dto.partner.MobileCheckDTO;
|
||||||
import com.cool.store.entity.HyOpenAreaInfoDO;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.entity.HyPartnerLineInfoDO;
|
import com.cool.store.enums.*;
|
||||||
import com.cool.store.entity.HyPartnerUserInfoDO;
|
|
||||||
import com.cool.store.enums.ErrorCodeEnum;
|
|
||||||
import com.cool.store.enums.OperateTypeEnum;
|
|
||||||
import com.cool.store.exception.ApiException;
|
import com.cool.store.exception.ApiException;
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
import com.cool.store.request.PartnerIntentInfoRequest;
|
import com.cool.store.request.PartnerIntentInfoRequest;
|
||||||
@@ -23,6 +19,7 @@ import com.cool.store.utils.RedisUtilPool;
|
|||||||
import com.cool.store.vo.ApplyBaseInfoVO;
|
import com.cool.store.vo.ApplyBaseInfoVO;
|
||||||
import com.cool.store.vo.InviteCodeDetailVO;
|
import com.cool.store.vo.InviteCodeDetailVO;
|
||||||
import com.cool.store.vo.PartnerUserInfoVO;
|
import com.cool.store.vo.PartnerUserInfoVO;
|
||||||
|
import com.cool.store.vo.exhibition.SignUpExhibitionVO;
|
||||||
import com.cool.store.vo.partner.PartnerUserBaseVO;
|
import com.cool.store.vo.partner.PartnerUserBaseVO;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
@@ -32,9 +29,8 @@ import org.springframework.stereotype.Service;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
import java.util.Date;
|
import java.util.*;
|
||||||
import java.util.List;
|
import java.util.stream.Collectors;
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@@ -153,14 +149,61 @@ public class PartnerUserInfoServiceImpl implements PartnerUserInfoService {
|
|||||||
logService.recordPartnerBizLog(operator,hyPartnerLineInfoDO.getId(), OperateTypeEnum.USERINFO_UPDATE,log);
|
logService.recordPartnerBizLog(operator,hyPartnerLineInfoDO.getId(), OperateTypeEnum.USERINFO_UPDATE,log);
|
||||||
return applyBaseInfoVO;
|
return applyBaseInfoVO;
|
||||||
}
|
}
|
||||||
|
@Resource
|
||||||
|
HyPartnerLineInfoDAO hyPartnerLineInfoDAO;
|
||||||
|
@Resource
|
||||||
|
HyExhibitionDAO hyExhibitionDAO;
|
||||||
|
@Resource
|
||||||
|
HyExhibitionGroupDAO hyExhibitionGroupDAO;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PartnerUserBaseVO getPartnerInfo(String mobile) {
|
public PartnerUserBaseVO getPartnerInfo(String mobile,Integer exhibitionId) {
|
||||||
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByMobile(mobile);
|
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByMobile(mobile);
|
||||||
if (hyPartnerUserInfoDO == null){
|
HyPartnerLineInfoDO hyPartnerLineInfoDO = null;
|
||||||
|
if (hyPartnerUserInfoDO != null){
|
||||||
|
hyPartnerLineInfoDO = hyPartnerLineInfoDAO.getByPartnerId(hyPartnerUserInfoDO.getPartnerId());
|
||||||
|
}
|
||||||
|
if (hyPartnerUserInfoDO == null||hyPartnerLineInfoDO== null){
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return new PartnerUserBaseVO(hyPartnerUserInfoDO.getMobile(),hyPartnerUserInfoDO.getUsername(),hyPartnerUserInfoDO.getWantShopArea());
|
HyExhibitionDO hyExhibitionDO = hyExhibitionDAO.selectByPrimaryKey(exhibitionId);
|
||||||
|
PartnerUserBaseVO partnerUserBaseVO = new PartnerUserBaseVO(hyPartnerUserInfoDO.getMobile(), hyPartnerUserInfoDO.getUsername(), hyPartnerUserInfoDO.getWantShopArea());
|
||||||
|
|
||||||
|
//黑名单
|
||||||
|
if (LineStatusEnum.BLACKLIST.getCode().equals(hyPartnerLineInfoDO.getLineStatus())){
|
||||||
|
partnerUserBaseVO.setSignUpStatus(Boolean.FALSE);
|
||||||
|
partnerUserBaseVO.setSignUpFailCode(CommonConstants.TWO);
|
||||||
|
partnerUserBaseVO.setSignUpFailMsg(SignUpStatusEnum.getSignUpFailMsg(SignUpStatusEnum.Sign_UP_FAIL_4));
|
||||||
|
return partnerUserBaseVO;
|
||||||
|
}
|
||||||
|
//私海
|
||||||
|
//能报名的列表
|
||||||
|
Map<String,List<String>> map = WorkflowStageEnum.getExhibitionSignUpMap();
|
||||||
|
if (LineStatusEnum.PRIVATE_SEAS.getCode().equals(hyPartnerLineInfoDO.getLineStatus())){
|
||||||
|
List<String> list = map.get(hyPartnerLineInfoDO.getWorkflowStage());
|
||||||
|
if (!list.contains(hyPartnerLineInfoDO.getWorkflowStatus())){
|
||||||
|
HashMap<String, List<WorkflowStatusEnum>> workflowStatusMap = WorkflowStageEnum.getWorkflowStatusMap();
|
||||||
|
List<WorkflowStatusEnum> workflowStatusEnums = workflowStatusMap.get(hyPartnerLineInfoDO.getWorkflowStage());
|
||||||
|
Map<String, String> statusMap = workflowStatusEnums.stream().collect(Collectors.toMap(WorkflowStatusEnum::getCode, WorkflowStatusEnum::getMessage, (a, b) -> b));
|
||||||
|
partnerUserBaseVO.setSignUpStatus(Boolean.FALSE);
|
||||||
|
partnerUserBaseVO.setSignUpFailCode(CommonConstants.TWO);
|
||||||
|
partnerUserBaseVO.setSignUpFailMsg(SignUpStatusEnum.getSignUpFailMsg(SignUpStatusEnum.Sign_UP_FAIL_2,WorkflowStageEnum.getWorkflowStageByCode(hyPartnerLineInfoDO.getWorkflowStage()).getMessage(),statusMap.get(hyPartnerLineInfoDO.getWorkflowStatus())));
|
||||||
|
return partnerUserBaseVO;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//是否重复报名(已结束的展会不算)
|
||||||
|
Integer exhibitionGroupId = hyExhibitionDO.getExhibitionGroupId();
|
||||||
|
Integer count = hyExhibitionDAO.lineSignUpCount(exhibitionGroupId, hyPartnerLineInfoDO.getId());
|
||||||
|
if (count > 0){
|
||||||
|
HyExhibitionGroupDO hyExhibitionGroupDO = hyExhibitionGroupDAO.selectByPrimaryKey(exhibitionGroupId);
|
||||||
|
partnerUserBaseVO.setSignUpStatus(Boolean.FALSE);
|
||||||
|
partnerUserBaseVO.setSignUpFailCode(CommonConstants.THREE);
|
||||||
|
partnerUserBaseVO.setSignUpFailMsg(SignUpStatusEnum.getSignUpFailMsg(SignUpStatusEnum.Sign_UP_FAIL_3,hyExhibitionGroupDO.getExhibitionGroupName()));
|
||||||
|
return partnerUserBaseVO;
|
||||||
|
}
|
||||||
|
partnerUserBaseVO.setSignUpStatus(Boolean.TRUE);
|
||||||
|
partnerUserBaseVO.setSignUpFailCode(CommonConstants.ZERO);
|
||||||
|
return partnerUserBaseVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void fillUserInfoDOByRequest(HyPartnerUserInfoDO hyPartnerUserInfoDO, PartnerUserInfoRequest partnerUserInfoRequest) {
|
private void fillUserInfoDOByRequest(HyPartnerUserInfoDO hyPartnerUserInfoDO, PartnerUserInfoRequest partnerUserInfoRequest) {
|
||||||
|
|||||||
@@ -483,6 +483,7 @@ public class ExhibitionServiceImpl implements ExhibitionService {
|
|||||||
exhibitionLineVO.setInvestmentManagerName(investment.getInvestmentManagerName());
|
exhibitionLineVO.setInvestmentManagerName(investment.getInvestmentManagerName());
|
||||||
exhibitionLineVO.setInvestmentManagerMobile(investment.getInvestmentManagerMobile());
|
exhibitionLineVO.setInvestmentManagerMobile(investment.getInvestmentManagerMobile());
|
||||||
exhibitionLineVO.setInterviewer(inter.getInterviewer());
|
exhibitionLineVO.setInterviewer(inter.getInterviewer());
|
||||||
|
exhibitionLineVO.setInterviewPlanId(inter.getId());
|
||||||
exhibitionLineVO.setInterviewerName(inter.getInterviewerName());
|
exhibitionLineVO.setInterviewerName(inter.getInterviewerName());
|
||||||
exhibitionLineVO.setInterviewerMobile(inter.getInterviewerMobile());
|
exhibitionLineVO.setInterviewerMobile(inter.getInterviewerMobile());
|
||||||
result.add(exhibitionLineVO);
|
result.add(exhibitionLineVO);
|
||||||
@@ -521,16 +522,19 @@ public class ExhibitionServiceImpl implements ExhibitionService {
|
|||||||
//是否存在线索
|
//是否存在线索
|
||||||
//查询线索信息
|
//查询线索信息
|
||||||
MobileCheckDTO mobileCheckDTO = hyPartnerUserInfoDAO.selectByCheckMobile(signUpExhibitionDTO.getMobile());
|
MobileCheckDTO mobileCheckDTO = hyPartnerUserInfoDAO.selectByCheckMobile(signUpExhibitionDTO.getMobile());
|
||||||
|
if(mobileCheckDTO==null){
|
||||||
|
mobileCheckDTO = new MobileCheckDTO();
|
||||||
|
}
|
||||||
//线索不存在
|
//线索不存在
|
||||||
Boolean sendNotice = Boolean.TRUE;
|
Boolean sendNotice = Boolean.TRUE;
|
||||||
String investManager = mobileCheckDTO.getInvestmentManager();
|
String investManager = mobileCheckDTO.getInvestmentManager();
|
||||||
String partnerId = mobileCheckDTO.getPartnerId();
|
String partnerId = mobileCheckDTO.getPartnerId();
|
||||||
Long lineId = mobileCheckDTO.getLineId();
|
Long lineId = mobileCheckDTO.getLineId();
|
||||||
if (mobileCheckDTO == null||mobileCheckDTO.getLineStatus() == null){
|
if (mobileCheckDTO.getMobile() == null||mobileCheckDTO.getLineStatus() == null){
|
||||||
//走这里不需要发送通知
|
//走这里不需要发送通知
|
||||||
sendNotice = Boolean.FALSE;
|
sendNotice = Boolean.FALSE;
|
||||||
//mobileCheckDTO为空 表示从没有授权过 mobileCheckDTO不为空 但是线索状态为空 表示授权过 但是没有线索
|
//mobileCheckDTO为空 表示从没有授权过 mobileCheckDTO不为空 但是线索状态为空 表示授权过 但是没有线索
|
||||||
if (mobileCheckDTO==null){
|
if (mobileCheckDTO.getMobile()==null){
|
||||||
partnerId = UUIDUtils.get32UUID();
|
partnerId = UUIDUtils.get32UUID();
|
||||||
HyPartnerUserInfoDO resultUser = new HyPartnerUserInfoDO();
|
HyPartnerUserInfoDO resultUser = new HyPartnerUserInfoDO();
|
||||||
resultUser.setUsername(signUpExhibitionDTO.getPartnerName()).setMobile(signUpExhibitionDTO.getMobile()).setPartnerId(partnerId).setCreateTime(new Date())
|
resultUser.setUsername(signUpExhibitionDTO.getPartnerName()).setMobile(signUpExhibitionDTO.getMobile()).setPartnerId(partnerId).setCreateTime(new Date())
|
||||||
|
|||||||
@@ -346,7 +346,8 @@ public class DeskController {
|
|||||||
|
|
||||||
@GetMapping(path = "/getPartnerInfo")
|
@GetMapping(path = "/getPartnerInfo")
|
||||||
@ApiOperation("线索基本信息")
|
@ApiOperation("线索基本信息")
|
||||||
public ResponseResult<PartnerUserBaseVO> getPartnerInfo(@RequestParam(value = "mobile")String mobile){
|
public ResponseResult<PartnerUserBaseVO> getPartnerInfo(@RequestParam(value = "mobile")String mobile,
|
||||||
return ResponseResult.success(partnerUserInfoService.getPartnerInfo(mobile));
|
@RequestParam(value = "exhibitionId")Integer exhibitionId){
|
||||||
|
return ResponseResult.success(partnerUserInfoService.getPartnerInfo(mobile,exhibitionId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -257,8 +257,9 @@ public class PartnerController {
|
|||||||
|
|
||||||
@GetMapping(path = "/getPartnerInfo")
|
@GetMapping(path = "/getPartnerInfo")
|
||||||
@ApiOperation("线索基本信息")
|
@ApiOperation("线索基本信息")
|
||||||
public ResponseResult<PartnerUserBaseVO> getPartnerInfo(@RequestParam(value = "mobile")String mobile){
|
public ResponseResult<PartnerUserBaseVO> getPartnerInfo(@RequestParam(value = "mobile")String mobile,
|
||||||
return ResponseResult.success(partnerUserInfoService.getPartnerInfo(mobile));
|
@RequestParam(value = "exhibitionId")Integer exhibitionId){
|
||||||
|
return ResponseResult.success(partnerUserInfoService.getPartnerInfo(mobile,exhibitionId));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user