This commit is contained in:
zhouwentao 2024-05-27 12:11:28 +08:00
parent e4cd87a92c
commit 880ef5eebc
3 changed files with 29 additions and 27 deletions

View File

@ -30,7 +30,7 @@ public interface CommonConstant {
* 系统日志类型 登录
*/
int LOG_TYPE_1 = 1;
/**
* 系统日志类型 操作
*/
@ -40,40 +40,40 @@ public interface CommonConstant {
* 操作日志类型 查询
*/
int OPERATE_TYPE_1 = 1;
/**
* 操作日志类型 添加
*/
int OPERATE_TYPE_2 = 2;
/**
* 操作日志类型 更新
*/
int OPERATE_TYPE_3 = 3;
/**
* 操作日志类型 删除
*/
int OPERATE_TYPE_4 = 4;
/**
* 操作日志类型 倒入
*/
int OPERATE_TYPE_5 = 5;
/**
* 操作日志类型 导出
*/
int OPERATE_TYPE_6 = 6;
/** {@code 500 Server Error} (HTTP/1.0 - RFC 1945) */
Integer SC_INTERNAL_SERVER_ERROR_500 = 500;
/** {@code 404 Not Found} (HTTP/1.0 - RFC 1945) */
Integer SC_INTERNAL_NOT_FOUND_404 = 404;
/** {@code 200 OK} (HTTP/1.0 - RFC 1945) */
Integer SC_OK_200 = 200;
/**访问权限认证未通过 510*/
Integer SC_JEECG_NO_AUTHZ=510;
@ -81,6 +81,8 @@ public interface CommonConstant {
public static String PREFIX_USER_SHIRO_CACHE = "shiro:cache:org.jeecg.config.shiro.ShiroRealm.authorizationCache:";
/** 登录用户Token令牌缓存KEY前缀 */
String PREFIX_USER_TOKEN = "prefix_user_token:";
//token有效期 x小时
Integer PERFIX_USER_TOEKN_TIME = 3600 * 8;
// /** Token缓存时间3600秒即一小时 */
// int TOKEN_EXPIRE_TIME = 3600;
@ -96,7 +98,7 @@ public interface CommonConstant {
*/
Integer MENU_TYPE_0 = 0;
/**
* 1子菜单
* 1子菜单
*/
Integer MENU_TYPE_1 = 1;
/**
@ -107,34 +109,34 @@ public interface CommonConstant {
/**通告对象类型USER:指定用户ALL:全体用户)*/
String MSG_TYPE_UESR = "USER";
String MSG_TYPE_ALL = "ALL";
/**发布状态0未发布1已发布2已撤销*/
String NO_SEND = "0";
String HAS_SEND = "1";
String HAS_CANCLE = "2";
/**阅读状态0未读1已读*/
Integer HAS_READ_FLAG = 1;
Integer NO_READ_FLAG = 0;
/**优先级L低M中H高*/
String PRIORITY_L = "L";
String PRIORITY_M = "M";
String PRIORITY_H = "H";
/**
* 短信模板方式 0 .登录模板1.注册模板2.忘记密码模板
*/
String SMS_TPL_TYPE_0 = "0";
String SMS_TPL_TYPE_1 = "1";
String SMS_TPL_TYPE_2 = "2";
/**
* 状态(0无效1有效)
*/
String STATUS_0 = "0";
String STATUS_1 = "1";
/**
* 同步工作流引擎1同步0不同步
*/
@ -146,7 +148,7 @@ public interface CommonConstant {
*/
String MSG_CATEGORY_1 = "1";
String MSG_CATEGORY_2 = "2";
/**
* 是否配置菜单的数据权限 1是0否
*/
@ -159,7 +161,7 @@ public interface CommonConstant {
Integer USER_UNFREEZE = 1;
Integer USER_FREEZE = 2;
Integer USER_QUIT = 3;
/**字典翻译文本后缀*/
String DICT_TEXT_SUFFIX = "_dictText";
/**字典翻译颜色后缀*/
@ -390,7 +392,7 @@ public interface CommonConstant {
* https:// https协议
*/
String HTTPS_PROTOCOL = "https://";
/** 部门表唯一keyid */
String DEPART_KEY_ID = "id";
/** 部门表唯一keyorgCode */
@ -490,7 +492,7 @@ public interface CommonConstant {
* 用户租户状态(审核中)
*/
String USER_TENANT_UNDER_REVIEW = "3";
/**
* 用户租户状态(拒绝)
*/
@ -500,7 +502,7 @@ public interface CommonConstant {
* 用户租户状态(邀请)
*/
String USER_TENANT_INVITE = "5";
/**
* 不是叶子节点
*/
@ -576,5 +578,5 @@ public interface CommonConstant {
*/
public static final String SAAS_MODE_TENANT = "tenant";
//update-end---author:scott ---date::2023-09-10 for积木报表常量----
}

View File

@ -115,7 +115,7 @@ public class MiniUserController {
String token = JwtUtil.sign(sysUser.getUsername(), syspassword);
// 设置token缓存有效时间
redisUtil.set(CommonConstant.PREFIX_USER_TOKEN + token, token);
redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, 3600 * 2);
redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, CommonConstant.PERFIX_USER_TOEKN_TIME);
JSONObject obj = new JSONObject();
LoginUser loginUser = new LoginUser();
BeanUtils.copyProperties(sysUser, loginUser);
@ -164,7 +164,7 @@ public class MiniUserController {
String token = JwtUtil.sign(sysUser.getUsername(), syspassword);
// 设置token缓存有效时间
redisUtil.set(CommonConstant.PREFIX_USER_TOKEN + token, token);
redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, 3600 * 2);
redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, CommonConstant.PERFIX_USER_TOEKN_TIME);
JSONObject obj = new JSONObject();
LoginUser loginUser = new LoginUser();
BeanUtils.copyProperties(sysUser, loginUser);
@ -234,7 +234,7 @@ public class MiniUserController {
String token = JwtUtil.sign(username, syspassword);
// 设置token缓存有效时间
redisUtil.set(CommonConstant.PREFIX_USER_TOKEN + token, token);
redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, 3600 * 2);
redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, CommonConstant.PERFIX_USER_TOEKN_TIME);
JSONObject obj = new JSONObject();
LoginUser loginUser = new LoginUser();
BeanUtils.copyProperties(user, loginUser);
@ -330,7 +330,7 @@ public class MiniUserController {
String token = JwtUtil.sign(username, syspassword);
// 设置token缓存有效时间
redisUtil.set(CommonConstant.PREFIX_USER_TOKEN + token, token);
redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, 3600 * 2);
redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, CommonConstant.PERFIX_USER_TOEKN_TIME);
JSONObject obj = new JSONObject();
LoginUser loginUser = new LoginUser();
BeanUtils.copyProperties(user, loginUser);

View File

@ -58,7 +58,7 @@ public class WebUserService {
String token = JwtUtil.sign(sysUser.getUsername(), syspassword);
// 设置token缓存有效时间
redisUtil.set(CommonConstant.PREFIX_USER_TOKEN + token, token);
redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, 3600 * 2);
redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token,CommonConstant.PERFIX_USER_TOEKN_TIME);
JSONObject obj = new JSONObject();
LoginUser loginUser = new LoginUser();
BeanUtils.copyProperties(sysUser, loginUser);