| | |
| | | insert into lf.sys_args (name,cvalue,dvalue,min_value,max_value,times,descr,mark) values ('缓存有效期',240,240,60,1440,1,'缓存默认有效期为240分钟,超时将失效。','CACHE_EXPIRE'); |
| | | insert into lf.sys_args (name,cvalue,dvalue,min_value,max_value,times,descr,mark) values ('最大文件数',2000,2000,500,2500,1,'单个文件夹下默认最大存储文件的数目为2000个。','MAX_FILES'); |
| | | insert into lf.sys_args (name,cvalue,dvalue,min_value,max_value,times,descr,mark) values ('Cookie有效期',240,240,60,43200,60,'Cookie默认有效期为240分钟,超时将失效。','COOKIE_MAX_AGE'); |
| | | insert into lf.sys_args (name,cvalue,dvalue,min_value,max_value,times,descr,mark) values ('附件大小',50,50,5,1024,1048576,'单个附件大小默认最大为50MB。','MAX_FILE_SIZE'); */ |
| | | insert into lf.sys_args (name,cvalue,dvalue,min_value,max_value,times,descr,mark) values ('附件大小',50,50,5,1024,1048576,'单个附件大小默认最大为50MB。','MAX_FILE_SIZE'); |
| | | insert into lf.sys_args (name,cvalue,dvalue,min_value,max_value,times,descr,mark) values ('用户访问量',5000,5000,5,1000000,1,'当超出用户访问量时,就拒绝登录。','MAX_USER_LOGIN'); |
| | | insert into lf.sys_args (name,cvalue,dvalue,min_value,max_value,times,descr,mark) values ('服务上限',5000,5000,5,1000000,1,'当超出服务上限时,就拒绝访问。','MAX_SERVERS'); */ |
| | | |
| | | select * from lf.sys_args; |
| | | select * from lf.sys_args order by id; |
| | | ----------------------------------------------------------------------------------------------------- 25.黑名单表 |
| | | -- DROP TABLE IF EXISTS lf.sys_blacklist; |
| | | create table lf.sys_blacklist( |
| | |
| | | public void run(ApplicationArguments args) { |
| | | // noinspection AlibabaRemoveCommentedCode |
| | | try { |
| | | // GDAL测试:"E:\\data\\7.Insar\\insartest.tif","E:\\data\\6.高光谱\\GF5_Cut_1.img","E:\\data\\22.tif\\110.747 sq km.tif","E:\\Test\\Test.gdb" |
| | | //GdalHelper.readTif("E:\\data\\7.Insar\\insartest.tif") |
| | | //GdalHelper.readShp("E:\\data\\13.cppe\\shps\\addr.shp"); |
| | | //GdalHelper.readGdb("E:\\Test\\addr.gdb"); |
| | | //ShpRecord sr = GdalHelper.readShpFirstRecord("D:\\LF\\data\\shp\\extent.shp"); |
| | | |
| | | //GdalHelper.readShpFirstRecord("D:\\LF\\data\\shp\\extent.shp"); |
| | | //com.lf.server.helper.RsaHelper.generate(); |
| | | //testMybatisPlus(); |
| | | //testAes(); |
| | | //testPerms(); |
| | | //testBlacklist(); |
| | | //FloatServerController.test(); |
| | | //testReadExcel(); |
| | | //testBatchUpdate(); |
| | | //testAccess(); |
| | | //testMd5(); |
| | | |
| | | //testReadExcel(); |
| | | //boolean f1 = ZipHelper.unzip("D:\\LF\\data\\resources.zip", "D:\\LF\\data\\unzip"); |
| | | //boolean f2 = ZipHelper.zip("D:\\LF\\data\\res.zip", "D:\\LF\\data\\unzip\\resources"); |
| | | //boolean f3 = Zip4jHelper.zip("D:\\LF\\data\\zip\\resources.zip", "D:\\LF\\data\\zip\\resources", "12345"); |
| | |
| | | import com.lf.server.annotation.SysLog; |
| | | import com.lf.server.config.PropertiesConfig; |
| | | 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.LoginEntity; |
| | | import com.lf.server.entity.sys.TokenEntity; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.helper.*; |
| | | import com.lf.server.service.all.ScheduleService; |
| | | import com.lf.server.service.sys.LoginService; |
| | | import com.lf.server.service.sys.TokenService; |
| | | import com.lf.server.service.sys.UserService; |
| | |
| | | |
| | | @Autowired |
| | | PropertiesConfig propertiesConfig; |
| | | |
| | | @Autowired |
| | | private ScheduleService scheduleService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "跳转首页") |
| | |
| | | return fail("密码不正确", null); |
| | | } |
| | | |
| | | int onlineUser = scheduleService.countOnlineUsers(); |
| | | if (onlineUser >= SettingData.MAX_USER_LOGIN) { |
| | | return fail("达到用户访问量上限,拒绝登录", null); |
| | | } |
| | | |
| | | LoginEntity le = loginService.getNewLogin(ue.getId(), 1, 1, 1, req); |
| | | Integer rows = loginService.insertLogin(le); |
| | | if (rows == 0) { |
| | |
| | | * 附件大小:B |
| | | */ |
| | | public static long MAX_FILE_SIZE = 50 * 1024 * 1024; |
| | | |
| | | /** |
| | | * 用户访问量 |
| | | */ |
| | | public static int MAX_USER_LOGIN; |
| | | |
| | | /** |
| | | * 服务上限 |
| | | */ |
| | | public static int MAX_SERVERS; |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * 统计在线用户数 |
| | | * @return |
| | | */ |
| | | public int countOnlineUsers() { |
| | | Set<String> keys = redisTemplate.keys(RedisCacheKey.signUserKey("*")); |
| | | |
| | | return null == keys ? 0 : keys.size(); |
| | | } |
| | | |
| | | /** |
| | | * 查询服务资源状态 |
| | | */ |
| | | public List<ResEntity> selectResStatus() { |