Merge remote-tracking branch 'origin/cc_20250211_v2.6' into cc_20250211_v2.6

This commit is contained in:
苏竹红
2025-02-19 16:26:36 +08:00
12 changed files with 137 additions and 80 deletions

View File

@@ -75,6 +75,7 @@ public enum MessageEnum {
MESSAGE_47("您有一个门店已提交快手建店资料,请查收","门店名称:${storeName}\n加盟商姓名${partnerUsername}\n加盟商手机号码${partnerMobile}\n"), MESSAGE_47("您有一个门店已提交快手建店资料,请查收","门店名称:${storeName}\n加盟商姓名${partnerUsername}\n加盟商手机号码${partnerMobile}\n"),
MESSAGE_48("您有一个门店饿了么初审已通过,请查收","门店名称:${storeName}\n加盟商姓名${partnerUsername}\n加盟商手机号码${partnerMobile}\n"), MESSAGE_48("您有一个门店饿了么初审已通过,请查收","门店名称:${storeName}\n加盟商姓名${partnerUsername}\n加盟商手机号码${partnerMobile}\n"),
MESSAGE_49("您有一个门店美团外卖初审已通过,请查收","门店名称:${storeName}\n加盟商姓名${partnerUsername}\n加盟商手机号码${partnerMobile}\n"), MESSAGE_49("您有一个门店美团外卖初审已通过,请查收","门店名称:${storeName}\n加盟商姓名${partnerUsername}\n加盟商手机号码${partnerMobile}\n"),
MESSAGE_50("您有一个门店开业运营方案审核未通过,请查收","门店名称:${storeName}\n加盟商姓名${partnerUsername}\n加盟商手机号码${partnerMobile}\n"),
; ;

View File

@@ -5,13 +5,8 @@ import com.alibaba.fastjson.JSONObject;
import com.cool.store.context.CurrentUserHolder; import com.cool.store.context.CurrentUserHolder;
import com.cool.store.context.LoginUserInfo; import com.cool.store.context.LoginUserInfo;
import com.cool.store.dao.*; import com.cool.store.dao.*;
import com.cool.store.entity.EnterpriseUserDO; import com.cool.store.entity.*;
import com.cool.store.entity.OpeningOperationPlanDO; import com.cool.store.enums.*;
import com.cool.store.entity.ShopAuditInfoDO;
import com.cool.store.enums.AuditResultTypeEnum;
import com.cool.store.enums.AuditTypeEnum;
import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.enums.OpeningOperationPlanResultTypeEnum;
import com.cool.store.enums.point.ShopSubStageStatusEnum; import com.cool.store.enums.point.ShopSubStageStatusEnum;
import com.cool.store.exception.ServiceException; import com.cool.store.exception.ServiceException;
import com.cool.store.request.OpeningOperationPlanAuditRequest; import com.cool.store.request.OpeningOperationPlanAuditRequest;
@@ -21,6 +16,9 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service; 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 java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Objects; import java.util.Objects;
/** /**
@@ -42,6 +40,12 @@ public class AuditOpeningOperationPlanImpl implements AuditOpeningOperationPlanS
private PreparationService preparationService; private PreparationService preparationService;
@Resource @Resource
private ShopAuditInfoDAO shopAuditInfoDAO; private ShopAuditInfoDAO shopAuditInfoDAO;
@Resource
private LineInfoDAO lineInfoDAO;
@Resource
private ShopInfoDAO shopInfoDAO;
@Resource
private CommonService commonService;
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@@ -67,7 +71,16 @@ public class AuditOpeningOperationPlanImpl implements AuditOpeningOperationPlanS
shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_143; shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_143;
flag = Boolean.TRUE; flag = Boolean.TRUE;
}else { }else {
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfo.getLineId());
shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_142; shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_142;
HashMap<String, String> map = new HashMap<>();
map.put("partnerUsername",lineInfoDO.getUsername());
map.put("partnerMobile",lineInfoDO.getMobile());
map.put("storeName",shopInfo.getShopName());
commonService.sendQWMessage(Collections.singletonList(shopInfo.getInvestmentManager()),
MessageEnum.MESSAGE_50,
map);
} }
shopStageInfoDAO.updateShopStageAndAuditInfo(request.getShopId(), shopStageInfoDAO.updateShopStageAndAuditInfo(request.getShopId(),
shopSubStageStatusEnum, auditId); shopSubStageStatusEnum, auditId);

View File

@@ -113,22 +113,34 @@ public class BuildInformationServiceImpl implements BuildInformationService{
map.put("partnerMobile",lineInfoDO.getMobile()); map.put("partnerMobile",lineInfoDO.getMobile());
map.put("storeName",shopInfoDO.getShopName()); map.put("storeName",shopInfoDO.getShopName());
List<EnterpriseUserDO> itList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.IT_EMPLOYEE, shopInfoDO.getRegionId()); List<EnterpriseUserDO> itList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.IT_EMPLOYEE, shopInfoDO.getRegionId());
List<String> itUsers = itList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()); List<String> itUsers = new ArrayList<>();
if (!itList.isEmpty()){
itUsers.addAll(itList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
}
commonService.sendQWMessage(itUsers, commonService.sendQWMessage(itUsers,
MessageEnum.MESSAGE_39, MessageEnum.MESSAGE_39,
map); map);
List<EnterpriseUserDO> posList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.HUO_MA_EMPLOYEE, shopInfoDO.getRegionId()); List<EnterpriseUserDO> posList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.HUO_MA_EMPLOYEE, shopInfoDO.getRegionId());
List<String> posUsers = posList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()); List<String> posUsers = new ArrayList<>();
if (!posList.isEmpty()){
posUsers.addAll( posList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
}
commonService.sendQWMessage(posUsers, commonService.sendQWMessage(posUsers,
MessageEnum.MESSAGE_38, MessageEnum.MESSAGE_38,
map); map);
List<EnterpriseUserDO> xfList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.XIN_FA_SYS_CUSTOMER, shopInfoDO.getRegionId()); List<EnterpriseUserDO> xfList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.XIN_FA_SYS_CUSTOMER, shopInfoDO.getRegionId());
List<String> xfUsers = xfList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()); List<String> xfUsers = new ArrayList<>();
if(!xfList.isEmpty()){
xfUsers.addAll(xfList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
}
commonService.sendQWMessage(xfUsers, commonService.sendQWMessage(xfUsers,
MessageEnum.MESSAGE_40, MessageEnum.MESSAGE_40,
map); map);
List<EnterpriseUserDO> zxtList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.TENT_PASS_CUSTOMER, shopInfoDO.getRegionId()); List<EnterpriseUserDO> zxtList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.TENT_PASS_CUSTOMER, shopInfoDO.getRegionId());
List<String> zxtUsers = xfList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()); List<String> zxtUsers = new ArrayList<>();
if(!zxtList.isEmpty()){
zxtUsers.addAll(zxtList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
}
commonService.sendQWMessage(zxtUsers, commonService.sendQWMessage(zxtUsers,
MessageEnum.MESSAGE_41, MessageEnum.MESSAGE_41,
map); map);

View File

@@ -188,10 +188,12 @@ public class CommonService {
public void sendQWMessage(List<String> userIds, MessageEnum message, Map<String, String> requestMap){ public void sendQWMessage(List<String> userIds, MessageEnum message, Map<String, String> requestMap){
log.info("message:{}, request:{}, userIds:{}", message.getTitle(), JSONObject.toJSONString(requestMap), JSONObject.toJSONString(userIds)); log.info("message:{}, request:{}, userIds:{}", message.getTitle(), JSONObject.toJSONString(requestMap), JSONObject.toJSONString(userIds));
if(CollectionUtils.isEmpty(userIds)){ if(CollectionUtils.isEmpty(userIds)){
log.info("消息接收人列表为空");
return; return;
} }
userIds = userIds.stream().filter(StringUtils::isNotBlank).collect(Collectors.toList()); userIds = userIds.stream().filter(StringUtils::isNotBlank).collect(Collectors.toList());
if(CollectionUtils.isEmpty(userIds)){ if(CollectionUtils.isEmpty(userIds)){
log.info("消息接收人列表为空");
return; return;
} }
try { try {

View File

@@ -134,7 +134,9 @@ public class DecorationServiceImpl implements DecorationService {
} }
//预算 //预算
BudgetDTO proposedBookBudget = getBudgetDTOS(decoration); BudgetDTO proposedBookBudget = getBudgetDTOS(decoration);
if (proposedBookBudget == null) {return null;} if (proposedBookBudget == null) {
return null;
}
BigDecimal vzHj = proposedBookBudget.getVzHj(); BigDecimal vzHj = proposedBookBudget.getVzHj();
//支付二维码url //支付二维码url
DecorationModelDTO decorationModelDTO = new DecorationModelDTO(); DecorationModelDTO decorationModelDTO = new DecorationModelDTO();
@@ -364,11 +366,14 @@ public class DecorationServiceImpl implements DecorationService {
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId()); ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId()); LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
HashMap<String, String> map = new HashMap<>(); HashMap<String, String> map = new HashMap<>();
map.put("partnerUsername",lineInfoDO.getUsername()); map.put("partnerUsername", lineInfoDO.getUsername());
map.put("partnerMobile",lineInfoDO.getMobile()); map.put("partnerMobile", lineInfoDO.getMobile());
map.put("storeName",shopInfoDO.getShopName()); map.put("storeName", shopInfoDO.getShopName());
List<EnterpriseUserDO> userDOList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.ENGINEER_DEP_SUPERVISOR, shopInfoDO.getRegionId()); List<EnterpriseUserDO> userDOList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.ENGINEER_DEP_SUPERVISOR, shopInfoDO.getRegionId());
List<String> userIds = userDOList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()); List<String> userIds = new ArrayList<>();
if (!userDOList.isEmpty()) {
userIds.addAll(userDOList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
}
commonService.sendQWMessage(userIds, commonService.sendQWMessage(userIds,
MessageEnum.MESSAGE_37, MessageEnum.MESSAGE_37,
map); map);
@@ -390,7 +395,7 @@ public class DecorationServiceImpl implements DecorationService {
List<fitmentCheckVO> fitmentCheckVOList = new ArrayList<>(); List<fitmentCheckVO> fitmentCheckVOList = new ArrayList<>();
//shopId,lineid,regionid,shopname,storenum, //shopId,lineid,regionid,shopname,storenum,
List<ShopInfoDO> shopInfoDOS = shopInfoMapper.selectShopListByRegionId(regions, ShopSubStageEnum.SHOP_STAGE_12.getShopSubStage(),request.getSubStageStatus(),null); List<ShopInfoDO> shopInfoDOS = shopInfoMapper.selectShopListByRegionId(regions, ShopSubStageEnum.SHOP_STAGE_12.getShopSubStage(), request.getSubStageStatus(), null);
PageInfo pageInfo = new PageInfo<>(shopInfoDOS); PageInfo pageInfo = new PageInfo<>(shopInfoDOS);
if (shopInfoDOS.isEmpty()) { if (shopInfoDOS.isEmpty()) {
log.info("该工程部监理下门店为空"); log.info("该工程部监理下门店为空");
@@ -461,7 +466,7 @@ public class DecorationServiceImpl implements DecorationService {
} }
} }
if (Objects.nonNull(ShopStageInfoDOMap.get(shopId))) { if (Objects.nonNull(ShopStageInfoDOMap.get(shopId))) {
fitmentCheckVO.setShopSubStageStatus(ShopStageInfoDOMap.getOrDefault(shopId,new ShopStageInfoDO()).getShopSubStageStatus()); fitmentCheckVO.setShopSubStageStatus(ShopStageInfoDOMap.getOrDefault(shopId, new ShopStageInfoDO()).getShopSubStageStatus());
} }
fitmentCheckVOList.add(fitmentCheckVO); fitmentCheckVOList.add(fitmentCheckVO);
} }
@@ -528,25 +533,25 @@ public class DecorationServiceImpl implements DecorationService {
//重复提交校验 3秒内不能重复提交 //重复提交校验 3秒内不能重复提交
String lockKey = "submitDecorationDesign:" + request.getShopId(); String lockKey = "submitDecorationDesign:" + request.getShopId();
String lockValue = UUID.randomUUID().toString(); String lockValue = UUID.randomUUID().toString();
boolean acquired = redisUtilPool.setNxExpire(lockKey, lockValue, CommonConstants.THREE*CommonConstants.ONE_SECONDS); boolean acquired = redisUtilPool.setNxExpire(lockKey, lockValue, CommonConstants.THREE * CommonConstants.ONE_SECONDS);
if (!acquired){ if (!acquired) {
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION); throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
} }
//校验参数 //校验参数
if (Objects.isNull(request)||request.getShopId()==null){ if (Objects.isNull(request) || request.getShopId() == null) {
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED); throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
} }
//必须是待提交状态才能提交 //必须是待提交状态才能提交
ShopStageInfoDO shopStageInfo = shopStageInfoDAO.getByShopIdAndSubStage(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_9.getShopSubStage()); ShopStageInfoDO shopStageInfo = shopStageInfoDAO.getByShopIdAndSubStage(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_9.getShopSubStage());
if (shopStageInfo!=null&&!ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_90.getShopSubStageStatus().equals(shopStageInfo.getShopSubStageStatus())) { if (shopStageInfo != null && !ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_90.getShopSubStageStatus().equals(shopStageInfo.getShopSubStageStatus())) {
throw new ServiceException(ErrorCodeEnum.STATUS_NOT_SUPPORT_SUMMIT); throw new ServiceException(ErrorCodeEnum.STATUS_NOT_SUPPORT_SUMMIT);
} }
DecorationDesignInfoDO decorationDesignInfoDO = request.toDecorationDesignInfoDO(); DecorationDesignInfoDO decorationDesignInfoDO = request.toDecorationDesignInfoDO();
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(request.getShopId()); DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(request.getShopId());
if (Objects.nonNull(decoration)){ if (Objects.nonNull(decoration)) {
decorationDesignInfoDO.setId(decoration.getId()); decorationDesignInfoDO.setId(decoration.getId());
decorationDesignInfoDAO.updateByPrimaryKeySelective(decorationDesignInfoDO); decorationDesignInfoDAO.updateByPrimaryKeySelective(decorationDesignInfoDO);
}else { } else {
decorationDesignInfoDAO.insertSelective(decorationDesignInfoDO); decorationDesignInfoDAO.insertSelective(decorationDesignInfoDO);
} }
//更新装修设计状态 //更新装修设计状态
@@ -555,17 +560,17 @@ public class DecorationServiceImpl implements DecorationService {
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfo.getLineId()); LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfo.getLineId());
Map<String, String> templateParam = new HashMap<>(); Map<String, String> templateParam = new HashMap<>();
templateParam.put("shopName", shopInfo.getShopName()); templateParam.put("shopName", shopInfo.getShopName());
commonService.sendSms(lineInfo.getMobile(),SMSMsgEnum.DESIGN_STAGE,templateParam); commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.DESIGN_STAGE, templateParam);
return Boolean.TRUE; return Boolean.TRUE;
} }
@Override @Override
public DecorationDesignVO getDecorationDesign(Long shopId) { public DecorationDesignVO getDecorationDesign(Long shopId) {
if (shopId==null){ if (shopId == null) {
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED); throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
} }
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(shopId); DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(shopId);
if (!Objects.isNull(decoration)){ if (!Objects.isNull(decoration)) {
DecorationDesignVO decorationDesignVO = new DecorationDesignVO(); DecorationDesignVO decorationDesignVO = new DecorationDesignVO();
decorationDesignVO.setDesignUrl(decoration.getDesignUrl()); decorationDesignVO.setDesignUrl(decoration.getDesignUrl());
decorationDesignVO.setRemark(decoration.getRemark()); decorationDesignVO.setRemark(decoration.getRemark());
@@ -581,17 +586,17 @@ public class DecorationServiceImpl implements DecorationService {
public Boolean submitConstructionData(ConstructionRequest request, LoginUserInfo user) { public Boolean submitConstructionData(ConstructionRequest request, LoginUserInfo user) {
String lockKey = "submitConstructionData:" + request.getShopId(); String lockKey = "submitConstructionData:" + request.getShopId();
String lockValue = UUID.randomUUID().toString(); String lockValue = UUID.randomUUID().toString();
boolean acquired = redisUtilPool.setNxExpire(lockKey, lockValue, CommonConstants.THREE*CommonConstants.ONE_SECONDS); boolean acquired = redisUtilPool.setNxExpire(lockKey, lockValue, CommonConstants.THREE * CommonConstants.ONE_SECONDS);
if (!acquired){ if (!acquired) {
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION); throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
} }
//校验参数 //校验参数
if (Objects.isNull(request)||request.getShopId()==null){ if (Objects.isNull(request) || request.getShopId() == null) {
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED); throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
} }
//必须是待提交状态才能提交 //必须是待提交状态才能提交
ShopStageInfoDO shopStageInfo = shopStageInfoDAO.getByShopIdAndSubStage(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_11.getShopSubStage()); ShopStageInfoDO shopStageInfo = shopStageInfoDAO.getByShopIdAndSubStage(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_11.getShopSubStage());
if (shopStageInfo!=null&&!ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_110.getShopSubStageStatus().equals(shopStageInfo.getShopSubStageStatus())) { if (shopStageInfo != null && !ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_110.getShopSubStageStatus().equals(shopStageInfo.getShopSubStageStatus())) {
throw new ServiceException(ErrorCodeEnum.STATUS_NOT_SUPPORT_SUMMIT); throw new ServiceException(ErrorCodeEnum.STATUS_NOT_SUPPORT_SUMMIT);
} }
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(request.getShopId()); DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(request.getShopId());
@@ -611,16 +616,16 @@ public class DecorationServiceImpl implements DecorationService {
public ConstructionDataVO getConstructionData(Long shopId) { public ConstructionDataVO getConstructionData(Long shopId) {
ConstructionDataVO constructionDataVO = new ConstructionDataVO(); ConstructionDataVO constructionDataVO = new ConstructionDataVO();
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(shopId); DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(shopId);
if (Objects.isNull(decoration)){ if (Objects.isNull(decoration)) {
return constructionDataVO; return constructionDataVO;
} }
constructionDataVO.setConstructionAnnex(decoration.getConstructionAnnex()); constructionDataVO.setConstructionAnnex(decoration.getConstructionAnnex());
constructionDataVO.setConstructionRemark(decoration.getConstructionRemark()); constructionDataVO.setConstructionRemark(decoration.getConstructionRemark());
constructionDataVO.setConstructionPlanStartTime(decoration.getConstructionPlanStartTime()!=null?decoration.getConstructionPlanStartTime().getTime():null); constructionDataVO.setConstructionPlanStartTime(decoration.getConstructionPlanStartTime() != null ? decoration.getConstructionPlanStartTime().getTime() : null);
constructionDataVO.setConstructionPlanEndTime(decoration.getConstructionPlanEndTime()!=null?decoration.getConstructionPlanEndTime().getTime():null); constructionDataVO.setConstructionPlanEndTime(decoration.getConstructionPlanEndTime() != null ? decoration.getConstructionPlanEndTime().getTime() : null);
constructionDataVO.setConstructionCreateTime(decoration.getConstructionCreateTime()!=null?decoration.getConstructionCreateTime().getTime():null); constructionDataVO.setConstructionCreateTime(decoration.getConstructionCreateTime() != null ? decoration.getConstructionCreateTime().getTime() : null);
constructionDataVO.setConstructionCreateUser(decoration.getConstructionCreateUser()); constructionDataVO.setConstructionCreateUser(decoration.getConstructionCreateUser());
if (StringUtils.isNotEmpty(decoration.getConstructionCreateUser())){ if (StringUtils.isNotEmpty(decoration.getConstructionCreateUser())) {
EnterpriseUserDO user = enterpriseUserDAO.getUserInfoById(decoration.getConstructionCreateUser()); EnterpriseUserDO user = enterpriseUserDAO.getUserInfoById(decoration.getConstructionCreateUser());
constructionDataVO.setConstructionCreateUserName(user.getName()); constructionDataVO.setConstructionCreateUserName(user.getName());
} }
@@ -633,13 +638,13 @@ public class DecorationServiceImpl implements DecorationService {
//重复提交校验 3秒内不能重复提交 //重复提交校验 3秒内不能重复提交
String lockKey = "confirmDesign:" + request.getShopId(); String lockKey = "confirmDesign:" + request.getShopId();
String lockValue = UUID.randomUUID().toString(); String lockValue = UUID.randomUUID().toString();
boolean acquired = redisUtilPool.setNxExpire(lockKey, lockValue, CommonConstants.THREE*CommonConstants.ONE_SECONDS); boolean acquired = redisUtilPool.setNxExpire(lockKey, lockValue, CommonConstants.THREE * CommonConstants.ONE_SECONDS);
if (!acquired){ if (!acquired) {
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION); throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
} }
DecorationDesignInfoDO decorationDesignInfoDO = request.toDecorationDesignInfoDO(); DecorationDesignInfoDO decorationDesignInfoDO = request.toDecorationDesignInfoDO();
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(request.getShopId()); DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(request.getShopId());
if (Objects.nonNull(decoration)){ if (Objects.nonNull(decoration)) {
decorationDesignInfoDO.setId(decoration.getId()); decorationDesignInfoDO.setId(decoration.getId());
decorationDesignInfoDAO.updateByPrimaryKeySelective(decorationDesignInfoDO); decorationDesignInfoDAO.updateByPrimaryKeySelective(decorationDesignInfoDO);
} }
@@ -648,9 +653,9 @@ public class DecorationServiceImpl implements DecorationService {
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId()); ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfo.getLineId()); LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfo.getLineId());
HashMap<String, String> map = new HashMap<>(); HashMap<String, String> map = new HashMap<>();
map.put("partnerUsername",lineInfoDO.getUsername()); map.put("partnerUsername", lineInfoDO.getUsername());
map.put("partnerMobile",lineInfoDO.getMobile()); map.put("partnerMobile", lineInfoDO.getMobile());
map.put("storeName",shopInfo.getShopName()); map.put("storeName", shopInfo.getShopName());
commonService.sendQWMessage(Collections.singletonList(shopInfo.getInvestmentManager()), commonService.sendQWMessage(Collections.singletonList(shopInfo.getInvestmentManager()),
MessageEnum.MESSAGE_36, MessageEnum.MESSAGE_36,
map); map);
@@ -662,11 +667,11 @@ public class DecorationServiceImpl implements DecorationService {
public Boolean confirmComplete(Long shopId, LoginUserInfo user) { public Boolean confirmComplete(Long shopId, LoginUserInfo user) {
//判断施工阶段是否时施工中 施工中才能施工完成 //判断施工阶段是否时施工中 施工中才能施工完成
ShopStageInfoDO shopStageInfoDO = shopStageInfoDAO.getByShopIdAndSubStage(shopId, ShopSubStageEnum.SHOP_STAGE_11.getShopSubStage()); ShopStageInfoDO shopStageInfoDO = shopStageInfoDAO.getByShopIdAndSubStage(shopId, ShopSubStageEnum.SHOP_STAGE_11.getShopSubStage());
if (shopStageInfoDO!=null && !ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_111.getShopSubStageStatus().equals(shopStageInfoDO.getShopSubStageStatus())){ if (shopStageInfoDO != null && !ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_111.getShopSubStageStatus().equals(shopStageInfoDO.getShopSubStageStatus())) {
throw new ServiceException(ErrorCodeEnum.DESIGN_NO_COMPLETE); throw new ServiceException(ErrorCodeEnum.DESIGN_NO_COMPLETE);
} }
AcceptanceInfoDO acceptance = acceptanceInfoDAO.selectByShopId(shopId); AcceptanceInfoDO acceptance = acceptanceInfoDAO.selectByShopId(shopId);
if(Objects.isNull(acceptance)) { if (Objects.isNull(acceptance)) {
AcceptanceInfoDO acceptanceInfoDO = new AcceptanceInfoDO(); AcceptanceInfoDO acceptanceInfoDO = new AcceptanceInfoDO();
acceptanceInfoDO.setShopId(shopId); acceptanceInfoDO.setShopId(shopId);
acceptanceInfoDO.setCreateTime(new Date()); acceptanceInfoDO.setCreateTime(new Date());
@@ -677,7 +682,7 @@ public class DecorationServiceImpl implements DecorationService {
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfo.getLineId()); LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfo.getLineId());
Map<String, String> templateParam = new HashMap<>(); Map<String, String> templateParam = new HashMap<>();
templateParam.put("shopName", shopInfo.getShopName()); templateParam.put("shopName", shopInfo.getShopName());
commonService.sendSms(lineInfo.getMobile(),SMSMsgEnum.CONSTRUCTION_STAGE,templateParam); commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.CONSTRUCTION_STAGE, templateParam);
return Boolean.TRUE; return Boolean.TRUE;
} }

View File

@@ -129,13 +129,13 @@ public class FranchiseFeeServiceImpl implements FranchiseFeeService {
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfoDO.getLineId()); LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
Set<String> franchiseContractUser = new HashSet<>(); Set<String> franchiseContractUser = new HashSet<>();
List<EnterpriseUserDO> joinUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.JOIN_OFFICE, shopInfoDO.getRegionId()); List<EnterpriseUserDO> joinUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.JOIN_OFFICE, shopInfoDO.getRegionId());
Set<String> joinUserIds = joinUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet()); if (!joinUser.isEmpty()) {
if (!joinUserIds.isEmpty()) { Set<String> joinUserIds = joinUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
franchiseContractUser.addAll(joinUserIds); franchiseContractUser.addAll(joinUserIds);
} }
List<EnterpriseUserDO> regionUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_OFFICE, shopInfoDO.getRegionId()); List<EnterpriseUserDO> regionUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_OFFICE, shopInfoDO.getRegionId());
Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet()); if (!regionUser.isEmpty()) {
if (!regionUserIds.isEmpty()) { Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
franchiseContractUser.addAll(regionUserIds); franchiseContractUser.addAll(regionUserIds);
} }
HashMap<String, String> map = new HashMap<>(); HashMap<String, String> map = new HashMap<>();

View File

@@ -163,17 +163,16 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
Set<String>publishFranchiseFeeUsers = new HashSet<>(); Set<String>publishFranchiseFeeUsers = new HashSet<>();
for (Long regionId : regionIds){ for (Long regionId : regionIds){
List<EnterpriseUserDO> joinUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.JOIN_OFFICE, regionId); List<EnterpriseUserDO> joinUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.JOIN_OFFICE, regionId);
Set<String> joinUserIds = joinUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet()); if (!joinUser.isEmpty()){
if (!joinUserIds.isEmpty()){ Set<String> joinUserIds = joinUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
publishFranchiseFeeUsers.addAll(joinUserIds); publishFranchiseFeeUsers.addAll(joinUserIds);
} }
List<EnterpriseUserDO> regionUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_OFFICE, regionId); List<EnterpriseUserDO> regionUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_OFFICE, regionId);
Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet()); if (!regionUser.isEmpty()){
if (!regionUserIds.isEmpty()){ Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
publishFranchiseFeeUsers.addAll(regionUserIds); publishFranchiseFeeUsers.addAll(regionUserIds);
} }
} }
HashMap<String, String> map = new HashMap<>(); HashMap<String, String> map = new HashMap<>();
map.put("partnerUsername", lineInfo.getUsername()); map.put("partnerUsername", lineInfo.getUsername());
map.put("partnerMobile", lineInfo.getMobile()); map.put("partnerMobile", lineInfo.getMobile());

View File

@@ -157,13 +157,13 @@ public class LinePayServiceImpl implements LinePayService {
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(franchiseFeeDO.getShopId()); ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(franchiseFeeDO.getShopId());
Set<String> auditFranchiseFeeUsers = new HashSet<>(); Set<String> auditFranchiseFeeUsers = new HashSet<>();
List<EnterpriseUserDO> branchUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.BRANCH_OFFICE, shopInfoDO.getRegionId()); List<EnterpriseUserDO> branchUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.BRANCH_OFFICE, shopInfoDO.getRegionId());
Set<String> branchUserIds = branchUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet()); if (!branchUser.isEmpty()) {
if (!branchUserIds.isEmpty()) { Set<String> branchUserIds = branchUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
auditFranchiseFeeUsers.addAll(branchUserIds); auditFranchiseFeeUsers.addAll(branchUserIds);
} }
List<EnterpriseUserDO> regionUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_OFFICE, shopInfoDO.getRegionId()); List<EnterpriseUserDO> regionUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_OFFICE, shopInfoDO.getRegionId());
Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet()); if (!regionUser.isEmpty()) {
if (!regionUserIds.isEmpty()) { Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
auditFranchiseFeeUsers.addAll(regionUserIds); auditFranchiseFeeUsers.addAll(regionUserIds);
} }
HashMap<String, String> map = new HashMap<>(); HashMap<String, String> map = new HashMap<>();

View File

@@ -107,15 +107,16 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfoDO.getLineId()); LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfoDO.getLineId());
Set<String> planAuditUser = new HashSet<>(); Set<String> planAuditUser = new HashSet<>();
List<EnterpriseUserDO> regionManagerUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_MANAGER, shopInfoDO.getRegionId()); List<EnterpriseUserDO> regionManagerUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_MANAGER, shopInfoDO.getRegionId());
Set<String> regionManagerUserIds = regionManagerUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet()); if (!regionManagerUser.isEmpty()){
if (!regionManagerUserIds.isEmpty()) { Set<String> regionManagerUserIds = regionManagerUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
planAuditUser.addAll(regionManagerUserIds); planAuditUser.addAll(regionManagerUserIds);
} }
List<EnterpriseUserDO> regionalManager = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGIONAL_MANAGER, shopInfoDO.getRegionId()); List<EnterpriseUserDO> regionalManager = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGIONAL_MANAGER, shopInfoDO.getRegionId());
Set<String> regionalManagerUserIds = regionalManager.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet()); if (!regionalManager.isEmpty()){
if (!regionalManagerUserIds.isEmpty()) { Set<String> regionalManagerUserIds = regionalManager.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
planAuditUser.addAll(regionalManagerUserIds); planAuditUser.addAll(regionalManagerUserIds);
} }
HashMap<String, String> map = new HashMap<>(); HashMap<String, String> map = new HashMap<>();
map.put("partnerUsername",lineInfoDO.getUsername()); map.put("partnerUsername",lineInfoDO.getUsername());
map.put("partnerMobile",lineInfoDO.getMobile()); map.put("partnerMobile",lineInfoDO.getMobile());

View File

@@ -111,7 +111,10 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE); throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
} }
List<EnterpriseUserDO> dyCustomerUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.DOU_YIN_CUSTOMER, regionId); List<EnterpriseUserDO> dyCustomerUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.DOU_YIN_CUSTOMER, regionId);
List<String> dyCustomerUserIds = dyCustomerUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()); List<String> dyCustomerUserIds =new ArrayList<>();
if(!dyCustomerUser.isEmpty()){
dyCustomerUserIds.addAll(dyCustomerUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
}
commonService.sendQWMessage(dyCustomerUserIds, commonService.sendQWMessage(dyCustomerUserIds,
MessageEnum.MESSAGE_43, MessageEnum.MESSAGE_43,
map); map);
@@ -132,7 +135,10 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE); throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
} }
List<EnterpriseUserDO> ksUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.KUAI_SHOU_CUSTOMER, regionId); List<EnterpriseUserDO> ksUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.KUAI_SHOU_CUSTOMER, regionId);
List<String> ksUserIds = ksUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()); List<String> ksUserIds =new ArrayList<>();
if(!ksUser.isEmpty()){
ksUserIds.addAll(ksUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
}
commonService.sendQWMessage(ksUserIds, commonService.sendQWMessage(ksUserIds,
MessageEnum.MESSAGE_47, MessageEnum.MESSAGE_47,
map); map);
@@ -153,7 +159,10 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE); throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
} }
List<EnterpriseUserDO> mtbcUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.MEI_TUAN_BUY_CUSTOMER, regionId); List<EnterpriseUserDO> mtbcUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.MEI_TUAN_BUY_CUSTOMER, regionId);
List<String> mtbcUserIds = mtbcUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()); List<String> mtbcUserIds =new ArrayList<>();
if(!mtbcUser.isEmpty()){
mtbcUserIds.addAll(mtbcUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
}
commonService.sendQWMessage(mtbcUserIds, commonService.sendQWMessage(mtbcUserIds,
MessageEnum.MESSAGE_45, MessageEnum.MESSAGE_45,
map); map);
@@ -174,7 +183,10 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE); throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
} }
List<EnterpriseUserDO> elmUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.E_L_ME_TUAN_OPERATIONS_CUSTOMER, regionId); List<EnterpriseUserDO> elmUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.E_L_ME_TUAN_OPERATIONS_CUSTOMER, regionId);
List<String> elmUserIds = elmUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()); List<String> elmUserIds =new ArrayList<>();
if(!elmUser.isEmpty()){
elmUserIds.addAll(elmUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
}
commonService.sendQWMessage(elmUserIds, commonService.sendQWMessage(elmUserIds,
MessageEnum.MESSAGE_46, MessageEnum.MESSAGE_46,
map); map);
@@ -195,7 +207,10 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE); throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
} }
List<EnterpriseUserDO> mtocUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.MEI_TUAN_OPERATIONS_CUSTOMER, regionId); List<EnterpriseUserDO> mtocUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.MEI_TUAN_OPERATIONS_CUSTOMER, regionId);
List<String> mtocUserIds = mtocUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()); List<String> mtocUserIds =new ArrayList<>();
if(!mtocUser.isEmpty()){
mtocUserIds.addAll(mtocUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
}
commonService.sendQWMessage(mtocUserIds, commonService.sendQWMessage(mtocUserIds,
MessageEnum.MESSAGE_44, MessageEnum.MESSAGE_44,
map); map);
@@ -402,7 +417,10 @@ public Integer firstAudit(PlatformBuildAuditRequest request) {
doThing(platformBuildDO, request, shopAuditInfoDO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_211, SHOP_SUB_STAGE_STATUS_213, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_214); doThing(platformBuildDO, request, shopAuditInfoDO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_211, SHOP_SUB_STAGE_STATUS_213, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_214);
if (request.getResultType().equals(AuditResultTypeEnum.PASS.getCode())) { if (request.getResultType().equals(AuditResultTypeEnum.PASS.getCode())) {
List<EnterpriseUserDO> elmUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.E_L_ME_HEADQUARTERS_BUILD_CUSTOMER, regionId); List<EnterpriseUserDO> elmUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.E_L_ME_HEADQUARTERS_BUILD_CUSTOMER, regionId);
List<String> elmUserIds = elmUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()); List<String> elmUserIds = new ArrayList<>();
if(!elmUser.isEmpty()){
elmUserIds.addAll(elmUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
}
operationLogService.addOperationLog(shopId, SHOP_SUB_STAGE_STATUS_213, request.getOperateUserId(), operationLogService.addOperationLog(shopId, SHOP_SUB_STAGE_STATUS_213, request.getOperateUserId(),
elmUser, OperationTypeEnum.OPERATION_TYPE_1, null, OperationStatusEnum.NOT_PROCESSED); elmUser, OperationTypeEnum.OPERATION_TYPE_1, null, OperationStatusEnum.NOT_PROCESSED);
commonService.sendQWMessage(elmUserIds, commonService.sendQWMessage(elmUserIds,
@@ -421,7 +439,10 @@ public Integer firstAudit(PlatformBuildAuditRequest request) {
doThing(platformBuildDO, request, shopAuditInfoDO, shopId, SHOP_SUB_STAGE_STATUS_191, SHOP_SUB_STAGE_STATUS_193, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_194); doThing(platformBuildDO, request, shopAuditInfoDO, shopId, SHOP_SUB_STAGE_STATUS_191, SHOP_SUB_STAGE_STATUS_193, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_194);
if (request.getResultType().equals(AuditResultTypeEnum.PASS.getCode())) { if (request.getResultType().equals(AuditResultTypeEnum.PASS.getCode())) {
List<EnterpriseUserDO> mtwmUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.MEI_TUAN_HEADQUARTERS_BUILD_CUSTOMER, regionId); List<EnterpriseUserDO> mtwmUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.MEI_TUAN_HEADQUARTERS_BUILD_CUSTOMER, regionId);
List<String> mtwmUserIds = mtwmUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()); List<String> mtwmUserIds = new ArrayList<>();
if (!mtwmUser.isEmpty()){
mtwmUserIds.addAll( mtwmUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
}
commonService.sendQWMessage(mtwmUserIds, commonService.sendQWMessage(mtwmUserIds,
MessageEnum.MESSAGE_49, MessageEnum.MESSAGE_49,
map); map);

View File

@@ -120,13 +120,13 @@ public class ShopServiceImpl implements ShopService {
Integer result = shopStageInfoDAO.initShopStageInfo(lineInfo.getId(), shopIds, true); Integer result = shopStageInfoDAO.initShopStageInfo(lineInfo.getId(), shopIds, true);
Set<String> publishFranchiseFeeUsers = new HashSet<>(); Set<String> publishFranchiseFeeUsers = new HashSet<>();
List<EnterpriseUserDO> joinUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.JOIN_OFFICE, lineInfo.getRegionId()); List<EnterpriseUserDO> joinUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.JOIN_OFFICE, lineInfo.getRegionId());
Set<String> joinUserIds = joinUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet()); if (!joinUser.isEmpty()) {
if (!joinUserIds.isEmpty()) { Set<String> joinUserIds = joinUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
publishFranchiseFeeUsers.addAll(joinUserIds); publishFranchiseFeeUsers.addAll(joinUserIds);
} }
List<EnterpriseUserDO> regionUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_OFFICE, lineInfo.getRegionId()); List<EnterpriseUserDO> regionUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_OFFICE, lineInfo.getRegionId());
Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet()); if (!regionUser.isEmpty()) {
if (!regionUserIds.isEmpty()) { Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
publishFranchiseFeeUsers.addAll(regionUserIds); publishFranchiseFeeUsers.addAll(regionUserIds);
} }
HashMap<String, String> map = new HashMap<>(); HashMap<String, String> map = new HashMap<>();
@@ -301,13 +301,13 @@ public class ShopServiceImpl implements ShopService {
map.put("partnerMobile", lineInfo.getMobile()); map.put("partnerMobile", lineInfo.getMobile());
Set<String> publishFranchiseFeeUsers = new HashSet<>(); Set<String> publishFranchiseFeeUsers = new HashSet<>();
List<EnterpriseUserDO> joinUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.JOIN_OFFICE, request.getRegionId()); List<EnterpriseUserDO> joinUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.JOIN_OFFICE, request.getRegionId());
Set<String> joinUserIds = joinUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet()); if (!joinUser.isEmpty()) {
if (!joinUserIds.isEmpty()) { Set<String> joinUserIds = joinUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
publishFranchiseFeeUsers.addAll(joinUserIds); publishFranchiseFeeUsers.addAll(joinUserIds);
} }
List<EnterpriseUserDO> regionUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_OFFICE, request.getRegionId()); List<EnterpriseUserDO> regionUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_OFFICE, request.getRegionId());
Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet()); if (!regionUser.isEmpty()) {
if (!regionUserIds.isEmpty()) { Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
publishFranchiseFeeUsers.addAll(regionUserIds); publishFranchiseFeeUsers.addAll(regionUserIds);
} }
commonService.sendQWMessage(Collections.singletonList(request.getInvestmentManagerUserId()), commonService.sendQWMessage(Collections.singletonList(request.getInvestmentManagerUserId()),

View File

@@ -181,7 +181,10 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
map.put("partnerMobile",lineInfoDO.getMobile()); map.put("partnerMobile",lineInfoDO.getMobile());
map.put("storeName",shopInfoDO.getShopName()); map.put("storeName",shopInfoDO.getShopName());
List<EnterpriseUserDO> userDOList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.FINANCE, shopInfoDO.getRegionId()); List<EnterpriseUserDO> userDOList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.FINANCE, shopInfoDO.getRegionId());
List<String> finances = userDOList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()); List<String> finances = new ArrayList<>();
if (!userDOList.isEmpty()){
finances.addAll(userDOList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList())) ;
}
commonService.sendQWMessage(finances, commonService.sendQWMessage(finances,
MessageEnum.MESSAGE_34, MessageEnum.MESSAGE_34,
map); map);