| | |
| | | min_value integer default 0, |
| | | max_value integer default 0, |
| | | descr varchar(256), |
| | | mark varchar(50), |
| | | create_user integer default 1, |
| | | create_time timestamp(6) without time zone default now(), |
| | | update_user integer, |
| | |
| | | comment on column lf.sys_args.min_value is '最小值'; |
| | | comment on column lf.sys_args.max_value is '最大值'; |
| | | comment on column lf.sys_args.descr is '描述'; |
| | | comment on column lf.sys_args.mark is '标识'; |
| | | comment on column lf.sys_args.create_user is '创建人ID'; |
| | | comment on column lf.sys_args.create_time is '创建时间'; |
| | | comment on column lf.sys_args.update_user is '更新人ID'; |
| | | comment on column lf.sys_args.update_time is '更新时间'; |
| | | /* insert into lf.sys_args (name,cvalue,dvalue,min_value,max_value,descr) values ('自动登出时间',15,15,3,1440,'默认用户15分钟不操作,就自动登出系统。'); |
| | | insert into lf.sys_args (name,cvalue,dvalue,min_value,max_value,descr) values ('令牌有效期',240,240,60,1440,'临时令牌默认有效期为240分钟(4小时),超时将失效。'); |
| | | insert into lf.sys_args (name,cvalue,dvalue,min_value,max_value,descr) values ('缓存有效期',240,240,60,1440,'缓存默认有效期为1440分钟(1天),超时将失效。'); */ |
| | | /* insert into lf.sys_args (name,cvalue,dvalue,min_value,max_value,descr,mark) values ('自动登出时间',15,15,3,1440,'默认用户15分钟不操作,就自动登出系统。','AUTO_LOGOUT'); |
| | | insert into lf.sys_args (name,cvalue,dvalue,min_value,max_value,descr,mark) values ('令牌有效期',240,240,60,1440,'令牌默认有效期为240分钟,超时将失效。','TOKEN_EXPIRE'); |
| | | insert into lf.sys_args (name,cvalue,dvalue,min_value,max_value,descr,mark) values ('缓存有效期',240,240,60,1440,'缓存默认有效期为240分钟,超时将失效。','CACHE_EXPIRE'); |
| | | insert into lf.sys_args (name,cvalue,dvalue,min_value,max_value,descr,mark) values ('最大文件数',2000,2000,500,2500,'单个文件夹下默认最大存储文件的数目为2000个。','MAX_FILES'); |
| | | insert into lf.sys_args (name,cvalue,dvalue,min_value,max_value,descr,mark) values ('Cookie有效期',240,240,60,43200,'Cookie默认有效期为240分钟,超时将失效。','COOKIE_MAX_AGE'); |
| | | insert into lf.sys_args (name,cvalue,dvalue,min_value,max_value,descr,mark) values ('附件大小',50,50,5,1024,'单个附件大小默认最大为50MB。','MAX_FILE_SIZE'); */ |
| | | |
| | | select * from lf.sys_args; |
| | | ----------------------------------------------------------------------------------------------------- 25.黑名单表 |
| | |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-maven-plugin</artifactId> |
| | | <version>2.3.0.RELEASE</version> |
| | | <configuration> |
| | | <mainClass>com.lf.server.LfApplication</mainClass> |
| | | </configuration> |
| | | </plugin> |
| | | </plugins> |
| | | </build> |
| | |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | /*@SysLog() |
| | | @ApiOperation(value = "插入一条") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "entity", value = "实体类", dataType = "ArgsEntity", paramType = "body") |
| | |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | }*/ |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "更新一条") |
| | |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | /*@SysLog() |
| | | @ApiOperation(value = "更新多条") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "list", value = "实体类集合", dataType = "ArgsEntity", paramType = "body") |
| | |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | }*/ |
| | | } |
| | |
| | | */ |
| | | public class SettingData { |
| | | /** |
| | | * 访问排除路径 |
| | | */ |
| | | public static String[] EXCLUDE_PATH = new String[]{"/swagger", "/sign/", "/proxy"}; |
| | | |
| | | /** |
| | | * 自动登出时间 |
| | | */ |
| | | public static int AUTO_LOGOUT = 15; |
| | |
| | | /** |
| | | * 附件大小 |
| | | */ |
| | | public static long MAX_FILE_SIZE = 20 * 1024 * 1024; |
| | | public static long MAX_FILE_SIZE = 50 * 1024 * 1024; |
| | | } |
| | |
| | | */ |
| | | public class StaticData { |
| | | /** |
| | | * 权限排除路径 |
| | | */ |
| | | public static String[] EXCLUDE_PATH = new String[]{"/swagger", "/sign/", "/proxy"}; |
| | | |
| | | /** |
| | | * 版本号 |
| | | */ |
| | | public final static String VERSION = "1.0.0"; |
| | |
| | | |
| | | private int dvalue; |
| | | |
| | | private int minValue; |
| | | |
| | | private int maxValue; |
| | | |
| | | private String descr; |
| | | |
| | | private String mark; |
| | | |
| | | private int createUser; |
| | | |
| | |
| | | private int updateUser; |
| | | |
| | | private Timestamp updateTime; |
| | | |
| | | |
| | | |
| | | private int minValue; |
| | | |
| | | private int maxValue; |
| | | |
| | | public ArgsEntity() { |
| | | } |
| | |
| | | this.dvalue = dvalue; |
| | | } |
| | | |
| | | public int getMinValue() { |
| | | return minValue; |
| | | } |
| | | |
| | | public void setMinValue(int minValue) { |
| | | this.minValue = minValue; |
| | | } |
| | | |
| | | public int getMaxValue() { |
| | | return maxValue; |
| | | } |
| | | |
| | | public void setMaxValue(int maxValue) { |
| | | this.maxValue = maxValue; |
| | | } |
| | | |
| | | public String getDescr() { |
| | | return descr; |
| | | } |
| | | |
| | | public void setDescr(String descr) { |
| | | this.descr = descr; |
| | | } |
| | | |
| | | public String getMark() { |
| | | return mark; |
| | | } |
| | | |
| | | public void setMark(String mark) { |
| | | this.mark = mark; |
| | | } |
| | | |
| | | public int getCreateUser() { |
| | |
| | | |
| | | public void setUpdateTime(Timestamp updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | |
| | | public int getMinValue() { |
| | | return minValue; |
| | | } |
| | | |
| | | public void setMinValue(int minValue) { |
| | | this.minValue = minValue; |
| | | } |
| | | |
| | | public int getMaxValue() { |
| | | return maxValue; |
| | | } |
| | | |
| | | public void setMaxValue(int maxValue) { |
| | | this.maxValue = maxValue; |
| | | } |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.lf.server.entity.all.HttpStatus; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.all.SettingData; |
| | | import com.lf.server.entity.all.StaticData; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.helper.StringHelper; |
| | | import com.lf.server.helper.WebHelper; |
| | |
| | | */ |
| | | private static boolean noNeedAuth(HttpServletRequest request) { |
| | | String uri = request.getRequestURI().toLowerCase(); |
| | | for (String page : SettingData.EXCLUDE_PATH) { |
| | | for (String page : StaticData.EXCLUDE_PATH) { |
| | | if (uri.contains(page)) { |
| | | return true; |
| | | } |