├── .gitignore
├── README.md
├── pom.xml
├── screenshot
├── 1.png
├── 10.png
├── 11.png
├── 2.png
├── 3.png
├── 4.png
├── 5.png
├── 6.png
├── 7.png
├── 8.png
└── 9.png
└── src
└── main
├── conf
├── beta
│ ├── jdbc.properties
│ └── jedis.properties
└── prd
│ ├── jdbc.properties
│ └── jedis.properties
├── java
└── com
│ └── yxb
│ └── cms
│ ├── Application.java
│ ├── architect
│ ├── annotation
│ │ ├── SystemControllerLog.java
│ │ └── SystemServiceLog.java
│ ├── conf
│ │ ├── AlipayConfig.java
│ │ ├── LoginConfig.java
│ │ ├── MyBatisDataSourceConfig.java
│ │ ├── MyWebAppConfigurer.java
│ │ ├── RedisConfiguration.java
│ │ ├── ShiroConfiguration.java
│ │ └── SystemLogAspect.java
│ ├── constant
│ │ ├── BusinessConstants.java
│ │ ├── BussinessCode.java
│ │ └── Constants.java
│ ├── filter
│ │ └── MyWebFilter.java
│ ├── interceptor
│ │ ├── CommonInterceptor.java
│ │ ├── ErrorInterceptor.java
│ │ └── UserInterceptor.java
│ ├── properties
│ │ ├── AppCommonMyBatisProperties.java
│ │ ├── JdbcProperties.java
│ │ └── JedisProperties.java
│ ├── realm
│ │ └── ShiroDbRealm.java
│ ├── task
│ │ └── SystemScheduledTask.java
│ ├── utils
│ │ ├── BussinessMsgUtil.java
│ │ ├── ClientIpUtil.java
│ │ ├── CommonHelper.java
│ │ ├── CreateImageCode.java
│ │ ├── DateUtil.java
│ │ ├── HttpUtil.java
│ │ ├── KeyConfig.java
│ │ ├── MySSLProtocolSocketFactory.java
│ │ ├── ParseObjectUtils.java
│ │ ├── SpringUtils.java
│ │ └── ThreadPool.java
│ └── view
│ │ └── ExcelView.java
│ ├── controller
│ ├── BasicController.java
│ ├── IndexController.java
│ ├── LoginController.java
│ ├── ManagerErrorController.java
│ ├── system
│ │ ├── AlipayController.java
│ │ ├── AnnouncementInfoController.java
│ │ ├── CommentController.java
│ │ ├── CommonCodeController.java
│ │ ├── HourseController.java
│ │ ├── InStoackController.java
│ │ ├── OrderController.java
│ │ ├── ResourceController.java
│ │ ├── RoleController.java
│ │ ├── RoomServerController.java
│ │ ├── SystemLogController.java
│ │ └── UserController.java
│ └── user
│ │ ├── CartController.java
│ │ ├── HomeController.java
│ │ └── UserLoginController.java
│ ├── dao
│ ├── AnnouncementInfoMapper.java
│ ├── AnnouncementInfoUserMapper.java
│ ├── CommentMapper.java
│ ├── CommonCodeMapper.java
│ ├── DataCleaningMapper.java
│ ├── HourseMapper.java
│ ├── OrderMapper.java
│ ├── ResourceMapper.java
│ ├── RoleMapper.java
│ ├── RoleResourceMapper.java
│ ├── StoreMapper.java
│ ├── SystemLogMapper.java
│ ├── UserMapper.java
│ └── UserRoleMapper.java
│ ├── domain
│ ├── bo
│ │ ├── BussinessMsg.java
│ │ ├── ExcelExport.java
│ │ ├── PermissionSubject.java
│ │ └── Tree.java
│ ├── dto
│ │ ├── DataCollectDto.java
│ │ ├── PageDto.java
│ │ ├── ResourceChildrenMenuDto.java
│ │ └── ResourceMenuDto.java
│ └── vo
│ │ ├── AnnouncementInfo.java
│ │ ├── AnnouncementInfoUser.java
│ │ ├── Comment.java
│ │ ├── CommonCode.java
│ │ ├── DataCleaning.java
│ │ ├── Hourse.java
│ │ ├── Order.java
│ │ ├── Resource.java
│ │ ├── Role.java
│ │ ├── RoleResource.java
│ │ ├── Store.java
│ │ ├── SystemLog.java
│ │ ├── User.java
│ │ └── UserRole.java
│ ├── handler
│ └── RedisClient.java
│ ├── service
│ ├── AnnouncementInfoService.java
│ ├── CommentService.java
│ ├── CommonCodeService.java
│ ├── DataCleaningService.java
│ ├── HourseService.java
│ ├── OrderService.java
│ ├── ResourceService.java
│ ├── RoleService.java
│ ├── ShiroService.java
│ ├── StoreService.java
│ ├── SystemLogService.java
│ └── UserService.java
│ └── util
│ ├── DateTimeUtil.java
│ └── TokenUtil.java
├── resources
├── application.properties
├── ehcache-shiro.xml
├── log4j2.xml
├── mapper
│ ├── AnnouncementInfoMapper.xml
│ ├── AnnouncementInfoUserMapper.xml
│ ├── CommentMapper.xml
│ ├── CommonCodeMapper.xml
│ ├── DataCleaningMapper.xml
│ ├── HourseMapper.xml
│ ├── OrderMapper.xml
│ ├── ResourceMapper.xml
│ ├── RoleMapper.xml
│ ├── RoleResourceMapper.xml
│ ├── StoreMapper.xml
│ ├── SystemLogMapper.xml
│ ├── UserMapper.xml
│ └── UserRoleMapper.xml
└── mybatis-config.xml
└── webapp
├── WEB-INF
└── views
│ ├── error
│ ├── 404.jsp
│ ├── 500.jsp
│ └── unauthorized.jsp
│ ├── login.jsp
│ ├── main
│ ├── home.jsp
│ ├── index.jsp
│ └── loginProxy.jsp
│ ├── registerUI.jsp
│ ├── system
│ ├── announcement_add.jsp
│ ├── announcement_detail.jsp
│ ├── announcement_list.jsp
│ ├── announcement_unread_list.jsp
│ ├── comment
│ │ └── comment_list.jsp
│ ├── commonCode
│ │ ├── commonCode_add.jsp
│ │ ├── commonCode_list.jsp
│ │ └── commonCode_update.jsp
│ ├── hourse
│ │ ├── hourse_add.jsp
│ │ ├── hourse_list.jsp
│ │ ├── hourse_update.jsp
│ │ └── select_hourse.jsp
│ ├── order
│ │ ├── order_detail.jsp
│ │ ├── order_list.jsp
│ │ └── sale_list.jsp
│ ├── res_edit.jsp
│ ├── res_img.jsp
│ ├── res_list.jsp
│ ├── res_tree_list.jsp
│ ├── role_edit.jsp
│ ├── role_grant.jsp
│ ├── role_list.jsp
│ ├── salary
│ │ ├── salary_add.jsp
│ │ └── salary_list.jsp
│ ├── stoack
│ │ ├── in_stack.jsp
│ │ └── stoack_list.jsp
│ ├── store.jsp
│ ├── sys_log_list.jsp
│ ├── user_edit.jsp
│ ├── user_grant.jsp
│ └── user_list.jsp
│ └── user
│ ├── cart.jsp
│ ├── comment_add.jsp
│ ├── comment_list.jsp
│ ├── detail.jsp
│ ├── editUserUI.jsp
│ ├── header.jsp
│ ├── home.jsp
│ ├── info.jsp
│ ├── login.jsp
│ ├── more.jsp
│ ├── myorder.jsp
│ ├── register.jsp
│ └── view_hourse.jsp
├── about
├── about_brief.html
├── about_license.html
└── about_log.html
├── comm
├── myinc.jsp
└── mytags.jsp
├── static
├── css
│ ├── about.css
│ ├── backstage.css
│ ├── common.css
│ ├── global.css
│ ├── login.css
│ ├── main.css
│ ├── metroStyle
│ │ ├── img
│ │ │ ├── line_conn.png
│ │ │ ├── loading.gif
│ │ │ ├── metro.gif
│ │ │ └── metro.png
│ │ └── metroStyle.css
│ └── personal.css
├── echarts
│ ├── echarts.min.js
│ └── macarons.js
├── img
│ ├── dianzhan.jpg
│ ├── face.jpg
│ ├── favicon.ico
│ ├── left.gif
│ ├── lockBg.jpg
│ ├── login-bg.jpg
│ ├── login-bg1.jpg
│ ├── login-bg2.jpg
│ ├── login-bg3.jpg
│ ├── menu.png
│ ├── menu_o.png
│ ├── right.gif
│ └── temp-bg.jpg
├── js
│ ├── bodyTab.js
│ ├── common.js
│ ├── gtf.js
│ ├── index.js
│ ├── jquery-1.8.3.js
│ ├── jquery.leoweather.min.js
│ ├── main.js
│ ├── tabletree.js
│ └── test.json
├── layui
│ ├── css
│ │ ├── layui.css
│ │ ├── layui.mobile.css
│ │ └── modules
│ │ │ ├── code.css
│ │ │ ├── laydate
│ │ │ └── default
│ │ │ │ └── laydate.css
│ │ │ └── layer
│ │ │ └── default
│ │ │ ├── icon-ext.png
│ │ │ ├── icon.png
│ │ │ ├── layer.css
│ │ │ ├── loading-0.gif
│ │ │ ├── loading-1.gif
│ │ │ └── loading-2.gif
│ ├── font
│ │ ├── iconfont.eot
│ │ ├── iconfont.svg
│ │ ├── iconfont.ttf
│ │ ├── iconfont.woff
│ │ └── iconfont.woff2
│ ├── images
│ │ └── face
│ │ │ ├── 0.gif
│ │ │ ├── 1.gif
│ │ │ ├── 10.gif
│ │ │ ├── 11.gif
│ │ │ ├── 12.gif
│ │ │ ├── 13.gif
│ │ │ ├── 14.gif
│ │ │ ├── 15.gif
│ │ │ ├── 16.gif
│ │ │ ├── 17.gif
│ │ │ ├── 18.gif
│ │ │ ├── 19.gif
│ │ │ ├── 2.gif
│ │ │ ├── 20.gif
│ │ │ ├── 21.gif
│ │ │ ├── 22.gif
│ │ │ ├── 23.gif
│ │ │ ├── 24.gif
│ │ │ ├── 25.gif
│ │ │ ├── 26.gif
│ │ │ ├── 27.gif
│ │ │ ├── 28.gif
│ │ │ ├── 29.gif
│ │ │ ├── 3.gif
│ │ │ ├── 30.gif
│ │ │ ├── 31.gif
│ │ │ ├── 32.gif
│ │ │ ├── 33.gif
│ │ │ ├── 34.gif
│ │ │ ├── 35.gif
│ │ │ ├── 36.gif
│ │ │ ├── 37.gif
│ │ │ ├── 38.gif
│ │ │ ├── 39.gif
│ │ │ ├── 4.gif
│ │ │ ├── 40.gif
│ │ │ ├── 41.gif
│ │ │ ├── 42.gif
│ │ │ ├── 43.gif
│ │ │ ├── 44.gif
│ │ │ ├── 45.gif
│ │ │ ├── 46.gif
│ │ │ ├── 47.gif
│ │ │ ├── 48.gif
│ │ │ ├── 49.gif
│ │ │ ├── 5.gif
│ │ │ ├── 50.gif
│ │ │ ├── 51.gif
│ │ │ ├── 52.gif
│ │ │ ├── 53.gif
│ │ │ ├── 54.gif
│ │ │ ├── 55.gif
│ │ │ ├── 56.gif
│ │ │ ├── 57.gif
│ │ │ ├── 58.gif
│ │ │ ├── 59.gif
│ │ │ ├── 6.gif
│ │ │ ├── 60.gif
│ │ │ ├── 61.gif
│ │ │ ├── 62.gif
│ │ │ ├── 63.gif
│ │ │ ├── 64.gif
│ │ │ ├── 65.gif
│ │ │ ├── 66.gif
│ │ │ ├── 67.gif
│ │ │ ├── 68.gif
│ │ │ ├── 69.gif
│ │ │ ├── 7.gif
│ │ │ ├── 70.gif
│ │ │ ├── 71.gif
│ │ │ ├── 8.gif
│ │ │ └── 9.gif
│ ├── lay
│ │ └── modules
│ │ │ ├── carousel.js
│ │ │ ├── code.js
│ │ │ ├── colorpicker.js
│ │ │ ├── element.js
│ │ │ ├── flow.js
│ │ │ ├── form.js
│ │ │ ├── jquery.js
│ │ │ ├── laydate.js
│ │ │ ├── layedit.js
│ │ │ ├── layer.js
│ │ │ ├── laypage.js
│ │ │ ├── laytpl.js
│ │ │ ├── mobile.js
│ │ │ ├── rate.js
│ │ │ ├── slider.js
│ │ │ ├── table.js
│ │ │ ├── transfer.js
│ │ │ ├── tree.js
│ │ │ ├── upload.js
│ │ │ └── util.js
│ ├── layui.all.js
│ └── layui.js
├── layui_v2
│ ├── css
│ │ ├── layui.css
│ │ ├── layui.mobile.css
│ │ └── modules
│ │ │ ├── code.css
│ │ │ ├── laydate
│ │ │ └── default
│ │ │ │ └── laydate.css
│ │ │ └── layer
│ │ │ └── default
│ │ │ ├── icon-ext.png
│ │ │ ├── icon.png
│ │ │ ├── layer.css
│ │ │ ├── loading-0.gif
│ │ │ ├── loading-1.gif
│ │ │ └── loading-2.gif
│ ├── font
│ │ ├── iconfont.eot
│ │ ├── iconfont.svg
│ │ ├── iconfont.ttf
│ │ └── iconfont.woff
│ ├── images
│ │ └── face
│ │ │ ├── 0.gif
│ │ │ ├── 1.gif
│ │ │ ├── 10.gif
│ │ │ ├── 11.gif
│ │ │ ├── 12.gif
│ │ │ ├── 13.gif
│ │ │ ├── 14.gif
│ │ │ ├── 15.gif
│ │ │ ├── 16.gif
│ │ │ ├── 17.gif
│ │ │ ├── 18.gif
│ │ │ ├── 19.gif
│ │ │ ├── 2.gif
│ │ │ ├── 20.gif
│ │ │ ├── 21.gif
│ │ │ ├── 22.gif
│ │ │ ├── 23.gif
│ │ │ ├── 24.gif
│ │ │ ├── 25.gif
│ │ │ ├── 26.gif
│ │ │ ├── 27.gif
│ │ │ ├── 28.gif
│ │ │ ├── 29.gif
│ │ │ ├── 3.gif
│ │ │ ├── 30.gif
│ │ │ ├── 31.gif
│ │ │ ├── 32.gif
│ │ │ ├── 33.gif
│ │ │ ├── 34.gif
│ │ │ ├── 35.gif
│ │ │ ├── 36.gif
│ │ │ ├── 37.gif
│ │ │ ├── 38.gif
│ │ │ ├── 39.gif
│ │ │ ├── 4.gif
│ │ │ ├── 40.gif
│ │ │ ├── 41.gif
│ │ │ ├── 42.gif
│ │ │ ├── 43.gif
│ │ │ ├── 44.gif
│ │ │ ├── 45.gif
│ │ │ ├── 46.gif
│ │ │ ├── 47.gif
│ │ │ ├── 48.gif
│ │ │ ├── 49.gif
│ │ │ ├── 5.gif
│ │ │ ├── 50.gif
│ │ │ ├── 51.gif
│ │ │ ├── 52.gif
│ │ │ ├── 53.gif
│ │ │ ├── 54.gif
│ │ │ ├── 55.gif
│ │ │ ├── 56.gif
│ │ │ ├── 57.gif
│ │ │ ├── 58.gif
│ │ │ ├── 59.gif
│ │ │ ├── 6.gif
│ │ │ ├── 60.gif
│ │ │ ├── 61.gif
│ │ │ ├── 62.gif
│ │ │ ├── 63.gif
│ │ │ ├── 64.gif
│ │ │ ├── 65.gif
│ │ │ ├── 66.gif
│ │ │ ├── 67.gif
│ │ │ ├── 68.gif
│ │ │ ├── 69.gif
│ │ │ ├── 7.gif
│ │ │ ├── 70.gif
│ │ │ ├── 71.gif
│ │ │ ├── 8.gif
│ │ │ └── 9.gif
│ ├── lay
│ │ └── modules
│ │ │ ├── carousel.js
│ │ │ ├── code.js
│ │ │ ├── element.js
│ │ │ ├── flow.js
│ │ │ ├── form.js
│ │ │ ├── jquery.js
│ │ │ ├── laydate.js
│ │ │ ├── layedit.js
│ │ │ ├── layer.js
│ │ │ ├── laypage.js
│ │ │ ├── laytpl.js
│ │ │ ├── mobile.js
│ │ │ ├── table.js
│ │ │ ├── tree.js
│ │ │ ├── upload.js
│ │ │ └── util.js
│ ├── layui.all.js
│ └── layui.js
├── tree
│ ├── extend.tree.js
│ ├── images
│ │ ├── accordion_arrows.png
│ │ ├── blank.gif
│ │ ├── calendar_arrows.png
│ │ ├── combo_arrow.png
│ │ ├── datagrid_icons.png
│ │ ├── datebox_arrow.png
│ │ ├── layout_arrows.png
│ │ ├── linkbutton_bg.png
│ │ ├── loading.gif
│ │ ├── menu_arrows.png
│ │ ├── messager_icons.png
│ │ ├── pagination_icons.png
│ │ ├── panel_tools.png
│ │ ├── searchbox_button.png
│ │ ├── slider_handle.png
│ │ ├── spinner_arrows.png
│ │ ├── tabs_icons.png
│ │ ├── tree_icons.png
│ │ └── validatebox_warning.png
│ ├── tree.css
│ └── tree.min.js
└── video
│ └── video1.mp4
└── upload
├── 1.jpg
├── 1618227409819.jpg
├── 1703642438508.jpg
├── 1703643625759.png
├── 1703645264038.png
├── 2.jpg
├── 3.jpg
├── 4.jpg
└── 5.jpg
/.gitignore:
--------------------------------------------------------------------------------
1 | ######################################################################
2 | # Build Tools
3 |
4 | .gradle
5 | /build/
6 | !gradle/wrapper/gradle-wrapper.jar
7 |
8 | target/
9 | !.mvn/wrapper/maven-wrapper.jar
10 |
11 | out/
12 |
13 | ######################################################################
14 | # IDE
15 |
16 | ### STS ###
17 | .apt_generated
18 | .classpath
19 | .factorypath
20 | .project
21 | .settings
22 | .springBeans
23 |
24 | ### IntelliJ IDEA ###
25 | .idea
26 | *.iws
27 | *.iml
28 | *.ipr
29 |
30 | ### NetBeans ###
31 | nbproject/private/
32 | build/*
33 | nbbuild/
34 | dist/
35 | nbdist/
36 | .nb-gradle/
37 |
38 | ######################################################################
39 | # Others
40 | *.log
41 | *.xml.versionsBackup
42 | *.swp
43 |
44 | !*/build/*.java
45 | !*/build/*.html
46 | !*/build/*.xml
47 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
80.商城后台管理系统
2 |
3 | - 完整代码获取地址:从戎源码网 ([https://armycodes.com/](https://armycodes.com/))
4 | - 技术探讨、资料分享,请加QQ群:692619798
5 | - 作者微信:19941326836 QQ:952045282
6 | - 承接计算机毕业设计、Java毕业设计、Python毕业设计、深度学习、机器学习
7 | - 选题+开题报告+任务书+程序定制+安装调试+论文+答辩ppt 一条龙服务
8 | - 所有选题地址 ([https://github.com/YuLin-Coder/AllProjectCatalog](https://github.com/YuLin-Coder/AllProjectCatalog))
9 |
10 | ## 项目介绍
11 | 基于springboot的商城后台管理系统:前端 jsp、jquery、layui,后端 maven、springmvc、spring、mybatis,集成商城前台和后台系统,商品发布,财务管理,公告管理,商品浏览,购物车,结算等功能于一体的系统。
12 |
13 | ## 功能介绍
14 |
15 | ### 用户
16 |
17 | - 基本功能:登录、注册、退出、个人信息查看和修改,密码修改
18 | - 商城首页:导航栏,分类导航,轮播图,商品列表展示
19 | - 商品购买:商品详情,加入购物车,购物车页面,结算
20 | - 我的订单:订单列表查看
21 | - 我的评论:查看自己发出去的评论信息,删除评论
22 |
23 | ### 管理员
24 |
25 | - 系统设置:用户管理的增删改查,角色管理的增删改查,菜单管理的增删改查
26 | - 日志管理:日志信息的查看,导出
27 | - 公告管理:公告信息的增删改查,关键词搜索
28 | - 类型管理:类型管理的增删改查
29 | - 日月销售额:可以按日和月统计查看销售额情况
30 | - 评论管理:评论列表查询,评论信息删除,关键词查询
31 | - 商品管理:商品信息的增删改查,商品图片上传,内容富文本编辑
32 | - 订单管理:订单列表,根据订单号搜索,订单详情,订单删除
33 | - 采购管理:采购列表查询,进货操作
34 | - 锁屏:一键锁屏,输入密码解锁屏幕
35 |
36 | ### 商家
37 |
38 | - 公告管理:公告列表查询,公告详情
39 | - 日月销售额:可以按日和月统计查看销售额情况
40 | - 评论管理:评论列表查询,评论信息删除,关键词查询
41 | - 商品管理:商品信息的增删改查,商品图片上传,内容富文本编辑
42 | - 订单管理:订单列表,根据订单号搜索,订单详情,订单删除
43 | - 采购管理:采购列表查询,进货操作
44 |
45 | ## 环境
46 |
47 | - IntelliJ IDEA 2021.3
48 |
49 | - Mysql 5.7.26
50 |
51 | - JDK 1.8
52 |
53 | ## 运行截图
54 | 
55 |
56 | 
57 |
58 | 
59 |
60 | 
61 |
62 | 
63 |
64 | 
65 |
66 | 
67 |
68 | 
69 |
70 | 
71 |
72 | 
73 |
74 | 
75 |
--------------------------------------------------------------------------------
/screenshot/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YuLin-Coder/No80MallBackgroundManagementSystem/1c355fb92877f5669d2ba028ad4821234594d0c3/screenshot/1.png
--------------------------------------------------------------------------------
/screenshot/10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YuLin-Coder/No80MallBackgroundManagementSystem/1c355fb92877f5669d2ba028ad4821234594d0c3/screenshot/10.png
--------------------------------------------------------------------------------
/screenshot/11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YuLin-Coder/No80MallBackgroundManagementSystem/1c355fb92877f5669d2ba028ad4821234594d0c3/screenshot/11.png
--------------------------------------------------------------------------------
/screenshot/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YuLin-Coder/No80MallBackgroundManagementSystem/1c355fb92877f5669d2ba028ad4821234594d0c3/screenshot/2.png
--------------------------------------------------------------------------------
/screenshot/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YuLin-Coder/No80MallBackgroundManagementSystem/1c355fb92877f5669d2ba028ad4821234594d0c3/screenshot/3.png
--------------------------------------------------------------------------------
/screenshot/4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YuLin-Coder/No80MallBackgroundManagementSystem/1c355fb92877f5669d2ba028ad4821234594d0c3/screenshot/4.png
--------------------------------------------------------------------------------
/screenshot/5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YuLin-Coder/No80MallBackgroundManagementSystem/1c355fb92877f5669d2ba028ad4821234594d0c3/screenshot/5.png
--------------------------------------------------------------------------------
/screenshot/6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YuLin-Coder/No80MallBackgroundManagementSystem/1c355fb92877f5669d2ba028ad4821234594d0c3/screenshot/6.png
--------------------------------------------------------------------------------
/screenshot/7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YuLin-Coder/No80MallBackgroundManagementSystem/1c355fb92877f5669d2ba028ad4821234594d0c3/screenshot/7.png
--------------------------------------------------------------------------------
/screenshot/8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YuLin-Coder/No80MallBackgroundManagementSystem/1c355fb92877f5669d2ba028ad4821234594d0c3/screenshot/8.png
--------------------------------------------------------------------------------
/screenshot/9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YuLin-Coder/No80MallBackgroundManagementSystem/1c355fb92877f5669d2ba028ad4821234594d0c3/screenshot/9.png
--------------------------------------------------------------------------------
/src/main/conf/beta/jdbc.properties:
--------------------------------------------------------------------------------
1 | #============================================================================
2 | # dsopc
3 | #============================================================================
4 | jdbc.mysql-master.url=jdbc:mysql://localhost:3306/no80_contentmanagersystem_db?autoReconnect=true&useUnicode=true&characterEncoding=utf-8
5 | jdbc.mysql-master.username=root
6 | jdbc.mysql-master.password=123456
7 | jdbc.mysql-master.initialSize=5
8 | jdbc.mysql-master.maxActive=5
9 | jdbc.mysql-master.maxIdle=5
10 | jdbc.mysql-master.minIdle=1
11 | jdbc.mysql-master.maxWait=6000
12 | jdbc.mysql-master.validationQuery=SELECT 1 FROM DUAL
13 |
14 |
15 |
--------------------------------------------------------------------------------
/src/main/conf/beta/jedis.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YuLin-Coder/No80MallBackgroundManagementSystem/1c355fb92877f5669d2ba028ad4821234594d0c3/src/main/conf/beta/jedis.properties
--------------------------------------------------------------------------------
/src/main/conf/prd/jdbc.properties:
--------------------------------------------------------------------------------
1 | #============================================================================
2 | # dsopc
3 | #============================================================================
4 | jdbc.mysql-master.url=jdbc:mysql://localhost:3306/no80_contentmanagersystem_db?autoReconnect=true&useUnicode=true&characterEncoding\=utf-8
5 | jdbc.mysql-master.username=root
6 | jdbc.mysql-master.password=123456
7 | jdbc.mysql-master.initialSize=5
8 | jdbc.mysql-master.maxActive=5
9 | jdbc.mysql-master.maxIdle=5
10 | jdbc.mysql-master.minIdle=1
11 | jdbc.mysql-master.maxWait=6000
12 | jdbc.mysql-master.validationQuery=SELECT 1 FROM DUAL
13 |
14 |
15 |
--------------------------------------------------------------------------------
/src/main/conf/prd/jedis.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YuLin-Coder/No80MallBackgroundManagementSystem/1c355fb92877f5669d2ba028ad4821234594d0c3/src/main/conf/prd/jedis.properties
--------------------------------------------------------------------------------
/src/main/java/com/yxb/cms/Application.java:
--------------------------------------------------------------------------------
1 |
2 | package com.yxb.cms;
3 |
4 | import org.springframework.boot.SpringApplication;
5 | import org.springframework.boot.autoconfigure.SpringBootApplication;
6 | import org.springframework.boot.builder.SpringApplicationBuilder;
7 | import org.springframework.boot.web.support.SpringBootServletInitializer;
8 | import org.springframework.scheduling.annotation.EnableScheduling;
9 |
10 | @SpringBootApplication
11 | @EnableScheduling
12 | public class Application extends SpringBootServletInitializer{
13 |
14 | @Override
15 | protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
16 | return application.sources(Application.class);
17 | }
18 |
19 |
20 |
21 | public static void main(String[] args) throws Exception {
22 | SpringApplication.run(Application.class, args);
23 | }
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/src/main/java/com/yxb/cms/architect/annotation/SystemControllerLog.java:
--------------------------------------------------------------------------------
1 | package com.yxb.cms.architect.annotation;
2 |
3 | import java.lang.annotation.Documented;
4 | import java.lang.annotation.ElementType;
5 | import java.lang.annotation.Retention;
6 | import java.lang.annotation.RetentionPolicy;
7 | import java.lang.annotation.Target;
8 |
9 | @Target({ElementType.PARAMETER, ElementType.METHOD})//作用于参数或方法上
10 | @Retention(RetentionPolicy.RUNTIME)
11 | @Documented
12 | public @interface SystemControllerLog {
13 | String description() default "";
14 | }
--------------------------------------------------------------------------------
/src/main/java/com/yxb/cms/architect/annotation/SystemServiceLog.java:
--------------------------------------------------------------------------------
1 | package com.yxb.cms.architect.annotation;
2 |
3 | import java.lang.annotation.*;
4 |
5 | @Target({ElementType.PARAMETER, ElementType.METHOD})//作用于参数或方法上
6 | @Retention(RetentionPolicy.RUNTIME)
7 | @Documented
8 | public @interface SystemServiceLog {
9 | String description() default "";
10 | }
--------------------------------------------------------------------------------
/src/main/java/com/yxb/cms/architect/conf/AlipayConfig.java:
--------------------------------------------------------------------------------
1 | package com.yxb.cms.architect.conf;
2 |
3 | /**
4 | * 支付宝沙箱支付
5 | */
6 | public class AlipayConfig
7 | {
8 | public static String app_id = "2021000117627556";
9 |
10 | public static String merchant_private_key = "MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCuy2iokJw3jvfi0HCQPq+WQhk6f1MZCoNehlfWKYzQZGQrlm6X9ixWl1OYyE4hoPptSTnOTAFVW/QI8yVfZbA1OSKdQSJHEo09Y0twfXgFpqfgINinpT+kmdHmqpVNPJ8mgrSHtBBHAlnHANTdmbsdf/LqoO97aIK4Tk01LPnuyCrhYxpZenF4pyQ8uDiWvO2MWC8tmuU+LbIp2lZCbnNZ7SteTub4SI/2bfT3vegOqQDktDNXPb3QCIeGclKWOYm55XVxVADPuTloR8r8MK9EAziAipSh4Z0VsYAPod9z32F919Z9gLEGJ3SSjwxDWA2NujN6ZL+tpmLFv4w/nFV3AgMBAAECggEAQOriz9gFbMz4W5C2fZwKcm/SFtu67Q3uhGi4rp134t2mJloUcPPIu9AwCAo8mljDKVuM0IWB6UXheIF1W9zUeK/jnyvVozfMpQP/vKOcs9yVdLQ+QuUooeVPA7BPCwR8xzy797p0YSsKVNKGPFcgG3Cts15aEydZhUHvgtRVbszjnz0v5GZ3OrlBn8jPwaR0bv8qK6wJl4APAzs87UWf3h+tf++9aYrEHkERMzVFkTnUVbLPghOGB4Hz0U3O0zsGYUBFDi9dYf28B+tvo1CV4JDcHuMf9tWkDY+h4ZeGcCBfbwqOh5cF/7sZVE1jyWx3OF27H5jmRQHz5W4K+kJOAQKBgQDTk/jQFHKJ0/a5TBqkDywVW9o0Rhk30Ze0K68rACwFRaaMXxlYyCNsMq9HSTnyi+TP/YxzMSTouQaDrnDUipKdUWSVwL2qnR9k/CXwdJ2Ivjagn45qdtNUsbLJOQAc+nmKvlJhZmio4gzOGD0IiqP+aab/oTv9c6rZOBuLwBd4QQKBgQDTfmB/LYfYfEENkvuSJdVbE7hR4GpbZCeHvVsrgYHGxE3nPH49Rc9BijjF9B3NpMQMY/zo8rJjoq7DptmmbCSHj9qLT/JOx2oEJ7sfKPSdnNM7tGXmf3mIWK5oPM6FxRhu90k83HkdO0YDliR+Pma5+ywdHbvxvwy8Fi5+ieWftwKBgFZYm0CAN8ZcBOLWVkECGCGXXNPcj8oh9WGIOnK4HT8Bj9jVrsh21U4A2VukXMvJn9XqSflw4vk/GZOAC3gSHYeqgfxDrqQEf5188hbR4MC/sBeZRkvYtqJn6ukIJC2vYw7mYURywN+7cTJi3fWwbwETKR5GNO9Y1y7TIRrFiE6BAoGAf5OTSARCFs/VOgf44w8ZZYg+vn0eCyUeR15tGZBUpX8S8zLlf7aVsBZd6uM3+y2x6TuDe02zWDDxNSp3zlEbs/6NuU2vf+AAzqLc2I4PCOhp73EBqwooWJwOEOjlN4JOG9nlfuYL1RtFP7KZLuIbe4LM+H9QOSKi3u6Oe1xZfH8CgYBIPwNsGCAY3QYQvIlxc2+UZcYlRhXQV4eoe3RWeCYhhwA3M2gU+hD7d1wH5oVwsUjccidVkxQdMd0c+cQHJzZNwAOPKWzf3beu2PGtvYHJq3TEr/tvbVTgiggZ+TAzz3SqYnRifBXmcBQYUdm5MGIoOYP8fAJvuCDlXeL7lF6Zpw==";
11 |
12 | public static String alipay_public_key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyz482IDCympmqP/LPxDWBJyZ+55S4wvMTtS383oyYsvI/8UGylkBVxX8GmPe5WoA+SqTmvQSBOK6r5M3XS4+jpzvo7eJQLOmU0/1C9szQvbSUCCdxLCRtIz80RPN++WplLvlp4Alb06Q4ycx1LxI55anbfsXXoF6Obzr5h50z2LnW7bqLEx+BPj6ZvtGRXs/ux8FbZHm+kquMM4J/pGuLVohDk4rHvUGgtzWObP5i+ASWlEFGuSeovSDrrJw3ktern17faImZdjjQgwDCtHd8Q+qTbHzKSdzET6FFvmc8uiTFSXKfaAwbGD8MD7EF53plvVWsowQOqUXJglXPeEnYQIDAQAB";
13 |
14 | public static String notify_url = "http://localhost:8080/pay/alipayNotifyNotice.action";
15 |
16 | public static String return_url = "http://localhost:8080/pay/alipayReturnNotice.action";
17 |
18 | public static String sign_type = "RSA2";
19 |
20 | public static String charset = "utf-8";
21 |
22 | public static String gatewayUrl = "https://openapi.alipaydev.com/gateway.do";
23 | }
24 |
--------------------------------------------------------------------------------
/src/main/java/com/yxb/cms/architect/conf/MyWebAppConfigurer.java:
--------------------------------------------------------------------------------
1 |
2 | package com.yxb.cms.architect.conf;
3 |
4 | import com.yxb.cms.architect.interceptor.CommonInterceptor;
5 | import com.yxb.cms.architect.interceptor.ErrorInterceptor;
6 | import org.apache.logging.log4j.LogManager;
7 | import org.apache.logging.log4j.Logger;
8 | import org.springframework.boot.web.servlet.FilterRegistrationBean;
9 | import org.springframework.boot.web.support.ErrorPageFilter;
10 | import org.springframework.context.annotation.Bean;
11 | import org.springframework.context.annotation.Configuration;
12 | import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
13 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
14 |
15 | /**
16 | * WebMvc适配器
17 | */
18 | @Configuration
19 | public class MyWebAppConfigurer extends WebMvcConfigurerAdapter {
20 | private Logger log = LogManager.getLogger(MyWebAppConfigurer.class);
21 |
22 | @Bean
23 | public ErrorPageFilter errorPageFilter() {
24 | return new ErrorPageFilter();
25 | }
26 |
27 |
28 | /**
29 | * 只过滤*.do的错误信息
30 | * @param filter
31 | * @return
32 | */
33 | @Bean
34 | public FilterRegistrationBean disableSpringBootErrorFilter(ErrorPageFilter filter) {
35 | FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean();
36 | filterRegistrationBean.setFilter(filter);
37 | filterRegistrationBean.addUrlPatterns("*.do");
38 | return filterRegistrationBean;
39 | }
40 |
41 | /**
42 | * 拦截器添加
43 | * addPathPatterns 用于添加拦截规则
44 | * excludePathPatterns 用户排除拦截
45 | * @param registry
46 | */
47 | @Override
48 | public void addInterceptors(InterceptorRegistry registry) {
49 | log.info(">>>>拦截器注册>>>");
50 |
51 | // 多个拦截器组成一个拦截器链依次加载
52 |
53 |
54 | //通用错误页面拦截器
55 | registry.addInterceptor(new ErrorInterceptor()).addPathPatterns("/*");
56 | //通用错误页面拦截器
57 | registry.addInterceptor(new CommonInterceptor()).addPathPatterns("/*");
58 | super.addInterceptors(registry);
59 | }
60 |
61 |
62 |
63 |
64 | }
65 |
--------------------------------------------------------------------------------
/src/main/java/com/yxb/cms/architect/conf/RedisConfiguration.java:
--------------------------------------------------------------------------------
1 |
2 | package com.yxb.cms.architect.conf;
3 |
4 | import com.yxb.cms.architect.properties.JedisProperties;
5 | import com.yxb.cms.handler.RedisClient;
6 | import org.apache.logging.log4j.LogManager;
7 | import org.apache.logging.log4j.Logger;
8 | import org.springframework.beans.factory.annotation.Qualifier;
9 | import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
10 | import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
11 | import org.springframework.context.annotation.Bean;
12 | import org.springframework.context.annotation.Configuration;
13 | import redis.clients.jedis.JedisPool;
14 | import redis.clients.jedis.JedisPoolConfig;
15 |
16 | /**
17 | * redis配置
18 | */
19 | @Configuration
20 | @ConditionalOnClass(RedisClient.class)//判断这个类是否在classpath中存在
21 | public class RedisConfiguration{
22 |
23 |
24 | private Logger log = LogManager.getLogger(RedisConfiguration.class);
25 |
26 |
27 | @Bean(name="jedisPool")
28 | public JedisPool jedisPool() {
29 | JedisPoolConfig config = new JedisPoolConfig();
30 | config.setMaxTotal(JedisProperties.maxTotal);
31 | config.setMaxIdle(JedisProperties.maxIdle);
32 | config.setMaxWaitMillis(JedisProperties.maxWaitMillis);
33 | return new JedisPool(config, JedisProperties.host, JedisProperties.port,JedisProperties.timeOut,JedisProperties.password);
34 | }
35 |
36 |
37 | @Bean
38 | @ConditionalOnMissingBean(RedisClient.class) //容器中如果没有RedisClient这个类,那么自动配置这个RedisClient
39 | public RedisClient redisClient(@Qualifier("jedisPool") JedisPool pool) {
40 | log.info("初始化……Redis Client==Host={},Port={}", JedisProperties.host, JedisProperties.port);
41 | RedisClient redisClient = new RedisClient();
42 | redisClient.setJedisPool(pool);
43 | return redisClient;
44 | }
45 |
46 |
47 |
48 | }
--------------------------------------------------------------------------------
/src/main/java/com/yxb/cms/architect/constant/BusinessConstants.java:
--------------------------------------------------------------------------------
1 |
2 | package com.yxb.cms.architect.constant;
3 |
4 |
5 | /**
6 | * 系统管理平台业务常量定义
7 | */
8 | public enum BusinessConstants {
9 |
10 | /**用户状态*/
11 | SYS_USER_STATUS_0(0,"0-有效"),
12 | SYS_USER_STATUS_1(1,"1-失效"),
13 |
14 |
15 |
16 | /**角色状态*/
17 | SYS_ROLE_STATUS_0(0,"0-有效"),
18 | SYS_ROLE_STATUS_1(1,"1-失效"),
19 |
20 |
21 | /**菜单资源类型*/
22 | SYS_RES_TYPE_0(0,"0-菜单"),
23 | SYS_RES_TYPE_1(1,"1-按钮"),
24 |
25 | /**菜单资源状态*/
26 | SYS_RES_STATUS_0(0,"0-有效"),
27 | SYS_RES_STATUS_1(1,"1-失效"),
28 | /**菜单级别*/
29 | SYS_RES_LEVEL_1(1,"一级菜单"),
30 | SYS_RES_LEVEL_2(2,"二级菜单"),
31 | SYS_RES_LEVEL_3(3,"三级菜单"),
32 |
33 | /**公告类型*/
34 | ANNOUNCEMENT_TYPE_1(1,"系统公告"),
35 | ANNOUNCEMENT_TYPE_2(2,"活动公告"),
36 |
37 | /**数据清洗类型*/
38 | CLEAN_DATA_TYPE_1(1,"用户登陆"),
39 |
40 | ;
41 |
42 |
43 | BusinessConstants(Integer code, String msg) {
44 | this.code = code;
45 | this.msg = msg;
46 | }
47 |
48 | private Integer code;
49 |
50 | private String msg;
51 |
52 |
53 |
54 |
55 | public String toJson(){
56 |
57 | return "{\"code\":\"" + code + "\",\"msg\":\"" + msg + "!\"}";
58 |
59 | }
60 |
61 |
62 |
63 |
64 | public BusinessConstants getByCode(Integer code){
65 | for(BusinessConstants mc : values()){
66 | if(mc.getCode().equals(code)){
67 | return mc;
68 | }
69 | }
70 | return null;
71 | }
72 |
73 | public Integer getCode() {
74 | return code;
75 | }
76 |
77 | public void setCode(Integer code) {
78 | this.code = code;
79 | }
80 |
81 | public String getMsg() {
82 | return msg;
83 | }
84 |
85 | public void setMsg(String msg) {
86 | this.msg = msg;
87 | }
88 | public static void main(String[] args){
89 | for (BusinessConstants msg : values()) {
90 | System.out.println(msg.getCode()+"\t"+msg.getMsg());
91 | }
92 | }
93 | }
94 |
--------------------------------------------------------------------------------
/src/main/java/com/yxb/cms/architect/constant/BussinessCode.java:
--------------------------------------------------------------------------------
1 |
2 | package com.yxb.cms.architect.constant;
3 |
4 | /**
5 | * 后台管理系统平台业返回状态码和状态描述
6 | * 状态码概况: 状态码为4位 分割为2部分 状态码第一位为 模块信息,后面三位为 范围信息
7 | * 模块信息: 0.通用(如系统) 1.系统管理(角色、资源、用户)等
8 | * 范围信息: 1.操作成功范围 001-500,2.操作失败范围 501-999 特殊:0000 成功,9999异常
9 | *
10 | */
11 | public enum BussinessCode {
12 | // 成功
13 | GLOBAL_SUCCESS("0000","成功"),
14 | //失败
15 | GLOBAL_ERROR("9999", "系统正在维护中,请稍后再试!"),
16 |
17 |
18 |
19 | /**通用 */
20 | GLOBAL_LOGIN_NAME_NULL("0501","用户名不能为空"),
21 | GLOBAL_LOGIN_PASS_NULL("0502","密码不能为空"),
22 |
23 | GLOBAL_LOGIN_FAIL("0503","用户名或密码不匹配"),
24 |
25 | GLOBAL_LOGIN_ERROR("0504","系统登录异常"),
26 |
27 | GLOBAL_CAPTCHA_NULL("0505","验证码不能为空"),
28 |
29 | GLOBAL_CAPTCHA_ERROR("0506","验证码输入错误"),
30 |
31 |
32 |
33 |
34 | RES_SAVE_ERROR("1501","菜单资源信息保存失败"),
35 | ROLE_SAVE_ERROR("1502","角色信息保存失败"),
36 | USER_SAVE_ERROR("1503","用户信息保存失败"),
37 | USER_ROLE_SAVE_ERROR("1504","用户分配角色信息失败"),
38 | USER_FAIL_ERROR("1505","失效用户失败,程序异常"),
39 | ROLE_FAILK_ERROR("1506","失效角色失败,程序异常"),
40 | RES_FAILK_ERROR("1507","失效资源失败,程序异常"),
41 | USER_LOGIN_NAME_EXIST("1508","用户账号已存在,请重新输入"),
42 | ROLE_RES_SAVE_ERROR("1509","角色分配菜单失败"),
43 | ROLE_NAME_EXIST("1508","角色名称已存在,请重新输入"),
44 | ANNOUNCEMENT_SAVE_ERROR("1509","保存失败"),
45 | ANNOUNCEMENT_DEL_ERROR("1510","删除失败,程序异常"),
46 | APPLY_STATUS_ERROR("1512","申请资料没填写完整,不能进行提交"),
47 | IS_APPLY_STATUS_ERROR("1512","申请资料没填写完整,不能进行申报"),
48 | SALARY_HAS_STATUS_ERROR("1512","该月工资已经发放"),
49 | USER_NOT_STATUS_ERROR("1512","用户不存在"),
50 | COMMENT_ADD_STATUS_ERROR("0001","这个订单你已经评论过"),
51 | GOODS_ORDER_STATUS_ERROR("0003","加购的商品存在多家店铺,不能同时购买多家店铺商品"),
52 | GOODS_THESIZE_STATUS_ERROR("0004","存在商品库存不足"),
53 | DIANPU_NAME_STATUS_ERROR("0004","用户名重复"),
54 | DIANPU_STORE_NAME_STATUS_ERROR("0004","店铺名称重复"),
55 | ANNOUNCEMENT_USER_INSERT_ERROR("1511","标记为已读失败,程序异常");
56 |
57 |
58 | BussinessCode(String code, String msg) {
59 | this.code = code;
60 | this.msg = msg;
61 | }
62 |
63 | public String code;
64 |
65 | public String msg;
66 |
67 |
68 | public String getCode() {
69 | return code;
70 | }
71 |
72 | public void setCode(String code) {
73 | this.code = code;
74 | }
75 |
76 | public String getMsg() {
77 | return msg;
78 | }
79 |
80 | public void setMsg(String msg) {
81 | this.msg = msg;
82 | }
83 |
84 | }
85 |
--------------------------------------------------------------------------------
/src/main/java/com/yxb/cms/architect/constant/Constants.java:
--------------------------------------------------------------------------------
1 |
2 | package com.yxb.cms.architect.constant;
3 |
4 |
5 | /**
6 | * 系统管理平台公共常量定义
7 | */
8 | public class Constants {
9 |
10 | /**用户登录名称*/
11 | public static final String SESSION_KEY_LOGIN_NAME = "LOGIN_NAME";
12 | /**初始化密码*/
13 | public static final String INIT_LOGIN_PWD = "123456";
14 | /**ip来源apiUrl**/
15 | public static final String IP_INFO_API_URL = "http://ip.taobao.com/service/getIpInfo.php";
16 |
17 |
18 | /**echarts图表用户访问量*/
19 | public static final String REDIS_KEY_ECHARTS_USER_PV = "user_pv_key";
20 | }
21 |
--------------------------------------------------------------------------------
/src/main/java/com/yxb/cms/architect/filter/MyWebFilter.java:
--------------------------------------------------------------------------------
1 |
2 | package com.yxb.cms.architect.filter;
3 |
4 | import org.apache.logging.log4j.LogManager;
5 | import org.apache.logging.log4j.Logger;
6 |
7 | import javax.servlet.*;
8 | import javax.servlet.http.HttpServletRequest;
9 | import javax.servlet.http.HttpServletResponse;
10 | import java.io.IOException;
11 |
12 | /**
13 | * 自定义拦截器
14 | */
15 | //@Component
16 | public class MyWebFilter implements Filter {
17 | private Logger log = LogManager.getLogger(MyWebFilter.class);
18 |
19 |
20 | @Override
21 | public void init(FilterConfig filterConfig) throws ServletException {
22 |
23 | }
24 |
25 | @Override
26 | public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException {
27 | HttpServletResponse response = (HttpServletResponse) res;
28 | HttpServletRequest request = (HttpServletRequest) req;
29 | log.info("==>拦截请求"+response.getStatus());
30 | log.info(((HttpServletRequest) req).getRequestURL());
31 | chain.doFilter(req, res);
32 | }
33 |
34 | @Override
35 | public void destroy() {
36 |
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/com/yxb/cms/architect/interceptor/CommonInterceptor.java:
--------------------------------------------------------------------------------
1 |
2 | package com.yxb.cms.architect.interceptor;
3 |
4 | import org.apache.logging.log4j.LogManager;
5 | import org.apache.logging.log4j.Logger;
6 | import org.springframework.stereotype.Controller;
7 | import org.springframework.web.servlet.HandlerInterceptor;
8 | import org.springframework.web.servlet.ModelAndView;
9 |
10 | import javax.servlet.http.HttpServletRequest;
11 | import javax.servlet.http.HttpServletResponse;
12 |
13 | /**
14 | *公共拦截器添加
15 | *
16 | *1.使所有页面支持currentUser的el表达式调用
17 | *2.清除缓存
18 | */
19 | @Controller
20 | public class CommonInterceptor implements HandlerInterceptor {
21 | private Logger log = LogManager.getLogger(CommonInterceptor.class);
22 |
23 |
24 | /**
25 | * 在请求处理之前进行调用(Controller方法调用之前)当preHandle的返回值为false的时候整个请求结束
26 | */
27 | @Override
28 | public boolean preHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o) throws Exception {
29 | return true; // 只有返回true才会继续向下执行,返回false取消当前请求;
30 | }
31 |
32 | /**
33 | * 请求处理之后进行调用,但是在视图被渲染之前(Controller方法调用之后)
34 | */
35 | @Override
36 | public void postHandle(HttpServletRequest httpServletRequest, HttpServletResponse response, Object o, ModelAndView model) throws Exception {
37 | // 如果view是MappingJacksonJsonView,则model中不添加currentUser;
38 | // 因为JACKSON会转换model中的数据为JSON,这两个对象没有JACKSON注解,无法转换
39 | // if (model != null && response.getStatus()==200 && !(model.getView() instanceof MappingJackson2JsonView)) {
40 | // log.info("--"+new PermissionSubject(SecurityUtils.getSubject()));
41 | // model.addObject("currentUser", new PermissionSubject(SecurityUtils.getSubject()));
42 | //
43 | // }
44 |
45 |
46 | //清除缓存
47 | response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate"); // HTTP 1.1.
48 | response.setHeader("Pragma", "no-cache"); // HTTP 1.0.
49 | response.setHeader("Expires", "0"); // Proxies.
50 |
51 |
52 | }
53 | /**
54 | * 请求完成之后,也就是DispatcherServlet渲染了视图执行,主要作用是用于清理资源
55 | */
56 | @Override
57 | public void afterCompletion(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, Exception e) throws Exception {
58 |
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/src/main/java/com/yxb/cms/architect/interceptor/ErrorInterceptor.java:
--------------------------------------------------------------------------------
1 |
2 | package com.yxb.cms.architect.interceptor;
3 |
4 | import org.apache.logging.log4j.LogManager;
5 | import org.apache.logging.log4j.Logger;
6 | import org.springframework.stereotype.Controller;
7 | import org.springframework.web.servlet.HandlerInterceptor;
8 | import org.springframework.web.servlet.ModelAndView;
9 |
10 | import javax.servlet.http.HttpServletRequest;
11 | import javax.servlet.http.HttpServletResponse;
12 |
13 | /**
14 | *通用错误页面拦截器
15 | */
16 | @Controller
17 | public class ErrorInterceptor implements HandlerInterceptor {
18 | private Logger log = LogManager.getLogger(ErrorInterceptor.class);
19 |
20 |
21 | /**
22 | * 在请求处理之前进行调用(Controller方法调用之前)当preHandle的返回值为false的时候整个请求结束
23 | */
24 | @Override
25 | public boolean preHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o) throws Exception {
26 | return true; // 只有返回true才会继续向下执行,返回false取消当前请求;
27 | }
28 |
29 | /**
30 | * 请求处理之后进行调用,但是在视图被渲染之前(Controller方法调用之后)
31 | */
32 | @Override
33 | public void postHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, ModelAndView modelAndView) throws Exception {
34 | if(httpServletResponse.getStatus()==500){
35 | modelAndView.setViewName("error/500");
36 | }else if(httpServletResponse.getStatus()==404){
37 | modelAndView.setViewName("error/404");
38 | }
39 |
40 | }
41 | /**
42 | * 请求完成之后,也就是DispatcherServlet渲染了视图执行,主要作用是用于清理资源
43 | */
44 | @Override
45 | public void afterCompletion(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, Exception e) throws Exception {
46 |
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/src/main/java/com/yxb/cms/architect/interceptor/UserInterceptor.java:
--------------------------------------------------------------------------------
1 | package com.yxb.cms.architect.interceptor;
2 |
3 | import com.yxb.cms.domain.vo.User;
4 | import java.io.IOException;
5 | import javax.servlet.http.HttpServletRequest;
6 | import javax.servlet.http.HttpServletResponse;
7 | import org.springframework.stereotype.Component;
8 | import org.springframework.web.servlet.HandlerInterceptor;
9 | import org.springframework.web.servlet.ModelAndView;
10 |
11 |
12 | @Component
13 | public class UserInterceptor implements HandlerInterceptor
14 | {
15 | /**
16 | * 在请求处理之前进行调用(Controller方法调用之前)
17 | */
18 | @Override
19 | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) {
20 | // System.out.println("执行了TestInterceptor的preHandle方法");
21 | try {
22 | //统一拦截(查询当前session是否存在user)(这里user会在每次登陆成功后,写入session)
23 | User user=(User)request.getSession().getAttribute("loginUser");
24 | if(user!=null){
25 | return true;
26 | }
27 | response.sendRedirect("/user_login/loginUI.do");
28 | } catch (IOException e) {
29 | e.printStackTrace();
30 | }
31 | return false;//如果设置为false时,被请求时,拦截器执行到此处将不会继续操作
32 | //如果设置为true时,请求将会继续执行后面的操作
33 | }
34 |
35 | /**
36 | * 请求处理之后进行调用,但是在视图被渲染之前(Controller方法调用之后)
37 | */
38 | @Override
39 | public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) {
40 | // System.out.println("执行了TestInterceptor的postHandle方法");
41 | }
42 |
43 | /**
44 | * 在整个请求结束之后被调用,也就是在DispatcherServlet 渲染了对应的视图之后执行(主要是用于进行资源清理工作)
45 | */
46 | @Override
47 | public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) {
48 |
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/src/main/java/com/yxb/cms/architect/properties/JdbcProperties.java:
--------------------------------------------------------------------------------
1 |
2 | package com.yxb.cms.architect.properties;
3 |
4 | import org.springframework.boot.context.properties.ConfigurationProperties;
5 | import org.springframework.context.annotation.PropertySource;
6 | import org.springframework.stereotype.Component;
7 |
8 | /**
9 | * 数据库相关配置
10 | * 读取jdbc.properties配置文件,配置不同环境的数据库配置信息
11 | */
12 | @Component
13 | @PropertySource("classpath:jdbc.properties")
14 | @ConfigurationProperties(prefix = "jdbc.mysql-master")
15 | public class JdbcProperties {
16 |
17 | //数据库URL
18 | private String url;
19 | //数据库用户名
20 | private String username;
21 | //数据库密码
22 | private String password;
23 | //初始化链接大小
24 | private int initialSize;
25 | //连接池最大使用链接数量
26 | private int maxActive;
27 | //连接池最大空闲
28 | private int maxIdle;
29 | //连接池最小空闲
30 | private int minIdle;
31 | //连接池最大等待时间
32 | private long maxWait;
33 | //验证数据库是否连通
34 | private String validationQuery;
35 |
36 |
37 | public String getUrl() {
38 | return url;
39 | }
40 |
41 | public void setUrl(String url) {
42 | this.url = url;
43 | }
44 |
45 | public String getUsername() {
46 | return username;
47 | }
48 |
49 | public void setUsername(String username) {
50 | this.username = username;
51 | }
52 |
53 | public String getPassword() {
54 | return password;
55 | }
56 |
57 | public void setPassword(String password) {
58 | this.password = password;
59 | }
60 |
61 | public int getInitialSize() {
62 | return initialSize;
63 | }
64 |
65 | public void setInitialSize(int initialSize) {
66 | this.initialSize = initialSize;
67 | }
68 |
69 | public int getMaxActive() {
70 | return maxActive;
71 | }
72 |
73 | public void setMaxActive(int maxActive) {
74 | this.maxActive = maxActive;
75 | }
76 |
77 | public int getMaxIdle() {
78 | return maxIdle;
79 | }
80 |
81 | public void setMaxIdle(int maxIdle) {
82 | this.maxIdle = maxIdle;
83 | }
84 |
85 | public int getMinIdle() {
86 | return minIdle;
87 | }
88 |
89 | public void setMinIdle(int minIdle) {
90 | this.minIdle = minIdle;
91 | }
92 |
93 | public long getMaxWait() {
94 | return maxWait;
95 | }
96 |
97 | public void setMaxWait(long maxWait) {
98 | this.maxWait = maxWait;
99 | }
100 |
101 | public String getValidationQuery() {
102 | return validationQuery;
103 | }
104 |
105 | public void setValidationQuery(String validationQuery) {
106 | this.validationQuery = validationQuery;
107 | }
108 | }
109 |
--------------------------------------------------------------------------------
/src/main/java/com/yxb/cms/architect/properties/JedisProperties.java:
--------------------------------------------------------------------------------
1 |
2 | package com.yxb.cms.architect.properties;
3 |
4 | import org.springframework.boot.context.properties.ConfigurationProperties;
5 | import org.springframework.context.annotation.PropertySource;
6 | import org.springframework.stereotype.Component;
7 |
8 | /**
9 | * redis配置
10 | * 读取jedis.properties配置文件,配置不同环境的redis配置信息
11 | */
12 | @Component
13 | @PropertySource("classpath:jedis.properties")
14 | @ConfigurationProperties(prefix = "redis-pool")
15 | public class JedisProperties {
16 |
17 | //Redis服务器地址
18 | public static String host;
19 | //Redis服务器端口
20 | public static int port;
21 |
22 | //Redis服务器连接密码(默认为空)
23 | public static String password;
24 | //连接超时时间(毫秒)
25 | public static int timeOut;
26 |
27 | //连接池中的最大空闲连接
28 | public static int maxIdle;
29 | //连接池最大阻塞等待时间(使用负值表示没有限制)
30 | public static int maxWaitMillis;
31 |
32 | //连接池最大实例
33 | public static int maxTotal;
34 |
35 |
36 | public static void setHost(String host) {
37 | JedisProperties.host = host;
38 | }
39 |
40 | public static void setPort(int port) {
41 | JedisProperties.port = port;
42 | }
43 |
44 | public static void setPassword(String password) {
45 | JedisProperties.password = password;
46 | }
47 |
48 | public static void setTimeOut(int timeOut) {
49 | JedisProperties.timeOut = timeOut;
50 | }
51 |
52 | public static void setMaxIdle(int maxIdle) {
53 | JedisProperties.maxIdle = maxIdle;
54 | }
55 |
56 | public static void setMaxWaitMillis(int maxWaitMillis) {
57 | JedisProperties.maxWaitMillis = maxWaitMillis;
58 | }
59 |
60 | public static void setMaxTotal(int maxTotal) {
61 | JedisProperties.maxTotal = maxTotal;
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/src/main/java/com/yxb/cms/architect/task/SystemScheduledTask.java:
--------------------------------------------------------------------------------
1 |
2 | package com.yxb.cms.architect.task;
3 |
4 | import com.yxb.cms.architect.constant.Constants;
5 | import com.yxb.cms.handler.RedisClient;
6 | import com.yxb.cms.service.DataCleaningService;
7 | import org.apache.logging.log4j.LogManager;
8 | import org.apache.logging.log4j.Logger;
9 | import org.springframework.beans.factory.annotation.Autowired;
10 | import org.springframework.scheduling.annotation.Scheduled;
11 | import org.springframework.stereotype.Component;
12 |
13 | /**
14 | * 后台管理系统定时任务执行类
15 |
16 | */
17 | @Component
18 | public class SystemScheduledTask {
19 |
20 | private Logger log = LogManager.getLogger(SystemScheduledTask.class);
21 |
22 | @Autowired
23 | private DataCleaningService dataCleaningService;
24 |
25 | @Autowired
26 | private RedisClient redisClient;
27 |
28 |
29 | /**
30 | * 定时执行用户访问量,数据清洗,每天凌晨3点执行一次
31 | */
32 | // @Scheduled(cron = "0/10 * * * * ?") // 每10秒执行一次
33 | @Scheduled(cron = "0 0 3 * * ?") // 每天3点执行
34 | public void executeDataCleanScheduler() {
35 | log.info(">>>>>>>>>>>>> 定时执行用户访问量数据清洗... ... ");
36 | try {
37 | dataCleaningService.insertDataCleanBatchByLogin();
38 | log.info(">>>>>>>>>>>>>将清洗数据set到redis");
39 | redisClient.set(Constants.REDIS_KEY_ECHARTS_USER_PV,dataCleaningService.selectEchartsByLoginInfo());
40 | } catch (Exception e) {
41 | log.error("用户访问量数据清洗异常", e);
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/main/java/com/yxb/cms/architect/utils/BussinessMsgUtil.java:
--------------------------------------------------------------------------------
1 |
2 | package com.yxb.cms.architect.utils;
3 |
4 | import com.yxb.cms.architect.constant.BussinessCode;
5 | import com.yxb.cms.domain.bo.BussinessMsg;
6 |
7 | /**
8 | * 后台管理系统返回码信息帮助类
9 | */
10 |
11 | public class BussinessMsgUtil {
12 |
13 |
14 | /**
15 | * 返回消息代码code 和 message
16 | *
17 | * @param bussinessCode 返回码
18 | * @return
19 | */
20 | public static BussinessMsg returnCodeMessage(BussinessCode bussinessCode) {
21 | return returnCodeMessage(bussinessCode, null);
22 | }
23 |
24 | /**
25 | * 返回消息代码和数据
26 | *
27 | * @param bussinessCode 返回码
28 | * @param returnData 返回数据
29 | * @return
30 | */
31 | public static BussinessMsg returnCodeMessage(BussinessCode bussinessCode, Object returnData) {
32 | BussinessMsg bussinessMsg = new BussinessMsg();
33 | bussinessMsg.setReturnCode(bussinessCode.getCode());
34 | bussinessMsg.setReturnMessage(bussinessCode.getMsg());
35 | bussinessMsg.setReturnData(returnData);
36 | return bussinessMsg;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/com/yxb/cms/architect/utils/ClientIpUtil.java:
--------------------------------------------------------------------------------
1 |
2 | package com.yxb.cms.architect.utils;
3 |
4 | import com.yxb.cms.architect.constant.Constants;
5 | import net.sf.json.JSONObject;
6 |
7 | import javax.servlet.http.HttpServletRequest;
8 | import java.net.InetAddress;
9 | import java.net.UnknownHostException;
10 | import java.util.HashMap;
11 | import java.util.Map;
12 |
13 | /**
14 | * 获取客户端IP地址
15 | */
16 | public class ClientIpUtil {
17 |
18 |
19 | /**
20 | * 获取客户端IP地址
21 | * @param request 请求
22 | * @return
23 | */
24 | public static String getIpAddr(HttpServletRequest request) {
25 | String ip = request.getHeader("x-forwarded-for");
26 | if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
27 | ip = request.getHeader("Proxy-Client-IP");
28 | }
29 | if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
30 | ip = request.getHeader("WL-Proxy-Client-IP");
31 | }
32 | if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
33 | ip = request.getRemoteAddr();
34 | if (ip.equals("127.0.0.1")) {
35 | //根据网卡取本机配置的IP
36 | InetAddress inet = null;
37 | try {
38 | inet = InetAddress.getLocalHost();
39 | } catch (UnknownHostException e) {
40 | e.printStackTrace();
41 | }
42 | ip = inet.getHostAddress();
43 | }
44 | }
45 | // 对于通过多个代理的情况,第一个IP为客户端真实IP,多个IP按照','分割
46 | if (ip != null && ip.length() > 15) {
47 | if (ip.indexOf(",") > 0) {
48 | ip = ip.substring(0, ip.indexOf(","));
49 | }
50 | }
51 | return ip;
52 | }
53 |
54 | /**
55 | * 获取IP返回地理位置
56 | * @param ipAddr ip地址
57 | * @return
58 | */
59 | public static String getIpAddrSource(String ipAddr){
60 | if(null != ipAddr){
61 | String url = Constants.IP_INFO_API_URL;
62 | Map param = new HashMap<>();
63 | param.put("ip",ipAddr);
64 | String result = HttpUtil.post(url,param);
65 | if(null != result){
66 | JSONObject obj = JSONObject.fromObject(result);
67 | //查询返回结果成功
68 | if("0".equals(obj.get("code").toString())){
69 | JSONObject obj2 = (JSONObject) obj.get("data");
70 | return obj2.get("region")+" " +obj2.get("city");
71 | }
72 | }
73 | }
74 | return null;
75 | }
76 | }
--------------------------------------------------------------------------------
/src/main/java/com/yxb/cms/architect/utils/CommonHelper.java:
--------------------------------------------------------------------------------
1 |
2 | package com.yxb.cms.architect.utils;
3 |
4 | import com.yxb.cms.architect.view.ExcelView;
5 | import com.yxb.cms.domain.bo.ExcelExport;
6 | import org.springframework.web.servlet.ModelAndView;
7 |
8 | import java.util.HashMap;
9 | import java.util.Map;
10 |
11 |
12 |
13 | /**
14 | * 公共帮助类
15 | */
16 | public class CommonHelper{
17 |
18 |
19 | /**
20 | * 获得excel model and view
21 | *
22 | * @param excelExportBean
23 | * @return excel model and view
24 | */
25 | public static ModelAndView getExcelModelAndView(Object excelExportBean){
26 | return getExcelModelAndView(excelExportBean, null);
27 | }
28 |
29 | /**
30 | * 获得excel model and view
31 | *
32 | * @param excelExportBean
33 | * @return excel model and view
34 | */
35 | public static ModelAndView getExcelModelAndView(Object excelExportBean, String excelName){
36 | Map map = new HashMap();
37 | map.put(ExcelView.EXCEL_EXPORT_BEAN, excelExportBean);
38 | map.put(ExcelView.EXCEL_EXPORT_NAME, excelName);
39 | if(excelExportBean instanceof ExcelExport){
40 | map.put(ExcelView.EXCEL_EXPORT_TYPE, ExcelView.EXCEL_EXPORT_TYPE_SINGLE_SHEET);
41 | }else{
42 | map.put(ExcelView.EXCEL_EXPORT_TYPE, ExcelView.EXCEL_EXPORT_TYPE_MULTIPLE_SHEET);
43 | }
44 | return new ModelAndView(new ExcelView(), map);
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/src/main/java/com/yxb/cms/architect/utils/KeyConfig.java:
--------------------------------------------------------------------------------
1 |
2 | package com.yxb.cms.architect.utils;
3 |
4 | import java.util.ArrayList;
5 | import java.util.List;
6 |
7 | /**
8 | * 定义一些code的生成方式,生成随机数,根据每次的随机结果定义
9 | */
10 | public class KeyConfig {
11 |
12 | static char[] seeds={'1','2','3','4','5','6','7','8','9','0','a','b','c','d','e','f','g','h','i',
13 | 'j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','A','B','C','D','E',
14 | 'F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};
15 |
16 |
17 | /**
18 | * 生成八位资源菜单CODE
19 | * @return
20 | */
21 | public static synchronized String randomResourceModeCode(){
22 |
23 | StringBuffer seed= new StringBuffer();
24 | for (int i = 0; i < 8; i++) {
25 | //生成一个62内的随机数
26 | Integer random = (int) (Math.random()*62);
27 | seed.append(seeds[random]);
28 | }
29 | return seed.toString();
30 | }
31 |
32 | public static void main(String[] args) throws InterruptedException {
33 | Integer i=0;
34 | List seeds= new ArrayList();
35 | while(i<1000){
36 | seeds.add(randomResourceModeCode());
37 | i++;
38 | Thread.sleep(1L);
39 | }
40 |
41 | List result = new ArrayList();
42 |
43 |
44 | for (String string : seeds) {
45 | if(result.contains(string)){
46 |
47 | System.out.println("seed 重复:"+string);
48 | }else{
49 | result.add(string);
50 | System.out.println(string);
51 | }
52 |
53 | }
54 |
55 | }
56 |
57 |
58 | }
59 |
--------------------------------------------------------------------------------
/src/main/java/com/yxb/cms/architect/utils/ParseObjectUtils.java:
--------------------------------------------------------------------------------
1 |
2 | package com.yxb.cms.architect.utils;
3 |
4 | import org.apache.commons.lang3.StringUtils;
5 |
6 | /**
7 | * 对象转换解析工具类
8 | */
9 | public class ParseObjectUtils {
10 |
11 |
12 | /**
13 | * 将以逗号分割的字符串数组转换为Int型数组
14 | * @param strs 逗号分割字符
15 | * @return
16 | */
17 | public static Integer[] strArrayToIntArray(String strs){
18 | if(StringUtils.isNotEmpty(strs)){
19 | String[] str=strs.split(",");
20 |
21 | Integer[] intArray = new Integer[str.length];
22 | for (int i = 0; i < str.length; i++) {
23 | intArray[i] = Integer.parseInt(str[i]);
24 | }
25 | return intArray;
26 | }
27 | return new Integer[0];
28 | }
29 |
30 |
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/com/yxb/cms/architect/utils/SpringUtils.java:
--------------------------------------------------------------------------------
1 |
2 | package com.yxb.cms.architect.utils;
3 |
4 | import org.springframework.beans.BeansException;
5 | import org.springframework.context.ApplicationContext;
6 | import org.springframework.context.ApplicationContextAware;
7 | import org.springframework.stereotype.Component;
8 |
9 | /**
10 | * 获取Spring bean 上下文环境
11 | */
12 |
13 |
14 | @Component
15 | public class SpringUtils implements ApplicationContextAware {
16 | private static ApplicationContext applicationContext = null;
17 |
18 | @Override
19 | public void setApplicationContext(ApplicationContext arg0) throws BeansException {
20 | if (SpringUtils.applicationContext == null) {
21 | SpringUtils.applicationContext = arg0;
22 | }
23 | }
24 |
25 | // 获取applicationContext
26 | public static ApplicationContext getApplicationContext() {
27 | return applicationContext;
28 | }
29 |
30 | // 通过name获取 Bean.
31 | public static Object getBean(String name) {
32 | return getApplicationContext().getBean(name);
33 | }
34 |
35 | // 通过class获取Bean.
36 | public static T getBean(Class clazz) {
37 | return getApplicationContext().getBean(clazz);
38 | }
39 |
40 | // 通过name,以及Clazz返回指定的Bean
41 | public static T getBean(String name, Class clazz) {
42 | return getApplicationContext().getBean(name, clazz);
43 | }
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/src/main/java/com/yxb/cms/architect/utils/ThreadPool.java:
--------------------------------------------------------------------------------
1 |
2 | package com.yxb.cms.architect.utils;
3 |
4 |
5 | import java.util.concurrent.ArrayBlockingQueue;
6 | import java.util.concurrent.BlockingQueue;
7 | import java.util.concurrent.ThreadPoolExecutor;
8 | import java.util.concurrent.TimeUnit;
9 |
10 | /**
11 | * 单例线程池
12 | */
13 | public class ThreadPool {
14 |
15 | //线程缓冲队列
16 | private static BlockingQueue bqueue = new ArrayBlockingQueue(100);
17 | // 核心线程数,会一直存活,即使没有任务,线程池也会维护线程的最少数量
18 | private static final int SIZE_CORE_POOL = 5;
19 | // 线程池维护线程的最大数量
20 | private static final int SIZE_MAX_POOL = 10;
21 | // 线程池维护线程所允许的空闲时间
22 | private static final long ALIVE_TIME = 2000;
23 |
24 |
25 | private static ThreadPoolExecutor pool = new ThreadPoolExecutor(SIZE_CORE_POOL, SIZE_MAX_POOL, ALIVE_TIME, TimeUnit.MILLISECONDS, bqueue, new ThreadPoolExecutor.CallerRunsPolicy());
26 |
27 | static {
28 |
29 | pool.prestartAllCoreThreads();
30 | }
31 |
32 |
33 | public static ThreadPoolExecutor getPool() {
34 | return pool;
35 | }
36 |
37 | public static void main(String[] args) {
38 | System.out.println(pool.getPoolSize());
39 | }
40 |
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/src/main/java/com/yxb/cms/controller/BasicController.java:
--------------------------------------------------------------------------------
1 |
2 | package com.yxb.cms.controller;
3 |
4 | import com.yxb.cms.domain.vo.User;
5 | import org.apache.logging.log4j.LogManager;
6 | import org.apache.logging.log4j.Logger;
7 | import org.apache.shiro.SecurityUtils;
8 | import org.apache.shiro.subject.Subject;
9 | import org.springframework.context.annotation.Scope;
10 | import org.springframework.stereotype.Controller;
11 |
12 | /**
13 | * Controller 父类
14 | */
15 | @Controller
16 | @Scope("prototype")
17 | public class BasicController {
18 |
19 | protected Logger log = LogManager.getLogger(getClass());
20 |
21 |
22 | /**
23 | * 登录用户名
24 | */
25 | public String getCurrentLoginName() {
26 | Subject currentUser = SecurityUtils.getSubject();
27 | User user = currentUser.getPrincipals().oneByType(User.class);
28 | return user.getUserLoginName();
29 | }
30 |
31 | /**
32 | * 登陆用户id
33 | * @return
34 | */
35 | public Integer getCurrentLoginId(){
36 | Subject currentUser = SecurityUtils.getSubject();
37 | User user = currentUser.getPrincipals().oneByType(User.class);
38 | return user.getUserId();
39 | }
40 |
41 | /**
42 | * 登录用户对象
43 | */
44 | public User getCurrentUser() {
45 | Subject currentUser = SecurityUtils.getSubject();
46 | User user = currentUser.getPrincipals().oneByType(User.class);
47 | return user;
48 | }
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/src/main/java/com/yxb/cms/controller/IndexController.java:
--------------------------------------------------------------------------------
1 |
2 | package com.yxb.cms.controller;
3 |
4 | import com.yxb.cms.architect.constant.Constants;
5 | import com.yxb.cms.handler.RedisClient;
6 | import com.yxb.cms.service.DataCleaningService;
7 | import org.apache.commons.lang3.StringUtils;
8 | import org.springframework.beans.factory.annotation.Autowired;
9 | import org.springframework.stereotype.Controller;
10 | import org.springframework.web.bind.annotation.RequestMapping;
11 | import org.springframework.web.bind.annotation.ResponseBody;
12 |
13 |
14 | /**
15 | * 主页Controller
16 | */
17 | @Controller
18 | @RequestMapping("main")
19 | public class IndexController extends BasicController {
20 |
21 | @Autowired
22 | private DataCleaningService dataCleaningService;
23 | @Autowired
24 | private RedisClient redisClient;
25 |
26 | /**
27 | *跳转到主页
28 | * @return
29 | */
30 | @RequestMapping("/index.do")
31 | public String toIndexPage() {
32 | return "main/index";
33 | }
34 |
35 | /**
36 | * 跳转到欢迎页
37 | * @return
38 | */
39 | @RequestMapping("/home.do")
40 | public String toHomePage() {
41 | return "main/home";
42 | }
43 |
44 | /**
45 | * 跳转到权限不足页面
46 | * @return
47 | */
48 | @RequestMapping("/unauthorized.do")
49 | public String toUnauthorizedPage() {
50 | return "error/unauthorized";
51 | }
52 |
53 | /**
54 | * 网站访问量,图表展示
55 | * @return
56 | */
57 | @RequestMapping("/ajax_echarts_login_info.do")
58 | @ResponseBody
59 | public String ajaxEchartsByLoginInfo() {
60 |
61 | String userPv = redisClient.get(Constants.REDIS_KEY_ECHARTS_USER_PV);
62 | if(StringUtils.isNotEmpty(userPv)){
63 | return userPv;
64 | }
65 | log.info("redis值为空,查询数据库,并重新set到redis");
66 | String dataUserPv = dataCleaningService.selectEchartsByLoginInfo();
67 | redisClient.set(Constants.REDIS_KEY_ECHARTS_USER_PV,dataUserPv);
68 | return dataUserPv;
69 |
70 | }
71 |
72 |
73 | }
74 |
--------------------------------------------------------------------------------
/src/main/java/com/yxb/cms/controller/ManagerErrorController.java:
--------------------------------------------------------------------------------
1 |
2 | package com.yxb.cms.controller;
3 |
4 | import org.springframework.boot.autoconfigure.web.ErrorController;
5 | import org.springframework.stereotype.Controller;
6 | import org.springframework.web.bind.annotation.RequestMapping;
7 |
8 | /**
9 | *
10 | * 错误页面Controller
11 | * 用于解决当 页面加载静态资源404时,拦截器报空指针问题
12 | */
13 |
14 | @Controller
15 | public class ManagerErrorController extends BasicController implements ErrorController {
16 | private static final String ERROR_PATH = "/error";
17 | @RequestMapping(value=ERROR_PATH)
18 | public String handleError(){
19 | return "error/404";
20 | }
21 | @Override
22 | public String getErrorPath() {
23 | return ERROR_PATH;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/com/yxb/cms/controller/system/CommentController.java:
--------------------------------------------------------------------------------
1 | package com.yxb.cms.controller.system;
2 |
3 | import com.yxb.cms.architect.constant.BussinessCode;
4 | import com.yxb.cms.architect.utils.BussinessMsgUtil;
5 | import com.yxb.cms.controller.BasicController;
6 | import com.yxb.cms.domain.bo.BussinessMsg;
7 | import com.yxb.cms.domain.vo.Comment;
8 | import com.yxb.cms.service.CommentService;
9 | import com.yxb.cms.util.TokenUtil;
10 | import org.springframework.beans.factory.annotation.Autowired;
11 | import org.springframework.stereotype.Controller;
12 | import org.springframework.web.bind.annotation.RequestMapping;
13 | import org.springframework.web.bind.annotation.ResponseBody;
14 |
15 | @Controller
16 | @RequestMapping("comment")
17 | public class CommentController extends BasicController
18 | {
19 |
20 | @Autowired
21 | private CommentService commentService;
22 |
23 | /**
24 | *跳转到列表页面
25 | * @return
26 | */
27 | @RequestMapping("/comment_list.do")
28 | public String toListPage()
29 | {
30 | return "system/comment/comment_list";
31 | }
32 |
33 | /**
34 | * 列表List
35 | * @return
36 | */
37 | @RequestMapping("/ajax_comment_list.do")
38 | @ResponseBody
39 | public String ajaxList(Comment comment)
40 | {
41 | if(!"20210410161112".equals(TokenUtil.getCurrentUser().getRelationId())){
42 | comment.setDianpu_code(TokenUtil.getCurrentUser().getRelationId());
43 | }
44 |
45 | return commentService.selectListBypage(comment);
46 | }
47 |
48 | /**
49 | *跳转到新增页面
50 | * @return
51 | */
52 | @RequestMapping("/comment_add.do")
53 | public String toAddPage()
54 | {
55 | return "system/comment/comment_add";
56 | }
57 |
58 | /**
59 | * 保存信息
60 | * @return
61 | */
62 | @RequestMapping("/ajax_save_comment.do")
63 | @ResponseBody
64 | public BussinessMsg ajaxSaveComment(Comment comment)
65 | {
66 | try
67 | {
68 | return commentService.saveInfo(comment);
69 | }
70 | catch(Exception e)
71 | {
72 | log.error("保存信息方法内部错误", e);
73 | return BussinessMsgUtil.returnCodeMessage(BussinessCode.ANNOUNCEMENT_SAVE_ERROR);
74 | }
75 | }
76 |
77 | /**
78 | * 删除
79 | */
80 | @RequestMapping("/ajax_del_comment.do")
81 | @ResponseBody
82 | public BussinessMsg deleteById(Integer id)
83 | {
84 | try
85 | {
86 | return commentService.deleteById(id);
87 | }
88 | catch(Exception e)
89 | {
90 | log.error("删除信息方法内部错误", e);
91 | return BussinessMsgUtil.returnCodeMessage(BussinessCode.ANNOUNCEMENT_DEL_ERROR);
92 | }
93 | }
94 |
95 |
96 | }
97 |
--------------------------------------------------------------------------------
/src/main/java/com/yxb/cms/controller/system/InStoackController.java:
--------------------------------------------------------------------------------
1 | package com.yxb.cms.controller.system;
2 |
3 | import com.yxb.cms.architect.constant.BussinessCode;
4 | import com.yxb.cms.architect.utils.BussinessMsgUtil;
5 | import com.yxb.cms.controller.BasicController;
6 | import com.yxb.cms.domain.bo.BussinessMsg;
7 | import com.yxb.cms.domain.vo.CommonCode;
8 | import com.yxb.cms.domain.vo.Hourse;
9 | import com.yxb.cms.service.CommonCodeService;
10 | import com.yxb.cms.service.HourseService;
11 | import com.yxb.cms.util.TokenUtil;
12 | import java.util.HashMap;
13 | import java.util.List;
14 | import java.util.Map;
15 | import org.springframework.beans.factory.annotation.Autowired;
16 | import org.springframework.stereotype.Controller;
17 | import org.springframework.ui.Model;
18 | import org.springframework.web.bind.annotation.RequestMapping;
19 | import org.springframework.web.bind.annotation.ResponseBody;
20 |
21 | @Controller
22 | @RequestMapping("instoack")
23 | public class InStoackController extends BasicController
24 | {
25 |
26 | @Autowired
27 | private HourseService hourseService;
28 |
29 | @Autowired
30 | private CommonCodeService commonCodeService;
31 |
32 | /**
33 | *跳转到列表页面
34 | * @return
35 | */
36 | @RequestMapping("/stoack_list.do")
37 | public String toListPage(Model model)
38 | {
39 | Map qeruy=new HashMap<>();
40 | qeruy.put("code","type");
41 | List commonCodes= commonCodeService.findByMap(qeruy);
42 | model.addAttribute("codes",commonCodes);
43 | return "system/stoack/stoack_list";
44 | }
45 |
46 | /**
47 | * 列表List
48 | * @return
49 | */
50 | @RequestMapping("/ajax_stoack_list.do")
51 | @ResponseBody
52 | public String ajaxList(Hourse hourse)
53 | {
54 | hourse.setUser_code(TokenUtil.getCurrentUser().getRelationId());
55 | return hourseService.selectListBypage(hourse);
56 | }
57 |
58 |
59 |
60 | /**
61 | * 详情页面
62 | */
63 | @RequestMapping("/in_good.do")
64 | public String in_good(Model model, Integer id)
65 | {
66 | model.addAttribute("id",id);
67 | return "system/stoack/in_stack";
68 | }
69 |
70 |
71 | /**
72 | * 进货
73 | * @return
74 | */
75 | @RequestMapping("/in_stack.do")
76 | @ResponseBody
77 | public BussinessMsg in_stack(Hourse hourse)
78 | {
79 | try
80 | {
81 | return hourseService.in_stack(hourse);
82 | }
83 | catch(Exception e)
84 | {
85 | log.error("保存信息方法内部错误", e);
86 | return BussinessMsgUtil.returnCodeMessage(BussinessCode.ANNOUNCEMENT_SAVE_ERROR);
87 | }
88 | }
89 |
90 |
91 | }
92 |
--------------------------------------------------------------------------------
/src/main/java/com/yxb/cms/controller/system/SystemLogController.java:
--------------------------------------------------------------------------------
1 |
2 | package com.yxb.cms.controller.system;
3 |
4 | import com.yxb.cms.architect.utils.CommonHelper;
5 | import com.yxb.cms.architect.utils.DateUtil;
6 | import com.yxb.cms.controller.BasicController;
7 | import com.yxb.cms.domain.bo.ExcelExport;
8 | import com.yxb.cms.domain.vo.SystemLog;
9 | import com.yxb.cms.service.SystemLogService;
10 | import org.springframework.beans.factory.annotation.Autowired;
11 | import org.springframework.stereotype.Controller;
12 | import org.springframework.ui.Model;
13 | import org.springframework.web.bind.annotation.RequestMapping;
14 | import org.springframework.web.bind.annotation.ResponseBody;
15 | import org.springframework.web.servlet.ModelAndView;
16 |
17 | import java.util.Date;
18 |
19 |
20 | /**
21 | * 日志管理Controller
22 |
23 | */
24 | @Controller
25 | @RequestMapping("syslog")
26 | public class SystemLogController extends BasicController {
27 |
28 |
29 | @Autowired
30 | private SystemLogService systemLogService;
31 |
32 |
33 | /**
34 | *跳转到日志管理页面
35 | * @return
36 | */
37 | @RequestMapping("/sys_log_list.do")
38 | public String toSysLogPage(Model model) {
39 | String currentDate = DateUtil.Date2Stirng(new Date());
40 | model.addAttribute("currentDate",currentDate);
41 | return "system/sys_log_list";
42 | }
43 | /**
44 | * 日志信息列表List
45 | * @param systemLog 日志实体
46 | * @return
47 | */
48 | @RequestMapping("/ajax_sys_log_list.do")
49 | @ResponseBody
50 | public String ajaxSysLogList(SystemLog systemLog){
51 | return systemLogService.selectSystemLogResultPageList(systemLog);
52 | }
53 |
54 | /**
55 | * 业务日志导出
56 | * @param systemLog 日志实体
57 | * @return
58 | */
59 | @RequestMapping("/excel_sys_log_export.do")
60 | public ModelAndView excelSysLogExport(SystemLog systemLog){
61 | ExcelExport excelExport = systemLogService.excelExportSystemLogList(systemLog);
62 | return CommonHelper.getExcelModelAndView(excelExport);
63 | }
64 |
65 | /**
66 | * 异常日志导出
67 | * @param systemLog 日志实体
68 | * @return
69 | */
70 | @RequestMapping("/excel_sys_exception_log_export.do")
71 | public ModelAndView excelSysExceptionLogExport(SystemLog systemLog){
72 | ExcelExport excelExport = systemLogService.excelExportSysExceptionLogList(systemLog);
73 | return CommonHelper.getExcelModelAndView(excelExport);
74 | }
75 |
76 |
77 |
78 | }
79 |
--------------------------------------------------------------------------------
/src/main/java/com/yxb/cms/controller/user/UserLoginController.java:
--------------------------------------------------------------------------------
1 | package com.yxb.cms.controller.user;
2 |
3 | import com.yxb.cms.architect.constant.BussinessCode;
4 | import com.yxb.cms.architect.utils.BussinessMsgUtil;
5 | import com.yxb.cms.domain.bo.BussinessMsg;
6 | import com.yxb.cms.domain.vo.User;
7 | import com.yxb.cms.service.UserService;
8 | import com.yxb.cms.util.DateTimeUtil;
9 | import javax.servlet.http.HttpSession;
10 | import org.springframework.beans.factory.annotation.Autowired;
11 | import org.springframework.stereotype.Controller;
12 | import org.springframework.web.bind.annotation.RequestMapping;
13 | import org.springframework.web.bind.annotation.ResponseBody;
14 |
15 | @Controller
16 | @RequestMapping("user_login")
17 | public class UserLoginController
18 | {
19 |
20 | @Autowired
21 | private UserService userService;
22 |
23 | @RequestMapping("/loginUI.do")
24 | public String loginUI()
25 | {
26 | return "user/login";
27 | }
28 |
29 | @RequestMapping("/registerUI.do")
30 | public String registerUI()
31 | {
32 | return "user/register";
33 | }
34 |
35 | @ResponseBody
36 | @RequestMapping("/register.do")
37 | public BussinessMsg register(User user, HttpSession session)
38 | {
39 | try
40 | {
41 | user.setUserStatus(0L);
42 | user.setType_id("2");
43 | user.setRelationId(DateTimeUtil.getUserCode());
44 | user.setUserLoginName(user.getUserName());
45 | return userService.saveOrUpdateUser(user, "user");
46 | }
47 | catch(Exception e)
48 | {
49 | return BussinessMsgUtil.returnCodeMessage(BussinessCode.ANNOUNCEMENT_DEL_ERROR);
50 | }
51 | }
52 |
53 | @ResponseBody
54 | @RequestMapping("/user/login.do")
55 | public BussinessMsg login(User user, HttpSession session)
56 | {
57 | try
58 | {
59 | User loginUser = userService.loginNameAndStatus(user.getUserName());
60 | if(loginUser != null && user.getUserPassword().equals(loginUser.getUserPassword()))
61 | {
62 | if(!"2".equals(loginUser.getType_id())){
63 | return BussinessMsgUtil.returnCodeMessage(BussinessCode.USER_NOT_STATUS_ERROR);
64 | }
65 | session.setAttribute("loginUser",loginUser);
66 | return BussinessMsgUtil.returnCodeMessage(BussinessCode.GLOBAL_SUCCESS);
67 | }
68 | else
69 | {
70 | return BussinessMsgUtil.returnCodeMessage(BussinessCode.GLOBAL_LOGIN_FAIL);
71 | }
72 | }
73 | catch(Exception e)
74 | {
75 | return BussinessMsgUtil.returnCodeMessage(BussinessCode.GLOBAL_LOGIN_ERROR);
76 | }
77 |
78 | }
79 |
80 | }
81 |
--------------------------------------------------------------------------------
/src/main/java/com/yxb/cms/dao/AnnouncementInfoUserMapper.java:
--------------------------------------------------------------------------------
1 |
2 | package com.yxb.cms.dao;
3 |
4 | import com.yxb.cms.domain.vo.AnnouncementInfoUser;
5 | import org.apache.ibatis.annotations.Mapper;
6 | import org.apache.ibatis.annotations.Param;
7 |
8 | /**
9 | * 公告用户信息DAO
10 | */
11 | @Mapper
12 | public interface AnnouncementInfoUserMapper {
13 | /**
14 | * This method was generated by MyBatis Generator.
15 | * This method corresponds to the database table cc_announcement_info_user
16 | *
17 | * @mbggenerated Fri Sep 01 00:04:17 CST 2017
18 | */
19 | int deleteByPrimaryKey(Integer announcementInfoUserId);
20 |
21 |
22 |
23 | /**
24 | * This method was generated by MyBatis Generator.
25 | * This method corresponds to the database table cc_announcement_info_user
26 | *
27 | * @mbggenerated Fri Sep 01 00:04:17 CST 2017
28 | */
29 | int insert(AnnouncementInfoUser record);
30 |
31 | /**
32 | * This method was generated by MyBatis Generator.
33 | * This method corresponds to the database table cc_announcement_info_user
34 | *
35 | * @mbggenerated Fri Sep 01 00:04:17 CST 2017
36 | */
37 | int insertSelective(AnnouncementInfoUser record);
38 |
39 | /**
40 | * This method was generated by MyBatis Generator.
41 | * This method corresponds to the database table cc_announcement_info_user
42 | *
43 | * @mbggenerated Fri Sep 01 00:04:17 CST 2017
44 | */
45 | AnnouncementInfoUser selectByPrimaryKey(Integer announcementInfoUserId);
46 |
47 | /**
48 | * This method was generated by MyBatis Generator.
49 | * This method corresponds to the database table cc_announcement_info_user
50 | *
51 | * @mbggenerated Fri Sep 01 00:04:17 CST 2017
52 | */
53 | int updateByPrimaryKeySelective(AnnouncementInfoUser record);
54 |
55 | /**
56 | * This method was generated by MyBatis Generator.
57 | * This method corresponds to the database table cc_announcement_info_user
58 | *
59 | * @mbggenerated Fri Sep 01 00:04:17 CST 2017
60 | */
61 | int updateByPrimaryKey(AnnouncementInfoUser record);
62 |
63 |
64 | /**
65 | * 根据公告Id,删除公告用户信息
66 | * @param announcementId 公告Id
67 | */
68 | void deleteAnnInfoUserByAnnouncementId(@Param("announcementId") Integer announcementId);
69 |
70 |
71 | }
--------------------------------------------------------------------------------
/src/main/java/com/yxb/cms/dao/CommentMapper.java:
--------------------------------------------------------------------------------
1 |
2 | package com.yxb.cms.dao;
3 |
4 | import com.yxb.cms.domain.vo.Comment;
5 | import java.util.List;
6 | import java.util.Map;
7 | import org.apache.ibatis.annotations.Mapper;
8 |
9 | @Mapper
10 | public interface CommentMapper
11 | {
12 | List selectCommentByCondition(Comment comment);
13 |
14 | Long selectCommentCountByCondition(Comment comment);
15 |
16 | int insert(Comment comment);
17 |
18 | int deleteCommentById(Integer id);
19 |
20 | Comment findByMap(Map queryMap);
21 | }
--------------------------------------------------------------------------------
/src/main/java/com/yxb/cms/dao/CommonCodeMapper.java:
--------------------------------------------------------------------------------
1 |
2 | package com.yxb.cms.dao;
3 |
4 | import com.yxb.cms.domain.vo.CommonCode;
5 | import java.util.List;
6 | import java.util.Map;
7 | import org.apache.ibatis.annotations.Mapper;
8 |
9 | @Mapper
10 | public interface CommonCodeMapper
11 | {
12 | List selectCommonCodeByCondition(CommonCode commonCode);
13 |
14 | Long selectCommonCodeCountByCondition(CommonCode commonCode);
15 |
16 | int insert(CommonCode commonCode);
17 |
18 | CommonCode selectCommonCodeById(Integer id);
19 |
20 | int update(CommonCode commonCode);
21 |
22 | int deleteCommonCodeById(Integer id);
23 |
24 | List findByMap(Map query);
25 | }
--------------------------------------------------------------------------------
/src/main/java/com/yxb/cms/dao/DataCleaningMapper.java:
--------------------------------------------------------------------------------
1 |
2 | package com.yxb.cms.dao;
3 |
4 | import com.yxb.cms.domain.vo.DataCleaning;
5 | import org.apache.ibatis.annotations.Mapper;
6 |
7 | import java.util.List;
8 |
9 | /**
10 | * 数据清洗DAO
11 | */
12 | @Mapper
13 | public interface DataCleaningMapper {
14 | /**
15 | * This method was generated by MyBatis Generator.
16 | * This method corresponds to the database table cc_data_cleaning
17 | *
18 | * @mbggenerated Mon Sep 18 14:28:55 CST 2017
19 | */
20 | int deleteByPrimaryKey(Integer dataId);
21 |
22 | /**
23 | * This method was generated by MyBatis Generator.
24 | * This method corresponds to the database table cc_data_cleaning
25 | *
26 | * @mbggenerated Mon Sep 18 14:28:55 CST 2017
27 | */
28 | int insert(DataCleaning record);
29 |
30 | /**
31 | * This method was generated by MyBatis Generator.
32 | * This method corresponds to the database table cc_data_cleaning
33 | *
34 | * @mbggenerated Mon Sep 18 14:28:55 CST 2017
35 | */
36 | int insertSelective(DataCleaning record);
37 |
38 | /**
39 | * This method was generated by MyBatis Generator.
40 | * This method corresponds to the database table cc_data_cleaning
41 | *
42 | * @mbggenerated Mon Sep 18 14:28:55 CST 2017
43 | */
44 | DataCleaning selectByPrimaryKey(Integer dataId);
45 |
46 | /**
47 | * This method was generated by MyBatis Generator.
48 | * This method corresponds to the database table cc_data_cleaning
49 | *
50 | * @mbggenerated Mon Sep 18 14:28:55 CST 2017
51 | */
52 | int updateByPrimaryKeySelective(DataCleaning record);
53 |
54 | /**
55 | * This method was generated by MyBatis Generator.
56 | * This method corresponds to the database table cc_data_cleaning
57 | *
58 | * @mbggenerated Mon Sep 18 14:28:55 CST 2017
59 | */
60 | int updateByPrimaryKey(DataCleaning record);
61 |
62 | /**
63 | * 批量插入数据清洗数据
64 | * @param list
65 | */
66 | void insertDataCleanBatch(List list);
67 |
68 | /**
69 | * 查询用户访问量
70 | * @return
71 | */
72 | List selectDataCleanListByLoginInfo();
73 |
74 |
75 | }
--------------------------------------------------------------------------------
/src/main/java/com/yxb/cms/dao/HourseMapper.java:
--------------------------------------------------------------------------------
1 |
2 | package com.yxb.cms.dao;
3 |
4 | import com.yxb.cms.domain.vo.Hourse;
5 | import java.util.List;
6 | import org.apache.ibatis.annotations.Mapper;
7 |
8 | @Mapper
9 | public interface HourseMapper
10 | {
11 | List selectHourseByCondition(Hourse hourse);
12 |
13 | Long selectHourseCountByCondition(Hourse hourse);
14 |
15 | int insert(Hourse hourse);
16 |
17 | Hourse selectHourseById(Integer id);
18 |
19 | int update(Hourse hourse);
20 |
21 | int deleteHourseById(Integer id);
22 |
23 | List selectRoomServerByCondition(Hourse hourse);
24 |
25 | Long selectRoomServerCountByCondition(Hourse hourse);
26 |
27 | List findByAll(Hourse hourse);
28 |
29 | List findByAllOrderNo(Hourse hourse);
30 |
31 | void in_stack(Hourse hourse);
32 | }
--------------------------------------------------------------------------------
/src/main/java/com/yxb/cms/dao/OrderMapper.java:
--------------------------------------------------------------------------------
1 |
2 | package com.yxb.cms.dao;
3 |
4 | import com.yxb.cms.domain.vo.Order;
5 | import java.util.List;
6 | import java.util.Map;
7 | import org.apache.ibatis.annotations.Mapper;
8 |
9 | @Mapper
10 | public interface OrderMapper
11 | {
12 | List selectOrderByCondition(Order order);
13 |
14 | Long selectOrderCountByCondition(Order order);
15 |
16 | List selectSaleByCondition(Order order);
17 |
18 | Long selectSaleCountByCondition(Order order);
19 |
20 | int insert(Order order);
21 |
22 | Order selectOrderById(Integer id);
23 |
24 | int update(Order order);
25 |
26 | int deleteOrderById(Integer id);
27 |
28 | void updateOrderStatus(Map queryMap);
29 |
30 | void saveOrderDetail(List