diff --git a/coolstore-partner-dao/src/main/resources/mapper/TrainingExperienceMapper.xml b/coolstore-partner-dao/src/main/resources/mapper/TrainingExperienceMapper.xml
index 5c35fed7e..386cd9ccd 100644
--- a/coolstore-partner-dao/src/main/resources/mapper/TrainingExperienceMapper.xml
+++ b/coolstore-partner-dao/src/main/resources/mapper/TrainingExperienceMapper.xml
@@ -51,6 +51,16 @@
#{entity.experienceStatus},
#{entity.abandonCause},
+ ON DUPLICATE KEY UPDATE
+
+ partner_id = #{entity.partnerId},
+ store_name = #{entity.storeName},
+ store_id = #{entity.storeId},
+ experience_start_time = #{entity.experienceStartTime},
+ experience_end_time = #{entity.experienceEndTime},
+ experience_status = #{entity.experienceStatus},
+ abandon_cause = #{entity.abandonCause},
+
update
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 94eccaea0..9b42de50e 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
@@ -55,7 +55,7 @@ public class IntentAgreementServiceImpl implements IntentAgreementService {
if (Objects.isNull(lineInfoDO)){
throw new ServiceException(ErrorCodeEnum.INTERVIEW_PARTNER_NOT_EXIST);
}
- lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_60.getCode());
+ lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_63.getCode());
lineInfoMapper.updateByPrimaryKeySelective(lineInfoDO);
return Boolean.TRUE;
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 cf62fe7b1..fba5de91b 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
@@ -4,6 +4,7 @@ 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.WorkflowSubStageEnum;
import com.cool.store.enums.WorkflowSubStageStatusEnum;
import com.cool.store.exception.ServiceException;
import com.cool.store.mapper.LineInfoMapper;
@@ -31,6 +32,7 @@ public class TrainingExperienceServiceImpl implements TrainingExperienceService
LineInfoMapper lineInfoMapper;
@Override
+ @Transactional(rollbackFor = Exception.class)
public boolean distribution(TrainingExperienceDistributionRequest request) {
if (Objects.isNull(request)) {
return Boolean.FALSE;
@@ -38,7 +40,12 @@ public class TrainingExperienceServiceImpl implements TrainingExperienceService
if (Objects.isNull(request.getLineId())) {
throw new ServiceException(INTERVIEW_LINE_ID_IS_NULL);
}
- trainingExperienceMapper.insert(request.toLeaseBaseInfoDO());
+ LeaseBaseInfoDO leaseBaseInfoDO = request.toLeaseBaseInfoDO();
+ trainingExperienceMapper.insert(leaseBaseInfoDO);
+ LineInfoDO lineInfoDO = new LineInfoDO();
+ lineInfoDO.setWorkflowSubStage(WorkflowSubStageEnum.SIGN_INTENT_AGREEMENT.getCode());
+ lineInfoDO.setId(request.getLineId());
+ lineInfoMapper.updateByPrimaryKey(lineInfoDO);
return true;
}
diff --git a/coolstore-partner-web/src/main/java/com/cool/store/controller/webb/PCLineInterviewController.java b/coolstore-partner-web/src/main/java/com/cool/store/controller/webb/PCLineInterviewController.java
index 366341a1f..b9e0648a5 100644
--- a/coolstore-partner-web/src/main/java/com/cool/store/controller/webb/PCLineInterviewController.java
+++ b/coolstore-partner-web/src/main/java/com/cool/store/controller/webb/PCLineInterviewController.java
@@ -8,17 +8,22 @@ import com.cool.store.request.LineInterviewPageRequest;
import com.cool.store.request.ModifyInterviewerRequest;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.LineInterviewService;
+import com.cool.store.vo.interview.AppointmentTimeVO;
import com.cool.store.vo.interview.EnterInterviewVO;
import com.cool.store.vo.interview.InterviewDetailVO;
import com.cool.store.vo.interview.LineInterviewPageVO;
import com.github.pagehelper.PageInfo;
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.format.annotation.DateTimeFormat;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
+import java.time.LocalDate;
import java.util.List;
/**
@@ -36,6 +41,19 @@ public class PCLineInterviewController {
@Resource
private LineInterviewService lineInterviewService;
+ @ApiOperation("获取面试/面谈 预约时间")
+ @GetMapping("/appointment/time")
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = "lineId", value = "线索id", required = true),
+ @ApiImplicitParam(name = "interviewType", value = "面试类型:0面谈;1面试", required = true),
+ @ApiImplicitParam(name = "appointmentDate", value = "预约日期 yyyy-MM-dd", required = true)
+ })
+ public ResponseResult> getAppointmentTime(@RequestParam("lineId")Long lineId,
+ @RequestParam("interviewType")Integer interviewType,
+ @RequestParam("appointmentDate") @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate appointmentDate) {
+ return ResponseResult.success(lineInterviewService.getAppointmentTime(lineId, interviewType, appointmentDate));
+ }
+
@ApiOperation("修改面审时间")
@PostMapping("/appointment/time/modify")
public ResponseResult modifyAppointmentTime(@RequestBody @Validated AppointmentTimeRequest request) {
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 bb261653b..b7bbe3fea 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
@@ -23,7 +23,7 @@ public class PCTrainingExperienceController {
@Resource
TrainingExperienceService trainingExperienceService;
- @ApiOperation("实训体验分配")
+ @ApiOperation("实训体验分配或更新")
@PostMapping("/distribution")
public ResponseResult distribution(@RequestBody TrainingExperienceDistributionRequest request) {
return ResponseResult.success(trainingExperienceService.distribution(request));