From 4416f8aef5e2686300c5da59a12aed82f4f82eef Mon Sep 17 00:00:00 2001 From: guohb Date: Tue, 26 Mar 2024 16:40:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E4=BD=93=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../store/enums/ExperienceStatusEnum.java | 33 +++++++++ .../store/mapper/IntentAgreementMapper.java | 3 + .../com/cool/store/mapper/LineInfoMapper.java | 2 + .../mapper/TrainingExperienceMapper.java | 17 +++++ .../mapper/IntentAgreementMapper.xml | 20 +++++- .../resources/mapper/JoinIntentionMapper.xml | 2 +- .../main/resources/mapper/LineInfoMapper.xml | 3 + .../mapper/TrainingExperienceMapper.xml | 65 +++++++++++++++++ .../cool/store/entity/LeaseBaseInfoDO.java | 34 +++++++++ .../store/request/JoinIntentionRequest.java | 3 +- ...TrainingExperienceDistributionRequest.java | 37 ++++++++++ .../response/SigningBaseInfoResponse.java | 71 +++++++++++++++++++ .../store/service/IntentAgreementService.java | 8 +++ .../service/TrainingExperienceService.java | 21 ++++++ .../impl/IntentAgreementServiceImpl.java | 21 ++++++ .../impl/TrainingExperienceServiceImpl.java | 59 +++++++++++++++ .../webb/TrainingExperienceController.java | 42 +++++++++++ .../webc/MiniIntentAgreementController.java | 15 ++-- 18 files changed, 448 insertions(+), 8 deletions(-) create mode 100644 coolstore-partner-common/src/main/java/com/cool/store/enums/ExperienceStatusEnum.java create mode 100644 coolstore-partner-dao/src/main/java/com/cool/store/mapper/TrainingExperienceMapper.java create mode 100644 coolstore-partner-dao/src/main/resources/mapper/TrainingExperienceMapper.xml create mode 100644 coolstore-partner-model/src/main/java/com/cool/store/entity/LeaseBaseInfoDO.java create mode 100644 coolstore-partner-model/src/main/java/com/cool/store/request/TrainingExperienceDistributionRequest.java create mode 100644 coolstore-partner-model/src/main/java/com/cool/store/response/SigningBaseInfoResponse.java create mode 100644 coolstore-partner-service/src/main/java/com/cool/store/service/TrainingExperienceService.java create mode 100644 coolstore-partner-service/src/main/java/com/cool/store/service/impl/TrainingExperienceServiceImpl.java create mode 100644 coolstore-partner-web/src/main/java/com/cool/store/controller/webb/TrainingExperienceController.java diff --git a/coolstore-partner-common/src/main/java/com/cool/store/enums/ExperienceStatusEnum.java b/coolstore-partner-common/src/main/java/com/cool/store/enums/ExperienceStatusEnum.java new file mode 100644 index 000000000..f5f12b31b --- /dev/null +++ b/coolstore-partner-common/src/main/java/com/cool/store/enums/ExperienceStatusEnum.java @@ -0,0 +1,33 @@ +package com.cool.store.enums; + +public enum ExperienceStatusEnum { + DONE(0,"完成体验"), + ABANDON(1,"放弃体验"), + + ; + + private Integer experienceStatus; + + private String message; + + ExperienceStatusEnum(Integer experienceStatus, String message) { + this.experienceStatus = experienceStatus; + this.message = message; + } + + public Integer getExperienceStatus() { + return experienceStatus; + } + + public void setExperienceStatus(Integer experienceStatus) { + this.experienceStatus = experienceStatus; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } +} diff --git a/coolstore-partner-dao/src/main/java/com/cool/store/mapper/IntentAgreementMapper.java b/coolstore-partner-dao/src/main/java/com/cool/store/mapper/IntentAgreementMapper.java index d9fdb8a97..3a0c41374 100644 --- a/coolstore-partner-dao/src/main/java/com/cool/store/mapper/IntentAgreementMapper.java +++ b/coolstore-partner-dao/src/main/java/com/cool/store/mapper/IntentAgreementMapper.java @@ -9,4 +9,7 @@ import org.apache.ibatis.annotations.Param; public interface IntentAgreementMapper { boolean insert(@Param("request") SigningBaseInfoDO request); + + SigningBaseInfoDO selectByPartnerIdOrLineId(@Param("partnerId") String partnerId, + @Param("lineId") Long lineId); } diff --git a/coolstore-partner-dao/src/main/java/com/cool/store/mapper/LineInfoMapper.java b/coolstore-partner-dao/src/main/java/com/cool/store/mapper/LineInfoMapper.java index b198d45a7..872adf87b 100644 --- a/coolstore-partner-dao/src/main/java/com/cool/store/mapper/LineInfoMapper.java +++ b/coolstore-partner-dao/src/main/java/com/cool/store/mapper/LineInfoMapper.java @@ -6,4 +6,6 @@ import tk.mybatis.mapper.common.Mapper; public interface LineInfoMapper extends Mapper { LineInfoDO getByPartnerId(@Param("partnerId") String partnerId); + + LineInfoDO getByLineId(@Param("lineId") Long lineId); } \ No newline at end of file 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 new file mode 100644 index 000000000..77ad4c206 --- /dev/null +++ b/coolstore-partner-dao/src/main/java/com/cool/store/mapper/TrainingExperienceMapper.java @@ -0,0 +1,17 @@ +package com.cool.store.mapper; + +import com.cool.store.entity.LeaseBaseInfoDO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import javax.websocket.server.PathParam; + +@Mapper +public interface TrainingExperienceMapper { + + void insert(@Param("entity") LeaseBaseInfoDO toLeaseBaseInfoDO); + + void updateStatus(@Param("lineId") Long lineId, + @Param("status") Integer status, + @Param("abandonCause") String abandonCause); +} diff --git a/coolstore-partner-dao/src/main/resources/mapper/IntentAgreementMapper.xml b/coolstore-partner-dao/src/main/resources/mapper/IntentAgreementMapper.xml index 0b5bb082a..e8fe64699 100644 --- a/coolstore-partner-dao/src/main/resources/mapper/IntentAgreementMapper.xml +++ b/coolstore-partner-dao/src/main/resources/mapper/IntentAgreementMapper.xml @@ -3,7 +3,8 @@ - + + @@ -22,7 +23,8 @@ id, - partner_base_info_id, + partner_id, + line_id, sign_name mobile, sex, @@ -74,6 +76,20 @@ #{request.businessLicenseAddress}, + \ No newline at end of file diff --git a/coolstore-partner-dao/src/main/resources/mapper/JoinIntentionMapper.xml b/coolstore-partner-dao/src/main/resources/mapper/JoinIntentionMapper.xml index 04e4d9e03..17c512c4e 100644 --- a/coolstore-partner-dao/src/main/resources/mapper/JoinIntentionMapper.xml +++ b/coolstore-partner-dao/src/main/resources/mapper/JoinIntentionMapper.xml @@ -48,7 +48,7 @@ area_code, live_area, live_address, - joining_questionnaire,、 + joining_questionnaire, #{request.lineId}, diff --git a/coolstore-partner-dao/src/main/resources/mapper/LineInfoMapper.xml b/coolstore-partner-dao/src/main/resources/mapper/LineInfoMapper.xml index f107d37b1..69ca0616c 100644 --- a/coolstore-partner-dao/src/main/resources/mapper/LineInfoMapper.xml +++ b/coolstore-partner-dao/src/main/resources/mapper/LineInfoMapper.xml @@ -34,5 +34,8 @@ + \ No newline at end of file diff --git a/coolstore-partner-dao/src/main/resources/mapper/TrainingExperienceMapper.xml b/coolstore-partner-dao/src/main/resources/mapper/TrainingExperienceMapper.xml new file mode 100644 index 000000000..cf14ebb24 --- /dev/null +++ b/coolstore-partner-dao/src/main/resources/mapper/TrainingExperienceMapper.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + id, + partner_id, + line_id, + store_name, + store_id, + experience_start_time, + experience_end_time, + experience_status, + abandon_cause, + create_time, + update_time, + deleted + + + insert into xfsg_lease_base_info + + partner_id, + line_id, + store_name, + store_id, + experience_start_time, + experience_end_time, + experience_status, + abandon_cause, + + + #{request.partnerId}, + #{request.lineId}, + #{request.storeName}, + #{request.storeId}, + #{request.experienceStartTime}, + #{request.experienceEndTime}, + #{request.experienceStatus}, + #{request.abandonCause}, + + + + update + xfsg_lease_base_info + set + experience_status = #{status}, + 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 new file mode 100644 index 000000000..212b07ccd --- /dev/null +++ b/coolstore-partner-model/src/main/java/com/cool/store/entity/LeaseBaseInfoDO.java @@ -0,0 +1,34 @@ +package com.cool.store.entity; + +import lombok.Data; + +import java.util.Date; + +@Data +public class LeaseBaseInfoDO { + private Long id; + + private String partnerId; + + private Long lineId; + + private String storeName; + + private String storeId; + + private Date experienceStartTime; + + private Date experienceEndTime; + + private Integer experienceStatus; + + private String abandonCause; + + private Date createTime; + + private Date updateTime; + + private Integer deleted; + + +} diff --git a/coolstore-partner-model/src/main/java/com/cool/store/request/JoinIntentionRequest.java b/coolstore-partner-model/src/main/java/com/cool/store/request/JoinIntentionRequest.java index 3cbf1795d..fdfde6cc0 100644 --- a/coolstore-partner-model/src/main/java/com/cool/store/request/JoinIntentionRequest.java +++ b/coolstore-partner-model/src/main/java/com/cool/store/request/JoinIntentionRequest.java @@ -10,8 +10,9 @@ import javax.validation.constraints.NotBlank; @ApiModel("加盟意向Request") public class JoinIntentionRequest { + private Long id; + @ApiModelProperty("线索信息表-线索id") - @NotBlank(message = "线索id不能为空") private Long lineId; @ApiModelProperty("用户信息表partnerId") diff --git a/coolstore-partner-model/src/main/java/com/cool/store/request/TrainingExperienceDistributionRequest.java b/coolstore-partner-model/src/main/java/com/cool/store/request/TrainingExperienceDistributionRequest.java new file mode 100644 index 000000000..01936550b --- /dev/null +++ b/coolstore-partner-model/src/main/java/com/cool/store/request/TrainingExperienceDistributionRequest.java @@ -0,0 +1,37 @@ +package com.cool.store.request; + +import com.cool.store.entity.LeaseBaseInfoDO; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.util.Date; + +@Data +public class TrainingExperienceDistributionRequest { + + @ApiModelProperty("线索信息表-线索id") + private Long lineId; + @ApiModelProperty("用户信息表partnerId") + private String partnerId; + @ApiModelProperty("体验门店id") + private String storeId; + @ApiModelProperty("门店名") + private String storeName; + @ApiModelProperty("开始体验时间") + private Date experienceStartTime; + @ApiModelProperty("结束体验时间") + private Date experienceEndTime; + + + public LeaseBaseInfoDO toLeaseBaseInfoDO() { + LeaseBaseInfoDO leaseBaseInfoDO = new LeaseBaseInfoDO(); + leaseBaseInfoDO.setLineId(this.lineId); + leaseBaseInfoDO.setStoreName(this.storeName); + leaseBaseInfoDO.setStoreId(this.storeId); + leaseBaseInfoDO.setExperienceStartTime(this.experienceStartTime); + leaseBaseInfoDO.setExperienceEndTime(this.experienceEndTime); + leaseBaseInfoDO.setPartnerId(this.partnerId); + return leaseBaseInfoDO; + } +} 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 new file mode 100644 index 000000000..c7f6d4300 --- /dev/null +++ b/coolstore-partner-model/src/main/java/com/cool/store/response/SigningBaseInfoResponse.java @@ -0,0 +1,71 @@ +package com.cool.store.response; + +import com.cool.store.entity.SigningBaseInfoDO; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +@Data +public class SigningBaseInfoResponse { + @ApiModelProperty("id") + private Long id; + @ApiModelProperty("加盟商id") + private String partnerId; + @ApiModelProperty("线索id") + private Long lineId; + @ApiModelProperty("签名") + private String signName; + @ApiModelProperty("手机号") + private String mobile; + @ApiModelProperty("性别 1男 2女") + private Integer sex; + @ApiModelProperty("身份证正面url") + private String idCardFront; + @ApiModelProperty("身份证反面url") + private String idCardReverse; + @ApiModelProperty("身份证号") + private String idCardNo; + @ApiModelProperty("身份证地址") + private String idCardAddress; + @ApiModelProperty("当前地址") + private String currentResidence; + @ApiModelProperty("地址详情") + private String addressDetail; + @ApiModelProperty("证照url") + private String businessLicense; + @ApiModelProperty("证照码") + private String businessLicenseCode; + @ApiModelProperty("证照地址") + private String businessLicenseAddress; + @ApiModelProperty("创建时间") + private Date createTime; + @ApiModelProperty("更新时间") + private Date updateTime; + + + public static SigningBaseInfoResponse from(SigningBaseInfoDO signingBaseInfoDO) { + if (signingBaseInfoDO == null) { + return null; + } + SigningBaseInfoResponse signingBaseInfoResponse = new SigningBaseInfoResponse(); + signingBaseInfoResponse.setId(signingBaseInfoDO.getId()); + signingBaseInfoResponse.setPartnerId(signingBaseInfoDO.getPartnerId()); + signingBaseInfoResponse.setLineId(signingBaseInfoDO.getLineId()); + signingBaseInfoResponse.setSignName(signingBaseInfoDO.getSignName()); + signingBaseInfoResponse.setMobile(signingBaseInfoDO.getMobile()); + signingBaseInfoResponse.setSex(signingBaseInfoDO.getSex()); + signingBaseInfoResponse.setIdCardFront(signingBaseInfoDO.getIdCardFront()); + signingBaseInfoResponse.setIdCardReverse(signingBaseInfoDO.getIdCardReverse()); + signingBaseInfoResponse.setIdCardNo(signingBaseInfoDO.getIdCardNo()); + signingBaseInfoResponse.setIdCardAddress(signingBaseInfoDO.getIdCardAddress()); + signingBaseInfoResponse.setCurrentResidence(signingBaseInfoDO.getCurrentResidence()); + signingBaseInfoResponse.setAddressDetail(signingBaseInfoDO.getAddressDetail()); + signingBaseInfoResponse.setBusinessLicense(signingBaseInfoDO.getBusinessLicense()); + signingBaseInfoResponse.setBusinessLicenseCode(signingBaseInfoDO.getBusinessLicenseCode()); + signingBaseInfoResponse.setBusinessLicenseAddress(signingBaseInfoDO.getBusinessLicenseAddress()); + signingBaseInfoResponse.setCreateTime(signingBaseInfoDO.getCreateTime()); + signingBaseInfoResponse.setUpdateTime(signingBaseInfoDO.getUpdateTime()); + return signingBaseInfoResponse; + } +} diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/IntentAgreementService.java b/coolstore-partner-service/src/main/java/com/cool/store/service/IntentAgreementService.java index d364848d7..7f41eba0f 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/IntentAgreementService.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/IntentAgreementService.java @@ -1,6 +1,7 @@ package com.cool.store.service; import com.cool.store.request.IntentAgreementSubmitRequest; +import com.cool.store.response.SigningBaseInfoResponse; public interface IntentAgreementService { /** @@ -10,4 +11,11 @@ public interface IntentAgreementService { */ boolean submit(IntentAgreementSubmitRequest request); + /** + * 根据线索id或者加盟商id查询意向协议信息 + * @param partnerId + * @param lineId + * @return + */ + SigningBaseInfoResponse getMiniIntentAgreement(String partnerId, Long lineId); } 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 new file mode 100644 index 000000000..574e3d9dd --- /dev/null +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/TrainingExperienceService.java @@ -0,0 +1,21 @@ +package com.cool.store.service; + +import com.cool.store.request.TrainingExperienceDistributionRequest; + +public interface TrainingExperienceService { + /** + * 实训分配 + * @param request + * @return + */ + boolean distribution(TrainingExperienceDistributionRequest request); + + /** + * 实训状态变更 + * @param lineId + * @param status + * @param abandonCause + */ + void experienceStatusChange(Long lineId, Integer status, String abandonCause); + +} 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 8bbdc8eaf..b5a0cb5e5 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 @@ -8,13 +8,19 @@ import com.cool.store.exception.ServiceException; import com.cool.store.mapper.IntentAgreementMapper; import com.cool.store.mapper.LineInfoMapper; import com.cool.store.request.IntentAgreementSubmitRequest; +import com.cool.store.response.SigningBaseInfoResponse; import com.cool.store.service.IntentAgreementService; +import com.cool.store.utils.StringUtil; +import com.cool.store.utils.poi.StringUtils; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.util.Objects; +import static com.cool.store.enums.ErrorCodeEnum.PARAMS_VALIDATE_ERROR; + @Service @Slf4j public class IntentAgreementServiceImpl implements IntentAgreementService { @@ -28,6 +34,7 @@ public class IntentAgreementServiceImpl implements IntentAgreementService { @Override + @Transactional(rollbackFor = Exception.class) public boolean submit(IntentAgreementSubmitRequest request) { SigningBaseInfoDO signingBaseInfoDO = request.toSigningBaseInfoDO(); boolean submitStatus = intentAgreementMapper.insert(signingBaseInfoDO); @@ -43,4 +50,18 @@ public class IntentAgreementServiceImpl implements IntentAgreementService { } return false; } + + @Override + public SigningBaseInfoResponse getMiniIntentAgreement(String partnerId, Long lineId) { + if (StringUtil.isBlank(partnerId) && lineId == null){ + throw new ServiceException(PARAMS_VALIDATE_ERROR); + } + SigningBaseInfoDO signingBaseInfoDO = intentAgreementMapper.selectByPartnerIdOrLineId(partnerId, lineId); + if (Objects.isNull(signingBaseInfoDO)){ + log.info("getMiniIntentAgreement signingBaseInfoDO IS NULL......"); + return null; + } + SigningBaseInfoResponse response = SigningBaseInfoResponse.from(signingBaseInfoDO); + 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 new file mode 100644 index 000000000..579b87de4 --- /dev/null +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/TrainingExperienceServiceImpl.java @@ -0,0 +1,59 @@ +package com.cool.store.service.impl; + +import com.cool.store.entity.LeaseBaseInfoDO; +import com.cool.store.entity.LineInfoDO; +import com.cool.store.enums.ErrorCodeEnum; +import com.cool.store.enums.ExperienceStatusEnum; +import com.cool.store.enums.WorkflowSubStageStatusEnum; +import com.cool.store.exception.ServiceException; +import com.cool.store.mapper.LineInfoMapper; +import com.cool.store.mapper.TrainingExperienceMapper; +import com.cool.store.request.TrainingExperienceDistributionRequest; +import com.cool.store.service.TrainingExperienceService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import javax.annotation.Tainted; +import java.util.Objects; + +import static com.cool.store.enums.ErrorCodeEnum.INTERVIEW_LINE_ID_IS_NULL; + +@Service +@Slf4j +public class TrainingExperienceServiceImpl implements TrainingExperienceService { + + @Resource + TrainingExperienceMapper trainingExperienceMapper; + + @Resource + LineInfoMapper lineInfoMapper; + + @Override + public boolean distribution(TrainingExperienceDistributionRequest request) { + if (Objects.isNull(request)) { + return Boolean.FALSE; + } + if (Objects.isNull(request.getLineId())) { + throw new ServiceException(INTERVIEW_LINE_ID_IS_NULL); + } + trainingExperienceMapper.insert(request.toLeaseBaseInfoDO()); + return true; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void experienceStatusChange(Long lineId, Integer status, String abandonCause) { + trainingExperienceMapper.updateStatus(lineId,status,abandonCause); + if (ExperienceStatusEnum.DONE.getExperienceStatus().equals(status)){ + LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(lineId); + if (Objects.isNull(lineInfoDO)){ + throw new ServiceException(ErrorCodeEnum.INTERVIEW_PARTNER_NOT_EXIST); + } + lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.SECOND_INTERVIEWS_100.getCode()); + lineInfoMapper.updateByPrimaryKeySelective(lineInfoDO); + } + + } +} diff --git a/coolstore-partner-web/src/main/java/com/cool/store/controller/webb/TrainingExperienceController.java b/coolstore-partner-web/src/main/java/com/cool/store/controller/webb/TrainingExperienceController.java new file mode 100644 index 000000000..cf8b67368 --- /dev/null +++ b/coolstore-partner-web/src/main/java/com/cool/store/controller/webb/TrainingExperienceController.java @@ -0,0 +1,42 @@ +package com.cool.store.controller.webb; + +import com.cool.store.enums.ExperienceStatusEnum; +import com.cool.store.request.TrainingExperienceDistributionRequest; +import com.cool.store.response.ResponseResult; +import com.cool.store.service.TrainingExperienceService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import javax.websocket.server.PathParam; + +@RestController +@RequestMapping("/pc/training/experience/") +@Api(tags = "PC端-实训体验") +@Slf4j +public class TrainingExperienceController { + + @Resource + TrainingExperienceService trainingExperienceService; + + + @ApiOperation("实训体验分配") + @PostMapping("/distribution") + public ResponseResult distribution(@RequestBody TrainingExperienceDistributionRequest request) { + return ResponseResult.success(trainingExperienceService.distribution(request)); + } + + @ApiOperation("实训体验状态变更") + @GetMapping("/experience/{status}") + public ResponseResult experienceStatusChange(@ApiParam(value = "实训体验状态 DONE:完成 ABANDON:放弃") @PathVariable(value = "status") ExperienceStatusEnum statusEnum, + @ApiParam(value = "线索id")@RequestParam(value = "lineId") Long lineId, + @ApiParam(value = "放弃原因,状态为ABANDON才填写")@RequestParam(value = "abandonCause",required = false)String abandonCause) { + + trainingExperienceService.experienceStatusChange(lineId,statusEnum.getExperienceStatus(),abandonCause); + return ResponseResult.success(); + } + +} 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 8b317ab89..651dc505b 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 @@ -3,14 +3,12 @@ package com.cool.store.controller.webc; import com.cool.store.request.IntentAgreementSubmitRequest; import com.cool.store.request.JoinIntentionRequest; 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.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; @@ -29,4 +27,13 @@ public class MiniIntentAgreementController { boolean resp = intentAgreementService.submit(request); return ResponseResult.success(resp); } + + @PostMapping(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); + } }