diff --git a/src/main/java/com/lq/code/executor/processor/InstantiationTracingBeanPostProcessor.java b/src/main/java/com/lq/code/executor/processor/InstantiationTracingBeanPostProcessor.java index 2edb3cb..fc0053c 100755 --- a/src/main/java/com/lq/code/executor/processor/InstantiationTracingBeanPostProcessor.java +++ b/src/main/java/com/lq/code/executor/processor/InstantiationTracingBeanPostProcessor.java @@ -48,7 +48,7 @@ public class InstantiationTracingBeanPostProcessor implements ApplicationListene AbstractDbBuiler dbBuiler = new MysqlBuilder(); // String sql = dbBuiler.automaticUpdateDbNew(queueDto); String sql = dbBuiler.automaticUpdateDb(set); - // JdbcUtils.createTable(sql); + JdbcUtils.createTable(sql); System.out.println("=========实体同步数据结构==========="); System.out.println(System.currentTimeMillis()-startTime); } diff --git a/src/main/java/com/lq/code/interceptor/shiro/ShiroRealm.java b/src/main/java/com/lq/code/interceptor/shiro/ShiroRealm.java index 358c04e..f271a58 100755 --- a/src/main/java/com/lq/code/interceptor/shiro/ShiroRealm.java +++ b/src/main/java/com/lq/code/interceptor/shiro/ShiroRealm.java @@ -24,7 +24,6 @@ import java.util.List; */ public class ShiroRealm extends AuthorizingRealm { - @Autowired private SysUserService sysUserService; @Autowired diff --git a/src/main/java/com/lq/code/web/BaseController.java b/src/main/java/com/lq/code/web/BaseController.java index a6c8f05..8b60df7 100755 --- a/src/main/java/com/lq/code/web/BaseController.java +++ b/src/main/java/com/lq/code/web/BaseController.java @@ -13,7 +13,7 @@ public class BaseController { @ResponseBody public AjaxResult handleException(Exception e) { e.printStackTrace(); - AjaxResult ajaxResult= getAjaxResult(); + AjaxResult ajaxResult= getAjaxResult(); ajaxResult.setSuccess(false); ajaxResult.setMsg(e.getMessage()); return ajaxResult; diff --git a/src/main/java/com/lq/dao/WechatRuleMessageDao.java b/src/main/java/com/lq/dao/WechatRuleMessageDao.java index c39c5ed..57e3434 100644 --- a/src/main/java/com/lq/dao/WechatRuleMessageDao.java +++ b/src/main/java/com/lq/dao/WechatRuleMessageDao.java @@ -2,6 +2,13 @@ package com.lq.dao; import com.lq.code.dao.BaseDao; import com.lq.entity.WechatRuleMessage; +import org.apache.ibatis.annotations.Param; + +import java.util.List; public interface WechatRuleMessageDao extends BaseDao { + + WechatRuleMessage getByRuleIdAndMessageId(@Param("ruleId")Long ruleId,@Param("messageId")Long messageId); + + List findByWechatRuleId(@Param("wechatRuleId")Long wechatRuleId); } diff --git a/src/main/java/com/lq/entity/SysPermission.java b/src/main/java/com/lq/entity/SysPermission.java index 5de565f..9601414 100755 --- a/src/main/java/com/lq/entity/SysPermission.java +++ b/src/main/java/com/lq/entity/SysPermission.java @@ -14,7 +14,7 @@ public class SysPermission extends IdEntity{ /** * 权限类型 */ - private int permissionType; + private Integer permissionType; /**· * 权限键值 */ diff --git a/src/main/java/com/lq/entity/WechatInfoSetting.java b/src/main/java/com/lq/entity/WechatInfoSetting.java new file mode 100644 index 0000000..fc0a68e --- /dev/null +++ b/src/main/java/com/lq/entity/WechatInfoSetting.java @@ -0,0 +1,23 @@ +package com.lq.entity; + +import com.lq.code.entity.IdEntity; + +/** + * 微信公众号设置表 + */ +public class WechatInfoSetting extends IdEntity { + + /** + * 微信公众号ID + */ + private Long wechatInfoId; + + + public Long getWechatInfoId() { + return wechatInfoId; + } + + public void setWechatInfoId(Long wechatInfoId) { + this.wechatInfoId = wechatInfoId; + } +} diff --git a/src/main/java/com/lq/entity/WechatRuleMessage.java b/src/main/java/com/lq/entity/WechatRuleMessage.java index bcfcc39..988b1d0 100644 --- a/src/main/java/com/lq/entity/WechatRuleMessage.java +++ b/src/main/java/com/lq/entity/WechatRuleMessage.java @@ -19,6 +19,10 @@ public class WechatRuleMessage extends IdEntity { * 微信公众号消息ID */ private Long wechatMessageId; + /** + * 创建时间 + */ + private Date createTime; public Long getWechatRuleId() { return wechatRuleId; @@ -35,4 +39,12 @@ public class WechatRuleMessage extends IdEntity { public void setWechatMessageId(Long wechatMessageId) { this.wechatMessageId = wechatMessageId; } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } } diff --git a/src/main/resources/dev/jdbc.properties b/src/main/resources/dev/jdbc.properties index cf92f01..2087517 100644 --- a/src/main/resources/dev/jdbc.properties +++ b/src/main/resources/dev/jdbc.properties @@ -1,6 +1,6 @@ #--------- jdbc 配置--------- jdbc.driver=com.mysql.jdbc.Driver -jdbc.url=jdbc:mysql://localhost:3306/ssm?useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8 +jdbc.url=jdbc:mysql://192.168.31.110:3306/ssm?useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8 jdbc.user=root jdbc.password=mysql #--------数据库连接池配置 ------- diff --git a/src/main/resources/dev/redis.properties b/src/main/resources/dev/redis.properties index 80be888..80de386 100644 --- a/src/main/resources/dev/redis.properties +++ b/src/main/resources/dev/redis.properties @@ -1,4 +1,4 @@ -redis.host=127.0.0.1 +redis.host=192.168.31.110 redis.port=6379 redis.pass= redis.timeout=-1 diff --git a/src/main/resources/mybatis/mapping/WechatRuleMessageDao.xml b/src/main/resources/mybatis/mapping/WechatRuleMessageDao.xml index ea47bb5..5da2f9f 100644 --- a/src/main/resources/mybatis/mapping/WechatRuleMessageDao.xml +++ b/src/main/resources/mybatis/mapping/WechatRuleMessageDao.xml @@ -6,7 +6,7 @@ - wechat_rule_id,id,wechat_message_id,status + wechat_rule_id,id,wechat_message_id,status,create_time + SELECT + FROM wechat_rule_message + WHERE status = 1 + AND wechat_message_id = #{messageId} + AND wechat_rule_id = #{ruleId} + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapping/说明.txt b/src/main/resources/mybatis/mapping/说明.txt deleted file mode 100644 index 79b0a69..0000000 --- a/src/main/resources/mybatis/mapping/说明.txt +++ /dev/null @@ -1,32 +0,0 @@ -1.数据库表与mapping.xml一一对应。 -2.dao层代码密度低,dao层代码尽量通用,以工具类形式使用。便于代码重用 -3.service 通过组合复用dao层工具类,实现业务逻辑 -4.controller 只负责简单的数据接受和转发。以及页面跳转的控制 - -mapping xml 文件模板 - - - - - - - - - - - - SELECT LAST_INSERT_ID() - - INSERT INTO - - VALUES - - - - - - diff --git a/src/main/resources/pro/jdbc.properties b/src/main/resources/pro/jdbc.properties index 0f28bcc..537c374 100644 --- a/src/main/resources/pro/jdbc.properties +++ b/src/main/resources/pro/jdbc.properties @@ -1,6 +1,6 @@ #--------- jdbc ����--------- jdbc.driver=com.mysql.jdbc.Driver -jdbc.url=jdbc:mysql://192.168.31.110:3306/ssm?useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8 +jdbc.url=jdbc:mysql://192.168.31.19:3306/ssm?useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8 jdbc.user=root jdbc.password=mysql #--------���ݿ����ӳ����� ------- diff --git a/src/main/resources/pro/redis.properties b/src/main/resources/pro/redis.properties index f3e3342..d8a745a 100644 --- a/src/main/resources/pro/redis.properties +++ b/src/main/resources/pro/redis.properties @@ -1,4 +1,4 @@ -redis.host=192.168.31.110 +redis.host=192.168.31.19 redis.port=6379 redis.pass= redis.timeout=-1 diff --git a/src/main/webapp/WEB-INF/views/jsp/cms/wechat/rule/index.jsp b/src/main/webapp/WEB-INF/views/jsp/cms/wechat/rule/index.jsp index 3a0470a..4091fd8 100755 --- a/src/main/webapp/WEB-INF/views/jsp/cms/wechat/rule/index.jsp +++ b/src/main/webapp/WEB-INF/views/jsp/cms/wechat/rule/index.jsp @@ -275,11 +275,12 @@ var messageList = new Array(); messageSet.forEach(function (element, sameElement, set) { + console.log(element); messageList.push(element); }); messageSet.clear(); - data.messaegListStr = JSON.stringify(messageList); + data.messageListStr = JSON.stringify(messageList); data.keywordListStr = JSON.stringify(keywordObjeList); data.replyType = $("input[name='replyType']:checked").val(); data.messageText = messageText; @@ -395,21 +396,21 @@ async:false, dataType:"json", success:function(result){ + console.log(result); if(result.success==true){ index = layer.open({ type: 1, btn:['确定','取消'], btn1:function(index,layero){ messageSet = bufferSet; + console.log(messageSet); layer.close(index); }, - skin: 'layui-layer-rim', //加上边框 area: ['90%', '80%'], //宽高 btnAlign: 'c', content: appendAlertHtml(result.data), }); - }else{ layer.msg('数据加载失败'); } @@ -628,6 +629,7 @@ } function appendAlertHtml(data){ + console.log(data); var isShow ; var wechatMessageList = data.wechatMessageVoList; var html = '

图文('+data.wechatMessageCount+')

'; @@ -668,6 +670,7 @@ function onMessaegRow(obj){ var messageid = parseInt($(obj).find('input').val()); +console.log(messageid); if ($(obj).find('.chekc-Div').css('display') == 'none') { $(obj).find('.chekc-Div').show(); bufferSet.add(messageid); @@ -675,6 +678,7 @@ $(obj).find('.chekc-Div').hide(); bufferSet.delete(messageid); } +console.log(bufferSet); }