登录信息增加字段
This commit is contained in:
@ -181,11 +181,20 @@ public class SysUser implements Serializable {
|
||||
@TableField(value = "mk")
|
||||
private String mk;
|
||||
|
||||
/** 用户头像 */
|
||||
/**
|
||||
* 用户头像
|
||||
**/
|
||||
@TableField(value = "avatar")
|
||||
@ApiModelProperty(value = "头像")
|
||||
private String avatar;
|
||||
|
||||
/**
|
||||
* 巡防力量ID
|
||||
**/
|
||||
@TableField(value = "xfll_id")
|
||||
@ApiModelProperty(value = "巡防力量ID")
|
||||
private String xfllId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
@ -128,6 +128,7 @@ public class TbJcglXfllInCommServiceImpl extends ServiceImpl<TbJcglXfllInCommMap
|
||||
sysUser.setSfrh("0");
|
||||
// sysUser.setMk();
|
||||
sysUser.setAvatar(entity.getTpid());
|
||||
sysUser.setXfllId(entity.getId());
|
||||
|
||||
return sysUser;
|
||||
}
|
||||
|
@ -86,6 +86,7 @@ public class JwtTokenGenerator {
|
||||
.withClaim("inDustRialId", sysUser.getInDustRialId())
|
||||
.withClaim("idEntityCard", sysUser.getIdEntityCard())
|
||||
.withClaim("phone", sysUser.getMobile())
|
||||
.withClaim("xfllId", sysUser.getXfllId())
|
||||
.withClaim("isVirtualUser", sysUser.getIsVirtualUser())
|
||||
.withClaim("deptId", dept.getDeptid())
|
||||
.withClaim("deptCode", dept.getDeptcode())
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.mosty.common.token;
|
||||
|
||||
import cn.hutool.json.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.auth0.jwt.JWT;
|
||||
import com.auth0.jwt.algorithms.Algorithm;
|
||||
@ -9,12 +8,9 @@ import com.auth0.jwt.interfaces.DecodedJWT;
|
||||
import com.auth0.jwt.interfaces.JWTVerifier;
|
||||
import com.mosty.common.base.exception.BusinessException;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.http.HttpStatus;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import static com.mosty.common.base.constant.SystemConfigConstants.TOKEN_ISSUER;
|
||||
import static com.mosty.common.base.constant.SystemConfigConstants.TOKEN_KEY;
|
||||
|
||||
@ -79,6 +75,7 @@ public class JWTUtil {
|
||||
jwt.getClaim("idEntityCard").asString(),
|
||||
jwt.getClaim("isVirtualUser").asString(),
|
||||
jwt.getClaim("level").asString(),
|
||||
jwt.getClaim("xfllId").asString(),
|
||||
jwt.getClaim("deptId").asLong(),
|
||||
jwt.getClaim("deptName").asString(),
|
||||
jwt.getClaim("deptCode").asString(),
|
||||
|
@ -52,6 +52,9 @@ public class UserInfo implements Serializable {
|
||||
@ApiModelProperty(value = "数据权限范围")
|
||||
public final String level;
|
||||
|
||||
@ApiModelProperty(value = "巡防力量ID")
|
||||
public final String xfllId;
|
||||
|
||||
@ApiModelProperty(value = "部门id")
|
||||
public final Long deptId;
|
||||
|
||||
|
Reference in New Issue
Block a user