Browse Source

Merge branch 'dev_oper_role' into develop

master
sunyuchao 4 years ago
parent
commit
ef57897c80
  1. 6
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/GovStaffRoleResultDTO.java
  2. 15
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GovStaffRoleServiceImpl.java
  3. 3
      epmet-user/epmet-user-server/src/main/resources/mapper/GovStaffRoleDao.xml

6
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/GovStaffRoleResultDTO.java

@ -17,6 +17,7 @@
package com.epmet.dto.result;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.io.Serializable;
@ -81,4 +82,9 @@ public class GovStaffRoleResultDTO implements Serializable {
* 职责描述[默认值]
*/
private String defDescription;
/**
* 排序
*/
@JsonIgnore
private Integer sort;
}

15
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GovStaffRoleServiceImpl.java

@ -44,10 +44,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
* 政府端角色表
@ -198,9 +195,19 @@ public class GovStaffRoleServiceImpl extends BaseServiceImpl<GovStaffRoleDao, Go
re.setRoleKey(cu.getRoleKey());
re.setRoleName(cu.getRoleName());
re.setDescription(cu.getDescription());
re.setSort(cu.getSort());
}
});
});
//4.按客户权限顺序排序
if(cuList.size()>NumConstant.ZERO){
Collections.sort(resultList, new Comparator<GovStaffRoleResultDTO>() {
@Override
public int compare(GovStaffRoleResultDTO o1, GovStaffRoleResultDTO o2) {
return o1.getSort().compareTo(o2.getSort());
}
});
}
return resultList;
}

3
epmet-user/epmet-user-server/src/main/resources/mapper/GovStaffRoleDao.xml

@ -73,7 +73,8 @@
r.ROLE_KEY AS roleKey,
r.ROLE_NAME AS roleName,
r.ORG_TYPE AS orgType,
r.DESCRIPTION AS description
r.DESCRIPTION AS description,
r.SORT AS sort
FROM gov_staff_role r
WHERE r.CUSTOMER_ID = #{customerId}
ORDER BY r.SORT asc

Loading…
Cancel
Save