diff --git a/src/main/java/com/lq/cms/vo/SysInfoVo.java b/src/main/java/com/lq/cms/vo/SysInfoVo.java index a1b9cdd..a8491b9 100755 --- a/src/main/java/com/lq/cms/vo/SysInfoVo.java +++ b/src/main/java/com/lq/cms/vo/SysInfoVo.java @@ -9,17 +9,29 @@ import com.lq.code.util.os.mode.OsInfo; */ public class SysInfoVo { - //服务器ip + /** + * 服务器ip + */ private String sysIp; - //客服端ip + /** + * 客服端ip + */ private String userIP; - //操作系统信息 + /** + * 操作系统信息 + */ private OsInfo osInfo; - //数据库产品信息 + /** + * 数据库产品信息 + */ private DbInfo dbInfo; - //服务器版本信息 + /** + * 服务器版本信息 + */ private String serverInfo; - //jvm信息 + /** + * jvm信息 + */ private JvmInfo jvmInfo; public String getSysIp() { diff --git a/src/main/java/com/lq/code/cache/RedisShiroCache.java b/src/main/java/com/lq/code/cache/RedisShiroCache.java index ac3d14f..599412b 100644 --- a/src/main/java/com/lq/code/cache/RedisShiroCache.java +++ b/src/main/java/com/lq/code/cache/RedisShiroCache.java @@ -7,6 +7,7 @@ import org.springframework.data.redis.core.RedisTemplate; import java.util.Collection; import java.util.Set; +import java.util.concurrent.TimeUnit; /** * @Author: qi @@ -15,6 +16,11 @@ import java.util.Set; */ public class RedisShiroCache implements Cache{ + /** + * 过期时间默认2小时 + */ + private int defaultExpireTime=7200; + @Autowired private RedisTemplate redisTemplate; @@ -28,6 +34,7 @@ public class RedisShiroCache implements Cache{ @Override public V put(K k, V v) throws CacheException { redisTemplate.opsForValue().set(k,v); + redisTemplate.expire(k,this.defaultExpireTime, TimeUnit.SECONDS); return v; } diff --git a/src/main/java/com/lq/dao/WechatKeywordDao.java b/src/main/java/com/lq/dao/WechatKeywordDao.java index 089cb93..e2c6d60 100644 --- a/src/main/java/com/lq/dao/WechatKeywordDao.java +++ b/src/main/java/com/lq/dao/WechatKeywordDao.java @@ -14,4 +14,6 @@ import java.util.List; public interface WechatKeywordDao extends BaseDao{ List findByWechatRuleIdAndStatus(@Param("wechatRuleId") Long wehcatRuleId,@Param("status") Integer status); + + List findBykeywordAndWechatInfoId(@Param("keyword")String keyword,@Param("wechatInfoId")Long wechatInfoId); } diff --git a/src/main/java/com/lq/wechat/mode/message/BaseMessage.java b/src/main/java/com/lq/wechat/mode/message/BaseMessage.java index 9d8c3ee..f5bebec 100755 --- a/src/main/java/com/lq/wechat/mode/message/BaseMessage.java +++ b/src/main/java/com/lq/wechat/mode/message/BaseMessage.java @@ -2,6 +2,7 @@ package com.lq.wechat.mode.message; /** * 被动消息回复父类 + * @author qi */ public class BaseMessage { /** diff --git a/src/main/java/com/lq/wechat/web/WechatController.java b/src/main/java/com/lq/wechat/web/WechatController.java index 3ffb1c5..746bd02 100755 --- a/src/main/java/com/lq/wechat/web/WechatController.java +++ b/src/main/java/com/lq/wechat/web/WechatController.java @@ -105,7 +105,7 @@ public class WechatController extends BaseController { baseMessage.setFromUserName(wechatOpenId); baseMessage.setToUserName(openId); }else { - // + //默认回复逻辑 text.setContent("服务器繁忙!"); baseMessage = text; diff --git a/src/main/profile/dev/jdbc.properties b/src/main/profile/dev/jdbc.properties index 8741005..cf92f01 100644 --- a/src/main/profile/dev/jdbc.properties +++ b/src/main/profile/dev/jdbc.properties @@ -1,6 +1,6 @@ #--------- jdbc 配置--------- jdbc.driver=com.mysql.jdbc.Driver -jdbc.url=jdbc:mysql://192.168.31.19:3306/ssm?useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8 +jdbc.url=jdbc:mysql://localhost:3306/ssm?useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8 jdbc.user=root jdbc.password=mysql #--------数据库连接池配置 ------- diff --git a/src/main/resources/mybatis/mapping/SysRoleResourcePermissionDao.xml b/src/main/resources/mybatis/mapping/SysRoleResourcePermissionDao.xml index feaefc3..2ba4399 100644 --- a/src/main/resources/mybatis/mapping/SysRoleResourcePermissionDao.xml +++ b/src/main/resources/mybatis/mapping/SysRoleResourcePermissionDao.xml @@ -11,7 +11,7 @@ + + \ No newline at end of file diff --git a/src/main/resources/spring-import.xml b/src/main/resources/spring-import.xml index 01d8f73..1721c3c 100644 --- a/src/main/resources/spring-import.xml +++ b/src/main/resources/spring-import.xml @@ -14,7 +14,7 @@ - + \ No newline at end of file diff --git a/src/main/webapp/resources/code/images/images404.jpg b/src/main/webapp/resources/code/images/images404.jpg new file mode 100644 index 0000000..773e6f2 Binary files /dev/null and b/src/main/webapp/resources/code/images/images404.jpg differ diff --git a/src/test/java/com/lq/code/util/os/NetUtilTest.java b/src/test/java/com/lq/code/util/os/NetUtilTest.java new file mode 100644 index 0000000..2009928 --- /dev/null +++ b/src/test/java/com/lq/code/util/os/NetUtilTest.java @@ -0,0 +1,20 @@ +package com.lq.code.util.os; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class NetUtilTest { + + @Test + public void getIP() { + String serverIp = NetUtil.getIP(); + System.out.println(serverIp); + } + + @Test + public void getLocalIpAddr() { + String serverIp = NetUtil.getLocalIpAddr(); + System.out.println(serverIp); + } +} \ No newline at end of file