Merge remote-tracking branch 'origin/cc_partner_init' into cc_partner_init

This commit is contained in:
shuo.wang
2024-05-23 14:34:58 +08:00
28 changed files with 195 additions and 80 deletions

View File

@@ -1,6 +1,7 @@
package com.cool.store.service;
import com.cool.store.context.LoginUserInfo;
import com.cool.store.exception.ApiException;
import com.cool.store.request.FranchiseeSaveRequest;
import com.cool.store.request.InitiatingRequest;
import com.cool.store.request.IntentAgreementSubmitRequest;
@@ -26,7 +27,7 @@ public interface IntentAgreementService {
ResponseResult initiating(InitiatingRequest request,LoginUserInfo user);
ResponseResult save(FranchiseeSaveRequest request, LoginUserInfo user);
ResponseResult save(FranchiseeSaveRequest request, LoginUserInfo user) throws ApiException;
InitiatingRequest getOaDetail(String mobile, String idCardNo);
}

View File

@@ -119,7 +119,9 @@ public class ApplyLicenseServiceImpl implements ApplyLicenseService {
List<UserAuthMappingDO> userAuthByMappingIds = userAuthMappingMapper.getUserAuthByMappingIds(Collections.singletonList(String.valueOf(regionId)));
if (CollectionUtils.isNotEmpty(userAuthByMappingIds)) {
List<String> sendUserIds = userAuthByMappingIds.stream().map(UserAuthMappingDO::getUserId).collect(Collectors.toList());
sendUsers.addAll(sendUserIds);
if (CollectionUtils.isNotEmpty(sendUserIds)){
sendUsers = enterpriseUserRoleMapper.getUserIdsByRoleIds(Collections.singletonList("130000000"), sendUserIds);
}
}
} else {
sendUsers.add(shopInfoDO.getSupervisorUserId());

View File

@@ -99,8 +99,9 @@ public class CoolStoreStartFlowServiceImpl implements CoolStoreStartFlowService
String url = xfsgUrl + Constants.FIRST_ORDER +
"?timestamp=" + requestMap.get("timestamp") + "&signature=" + requestMap.get("signature") +
"&storeCode=" + shopNum;
Long start = System.currentTimeMillis();
JSONObject jsonObject = httpRestTemplateService.getForObject(url, JSONObject.class, new HashMap<>());
log.info("get url:{},jsonObject:{}", url, jsonObject);
log.info("get url:{},jsonObject:{},耗时:{}", url, jsonObject,System.currentTimeMillis() - start);
Boolean flag = (Boolean) jsonObject.get("data");
return flag;
} catch (Exception e) {

View File

@@ -123,6 +123,8 @@ public class DeskServiceImpl implements DeskService {
List<Long> lineIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getId() != null).map(LineInfoDO::getId).collect(Collectors.toList());
List<LineInterviewDO> interviewByLindIds = lineInterviewDAO.getInterviewByLindIds(lineIds, InterviewTypeEnum.INTERVIEW);
Map<Long, LineInterviewDO> interviewDOMap = interviewByLindIds.stream().collect(Collectors.toMap(LineInterviewDO::getLineId, x -> x, (k1, k2) -> k1));
List<String> userIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getFirstInterviewer() != null).map(LineInfoDO::getFirstInterviewer).collect(Collectors.toList());
Map<String, EnterpriseUserDO> userInfoMap = enterpriseUserDAO.getUserInfoMap(userIds);
List<InterviewPendingVO> list = new ArrayList<>();
lineInfoDOS.forEach(x->{
@@ -132,7 +134,7 @@ public class DeskServiceImpl implements DeskService {
if (lineInterviewDO != null){
interviewPendingVO.setStartTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START,lineInterviewDO.getStartTime()));
interviewPendingVO.setEndTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_END,lineInterviewDO.getEndTime()));
interviewPendingVO.setInterviewer(userInfo.getName());
interviewPendingVO.setInterviewer(userInfoMap.getOrDefault(x.getFirstInterviewer(),new EnterpriseUserDO()).getName());
}
list.add(interviewPendingVO);
});
@@ -154,6 +156,9 @@ public class DeskServiceImpl implements DeskService {
List<Long> lineIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getId() != null).map(LineInfoDO::getId).collect(Collectors.toList());
List<LineInterviewDO> interviewByLindIds = lineInterviewDAO.getInterviewByLindIds(lineIds, InterviewTypeEnum.SECOND_INTERVIEW);
Map<Long, LineInterviewDO> interviewDOMap = interviewByLindIds.stream().collect(Collectors.toMap(LineInterviewDO::getLineId, x -> x, (k1, k2) -> k1));
List<String> userIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getSecondInterviewer() != null).map(LineInfoDO::getSecondInterviewer).collect(Collectors.toList());
Map<String, EnterpriseUserDO> userInfoMap = enterpriseUserDAO.getUserInfoMap(userIds);
List<InterviewPendingVO> list = new ArrayList<>();
lineInfoDOS.forEach(x->{
@@ -163,7 +168,7 @@ public class DeskServiceImpl implements DeskService {
if (lineInterviewDO != null){
interviewPendingVO.setStartTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START,lineInterviewDO.getStartTime()));
interviewPendingVO.setEndTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_END,lineInterviewDO.getEndTime()));
interviewPendingVO.setInterviewer(userInfo.getName());
interviewPendingVO.setInterviewer(userInfoMap.getOrDefault(x.getSecondInterviewer(),new EnterpriseUserDO()).getName());
}
list.add(interviewPendingVO);
});

