diff --git a/coolstore-partner-common/src/main/java/com/cool/store/enums/JoinTypeEnum.java b/coolstore-partner-common/src/main/java/com/cool/store/enums/JoinTypeEnum.java
new file mode 100644
index 000000000..afdf4e9b7
--- /dev/null
+++ b/coolstore-partner-common/src/main/java/com/cool/store/enums/JoinTypeEnum.java
@@ -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;
+ }
+}
diff --git a/coolstore-partner-dao/src/main/java/com/cool/store/mapper/TrainingExperienceMapper.java b/coolstore-partner-dao/src/main/java/com/cool/store/mapper/TrainingExperienceMapper.java
index 77ad4c206..d687794de 100644
--- a/coolstore-partner-dao/src/main/java/com/cool/store/mapper/TrainingExperienceMapper.java
+++ b/coolstore-partner-dao/src/main/java/com/cool/store/mapper/TrainingExperienceMapper.java
@@ -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);
}
diff --git a/coolstore-partner-dao/src/main/resources/mapper/TrainingExperienceMapper.xml b/coolstore-partner-dao/src/main/resources/mapper/TrainingExperienceMapper.xml
index cf14ebb24..5c35fed7e 100644
--- a/coolstore-partner-dao/src/main/resources/mapper/TrainingExperienceMapper.xml
+++ b/coolstore-partner-dao/src/main/resources/mapper/TrainingExperienceMapper.xml
@@ -42,14 +42,14 @@
abandon_cause,
- #{request.partnerId},
- #{request.lineId},
- #{request.storeName},
- #{request.storeId},
- #{request.experienceStartTime},
- #{request.experienceEndTime},
- #{request.experienceStatus},
- #{request.abandonCause},
+ #{entity.partnerId},
+ #{entity.lineId},
+ #{entity.storeName},
+ #{entity.storeId},
+ #{entity.experienceStartTime},
+ #{entity.experienceEndTime},
+ #{entity.experienceStatus},
+ #{entity.abandonCause},
@@ -60,6 +60,12 @@
abandon_cause=#{abandonCause}
where line_id = #{lineId}
+
\ No newline at end of file
diff --git a/coolstore-partner-model/src/main/java/com/cool/store/entity/LeaseBaseInfoDO.java b/coolstore-partner-model/src/main/java/com/cool/store/entity/LeaseBaseInfoDO.java
index 212b07ccd..7887400fa 100644
--- a/coolstore-partner-model/src/main/java/com/cool/store/entity/LeaseBaseInfoDO.java
+++ b/coolstore-partner-model/src/main/java/com/cool/store/entity/LeaseBaseInfoDO.java
@@ -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;
diff --git a/coolstore-partner-model/src/main/java/com/cool/store/response/SigningBaseInfoResponse.java b/coolstore-partner-model/src/main/java/com/cool/store/response/SigningBaseInfoResponse.java
index c7f6d4300..221cc223d 100644
--- a/coolstore-partner-model/src/main/java/com/cool/store/response/SigningBaseInfoResponse.java
+++ b/coolstore-partner-model/src/main/java/com/cool/store/response/SigningBaseInfoResponse.java
@@ -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) {
diff --git a/coolstore-partner-model/src/main/java/com/cool/store/vo/PartnerBaseInfoVO.java b/coolstore-partner-model/src/main/java/com/cool/store/vo/PartnerBaseInfoVO.java
index 794537771..a3164e70e 100644
--- a/coolstore-partner-model/src/main/java/com/cool/store/vo/PartnerBaseInfoVO.java
+++ b/coolstore-partner-model/src/main/java/com/cool/store/vo/PartnerBaseInfoVO.java
@@ -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("常驻区域详细地址(居住地址)")
diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/TrainingExperienceService.java b/coolstore-partner-service/src/main/java/com/cool/store/service/TrainingExperienceService.java
index 574e3d9dd..886287d38 100644
--- a/coolstore-partner-service/src/main/java/com/cool/store/service/TrainingExperienceService.java
+++ b/coolstore-partner-service/src/main/java/com/cool/store/service/TrainingExperienceService.java
@@ -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);
}
diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/IntentAgreementServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/IntentAgreementServiceImpl.java
index b5a0cb5e5..98e2b6f47 100644
--- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/IntentAgreementServiceImpl.java
+++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/IntentAgreementServiceImpl.java
@@ -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;
}
}
diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/JoinIntentionServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/JoinIntentionServiceImpl.java
index 8d047619b..f7852c67d 100644
--- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/JoinIntentionServiceImpl.java
+++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/JoinIntentionServiceImpl.java
@@ -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;
}
}
diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/TrainingExperienceServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/TrainingExperienceServiceImpl.java
index 579b87de4..cf62fe7b1 100644
--- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/TrainingExperienceServiceImpl.java
+++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/TrainingExperienceServiceImpl.java
@@ -56,4 +56,10 @@ public class TrainingExperienceServiceImpl implements TrainingExperienceService
}
}
+
+ @Override
+ public LeaseBaseInfoDO getTrainingExperience(Long lineId) {
+ LeaseBaseInfoDO leaseBaseInfoDO = trainingExperienceMapper.selectByLineId(lineId);
+ return leaseBaseInfoDO;
+ }
}
diff --git a/coolstore-partner-web/src/main/java/com/cool/store/config/SignValidateFilter.java b/coolstore-partner-web/src/main/java/com/cool/store/config/SignValidateFilter.java
index e9cb840c8..d7020d568 100644
--- a/coolstore-partner-web/src/main/java/com/cool/store/config/SignValidateFilter.java
+++ b/coolstore-partner-web/src/main/java/com/cool/store/config/SignValidateFilter.java
@@ -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/**"
);
diff --git a/coolstore-partner-web/src/main/java/com/cool/store/controller/webb/PCIntentAgreementController.java b/coolstore-partner-web/src/main/java/com/cool/store/controller/webb/PCIntentAgreementController.java
new file mode 100644
index 000000000..02979f2db
--- /dev/null
+++ b/coolstore-partner-web/src/main/java/com/cool/store/controller/webb/PCIntentAgreementController.java
@@ -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 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);
+ }
+}
diff --git a/coolstore-partner-web/src/main/java/com/cool/store/controller/webb/PCJoinIntentionController.java b/coolstore-partner-web/src/main/java/com/cool/store/controller/webb/PCJoinIntentionController.java
new file mode 100644
index 000000000..3c42b92e5
--- /dev/null
+++ b/coolstore-partner-web/src/main/java/com/cool/store/controller/webb/PCJoinIntentionController.java
@@ -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 getByLineId(@RequestParam("lineId") Long lineId) {
+ return ResponseResult.success(joinIntentionService.getByLineId(lineId));
+ }
+
+}
diff --git a/coolstore-partner-web/src/main/java/com/cool/store/controller/webb/PCTrainingExperienceController.java b/coolstore-partner-web/src/main/java/com/cool/store/controller/webb/PCTrainingExperienceController.java
index dacaaf3cd..bb261653b 100644
--- a/coolstore-partner-web/src/main/java/com/cool/store/controller/webb/PCTrainingExperienceController.java
+++ b/coolstore-partner-web/src/main/java/com/cool/store/controller/webb/PCTrainingExperienceController.java
@@ -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 getTrainingExperience(@RequestParam("lineId") Long lineId) {
+ return ResponseResult.success(trainingExperienceService.getTrainingExperience(lineId));
+ }
+
}
diff --git a/coolstore-partner-web/src/main/java/com/cool/store/controller/webc/LineController.java b/coolstore-partner-web/src/main/java/com/cool/store/controller/webc/LineController.java
index 28e59af9e..47e1f702b 100644
--- a/coolstore-partner-web/src/main/java/com/cool/store/controller/webc/LineController.java
+++ b/coolstore-partner-web/src/main/java/com/cool/store/controller/webc/LineController.java
@@ -42,6 +42,12 @@ public class LineController {
return ResponseResult.success(lineService.getLineInfo(lineId));
}
+ @ApiOperation("根据线索id查询大区的支付二维码图片")
+ @GetMapping("/getRegionPayPic")
+ public ResponseResult getRegionPayPic(@RequestParam("lineId")Long lineId) {
+ String pic = "https://coolstore-storage.oss-cn-hangzhou.aliyuncs.com/120207001943.png";
+ return ResponseResult.success(pic);
+ }
diff --git a/coolstore-partner-web/src/main/java/com/cool/store/controller/webc/MiniIntentAgreementController.java b/coolstore-partner-web/src/main/java/com/cool/store/controller/webc/MiniIntentAgreementController.java
index 651dc505b..533731ffd 100644
--- a/coolstore-partner-web/src/main/java/com/cool/store/controller/webc/MiniIntentAgreementController.java
+++ b/coolstore-partner-web/src/main/java/com/cool/store/controller/webc/MiniIntentAgreementController.java
@@ -28,7 +28,7 @@ public class MiniIntentAgreementController {
return ResponseResult.success(resp);
}
- @PostMapping(path = "/get")
+ @GetMapping(path = "/get")
@ApiOperation("查询意向协议信息")
public ResponseResult getMiniIntentAgreement(
@RequestParam(value = "partnerId",required = false) String partnerId,