1、注解
package com.ahies.system.common.annotation;
import java.lang.annotation.*;
/**
* 当前用户Java对象注解类.
*
*/
@Documented
@Target({ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
public @interface CurrentUser {
}
2、用户类
package com.ahies.system.common.pojo;
import lombok.Data;
/**
* 用户相关信息
*/
@Data
public class UserInfoBean {
/**
* id
*/
private String userId;
/**
* 姓名
*/
private String userName;
/**
* 登录id
*/
private String loginName;
/**
* 权限缓存key
*/
private String permissionKey;
/**
* 基层法院类型
*/
private String lowerCourtType;
public UserInfoBean() {
}
public UserInfoBean(String userId, String userName, String loginName, String permissionKey ) {
this.userId = userId;
this.userName = userName;
this.loginName = loginName;
this.permissionKey = permissionKey;
}
public UserInfoBean(String userId, String userName, String loginName) {
this.userId = userId;
this.userName = userName;
this.loginName = loginName;
}
public UserInfoBean(String userId, String userName, String loginName, String permissionKey, String lowerCourtType) {
t