Merge branch 'master' of https://gitee.com/youlaiorg/youlai-boot
This commit is contained in:
@@ -138,6 +138,9 @@ public class LogAspect {
|
|||||||
log.setBrowser(userAgent.getBrowser().getName());
|
log.setBrowser(userAgent.getBrowser().getName());
|
||||||
log.setBrowserVersion(userAgent.getBrowser().getVersion(userAgentString));
|
log.setBrowserVersion(userAgent.getBrowser().getVersion(userAgentString));
|
||||||
}
|
}
|
||||||
|
//获取方法名
|
||||||
|
String methodName = joinPoint.getSignature().getName();
|
||||||
|
log.setMethod(methodName);
|
||||||
// 保存日志到数据库
|
// 保存日志到数据库
|
||||||
logService.save(log);
|
logService.save(log);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,6 +56,11 @@ public class Log implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String requestUri;
|
private String requestUri;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求方法
|
||||||
|
*/
|
||||||
|
private String method;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* IP 地址
|
* IP 地址
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements De
|
|||||||
.orderByAsc(Dept::getSort)
|
.orderByAsc(Dept::getSort)
|
||||||
);
|
);
|
||||||
if (CollectionUtil.isEmpty(deptList)) {
|
if (CollectionUtil.isEmpty(deptList)) {
|
||||||
return Collections.EMPTY_LIST;
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
Set<Long> deptIds = deptList.stream()
|
Set<Long> deptIds = deptList.stream()
|
||||||
@@ -238,10 +238,11 @@ public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements De
|
|||||||
if (StrUtil.isNotBlank(ids)) {
|
if (StrUtil.isNotBlank(ids)) {
|
||||||
String[] menuIds = ids.split(",");
|
String[] menuIds = ids.split(",");
|
||||||
for (String deptId : menuIds) {
|
for (String deptId : menuIds) {
|
||||||
|
String patten = "%," + deptId + ",%";
|
||||||
this.update(new LambdaUpdateWrapper<Dept>()
|
this.update(new LambdaUpdateWrapper<Dept>()
|
||||||
.eq(Dept::getId, deptId)
|
.eq(Dept::getId, deptId)
|
||||||
.or()
|
.or()
|
||||||
.apply("CONCAT (',',tree_path,',') LIKE CONCAT('%,',{0},',%')", deptId)
|
.apply("CONCAT (',',tree_path,',') LIKE {0}", patten)
|
||||||
.set(Dept::getIsDeleted, 1)
|
.set(Dept::getIsDeleted, 1)
|
||||||
.set(Dept::getUpdateBy, SecurityUtils.getUserId())
|
.set(Dept::getUpdateBy, SecurityUtils.getUserId())
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user