Merge remote-tracking branch 'origin/master'

master
星期八 5 years ago
commit 219a545025
  1. 62
      README.md
  2. 1
      pom.xml
  3. 1
      src/main/java/com/lq/cms/service/impl/SysLogServiceImpl.java
  4. 3
      src/main/java/com/lq/cms/service/impl/SysPermissionServiceImpl.java
  5. 1
      src/main/java/com/lq/cms/service/impl/SysRoleResourcePermissionServiceImpl.java
  6. 1
      src/main/java/com/lq/cms/service/impl/SysRoleServiceImpl.java
  7. 1
      src/main/java/com/lq/cms/service/impl/SysUserServiceImpl.java
  8. 2
      src/main/java/com/lq/cms/service/impl/WechatInfoServiceImpl.java
  9. 4
      src/main/java/com/lq/code/executor/processor/InstantiationTracingBeanPostProcessor.java
  10. 2
      src/main/java/com/lq/code/util/HttpUtil.java
  11. 2
      src/main/java/com/lq/code/util/HttpsClient.java
  12. 1
      src/main/java/com/lq/entity/SysFile.java
  13. 1
      src/main/java/com/lq/entity/SysPermission.java
  14. 1
      src/main/java/com/lq/entity/SysResource.java
  15. 1
      src/main/java/com/lq/entity/SysRole.java
  16. 1
      src/main/java/com/lq/entity/SysRoleResourcePermission.java
  17. 1
      src/main/java/com/lq/entity/SysUser.java
  18. 1
      src/main/java/com/lq/entity/SysUserRole.java
  19. 1
      src/main/java/com/lq/entity/WechatAccessToken.java
  20. 1
      src/main/java/com/lq/entity/WechatInfo.java
  21. 1
      src/main/java/com/lq/entity/WechatInfoSetting.java
  22. 1
      src/main/java/com/lq/entity/WechatKeyword.java
  23. 1
      src/main/java/com/lq/entity/WechatMessage.java
  24. 1
      src/main/java/com/lq/entity/WechatUser.java
  25. 2
      src/main/profile/dev/jdbc.properties
  26. 8
      src/main/webapp/WEB-INF/views/jsp/cms/login.jsp

@ -1,31 +1,31 @@
# ssm
ssm 介绍
一个基于spring mvc+mybatis的框架。页面是采用aceAdmin+easyUI.
使用shiro作为安全框架,做权限控制
ssm 安装教程
1. jdk 1.8
2. maven 3
3. mysql 5.6
4. redis
5. tomcat 8
ssm 使用说明
1. 菜单目录采用设计模式中的容器模式,理论上是可以实现三级甚至四级的菜单目录(参考代码:com.lq.cms.mode.MenusComposite).
2. 自定义一个mybatis的xml生成插件(com.lq.code.util.mybatisPlus.CreateMapperFileUtil),配合BaseDao一起使用.基本实现单表的CURD操作功能
3. 自定义实体同步数据库表结构插件(com.lq.code.executor.processor.InstantiationTracingBeanPostProcessor)
4. AdminBaseDao,AdminBaseServer,AdminBaseController.三层类结构的继承。可以实现简单模块基本管理功能。
5. 使用spring session整合redis实现在集群中session共享的效果
6. 微信公众号相关开发代码(com.lq.wechat),其中客服消息采用了建造者模式(com.lq.wechat.mode.template)。
三层架构理念:
1. 数据库表与mapping.xml一一对应。
2. dao层代码密度低,dao层代码尽量通用,以工具类形式使用。便于代码重用
3. service层代码密度高 通过组合复用原则使用dao层工具类,实现业务逻辑
4. controller层代码密度低 只负责简单的数据接受和转发。以及页面跳转的控制
1. 项目案例:http://106.12.122.216/ssm/cms/
2. 默认账号/密码:admin/123
# ssm
ssm 介绍
一个基于spring mvc+mybatis的框架。页面是采用aceAdmin+easyUI.
使用shiro作为安全框架,做权限控制
ssm 安装教程
1. jdk 1.8
2. maven 3
3. mysql 5.6
4. redis
5. tomcat 8
ssm 使用说明
1. 菜单目录采用设计模式中的容器模式,理论上是可以实现三级甚至四级的菜单目录(参考代码:com.lq.cms.mode.MenusComposite).
2. 自定义一个mybatis的xml生成插件(com.lq.code.util.mybatisPlus.CreateMapperFileUtil),配合BaseDao一起使用.基本实现单表的CURD操作功能
3. 自定义实体同步数据库表结构插件(com.lq.code.executor.processor.InstantiationTracingBeanPostProcessor)
4. AdminBaseDao,AdminBaseServer,AdminBaseController.三层类结构的继承。可以实现简单模块基本管理功能。
5. 使用spring session整合redis实现在集群中session共享的效果
6. 微信公众号相关开发代码(com.lq.wechat),其中客服消息采用了建造者模式(com.lq.wechat.mode.template)。
三层架构理念:
1. 数据库表与mapping.xml一一对应。
2. dao层代码密度低,dao层代码尽量通用,以工具类形式使用。便于代码重用
3. service层代码密度高 通过组合复用原则使用dao层工具类,实现业务逻辑
4. controller层代码密度低 只负责简单的数据接受和转发。以及页面跳转的控制
1. 项目案例:http://106.12.122.216:8081/ssm/cms/
2. 默认账号/密码:admin/123

