diff --git a/nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/impl/UserServiceImpl.java b/nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/impl/UserServiceImpl.java index c6b26bc..bf97a8a 100644 --- a/nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/impl/UserServiceImpl.java +++ b/nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/impl/UserServiceImpl.java @@ -42,6 +42,7 @@ import org.nl.modules.tools.MapOf; import org.nl.modules.wql.WQL; import org.nl.modules.wql.core.bean.ResultBean; import org.nl.modules.wql.core.bean.WQLObject; +import org.nl.modules.wql.util.WqlUtil; import org.springframework.cache.annotation.CacheConfig; import org.springframework.cache.annotation.Cacheable; import org.springframework.data.domain.Pageable; @@ -98,7 +99,7 @@ public class UserServiceImpl implements UserService { map.put("deptIds","('"+collectSql+"')"); } map.put("flag","1"); - JSONObject jsonObject = WQL.getWO("SYS_USER").addParamMap(map).pageQuery(pageable.getPageNumber(), pageable.getPageSize(), "user_id"); + JSONObject jsonObject = WQL.getWO("SYS_USER").addParamMap(map).pageQuery(WqlUtil.getHttpContext(pageable),"user_id desc"); return jsonObject; } @@ -220,7 +221,7 @@ public class UserServiceImpl implements UserService { delCaches(user.getUser_id(), user.getUsername()); } String collectSql = ids.stream().map(a -> String.valueOf(a)).collect(Collectors.joining("','")); - WQLObject.getWQLObject("sys_user").delete("user_id in ('"+collectSql+"'"); + WQLObject.getWQLObject("sys_user").delete("user_id in ('"+collectSql+"')"); //删除用户部门,角色关系表 userRelateService.deleteDeptRelate(ids); userRelateService.deleteRoleRelate(ids); diff --git a/nladmin-ui/src/views/system/user/index.vue b/nladmin-ui/src/views/system/user/index.vue index 62c5b42..7b15e27 100644 --- a/nladmin-ui/src/views/system/user/index.vue +++ b/nladmin-ui/src/views/system/user/index.vue @@ -220,7 +220,7 @@ export default { name: 'User', components: { Treeselect, crudOperation, rrOperation, udOperation, pagination }, cruds() { - return CRUD({ title: '用户', url: 'api/users', crudMethod: { ...crudUser }}) + return CRUD({ title: '用户', idField: 'user_id', url: 'api/users', crudMethod: { ...crudUser }}) }, mixins: [presenter(), header(), form(defaultForm), crud()], // 数据字典