Merge remote-tracking branch 'origin/cc_partner_init' into cc_partner_init
This commit is contained in:
@@ -26,4 +26,7 @@ public enum UserRoleEnum {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,11 +22,11 @@ public interface UserAuthMappingService {
|
||||
|
||||
/**
|
||||
* 提供 根据职位 意向区域 查 对应人的接口 同时返回人名字
|
||||
* @param roleId
|
||||
* @param roleName
|
||||
* @param wantShopAreaId
|
||||
* @return
|
||||
*/
|
||||
EnterpriseUserDO listUserByRoleIdAndAreaId(Long roleId, Long wantShopAreaId);
|
||||
EnterpriseUserDO getUserByRoleNameAndAreaId(String roleName, Long wantShopAreaId);
|
||||
|
||||
/**
|
||||
* 根据 人 查 这个人管辖区域 对应的意向区域省市code 团队线索
|
||||
|
||||
@@ -3,14 +3,8 @@ package com.cool.store.service.impl;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.cool.store.dao.EnterpriseUserDAO;
|
||||
import com.cool.store.dao.RegionAreaConfigDao;
|
||||
import com.cool.store.entity.EnterpriseUserDO;
|
||||
import com.cool.store.entity.RegionAreaConfigDO;
|
||||
import com.cool.store.entity.RegionDO;
|
||||
import com.cool.store.entity.UserAuthMappingDO;
|
||||
import com.cool.store.enums.AuthRoleEnum;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.Role;
|
||||
import com.cool.store.enums.UserAuthMappingTypeEnum;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.*;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.RegionMapper;
|
||||
import com.cool.store.mapper.SysRoleMapper;
|
||||
@@ -63,15 +57,22 @@ public class UserAuthMappingServiceImpl implements UserAuthMappingService {
|
||||
|
||||
/**
|
||||
* 提供 根据职位 意向区域 查 对应人的接口 同时返回人名字
|
||||
* @param roleId
|
||||
* @param roleName
|
||||
* @param wantShopAreaId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public EnterpriseUserDO listUserByRoleIdAndAreaId(Long roleId, Long wantShopAreaId) {
|
||||
if(roleId == null || wantShopAreaId == null){
|
||||
public EnterpriseUserDO getUserByRoleNameAndAreaId(String roleName, Long wantShopAreaId) {
|
||||
if(StringUtils.isBlank(roleName) || wantShopAreaId == null){
|
||||
return null;
|
||||
}
|
||||
List<SysRoleDO> roleList = sysRoleMapper.getRolesByName(roleName);
|
||||
if (CollectionUtils.isEmpty(roleList)) {
|
||||
if(UserRoleEnum.INVESTMENT_MANAGER.getDesc().equals(roleName)){
|
||||
// 找大区经理 找不到找战区经理,再找不到找大区经理?
|
||||
}
|
||||
}
|
||||
Long roleId = roleList.get(0).getId();
|
||||
Long warRegionId = regionAreaConfigDao.getByWantShopAreaId(wantShopAreaId);
|
||||
// 查找有战区权限的人
|
||||
List<String> authWarRegionUserIdList = authWarRegionUser(warRegionId);
|
||||
|
||||
Reference in New Issue
Block a user