From 85742c09c51835e28643a08fccd047d4ae3ad420 Mon Sep 17 00:00:00 2001 From: qi_liang Date: Sat, 2 May 2020 17:03:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/lq/cms/vo/BasePageVo.java | 8 +++-- src/main/java/com/lq/cms/vo/PermissionVo.java | 20 +++++++++--- .../java/com/lq/cms/vo/SysResourceVo.java | 16 +++++++--- .../lq/code/interceptor/PageInteceptor.java | 12 ++++--- .../com/lq/code/util/jdbc/mode/Column.java | 14 +++++--- .../com/lq/code/util/os/mode/JvmInfo.java | 16 +++++++--- .../java/com/lq/code/util/os/mode/OsInfo.java | 15 ++++++--- src/main/java/com/lq/webUtil/util/IPUtil.java | 32 ++++++++++++++++--- .../java/com/lq/wechat/util/MediaUtil.java | 27 ++-------------- 9 files changed, 103 insertions(+), 57 deletions(-) diff --git a/src/main/java/com/lq/cms/vo/BasePageVo.java b/src/main/java/com/lq/cms/vo/BasePageVo.java index 49be2e2..567f145 100755 --- a/src/main/java/com/lq/cms/vo/BasePageVo.java +++ b/src/main/java/com/lq/cms/vo/BasePageVo.java @@ -7,9 +7,13 @@ import com.lq.code.util.sql.PageInterface; */ public class BasePageVo implements PageInterface { - //页码 + /** + * 页码 + */ private Integer page; - //行数 + /** + * 行数 + */ private Integer rows; @Override diff --git a/src/main/java/com/lq/cms/vo/PermissionVo.java b/src/main/java/com/lq/cms/vo/PermissionVo.java index 5b5b88a..c8b2c3c 100755 --- a/src/main/java/com/lq/cms/vo/PermissionVo.java +++ b/src/main/java/com/lq/cms/vo/PermissionVo.java @@ -1,17 +1,27 @@ package com.lq.cms.vo; /** - * Created by qi_liang on 2018/1/25. + * 权限视图 + * @author qi + * */ public class PermissionVo { - //目录ID + /** + * 目录ID + */ private Long menuId; - //目录名称 + /** + * 目录名称 + */ private String menuName; - //目录URL + /** + * 目录UR + */ private String menuUrl; - //权限名称 + /** + *权限名称 + */ private String permissionName; public Long getMenuId() { diff --git a/src/main/java/com/lq/cms/vo/SysResourceVo.java b/src/main/java/com/lq/cms/vo/SysResourceVo.java index c1b31b3..88ff186 100755 --- a/src/main/java/com/lq/cms/vo/SysResourceVo.java +++ b/src/main/java/com/lq/cms/vo/SysResourceVo.java @@ -5,7 +5,8 @@ import com.lq.code.util.DateUtil; import java.util.Date; /** - * Created by qi_liang on 2018/1/27. + * 菜单视图 + * @author qi */ public class SysResourceVo extends BasePageVo{ @@ -28,13 +29,20 @@ public class SysResourceVo extends BasePageVo{ private String updateTimeStr; private Integer status; - //菜单名称 + /** + * 菜单名称 + */ private String menuName; private Long parentId; - //上级菜单名称 + /** + * 上级菜单名称 + */ + private String parentMenuName; - //菜单图标 + /** + * 菜单图标 + */ private String menuIco; public Long getId() { diff --git a/src/main/java/com/lq/code/interceptor/PageInteceptor.java b/src/main/java/com/lq/code/interceptor/PageInteceptor.java index 4f5fed9..554fbdc 100755 --- a/src/main/java/com/lq/code/interceptor/PageInteceptor.java +++ b/src/main/java/com/lq/code/interceptor/PageInteceptor.java @@ -30,10 +30,14 @@ import java.util.Properties; }) public class PageInteceptor implements Interceptor { - //数据库类型 - private static String dialect; - //需要拦截的sqlID - private static String pageSqlId; + /** + * 数据库类型 + */ + private String dialect; + /** + * 需要拦截的sqlID + */ + private String pageSqlId; diff --git a/src/main/java/com/lq/code/util/jdbc/mode/Column.java b/src/main/java/com/lq/code/util/jdbc/mode/Column.java index 82b5948..ac72790 100755 --- a/src/main/java/com/lq/code/util/jdbc/mode/Column.java +++ b/src/main/java/com/lq/code/util/jdbc/mode/Column.java @@ -2,7 +2,7 @@ package com.lq.code.util.jdbc.mode; /** * 列 - * Created by qi_liang on 2018/6/2. + * @author qi */ public class Column { @@ -37,11 +37,17 @@ public class Column { * 列名 */ private String columnName; - // 列大小 + /** + * 列大小 + */ private Integer columnSize; - //默认值 + /** + * 默认值 + */ private String columnDef; - //备注 + /** + * 备注 + */ private String remarks; public String getColumnName() { diff --git a/src/main/java/com/lq/code/util/os/mode/JvmInfo.java b/src/main/java/com/lq/code/util/os/mode/JvmInfo.java index 2e604c0..df94cba 100755 --- a/src/main/java/com/lq/code/util/os/mode/JvmInfo.java +++ b/src/main/java/com/lq/code/util/os/mode/JvmInfo.java @@ -1,14 +1,22 @@ package com.lq.code.util.os.mode; /** - * Created by qi_liang on 2018/6/10. + * jvm 详情 + * @author qi + * */ public class JvmInfo { - //版本号 + /** + * 版本号 + */ private String version; - //总内存 + /** + * 总内存 + */ private Long totalMemory; - //可以使用处理器个数 + /** + * 可以使用处理器个数 + */ private Integer cupNum; public String getVersion() { diff --git a/src/main/java/com/lq/code/util/os/mode/OsInfo.java b/src/main/java/com/lq/code/util/os/mode/OsInfo.java index 4f341df..bbdd964 100755 --- a/src/main/java/com/lq/code/util/os/mode/OsInfo.java +++ b/src/main/java/com/lq/code/util/os/mode/OsInfo.java @@ -1,15 +1,22 @@ package com.lq.code.util.os.mode; /** - * Created by qi_liang on 2018/6/10. + * 系统详情 + * @author qi */ public class OsInfo { - //操作系统名称 + /** + * 操作系统名称 + */ private String osName; - //操作系统版本号 + /** + * 操作系统版本号 + */ private String osVersion; - //操作系统架构 + /** + * 操作系统架构 + */ private String arch; public String getOsName() { diff --git a/src/main/java/com/lq/webUtil/util/IPUtil.java b/src/main/java/com/lq/webUtil/util/IPUtil.java index 2a886d5..cfb1306 100755 --- a/src/main/java/com/lq/webUtil/util/IPUtil.java +++ b/src/main/java/com/lq/webUtil/util/IPUtil.java @@ -14,6 +14,28 @@ public class IPUtil { * 未知ip */ public static final String IP_UNKNOWM = "unknown"; + /** + * 操作系统-windows + */ + public static final String OS_WINDOWS = "windows"; + /** + * 操作系统-mac + */ + public static final String OS_MAC = "mac"; + /** + * 操作系统-linux + */ + public static final String OS_LINUX = "x11"; + + /** + * 操作系统-android + */ + public static final String OS_ANDROID = "android"; + /** + * 操作系统-iphone + */ + public static final String OS_IPHONE = "iphone"; + public static String getIP(HttpServletRequest request){ @@ -67,19 +89,19 @@ public class IPUtil { String browser = ""; //=================OS Info======================= - if (userAgent.toLowerCase().indexOf("windows") >= 0 ) + if (userAgent.toLowerCase().indexOf(OS_WINDOWS) >= 0 ) { os = "Windows"; - } else if(userAgent.toLowerCase().indexOf("mac") >= 0) + } else if(userAgent.toLowerCase().indexOf(OS_MAC) >= 0) { os = "Mac"; - } else if(userAgent.toLowerCase().indexOf("x11") >= 0) + } else if(userAgent.toLowerCase().indexOf(OS_LINUX) >= 0) { os = "Unix"; - } else if(userAgent.toLowerCase().indexOf("android") >= 0) + } else if(userAgent.toLowerCase().indexOf(OS_ANDROID) >= 0) { os = "Android"; - } else if(userAgent.toLowerCase().indexOf("iphone") >= 0) + } else if(userAgent.toLowerCase().indexOf(OS_IPHONE) >= 0) { os = "IPhone"; }else{ diff --git a/src/main/java/com/lq/wechat/util/MediaUtil.java b/src/main/java/com/lq/wechat/util/MediaUtil.java index 09aacff..1a60913 100755 --- a/src/main/java/com/lq/wechat/util/MediaUtil.java +++ b/src/main/java/com/lq/wechat/util/MediaUtil.java @@ -1,39 +1,16 @@ package com.lq.wechat.util; -import java.io.File; -import java.util.HashMap; -import java.util.Map; - /** * 微信公众号素材工具类 * Created by qi_liang on 2018/5/24. */ public class MediaUtil { - //临时素材上传接口 - private static final String MEIDA_TEMPORARY_UPLOAD_URL = "https://api.weixin.qq.com/cgi-bin/media/upload?access_token=ACCESS_TOKEN&type=TYPE"; - /** - * 上传素材 - * @return + * 临时素材上传接口 */ - public static String upLoadMedia(){ - - return ""; - } + private static final String MEIDA_TEMPORARY_UPLOAD_URL = "https://api.weixin.qq.com/cgi-bin/media/upload?access_token=ACCESS_TOKEN&type=TYPE"; - public static void main(String[] args) { - Map params = new HashMap(); - File file = new File(""); - params.put("file",file); - params.put("accessTokne","测试"); - - for (String key:params.keySet()){ - Class clazz = params.get(key).getClass(); - System.out.println(clazz.getName()); - } - - } }