View File

@@ -131,15 +131,14 @@ public class FranchiseFeeServiceImpl implements FranchiseFeeService {
FranchiseFeeDO franchiseFeeDO = franchiseFeeMapper.selectByPrimaryKey(request.getId());
franchiseFeeDO.setAuditId(shopAuditInfoDO.getId());
franchiseFeeMapper.updateByPrimaryKeySelective(franchiseFeeDO);
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
Map<String, String> requestMap = new HashMap<>();
requestMap.put("storeName", shopInfoDO.getShopName());
requestMap.put("partnerName", lineInfoDO.getUsername());
requestMap.put("partnerMobile", lineInfoDO.getMobile());
requestMap.put("lineId", String.valueOf(lineInfoDO.getId()));
commonService.sendMessage(Collections.singletonList(lineInfoDO.getInvestmentManager()), MessageEnum.MESSAGE_18, requestMap);
// ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
// LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
// Map<String, String> requestMap = new HashMap<>();
// requestMap.put("storeName", shopInfoDO.getShopName());
// requestMap.put("partnerName", lineInfoDO.getUsername());
// requestMap.put("partnerMobile", lineInfoDO.getMobile());
// requestMap.put("lineId", String.valueOf(lineInfoDO.getId()));
// commonService.sendMessage(Collections.singletonList(lineInfoDO.getInvestmentManager()), MessageEnum.MESSAGE_18, requestMap);
return true;
}
}

View File

