From 5899a568dc19e6c85d7d398e233ba0549184de21 Mon Sep 17 00:00:00 2001 From: qi_liang Date: Wed, 22 Jan 2020 20:26:31 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E8=A1=A5=E5=85=85=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/dao/AdminBaseDao.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/main/java/com/lq/cms/dao/AdminBaseDao.java b/src/main/java/com/lq/cms/dao/AdminBaseDao.java index 1a2ea7d..6624802 100755 --- a/src/main/java/com/lq/cms/dao/AdminBaseDao.java +++ b/src/main/java/com/lq/cms/dao/AdminBaseDao.java @@ -5,10 +5,25 @@ import com.lq.code.dao.BaseDao; import java.util.List; +/** + * @author qi + * @param 实体类 + * @param 视图实体 + */ public interface AdminBaseDao extends BaseDao { + /** + * 带参数分页查询 + * @param vo + * @return + */ List findListPage(V vo); + /** + * 参数统计 + * @param vo + * @return + */ int count(V vo); } From f4335a1ab5bbaa82f55aec1c01a76f68273632f3 Mon Sep 17 00:00:00 2001 From: qi_liang Date: Thu, 27 Feb 2020 23:49:48 +0800 Subject: [PATCH 02/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E8=BF=9E=E6=8E=A5=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/profile/dev/jdbc.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/profile/dev/jdbc.properties b/src/main/profile/dev/jdbc.properties index cf92f01..2087517 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://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 #--------数据库连接池配置 ------- From d09f54d66c6eb657926e65c55f2cdb1ada17f1db Mon Sep 17 00:00:00 2001 From: qi_liang Date: Thu, 27 Feb 2020 23:51:57 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../processor/InstantiationTracingBeanPostProcessor.java | 1 + 1 file changed, 1 insertion(+) 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 edbce5f..613e41f 100755 --- a/src/main/java/com/lq/code/executor/processor/InstantiationTracingBeanPostProcessor.java +++ b/src/main/java/com/lq/code/executor/processor/InstantiationTracingBeanPostProcessor.java @@ -13,6 +13,7 @@ import org.springframework.context.event.ContextRefreshedEvent; import java.util.Set; /** + * 扫描实体类自动同步表结构类 * @author qi */ public class InstantiationTracingBeanPostProcessor implements ApplicationListener { From fec9028b507eeb76f60ab9ec6851f0ed5988e7bf Mon Sep 17 00:00:00 2001 From: qi_liang Date: Thu, 27 Feb 2020 23:56:38 +0800 Subject: [PATCH 04/11] =?UTF-8?q?=E6=96=B0=E5=A2=9E=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/dao/SysFileDao.java | 2 ++ src/main/java/com/lq/dao/SysLogDao.java | 12 ++++++++++ .../java/com/lq/dao/SysPermissionDao.java | 2 ++ src/main/java/com/lq/dao/SysResourceDao.java | 22 +++++++++++++++++++ 4 files changed, 38 insertions(+) diff --git a/src/main/java/com/lq/dao/SysFileDao.java b/src/main/java/com/lq/dao/SysFileDao.java index c779862..1ff5643 100755 --- a/src/main/java/com/lq/dao/SysFileDao.java +++ b/src/main/java/com/lq/dao/SysFileDao.java @@ -5,6 +5,8 @@ import com.lq.entity.SysFile; /** * Created by qi_liang on 2018/3/25. + * 文件管理类 + * @author qi */ public interface SysFileDao extends BaseDao { } diff --git a/src/main/java/com/lq/dao/SysLogDao.java b/src/main/java/com/lq/dao/SysLogDao.java index 44520ef..ce553cb 100755 --- a/src/main/java/com/lq/dao/SysLogDao.java +++ b/src/main/java/com/lq/dao/SysLogDao.java @@ -8,10 +8,22 @@ import java.util.List; /** * Created by qi on 2017/7/27. + * @author qi + * 系统日志类 */ public interface SysLogDao extends BaseDao{ + /** + * 参数分页查询 + * @param vo + * @return + */ List findListPage(SysLogVo vo); + /** + * 参数统计 + * @param vo + * @return + */ Integer count(SysLogVo vo); } diff --git a/src/main/java/com/lq/dao/SysPermissionDao.java b/src/main/java/com/lq/dao/SysPermissionDao.java index d4c70d4..74f6260 100755 --- a/src/main/java/com/lq/dao/SysPermissionDao.java +++ b/src/main/java/com/lq/dao/SysPermissionDao.java @@ -9,6 +9,8 @@ import java.util.List; /** * Created by qi on 2017-11-29. + * @author qi + * 系统权限 */ public interface SysPermissionDao extends BaseDao{ /** diff --git a/src/main/java/com/lq/dao/SysResourceDao.java b/src/main/java/com/lq/dao/SysResourceDao.java index bdccb6e..8ae793c 100755 --- a/src/main/java/com/lq/dao/SysResourceDao.java +++ b/src/main/java/com/lq/dao/SysResourceDao.java @@ -10,6 +10,8 @@ import java.util.Map; /** * Created by qi on 2017-11-29. + * @author qi + * 菜单资源类 */ public interface SysResourceDao extends BaseDao { /** @@ -19,12 +21,32 @@ public interface SysResourceDao extends BaseDao { */ List findByParentId(@Param("parentId") Long parentId); + /** + * 参数查询 + * @param vo + * @return + */ List findList(SysResourceVo vo); + /** + * 参数查询实体类 + * @param vo + * @return + */ List findListPage(SysResourceVo vo); + /** + * 参数统计 + * @param vo + * @return + */ Integer count(SysResourceVo vo); + /** + * + * @param map + * @return + */ List findMenu(Map map); } From 32ba103dd25a29edd9109305df6b84136ad00971 Mon Sep 17 00:00:00 2001 From: qi_liang Date: Fri, 28 Feb 2020 00:20:33 +0800 Subject: [PATCH 05/11] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/lq/cms/service/impl/WechatMessageServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/lq/cms/service/impl/WechatMessageServiceImpl.java b/src/main/java/com/lq/cms/service/impl/WechatMessageServiceImpl.java index 0705ab1..2571e52 100755 --- a/src/main/java/com/lq/cms/service/impl/WechatMessageServiceImpl.java +++ b/src/main/java/com/lq/cms/service/impl/WechatMessageServiceImpl.java @@ -27,9 +27,9 @@ public class WechatMessageServiceImpl extends AdminBaseServiceImpl findAllWechatMessageVo(WechatMessageVo wechatMessageVo) { - List wechatMessageVoList = new ArrayList<>(); - List wechatMessageList = wechatMessageDao.findAllByWechatMessageVo(wechatMessageVo); + List wechatMessageList = wechatMessageDao.findAllByWechatMessageVo(wechatMessageVo); + List wechatMessageVoList = new ArrayList<>(wechatMessageList.size()); wechatMessageList.forEach(wechatMessage -> { WechatMessageVo wechatMessageVo1 = new WechatMessageVo(); BeanUtil.copyNotNull(wechatMessageVo1,wechatMessage); From f31520239def922a1ace479ac0e21327bbfa7671 Mon Sep 17 00:00:00 2001 From: qi_liang Date: Fri, 28 Feb 2020 00:20:51 +0800 Subject: [PATCH 06/11] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/lq/cms/service/SysRoleResourcePermissionService.java | 2 ++ src/main/java/com/lq/cms/service/WechatMessageService.java | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/lq/cms/service/SysRoleResourcePermissionService.java b/src/main/java/com/lq/cms/service/SysRoleResourcePermissionService.java index f3604a0..450bd0b 100755 --- a/src/main/java/com/lq/cms/service/SysRoleResourcePermissionService.java +++ b/src/main/java/com/lq/cms/service/SysRoleResourcePermissionService.java @@ -10,6 +10,8 @@ import java.util.List; /** * Created by qi_liang on 2018/6/21. + * @author qi + * 角色菜单权限关联类 */ public interface SysRoleResourcePermissionService extends BaseService { diff --git a/src/main/java/com/lq/cms/service/WechatMessageService.java b/src/main/java/com/lq/cms/service/WechatMessageService.java index fa22686..682ecc9 100755 --- a/src/main/java/com/lq/cms/service/WechatMessageService.java +++ b/src/main/java/com/lq/cms/service/WechatMessageService.java @@ -5,7 +5,10 @@ import com.lq.entity.WechatMessage; import java.util.List; - +/** + * 微信消息事务类 + * @author qi + */ public interface WechatMessageService extends AdminBaseService { List findAllWechatMessageVo(WechatMessageVo wechatMessageVo); From 833e018b706e05d472a9ead987d74122e1a1e73d Mon Sep 17 00:00:00 2001 From: qi_liang Date: Fri, 28 Feb 2020 01:00:56 +0800 Subject: [PATCH 07/11] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=83=A8=E5=88=86?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/lq/cms/service/SysRoleService.java | 25 ++- .../java/com/lq/code/annotation/Length.java | 1 + .../java/com/lq/code/entity/AjaxResult.java | 31 +++- .../jms/service/impl/ProductServiceImpl.java | 2 +- .../com/lq/wechat/web/WechatController.java | 170 ++++++++---------- 5 files changed, 126 insertions(+), 103 deletions(-) diff --git a/src/main/java/com/lq/cms/service/SysRoleService.java b/src/main/java/com/lq/cms/service/SysRoleService.java index 2f7850c..8809433 100755 --- a/src/main/java/com/lq/cms/service/SysRoleService.java +++ b/src/main/java/com/lq/cms/service/SysRoleService.java @@ -12,14 +12,37 @@ import java.util.List; * 角色事务类 */ public interface SysRoleService extends BaseService { - + /** + * 参数统计 + * @param vo + * @return + */ Integer count(SysRoleVo vo); + /** + * 参数分页查询 + * @param vo + * @return + */ List findListPage(SysRoleVo vo); + /** + * + * @param userId + * @return + */ List findAllRoleVo(Long userId); + /** + * 通过用户ID查询角色 + * @param userId + * @return + */ List findByUserId(Long userId); + /** + * 通过角色ID删除角色 + * @param roleId + */ void deleteRole(Long roleId); } diff --git a/src/main/java/com/lq/code/annotation/Length.java b/src/main/java/com/lq/code/annotation/Length.java index 017ce4f..c8be883 100755 --- a/src/main/java/com/lq/code/annotation/Length.java +++ b/src/main/java/com/lq/code/annotation/Length.java @@ -4,6 +4,7 @@ import java.lang.annotation.*; /** * Created by qi_liang on 2018/4/26. + * @author qi */ @Documented @Target(ElementType.FIELD) diff --git a/src/main/java/com/lq/code/entity/AjaxResult.java b/src/main/java/com/lq/code/entity/AjaxResult.java index ad14119..5bcf88a 100755 --- a/src/main/java/com/lq/code/entity/AjaxResult.java +++ b/src/main/java/com/lq/code/entity/AjaxResult.java @@ -2,13 +2,20 @@ package com.lq.code.entity; /** * Created by qi on 2018-1-9. + * @author qi */ public class AjaxResult { - //操作结果 - private Boolean success; - //提示信息 + /** + * 操作结果 + */ + private boolean success; + /** + * 提示信息 + */ private String msg; - //返回数据 + /** + * 返回数据 + */ private Object data; public AjaxResult() { @@ -46,4 +53,20 @@ public class AjaxResult { public void setData(Object data) { this.data = data; } + + public static AjaxResult getInstance(){ + + return new AjaxResult(); + } + + public static AjaxResult getSuccessInstance(){ + + return new AjaxResult(); + } + + public static AjaxResult getSuccessInstance(Object data){ + AjaxResult ajaxResult = new AjaxResult(); + ajaxResult.setData(data); + return ajaxResult; + } } diff --git a/src/main/java/com/lq/jms/service/impl/ProductServiceImpl.java b/src/main/java/com/lq/jms/service/impl/ProductServiceImpl.java index a66e1f6..3fc009a 100644 --- a/src/main/java/com/lq/jms/service/impl/ProductServiceImpl.java +++ b/src/main/java/com/lq/jms/service/impl/ProductServiceImpl.java @@ -11,7 +11,7 @@ import org.springframework.stereotype.Service; @Service public class ProductServiceImpl implements ProductService { - @Autowired + @Autowired(required = false) private JmsTemplate jmsTemplate; diff --git a/src/main/java/com/lq/wechat/web/WechatController.java b/src/main/java/com/lq/wechat/web/WechatController.java index 59d9c6b..86ccb02 100755 --- a/src/main/java/com/lq/wechat/web/WechatController.java +++ b/src/main/java/com/lq/wechat/web/WechatController.java @@ -9,8 +9,6 @@ import com.lq.code.web.BaseController; import com.lq.entity.WechatInfo; import com.lq.entity.WechatUser; import com.lq.wechat.mode.message.BaseMessage; -import com.lq.wechat.mode.message.ItemMessage; -import com.lq.wechat.mode.message.NewsMessage; import com.lq.wechat.mode.message.TextMessage; import com.lq.wechat.util.CheckUtil; import com.lq.wechat.util.ConstantSet; @@ -26,8 +24,6 @@ import org.springframework.web.bind.annotation.ResponseBody; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.UnsupportedEncodingException; -import java.util.ArrayList; -import java.util.List; import java.util.Map; /** @@ -92,99 +88,79 @@ public class WechatController extends BaseController { //微信公众号详情 WechatInfo wechatInfo = wechatInfoService.getByOpenId(wechatOpenId); - TextMessage text = new TextMessage(); - text.setFromUserName(wechatOpenId); - text.setToUserName(openId); - text.setMsgType(ConstantSet.MESSAGE_TYPE_TEXT); - - text.setCreateTime(System.currentTimeMillis()); - - switch (msgType) { - case ConstantSet.MESSAGE_TYPE_TEXT: - String content = map.get(WECHAT_CONTENT_KEY); - BaseMessage baseMessage = wechatRuleService.getByKeyworkdAndWechatInfoId(content,wechatInfo); - baseMessage.setCreateTime(System.currentTimeMillis()); - baseMessage.setFromUserName(wechatOpenId); - baseMessage.setToUserName(openId); - message = MessageUtil.MessageToXml(baseMessage); -// if("1".equals(content)){ -// NewsMessage newsMessage=new NewsMessage(); -// List items=new ArrayList<>(); -// ItemMessage item=new ItemMessage(); -// item.setTitle("六弄咖啡馆"); -// item.setDescription("两个人在爱在距离面前是否禁受考验?"); -// String path = req.getContextPath(); -// String basePath = req.getScheme()+"://"+req.getServerName()+":"+req.getServerPort()+path+"/"; -// item.setPicUrl("https://img3.doubanio.com/view/photo/l/public/p2367455902.webp"); -// item.setUrl("http://www.iqiyi.com/v_19rr95j3vc.html?vfm=2008_aldbd"); -// items.add(item); -// newsMessage.setArticles(items); -// newsMessage.setArticleCount(1); -// newsMessage.setCreateTime(System.currentTimeMillis()); -// newsMessage.setFromUserName(wechatOpenId); -// newsMessage.setMsgType(ConstantSet.MESSAGE_TYPE_NEW); -// newsMessage.setToUserName(openId); -// message = MessageUtil.MessageToXml(newsMessage); -// } else{ -// text.setContent("您发送的消息是:" + content); -// message = MessageUtil.MessageToXml(text); -// } - break; - case ConstantSet.MESSAGE_TYPE_IMAGE: - - text.setContent("您发送的消息是:" + "图片"); - message = MessageUtil.MessageToXml(text); - break; - case ConstantSet.MESSAGE_TYPE_VIDEO: - text.setContent("您发送的消息是:" + "视频"); - message = MessageUtil.MessageToXml(text); - break; - case ConstantSet.MESSAGE_TYPE_SHORTVIDEO: - text.setContent("您发送的消息是:" + "小视频"); - message = MessageUtil.MessageToXml(text); - break; - case ConstantSet.MESSAGE_TYPE_VOICE: - text.setContent("您发送的消息是:" + "语音"); - message = MessageUtil.MessageToXml(text); - break; - case ConstantSet.MESSAGE_TYPE_LINK: - text.setContent("您发送的消息是:" + "链接"); - message = MessageUtil.MessageToXml(text); - break; - case ConstantSet.MESSAGE_TYPE_LOCATION: - text.setContent("您发送的消息是:" + "位置"); - message = MessageUtil.MessageToXml(text); - break; - case ConstantSet.MESSAGE_TYPE_EVENT: - String event = map.get("Event"); - switch (event) { - case ConstantSet.EVENT_TYPE_SUBSCRIBE: - LOGGER.info("微信公众号关注事件:"+wechatInfo.getWechatName()); - //公众号在认证的情况下才可以获取用户信息 - if (WechatInfoCertificationTypeEnum.CERTIFICATION_YES.getValue().equals(wechatInfo.getCertification())) { - WechatUser wechatUser = wechatUserService.saveWechatUser(openId, wechatInfo); - } - - break; - case ConstantSet.EVENT_TYPE_UNSUBSCRIBE: - ; - break; - case ConstantSet.EVENT_TYPE_CLICK: - //自定义菜单点击事件KEY值 - String eventKey = map.get(ConstantSet.EVENT_CLICK_KEY); - - ; - break; - default: - break; - } - - break; - - default: - text.setContent("您发送的消息是:" + "无法理解"); - message = MessageUtil.MessageToXml(text); - break; + if (wechatInfo!=null) { + TextMessage text = new TextMessage(); + text.setFromUserName(wechatOpenId); + text.setToUserName(openId); + text.setMsgType(ConstantSet.MESSAGE_TYPE_TEXT); + + text.setCreateTime(System.currentTimeMillis()); + + switch (msgType) { + case ConstantSet.MESSAGE_TYPE_TEXT: + String content = map.get(WECHAT_CONTENT_KEY); + BaseMessage baseMessage = wechatRuleService.getByKeyworkdAndWechatInfoId(content, wechatInfo); + baseMessage.setCreateTime(System.currentTimeMillis()); + baseMessage.setFromUserName(wechatOpenId); + baseMessage.setToUserName(openId); + message = MessageUtil.MessageToXml(baseMessage); + break; + case ConstantSet.MESSAGE_TYPE_IMAGE: + + text.setContent("您发送的消息是:" + "图片"); + message = MessageUtil.MessageToXml(text); + break; + case ConstantSet.MESSAGE_TYPE_VIDEO: + text.setContent("您发送的消息是:" + "视频"); + message = MessageUtil.MessageToXml(text); + break; + case ConstantSet.MESSAGE_TYPE_SHORTVIDEO: + text.setContent("您发送的消息是:" + "小视频"); + message = MessageUtil.MessageToXml(text); + break; + case ConstantSet.MESSAGE_TYPE_VOICE: + text.setContent("您发送的消息是:" + "语音"); + message = MessageUtil.MessageToXml(text); + break; + case ConstantSet.MESSAGE_TYPE_LINK: + text.setContent("您发送的消息是:" + "链接"); + message = MessageUtil.MessageToXml(text); + break; + case ConstantSet.MESSAGE_TYPE_LOCATION: + text.setContent("您发送的消息是:" + "位置"); + message = MessageUtil.MessageToXml(text); + break; + case ConstantSet.MESSAGE_TYPE_EVENT: + String event = map.get("Event"); + switch (event) { + case ConstantSet.EVENT_TYPE_SUBSCRIBE: + LOGGER.info("微信公众号关注事件:" + wechatInfo.getWechatName()); + //公众号在认证的情况下才可以获取用户信息 + if (WechatInfoCertificationTypeEnum.CERTIFICATION_YES.getValue().equals(wechatInfo.getCertification())) { + WechatUser wechatUser = wechatUserService.saveWechatUser(openId, wechatInfo); + } + + break; + case ConstantSet.EVENT_TYPE_UNSUBSCRIBE: + ; + break; + case ConstantSet.EVENT_TYPE_CLICK: + //自定义菜单点击事件KEY值 + String eventKey = map.get(ConstantSet.EVENT_CLICK_KEY); + + ; + break; + default: + break; + } + + break; + + default: + text.setContent("您发送的消息是:" + "无法理解"); + message = MessageUtil.MessageToXml(text); + break; + } } } catch (Exception e) { From f778782df937dd486ae5495e62d14d1f42091e88 Mon Sep 17 00:00:00 2001 From: qi_liang Date: Fri, 28 Feb 2020 07:14:26 +0800 Subject: [PATCH 08/11] =?UTF-8?q?=E9=80=9A=E8=BF=87=E5=88=AB=E5=90=8D?= =?UTF-8?q?=E7=AE=80=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mybatis/mapping/SysPermissionDao.xml | 10 +++++----- .../resources/mybatis/mapping/WechatInfoDao.xml | 14 +++++++------- .../resources/mybatis/mapping/WechatKeywordDao.xml | 10 +++++----- .../resources/mybatis/mapping/WechatMessageDao.xml | 10 +++++----- .../resources/mybatis/mapping/WechatRuleDao.xml | 10 +++++----- .../mybatis/mapping/WechatRuleMessageDao.xml | 12 ++++++------ .../resources/mybatis/mapping/WechatUserDao.xml | 8 ++++---- 7 files changed, 37 insertions(+), 37 deletions(-) diff --git a/src/main/resources/mybatis/mapping/SysPermissionDao.xml b/src/main/resources/mybatis/mapping/SysPermissionDao.xml index 052e65b..9f19b89 100644 --- a/src/main/resources/mybatis/mapping/SysPermissionDao.xml +++ b/src/main/resources/mybatis/mapping/SysPermissionDao.xml @@ -12,13 +12,13 @@ permission_type,permission_key,name,sys_resource_id,sp.id,sp.status,sp.create_time,sp.create_user_id,sp.update_time,sp.update_user_id - SELECT FROM sys_permission WHERE id=#{id} AND status = 1 - SELECT FROM sys_permission WHERE status = 1 @@ -40,7 +40,7 @@ WHERE status = 1 - SELECT FROM sys_permission WHERE status = 1 @@ -48,7 +48,7 @@ ORDER BY create_time DESC,update_time DESC - + SELECT LAST_INSERT_ID() @@ -62,7 +62,7 @@ - + UPDATE sys_permission diff --git a/src/main/resources/mybatis/mapping/WechatInfoDao.xml b/src/main/resources/mybatis/mapping/WechatInfoDao.xml index 463cddd..d186501 100644 --- a/src/main/resources/mybatis/mapping/WechatInfoDao.xml +++ b/src/main/resources/mybatis/mapping/WechatInfoDao.xml @@ -9,15 +9,15 @@ id,wechat_open_id,app_secpet,create_time,app_id,encoding_type,wechat_name,url,token,encoding_aes_key,last_update_time,status,wechat_info_type,certification,open_reply - SELECT FROM wechat_info WHERE id=#{id} AND status = 1 - SELECT FROM wechat_info WHERE status = 1 - + SELECT LAST_INSERT_ID() @@ -31,7 +31,7 @@ - + UPDATE wechat_info @@ -65,18 +65,18 @@ - SELECT count(id) FROM wechat_info - SELECT FROM wechat_info t1 WHERE status = 1 ORDER BY t1.create_time DESC - SELECT FROM wechat_info wi WHERE diff --git a/src/main/resources/mybatis/mapping/WechatKeywordDao.xml b/src/main/resources/mybatis/mapping/WechatKeywordDao.xml index fd19901..54c5581 100644 --- a/src/main/resources/mybatis/mapping/WechatKeywordDao.xml +++ b/src/main/resources/mybatis/mapping/WechatKeywordDao.xml @@ -9,13 +9,13 @@ matchin_type,create_time,update_time,wechat_rule_id,id,keyword,status - SELECT FROM wechat_keyword WHERE id=#{id} AND status = 1 - SELECT FROM wechat_keyword WHERE status = 1 @@ -27,7 +27,7 @@ WHERE status = 1 - + SELECT LAST_INSERT_ID() @@ -41,7 +41,7 @@ - + UPDATE wechat_keyword @@ -66,7 +66,7 @@ id=#{id} - SELECT FROM wechat_keyword WHERE diff --git a/src/main/resources/mybatis/mapping/WechatMessageDao.xml b/src/main/resources/mybatis/mapping/WechatMessageDao.xml index 7f9b65c..93840da 100644 --- a/src/main/resources/mybatis/mapping/WechatMessageDao.xml +++ b/src/main/resources/mybatis/mapping/WechatMessageDao.xml @@ -9,13 +9,13 @@ to_url,message_type,create_time,image_url,update_time,id,title,media_id,user_id,content,status - SELECT FROM wechat_message WHERE id=#{id} AND status = 1 - SELECT FROM wechat_message WHERE status = 1 @@ -27,7 +27,7 @@ WHERE status = 1 - + SELECT LAST_INSERT_ID() @@ -41,7 +41,7 @@ - + UPDATE wechat_message @@ -78,7 +78,7 @@ status = 1 - SELECT FROM wechat_message WHERE diff --git a/src/main/resources/mybatis/mapping/WechatRuleDao.xml b/src/main/resources/mybatis/mapping/WechatRuleDao.xml index 89769cb..74ca6dc 100644 --- a/src/main/resources/mybatis/mapping/WechatRuleDao.xml +++ b/src/main/resources/mybatis/mapping/WechatRuleDao.xml @@ -9,13 +9,13 @@ create_user_id,reply_type,create_time,update_user_id,rule_name,wechat_info_id,update_time,id,status - SELECT FROM wechat_rule WHERE id=#{id} AND status = 1 - SELECT FROM wechat_rule WHERE status = 1 @@ -28,7 +28,7 @@ WHERE status = 1 - + SELECT LAST_INSERT_ID() @@ -42,7 +42,7 @@ - + UPDATE wechat_rule @@ -70,7 +70,7 @@ id=#{id} - SELECT FROM wechat_rule WHERE diff --git a/src/main/resources/mybatis/mapping/WechatRuleMessageDao.xml b/src/main/resources/mybatis/mapping/WechatRuleMessageDao.xml index 5da2f9f..bbe590c 100644 --- a/src/main/resources/mybatis/mapping/WechatRuleMessageDao.xml +++ b/src/main/resources/mybatis/mapping/WechatRuleMessageDao.xml @@ -9,13 +9,13 @@ wechat_rule_id,id,wechat_message_id,status,create_time - SELECT FROM wechat_rule_message WHERE id=#{id} AND status = 1 - SELECT FROM wechat_rule_message WHERE status = 1 @@ -27,7 +27,7 @@ WHERE status = 1 - + SELECT LAST_INSERT_ID() @@ -41,7 +41,7 @@ - + UPDATE wechat_rule_message @@ -64,7 +64,7 @@ id=#{id} - SELECT FROM wechat_rule_message WHERE status = 1 @@ -72,7 +72,7 @@ AND wechat_rule_id = #{ruleId} - SELECT FROM wechat_rule_message WHERE status = 1 diff --git a/src/main/resources/mybatis/mapping/WechatUserDao.xml b/src/main/resources/mybatis/mapping/WechatUserDao.xml index 726d0b7..b2a7ba9 100644 --- a/src/main/resources/mybatis/mapping/WechatUserDao.xml +++ b/src/main/resources/mybatis/mapping/WechatUserDao.xml @@ -9,13 +9,13 @@ country,unionid,sybscribe_scene,qr_scene,qr_scene_str,subscribe_time,city,tagid_id,open_id,nick_name,sex,groupid,language,remark,province,head_img_url,wechat_info_id,id,status - SELECT FROM wechat_user WHERE id=#{id} AND status = 1 - SELECT FROM wechat_user WHERE status = 1 @@ -27,7 +27,7 @@ WHERE status = 1 - + SELECT LAST_INSERT_ID() @@ -41,7 +41,7 @@ - + UPDATE wechat_user From 85f9876e854a693df66a742d0c6e49e26d6d08e6 Mon Sep 17 00:00:00 2001 From: qi_liang Date: Fri, 28 Feb 2020 08:04:35 +0800 Subject: [PATCH 09/11] =?UTF-8?q?=E9=80=9A=E8=BF=87=E5=88=AB=E5=90=8D?= =?UTF-8?q?=E7=AE=80=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/lq/cms/service/impl/SysLogServiceImpl.java | 3 ++- .../cms/service/impl/SysRoleResourcePermissionServiceImpl.java | 1 - src/main/java/com/lq/code/service/BaseService.java | 2 +- src/main/java/com/lq/entity/SysLog.java | 1 + src/main/webapp/WEB-INF/views/jsp/cms/sys/log/index.jsp | 3 +++ 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/lq/cms/service/impl/SysLogServiceImpl.java b/src/main/java/com/lq/cms/service/impl/SysLogServiceImpl.java index c5a807a..651f487 100755 --- a/src/main/java/com/lq/cms/service/impl/SysLogServiceImpl.java +++ b/src/main/java/com/lq/cms/service/impl/SysLogServiceImpl.java @@ -13,9 +13,10 @@ import java.util.List; /** * Created by qi_liang on 2018/6/21. + * @author qi */ @Service -public class SysLogServiceImpl implements SysLogService { +public class SysLogServiceImpl implements SysLogService { @Autowired private SysLogDao sysLogDao; diff --git a/src/main/java/com/lq/cms/service/impl/SysRoleResourcePermissionServiceImpl.java b/src/main/java/com/lq/cms/service/impl/SysRoleResourcePermissionServiceImpl.java index 49aa6d0..2d678d6 100755 --- a/src/main/java/com/lq/cms/service/impl/SysRoleResourcePermissionServiceImpl.java +++ b/src/main/java/com/lq/cms/service/impl/SysRoleResourcePermissionServiceImpl.java @@ -51,7 +51,6 @@ public class SysRoleResourcePermissionServiceImpl implements SysRoleResourcePer public List findZtree(Long roleId) { List ztreeList=new ArrayList<>(); List resourceList=sysResourceDao.findByParentId(0L); - for (SysResource sysResource:resourceList){ ZtreeItem ztreeItem=new ZtreeItem(); ztreeItem.setId(sysResource.getId()); diff --git a/src/main/java/com/lq/code/service/BaseService.java b/src/main/java/com/lq/code/service/BaseService.java index 863c3ac..e5ac2f5 100755 --- a/src/main/java/com/lq/code/service/BaseService.java +++ b/src/main/java/com/lq/code/service/BaseService.java @@ -10,7 +10,7 @@ import java.util.List; */ public interface BaseService { - BaseDao getBaseDao(); + BaseDao getBaseDao(); default T findOne(Long id){ return getBaseDao().findOne(id); diff --git a/src/main/java/com/lq/entity/SysLog.java b/src/main/java/com/lq/entity/SysLog.java index c3fcdda..336dd30 100755 --- a/src/main/java/com/lq/entity/SysLog.java +++ b/src/main/java/com/lq/entity/SysLog.java @@ -6,6 +6,7 @@ import java.util.Date; /** 系统日志表 * Created by qi on 2017/7/27. + * @author qi */ public class SysLog extends IdEntity { /** diff --git a/src/main/webapp/WEB-INF/views/jsp/cms/sys/log/index.jsp b/src/main/webapp/WEB-INF/views/jsp/cms/sys/log/index.jsp index 8595d6c..0ae9e8f 100755 --- a/src/main/webapp/WEB-INF/views/jsp/cms/sys/log/index.jsp +++ b/src/main/webapp/WEB-INF/views/jsp/cms/sys/log/index.jsp @@ -27,6 +27,9 @@ +
+ 时间: - +
From d3bfa0cac109d2c07731e9a45393b08859a80e12 Mon Sep 17 00:00:00 2001 From: qi_liang Date: Sat, 29 Feb 2020 22:54:05 +0800 Subject: [PATCH 10/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E6=9C=AC=E6=9C=BAIP=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/lq/cms/web/IndexController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/lq/cms/web/IndexController.java b/src/main/java/com/lq/cms/web/IndexController.java index 9af6c0a..57e777b 100755 --- a/src/main/java/com/lq/cms/web/IndexController.java +++ b/src/main/java/com/lq/cms/web/IndexController.java @@ -72,7 +72,7 @@ public class IndexController { context.getServerInfo(); DbInfo dbInfo = JdbcUtils.getDBInfo(); OsInfo osInfo = OsUtil.getInfo(); - String serverIp = NetUtil.getIP(); + String serverIp = NetUtil.getLocalIpAddr(); JvmInfo jvmInfo = JvmUtil.getInfo(); vo.setDbInfo(dbInfo); vo.setUserIP(userIp); From abc67a3fca946af15f6697c87b8ac2cb0fa46801 Mon Sep 17 00:00:00 2001 From: qi_liang Date: Sat, 29 Feb 2020 22:55:27 +0800 Subject: [PATCH 11/11] =?UTF-8?q?=E8=A1=A5=E5=85=85=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/pom.xml b/pom.xml index 163606c..58eb1e8 100644 --- a/pom.xml +++ b/pom.xml @@ -684,4 +684,5 @@ +