request.getAreaCode()
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package com.cool.store.service.impl;
|
package com.cool.store.service.impl;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.cool.store.dao.HyOpenAreaInfoDAO;
|
import com.cool.store.dao.HyOpenAreaInfoDAO;
|
||||||
import com.cool.store.dao.LineInfoDAO;
|
import com.cool.store.dao.LineInfoDAO;
|
||||||
import com.cool.store.dao.RegionAreaConfigDao;
|
import com.cool.store.dao.RegionAreaConfigDao;
|
||||||
@@ -20,6 +21,7 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import javax.xml.bind.util.JAXBSource;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import static com.cool.store.enums.ErrorCodeEnum.LINE_ID_IS_NOT_EXIST;
|
import static com.cool.store.enums.ErrorCodeEnum.LINE_ID_IS_NOT_EXIST;
|
||||||
@@ -55,6 +57,7 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean submit(JoinIntentionRequest request) {
|
public boolean submit(JoinIntentionRequest request) {
|
||||||
|
log.info("submit request :{}", JSONObject.toJSONString(request));
|
||||||
if (Objects.isNull(request)) {
|
if (Objects.isNull(request)) {
|
||||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
}
|
}
|
||||||
@@ -66,7 +69,7 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
|
|||||||
if (Objects.isNull(lineInfoParam)) {
|
if (Objects.isNull(lineInfoParam)) {
|
||||||
throw new ServiceException(ErrorCodeEnum.INTERVIEW_PARTNER_NOT_EXIST);
|
throw new ServiceException(ErrorCodeEnum.INTERVIEW_PARTNER_NOT_EXIST);
|
||||||
}
|
}
|
||||||
if (Objects.nonNull(request.getWantShopArea())){
|
if (Objects.nonNull(request.getAreaCode())){
|
||||||
EnterpriseUserDO userByRoleNameAndAreaId = userAuthMappingService.getUserByRoleEnumAndAreaId(UserRoleEnum.INVESTMENT_MANAGER, Long.valueOf(request.getWantShopArea()));
|
EnterpriseUserDO userByRoleNameAndAreaId = userAuthMappingService.getUserByRoleEnumAndAreaId(UserRoleEnum.INVESTMENT_MANAGER, Long.valueOf(request.getWantShopArea()));
|
||||||
lineInfoParam.setInvestmentManager(userByRoleNameAndAreaId.getUserId());
|
lineInfoParam.setInvestmentManager(userByRoleNameAndAreaId.getUserId());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,20 +62,21 @@ public class TrainingExperienceServiceImpl extends LineFlowService implements Tr
|
|||||||
}
|
}
|
||||||
LeaseBaseInfoDO leaseBaseInfoDO = request.toLeaseBaseInfoDO();
|
LeaseBaseInfoDO leaseBaseInfoDO = request.toLeaseBaseInfoDO();
|
||||||
Date currentDate = new Date();
|
Date currentDate = new Date();
|
||||||
|
LineInfoDO lineInfoDO = new LineInfoDO();
|
||||||
if (request.getExperienceStartTime().compareTo(request.getExperienceEndTime()) >= 0){
|
if (request.getExperienceStartTime().compareTo(request.getExperienceEndTime()) >= 0){
|
||||||
throw new ServiceException("结束时间不能早于开始时间");
|
throw new ServiceException("结束时间不能早于开始时间");
|
||||||
}
|
}
|
||||||
if (currentDate.before(request.getExperienceStartTime())){
|
if (currentDate.before(request.getExperienceStartTime())){
|
||||||
leaseBaseInfoDO.setExperienceStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_85.getCode());
|
leaseBaseInfoDO.setExperienceStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_85.getCode());
|
||||||
|
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_85.getCode());
|
||||||
}else if (currentDate.after(request.getExperienceStartTime()) || currentDate.before(request.getExperienceEndTime())){
|
}else if (currentDate.after(request.getExperienceStartTime()) || currentDate.before(request.getExperienceEndTime())){
|
||||||
leaseBaseInfoDO.setExperienceStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_90.getCode());
|
leaseBaseInfoDO.setExperienceStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_90.getCode());
|
||||||
|
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_90.getCode());
|
||||||
}else {
|
}else {
|
||||||
throw new ServiceException("时间");
|
throw new ServiceException("时间");
|
||||||
}
|
}
|
||||||
trainingExperienceMapper.insert(leaseBaseInfoDO);
|
trainingExperienceMapper.insert(leaseBaseInfoDO);
|
||||||
LineInfoDO lineInfoDO = new LineInfoDO();
|
|
||||||
lineInfoDO.setWorkflowSubStage(WorkflowSubStageEnum.STORE_EXPERIENCE.getCode());
|
lineInfoDO.setWorkflowSubStage(WorkflowSubStageEnum.STORE_EXPERIENCE.getCode());
|
||||||
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_85.getCode());
|
|
||||||
lineInfoDO.setId(request.getLineId());
|
lineInfoDO.setId(request.getLineId());
|
||||||
lineInfoMapper.updateByPrimaryKeySelective(lineInfoDO);
|
lineInfoMapper.updateByPrimaryKeySelective(lineInfoDO);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user