fix用户更新修改
This commit is contained in:
@@ -56,9 +56,13 @@ public class RoleServiceImpl implements RoleService {
|
||||
public JSONObject queryAll(Map whereJson, Pageable page) {
|
||||
WQLObject wo = WQLObject.getWQLObject("sys_role");
|
||||
WQLObject rmTab = WQLObject.getWQLObject("sys_roles_menus");
|
||||
ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), "", "update_time desc");
|
||||
String sql = "";
|
||||
Object blurry = whereJson.get("blurry");
|
||||
if (blurry !=null){
|
||||
sql = "name like '%"+blurry+"%'";
|
||||
}
|
||||
ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), sql, "update_time desc");
|
||||
final JSONObject json = rb.pageResult();
|
||||
|
||||
JSONArray arr = json.getJSONArray("content");
|
||||
for (int i = 0; i < arr.size(); i++) {
|
||||
JSONObject roleObj = arr.getJSONObject(i);
|
||||
|
||||
@@ -8,6 +8,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -82,17 +83,21 @@ public class UserRelateServiceImpl implements UserRelateService {
|
||||
@Transactional
|
||||
public void updateDeptRelate(Long user, Set<Long> deptIds) {
|
||||
if (user !=null){
|
||||
this.deleteDeptRelate(user,deptIds);
|
||||
HashSet<Long> userSet = new HashSet<>();
|
||||
userSet.add(user);
|
||||
this.deleteDeptRelate(userSet);
|
||||
this.inserDeptRelate(user,deptIds);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void updateRoleRelate(Long user, Set<Long> RoleIds) {
|
||||
if (user !=null){
|
||||
this.deleteRoleRelate(user,RoleIds);
|
||||
this.inserRoleRelate(user,RoleIds);
|
||||
public void updateRoleRelate(Long role, Set<Long> RoleIds) {
|
||||
if (role !=null){
|
||||
HashSet<Long> roleSet = new HashSet<>();
|
||||
roleSet.add(role);
|
||||
this.deleteRoleRelate(roleSet);
|
||||
this.inserRoleRelate(role,RoleIds);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user