@@ -5,6 +5,7 @@ import com.cool.store.context.LoginUserInfo;
import com.cool.store.dao.LineInfoDAO;
import com.cool.store.entity.*;
import com.cool.store.enums.*;
import com.cool.store.exception.ApiException;
import com.cool.store.exception.ServiceException;
import com.cool.store.mapper.*;
import com.cool.store.mq.util.HttpRestTemplateService;
@@ -12,12 +13,14 @@ import com.cool.store.request.*;
import com.cool.store.response.InitiatingResponse;
import com.cool.store.response.ResponseResult;
import com.cool.store.response.SigningBaseInfoResponse;
import com.cool.store.service.AliyunService;
import com.cool.store.service.IntentAgreementService;
import com.cool.store.utils.RedisUtilPool;
import com.cool.store.utils.SecureUtil;
import com.cool.store.utils.StringUtil;
import com.cool.store.utils.poi.DateUtils;
import com.cool.store.utils.poi.constant.Constants;
import com.cool.store.vo.BusinessLicenseInfoVO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
@@ -70,6 +73,9 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
@Resource
private CommonService commonService;
@Resource
AliyunService aliyunService;
@Override
@Transactional(rollbackFor = Exception.class)
@@ -138,6 +144,11 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
WorkflowSubStageEnum nextStage = workflowSubStageEnum.getNextStage();
//更新线索阶段
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(), userId);
Map<String, String> requestMap = new HashMap<>();
requestMap.put("partnerUsername", lineInfo.getUsername());
requestMap.put("lineId", String.valueOf(lineInfo.getId()));
requestMap.put("partnerMobile", lineInfo.getMobile());
commonService.sendMessage(Collections.singletonList(lineInfo.getInvestmentManager()),MessageEnum.MESSAGE_32,requestMap);
}
//更新auditId
SigningBaseInfoDO signingBaseInfoDO = intentAgreementMapper.selectByPartnerIdOrLineId(null, lineInfo.getId());
@@ -188,6 +199,7 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
if (Objects.isNull(request)) {
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
}
verifyDate(request);
Map<String, Object> requestMap = new HashMap<>();
fillSignatureInfo(requestMap);
String url = xfsgUrl + Constants.INTENTION_CONTRACT_URL + "?timestamp=" + requestMap.get("timestamp") + "&signature=" + requestMap.get("signature");
@@ -211,6 +223,15 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
}
}
private void verifyDate(InitiatingRequest request) {
if (request.getSignStartTime() == null || request.getSignEndTime() == null) {
throw new ServiceException(ErrorCodeEnum.TIME_NULL_FALSE);
}
if (request.getSignStartTime().after(request.getSignEndTime())) {
throw new ServiceException(ErrorCodeEnum.TIME_FALSE);
}
}
@Override
public InitiatingRequest getOaDetail(String mobile, String idCardNo) {
String redisKey = "OA:" + mobile + idCardNo;
@@ -222,7 +243,7 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
}
@Override
public ResponseResult save(FranchiseeSaveRequest request, LoginUserInfo user) {
public ResponseResult save(FranchiseeSaveRequest request, LoginUserInfo user) throws ApiException {
log.info("save request:{}", JSONObject.toJSONString(request));
if (Objects.isNull(request)) {
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
@@ -247,11 +268,24 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
if (Objects.isNull(lineInfoDO)) {
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
}
if ("1".equals(lineInfoDO.getSex())){
franchiseeDO.setSex(1);
}else if ("2".equals(lineInfoDO.getSex())){
franchiseeDO.setSex(0);
}
HyOpenAreaInfoDO openAreaInfoDO = openAreaInfoMapper.selectById(lineInfoDO.getWantShopAreaId());
franchiseeDO.setProvinceCode(String.valueOf(openAreaInfoDO.getParentId()));
franchiseeDO.setCityCode(String.valueOf(openAreaInfoDO.getId()));
//todo 操作人工号 暂时写死
franchiseeDO.setOperator("22090043");
MemberQuestionDO memberQuestionDO = joinIntentionMapper.getByLineId(lineInfoDO.getId());
//如果是企业加盟,需要传有效期和法人
if (Objects.nonNull(memberQuestionDO) && Constants.TWO_INTEGER.equals(memberQuestionDO.getJoinType())){
SigningBaseInfoDO signingBaseInfoDO = intentAgreementMapper.selectByPartnerIdOrLineId(null,lineInfoDO.getId());
BusinessLicenseInfoVO businessLicenseInfo = aliyunService.getBusinessLicenseInfo(signingBaseInfoDO.getBusinessLicense());
franchiseeDO.setBusinessTerm(businessLicenseInfo.getValidPeriod());
franchiseeDO.setLegalPerson(businessLicenseInfo.getLegalPerson());
}
InitiatingResponse initiatingResponse = httpRestTemplateService.postForObject(url, franchiseeDO, InitiatingResponse.class);
//更新线索(进入蓄水池并回填加盟商编码)
if (initiatingResponse.getCode() == 0) {

View File

@@ -103,6 +103,7 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(), userId);
//更新加盟问卷信息
joinIntentionMapper.updateAuditIdByLineId(auditId, lineInfo.getId());
commonService.sendSms(lineInfo.getMobile(),SMSMsgEnum.INTERVIEW_APPOINTMENT_SUCCESS);
return Boolean.TRUE;
}

View File

@@ -103,7 +103,7 @@ public class LinePayServiceImpl implements LinePayService {
requestMap.put("partnerName",lineInfo.getUsername());
requestMap.put("partnerMobile",lineInfo.getMobile());
requestMap.put("lineId",String.valueOf(lineInfo.getId()));
commonService.sendMessage(Arrays.asList(lineInfo.getInvestmentManager()), MessageEnum.MESSAGE_20,requestMap);
commonService.sendMessage(Arrays.asList(lineInfo.getInvestmentManager()), MessageEnum.MESSAGE_18,requestMap);
}
if (PayBusinessTypeEnum.INTENT_MONEY.getCode().equals(request.getPayBusinessType())) {
lineInfo.setWorkflowSubStage(WorkflowSubStageEnum.PAY_DEPOSIT.getCode());

View File

@@ -272,7 +272,7 @@ public class LineServiceImpl implements LineService {
if (lineInfo==null){
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
}
lineInfo.setUpdateUserId(user.getUserId());
lineInfo.setUserPortrait(CollectionUtils.isNotEmpty(addTagsRequest.getTags())?
addTagsRequest.getTags().stream().map(Object::toString).collect(Collectors.joining(CommonConstants.COMMA, CommonConstants.COMMA, CommonConstants.COMMA)):"");
lineInfoDAO.updateLineInfo(lineInfo);

View File

@@ -12,6 +12,7 @@ import com.cool.store.exception.ServiceException;
import com.cool.store.request.*;
import com.cool.store.service.*;
import com.cool.store.utils.RedisUtilPool;
import com.cool.store.utils.poi.DateUtils;
import com.cool.store.utils.poi.StringUtils;
import com.cool.store.vo.AuditInfoVO;
import com.cool.store.vo.LinePointBaseInfoVO;
@@ -904,6 +905,12 @@ public class PointServiceImpl implements PointService {
shopRentInfo.setId(rentContract.getId());
shopRentInfoDAO.updateRentContract(shopRentInfo);
}
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(shopSubStageInfo.getLineId());
Map<String, String> messageMap = new HashMap<>();
messageMap.put("lineId", String.valueOf(lineInfo.getId()));
messageMap.put("partnerUsername", lineInfo.getUsername());
messageMap.put("submitTime", DateUtils.parseDateToStr(DateUtils.NOTICE_DATE, new Date()));
commonService.sendMessage(Arrays.asList(lineInfo.getInvestmentManager()), MessageEnum.MESSAGE_15, messageMap);
return shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_21);
}
@@ -953,7 +960,11 @@ public class PointServiceImpl implements PointService {
updateShop.setId(shopId);
updateShop.setShopStage(ShopStageEnum.SHOP_STAGE_2.getShopStage());
List<UserRoleEnum> roleList = Arrays.asList(UserRoleEnum.THEATER_MANAGER, UserRoleEnum.OPERATIONS_MANAGER, UserRoleEnum.REGION_MANAGER);
updateShop.setShopManagerUserId(sysRoleService.getUserIdByRegionIdWithRolePriority(shopInfo.getRegionId(), roleList));
String shopManagerUserId = sysRoleService.getUserIdByRegionIdWithRolePriority(shopInfo.getRegionId(), roleList);
if(StringUtils.isBlank(shopManagerUserId)){
shopManagerUserId = CommonConstants.DEAULT_SHOP_MANAGER_USER_ID;
}
updateShop.setShopManagerUserId(shopManagerUserId);
shopInfoDAO.updateShopInfo(updateShop);
//发送验证码
commonService.sendSms(lineInfo.getMobile(),SMSMsgEnum.LICENSE_SUBMITTED);

View File

@@ -203,12 +203,12 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
.hkbzj(Integer.valueOf(franchiseFeeDO.getLoanMargin()))
.hkbzjdx(Integer.valueOf(franchiseFeeDO.getLoanMargin()))
.hkbzjwb(Convert.digitToChinese(Integer.valueOf(franchiseFeeDO.getLoanMargin())))
.ht_day(DateTime.of(request.getContractStartTime()).getDay())
.ht_day2(DateTime.of(request.getContractStartEndTime()).getDay())
.ht_month1(DateTime.of(request.getContractStartTime()).getMonth())
.ht_month2(DateTime.of(request.getContractStartEndTime()).getMonth())
.ht_year1(DateTime.of(request.getContractStartTime()).getYear())
.ht_year2(DateTime.of(request.getContractStartEndTime()).getYear())
.ht_day(timeUtils(request.getContractStartTime(),"day"))
.ht_day2(timeUtils(request.getContractStartEndTime(),"day"))
.ht_month1(timeUtils(request.getContractStartTime(),"month"))
.ht_month2(timeUtils(request.getContractStartEndTime(),",month"))
.ht_year1(timeUtils(request.getContractStartTime(),"year"))
.ht_year2(timeUtils(request.getContractStartEndTime(),"year"))
.idcard_1(Collections.singletonList(signingBaseInfoDO.getIdCardFront()))
.idcard_2(Collections.singletonList(signingBaseInfoDO.getIdCardReverse()))
.idcard_address(signingBaseInfoDO.getIdCardAddress())
@@ -225,26 +225,26 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
.jmf2(Integer.valueOf(franchiseFeeDO.getFirstYearFee()))
.jmf3(Integer.valueOf(franchiseFeeDO.getSecondYearFee()))
.jmf4(Integer.valueOf(franchiseFeeDO.getThirdYearFee()))
.jmfday1(DateTime.of(franchiseFeeDO.getFirstYearStartTime()).getDay())
.jmfday2(DateTime.of(franchiseFeeDO.getFirstYearEndTime()).getDay())
.jmfday3(DateTime.of(franchiseFeeDO.getSecondYearStartTime()).getDay())
.jmfday4(DateTime.of(franchiseFeeDO.getSecondYearEndTime()).getDay())
.jmfday5(DateTime.of(franchiseFeeDO.getThirdYearStartTime()).getDay())
.jmfday6(DateTime.of(franchiseFeeDO.getThirdYearEndTime()).getDay())
.jmfday1(timeUtils(franchiseFeeDO.getFirstYearStartTime(),"day"))
.jmfday2(timeUtils(franchiseFeeDO.getFirstYearEndTime(),"day"))
.jmfday3(timeUtils(franchiseFeeDO.getSecondYearStartTime(),"day"))
.jmfday4(timeUtils(franchiseFeeDO.getSecondYearEndTime(),"day"))
.jmfday5(timeUtils(franchiseFeeDO.getThirdYearStartTime(),"day"))
.jmfday6(timeUtils(franchiseFeeDO.getThirdYearEndTime(),"day"))
.jmfdx(Integer.valueOf(franchiseFeeDO.getYearFranchiseFee()))
.jmfmonth1(DateTime.of(franchiseFeeDO.getFirstYearStartTime()).getMonth())
.jmfmonth2(DateTime.of(franchiseFeeDO.getFirstYearEndTime()).getMonth())
.jmfmonth3(DateTime.of(franchiseFeeDO.getSecondYearStartTime()).getMonth())
.jmfmonth4(DateTime.of(franchiseFeeDO.getSecondYearEndTime()).getMonth())
.jmfmonth5(DateTime.of(franchiseFeeDO.getThirdYearStartTime()).getMonth())
.jmfmonth6(DateTime.of(franchiseFeeDO.getThirdYearEndTime()).getMonth())
.jmfmonth1(timeUtils(franchiseFeeDO.getFirstYearStartTime(),"month"))
.jmfmonth2(timeUtils(franchiseFeeDO.getFirstYearEndTime(),"month"))
.jmfmonth3(timeUtils(franchiseFeeDO.getSecondYearStartTime(),"month"))
.jmfmonth4(timeUtils(franchiseFeeDO.getSecondYearEndTime(),"month"))
.jmfmonth5(timeUtils(franchiseFeeDO.getThirdYearStartTime(),"month"))
.jmfmonth6(timeUtils(franchiseFeeDO.getThirdYearEndTime(),"month"))
.jmfwb(Convert.digitToChinese(Integer.valueOf(franchiseFeeDO.getYearFranchiseFee())))
.jmfyear1(DateTime.of(franchiseFeeDO.getFirstYearStartTime()).getYear())
.jmfyear2(DateTime.of(franchiseFeeDO.getFirstYearEndTime()).getYear())
.jmfyear3(DateTime.of(franchiseFeeDO.getSecondYearStartTime()).getYear())
.jmfyear4(DateTime.of(franchiseFeeDO.getSecondYearEndTime()).getYear())
.jmfyear5(DateTime.of(franchiseFeeDO.getThirdYearStartTime()).getYear())
.jmfyear6(DateTime.of(franchiseFeeDO.getThirdYearEndTime()).getYear())
.jmfyear1(timeUtils(franchiseFeeDO.getFirstYearStartTime(),"year"))
.jmfyear2(timeUtils(franchiseFeeDO.getFirstYearEndTime(),"year"))
.jmfyear3(timeUtils(franchiseFeeDO.getSecondYearStartTime(),"year"))
.jmfyear4(timeUtils(franchiseFeeDO.getSecondYearEndTime(),"year"))
.jmfyear5(timeUtils(franchiseFeeDO.getThirdYearStartTime(),"year"))
.jmfyear6(timeUtils(franchiseFeeDO.getThirdYearEndTime(),"year"))
.jmsdkjt(temp)
.jmsdm(lineInfoDO.getPartnerNum())
.jmshtzt(0)
@@ -291,6 +291,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
.yyzzfyj(temp)
.zhihang(linePayDO.getBranchBankName())
.zqyty(SignTypeEnum.getWorkflowStageByCode(request.getSignType()).getSap())
.fddbr(licenseTransactDO.getLicenseLegalPerson())
.build();
}
@@ -420,8 +421,24 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
@Override
@Transactional(rollbackFor = Exception.class)
public Boolean rePay(Long shopId) {
shopStageInfoDAO.updateShopStageInfo(shopId,ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_71);
shopStageInfoDAO.updateShopStageToNotStarted(shopId, ShopSubStageEnum.SHOP_STAGE_7);
shopStageInfoDAO.updateShopStageInfo(shopId,ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_74);
shopStageInfoDAO.updateShopStageToNotStarted(shopId, ShopSubStageEnum.SHOP_STAGE_8);
return true;
}
private int timeUtils(Date time, String type) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(time);
switch (type){
case "year":
return calendar.get(Calendar.YEAR);
case "month":
return calendar.get(Calendar.MONTH) + 1;
case "day":
return calendar.get(Calendar.DAY_OF_MONTH);
default:
return 0;
}
}
}

