request.getAreaCode()

This commit is contained in:
guohb
2024-04-09 17:30:10 +08:00
parent c1f94d7d22
commit 925bee68f8
2 changed files with 7 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
package com.cool.store.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.cool.store.dao.HyOpenAreaInfoDAO;
import com.cool.store.dao.LineInfoDAO;
import com.cool.store.dao.RegionAreaConfigDao;
@@ -20,6 +21,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import javax.xml.bind.util.JAXBSource;
import java.util.Objects;
import static com.cool.store.enums.ErrorCodeEnum.LINE_ID_IS_NOT_EXIST;
@@ -55,6 +57,7 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
@Override
@Transactional(rollbackFor = Exception.class)
public boolean submit(JoinIntentionRequest request) {
log.info("submit request {}", JSONObject.toJSONString(request));
if (Objects.isNull(request)) {
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
}
@@ -66,7 +69,7 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
if (Objects.isNull(lineInfoParam)) {
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()));
lineInfoParam.setInvestmentManager(userByRoleNameAndAreaId.getUserId());
}

View File

@@ -62,20 +62,21 @@ public class TrainingExperienceServiceImpl extends LineFlowService implements Tr
}
LeaseBaseInfoDO leaseBaseInfoDO = request.toLeaseBaseInfoDO();
Date currentDate = new Date();
LineInfoDO lineInfoDO = new LineInfoDO();
if (request.getExperienceStartTime().compareTo(request.getExperienceEndTime()) >= 0){
throw new ServiceException("结束时间不能早于开始时间");
}
if (currentDate.before(request.getExperienceStartTime())){
leaseBaseInfoDO.setExperienceStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_85.getCode());
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_85.getCode());
}else if (currentDate.after(request.getExperienceStartTime()) || currentDate.before(request.getExperienceEndTime())){
leaseBaseInfoDO.setExperienceStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_90.getCode());
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_90.getCode());
}else {
throw new ServiceException("时间");
}
trainingExperienceMapper.insert(leaseBaseInfoDO);
LineInfoDO lineInfoDO = new LineInfoDO();
lineInfoDO.setWorkflowSubStage(WorkflowSubStageEnum.STORE_EXPERIENCE.getCode());
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_85.getCode());
lineInfoDO.setId(request.getLineId());
lineInfoMapper.updateByPrimaryKeySelective(lineInfoDO);
return true;