feat
This commit is contained in:
@@ -51,6 +51,16 @@
|
|||||||
<if test="entity.experienceStatus != null">#{entity.experienceStatus},</if>
|
<if test="entity.experienceStatus != null">#{entity.experienceStatus},</if>
|
||||||
<if test="entity.abandonCause != null">#{entity.abandonCause},</if>
|
<if test="entity.abandonCause != null">#{entity.abandonCause},</if>
|
||||||
</trim>
|
</trim>
|
||||||
|
ON DUPLICATE KEY UPDATE
|
||||||
|
<trim suffixOverrides=",">
|
||||||
|
<if test="entity.partnerId != null">partner_id = #{entity.partnerId},</if>
|
||||||
|
<if test="entity.storeName != null">store_name = #{entity.storeName},</if>
|
||||||
|
<if test="entity.storeId != null">store_id = #{entity.storeId},</if>
|
||||||
|
<if test="entity.experienceStartTime != null">experience_start_time = #{entity.experienceStartTime},</if>
|
||||||
|
<if test="entity.experienceEndTime != null">experience_end_time = #{entity.experienceEndTime},</if>
|
||||||
|
<if test="entity.experienceStatus != null">experience_status = #{entity.experienceStatus},</if>
|
||||||
|
<if test="entity.abandonCause != null">abandon_cause = #{entity.abandonCause},</if>
|
||||||
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
<update id="updateStatus">
|
<update id="updateStatus">
|
||||||
update
|
update
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ public class IntentAgreementServiceImpl implements IntentAgreementService {
|
|||||||
if (Objects.isNull(lineInfoDO)){
|
if (Objects.isNull(lineInfoDO)){
|
||||||
throw new ServiceException(ErrorCodeEnum.INTERVIEW_PARTNER_NOT_EXIST);
|
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);
|
lineInfoMapper.updateByPrimaryKeySelective(lineInfoDO);
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import com.cool.store.entity.LeaseBaseInfoDO;
|
|||||||
import com.cool.store.entity.LineInfoDO;
|
import com.cool.store.entity.LineInfoDO;
|
||||||
import com.cool.store.enums.ErrorCodeEnum;
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
import com.cool.store.enums.ExperienceStatusEnum;
|
import com.cool.store.enums.ExperienceStatusEnum;
|
||||||
|
import com.cool.store.enums.WorkflowSubStageEnum;
|
||||||
import com.cool.store.enums.WorkflowSubStageStatusEnum;
|
import com.cool.store.enums.WorkflowSubStageStatusEnum;
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
import com.cool.store.mapper.LineInfoMapper;
|
import com.cool.store.mapper.LineInfoMapper;
|
||||||
@@ -31,6 +32,7 @@ public class TrainingExperienceServiceImpl implements TrainingExperienceService
|
|||||||
LineInfoMapper lineInfoMapper;
|
LineInfoMapper lineInfoMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean distribution(TrainingExperienceDistributionRequest request) {
|
public boolean distribution(TrainingExperienceDistributionRequest request) {
|
||||||
if (Objects.isNull(request)) {
|
if (Objects.isNull(request)) {
|
||||||
return Boolean.FALSE;
|
return Boolean.FALSE;
|
||||||
@@ -38,7 +40,12 @@ public class TrainingExperienceServiceImpl implements TrainingExperienceService
|
|||||||
if (Objects.isNull(request.getLineId())) {
|
if (Objects.isNull(request.getLineId())) {
|
||||||
throw new ServiceException(INTERVIEW_LINE_ID_IS_NULL);
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ public class PCTrainingExperienceController {
|
|||||||
@Resource
|
@Resource
|
||||||
TrainingExperienceService trainingExperienceService;
|
TrainingExperienceService trainingExperienceService;
|
||||||
|
|
||||||
@ApiOperation("实训体验分配")
|
@ApiOperation("实训体验分配或更新")
|
||||||
@PostMapping("/distribution")
|
@PostMapping("/distribution")
|
||||||
public ResponseResult<Boolean> distribution(@RequestBody TrainingExperienceDistributionRequest request) {
|
public ResponseResult<Boolean> distribution(@RequestBody TrainingExperienceDistributionRequest request) {
|
||||||
return ResponseResult.success(trainingExperienceService.distribution(request));
|
return ResponseResult.success(trainingExperienceService.distribution(request));
|
||||||
|
|||||||
Reference in New Issue
Block a user