View File

@@ -2,10 +2,7 @@ package com.cool.store.service.impl;
import com.cool.store.dao.*;
import com.cool.store.dto.ehr.StaffBaseInfoDTO;
import com.cool.store.entity.EnterpriseUserDO;
import com.cool.store.entity.ShopInfoDO;
import com.cool.store.entity.ShopStageInfoDO;
import com.cool.store.entity.TempUserDetailDO;
import com.cool.store.entity.*;
import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.enums.MessageEnum;
import com.cool.store.enums.UserRoleEnum;
@@ -59,6 +56,9 @@ public class TempUserDetailServiceImpl implements TempUserDetailService {
@Autowired
private PreparationService preparationService;
@Autowired
private RegionDao regionDao;
@Override
public TempUserDetailListVO userList(Long shopId) {
List<TempUserDetailDO> tempUserDetailDOList = tempUserDetailDAO.userList(shopId);
@@ -138,8 +138,9 @@ public class TempUserDetailServiceImpl implements TempUserDetailService {
}
List<String> userIdList = enterpriseUserRoleDao.getUserIdsByRoleIdList(Collections.singletonList(UserRoleEnum.TRAINER.getCode()));
RegionDO regionDO = regionDao.getRegionById(shopInfoDO.getRegionId());
//
userIdList = enterpriseUserDAO.getUserIdListByRegionId(shopInfoDO.getRegionId(), userIdList);
userIdList = enterpriseUserDAO.getUserIdListByRegionId(Long.valueOf(regionDO.getParentId()), userIdList);
Map<String, String> messageMap = new HashMap<>();
messageMap.put("userName", tempUserDetailRequest.getName());

View File

@@ -69,14 +69,14 @@ public class TrainingExperienceServiceImpl extends LineFlowService implements Tr
leaseBaseInfoDO.setExperienceStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_85.getCode());
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_85.getCode());
//message
Map<String, String> requestMap = new HashMap<>();
LineInfoDO byLineId = lineInfoMapper.getByLineId(request.getLineId());
requestMap.put("partnerUsername",byLineId.getUsername());
requestMap.put("partnerMobile",byLineId.getMobile());
requestMap.put("lineId",String.valueOf(request.getLineId()));
commonService.sendMessage(Collections.singletonList(byLineId.getInvestmentManager()),
MessageEnum.MESSAGE_32,
requestMap);
// Map<String, String> requestMap = new HashMap<>();
// LineInfoDO byLineId = lineInfoMapper.getByLineId(request.getLineId());
// requestMap.put("partnerUsername",byLineId.getUsername());
// requestMap.put("partnerMobile",byLineId.getMobile());
// requestMap.put("lineId",String.valueOf(request.getLineId()));
// commonService.sendMessage(Collections.singletonList(byLineId.getInvestmentManager()),
// MessageEnum.MESSAGE_32,
// requestMap);
} else if (currentDate.after(request.getExperienceStartTime()) || currentDate.before(request.getExperienceEndTime())) {
leaseBaseInfoDO.setExperienceStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_90.getCode());
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_90.getCode());