Merge branch 'cc_20250902_caipin' into 'master'
feat:获取用户只有督导用户 See merge request hangzhou/java/custom_zxjp!156
This commit is contained in:
@@ -158,8 +158,8 @@ public class EnterpriseUserDAO {
|
||||
return enterpriseUserMapper.getUserListByRegionId(regionId);
|
||||
}
|
||||
|
||||
public List<UserDTO> getAllUser(String eid, String keyword) {
|
||||
return enterpriseUserMapper.getAllUser(eid, keyword);
|
||||
public List<UserDTO> getAllUser(String eid, String keyword,List<Long> roleIdList) {
|
||||
return enterpriseUserMapper.getAllUser(eid, keyword,roleIdList);
|
||||
}
|
||||
|
||||
public List<EnterpriseUserDO> findUserInfoByUserIdsAndKeyword(List<String> userIdList, String keyword) {
|
||||
|
||||
@@ -90,7 +90,7 @@ public interface EnterpriseUserMapper {
|
||||
*/
|
||||
List<EnterpriseUserDO> getUserListByRegionId( @Param("regionId") Long regionId);
|
||||
|
||||
List<UserDTO> getAllUser(@Param("eid")String id, @Param("keyword") String keyword);
|
||||
List<UserDTO> getAllUser(@Param("eid")String id, @Param("keyword") String keyword, @Param("roleIdList") List<Long> roleIdList);
|
||||
|
||||
/**
|
||||
* 根据用户id和关键字搜索用户
|
||||
|
||||
@@ -176,13 +176,19 @@
|
||||
</select>
|
||||
<select id="getAllUser" resultType="com.cool.store.dto.UserDTO">
|
||||
select
|
||||
user_id as userId,
|
||||
name,
|
||||
mobile
|
||||
from enterprise_user_${eid}
|
||||
a.user_id as userId,
|
||||
a.name,
|
||||
a.mobile,b.role_id
|
||||
from enterprise_user_${eid} a left join enterprise_user_role_${eid} b on a.`user_id` = b.`user_id`
|
||||
where active = true
|
||||
<if test="keyword!=null and keyword!=''">
|
||||
and( name like concat('%',#{keyword},'%') or mobile like concat('%',#{keyword},'%'))
|
||||
and( a.name like concat('%',#{keyword},'%') or a.mobile like concat('%',#{keyword},'%'))
|
||||
</if>
|
||||
<if test="roleIdList !=null and roleIdList.size>0">
|
||||
and b.role_id in
|
||||
<foreach item="roleId" index="index" collection="roleIdList" open="(" separator="," close=")">
|
||||
#{roleId}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
@@ -479,7 +479,7 @@ public class UserAuthMappingServiceImpl implements UserAuthMappingService {
|
||||
@Override
|
||||
public PageInfo<UserDTO> getAllUser(String keyword, Integer pageNum, Integer pageSize) {
|
||||
PageHelper.startPage(pageNum, pageSize);
|
||||
List<UserDTO> allUser = enterpriseUserDAO.getAllUser(eid, keyword);
|
||||
List<UserDTO> allUser = enterpriseUserDAO.getAllUser(eid, keyword,Arrays.asList(UserRoleEnum.SUPERVISION.getCode(), UserRoleEnum.QW_SUPERVISION.getCode()));
|
||||
return new PageInfo<>(allUser);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user