diff --git a/src/main/java/cn/hellohao/auth/filter/SubjectFilter.java b/src/main/java/cn/hellohao/auth/filter/SubjectFilter.java index 9388e58..e04b4f6 100644 --- a/src/main/java/cn/hellohao/auth/filter/SubjectFilter.java +++ b/src/main/java/cn/hellohao/auth/filter/SubjectFilter.java @@ -35,7 +35,6 @@ public class SubjectFilter extends BasicHttpAuthenticationFilter { String serviceName = httpServletRequest.getServletPath();//获取接口 String Users_Origin = httpServletRequest.getHeader("usersOrigin"); String token = httpServletRequest.getHeader("Authorization"); - //验证前端域名 if(httpServletRequest.getMethod().equals("POST") && !serviceName.contains("/api") && !serviceName.contains("/verifyCode") && !serviceName.contains("/getClientVersion") && !serviceName.contains("/client")){ try{ @@ -75,7 +74,6 @@ public class SubjectFilter extends BasicHttpAuthenticationFilter { Subject subject = SecurityUtils.getSubject(); UsernamePasswordToken tokenOBJ = new UsernamePasswordToken(userData.getEmail(),userData.getPassword()); tokenOBJ.setRememberMe(true); - //执行登录方法,如果没有异常,说明登录成功 subject.login(tokenOBJ); SecurityUtils.getSubject().getSession().setTimeout(3600000); User loginUser = (User) SecurityUtils.getSubject().getPrincipal(); @@ -102,7 +100,6 @@ public class SubjectFilter extends BasicHttpAuthenticationFilter { subject.login(tokenOBJ); SecurityUtils.getSubject().getSession().setTimeout(3600000);//一小时 } catch (Exception e) { -// System.err.println("拦截器,登录失败,false"); this.CODE = "403"; return false; } diff --git a/src/main/java/cn/hellohao/dao/CodeMapper.java b/src/main/java/cn/hellohao/dao/CodeMapper.java index 38773ff..ad9be75 100644 --- a/src/main/java/cn/hellohao/dao/CodeMapper.java +++ b/src/main/java/cn/hellohao/dao/CodeMapper.java @@ -9,13 +9,9 @@ import java.util.List; @Mapper public interface CodeMapper { - //查询扩容码 List selectCode(@Param("code") String code); Code selectCodekey(@Param("code") String code); - //Integer selectCodekey(@Param("value") String value); - //添加 Integer addCode(Code code); - //删除扩容码 Integer deleteCode(@Param("code") String code); } diff --git a/src/main/java/cn/hellohao/dao/KeysMapper.java b/src/main/java/cn/hellohao/dao/KeysMapper.java index 5ef4093..94e8d21 100644 --- a/src/main/java/cn/hellohao/dao/KeysMapper.java +++ b/src/main/java/cn/hellohao/dao/KeysMapper.java @@ -9,11 +9,9 @@ import java.util.List; @Mapper public interface KeysMapper { - //查询密钥 Keys selectKeys(@Param("id") Integer id); List getStorageName(); List getStorage(); - //修改key Integer updateKey(Keys key); List getKeys(); diff --git a/src/main/java/cn/hellohao/pojo/Msg.java b/src/main/java/cn/hellohao/pojo/Msg.java index 57a2804..0fa99ba 100644 --- a/src/main/java/cn/hellohao/pojo/Msg.java +++ b/src/main/java/cn/hellohao/pojo/Msg.java @@ -11,16 +11,12 @@ public class Msg implements Serializable { private static final long serialVersionUID = 5196249482551119279L; - //返回码 private String code ="200"; - //提示信息 private String info="操作成功"; - //返回数据 private Object data; - //异常 private String exceptions; diff --git a/src/main/java/cn/hellohao/service/impl/UploadServicel.java b/src/main/java/cn/hellohao/service/impl/UploadServicel.java index 4058cef..2487fa5 100644 --- a/src/main/java/cn/hellohao/service/impl/UploadServicel.java +++ b/src/main/java/cn/hellohao/service/impl/UploadServicel.java @@ -415,8 +415,6 @@ public class UploadServicel { public static String plusDay(int setday) { Date d = new Date(); SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - String currdate = format.format(d); - System.out.println("现在的日期是:" + currdate); Calendar ca = Calendar.getInstance(); ca.setTime(d); ca.add(Calendar.DATE, setday); // num为增加的天数,可以改变的 diff --git a/src/main/java/cn/hellohao/utils/FirstRun.java b/src/main/java/cn/hellohao/utils/FirstRun.java index c12ab06..8fbd963 100644 --- a/src/main/java/cn/hellohao/utils/FirstRun.java +++ b/src/main/java/cn/hellohao/utils/FirstRun.java @@ -145,7 +145,6 @@ public class FirstRun implements InitializingBean { //检查表是否存在,后边加'imgdata' and column_name = 'explains' 检查字段是否存在 private String isTableName = "SELECT count(table_name) FROM information_schema.TABLES WHERE TABLE_SCHEMA='tbed' and table_name ="; private String judgeTable = "select count(*) from information_schema.columns where TABLE_SCHEMA='tbed' and table_name = "; - //创建blacklist 2019-11-29 private String sql0 = "alter table `keys` add (Region varchar(255) DEFAULT null,RootPath varchar(255) DEFAULT '/');"; private String sql1 = "select count(*) from information_schema.columns where table_name = 'uploadconfig' and column_name = 'blacklist'"; diff --git a/src/main/java/cn/hellohao/utils/ImgUrlUtil.java b/src/main/java/cn/hellohao/utils/ImgUrlUtil.java index 4fc01db..ceb7c67 100644 --- a/src/main/java/cn/hellohao/utils/ImgUrlUtil.java +++ b/src/main/java/cn/hellohao/utils/ImgUrlUtil.java @@ -75,7 +75,7 @@ public class ImgUrlUtil { throw new Exception("ResponseCode is not begin with 2,code="+code); } map.put("Check","true"); - System.out.println("连接正常"); +// System.out.println("连接正常"); }catch(Exception ex){ System.out.println(ex.getMessage()); }