Commit c4b6bd18 by guojuxing

如果为null,默认值0

parent 9e532cdf
......@@ -75,13 +75,16 @@ public class AccountGroupApiServiceImpl implements AccountGroupApiService {
List<TabSysAccountGroup> list = accountGroupService.listAccountGroupByEnterpriseId(enterpriseId);
if (CollectionUtils.isNotEmpty(list)) {
//求分组下的组员数量值
Map<String, Integer> map = new HashMap<>(16);
List<Integer> accountGroupIdList = new ArrayList<>(list.size());
for (TabSysAccountGroup temp : list) {
accountGroupIdList.add(temp.getAccountGroupId());
//设置默认值0
map.put(temp.getAccountGroupId().toString(), 0);
}
List<AccountGroupListDTO> accountGroupListDTOList = accountGroupRelService
.groupByAccountGroupId(accountGroupIdList);
Map<String, Integer> map = new HashMap<>(16);
if (CollectionUtils.isNotEmpty(accountGroupListDTOList)) {
for (AccountGroupListDTO dto : accountGroupListDTOList) {
map.put(dto.getAccountGroupId().toString(), dto.getMemberCount());
......
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