Merge remote-tracking branch 'xfsg/cc_partner_init' into cc_partner_init
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
package com.cool.store.enums;
|
||||
|
||||
public enum JoinTypeEnum {
|
||||
JOIN_TYPE_ONE(1,"个人加盟"),
|
||||
JOIN_TYPE_TWO(2,"企业加盟"),
|
||||
|
||||
;
|
||||
|
||||
private Integer code;
|
||||
|
||||
private String typeName;
|
||||
|
||||
JoinTypeEnum(Integer code, String typeName) {
|
||||
this.code = code;
|
||||
this.typeName = typeName;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(Integer code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getTypeName() {
|
||||
return typeName;
|
||||
}
|
||||
|
||||
public void setTypeName(String typeName) {
|
||||
this.typeName = typeName;
|
||||
}
|
||||
}
|
||||
@@ -14,4 +14,6 @@ public interface TrainingExperienceMapper {
|
||||
void updateStatus(@Param("lineId") Long lineId,
|
||||
@Param("status") Integer status,
|
||||
@Param("abandonCause") String abandonCause);
|
||||
|
||||
LeaseBaseInfoDO selectByLineId(@Param("lineId") Long lineId);
|
||||
}
|
||||
|
||||
@@ -42,14 +42,14 @@
|
||||
<if test="entity.abandonCause != null">abandon_cause,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="entity.partnerId != null">#{request.partnerId},</if>
|
||||
<if test="entity.lineId != null">#{request.lineId},</if>
|
||||
<if test="entity.storeName != null">#{request.storeName},</if>
|
||||
<if test="entity.storeId != null">#{request.storeId},</if>
|
||||
<if test="entity.experienceStartTime != null">#{request.experienceStartTime},</if>
|
||||
<if test="entity.experienceEndTime != null">#{request.experienceEndTime},</if>
|
||||
<if test="entity.experienceStatus != null">#{request.experienceStatus},</if>
|
||||
<if test="entity.abandonCause != null">#{request.abandonCause},</if>
|
||||
<if test="entity.partnerId != null">#{entity.partnerId},</if>
|
||||
<if test="entity.lineId != null">#{entity.lineId},</if>
|
||||
<if test="entity.storeName != null">#{entity.storeName},</if>
|
||||
<if test="entity.storeId != null">#{entity.storeId},</if>
|
||||
<if test="entity.experienceStartTime != null">#{entity.experienceStartTime},</if>
|
||||
<if test="entity.experienceEndTime != null">#{entity.experienceEndTime},</if>
|
||||
<if test="entity.experienceStatus != null">#{entity.experienceStatus},</if>
|
||||
<if test="entity.abandonCause != null">#{entity.abandonCause},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateStatus">
|
||||
@@ -60,6 +60,12 @@
|
||||
abandon_cause=#{abandonCause}
|
||||
where line_id = #{lineId}
|
||||
</update>
|
||||
<select id="selectByLineId" resultType="com.cool.store.entity.LeaseBaseInfoDO">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from xfsg_lease_base_info
|
||||
where line_id = #{lineId}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -19,9 +20,9 @@ public class LeaseBaseInfoDO {
|
||||
private Date experienceStartTime;
|
||||
|
||||
private Date experienceEndTime;
|
||||
|
||||
@ApiModelProperty("体验状态 0完成 1放弃")
|
||||
private Integer experienceStatus;
|
||||
|
||||
@ApiModelProperty("放弃原因")
|
||||
private String abandonCause;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.cool.store.response;
|
||||
|
||||
import com.cool.store.entity.SigningBaseInfoDO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.models.auth.In;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -43,6 +44,9 @@ public class SigningBaseInfoResponse {
|
||||
@ApiModelProperty("更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
@ApiModelProperty("加盟身份 1个人加盟 2企业加盟")
|
||||
private Integer type;
|
||||
|
||||
|
||||
public static SigningBaseInfoResponse from(SigningBaseInfoDO signingBaseInfoDO) {
|
||||
if (signingBaseInfoDO == null) {
|
||||
|
||||
@@ -25,6 +25,8 @@ public class PartnerBaseInfoVO {
|
||||
private String mobile;
|
||||
@ApiModelProperty("1男 2女")
|
||||
private Integer sex;
|
||||
@ApiModelProperty("意向加盟区域")
|
||||
private String area;
|
||||
@ApiModelProperty("意向区域编码")
|
||||
private String areaCode;
|
||||
@ApiModelProperty("常驻区域详细地址(居住地址)")
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.entity.LeaseBaseInfoDO;
|
||||
import com.cool.store.request.TrainingExperienceDistributionRequest;
|
||||
|
||||
public interface TrainingExperienceService {
|
||||
@@ -18,4 +19,5 @@ public interface TrainingExperienceService {
|
||||
*/
|
||||
void experienceStatusChange(Long lineId, Integer status, String abandonCause);
|
||||
|
||||
LeaseBaseInfoDO getTrainingExperience(Long lineId);
|
||||
}
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.cool.store.entity.LineInfoDO;
|
||||
import com.cool.store.entity.MemberQuestionDO;
|
||||
import com.cool.store.entity.SigningBaseInfoDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.JoinTypeEnum;
|
||||
import com.cool.store.enums.WorkflowSubStageStatusEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.IntentAgreementMapper;
|
||||
import com.cool.store.mapper.JoinIntentionMapper;
|
||||
import com.cool.store.mapper.LineInfoMapper;
|
||||
import com.cool.store.request.IntentAgreementSubmitRequest;
|
||||
import com.cool.store.response.SigningBaseInfoResponse;
|
||||
@@ -32,6 +35,9 @@ public class IntentAgreementServiceImpl implements IntentAgreementService {
|
||||
@Resource
|
||||
LineInfoMapper lineInfoMapper;
|
||||
|
||||
@Resource
|
||||
JoinIntentionMapper joinIntentionMapper;
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@@ -62,6 +68,8 @@ public class IntentAgreementServiceImpl implements IntentAgreementService {
|
||||
return null;
|
||||
}
|
||||
SigningBaseInfoResponse response = SigningBaseInfoResponse.from(signingBaseInfoDO);
|
||||
MemberQuestionDO byLineId = joinIntentionMapper.getByLineId(lineId);
|
||||
response.setType(byLineId.getJoinType());
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,21 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.cool.store.dao.HyOpenAreaInfoDAO;
|
||||
import com.cool.store.entity.HyOpenAreaInfoDO;
|
||||
import com.cool.store.entity.LineInfoDO;
|
||||
import com.cool.store.entity.MemberQuestionDO;
|
||||
import com.cool.store.entity.PartnerBaseInfoDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.WorkflowStageEnum;
|
||||
import com.cool.store.enums.WorkflowSubStageEnum;
|
||||
import com.cool.store.enums.WorkflowSubStageStatusEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.HyOpenAreaInfoMapper;
|
||||
import com.cool.store.mapper.JoinIntentionMapper;
|
||||
import com.cool.store.mapper.LineInfoMapper;
|
||||
import com.cool.store.request.JoinIntentionRequest;
|
||||
import com.cool.store.service.JoinIntentionService;
|
||||
import com.cool.store.service.OpenAreaService;
|
||||
import com.cool.store.vo.PartnerBaseInfoVO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -36,25 +41,32 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
|
||||
@Resource
|
||||
LineInfoMapper lineInfoMapper;
|
||||
|
||||
@Resource
|
||||
HyOpenAreaInfoMapper openAreaInfoMapper;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean submit(JoinIntentionRequest request) {
|
||||
if (Objects.isNull(request)){
|
||||
if (Objects.isNull(request)) {
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||
}
|
||||
MemberQuestionDO memberQuestionDO = request.toMemberQuestionDO();
|
||||
boolean submitStatus = joinIntentionMapper.insertOrUpdate(memberQuestionDO);
|
||||
if (submitStatus){
|
||||
//更改线索流程子状态为【待审核】
|
||||
LineInfoDO lineInfoParam = request.toLineInfoDO();
|
||||
lineInfoParam.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.INTENT_5.getCode());
|
||||
if (Objects.isNull(lineInfoParam)){
|
||||
throw new ServiceException(ErrorCodeEnum.INTERVIEW_PARTNER_NOT_EXIST);
|
||||
}
|
||||
lineInfoMapper.insertOrUpdate(lineInfoParam);
|
||||
return Boolean.TRUE;
|
||||
//更改线索流程子状态为【待审核】
|
||||
LineInfoDO lineInfoParam = request.toLineInfoDO();
|
||||
lineInfoParam.setWorkflowStage(WorkflowStageEnum.INTENT.getCode());
|
||||
lineInfoParam.setWorkflowSubStage(WorkflowSubStageEnum.INTEND.getCode());
|
||||
lineInfoParam.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.INTENT_5.getCode());
|
||||
if (Objects.isNull(lineInfoParam)) {
|
||||
throw new ServiceException(ErrorCodeEnum.INTERVIEW_PARTNER_NOT_EXIST);
|
||||
}
|
||||
return Boolean.FALSE;
|
||||
//todo 目前写死为进入私海
|
||||
lineInfoParam.setLineStatus(1);
|
||||
lineInfoMapper.insertOrUpdate(lineInfoParam);
|
||||
|
||||
MemberQuestionDO memberQuestionDO = request.toMemberQuestionDO();
|
||||
memberQuestionDO.setLineId(lineInfoParam.getId());
|
||||
joinIntentionMapper.insertOrUpdate(memberQuestionDO);
|
||||
return Boolean.TRUE;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -84,10 +96,12 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
|
||||
public PartnerBaseInfoVO getByLineId(Long lineId) {
|
||||
MemberQuestionDO result = joinIntentionMapper.getByLineId(lineId);
|
||||
LineInfoDO byLineId = lineInfoMapper.getByLineId(lineId);
|
||||
if (Objects.isNull(result)){
|
||||
if (Objects.isNull(result)) {
|
||||
throw new ServiceException(LINE_ID_IS_NOT_EXIST);
|
||||
}
|
||||
PartnerBaseInfoVO response = PartnerBaseInfoVO.from(result,byLineId);
|
||||
PartnerBaseInfoVO response = PartnerBaseInfoVO.from(result, byLineId);
|
||||
HyOpenAreaInfoDO openAreaInfoDO = openAreaInfoMapper.selectById(Long.valueOf(response.getAreaCode()));
|
||||
response.setArea(openAreaInfoDO.getAreaPath());
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,4 +56,10 @@ public class TrainingExperienceServiceImpl implements TrainingExperienceService
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public LeaseBaseInfoDO getTrainingExperience(Long lineId) {
|
||||
LeaseBaseInfoDO leaseBaseInfoDO = trainingExperienceMapper.selectByLineId(lineId);
|
||||
return leaseBaseInfoDO;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,8 +56,8 @@ public class SignValidateFilter implements Filter {
|
||||
"/xfsg/mini/program/v1/partnerManage/partner/getIdentityCardInfo",
|
||||
"/**/swagger*/**",
|
||||
"/**/webjars/**",
|
||||
"/xfsg/mini/program/v1/partnerManage/openArea/areaApplyQuery",
|
||||
"/xfsg/mini/**"
|
||||
"/xfsg/mini/program/v1/partnerManage/openArea/areaApplyQuery"
|
||||
// "/xfsg/mini/**"
|
||||
|
||||
);
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.cool.store.controller.webb;
|
||||
|
||||
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.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@RestController
|
||||
@RequestMapping({"/pc/IntentAgreement"})
|
||||
@Slf4j
|
||||
@Api(tags = "PC意向协议")
|
||||
public class PCIntentAgreementController {
|
||||
|
||||
@Resource
|
||||
IntentAgreementService intentAgreementService;
|
||||
|
||||
@GetMapping(path = "/get")
|
||||
@ApiOperation("查询意向协议信息")
|
||||
public ResponseResult<SigningBaseInfoResponse> getMiniIntentAgreement(
|
||||
@RequestParam(value = "partnerId", required = false) String partnerId,
|
||||
@RequestParam(value = "lineId", required = false) Long lineId) {
|
||||
SigningBaseInfoResponse resp = intentAgreementService.getMiniIntentAgreement(partnerId, lineId);
|
||||
return ResponseResult.success(resp);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.cool.store.controller.webb;
|
||||
|
||||
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.JoinIntentionService;
|
||||
import com.cool.store.vo.PartnerBaseInfoVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@RestController
|
||||
@RequestMapping({"/pc/JoinIntention"})
|
||||
@Slf4j
|
||||
@Api(tags = "PC意向加盟")
|
||||
public class PCJoinIntentionController {
|
||||
|
||||
@Resource
|
||||
private JoinIntentionService joinIntentionService;
|
||||
|
||||
@GetMapping(path = "/getByLineId")
|
||||
@ApiOperation("查找加盟意向申请书")
|
||||
public ResponseResult<PartnerBaseInfoVO> getByLineId(@RequestParam("lineId") Long lineId) {
|
||||
return ResponseResult.success(joinIntentionService.getByLineId(lineId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.controller.webb;
|
||||
|
||||
import com.cool.store.entity.LeaseBaseInfoDO;
|
||||
import com.cool.store.enums.ExperienceStatusEnum;
|
||||
import com.cool.store.request.TrainingExperienceDistributionRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
@@ -28,4 +29,10 @@ public class PCTrainingExperienceController {
|
||||
return ResponseResult.success(trainingExperienceService.distribution(request));
|
||||
}
|
||||
|
||||
@ApiOperation("查询实训体验")
|
||||
@GetMapping("/get")
|
||||
public ResponseResult<LeaseBaseInfoDO> getTrainingExperience(@RequestParam("lineId") Long lineId) {
|
||||
return ResponseResult.success(trainingExperienceService.getTrainingExperience(lineId));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -42,6 +42,12 @@ public class LineController {
|
||||
return ResponseResult.success(lineService.getLineInfo(lineId));
|
||||
}
|
||||
|
||||
@ApiOperation("根据线索id查询大区的支付二维码图片")
|
||||
@GetMapping("/getRegionPayPic")
|
||||
public ResponseResult<String> getRegionPayPic(@RequestParam("lineId")Long lineId) {
|
||||
String pic = "https://coolstore-storage.oss-cn-hangzhou.aliyuncs.com/120207001943.png";
|
||||
return ResponseResult.success(pic);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ public class MiniIntentAgreementController {
|
||||
return ResponseResult.success(resp);
|
||||
}
|
||||
|
||||
@PostMapping(path = "/get")
|
||||
@GetMapping(path = "/get")
|
||||
@ApiOperation("查询意向协议信息")
|
||||
public ResponseResult<SigningBaseInfoResponse> getMiniIntentAgreement(
|
||||
@RequestParam(value = "partnerId",required = false) String partnerId,
|
||||
|
||||
Reference in New Issue
Block a user