| | |
| | | package com.gkhy.framework.aspectj; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.gkhy.common.core.domain.entity.SysDept; |
| | | import org.apache.commons.lang3.ArrayUtils; |
| | | import org.aspectj.lang.JoinPoint; |
| | | import org.aspectj.lang.annotation.AfterReturning; |
| | |
| | | { |
| | | operLog.setOperName(loginUser.getUsername()); |
| | | SysUser currentUser = loginUser.getUser(); |
| | | if (StringUtils.isNotNull(currentUser) && StringUtils.isNotNull(currentUser.getDept())) |
| | | if (StringUtils.isNotNull(currentUser) && ObjectUtil.isNotEmpty(currentUser.getDepts())) |
| | | { |
| | | operLog.setDeptName(currentUser.getDept().getDeptName()); |
| | | List<SysDept> depts = currentUser.getDepts(); |
| | | String deptNames = depts == null ? "" : depts.stream() |
| | | .map(SysDept::getDeptName) |
| | | .filter(Objects::nonNull) |
| | | .collect(Collectors.joining(",")); |
| | | operLog.setDeptName(deptNames); |
| | | } |
| | | } |
| | | |