@ -685,4 +685,5 @@
</project>

@ -3,7 +3,6 @@ package com.lq.cms.service.impl;
import com.lq.cms.service.SysLogService;
import com.lq.cms.vo.SysLogVo;
import com.lq.code.dao.BaseDao;
import com.lq.code.service.impl.BaseServiceImpl;
import com.lq.dao.SysLogDao;
import com.lq.entity.SysLog;
import org.springframework.beans.factory.annotation.Autowired;

@ -4,13 +4,11 @@ import com.lq.cms.emun.StatusTypeEnum;
import com.lq.cms.service.SysPermissionService;
import com.lq.cms.vo.SysPermissionVo;
import com.lq.code.dao.BaseDao;
import com.lq.code.service.impl.BaseServiceImpl;
import com.lq.code.util.BeanUtil;
import com.lq.dao.SysPermissionDao;
import com.lq.dao.SysResourceDao;
import com.lq.dao.SysUserDao;
import com.lq.entity.SysPermission;
import com.lq.entity.SysResource;
import com.lq.entity.SysUser;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
@ -19,7 +17,6 @@ import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
import java.util.Optional;
/**
* @Author: qi

@ -10,7 +10,6 @@ import com.lq.cms.service.SysRoleResourcePermissionService;
import com.lq.cms.vo.PermissionVo;
import com.lq.cms.vo.SysRoleResourcePermissionVo;
import com.lq.code.dao.BaseDao;
import com.lq.code.service.impl.BaseServiceImpl;
import com.lq.dao.SysPermissionDao;
import com.lq.dao.SysResourceDao;
import com.lq.dao.SysRoleResourcePermissionDao;

@ -5,7 +5,6 @@ import com.lq.cms.service.SysRoleService;
import com.lq.cms.vo.SysRoleVo;
import com.lq.cms.vo.SysUserRoleVo;
import com.lq.code.dao.BaseDao;
import com.lq.code.service.impl.BaseServiceImpl;
import com.lq.dao.SysRoleDao;
import com.lq.dao.SysRoleResourcePermissionDao;
import com.lq.dao.SysUserRoleDao;

@ -3,7 +3,6 @@ package com.lq.cms.service.impl;
import com.lq.cms.service.SysUserService;
import com.lq.cms.vo.SysUserVo;
import com.lq.code.dao.BaseDao;
import com.lq.code.service.impl.BaseServiceImpl;
import com.lq.code.util.Md5Util;
import com.lq.dao.SysUserDao;
import com.lq.dao.SysUserRoleDao;

@ -3,7 +3,6 @@ package com.lq.cms.service.impl;
import com.lq.cms.service.WechatInfoService;
import com.lq.cms.vo.WechatInfoVo;
import com.lq.code.dao.BaseDao;
import com.lq.code.service.impl.BaseServiceImpl;
import com.lq.dao.WechatInfoDao;
import com.lq.entity.WechatInfo;
import org.springframework.beans.factory.annotation.Autowired;
@ -13,6 +12,7 @@ import java.util.List;
/**
* Created by qi_liang on 2018/6/21.
* @author qi
*/
@Service
public class WechatInfoServiceImpl implements WechatInfoService {

@ -10,6 +10,8 @@ import com.lq.code.util.sql.factory.impl.DefaultDbBuilerFactory;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import java.util.Arrays;
import java.util.List;
import java.util.Set;
/**
@ -45,6 +47,8 @@ public class InstantiationTracingBeanPostProcessor implements ApplicationListene
//需要执行的逻辑代码,当spring容器初始化完成后就会执行该方法。
//扫描实体类
if (isUpdateDB) {
List<String> packageList = Arrays.asList(packagePath.split(","));
Set<Class> set = BeanUtil.getClassSet(packagePath);
// QueueDto<Class> queueDto = BeanUtil.getQueueDto(packagePath);
DbBuilerFactory dbBuilerFactory = new DefaultDbBuilerFactory();

@ -17,7 +17,7 @@ public class HttpUtil {
BufferedReader in=null;
try {
String urlNameString=url+"?"+param;
URL reaulUrl=new URL("http://www.baidu.com");
URL reaulUrl=new URL(urlNameString);
URLConnection connection=reaulUrl.openConnection();
// 设置通用的请求属性

@ -128,7 +128,7 @@ public class HttpsClient {
private static HttpPost getMultipartPost(String url,String boundarStr) {
/* 这里设置一些post的头部信息,具体求百度吧 */
HttpPost post = new HttpPost(url);
HttpPost post = new HttpPost(url);
post.addHeader("Connection", "keep-alive");
post.addHeader("Accept", "*/*");
post.addHeader("Content-Type", "multipart/form-data;boundary="

@ -7,6 +7,7 @@ import java.util.Date;
/**
* 系统文件
* Created by qi_liang on 2018/3/25.
* @author qi
*/
public class SysFile extends IdEntity {
/**

@ -6,6 +6,7 @@ import java.util.Date;
/** 权限表
* Created by qi on 2017-11-29.
* @author qi
*/
public class SysPermission extends IdEntity{

@ -6,6 +6,7 @@ import java.util.Date;
/** 资源表
* Created by qi on 2017-11-29.
* @author qi
*/
public class SysResource extends IdEntity {

@ -6,6 +6,7 @@ import java.util.Date;
/** 角色表
* Created by qi on 2017-11-29.
* @author qi
*/
public class SysRole extends IdEntity {

@ -6,6 +6,7 @@ import java.util.Date;
/** 权限角色资源关联表
* Created by qi on 2017-11-29.
* @author qi
*/
public class SysRoleResourcePermission extends IdEntity {

@ -6,6 +6,7 @@ import java.util.Date;
/** 用户表
* Created by qi on 2017-11-29.
* @author qi
*/
public class SysUser extends IdEntity {

@ -6,6 +6,7 @@ import java.util.Date;
/** 用户角色表
* Created by qi on 2017-11-29.
* @author qi
*/
public class SysUserRole extends IdEntity {

@ -7,6 +7,7 @@ import java.util.Date;
/**
* 微信公众号-获取accessToken
* Created by qi_liang on 2018/5/24.
* @author qi
*/
public class WechatAccessToken extends IdEntity{
/**

@ -7,6 +7,7 @@ import java.util.Date;
/**
* 微信公众号配置
* Created by qi_liang on 2018/5/24.
* @author qi
*/
public class WechatInfo extends IdEntity {

@ -4,6 +4,7 @@ import com.lq.code.entity.IdEntity;
/**
* 微信公众号设置表
* @author qi
*/
public class WechatInfoSetting extends IdEntity {

@ -7,6 +7,7 @@ import java.util.Date;
/**
* 微信公众号-规则-关键字
* 设计理念微信公众号规则表与关键字表是一对多的关系这张表等同于规则表的扩展字段因此该表会直接和规则表发生关联(@Link wechatRuleId)
* @author qi
*/
public class WechatKeyword extends IdEntity {
/**

@ -12,6 +12,7 @@ import java.util.Date;
* 坏处
* 1.在此可能衍生的问题可能是无意的修改导致其他公众号的消息也改变
* 有牵一发而动全身的风险
* @author qi
*/
public class WechatMessage extends IdEntity{
/**

@ -7,6 +7,7 @@ import java.util.Date;
/**
* 微信公众号用户
* Created by qi_liang on 2018/5/24.
* @author qi
*/
public class WechatUser extends IdEntity{
/**

@ -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
#--------数据库连接池配置 -------

@ -71,7 +71,7 @@
<div class="space-6"></div>
<form>
<form id="login_form">
<fieldset>
<label class="block clearfix">
<span class="block input-icon input-icon-right">
@ -315,6 +315,12 @@
}
});
var loginForm = new Vue({
el: 'login_form',
data: {
}
});
var mediator = new Object();
function show_box(id) {

Loading…
Cancel
Save