This commit is contained in:
Ray.Hao
2025-11-15 15:57:14 +08:00
3 changed files with 11 additions and 2 deletions

View File

@@ -56,6 +56,11 @@ public class Log implements Serializable {
*/
private String requestUri;
/**
* 请求方法
*/
private String method;
/**
* IP 地址
*/

View File

@@ -108,7 +108,7 @@ public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements De
.orderByAsc(Dept::getSort)
);
if (CollectionUtil.isEmpty(deptList)) {
return Collections.EMPTY_LIST;
return Collections.emptyList();
}
Set<Long> deptIds = deptList.stream()
@@ -238,10 +238,11 @@ public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements De
if (StrUtil.isNotBlank(ids)) {
String[] menuIds = ids.split(",");
for (String deptId : menuIds) {
String patten = "%," + deptId + ",%";
this.update(new LambdaUpdateWrapper<Dept>()
.eq(Dept::getId, deptId)
.or()
.apply("CONCAT (',',tree_path,',') LIKE CONCAT('%,',{0},',%')", deptId)
.apply("CONCAT (',',tree_path,',') LIKE {0}", patten)
.set(Dept::getIsDeleted, 1)
.set(Dept::getUpdateBy, SecurityUtils.getUserId())
);