add 企微通知
This commit is contained in:
@@ -68,7 +68,13 @@ public enum MessageEnum {
|
|||||||
MESSAGE_40("您有一个门店信发系统信息待提交,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
MESSAGE_40("您有一个门店信发系统信息待提交,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||||
MESSAGE_41("您有一个门店营帐通信息待提交,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
MESSAGE_41("您有一个门店营帐通信息待提交,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||||
MESSAGE_42("您有一个门店开业运营方案待审核,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
MESSAGE_42("您有一个门店开业运营方案待审核,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||||
|
MESSAGE_43("您有一个门店已提交抖音建店资料,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||||
|
MESSAGE_44("您有一个门店已提交美团外卖建店资料,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||||
|
MESSAGE_45("您有一个门店已提交美团团购建店资料,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||||
|
MESSAGE_46("您有一个门店已提交饿了么建店资料,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||||
|
MESSAGE_47("您有一个门店已提交快手建店资料,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||||
|
MESSAGE_48("您有一个门店饿了么初审已通过,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||||
|
MESSAGE_49("您有一个门店美团外卖初审已通过,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
@@ -43,8 +43,13 @@ public enum UserRoleEnum {
|
|||||||
TENT_PASS_CUSTOMER(380000000L,"营帐通客服"),
|
TENT_PASS_CUSTOMER(380000000L,"营帐通客服"),
|
||||||
DESIGN_CUSTOMER(390000000L,"设计客服"),
|
DESIGN_CUSTOMER(390000000L,"设计客服"),
|
||||||
CONSTRUCTION_CUSTOMER(400000000L,"施工客服"),
|
CONSTRUCTION_CUSTOMER(400000000L,"施工客服"),
|
||||||
BRANCH_OFFICE(1724233283449L,"分布内勤"),
|
BRANCH_OFFICE(1724233283449L,"分部内勤"),
|
||||||
|
JOIN_OFFICE(1719278230274L,"加盟内勤"),
|
||||||
|
REGION_OFFICE(1725431635706L,"大区内勤"),
|
||||||
FINANCE(1735895867344L,"财务"),
|
FINANCE(1735895867344L,"财务"),
|
||||||
|
CHUAN_XIAO_MEI_MANAGER(1731635078802L,"串小妹大区执行总经理"),
|
||||||
|
REGIONAL_MANAGER(1716252923436L,"大区经理"),
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
private Long code;
|
private Long code;
|
||||||
|
|||||||
@@ -117,9 +117,6 @@ public class BuildInformationServiceImpl implements BuildInformationService{
|
|||||||
commonService.sendQWMessage(itUsers,
|
commonService.sendQWMessage(itUsers,
|
||||||
MessageEnum.MESSAGE_39,
|
MessageEnum.MESSAGE_39,
|
||||||
map);
|
map);
|
||||||
commonService.sendQWMessage(itUsers,
|
|
||||||
MessageEnum.MESSAGE_40,
|
|
||||||
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 = posList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||||
commonService.sendQWMessage(posUsers,
|
commonService.sendQWMessage(posUsers,
|
||||||
@@ -130,6 +127,11 @@ public class BuildInformationServiceImpl implements BuildInformationService{
|
|||||||
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<String> zxtUsers = xfList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||||
|
commonService.sendQWMessage(zxtUsers,
|
||||||
|
MessageEnum.MESSAGE_41,
|
||||||
|
map);
|
||||||
return buildInformationDAO.insertSelective(buildInformationDO);
|
return buildInformationDAO.insertSelective(buildInformationDO);
|
||||||
}else {
|
}else {
|
||||||
buildInformationDO.setUpdateTime(new Date());
|
buildInformationDO.setUpdateTime(new Date());
|
||||||
|
|||||||
@@ -4,10 +4,7 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import com.cool.store.context.LoginUserInfo;
|
import com.cool.store.context.LoginUserInfo;
|
||||||
import com.cool.store.dao.ShopStageInfoDAO;
|
import com.cool.store.dao.ShopStageInfoDAO;
|
||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.enums.AuditTypeEnum;
|
import com.cool.store.enums.*;
|
||||||
import com.cool.store.enums.ErrorCodeEnum;
|
|
||||||
import com.cool.store.enums.MessageEnum;
|
|
||||||
import com.cool.store.enums.SMSMsgEnum;
|
|
||||||
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.mapper.*;
|
import com.cool.store.mapper.*;
|
||||||
@@ -15,6 +12,7 @@ import com.cool.store.request.AuditFranchiseFeeRequest;
|
|||||||
import com.cool.store.request.FranchiseFeeRequest;
|
import com.cool.store.request.FranchiseFeeRequest;
|
||||||
import com.cool.store.response.FranchiseFeeResponse;
|
import com.cool.store.response.FranchiseFeeResponse;
|
||||||
import com.cool.store.service.FranchiseFeeService;
|
import com.cool.store.service.FranchiseFeeService;
|
||||||
|
import com.cool.store.service.UserAuthMappingService;
|
||||||
import com.cool.store.utils.poi.constant.Constants;
|
import com.cool.store.utils.poi.constant.Constants;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -23,6 +21,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@@ -48,6 +47,8 @@ public class FranchiseFeeServiceImpl implements FranchiseFeeService {
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
CommonService commonService;
|
CommonService commonService;
|
||||||
|
@Resource
|
||||||
|
UserAuthMappingService userAuthMappingService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@@ -126,11 +127,22 @@ public class FranchiseFeeServiceImpl implements FranchiseFeeService {
|
|||||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_80);
|
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_80);
|
||||||
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
|
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
|
||||||
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
||||||
|
Set<String> franchiseContractUser = new HashSet<>();
|
||||||
|
List<EnterpriseUserDO> joinUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.JOIN_OFFICE, shopInfoDO.getRegionId());
|
||||||
|
Set<String> joinUserIds = joinUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||||
|
if (!joinUserIds.isEmpty()) {
|
||||||
|
franchiseContractUser.addAll(joinUserIds);
|
||||||
|
}
|
||||||
|
List<EnterpriseUserDO> regionUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_OFFICE, shopInfoDO.getRegionId());
|
||||||
|
Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||||
|
if (!regionUserIds.isEmpty()) {
|
||||||
|
franchiseContractUser.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());
|
||||||
map.put("storeName",shopInfoDO.getShopName());
|
map.put("storeName",shopInfoDO.getShopName());
|
||||||
commonService.sendQWMessage(Collections.singletonList(shopInfoDO.getInvestmentManager()),
|
commonService.sendQWMessage(new ArrayList<>(franchiseContractUser),
|
||||||
MessageEnum.MESSAGE_19,
|
MessageEnum.MESSAGE_19,
|
||||||
map);
|
map);
|
||||||
} else if (Constants.ONE_INTEGER.equals(request.getStatus())) {
|
} else if (Constants.ONE_INTEGER.equals(request.getStatus())) {
|
||||||
|
|||||||
@@ -158,14 +158,29 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
|||||||
Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_10,
|
Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_10,
|
||||||
ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_50, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_70));
|
ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_50, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_70));
|
||||||
List<ShopInfoDO> shopListByIds = shopInfoDAO.getShopListByIds(shopIds);
|
List<ShopInfoDO> shopListByIds = shopInfoDAO.getShopListByIds(shopIds);
|
||||||
|
Set<Long> regionIds = shopListByIds.stream().map(ShopInfoDO::getRegionId).collect(Collectors.toSet());
|
||||||
Set<String> userSet = shopListByIds.stream().map(ShopInfoDO::getInvestmentManager).collect(Collectors.toSet());
|
Set<String> userSet = shopListByIds.stream().map(ShopInfoDO::getInvestmentManager).collect(Collectors.toSet());
|
||||||
|
Set<String>publishFranchiseFeeUsers = new HashSet<>();
|
||||||
|
for (Long regionId : regionIds){
|
||||||
|
List<EnterpriseUserDO> joinUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.JOIN_OFFICE, regionId);
|
||||||
|
Set<String> joinUserIds = joinUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||||
|
if (!joinUserIds.isEmpty()){
|
||||||
|
publishFranchiseFeeUsers.addAll(joinUserIds);
|
||||||
|
}
|
||||||
|
List<EnterpriseUserDO> regionUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_OFFICE, regionId);
|
||||||
|
Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||||
|
if (!regionUserIds.isEmpty()){
|
||||||
|
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());
|
||||||
commonService.sendQWMessage(new ArrayList<>(userSet),
|
commonService.sendQWMessage(new ArrayList<>(userSet),
|
||||||
MessageEnum.MESSAGE_14,
|
MessageEnum.MESSAGE_14,
|
||||||
map);
|
map);
|
||||||
commonService.sendQWMessage(new ArrayList<>(userSet),
|
commonService.sendQWMessage(new ArrayList<>(publishFranchiseFeeUsers),
|
||||||
MessageEnum.MESSAGE_23,
|
MessageEnum.MESSAGE_23,
|
||||||
map);
|
map);
|
||||||
commonService.sendQWMessage(new ArrayList<>(userSet),
|
commonService.sendQWMessage(new ArrayList<>(userSet),
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import com.cool.store.mapper.LineInfoMapper;
|
|||||||
import com.cool.store.mapper.ShopInfoMapper;
|
import com.cool.store.mapper.ShopInfoMapper;
|
||||||
import com.cool.store.request.LinePaySubmitRequest;
|
import com.cool.store.request.LinePaySubmitRequest;
|
||||||
import com.cool.store.service.LinePayService;
|
import com.cool.store.service.LinePayService;
|
||||||
|
import com.cool.store.service.UserAuthMappingService;
|
||||||
import com.cool.store.utils.RedisUtilPool;
|
import com.cool.store.utils.RedisUtilPool;
|
||||||
import com.cool.store.utils.poi.DateUtils;
|
import com.cool.store.utils.poi.DateUtils;
|
||||||
import com.cool.store.utils.poi.StringUtils;
|
import com.cool.store.utils.poi.StringUtils;
|
||||||
@@ -38,6 +39,7 @@ import javax.annotation.Resource;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author wxp
|
* @Author wxp
|
||||||
@@ -69,6 +71,8 @@ public class LinePayServiceImpl implements LinePayService {
|
|||||||
ShopInfoMapper shopInfoMapper;
|
ShopInfoMapper shopInfoMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private RedisUtilPool redisUtilPool;
|
private RedisUtilPool redisUtilPool;
|
||||||
|
@Resource
|
||||||
|
private UserAuthMappingService userAuthMappingService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public LinePayVO getLinePayInfo(Long lineId, Integer businessType, Long shopId) {
|
public LinePayVO getLinePayInfo(Long lineId, Integer businessType, Long shopId) {
|
||||||
@@ -151,11 +155,22 @@ public class LinePayServiceImpl implements LinePayService {
|
|||||||
franchiseFeeMapper.updateByPrimaryKeySelective(franchiseFeeDO);
|
franchiseFeeMapper.updateByPrimaryKeySelective(franchiseFeeDO);
|
||||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_72);
|
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_72);
|
||||||
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(franchiseFeeDO.getShopId());
|
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(franchiseFeeDO.getShopId());
|
||||||
|
Set<String> auditFranchiseFeeUsers = new HashSet<>();
|
||||||
|
List<EnterpriseUserDO> branchUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.BRANCH_OFFICE, shopInfoDO.getRegionId());
|
||||||
|
Set<String> branchUserIds = branchUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||||
|
if (!branchUserIds.isEmpty()) {
|
||||||
|
auditFranchiseFeeUsers.addAll(branchUserIds);
|
||||||
|
}
|
||||||
|
List<EnterpriseUserDO> regionUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_OFFICE, shopInfoDO.getRegionId());
|
||||||
|
Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||||
|
if (!regionUserIds.isEmpty()) {
|
||||||
|
auditFranchiseFeeUsers.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());
|
||||||
map.put("storeName",shopInfoDO.getShopName());
|
map.put("storeName",shopInfoDO.getShopName());
|
||||||
commonService.sendQWMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
commonService.sendQWMessage(new ArrayList<>(auditFranchiseFeeUsers),
|
||||||
MessageEnum.MESSAGE_18,
|
MessageEnum.MESSAGE_18,
|
||||||
map);
|
map);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,12 +105,23 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
|
|||||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_141);
|
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_141);
|
||||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
||||||
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfoDO.getLineId());
|
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfoDO.getLineId());
|
||||||
|
Set<String> planAuditUser = new HashSet<>();
|
||||||
|
List<EnterpriseUserDO> regionManagerUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_MANAGER, shopInfoDO.getRegionId());
|
||||||
|
Set<String> regionManagerUserIds = regionManagerUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||||
|
if (!regionManagerUserIds.isEmpty()) {
|
||||||
|
planAuditUser.addAll(regionManagerUserIds);
|
||||||
|
}
|
||||||
|
List<EnterpriseUserDO> regionalManager = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGIONAL_MANAGER, shopInfoDO.getRegionId());
|
||||||
|
Set<String> regionalManagerUserIds = regionalManager.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||||
|
if (!regionalManagerUserIds.isEmpty()) {
|
||||||
|
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());
|
||||||
map.put("storeName",shopInfoDO.getShopName());
|
map.put("storeName",shopInfoDO.getShopName());
|
||||||
commonService.sendQWMessage(Collections.singletonList(shopInfoDO.getInvestmentManager()),
|
commonService.sendQWMessage(new ArrayList<>(planAuditUser),
|
||||||
MessageEnum.MESSAGE_38,
|
MessageEnum.MESSAGE_42,
|
||||||
map);
|
map);
|
||||||
return planId;
|
return planId;
|
||||||
|
|
||||||
|
|||||||
@@ -78,7 +78,8 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
|||||||
private PointInfoDAO pointInfoDAO;
|
private PointInfoDAO pointInfoDAO;
|
||||||
@Autowired
|
@Autowired
|
||||||
private RegionMapper regionMapper;
|
private RegionMapper regionMapper;
|
||||||
|
@Resource
|
||||||
|
private CommonService commonService;
|
||||||
@Override
|
@Override
|
||||||
public String juridicalIdCard(Long shopId) {
|
public String juridicalIdCard(Long shopId) {
|
||||||
BuildInformationDO informationDO = buildInformationDAO.selectOneByShopId(shopId);
|
BuildInformationDO informationDO = buildInformationDAO.selectOneByShopId(shopId);
|
||||||
@@ -97,6 +98,11 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
|||||||
PlatformBuildDO platformBuild = request.toDO();
|
PlatformBuildDO platformBuild = request.toDO();
|
||||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||||
Long regionId = shopInfo.getRegionId();
|
Long regionId = shopInfo.getRegionId();
|
||||||
|
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfo.getLineId());
|
||||||
|
HashMap<String, String> map = new HashMap<>();
|
||||||
|
map.put("partnerUsername",lineInfoDO.getUsername());
|
||||||
|
map.put("partnerMobile",lineInfoDO.getMobile());
|
||||||
|
map.put("storeName",shopInfo.getShopName());
|
||||||
//抖音
|
//抖音
|
||||||
if (type.equals(PlatformBuildEnum.DOU_YIN.getCode())) {
|
if (type.equals(PlatformBuildEnum.DOU_YIN.getCode())) {
|
||||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_18);
|
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_18);
|
||||||
@@ -104,12 +110,17 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
|||||||
&& !shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_182.getShopSubStageStatus())) {
|
&& !shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_182.getShopSubStageStatus())) {
|
||||||
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<String> dyCustomerUserIds = dyCustomerUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||||
|
commonService.sendQWMessage(dyCustomerUserIds,
|
||||||
|
MessageEnum.MESSAGE_43,
|
||||||
|
map);
|
||||||
if (Objects.isNull(platformBuildDO)) {
|
if (Objects.isNull(platformBuildDO)) {
|
||||||
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_180, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_181,
|
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_180, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_181,
|
||||||
userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.DOU_YIN_CUSTOMER, regionId));
|
dyCustomerUser);
|
||||||
} else {
|
} else {
|
||||||
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_182, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_181,
|
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_182, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_181,
|
||||||
userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.DOU_YIN_CUSTOMER, regionId));
|
dyCustomerUser);
|
||||||
return platformBuildDAO.updateByShopIdAndTypeSelective(platformBuild);
|
return platformBuildDAO.updateByShopIdAndTypeSelective(platformBuild);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -120,12 +131,17 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
|||||||
&& !shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_222.getShopSubStageStatus())) {
|
&& !shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_222.getShopSubStageStatus())) {
|
||||||
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<String> ksUserIds = ksUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||||
|
commonService.sendQWMessage(ksUserIds,
|
||||||
|
MessageEnum.MESSAGE_47,
|
||||||
|
map);
|
||||||
if (Objects.isNull(platformBuildDO)) {
|
if (Objects.isNull(platformBuildDO)) {
|
||||||
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_220, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_221,
|
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_220, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_221,
|
||||||
userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.KUAI_SHOU_CUSTOMER, regionId));
|
ksUser);
|
||||||
} else {
|
} else {
|
||||||
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_222, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_221,
|
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_222, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_221,
|
||||||
userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.KUAI_SHOU_CUSTOMER, regionId));
|
ksUser);
|
||||||
return platformBuildDAO.updateByShopIdAndTypeSelective(platformBuild);
|
return platformBuildDAO.updateByShopIdAndTypeSelective(platformBuild);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -136,12 +152,17 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
|||||||
&& !shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_202.getShopSubStageStatus())) {
|
&& !shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_202.getShopSubStageStatus())) {
|
||||||
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<String> mtbcUserIds = mtbcUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||||
|
commonService.sendQWMessage(mtbcUserIds,
|
||||||
|
MessageEnum.MESSAGE_45,
|
||||||
|
map);
|
||||||
if (Objects.isNull(platformBuildDO)) {
|
if (Objects.isNull(platformBuildDO)) {
|
||||||
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_200, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_201,
|
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_200, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_201,
|
||||||
userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.MEI_TUAN_BUY_CUSTOMER, regionId));
|
mtbcUser);
|
||||||
} else {
|
} else {
|
||||||
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_202, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_201,
|
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_202, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_201,
|
||||||
userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.MEI_TUAN_BUY_CUSTOMER, regionId));
|
mtbcUser);
|
||||||
return platformBuildDAO.updateByShopIdAndTypeSelective(platformBuild);
|
return platformBuildDAO.updateByShopIdAndTypeSelective(platformBuild);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -152,12 +173,17 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
|||||||
&& !shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_214.getShopSubStageStatus())) {
|
&& !shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_214.getShopSubStageStatus())) {
|
||||||
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<String> elmUserIds = elmUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||||
|
commonService.sendQWMessage(elmUserIds,
|
||||||
|
MessageEnum.MESSAGE_46,
|
||||||
|
map);
|
||||||
if (Objects.isNull(platformBuildDO)) {
|
if (Objects.isNull(platformBuildDO)) {
|
||||||
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_210, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_211,
|
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_210, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_211,
|
||||||
userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.E_L_ME_TUAN_OPERATIONS_CUSTOMER, regionId));
|
elmUser);
|
||||||
} else {
|
} else {
|
||||||
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_214, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_211,
|
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_214, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_211,
|
||||||
userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.E_L_ME_TUAN_OPERATIONS_CUSTOMER, regionId));
|
elmUser);
|
||||||
return platformBuildDAO.updateByShopIdAndTypeSelective(platformBuild);
|
return platformBuildDAO.updateByShopIdAndTypeSelective(platformBuild);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -168,12 +194,17 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
|||||||
&& !shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_194.getShopSubStageStatus())) {
|
&& !shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_194.getShopSubStageStatus())) {
|
||||||
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<String> mtocUserIds = mtocUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||||
|
commonService.sendQWMessage(mtocUserIds,
|
||||||
|
MessageEnum.MESSAGE_44,
|
||||||
|
map);
|
||||||
if (Objects.isNull(platformBuildDO)) {
|
if (Objects.isNull(platformBuildDO)) {
|
||||||
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_190, SHOP_SUB_STAGE_STATUS_191,
|
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_190, SHOP_SUB_STAGE_STATUS_191,
|
||||||
userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.MEI_TUAN_OPERATIONS_CUSTOMER, regionId));
|
mtocUser);
|
||||||
} else {
|
} else {
|
||||||
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_194, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_191,
|
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_194, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_191,
|
||||||
userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.MEI_TUAN_OPERATIONS_CUSTOMER, regionId));
|
mtocUser);
|
||||||
return platformBuildDAO.updateByShopIdAndTypeSelective(platformBuild);
|
return platformBuildDAO.updateByShopIdAndTypeSelective(platformBuild);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -329,7 +360,12 @@ public Integer firstAudit(PlatformBuildAuditRequest request) {
|
|||||||
Long shopId = request.getShopId();
|
Long shopId = request.getShopId();
|
||||||
PlatformBuildDO platformBuildDO = platformBuildDAO.selectOneByShopId(shopId, type);
|
PlatformBuildDO platformBuildDO = platformBuildDAO.selectOneByShopId(shopId, type);
|
||||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
|
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
|
||||||
|
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfo.getLineId());
|
||||||
Long regionId = shopInfo.getRegionId();
|
Long regionId = shopInfo.getRegionId();
|
||||||
|
HashMap<String, String> map = new HashMap<>();
|
||||||
|
map.put("partnerUsername",lineInfoDO.getUsername());
|
||||||
|
map.put("partnerMobile",lineInfoDO.getMobile());
|
||||||
|
map.put("storeName",shopInfo.getShopName());
|
||||||
if (type.equals(PlatformBuildEnum.DOU_YIN.getCode())) {
|
if (type.equals(PlatformBuildEnum.DOU_YIN.getCode())) {
|
||||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_18);
|
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_18);
|
||||||
if (!shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_181.getShopSubStageStatus())) {
|
if (!shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_181.getShopSubStageStatus())) {
|
||||||
@@ -365,8 +401,13 @@ public Integer firstAudit(PlatformBuildAuditRequest request) {
|
|||||||
ShopAuditInfoDO shopAuditInfoDO = PlatformBuildAuditRequest.convert(request, AuditTypeEnum.E_LE_ME);
|
ShopAuditInfoDO shopAuditInfoDO = PlatformBuildAuditRequest.convert(request, AuditTypeEnum.E_LE_ME);
|
||||||
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<String> elmUserIds = 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(),
|
||||||
userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.E_L_ME_HEADQUARTERS_BUILD_CUSTOMER, regionId), OperationTypeEnum.OPERATION_TYPE_1, null, OperationStatusEnum.NOT_PROCESSED);
|
elmUser, OperationTypeEnum.OPERATION_TYPE_1, null, OperationStatusEnum.NOT_PROCESSED);
|
||||||
|
commonService.sendQWMessage(elmUserIds,
|
||||||
|
MessageEnum.MESSAGE_48,
|
||||||
|
map);
|
||||||
}
|
}
|
||||||
return CommonConstants.ONE;
|
return CommonConstants.ONE;
|
||||||
}
|
}
|
||||||
@@ -379,8 +420,13 @@ public Integer firstAudit(PlatformBuildAuditRequest request) {
|
|||||||
ShopAuditInfoDO shopAuditInfoDO = PlatformBuildAuditRequest.convert(request, AuditTypeEnum.MEI_TUAN_WAI_MAI);
|
ShopAuditInfoDO shopAuditInfoDO = PlatformBuildAuditRequest.convert(request, AuditTypeEnum.MEI_TUAN_WAI_MAI);
|
||||||
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<String> mtwmUserIds = mtwmUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||||
|
commonService.sendQWMessage(mtwmUserIds,
|
||||||
|
MessageEnum.MESSAGE_49,
|
||||||
|
map);
|
||||||
operationLogService.addOperationLog(shopId, SHOP_SUB_STAGE_STATUS_193, request.getOperateUserId(),
|
operationLogService.addOperationLog(shopId, SHOP_SUB_STAGE_STATUS_193, request.getOperateUserId(),
|
||||||
userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.MEI_TUAN_HEADQUARTERS_BUILD_CUSTOMER, regionId), OperationTypeEnum.OPERATION_TYPE_1, null, OperationStatusEnum.NOT_PROCESSED);
|
mtwmUser, OperationTypeEnum.OPERATION_TYPE_1, null, OperationStatusEnum.NOT_PROCESSED);
|
||||||
}
|
}
|
||||||
return CommonConstants.ONE;
|
return CommonConstants.ONE;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,15 +117,25 @@ public class ShopServiceImpl implements ShopService {
|
|||||||
}
|
}
|
||||||
shopInfoDAO.batchAddShop(addShopList);
|
shopInfoDAO.batchAddShop(addShopList);
|
||||||
List<Long> shopIds = addShopList.stream().map(ShopInfoDO::getId).collect(Collectors.toList());
|
List<Long> shopIds = addShopList.stream().map(ShopInfoDO::getId).collect(Collectors.toList());
|
||||||
Integer result = shopStageInfoDAO.initShopStageInfo(lineInfo.getId(), shopIds,true);
|
Integer result = shopStageInfoDAO.initShopStageInfo(lineInfo.getId(), shopIds, true);
|
||||||
|
Set<String> publishFranchiseFeeUsers = new HashSet<>();
|
||||||
|
List<EnterpriseUserDO> joinUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.JOIN_OFFICE, lineInfo.getRegionId());
|
||||||
|
Set<String> joinUserIds = joinUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||||
|
if (!joinUserIds.isEmpty()) {
|
||||||
|
publishFranchiseFeeUsers.addAll(joinUserIds);
|
||||||
|
}
|
||||||
|
List<EnterpriseUserDO> regionUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_OFFICE, lineInfo.getRegionId());
|
||||||
|
Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||||
|
if (!regionUserIds.isEmpty()) {
|
||||||
|
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());
|
||||||
commonService.sendQWMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
commonService.sendQWMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
||||||
MessageEnum.MESSAGE_14,
|
MessageEnum.MESSAGE_14,
|
||||||
map);
|
map);
|
||||||
commonService.sendQWMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
commonService.sendQWMessage(new ArrayList<>(publishFranchiseFeeUsers),
|
||||||
MessageEnum.MESSAGE_23,
|
MessageEnum.MESSAGE_23,
|
||||||
map);
|
map);
|
||||||
commonService.sendQWMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
commonService.sendQWMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
||||||
@@ -268,13 +278,13 @@ public class ShopServiceImpl implements ShopService {
|
|||||||
}
|
}
|
||||||
ShopInfoDO shopInfoDO = request.toDO(request, lineInfo);
|
ShopInfoDO shopInfoDO = request.toDO(request, lineInfo);
|
||||||
List<ShopInfoDO> shopList = shopInfoDAO.getShopList(lineInfo.getId());
|
List<ShopInfoDO> shopList = shopInfoDAO.getShopList(lineInfo.getId());
|
||||||
if(StringUtils.isBlank(request.getShopName())){
|
if (StringUtils.isBlank(request.getShopName())) {
|
||||||
if (CollectionUtils.isNotEmpty(shopList)) {
|
if (CollectionUtils.isNotEmpty(shopList)) {
|
||||||
shopInfoDO.setShopName("店铺"+NumberConverter.convertArabicToChinese(lineInfo.getWantShopNum() + 1));
|
shopInfoDO.setShopName("店铺" + NumberConverter.convertArabicToChinese(lineInfo.getWantShopNum() + 1));
|
||||||
}else{
|
} else {
|
||||||
shopInfoDO.setShopName("店铺"+NumberConverter.convertArabicToChinese(lineInfo.getWantShopNum()));
|
shopInfoDO.setShopName("店铺" + NumberConverter.convertArabicToChinese(lineInfo.getWantShopNum()));
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
shopInfoDO.setShopName(request.getShopName());
|
shopInfoDO.setShopName(request.getShopName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -287,12 +297,23 @@ public class ShopServiceImpl implements ShopService {
|
|||||||
if (lineInfo.getWorkflowSubStageStatus().equals(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_125.getCode())) {
|
if (lineInfo.getWorkflowSubStageStatus().equals(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_125.getCode())) {
|
||||||
shopStageInfoDAO.initShopStageInfo(request.getLineId(), Collections.singletonList(shopId), true);
|
shopStageInfoDAO.initShopStageInfo(request.getLineId(), Collections.singletonList(shopId), true);
|
||||||
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());
|
||||||
|
Set<String> publishFranchiseFeeUsers = new HashSet<>();
|
||||||
|
List<EnterpriseUserDO> joinUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.JOIN_OFFICE, request.getRegionId());
|
||||||
|
Set<String> joinUserIds = joinUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||||
|
if (!joinUserIds.isEmpty()) {
|
||||||
|
publishFranchiseFeeUsers.addAll(joinUserIds);
|
||||||
|
}
|
||||||
|
List<EnterpriseUserDO> regionUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_OFFICE, request.getRegionId());
|
||||||
|
Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||||
|
if (!regionUserIds.isEmpty()) {
|
||||||
|
publishFranchiseFeeUsers.addAll(regionUserIds);
|
||||||
|
}
|
||||||
commonService.sendQWMessage(Collections.singletonList(request.getInvestmentManagerUserId()),
|
commonService.sendQWMessage(Collections.singletonList(request.getInvestmentManagerUserId()),
|
||||||
MessageEnum.MESSAGE_14,
|
MessageEnum.MESSAGE_14,
|
||||||
map);
|
map);
|
||||||
commonService.sendQWMessage(Collections.singletonList(request.getInvestmentManagerUserId()),
|
commonService.sendQWMessage(new ArrayList<>(publishFranchiseFeeUsers),
|
||||||
MessageEnum.MESSAGE_23,
|
MessageEnum.MESSAGE_23,
|
||||||
map);
|
map);
|
||||||
commonService.sendQWMessage(Collections.singletonList(request.getInvestmentManagerUserId()),
|
commonService.sendQWMessage(Collections.singletonList(request.getInvestmentManagerUserId()),
|
||||||
@@ -413,7 +434,7 @@ public class ShopServiceImpl implements ShopService {
|
|||||||
}
|
}
|
||||||
PageHelper.startPage(request.getPageNum(), request.getPageSize());
|
PageHelper.startPage(request.getPageNum(), request.getPageSize());
|
||||||
List<BranchShopResponse> responses = new ArrayList<>();
|
List<BranchShopResponse> responses = new ArrayList<>();
|
||||||
List<PreparationDTO> preparations = shopInfoDAO.ListByBranchShopRequest(request,userId);
|
List<PreparationDTO> preparations = shopInfoDAO.ListByBranchShopRequest(request, userId);
|
||||||
PageInfo pageInfo = new PageInfo<>(preparations);
|
PageInfo pageInfo = new PageInfo<>(preparations);
|
||||||
if (CollectionUtils.isEmpty(preparations)) {
|
if (CollectionUtils.isEmpty(preparations)) {
|
||||||
return new PageInfo<>();
|
return new PageInfo<>();
|
||||||
|
|||||||
Reference in New Issue
Block a user