Commit a520e061 by guojuxing

添加接口:根据分组ID查询组员

parent 771b2f0f
......@@ -122,4 +122,6 @@ public interface TabSysAccountGroupRelMapper {
List<TabSysAccountGroupRel> listByAccountGroupId(@Param("accountGroupId") Integer accountGroupId, @Param("type") Integer type);
List<AccountGroupListDTO> groupByAccountGroupId(@Param("list") List<Integer> accountGroupId);
List<TabSysAccountGroupRel> listByAccountGroupIdList(@Param("list") List<Integer> accountGroupIdList, @Param("type") Integer type);
}
\ No newline at end of file
......@@ -80,6 +80,8 @@ public interface AccountGroupRelService {

 */
List<TabSysAccountGroupRel> listByAccountGroupId(Integer accountGroupId);
List<TabSysAccountGroupRel> listByAccountGroupId(List<Integer> accountGroupIdList, Integer type);
List<TabSysAccountGroupRel> listByAccountGroupId(Integer accountGroupId, Integer type);
/**
......
......@@ -67,6 +67,11 @@ public class AccountGroupRelServiceImpl implements AccountGroupRelService{
}
@Override
public List<TabSysAccountGroupRel> listByAccountGroupId(List<Integer> accountGroupIdList, Integer type) {
return tabSysAccountGroupRelMapper.listByAccountGroupIdList(accountGroupIdList, type);
}
@Override
public List<TabSysAccountGroupRel> listByAccountGroupId(Integer accountGroupId, Integer type) {
return tabSysAccountGroupRelMapper.listByAccountGroupId(accountGroupId, type);
}
......
......@@ -133,6 +133,17 @@ public class AccountGroupApiServiceImpl implements AccountGroupApiService {
}
@Override
public ServiceResponse<List<AccountGroupMemberDTO>> listAccountGroupMemberByAccountGroupId(List<Integer> accountGroupIdList) {
List<AccountGroupMemberDTO> result = new ArrayList<>();
List<TabSysAccountGroupRel> list = accountGroupRelService.listByAccountGroupId(accountGroupIdList, null);
//查询管理员列表
result.addAll(getMemberOfUser(list, true, null, null));
// 查询协作人列表
result.addAll(getMemberOfCollaborator(list, true, null, null));
return ServiceResponse.success(result);
}
@Override
public ServiceResponse<List<AccountGroupMemberDTO>> listNotInAccountGroupByAccountGroupId(Integer accountGroupId,
String search) {
TabSysAccountGroup record = accountGroupService.getById(accountGroupId);
......@@ -144,7 +155,7 @@ public class AccountGroupApiServiceImpl implements AccountGroupApiService {
//查询管理员列表
result.addAll(getMemberOfUser(list, false, search, record.getEnterpriseId()));
// 查询协作人列表
result.addAll(getMemberOfCollaborator(list, true, search, record.getEnterpriseId()));
result.addAll(getMemberOfCollaborator(list, false, search, record.getEnterpriseId()));
return ServiceResponse.success(result);
}
......
......@@ -219,4 +219,22 @@
</if>
group by account_group_id
</select>
<select id="listByAccountGroupIdList" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_sys_account_group_rel
where
status = 1
<if test="list != null and list.size() > 0">
and account_group_id in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="type != null">
and type = #{type}
</if>
</select>
</mapper>
\ No newline at end of file
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