Commit 01185519 by guojuxing

联合商户列表接口

parent 784ca283
......@@ -35,12 +35,12 @@ public class ResourceGroupDTO implements Serializable{
private Integer customUser;
/**
* 用户域配置,json格式 [{"type":1,"sort":1,"areaValue":"","cuSelectId":""}]
* 用户域配置,json格式 [{"type":1,"sort":1,"areaValue":"","cuSelectId":""}] (前端传递参数)
*/
private String customUserData;
/**
* 用户域配置json转为类
* customUserData用户域配置json转为类(后端业务使用)
*/
private List<ResourceGroupCustomUserDTO> customUserList;
......
......@@ -140,6 +140,13 @@ public interface UserApiService {
ServiceResponse<UserDTO> getUserByEnterpriseId(Integer enterpriseId);
/**
* 查询超管信息
* @param enterpriseIdList
* @return
*/
ServiceResponse<List<UserDTO>> listUserByEnterpriseId(List<Integer> enterpriseIdList);
/**
* 根据登录账号查询商户列
* @Title: listUserByPhoneNumber

* @Description:
......
......@@ -92,6 +92,13 @@ public interface TabSysUserMapper {
TabSysUser selectByEnterpriseId(@Param("enterpriseId") Integer enterpriseId);
/**
* 查询超管数据
* @param enterpriseIdList
* @return
*/
List<TabSysUser> listUserByEnterpriseId(@Param("list") List<Integer> enterpriseIdList);
/**
* listUserByPhoneNumberAndEnterprise
* @Title: listUserByPhoneNumberAndEnterprise
* @Description:
......
......@@ -100,6 +100,13 @@ public interface UserService {
TabSysUser getUserByEnterpriseId(Integer enterpriseId);
/**
* 查询超管信息
* @param enterpriseIdList
* @return
*/
List<TabSysUser> listUserByEnterpriseId(List<Integer> enterpriseIdList);
/**
* listAllUserByPhoneNumber
* @Title: listAllUserByPhoneNumber
* @Description:
......
......@@ -112,6 +112,11 @@ public class UserServiceImpl implements UserService {
}
@Override
public List<TabSysUser> listUserByEnterpriseId(List<Integer> enterpriseIdList) {
return tabSysUserMapper.listUserByEnterpriseId(enterpriseIdList);
}
@Override
public List<TabSysUser> listAllUserByPhoneNumber(String phoneNumber, String nationCode) {
return tabSysUserMapper.listUserByPhoneNumberAndEnterprise(phoneNumber, nationCode, null);
}
......
......@@ -363,10 +363,11 @@ public class MenuApiServiceImpl implements MenuApiService {
if (tabSysUser == null) {
return ServiceResponse.success(new ArrayList<>());
}
if (tabSysUser.getLoginType().intValue() != 0) {
if (tabSysUser.getLoginType() != 0) {
//达摩
tabSysMenuList = filterOperationUserDepartAuth(menuService
.selectAppMenuByParam(projectList, versionList, null), tabSysUser);
} else if (tabSysUser.getSuperAdmin().intValue() == 1) {
} else if (tabSysUser.getSuperAdmin() == 1) {
//超级管理员,包括1和2的权限适用
tabSysMenuList = menuService.selectAppMenuByParam(projectList,
versionList,
......@@ -1489,7 +1490,7 @@ public class MenuApiServiceImpl implements MenuApiService {
if (CollectionUtils.isNotEmpty(resourceList)) {
List<String> resourceCodeList = new ArrayList<>();
for (EnterpriseResourceRelDTO res : resourceList) {
if (res.getResourceSwitch().intValue() == 0) {
if (res.getResourceSwitch() == 0) {
resourceCodeList.add(res.getResourceCode());
}
}
......
......@@ -116,11 +116,7 @@ public class ResourceGroupApiServiceImpl implements ResourceGroupApiService{
if (exist) {
return ServiceResponse.failure(ErrorCode.OPERATION_FAILED.getCode(), "该资源组正在使用中,不能删除");
}
Integer line = resourceGroupService.deleteResourceGroup(resourceGroupId);
if (line > 0) {
// 同步好办
authorizeService.delResource(resourceGroupId.longValue());
}
resourceGroupService.deleteResourceGroup(resourceGroupId);
return ServiceResponse.success(record.getResourceGroupName());
}
......
......@@ -415,6 +415,15 @@ public class UserApiServiceImpl implements UserApiService {
}
@Override
public ServiceResponse<List<UserDTO>> listUserByEnterpriseId(List<Integer> enterpriseIdList) {
List<TabSysUser> list = userService.listUserByEnterpriseId(enterpriseIdList);
if (CollectionUtils.isNotEmpty(list)) {
return ServiceResponse.success(EntityUtil.changeEntityListNew(UserDTO.class, list));
}
return ServiceResponse.success(Collections.emptyList());
}
@Override
public ServiceResponse<List<UserDTO>> listUserByPhoneNumber(String phoneNumber, String nationCode) {
List<TabSysUser> list = this.userService.listAllUserByPhoneNumber(phoneNumber, nationCode);
if (CollectionUtils.isNotEmpty(list)) {
......
......@@ -255,6 +255,19 @@
and login_type = 0
</select>
<select id="listUserByEnterpriseId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_sys_user
where enterprise_id in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and super_admin = 1
and login_type = 0
</select>
<select id="listUserByPhoneNumberAndEnterprise" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment