Merge branch 'master' of http://121.40.234.130:8899/root/nl-sso-server
This commit is contained in:
@@ -17,6 +17,7 @@ package org.nl.modules.system.rest;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.secure.SaSecureUtil;
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -74,26 +75,26 @@ public class UserController {
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
/* @Log("修改用户")
|
||||
@Log("修改用户")
|
||||
@ApiOperation("修改用户")
|
||||
@PutMapping
|
||||
@SaCheckPermission("user:edit")
|
||||
public ResponseEntity<Object> update(@Validated(User.Update.class) @RequestBody User resources) throws Exception {
|
||||
public ResponseEntity<Object> update( @RequestBody User resources) throws Exception {
|
||||
checkLevel(resources);
|
||||
userService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}*/
|
||||
}
|
||||
|
||||
/* @Log("修改用户:个人中心")
|
||||
@Log("修改用户:个人中心")
|
||||
@ApiOperation("修改用户:个人中心")
|
||||
@PutMapping(value = "center")
|
||||
public ResponseEntity<Object> center(@Validated(User.Update.class) @RequestBody User resources){
|
||||
public ResponseEntity<Object> center(@RequestBody User resources){
|
||||
if(!resources.getUser_id().equals(StpUtil.getLoginIdAsLong())){
|
||||
throw new BadRequestException("不能修改他人资料");
|
||||
}
|
||||
userService.updateCenter(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}*/
|
||||
}
|
||||
|
||||
@Log("删除用户")
|
||||
@ApiOperation("删除用户")
|
||||
|
||||
@@ -31,8 +31,9 @@ import java.util.Objects;
|
||||
@Getter
|
||||
@Setter
|
||||
public class DeptTree implements Serializable {
|
||||
|
||||
|
||||
private Long Dept_id;
|
||||
|
||||
private Long pid;
|
||||
private String name;
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
|
||||
@@ -41,8 +41,7 @@ public class UserQueryCriteria implements Serializable {
|
||||
|
||||
private Boolean needAll;
|
||||
|
||||
@Query
|
||||
private Boolean is_used;
|
||||
private String is_used;
|
||||
|
||||
private Long deptId;
|
||||
|
||||
|
||||
@@ -297,7 +297,6 @@ public class DeptServiceImpl implements DeptService {
|
||||
Set<Long> set = new HashSet<>();
|
||||
//添加本级
|
||||
set.add(pid);
|
||||
|
||||
//添加子节点
|
||||
try {
|
||||
List<Entity> list = Db.use((DataSource) SpringContextHolder.getBean("dataSource")).query(sql);
|
||||
|
||||
@@ -81,12 +81,14 @@ public class UserServiceImpl implements UserService {
|
||||
}
|
||||
JSONObject o = (JSONObject)JSON.toJSON(criteria);
|
||||
HashMap map = MapOf.of("user_id", MapUtil.getStr(o, "user_id")
|
||||
, "blurry", MapUtil.getStr(o, "blurry")
|
||||
, "is_used", MapUtil.getStr(o, "is_used")
|
||||
, "startTime", MapUtil.getStr(o, "startTime")
|
||||
, "endTime", MapUtil.getStr(o, "endTime")
|
||||
, "deptId", MapUtil.getStr(o, "deptId")
|
||||
);
|
||||
if (ObjectUtil.isNotEmpty(MapUtil.getStr(o, "blurry"))){
|
||||
map.put("blurry","'%"+MapUtil.getStr(o, "blurry")+"%'");
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(criteria.getDeptIds())){
|
||||
String collectSql = criteria.getDeptIds().stream().map(a -> String.valueOf(a)).collect(Collectors.joining("','"));
|
||||
map.put("deptIds","('"+collectSql+"')");
|
||||
|
||||
@@ -92,3 +92,20 @@
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "2"
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
max(t3.childId)
|
||||
from
|
||||
(
|
||||
select *,
|
||||
if( find_in_set(t1.pid, @p) > 0,@p := concat(@p,',',id),0 ) as childId
|
||||
from
|
||||
(select dept_id as id, pid from sys_dept t order by id) t1,
|
||||
(select @p := '输入.pid') t2
|
||||
) t3
|
||||
where childId != '0'
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
输入.deptIds TYPEAS f_string
|
||||
输入.deptId TYPEAS f_string
|
||||
输入.id TYPEAS s_string
|
||||
输入.blurry TYPEAS s_string
|
||||
输入.blurry TYPEAS f_string
|
||||
输入.is_used TYPEAS s_string
|
||||
输入.startTime TYPEAS s_string
|
||||
输入.endTime TYPEAS s_string
|
||||
@@ -63,10 +63,10 @@
|
||||
sys_user_dept.dept_id in 输入.deptIds
|
||||
ENDOPTION
|
||||
OPTION 输入.blurry <> ""
|
||||
(email like 输入.blurry or username like 输入.blurry or nickName like 输入.blurry)
|
||||
(email like 输入.blurry or username like 输入.blurry or person_name like 输入.blurry)
|
||||
ENDOPTION
|
||||
OPTION 输入.is_used <> ""
|
||||
sys_user.is_used = 输入.enabled
|
||||
sys_user.is_used = 输入.is_used
|
||||
ENDOPTION
|
||||
OPTION 输入.deptId <> ""
|
||||
sys_user_dept.dept_id = 输入.deptId
|
||||
|
||||
Reference in New Issue
Block a user