Commit 80283fda authored by 朱晨阳's avatar 朱晨阳

经销商管理员修改经销商人员角色问题

parent 5923cb1b
...@@ -217,11 +217,14 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD ...@@ -217,11 +217,14 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
try { try {
List<Long> newRole = userDataZHDto.getRole(); List<Long> newRole = userDataZHDto.getRole();
List<Long> oldRole = JSONArray.parseArray(publicAgencyUser.getRole(), Long.class); List<Long> oldRole = JSONArray.parseArray(publicAgencyUser.getRole(), Long.class);
for (Long item : oldRole) { if(userDataZHDto.getHasOperationRecords()) {
if (!newRole.contains(item)) { for (Long item : oldRole) {
throw new BadRequest("角色只能增加, 不能删除"); if (!newRole.contains(item)) {
throw new BadRequest("角色只能增加, 不能删除");
}
} }
} }
//去掉空角色 //去掉空角色
List<Long> role = userDataZHDto.getRole(); List<Long> role = userDataZHDto.getRole();
if(CollectionUtil.isNotEmpty(role)){ if(CollectionUtil.isNotEmpty(role)){
......
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