├── src └── main │ ├── webapp │ ├── META-INF │ │ └── MANIFEST.MF │ ├── layui │ │ ├── font │ │ │ ├── iconfont.eot │ │ │ ├── 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 │ │ ├── css │ │ │ ├── modules │ │ │ │ ├── layer │ │ │ │ │ └── default │ │ │ │ │ │ ├── icon.png │ │ │ │ │ │ ├── icon-ext.png │ │ │ │ │ │ ├── loading-0.gif │ │ │ │ │ │ ├── loading-1.gif │ │ │ │ │ │ └── loading-2.gif │ │ │ │ └── code.css │ │ │ ├── nprogress.css │ │ │ └── login.css │ │ ├── lay │ │ │ └── modules │ │ │ │ ├── layout.js │ │ │ │ ├── layout.js.map │ │ │ │ ├── mockjs.js │ │ │ │ ├── code.js │ │ │ │ ├── component.js │ │ │ │ ├── laytpl.js │ │ │ │ ├── utils.js │ │ │ │ ├── flow.js │ │ │ │ ├── mockjs.js.map │ │ │ │ ├── inputnumber.js │ │ │ │ ├── util.js │ │ │ │ ├── menu.js │ │ │ │ ├── kit.js │ │ │ │ ├── select.js │ │ │ │ ├── rate.js │ │ │ │ ├── route.js │ │ │ │ ├── tree.js │ │ │ │ ├── sidebar.js │ │ │ │ └── carousel.js │ │ └── kitadmin.js │ ├── WEB-INF │ │ ├── lib │ │ │ ├── sigar-x86-winnt.dll │ │ │ ├── libsigar-x86-linux.so │ │ │ ├── sigar-amd64-winnt.dll │ │ │ └── libsigar-amd64-linux.so │ │ └── tags │ │ │ ├── hasAllPermissions.tag │ │ │ ├── hasAllRoles.tag │ │ │ └── hasAnyPermissions.tag │ └── views │ │ ├── error │ │ └── unauthorized.jsp │ │ ├── setting.jsp │ │ ├── fileupload.jsp │ │ ├── customer │ │ ├── orderItem.jsp │ │ ├── followupInfo.jsp │ │ ├── customerOrders.jsp │ │ └── productchoose.jsp │ │ └── dictionary │ │ ├── edititem.jsp │ │ └── edittype.jsp │ ├── resources │ ├── properties │ │ ├── db_config.properties │ │ ├── log.properties │ │ ├── mail.properties │ │ └── redis.properties │ ├── mybatis │ │ ├── mybatis-config.xml │ │ └── mybatis-config-test.xml │ └── spring │ │ ├── application-mail.xml │ │ └── applicationContext.xml │ └── java │ └── com │ └── neuedu │ └── crm │ ├── mapper │ ├── LogMapper.java │ ├── RoleMapper.java │ ├── UserMapper.java │ ├── LinkmanMapper.java │ ├── ServiceMapper.java │ ├── CategoryMapper.java │ ├── CustomerMapper.java │ ├── FollowUpMapper.java │ ├── OrderItemMapper.java │ ├── ProductMapper.java │ ├── CustomerCareMapper.java │ ├── DictionaryItemMapper.java │ ├── DictionaryTypeMapper.java │ ├── SaleOpportunityMapper.java │ ├── CustomerTransferMapper.java │ ├── ServiceTransferMapper.java │ ├── OrdersMapper.java │ ├── RolePermissionMapper.java │ ├── CustomerLossMapper.java │ ├── LoggingEventMapper.java │ ├── PermissionMapper.java │ ├── ReportMapper.java │ └── MyBatisBaseDao.java │ ├── service │ ├── ILoginService.java │ ├── IServerInfoService.java │ ├── impl │ │ ├── LoginServiceImpl.java │ │ ├── LogServiceImpl.java │ │ ├── ProductServiceImpl.java │ │ ├── CategoryServiceImpl.java │ │ ├── OrdersServiceImpl.java │ │ ├── LoggingEventServiceImpl.java │ │ └── OrderItemServiceImpl.java │ ├── IUserService.java │ ├── IRoleService.java │ └── ILogService.java │ ├── pojo │ ├── CpuInfoVo.java │ ├── Category.java │ ├── Pager.java │ ├── Role.java │ ├── RolePermission.java │ ├── Report.java │ └── DictionaryType.java │ ├── utils │ ├── Md5Util.java │ ├── Operation.java │ ├── RequestUtil.java │ ├── SigarUtils.java │ ├── IpAdrressUtil.java │ ├── TimeStamp.java │ ├── RandomStringUtil.java │ ├── LocalDateConverter.java │ ├── RedisUtil.java │ ├── LocalDateTimeConverter.java │ ├── TaskController.java │ └── MailUtil.java │ ├── shiro │ └── filter │ │ └── FilterChainDefinitionMapBuilder.java │ ├── exception │ └── MyExceptionHandler.java │ └── controller │ ├── SystemController.java │ ├── OrdersController.java │ ├── FileController.java │ └── ProductController.java └── README.md /src/main/webapp/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /src/main/webapp/layui/font/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/font/iconfont.eot -------------------------------------------------------------------------------- /src/main/webapp/layui/font/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/font/iconfont.ttf -------------------------------------------------------------------------------- /src/main/webapp/layui/font/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/font/iconfont.woff -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/0.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/1.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/10.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/11.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/12.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/13.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/13.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/14.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/15.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/15.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/16.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/17.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/17.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/18.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/18.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/19.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/19.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/2.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/20.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/20.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/21.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/21.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/22.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/22.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/23.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/23.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/24.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/24.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/25.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/25.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/26.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/26.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/27.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/27.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/28.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/28.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/29.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/29.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/3.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/30.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/30.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/31.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/31.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/32.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/32.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/33.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/33.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/34.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/34.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/35.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/35.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/36.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/36.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/37.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/37.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/38.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/38.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/39.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/39.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/4.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/40.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/40.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/41.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/41.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/42.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/42.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/43.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/43.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/44.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/44.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/45.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/45.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/46.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/46.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/47.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/47.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/48.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/48.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/49.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/49.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/5.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/50.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/50.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/51.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/51.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/52.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/52.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/53.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/53.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/54.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/54.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/55.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/55.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/56.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/56.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/57.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/57.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/58.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/58.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/59.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/59.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/6.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/60.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/60.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/61.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/61.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/62.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/62.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/63.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/63.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/64.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/64.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/65.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/65.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/66.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/66.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/67.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/67.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/68.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/68.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/69.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/69.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/7.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/70.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/70.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/71.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/71.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/8.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/images/face/9.gif -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/lib/sigar-x86-winnt.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/WEB-INF/lib/sigar-x86-winnt.dll -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/lib/libsigar-x86-linux.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/WEB-INF/lib/libsigar-x86-linux.so -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/lib/sigar-amd64-winnt.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/WEB-INF/lib/sigar-amd64-winnt.dll -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/lib/libsigar-amd64-linux.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/WEB-INF/lib/libsigar-amd64-linux.so -------------------------------------------------------------------------------- /src/main/resources/properties/db_config.properties: -------------------------------------------------------------------------------- 1 | driver=com.mysql.jdbc.Driver 2 | url=jdbc:mysql://xxx/CRM?allowMultiQueries=true 3 | dbusername=xxx 4 | password=xxx -------------------------------------------------------------------------------- /src/main/resources/properties/log.properties: -------------------------------------------------------------------------------- 1 | # logback的全局属性文件配置 2 | # 日志输出路径 3 | log.home_url=/var/log/logback 4 | #日志输出等级 5 | log.level=info 6 | log.maxHistory=30000 -------------------------------------------------------------------------------- /src/main/webapp/layui/css/modules/layer/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/css/modules/layer/default/icon.png -------------------------------------------------------------------------------- /src/main/webapp/layui/css/modules/layer/default/icon-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/css/modules/layer/default/icon-ext.png -------------------------------------------------------------------------------- /src/main/webapp/layui/css/modules/layer/default/loading-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/css/modules/layer/default/loading-0.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/css/modules/layer/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/css/modules/layer/default/loading-1.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/css/modules/layer/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softBuiltDeveloper/crm/HEAD/src/main/webapp/layui/css/modules/layer/default/loading-2.gif -------------------------------------------------------------------------------- /src/main/resources/properties/mail.properties: -------------------------------------------------------------------------------- 1 | mail.host=smtp.qq.com 2 | mail.username=xxx 3 | mail.password=xxx 4 | mail.smtp.auth=true 5 | mail.smtp.timeout=25000 6 | mail.smtp.port=25 -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/layout.js: -------------------------------------------------------------------------------- 1 | /** kitadmin-v1.0.0-beta1 MIT License By http://kit.zhengjinfan.cn Author Van Zheng */ 2 | ;"use strict";layui.define(function(i){i("layout",{})}); 3 | //# sourceMappingURL=layout.js.map 4 | -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/mapper/LogMapper.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.mapper; 2 | 3 | import com.neuedu.crm.pojo.Log; 4 | import com.neuedu.crm.pojo.LogExample; 5 | 6 | /** 7 | * LogMapper继承基类 8 | * @author MybatisGenerator 9 | */ 10 | public interface LogMapper extends MyBatisBaseDao { 11 | } -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/mapper/RoleMapper.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.mapper; 2 | 3 | import com.neuedu.crm.pojo.Role; 4 | import com.neuedu.crm.pojo.RoleExample; 5 | 6 | /** 7 | * RoleMapper继承基类 8 | * @author MybatisGenerator 9 | */ 10 | public interface RoleMapper extends MyBatisBaseDao { 11 | } -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/mapper/UserMapper.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.mapper; 2 | 3 | import com.neuedu.crm.pojo.User; 4 | import com.neuedu.crm.pojo.UserExample; 5 | 6 | /** 7 | * UserMapper继承基类 8 | * @author MybatisGenerator 9 | */ 10 | public interface UserMapper extends MyBatisBaseDao { 11 | } -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/mapper/LinkmanMapper.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.mapper; 2 | 3 | import com.neuedu.crm.pojo.Linkman; 4 | import com.neuedu.crm.pojo.LinkmanExample; 5 | 6 | /** 7 | * LinkmanMapper继承基类 8 | * @author MybatisGenerator 9 | */ 10 | public interface LinkmanMapper extends MyBatisBaseDao { 11 | } -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/mapper/ServiceMapper.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.mapper; 2 | 3 | import com.neuedu.crm.pojo.Service; 4 | import com.neuedu.crm.pojo.ServiceExample; 5 | 6 | /** 7 | * ServiceMapper继承基类 8 | * @author MybatisGenerator 9 | */ 10 | public interface ServiceMapper extends MyBatisBaseDao { 11 | } -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/mapper/CategoryMapper.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.mapper; 2 | 3 | import com.neuedu.crm.pojo.Category; 4 | import com.neuedu.crm.pojo.CategoryExample; 5 | 6 | /** 7 | * CategoryMapper继承基类 8 | * @author MybatisGenerator 9 | */ 10 | public interface CategoryMapper extends MyBatisBaseDao { 11 | } -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/mapper/CustomerMapper.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.mapper; 2 | 3 | import com.neuedu.crm.pojo.Customer; 4 | import com.neuedu.crm.pojo.CustomerExample; 5 | 6 | /** 7 | * CustomerMapper继承基类 8 | * @author MybatisGenerator 9 | */ 10 | public interface CustomerMapper extends MyBatisBaseDao { 11 | } -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/mapper/FollowUpMapper.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.mapper; 2 | 3 | import com.neuedu.crm.pojo.FollowUp; 4 | import com.neuedu.crm.pojo.FollowUpExample; 5 | 6 | /** 7 | * FollowUpMapper继承基类 8 | * @author MybatisGenerator 9 | */ 10 | public interface FollowUpMapper extends MyBatisBaseDao { 11 | } -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/mapper/OrderItemMapper.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.mapper; 2 | 3 | import com.neuedu.crm.pojo.OrderItem; 4 | import com.neuedu.crm.pojo.OrderItemExample; 5 | 6 | /** 7 | * OrderItemMapper继承基类 8 | * @author MybatisGenerator 9 | */ 10 | public interface OrderItemMapper extends MyBatisBaseDao { 11 | } -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/mapper/ProductMapper.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.mapper; 2 | 3 | import com.neuedu.crm.pojo.Product; 4 | import com.neuedu.crm.pojo.ProductExample; 5 | 6 | /** 7 | * ProductMapper继承基类 8 | * @author MybatisGenerator 9 | * 10 | */ 11 | public interface ProductMapper extends MyBatisBaseDao { 12 | 13 | } -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/mapper/CustomerCareMapper.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.mapper; 2 | 3 | import com.neuedu.crm.pojo.CustomerCare; 4 | import com.neuedu.crm.pojo.CustomerCareExample; 5 | 6 | /** 7 | * CustomerCareMapper继承基类 8 | * @author MybatisGenerator 9 | */ 10 | public interface CustomerCareMapper extends MyBatisBaseDao { 11 | } -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/mapper/DictionaryItemMapper.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.mapper; 2 | 3 | import com.neuedu.crm.pojo.DictionaryItem; 4 | import com.neuedu.crm.pojo.DictionaryItemExample; 5 | 6 | /** 7 | * DictionaryItemMapper继承基类 8 | * @author MybatisGenerator 9 | */ 10 | public interface DictionaryItemMapper extends MyBatisBaseDao { 11 | } -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/mapper/DictionaryTypeMapper.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.mapper; 2 | 3 | import com.neuedu.crm.pojo.DictionaryType; 4 | import com.neuedu.crm.pojo.DictionaryTypeExample; 5 | 6 | /** 7 | * DictionaryTypeMapper继承基类 8 | * @author MybatisGenerator 9 | */ 10 | public interface DictionaryTypeMapper extends MyBatisBaseDao { 11 | } -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/mapper/SaleOpportunityMapper.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.mapper; 2 | 3 | import com.neuedu.crm.pojo.SaleOpportunity; 4 | import com.neuedu.crm.pojo.SaleOpportunityExample; 5 | 6 | /** 7 | * SaleOpportunityMapper继承基类 8 | * @author MybatisGenerator 9 | */ 10 | public interface SaleOpportunityMapper extends MyBatisBaseDao { 11 | } -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/mapper/CustomerTransferMapper.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.mapper; 2 | 3 | import com.neuedu.crm.pojo.CustomerTransfer; 4 | import com.neuedu.crm.pojo.CustomerTransferExample; 5 | 6 | /** 7 | * CustomerTransferMapper继承基类 8 | * @author MybatisGenerator 9 | */ 10 | public interface CustomerTransferMapper extends MyBatisBaseDao { 11 | } -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/mapper/ServiceTransferMapper.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.mapper; 2 | 3 | import com.neuedu.crm.pojo.ServiceTransfer; 4 | import com.neuedu.crm.pojo.ServiceTransferExample; 5 | 6 | /** 7 | * ServiceTransferMapper继承基类 8 | * @author MybatisGenerator 9 | * 10 | */ 11 | public interface ServiceTransferMapper extends MyBatisBaseDao { 12 | } -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/service/ILoginService.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.service; 2 | 3 | 4 | import com.neuedu.crm.pojo.User; 5 | 6 | /** 7 | * @author HuangWanzong 8 | * @date 2018/07/24 9 | */ 10 | public interface ILoginService { 11 | 12 | /** 13 | * 描述:登录 14 | * @author 15 | * @date 2018/07/24 16 | * @version 1.0 17 | * @param user 18 | * @return User 19 | * @since 1.8 20 | * 21 | */ 22 | public User login(User user); 23 | } 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## 客户关系管理系统 2 | 3 | - 系统开发环境 4 | - 操作系统: Windows 7 5 | - 集成开发工具: Eclipse EE 4.7 6 | - 编译环境:JDK 1.8 7 | - Web服务器:Tomcat 9.0 8 | 9 | - 系统框架 10 | - spring框架 11 | - springmvc框架 12 | - mybatis框架 13 | - Logback日志框架 14 | - 安全验证框架 15 | - maven框架 16 | - layui前端框架 17 | - shiro安全框架 18 | 19 | - 系统关键性技术 20 | - 基于角色的权限访问控制RBCA(Role-Based Access Control) 21 | - spring+springmvc+mybatis三大框架 22 | - Ajax技术 23 | - springmvc文件上传 24 | - shiro安全框架 25 | - redis 缓存 26 | - JavaMail邮件 27 | - Springmvc 基于aop切面 的日志管理 28 | - Layui 前端框架 29 | - 登录验证码 30 | -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/mapper/OrdersMapper.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.mapper; 2 | 3 | import java.util.List; 4 | 5 | import com.neuedu.crm.pojo.Orders; 6 | import com.neuedu.crm.pojo.OrdersExample; 7 | 8 | /** 9 | * OrdersMapper继承基类 10 | * @author MybatisGenerator 11 | */ 12 | public interface OrdersMapper extends MyBatisBaseDao { 13 | 14 | /** 15 | * 描述:按照客户id分组查询最后一个订单的时间 16 | * @Title: selectOrdersGroupByCustomerId 17 | * @Description: TODO(按照客户id分组查询最后一个订单的时间) 18 | * @param @return 参数 19 | * @return List 返回类型 20 | * @throws 21 | */ 22 | public List selectOrdersGroupByCustomerId(); 23 | } -------------------------------------------------------------------------------- /src/main/webapp/views/error/unauthorized.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 |
4 |
5 |
6 |
7 |

无权访问该页

8 |
9 |
10 |
11 |
12 |
13 | 21 | -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/mapper/RolePermissionMapper.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.mapper; 2 | 3 | 4 | import org.apache.ibatis.annotations.Param; 5 | 6 | import com.neuedu.crm.pojo.RolePermission; 7 | import com.neuedu.crm.pojo.RolePermissionExample; 8 | 9 | /** 10 | * RolePermissionMapper继承基类 11 | * @author MybatisGenerator 12 | */ 13 | public interface RolePermissionMapper extends MyBatisBaseDao { 14 | 15 | /** 16 | * 分配权限,批量插入 17 | * @param permissionIds 18 | * @param roleId 19 | * @return 20 | * @author huangqingwen 21 | */ 22 | public int insertRolePermission(@Param("permissionIds") Integer[] permissionIds, @Param("roleId") Integer roleId); 23 | } -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/layout.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["layout.js"],"names":["layui","define","exports"],"mappings":";cAAAA,MAAMC,OAAO,SAAUC,GAkBrBA,EAAQ","file":"layout.js","sourcesContent":["layui.define(function (exports) {\r\n\r\n\r\n var template = {\r\n layout: ['
', '{{content}}', '
'],\r\n header: [\r\n '
',\r\n '
',\r\n '',\r\n '
',\r\n '
',\r\n '
KITADMIN 2.0
',\r\n '
',\r\n '
'\r\n ]\r\n };\r\n\r\n //输出layout接口\r\n exports('layout', {});\r\n});"]} -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/pojo/CpuInfoVo.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.pojo; 2 | 3 | public class CpuInfoVo{ 4 | private int cpuMhz; 5 | private String cpuIdle; 6 | private String cpuCombined; 7 | public int getCpuMhz() { 8 | return cpuMhz; 9 | } 10 | public void setCpuMhz(int cpuMhz) { 11 | this.cpuMhz = cpuMhz; 12 | } 13 | 14 | public String getCpuCombined() { 15 | return cpuCombined; 16 | } 17 | public void setCpuCombined(String cpuCombined) { 18 | this.cpuCombined = cpuCombined; 19 | } 20 | public String getCpuIdle() { 21 | return cpuIdle; 22 | } 23 | public void setCpuIdle(String cpuIdle) { 24 | this.cpuIdle = cpuIdle; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/webapp/layui/kitadmin.js: -------------------------------------------------------------------------------- 1 | if (layui === undefined) { 2 | console.error('请先引用layui.js文件.'); 3 | } else { 4 | 5 | var modules = { 6 | admin: 'kit_modules/admin', 7 | axios: 'kit_modules/axios', 8 | lodash: 'kit_modules/lodash', 9 | menu: 'kit_modules/menu', 10 | mockjs: 'kit_modules/mockjs', 11 | mockjsbase: 'kit_modules/mockjsbase', 12 | route: 'kit_modules/route', 13 | tabs: 'kit_modules/tabs', 14 | utils: 'kit_modules/utils', 15 | component:'kit_modules/component', 16 | nprogress:'kit_modules/nprogress', 17 | kit:'kit_modules/kit', 18 | sidebar:'kit_modules/sidebar', 19 | select:'kit_modules/select', 20 | echarts:'kit_modules/echarts' 21 | }; 22 | 23 | layui.injectModules(modules); 24 | } -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/mapper/CustomerLossMapper.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.mapper; 2 | 3 | import java.util.List; 4 | 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import com.neuedu.crm.pojo.CustomerLoss; 8 | import com.neuedu.crm.pojo.CustomerLossExample; 9 | import com.neuedu.crm.pojo.Orders; 10 | 11 | /** 12 | * CustomerLossMapper继承基类 13 | * @author MybatisGenerator 14 | */ 15 | public interface CustomerLossMapper extends MyBatisBaseDao { 16 | 17 | /** 18 | * 描述: 19 | * @Title: insertLossBatch 20 | * @Description: TODO(批量插入) 21 | * @param @param orders 22 | * @param @return 参数 23 | * @return int 返回类型 24 | * @throws 25 | * @author huangqingwen 26 | */ 27 | public int insertLossBatch(@Param("orders")List orders); 28 | } -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/tags/hasAllPermissions.tag: -------------------------------------------------------------------------------- 1 | <%@ tag import="org.apache.shiro.util.StringUtils" %> 2 | <%@ tag import="org.apache.shiro.SecurityUtils" %> 3 | <%@ tag pageEncoding="UTF-8" trimDirectiveWhitespaces="true"%> 4 | <%@ attribute name="name" type="java.lang.String" required="true" description="权限字符串列表" %> 5 | <%@ attribute name="delimiter" type="java.lang.String" required="false" description="权限字符串列表分隔符" %><% 6 | 7 | if(!StringUtils.hasText(delimiter)) { 8 | delimiter = ",";//默认逗号分隔 9 | } 10 | 11 | if(!StringUtils.hasText(name)) { 12 | %> 13 | 14 | <% 15 | return; 16 | } 17 | 18 | String[] roles = name.split(delimiter); 19 | 20 | if(!SecurityUtils.getSubject().isPermittedAll(roles)) { 21 | return; 22 | } else { 23 | %> 24 | 25 | <% 26 | } 27 | %> -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/mapper/LoggingEventMapper.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.mapper; 2 | 3 | 4 | 5 | import java.util.List; 6 | 7 | import com.neuedu.crm.pojo.LoggingEvent; 8 | import com.neuedu.crm.pojo.LoggingEventExample; 9 | 10 | /** 11 | * LoggingEventMapper继承基类 12 | * @author MybatisGenerator 13 | */ 14 | public interface LoggingEventMapper extends MyBatisBaseDao { 15 | 16 | /** 17 | * 描述: 18 | * @Title: selectByExampleWithBLOBs 19 | * @Description: TODO(查询含有text文本类型的结果集) 20 | * @param @param loggingEventExample 21 | * @param @return 参数 22 | * @return List 返回类型 23 | * @throws 24 | * @author huangqingwen 25 | */ 26 | public List selectByExampleWithBLOBs(LoggingEventExample loggingEventExample); 27 | 28 | public int insertLog(LoggingEvent loggingEvent); 29 | } -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/tags/hasAllRoles.tag: -------------------------------------------------------------------------------- 1 | <%@ tag import="org.apache.shiro.util.StringUtils" %> 2 | <%@ tag import="org.apache.shiro.SecurityUtils" %> 3 | <%@ tag import="java.util.Arrays" %> 4 | <%@ tag pageEncoding="UTF-8" trimDirectiveWhitespaces="true"%> 5 | <%@ attribute name="name" type="java.lang.String" required="true" description="角色列表" %> 6 | <%@ attribute name="delimiter" type="java.lang.String" required="false" description="角色列表分隔符" %><% 7 | 8 | if(!StringUtils.hasText(delimiter)) { 9 | delimiter = ",";//默认逗号分隔 10 | } 11 | 12 | if(!StringUtils.hasText(name)) { 13 | %> 14 | 15 | <% 16 | return; 17 | } 18 | 19 | String[] roles = name.split(delimiter); 20 | 21 | if(!SecurityUtils.getSubject().hasAllRoles(Arrays.asList(roles))) { 22 | return; 23 | } else { 24 | %> 25 | 26 | <% 27 | } 28 | %> -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/utils/Md5Util.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.neuedu.crm.utils; 5 | 6 | import org.apache.shiro.crypto.hash.SimpleHash; 7 | 8 | /** 9 | * @author wanghaoyu 10 | * 11 | */ 12 | public class Md5Util { 13 | 14 | /** 15 | * 加密算法 16 | */ 17 | private static String algorithmName = "md5"; 18 | /** 19 | * 加密算法迭代加密次数 20 | */ 21 | private static int hashIterations = 2; 22 | 23 | /** 24 | * 25 | * 描述:对信息进行MD5盐值加密 26 | * @author wanghaoyu 27 | * @version 1.0 28 | * @param message 29 | * @param salt 30 | * @return String 31 | * @exception Nothing 32 | * @since 1.8 33 | * 34 | */ 35 | public static String encrypt(String message, String salt){ 36 | SimpleHash hash = new SimpleHash(algorithmName, message, salt, hashIterations); 37 | return hash.toHex(); 38 | } 39 | 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/utils/Operation.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.utils; 2 | 3 | import static java.lang.annotation.ElementType.METHOD; 4 | import static java.lang.annotation.ElementType.TYPE; 5 | 6 | import java.lang.annotation.Documented; 7 | import java.lang.annotation.Inherited; 8 | import java.lang.annotation.Retention; 9 | import java.lang.annotation.RetentionPolicy; 10 | import java.lang.annotation.Target; 11 | 12 | /** 自定义注解类 定义controller方法的中文含义 13 | * @Target({METHOD,TYPE}) 表示这个注解可以用用在类/接口上,还可以用在方法上 14 | @Retention(RetentionPolicy.RUNTIME) 表示这是一个运行时注解,即运行起来之后,才获取注解中的相关信息,而不像基本注解如@Override 那种不用运行,在编译时eclipse就可以进行相关工作的编译时注解。 15 | @Inherited 表示这个注解可以被子类继承 16 | @Documented 表示当执行javadoc的时候,本注解会生成相关文档 17 | * @author huangqingwen 18 | * 19 | */ 20 | 21 | @Target({METHOD, TYPE}) 22 | @Retention(RetentionPolicy.RUNTIME) 23 | @Inherited 24 | @Documented 25 | public @interface Operation { 26 | 27 | String name(); 28 | } 29 | -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/mockjs.js: -------------------------------------------------------------------------------- 1 | /** kitadmin-v1.0.0-beta1 MIT License By http://kit.zhengjinfan.cn Author Van Zheng */ 2 | ;"use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o};layui.define(["mockjsbase","utils","lodash"],function(o){var e=layui.mockjsbase,t=layui.utils,r=layui.lodash;o("mockjs",{inject:function(o){if("object"===(void 0===o?"undefined":_typeof(o))){var n=r.keys(o);r.forEach(n,function(r,n){var c=r.split(" "),i=c[0].toLocaleLowerCase(),f=c[1];if(t.oneOf(i,["get","post","put","delete"])){var s=o[r];t.oneOf(void 0===s?"undefined":_typeof(s),["object","array","function"])?e.mock(f,i,s):t.error("mockjs config error:template 只支持类型为:[object,array,function] 的处理方式.")}else t.error("mockjs config error:请求方式只支持:[GET,POST,PUT,DELETE]")})}else t.error("mockjs inject error:APIs参数类型只能为object,请检查.")}})}); 3 | //# sourceMappingURL=mockjs.js.map 4 | -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/service/IServerInfoService.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.service; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | 7 | import com.neuedu.crm.pojo.CpuInfoVo; 8 | import com.neuedu.crm.pojo.ServerInfo; 9 | 10 | public interface IServerInfoService { 11 | /** 12 | * 描述:获取系统的基本信息 13 | * @author huangwanzong 14 | * @version 1.0 15 | * @return 16 | * @exception Nothing 17 | * @since 1.8 18 | * 19 | */ 20 | public ServerInfo getServerInfo(); 21 | 22 | /** 23 | * 描述:获取cpu信息 24 | * @author huangwanzong 25 | * @version 1.0 26 | * @return 27 | * @exception Nothing 28 | * @since 1.8 29 | * 30 | */ 31 | public List getCpuInfo(); 32 | 33 | /** 34 | * 描述:获取内存信息 35 | * @author huangwanzong 36 | * @version 1.0 37 | * @return 38 | * @exception Nothing 39 | * @since 1.8 40 | * 41 | */ 42 | public Map getMemoryInfo(); 43 | } 44 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/tags/hasAnyPermissions.tag: -------------------------------------------------------------------------------- 1 | <%--东云网修改,版权所有--%> 2 | <%--2018年1月22日16:44:26--%> 3 | <%@ tag import="org.apache.shiro.util.StringUtils" %> 4 | <%@ tag import="org.apache.shiro.SecurityUtils" %> 5 | <%@ tag import="org.apache.shiro.subject.Subject" %> 6 | <%@ tag pageEncoding="UTF-8" trimDirectiveWhitespaces="true"%> 7 | <%@ attribute name="name" type="java.lang.String" required="true" description="权限字符串列表" %> 8 | <%@ attribute name="delimiter" type="java.lang.String" required="false" description="权限字符串列表分隔符" %> 9 | <% 10 | if(!StringUtils.hasText(delimiter)) { 11 | delimiter = ",";//默认逗号分隔 12 | } 13 | if(!StringUtils.hasText(name)) { 14 | %> 15 | 16 | <% 17 | return; 18 | } 19 | String[] permissions = name.split(delimiter); 20 | Subject subject = SecurityUtils.getSubject(); 21 | for(String permission : permissions) { 22 | if(subject.isPermitted(permission)) { 23 | %> 24 | 25 | <% 26 | break; 27 | } 28 | } 29 | %> 30 | 31 | -------------------------------------------------------------------------------- /src/main/webapp/layui/css/modules/code.css: -------------------------------------------------------------------------------- 1 | /** layui-v2.3.0 MIT License By https://www.layui.com */ 2 | html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none} -------------------------------------------------------------------------------- /src/main/webapp/layui/css/nprogress.css: -------------------------------------------------------------------------------- 1 | /** kitadmin-v1.0.0-beta1 MIT License By http://kit.zhengjinfan.cn Author Van Zheng */ 2 | #nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;-webkit-transform:rotate(3deg) translate(0,-4px);-ms-transform:rotate(3deg) translate(0,-4px);transform:rotate(3deg) translate(0,-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:solid 2px transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(360deg)}}@keyframes nprogress-spinner{0%{transform:rotate(0)}100%{transform:rotate(360deg)}} -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/code.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.3.0 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var a=layui.$,l="http://www.layui.com/doc/modules/code.html";e("code",function(e){var t=[];e=e||{},e.elem=a(e.elem||".layui-code"),e.about=!("about"in e)||e.about,e.elem.each(function(){t.push(this)}),layui.each(t.reverse(),function(t,i){var c=a(i),o=c.html();(c.attr("lay-encode")||e.encode)&&(o=o.replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")),c.html('
  1. '+o.replace(/[\r\t\n]+/g,"
  2. ")+"
"),c.find(">.layui-code-h3")[0]||c.prepend('

'+(c.attr("lay-title")||e.title||"code")+(e.about?'layui.code':"")+"

");var d=c.find(">.layui-code-ol");c.addClass("layui-box layui-code-view"),(c.attr("lay-skin")||e.skin)&&c.addClass("layui-code-"+(c.attr("lay-skin")||e.skin)),(d.find("li").length/100|0)>0&&d.css("margin-left",(d.find("li").length/100|0)+"px"),(c.attr("lay-height")||e.height)&&d.css("max-height",c.attr("lay-height")||e.height)})})}).addcss("modules/code.css","skincodecss"); -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/component.js: -------------------------------------------------------------------------------- 1 | /** kitadmin-v1.0.0-beta1 MIT License By http://kit.zhengjinfan.cn Author Van Zheng */ 2 | ;"use strict";layui.define(["layer"],function(i){layui.layer;var n=layui.jquery,e="component",t={NAV:".kit-nav",ITEM:".kit-item",SHOW:"layui-show",THIS:"layui-this"},a=function(){this.version="1.0.0"};a.prototype.render=function(i,n){if(void 0===i)l.renderNav(n);else switch(i){case"nav":l.renderNav(n)}return this},a.prototype.init=function(){return this.render(),this},a.prototype.on=function(i,n){return layui.onevent.call(this,e,i,n)};var l={renderNav:function(i){n(void 0===i?t.NAV:".kit-nav[lay-filter="+i+"]").find(t.ITEM).each(function(){var i=n(this),a=i.find("ul.kit-nav-child"),l=a.length>0;l&&(i.children("a").addClass("child"),a.addClass("layui-anim").addClass("layui-anim-upbit")),i.off("click").on("click",function(a){if(layui.stope(a),l)i.addClass(t.SHOW),n(document).on("click",function(){i.removeClass(t.SHOW),n(this).off("click")});else{i.parents(t.NAV).find(t.ITEM).removeClass("layui-this"),i.addClass(t.THIS),i.parent(".kit-nav-child").parent(".layui-show").removeClass(t.SHOW);var r=i.parents(t.NAV).attr("lay-filter");layui.event.call(this,e,"nav("+r+")",{elem:i})}})})}},r=new a;r.init(),i("component",r)}); 3 | //# sourceMappingURL=component.js.map 4 | -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/shiro/filter/FilterChainDefinitionMapBuilder.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.shiro.filter; 2 | 3 | import java.util.LinkedHashMap; 4 | 5 | /** 6 | * 7 | * @author MaLizhi 8 | * @date 2018/07/24 9 | */ 10 | public class FilterChainDefinitionMapBuilder { 11 | 12 | /** 13 | * 14 | * 描述: 15 | * @author malizhi 16 | * @version 1.0 17 | * @return 18 | * @exception Nothing 19 | * @since 1.8 20 | * 21 | */ 22 | public LinkedHashMap buildFilterChainDefinitionMap(){ 23 | LinkedHashMap map = new LinkedHashMap<>(); 24 | 25 | //anno是匿名过滤器,不需要验证也可以访问 26 | map.put("/js/**", "anon"); 27 | map.put("/images/**", "anon"); 28 | map.put("/layui/**", "anon"); 29 | map.put("/user/login", "anon"); 30 | map.put("/user/getForgotPasswdCode", "anon"); 31 | map.put("/user/resetPasswd", "anon"); 32 | map.put("/verify/getVerifyCode", "anon"); 33 | map.put("/pages/**", "anon"); 34 | //map.put("/pages/login.jsp", "anon"); 35 | //map.put("/user/login", "anon"); 36 | //map.put("/shiro/logout", "logout"); 37 | 38 | //authc是验证过滤器,代表需要验证过才能访问,roles【user】代表还需要是拥有user角色才能访问 39 | //map.put("/user.jsp", "authc,roles[user]"); 40 | //map.put("/admin.jsp", "authc,roles[admin]"); 41 | //map.put("/list.jsp", "user"); 42 | map.put("/**", "authc"); 43 | 44 | return map; 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/mapper/PermissionMapper.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.mapper; 2 | 3 | import java.util.List; 4 | 5 | import com.neuedu.crm.pojo.Permission; 6 | import com.neuedu.crm.pojo.PermissionExample; 7 | 8 | /** 9 | * PermissionMapper继承基类 10 | * @author MybatisGenerator 11 | */ 12 | public interface PermissionMapper extends MyBatisBaseDao { 13 | 14 | /** 15 | * 查询父级权限 16 | * @param pid 17 | * @return 18 | * @author huangqingwen 19 | */ 20 | public Permission selectParentPermissionByPid(Integer pid); 21 | 22 | /** 23 | * 查询权限树结构 24 | * @param 25 | * @return List 26 | * @author huangqingwen 27 | */ 28 | public List selectTreePermission(); 29 | 30 | /** 31 | * 描述:根据当前id查询改id下的所有子权限 32 | * @Title: selectChildPermission 33 | * @Description: TODO(根据当前id查询改id下的所有子权限) 34 | * @param @param id 35 | * @param @return 参数 36 | * @return List 返回类型 37 | * @throws 38 | * @author huangqingwen 39 | */ 40 | public List selectChildPermission(Integer id); 41 | 42 | /** 43 | * 描述: 设置当前权限为顶级权限 44 | * @Title: selectChildPermission 45 | * @Description: TODO(设置当前权限为顶级权限) 46 | * @param permission 47 | * @return int 48 | * @throws 49 | * @author huangqingwen 50 | */ 51 | public int setTopPermission(Permission permission); 52 | } -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/utils/RequestUtil.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.utils; 2 | 3 | import javax.servlet.http.Cookie; 4 | 5 | import javax.servlet.http.HttpServletRequest; 6 | 7 | /** 8 | * 描述:用于判断request是否为ajax请求 9 | * @author wanghao 10 | */ 11 | public final class RequestUtil { 12 | 13 | public static final String X_REQUESTED_WIDTH = "X-Requested-With"; 14 | public static final String XML_HTTP_REQUEST = "XMLHttpRequest"; 15 | 16 | private RequestUtil() { 17 | 18 | } 19 | 20 | /** 21 | * 判断是否ajax请求. 22 | * 可以看到Ajax 请求多了个 x-requested-with ,可以利用它, 23 | * request.getHeader("x-requested-with"); 为 null,则为传统同步请求,为 XMLHttpRequest,则为Ajax 异步请求。 24 | *@paramrequest HttpServletRequest 25 | *@return是否ajax请求. 26 | */ 27 | public static boolean isAjaxRequest(HttpServletRequest request) { 28 | String xr=request.getHeader(X_REQUESTED_WIDTH); 29 | return(xr != null && XML_HTTP_REQUEST.equalsIgnoreCase(xr)); 30 | } 31 | 32 | public static String getCookieValue(HttpServletRequest request, String name) { 33 | Cookie[]cookies=request.getCookies(); 34 | if(cookies!=null) { 35 | for(Cookie cookie:cookies) { 36 | String cookieName=cookie.getName(); 37 | if(cookieName.equals(name)) { 38 | return cookie.getValue(); 39 | } 40 | } 41 | } 42 | return null; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/service/impl/LoginServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.service.impl; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | import org.springframework.transaction.annotation.Transactional; 8 | 9 | import com.neuedu.crm.mapper.UserMapper; 10 | import com.neuedu.crm.pojo.User; 11 | import com.neuedu.crm.pojo.UserExample; 12 | import com.neuedu.crm.pojo.UserExample.Criteria; 13 | import com.neuedu.crm.service.ILoginService; 14 | /** 15 | * 16 | * @author 17 | * @date 2018/07/24 18 | */ 19 | @Service 20 | @Transactional(rollbackFor=Exception.class) 21 | public class LoginServiceImpl implements ILoginService { 22 | 23 | @Autowired 24 | UserMapper userMapper; 25 | 26 | @Override 27 | public User login(User user) { 28 | //1. 实例化user的模板类 29 | UserExample userExample = new UserExample(); 30 | //2. 创建查询准则 31 | Criteria criteria = userExample.createCriteria(); 32 | //3. 添加条件 33 | criteria.andAccountEqualTo(user.getAccount()); 34 | criteria.andPasswordEqualTo(user.getPassword()); 35 | //4. 进行模板查询 36 | List users = userMapper.selectByExample(userExample); 37 | //5. 根据查询的结果返回数据 38 | if(users.size() > 0){ 39 | return users.get(0); 40 | }else { 41 | return null; 42 | } 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/utils/SigarUtils.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.utils; 2 | 3 | 4 | 5 | import org.hyperic.sigar.Sigar; 6 | 7 | import java.security.CodeSource; 8 | import java.security.ProtectionDomain; 9 | 10 | 11 | public class SigarUtils { 12 | public final static Sigar sigar = initSigar(); 13 | 14 | public static Sigar initSigar() { 15 | try { 16 | 17 | 18 | String path = System.getProperty("java.library.path"); 19 | ProtectionDomain pd = Sigar.class.getProtectionDomain(); 20 | CodeSource cs = pd.getCodeSource(); 21 | System.out.println("cs: "+ cs.getLocation()); 22 | String jarUrl = cs.getLocation().toString(); 23 | String sigarLibPath = jarUrl.substring(0, jarUrl.lastIndexOf("/")); 24 | System.out.println("sigarLibPath: " + sigarLibPath); 25 | // 为防止java.library.path重复加,此处判断了一下 26 | if (!path.contains(sigarLibPath)) { 27 | if (isOSWin()) { 28 | path += ";" + sigarLibPath; 29 | } else { 30 | path += ":" + sigarLibPath; 31 | } 32 | System.setProperty("java.library.path", path); 33 | } 34 | return new Sigar(); 35 | } catch (Exception e) { 36 | return null; 37 | } 38 | } 39 | 40 | public static boolean isOSWin() {// OS 版本判断 41 | String OS = System.getProperty("os.name").toLowerCase(); 42 | if (OS.indexOf("win") >= 0) { 43 | return true; 44 | } else 45 | return false; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/main/webapp/views/setting.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | 40 | -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/laytpl.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.3.0 MIT License By https://www.layui.com */ 2 | ;layui.define(function(e){"use strict";var r={open:"{{",close:"}}"},c={exp:function(e){return new RegExp(e,"g")},query:function(e,c,t){var o=["#([\\s\\S])+?","([^{#}])*?"][e||0];return n((c||"")+r.open+o+r.close+(t||""))},escape:function(e){return String(e||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var c="Laytpl Error:";return"object"==typeof console&&console.error(c+e+"\n"+(r||"")),c+e}},n=c.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=n("^"+r.open+"#",""),l=n(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(n(r.open+"#"),r.open+"# ").replace(n(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(n(r.open+"!(.+?)!"+r.close),function(e){return e=e.replace(n("^"+r.open+"!"),"").replace(n("!"+r.close),"").replace(n(r.open+"|"+r.close),function(e){return e.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(c.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(c.query(1),function(e){var c='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(n(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),c='"+_escape_('),c+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,c.escape)}catch(u){return delete o.cache,c.error(u,p)}},t.pt.render=function(e,r){var n,t=this;return e?(n=t.cache?t.cache(e,c.escape):t.parse(t.tpl,e),r?void r(n):n):c.error("no data")};var o=function(e){return"string"!=typeof e?c.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var c in e)r[c]=e[c]},o.v="1.2.0",e("laytpl",o)}); -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/utils.js: -------------------------------------------------------------------------------- 1 | /** kitadmin-v1.0.0-beta1 MIT License By http://kit.zhengjinfan.cn Author Van Zheng */ 2 | ;"use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};layui.define(["lodash","axios"],function(t){var n=layui.lodash,o=layui.axios;t("utils",{error:function(t){console.error(t)},oneOf:function(t,o){var e=!1;return n.forEach(o,function(n,o){n===t&&(e=!0)}),e},localStorage:{getItem:function(t){return JSON.parse(localStorage.getItem(t))},setItem:function(t,n){var o="object"===(void 0===n?"undefined":_typeof(n))||"array"==typeof n?JSON.stringify(n):n;localStorage.setItem(t,o)},removeItem:function(t){localStorage.removeItem(t)},clear:function(){localStorage.clear()}},find:function(t,o){return t[n.findKey(t,o)]},tplLoader:function(t,e,r){var a=this,i="";o.get(t).then(function(t){var o=[],e=(i=t.data).match(/id=\"\w*\"/g);null!==e&&n.forEach(e,function(t){o.push(t)});var r=i.match(/lay-filter=\"\w*\"/g);null!==r&&n.forEach(r,function(t){o.push(t)}),o.length>0&&n.forEach(o,function(t){var n=t.match(/\"\w*\"/);if(void 0!==n&&null!=n&&n.length>0){var o=n[0],e=o.substring(1,o.length-1),r=new RegExp(e,"g");i=i.replace(r,a.randomCode())}})}).catch(function(t){var n=t.request,o="读取模板出现异常,异常代码:"+n.status+"、 异常信息:"+n.statusText;console.log(o),"function"==typeof r&&r(o)});var u=setInterval(function(){""!==i&&(clearInterval(u),e(i))},50)},setUrlState:function(t,n){history.pushState({},t,n)},randomCode:function(){return"r"+Math.random().toString(36).substr(2)},isFunction:function(t){return"function"==typeof t},isString:function(t){return"string"==typeof t},isObject:function(t){return"object"===(void 0===t?"undefined":_typeof(t))}})}); 3 | //# sourceMappingURL=utils.js.map 4 | -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/exception/MyExceptionHandler.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.exception; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | import javax.servlet.http.HttpServletRequest; 7 | 8 | import org.apache.shiro.authz.AuthorizationException; 9 | import org.slf4j.Logger; 10 | import org.slf4j.LoggerFactory; 11 | import org.springframework.web.bind.annotation.ControllerAdvice; 12 | import org.springframework.web.bind.annotation.ExceptionHandler; 13 | import org.springframework.web.bind.annotation.ResponseBody; 14 | import org.springframework.web.servlet.ModelAndView; 15 | 16 | import com.neuedu.crm.utils.RequestUtil; 17 | 18 | /** 19 | * 描述:全局的异常处理器 20 | * @author wanghaoyu 21 | * 22 | */ 23 | @ControllerAdvice 24 | public class MyExceptionHandler { 25 | private Logger logger = LoggerFactory.getLogger(ExceptionHandler.class); 26 | 27 | /** 28 | * 29 | * 描述:处理全局Controller所抛出的未授权异常,并进行重定向 30 | * @author wanghaoyu 31 | * @version 1.0 32 | * @param e 33 | * @return String 34 | * @exception Nothing 35 | * @since 1.8 36 | * 37 | */ 38 | @ExceptionHandler({AuthorizationException.class}) 39 | @ResponseBody 40 | public Object handleAuthorizationException(HttpServletRequest request, Exception e) { 41 | logger.info("捕捉到未授权异常!"); 42 | //判断请求类型是否为ajax请求 43 | if(RequestUtil.isAjaxRequest(request)) { 44 | logger.info("这是个ajax请求"); 45 | Map map = new HashMap(16); 46 | map.put("code", -1); 47 | map.put("msg", "抱歉,你没有执行该操作的权限!"); 48 | map.put("success", false); 49 | return map; 50 | }else { 51 | logger.info("这是个普通请求"); 52 | return new ModelAndView("redirect:/views/error/unauthorized.jsp"); 53 | } 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /src/main/webapp/views/fileupload.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | 字典子项 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 |
18 | 50 | 51 | -------------------------------------------------------------------------------- /src/main/resources/properties/redis.properties: -------------------------------------------------------------------------------- 1 | #ip\u5730\u5740 2 | redis.hostName=xxx 3 | #\u7AEF\u53E3\u53F7 4 | redis.port=6379 5 | #\u5982\u679C\u6709\u5BC6\u7801 6 | redis.password=xxx 7 | #\u5BA2\u6237\u7AEF\u8D85\u65F6\u65F6\u95F4\u5355\u4F4D\u662F\u6BEB\u79D2 \u9ED8\u8BA4\u662F2000 8 | redis.timeout=10000 9 | 10 | 11 | #\u6700\u5927\u7A7A\u95F2\u6570 12 | redis.maxIdle=300 13 | #\u8FDE\u63A5\u6C60\u7684\u6700\u5927\u6570\u636E\u5E93\u8FDE\u63A5\u6570\u3002\u8BBE\u4E3A0\u8868\u793A\u65E0\u9650\u5236,\u5982\u679C\u662Fjedis 2.4\u4EE5\u540E\u7528redis.maxTotal 14 | #redis.maxActive=600 15 | #\u63A7\u5236\u4E00\u4E2Apool\u53EF\u5206\u914D\u591A\u5C11\u4E2Ajedis\u5B9E\u4F8B,\u7528\u6765\u66FF\u6362\u4E0A\u9762\u7684redis.maxActive,\u5982\u679C\u662Fjedis 2.4\u4EE5\u540E\u7528\u8BE5\u5C5E\u6027 16 | redis.maxTotal=1000 17 | #\u6700\u5927\u5EFA\u7ACB\u8FDE\u63A5\u7B49\u5F85\u65F6\u95F4\u3002\u5982\u679C\u8D85\u8FC7\u6B64\u65F6\u95F4\u5C06\u63A5\u5230\u5F02\u5E38\u3002\u8BBE\u4E3A-1\u8868\u793A\u65E0\u9650\u5236\u3002 18 | redis.maxWaitMillis=1000 19 | #\u8FDE\u63A5\u7684\u6700\u5C0F\u7A7A\u95F2\u65F6\u95F4 \u9ED8\u8BA41800000\u6BEB\u79D2(30\u5206\u949F) 20 | redis.minEvictableIdleTimeMillis=300000 21 | #\u6BCF\u6B21\u91CA\u653E\u8FDE\u63A5\u7684\u6700\u5927\u6570\u76EE,\u9ED8\u8BA43 22 | redis.numTestsPerEvictionRun=1024 23 | #\u9010\u51FA\u626B\u63CF\u7684\u65F6\u95F4\u95F4\u9694(\u6BEB\u79D2) \u5982\u679C\u4E3A\u8D1F\u6570,\u5219\u4E0D\u8FD0\u884C\u9010\u51FA\u7EBF\u7A0B, \u9ED8\u8BA4-1 24 | redis.timeBetweenEvictionRunsMillis=30000 25 | #\u662F\u5426\u5728\u4ECE\u6C60\u4E2D\u53D6\u51FA\u8FDE\u63A5\u524D\u8FDB\u884C\u68C0\u9A8C,\u5982\u679C\u68C0\u9A8C\u5931\u8D25,\u5219\u4ECE\u6C60\u4E2D\u53BB\u9664\u8FDE\u63A5\u5E76\u5C1D\u8BD5\u53D6\u51FA\u53E6\u4E00\u4E2A 26 | redis.testOnBorrow=true 27 | #\u5728\u7A7A\u95F2\u65F6\u68C0\u67E5\u6709\u6548\u6027, \u9ED8\u8BA4false 28 | redis.testWhileIdle=true 29 | -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/utils/IpAdrressUtil.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.utils; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | 5 | 6 | 7 | /** 8 | * 9 | * @author huangqingwen 10 | * 11 | */ 12 | public class IpAdrressUtil { 13 | /** 14 | * 获取用户真实的ip地址 15 | * @param request 16 | * @author huangqingwen 17 | * @return 18 | */ 19 | public static String getIpAdrress(HttpServletRequest request) { 20 | String ip = null; 21 | 22 | //X-Forwarded-For:Squid 服务代理 23 | String ipAddresses = request.getHeader("X-Forwarded-For"); 24 | String unknown = "unknown"; 25 | if (ipAddresses == null || ipAddresses.length() == 0 || unknown.equalsIgnoreCase(ipAddresses)) { 26 | //Proxy-Client-IP:apache 服务代理 27 | ipAddresses = request.getHeader("Proxy-Client-IP"); 28 | } 29 | 30 | if (ipAddresses == null || ipAddresses.length() == 0 || unknown.equalsIgnoreCase(ipAddresses)) { 31 | //WL-Proxy-Client-IP:weblogic 服务代理 32 | ipAddresses = request.getHeader("WL-Proxy-Client-IP"); 33 | } 34 | 35 | if (ipAddresses == null || ipAddresses.length() == 0 || unknown.equalsIgnoreCase(ipAddresses)) { 36 | //HTTP_CLIENT_IP:有些代理服务器 37 | ipAddresses = request.getHeader("HTTP_CLIENT_IP"); 38 | } 39 | 40 | if (ipAddresses == null || ipAddresses.length() == 0 || unknown.equalsIgnoreCase(ipAddresses)) { 41 | //X-Real-IP:nginx服务代理 42 | ipAddresses = request.getHeader("X-Real-IP"); 43 | } 44 | 45 | //有些网络通过多层代理,那么获取到的ip就会有多个,一般都是通过逗号(,)分割开来,并且第一个ip为客户端的真实IP 46 | if (ipAddresses != null && ipAddresses.length() != 0) { 47 | ip = ipAddresses.split(",")[0]; 48 | } 49 | 50 | //还是不能获取到,最后再通过request.getRemoteAddr();获取 51 | if (ip == null || ip.length() == 0 || unknown.equalsIgnoreCase(ipAddresses)) { 52 | ip = request.getRemoteAddr(); 53 | } 54 | return ip; 55 | } 56 | 57 | 58 | } 59 | -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/flow.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.3.0 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var l=layui.$,o=function(e){},t='';o.prototype.load=function(e){var o,i,n,r,a=this,c=0;e=e||{};var f=l(e.elem);if(f[0]){var m=l(e.scrollElem||document),u=e.mb||50,s=!("isAuto"in e)||e.isAuto,v=e.end||"没有更多了",y=e.scrollElem&&e.scrollElem!==document,d="加载更多",h=l('");f.find(".layui-flow-more")[0]||f.append(h);var p=function(e,t){e=l(e),h.before(e),t=0==t||null,t?h.html(v):h.find("a").html(d),i=t,o=null,n&&n()},g=function(){o=!0,h.find("a").html(t),"function"==typeof e.done&&e.done(++c,p)};if(g(),h.find("a").on("click",function(){l(this);i||o||g()}),e.isLazyimg)var n=a.lazyimg({elem:e.elem+" img",scrollElem:e.scrollElem});return s?(m.on("scroll",function(){var e=l(this),t=e.scrollTop();r&&clearTimeout(r),i||(r=setTimeout(function(){var i=y?e.height():l(window).height(),n=y?e.prop("scrollHeight"):document.documentElement.scrollHeight;n-t-i<=u&&(o||g())},100))}),a):a}},o.prototype.lazyimg=function(e){var o,t=this,i=0;e=e||{};var n=l(e.scrollElem||document),r=e.elem||"img",a=e.scrollElem&&e.scrollElem!==document,c=function(e,l){var o=n.scrollTop(),r=o+l,c=a?function(){return e.offset().top-n.offset().top+o}():e.offset().top;if(c>=o&&c<=r&&!e.attr("src")){var m=e.attr("lay-src");layui.img(m,function(){var l=t.lazyimg.elem.eq(i);e.attr("src",m).removeAttr("lay-src"),l[0]&&f(l),i++})}},f=function(e,o){var f=a?(o||n).height():l(window).height(),m=n.scrollTop(),u=m+f;if(t.lazyimg.elem=l(r),e)c(e,f);else for(var s=0;su)break}};if(f(),!o){var m;n.on("scroll",function(){var e=l(this);m&&clearTimeout(m),m=setTimeout(function(){f(null,e)},50)}),o=!0}return f},e("flow",new o)}); -------------------------------------------------------------------------------- /src/main/resources/mybatis/mybatis-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/utils/TimeStamp.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.utils; 2 | 3 | 4 | import java.text.ParseException; 5 | import java.text.SimpleDateFormat; 6 | import java.util.Date; 7 | import java.util.Locale; 8 | 9 | 10 | /** 11 | * 时间格式工具 12 | * 1. 获得当前的时间戳 getNowTimeStamp 13 | * 2. 将Unix时间戳转换成指定格式日期字符串 TimeStamp2Date(String timestampString, String formats) 14 | * @author huangqingwen 15 | * 16 | */ 17 | public class TimeStamp { 18 | 19 | /** 20 | * 取得当前时间戳(精确到秒) 21 | * 22 | * @return nowTimeStamp 23 | */ 24 | public static int getNowTimeStamp() { 25 | long time = System.currentTimeMillis(); 26 | String nowTimeStamp = String.valueOf(time / 1000); 27 | return Integer.parseInt(nowTimeStamp); 28 | } 29 | 30 | /** 31 | * Java将Unix时间戳转换成指定格式日期字符串 32 | * @param timestampString 时间戳 如:"1473048265"; 33 | * @param formats 要格式化的格式 默认:"yyyy-MM-dd HH:mm:ss"; 34 | * 35 | * @return 返回结果 如:"2016-09-05 16:06:42"; 36 | */ 37 | public static String timeStamp2Date(String timestampString, String formats) { 38 | if(formats == null || "".equals(formats)) 39 | { 40 | formats = "yyyy-MM-dd HH:mm:ss"; 41 | } 42 | if(timestampString==null || "".equals(timestampString)){ 43 | return ""; 44 | } 45 | Long timestamp = Long.parseLong(timestampString) * 1000; 46 | String date = new SimpleDateFormat(formats, Locale.CHINA).format(new Date(timestamp)); 47 | return date; 48 | } 49 | 50 | /** 51 | * 将时间转换为时间戳 52 | * @Title : dateToStamp 53 | * @功能描述: TODO 54 | * @返回类型:Long 55 | * @作者: huangqingwen 56 | * @throws : 57 | */ 58 | public static long dateToStamp(String s, String pattern)throws ParseException{ 59 | //String res; 60 | SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern); 61 | Date date = simpleDateFormat.parse(s); 62 | long ts = date.getTime(); 63 | //res = String.valueOf(ts); 64 | return new Long(ts); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/main/webapp/views/customer/orderItem.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 订单项详情页 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 70 | 71 | -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/pojo/Category.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.pojo; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * category 7 | * @author 8 | */ 9 | public class Category implements Serializable { 10 | /** 11 | * 分类编号 12 | */ 13 | private Integer id; 14 | 15 | /** 16 | * 分类名称 17 | */ 18 | private String name; 19 | 20 | private static final long serialVersionUID = 1L; 21 | 22 | public Integer getId() { 23 | return id; 24 | } 25 | 26 | public void setId(Integer id) { 27 | this.id = id; 28 | } 29 | 30 | public String getName() { 31 | return name; 32 | } 33 | 34 | public void setName(String name) { 35 | this.name = name; 36 | } 37 | 38 | @Override 39 | public boolean equals(Object that) { 40 | if (this == that) { 41 | return true; 42 | } 43 | if (that == null) { 44 | return false; 45 | } 46 | if (getClass() != that.getClass()) { 47 | return false; 48 | } 49 | Category other = (Category) that; 50 | return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) 51 | && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())); 52 | } 53 | 54 | @Override 55 | public int hashCode() { 56 | final int prime = 31; 57 | int result = 1; 58 | result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); 59 | result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); 60 | return result; 61 | } 62 | 63 | @Override 64 | public String toString() { 65 | StringBuilder sb = new StringBuilder(); 66 | sb.append(getClass().getSimpleName()); 67 | sb.append(" ["); 68 | sb.append("Hash = ").append(hashCode()); 69 | sb.append(", id=").append(id); 70 | sb.append(", name=").append(name); 71 | sb.append(", serialVersionUID=").append(serialVersionUID); 72 | sb.append("]"); 73 | return sb.toString(); 74 | } 75 | } -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/mockjs.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["mockjs.js"],"names":["layui","define","exports","Mock","mockjsbase","utils","_","lodash","inject","keys","APIs","error","item","index","key","split","method","toLocaleLowerCase","oneOf","template","_typeof","mock","url","mockjs"],"mappings":";oOAAAA,MAAMC,QAAQ,aAAc,QAAS,UAAW,SAASC,GACvD,IAAIC,EAAOH,MAAMI,WACfC,EAAQL,MAAMK,MACdC,EAAIN,MAAMO,OA4BPL,EAnBD,UAXJM,OACEH,SAAcA,GACdC,GAFF,iBAEMN,IAAMO,EAANP,YAAAA,QAAMO,IAAVD,CAIE,IAAIG,EAAAH,EAAOI,KAAPA,GACFL,EAAAA,QAAMM,EAAM,SAAAC,EAAAC,GACZ,IAAAC,EAAAF,EAAAG,MAAA,KACDC,EAAAF,EAAA,GAAAG,oBACGR,EAAAA,EAASA,GAEX,GAAIK,EAAMF,MAAKG,GAAf,MAAA,OAAA,MAAA,WAAA,CAKEV,IAAAA,EAAYK,EAAAE,GACZP,EAAAa,WAAA,IAAAC,EAAA,YAAAC,QAAAD,IAAA,SAAA,QAAA,aAODhB,EAAAkB,KAAAC,EAAAN,EAAAG,GANAd,EAAAM,MAAA,2EAPDN,EACEW,MAASF,4DAVbS,EAAAA,MAAS","file":"mockjs.js","sourcesContent":["layui.define(['mockjsbase', 'utils', 'lodash'], function(exports) {\r\n var Mock = layui.mockjsbase,\r\n utils = layui.utils,\r\n _ = layui.lodash;\r\n var mockjs = {\r\n // 通过此方法注入配置\r\n inject: function(APIs) {\r\n if (typeof APIs !== 'object') {\r\n utils.error('mockjs inject error:APIs参数类型只能为object,请检查.');\r\n return;\r\n }\r\n var keys = _.keys(APIs);\r\n _.forEach(keys, function(item, index) {\r\n var key = item.split(' '),\r\n method = key[0].toLocaleLowerCase(),\r\n url = key[1];\r\n // 验证请求方式\r\n if (!utils.oneOf(method, ['get', 'post', 'put', 'delete'])) {\r\n utils.error('mockjs config error:请求方式只支持:[GET,POST,PUT,DELETE]');\r\n return;\r\n }\r\n // 验证模板类型\r\n var template = APIs[item];\r\n if (!utils.oneOf(typeof template, ['object', 'array', 'function'])) {\r\n utils.error('mockjs config error:template 只支持类型为:[object,array,function] 的处理方式.');\r\n return;\r\n }\r\n // Mock.mock(拦截地址,请求方式/get/post/put/delete,处理模版); \r\n // 参考:https://github.com/nuysoft/Mock/wiki/Mock.mock()\r\n // 注册Mock拦截\r\n Mock.mock(url, method, template);\r\n })\r\n }\r\n };\r\n //输出mockjs接口\r\n exports('mockjs', mockjs);\r\n});"]} -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/inputnumber.js: -------------------------------------------------------------------------------- 1 | /** kitadmin-v1.0.0-beta1 MIT License By http://kit.zhengjinfan.cn Author Van Zheng */ 2 | ;"use strict";layui.define(["jquery","laytpl"],function(t){var e=layui.jquery,i=layui.laytpl,n=['
','
','
',"
"],a=function(){this.config={max:1e6,min:0,precision:1,defaultType:"integer",onClicked:void 0}};a.prototype.set=function(t){return e.extend(!0,this.config,t),this},a.prototype.render=function(){var t=this.config;e('input[kit-target="inputnumber"]').each(function(){var a=e(this);if(!a.attr("data-rendered")){var u=r.randomCode();i(n.join("")).render({id:u,left:a[0].offsetWidth-28},function(i){var n=a[0].min||t.min,l=a[0].max||t.max,o=a.attr("kit-in-precision")||t.precision;a.attr("kit-in-type")||t.defaultType;a[0].id=u,a.parent().append(i),a.attr("data-rendered","true");var d=a.val();switch(0==r.validate(d)&&a.val(0),t.defaultType){case"integer":parseInt(d)>parseInt(l)&&a.val(l),parseInt(d)parseFloat(l)&&a.val(l),parseFloat(d)=(l=parseInt(l))&&(i=l),a.val(i)}r.isFunction(t.onClicked)&&t.onClicked({elem:a,value:e})}),s.find(".kit-inputnumber-down").off("click").on("click",function(){var e=r.validate(a.val());if("integer"===t.defaultType){var i=parseInt(e);(i-=parseInt(o))<=(n=parseInt(n))&&(i=n),a.val(i)}r.isFunction(t.onClicked)&&t.onClicked({elem:a,value:e})})})}})};var r={randomCode:function(){return Math.random().toString(36).substr(2)},validate:function(t){return""!==t&&u.isInteger(t)||u.isDouble(t)?t:0},isFunction:function(t){return"function"==typeof t}},u={isInteger:function(t){return 0!=t.length&&/^[-+]?\d*$/.test(t)},isDouble:function(t){return 0!=t.length&&/^[-\+]?\d+(\.\d+)?$/.test(t)}};t("inputnumber",new a)}); 3 | //# sourceMappingURL=inputnumber.js.map 4 | -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/service/impl/LogServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.service.impl; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | import org.springframework.transaction.annotation.Transactional; 8 | 9 | import com.neuedu.crm.mapper.LogMapper; 10 | import com.neuedu.crm.pojo.Log; 11 | import com.neuedu.crm.pojo.LogExample; 12 | import com.neuedu.crm.service.ILogService; 13 | /** 14 | * 15 | * @author 16 | * @date 2018/07/24 17 | */ 18 | @Service 19 | @Transactional(rollbackFor=Exception.class) 20 | public class LogServiceImpl implements ILogService { 21 | 22 | @Autowired 23 | private LogMapper logMapper; 24 | 25 | @Override 26 | public long countByLogExample(LogExample logExample) { 27 | return logMapper.countByExample(logExample); 28 | } 29 | 30 | @Override 31 | public boolean deleteByLogExample(LogExample logExample) { 32 | return logMapper.deleteByExample(logExample) > 0 ? true : false; 33 | } 34 | 35 | @Override 36 | public boolean deleteByPrimaryKey(Integer id) { 37 | return logMapper.deleteByPrimaryKey(id) > 0 ? true : false; 38 | } 39 | 40 | @Override 41 | public boolean insertLog(Log log) { 42 | return logMapper.insert(log) > 0 ? true : false; 43 | } 44 | 45 | @Override 46 | public boolean insertSelective(Log log) { 47 | return logMapper.insertSelective(log) > 0 ? true : false; 48 | } 49 | 50 | @Override 51 | public List selectByLogExample(LogExample logExample) { 52 | return logMapper.selectByExample(logExample); 53 | } 54 | 55 | @Override 56 | public Log selectLogByPrimaryKey(Integer id) { 57 | return logMapper.selectByPrimaryKey(id); 58 | } 59 | 60 | @Override 61 | public boolean updateByLogExampleSelective(Log log, LogExample logExample) { 62 | return logMapper.updateByExampleSelective(log, logExample) > 0 ? true : false; 63 | } 64 | 65 | @Override 66 | public boolean updateByLogExample(Log log, LogExample logExample) { 67 | return logMapper.updateByExample(log, logExample) > 0 ? true : false; 68 | } 69 | 70 | @Override 71 | public boolean updateLogByPrimaryKeySelective(Log log) { 72 | return logMapper.updateByPrimaryKeySelective(log) > 0 ? true : false; 73 | } 74 | 75 | @Override 76 | public boolean updateLogByPrimaryKey(Log log) { 77 | return logMapper.updateByPrimaryKey(log) > 0 ? true : false ; 78 | } 79 | 80 | } 81 | -------------------------------------------------------------------------------- /src/main/webapp/layui/css/login.css: -------------------------------------------------------------------------------- 1 | /** kitadmin-v1.0.0-beta1 MIT License By http://kit.zhengjinfan.cn Author Van Zheng */ 2 | .kit-login{position:relative;height:100vh}.kit-login-bg{position:absolute;top:0;left:0;right:0;bottom:0;background-size:cover;background-image:url(https://img.alicdn.com/tfs/TB1zsNhXTtYBeNjy1XdXXXXyVXa-2252-1500.png)}.kit-login-wapper{position:absolute;top:-100px;left:0;right:0;bottom:0;max-width:1080px;margin:0 auto;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:space-around;-ms-flex-pack:distribute;justify-content:space-around;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.kit-login-wapper .kit-login-slogan{text-align:center;color:#fff;font-size:36px;letter-spacing:2px;line-height:48px;margin-bottom:9px;font-weight:500}.kit-login-wapper .kit-login-form{display:flex;justify-content:center;flex-direction:column;padding:30px 40px;background:#fff;border-radius:6px;box-shadow:#eee 1px 1px 2px}.kit-login-wapper .kit-login-title{font-weight:400;line-height:24px;font-size:16px;margin:0 0 20px;text-align:center;color:#009688;letter-spacing:12px}.kit-login-wapper .kit-login-row{-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;position:relative;margin-bottom:25px;flex-direction:column}.kit-login-wapper .kit-login-row .kit-login-btn{border-radius:20px;line-height:32px;height:32px}.kit-login-wapper .kit-login-row .kit-login-col{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.kit-login-wapper .kit-login-row .kit-login-col>i.layui-icon{position:absolute;left:5px;top:5px;color:#999;display:inline-block;font-style:normal;-webkit-text-stroke-width:.2px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.kit-login-wapper .kit-login-row .kit-login-col .kit-login-input{width:240px;border-radius:0;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-table;overflow:visible;border:1px solid #e0e0e0;background-color:#fff;transition:all .3s ease-out;border-collapse:separate;border-spacing:0;border-top:0;border-left:0;border-right:0;border-color:#dcdcdc}.kit-login-wapper .kit-login-row .kit-login-col .kit-login-input input{-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;border:none;outline:0;padding:0;font-weight:400;vertical-align:baseline;background-color:transparent;height:26px;line-height:26px\9;margin:0;padding:0 8px;border-radius:4px;color:#333;padding-left:25px;font-size:13px} -------------------------------------------------------------------------------- /src/main/resources/spring/application-mail.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | ${mail.smtp.auth} 29 | ${mail.smtp.timeout} 30 | ${mail.smtp.port} 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/pojo/Pager.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.pojo; 2 | 3 | 4 | public class Pager { 5 | 6 | // 第几页 - 默认值是第1页,不能小于1 7 | private int currentPage = 1; 8 | 9 | // 每页查几条 - 默认值是10条,不能小于1 10 | private int pageSize = 10; 11 | 12 | // 要分页数据的记录总数,如果没有数据则为0 13 | private int total; 14 | 15 | private Object object; 16 | 17 | 18 | 19 | public Object getObject() { 20 | return object; 21 | } 22 | 23 | public void setObject(Object object) { 24 | this.object = object; 25 | } 26 | 27 | public Pager() { 28 | super(); 29 | } 30 | 31 | public Pager(int currentPage, int pageSize) { 32 | super(); 33 | setCurrentPage(currentPage); 34 | setPageSize(pageSize); 35 | } 36 | 37 | public Pager(int total) { 38 | setTotal(total); 39 | } 40 | 41 | public int getTotal() { 42 | return total; 43 | } 44 | /** 45 | * 分页的总记录数 46 | * 47 | */ 48 | public void setTotal(int total) { 49 | if (total >= 0) { 50 | this.total = total; 51 | } 52 | } 53 | 54 | public int getCurrentPage() { 55 | return currentPage; 56 | } 57 | 58 | public void setCurrentPage(int currentPage) { 59 | if (currentPage >= 1) { 60 | this.currentPage = currentPage; 61 | } 62 | if(currentPage >= getPages()){ 63 | currentPage = getPages(); 64 | } 65 | } 66 | 67 | public int getPageSize() { 68 | return pageSize; 69 | } 70 | 71 | public void setPageSize(int pageSize) { 72 | if (pageSize > 1) { 73 | this.pageSize = pageSize; 74 | } 75 | } 76 | 77 | /** 78 | * 开始查询的索引,即从第几条开始查 79 | * 80 | * @return 81 | */ 82 | public int getOffset() { 83 | return (currentPage - 1) * pageSize; 84 | } 85 | 86 | /** 87 | * 计算总页数 88 | * 89 | * @return 90 | */ 91 | public int getPages() { 92 | //可以分成整页的取商;不能分成整页则需要 商+1 页 93 | int pages = total%pageSize==0?total/pageSize:total/pageSize+1; 94 | return pages; 95 | } 96 | 97 | public int getPrePage() {//上一页 98 | //当前页是第一页不能前翻,否则翻一页 99 | int prePage = currentPage<=1?1:currentPage-1; 100 | return prePage; 101 | } 102 | 103 | public int getNextPages() {//下一页 104 | //当前页是最后一页不能后翻,否则翻一页 105 | int nextPage = currentPage>=getPages()?getPages():currentPage+1; 106 | return nextPage; 107 | } 108 | 109 | 110 | 111 | @Override 112 | public String toString() { 113 | return "Pager [currentPage=" + currentPage + ", pageSize=" + pageSize + ", total=" + total + ", param=" 114 | + "]"; 115 | } 116 | 117 | } 118 | -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/util.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.3.0 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var t=layui.$,i={fixbar:function(e){var i,a,o="layui-fixbar",r="layui-fixbar-top",l=t(document),n=t("body");e=t.extend({showHeight:200},e),e.bar1=e.bar1===!0?"":e.bar1,e.bar2=e.bar2===!0?"":e.bar2,e.bgcolor=e.bgcolor?"background-color:"+e.bgcolor:"";var c=[e.bar1,e.bar2,""],g=t(['
    ',e.bar1?'
  • '+c[0]+"
  • ":"",e.bar2?'
  • '+c[1]+"
  • ":"",'
  • '+c[2]+"
  • ","
"].join("")),u=g.find("."+r),s=function(){var t=l.scrollTop();t>=e.showHeight?i||(u.show(),i=1):i&&(u.hide(),i=0)};t("."+o)[0]||("object"==typeof e.css&&g.css(e.css),n.append(g),s(),g.find("li").on("click",function(){var i=t(this),a=i.attr("lay-type");"top"===a&&t("html,body").animate({scrollTop:0},200),e.click&&e.click.call(this,a)}),l.on("scroll",function(){clearTimeout(a),a=setTimeout(function(){s()},100)}))},countdown:function(e,t,i){var a=this,o="function"==typeof t,r=new Date(e).getTime(),l=new Date(!t||o?(new Date).getTime():t).getTime(),n=r-l,c=[Math.floor(n/864e5),Math.floor(n/36e5)%24,Math.floor(n/6e4)%60,Math.floor(n/1e3)%60];o&&(i=t);var g=setTimeout(function(){a.countdown(e,l+1e3,i)},1e3);return i&&i(n>0?c:[0,0,0,0],t,g),n<=0&&clearTimeout(g),g},timeAgo:function(e,t){var i=this,a=[[],[]],o=(new Date).getTime()-new Date(e).getTime();return o>6912e5?(o=new Date(e),a[0][0]=i.digit(o.getFullYear(),4),a[0][1]=i.digit(o.getMonth()+1),a[0][2]=i.digit(o.getDate()),t||(a[1][0]=i.digit(o.getHours()),a[1][1]=i.digit(o.getMinutes()),a[1][2]=i.digit(o.getSeconds())),a[0].join("-")+" "+a[1].join(":")):o>=864e5?(o/1e3/60/60/24|0)+"天前":o>=36e5?(o/1e3/60/60|0)+"小时前":o>=12e4?(o/1e3/60|0)+"分钟前":o<0?"未来":"刚刚"},digit:function(e,t){var i="";e=String(e),t=t||2;for(var a=e.length;a/g,">").replace(/'/g,"'").replace(/"/g,""")}};e("util",i)}); -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/utils/RandomStringUtil.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.neuedu.crm.utils; 5 | 6 | import java.util.Random; 7 | import java.util.UUID; 8 | 9 | /** 10 | * @author wanghaoyu 11 | * 12 | */ 13 | public class RandomStringUtil { 14 | /** 15 | * @param passLength 16 | * : 要生成多少长度的字符串 17 | * @param type 18 | * : 需要哪种类型 19 | * @return 根据传入的type来判定 20 | */ 21 | 22 | // 可以根据自己需求来删减下面的代码,不要要的类型可以删掉 23 | 24 | // type=0:纯数字(0-9) 25 | // type=1:全小写字母(a-z) 26 | // type=2:全大写字母(A-Z) 27 | // type=3: 数字+小写字母 28 | // type=4: 数字+大写字母 29 | // type=5:大写字母+小写字母 30 | // type=6:数字+大写字母+小写字母 31 | // type=7:固定长度33位:根据UUID拿到的随机字符串,去掉了四个"-"(相当于长度33位的小写字母加数字) 32 | 33 | public static String getRandomCode(int passLength, int type) { 34 | StringBuffer buffer = null; 35 | StringBuffer sb = new StringBuffer(); 36 | Random r = new Random(); 37 | r.setSeed(System.currentTimeMillis()); 38 | switch (type) { 39 | case 0: 40 | buffer = new StringBuffer("0123456789"); 41 | break; 42 | case 1: 43 | buffer = new StringBuffer("abcdefghijklmnopqrstuvwxyz"); 44 | break; 45 | case 2: 46 | buffer = new StringBuffer("ABCDEFGHIJKLMNOPQRSTUVWXYZ"); 47 | break; 48 | case 3: 49 | buffer = new StringBuffer("0123456789abcdefghijklmnopqrstuvwxyz"); 50 | break; 51 | case 4: 52 | buffer = new StringBuffer("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"); 53 | break; 54 | case 5: 55 | buffer = new StringBuffer("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"); 56 | break; 57 | case 6: 58 | buffer = new StringBuffer("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"); 59 | sb.append(buffer.charAt(r.nextInt(buffer.length() - 10))); 60 | passLength -= 1; 61 | break; 62 | case 7: 63 | String s = UUID.randomUUID().toString(); 64 | sb.append(s.substring(0, 8) + s.substring(9, 13) + s.substring(14, 18) + s.substring(19, 23) + s.substring(24)); 65 | break; 66 | default: 67 | } 68 | 69 | int num = 7; 70 | if (type != num) { 71 | int range = buffer.length(); 72 | for (int i = 0; i < passLength; ++i) { 73 | sb.append(buffer.charAt(r.nextInt(range))); 74 | } 75 | } 76 | return sb.toString(); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/menu.js: -------------------------------------------------------------------------------- 1 | /** kitadmin-v1.0.0-beta1 MIT License By http://kit.zhengjinfan.cn Author Van Zheng */ 2 | ;"use strict";layui.define(["jquery","utils","axios"],function(i){var e=layui.jquery,n=layui.utils,t=layui.lodash,a=layui.axios,r=n.localStorage,o=function(){this.config={elem:void 0,onClicked:void 0,dynamicRender:!1,data:[],remote:{url:void 0,method:"get"},cached:!1,cacheKey:"KITADMINMENU",isJump:!0},this.version="1.0.0"},u=".kit-menu",s=".kit-menu-item";o.prototype.set=function(i){return e.extend(!0,this.config,i),this},o.prototype.render=function(){var i=this,e=i.config;if(e.dynamicRender)if(e.data.length>0)r.setItem(e.cacheKey,t),l.renderHTML(e.elem,e.data,function(){i.bind()});else{var n=!1;if(e.cached){var t=r.getItem(e.cacheKey);null!==t&&void 0!==t&&(n=!0,l.renderHTML(e.elem,t,function(){i.bind()}))}n||l.loadData(e.remote,function(n){r.setItem(e.cacheKey,n),l.renderHTML(e.elem,n,function(){i.bind()})})}else i.bind();return i},o.prototype.bind=function(){var i=this.config;return e(u).find(s).each(function(){var t=e(this),a=t.children("a"),r=t.find("ul.kit-menu-child").length>0;r&&a.addClass("child");var o=t.attr("lay-id");""!==o&&void 0!==o||(o=n.randomCode(),t.attr("lay-id",o)),a.off("click").on("click",function(l){if(layui.stope(l),r?t.hasClass("layui-show")?t.removeClass("layui-show"):t.addClass("layui-show"):(e(u).find(s).removeClass("layui-this"),t.addClass("layui-this")),n.isFunction(i.onClicked)&&i.onClicked({elem:t,hasChild:r,data:{href:a.attr("href"),layid:o}}),!i.isJump)return!1})}),this},o.prototype.removeCache=function(i){var e=this.config;i=i||e.cacheKey,n.localStorage.removeItem(i)};var l={renderHTML:function(i,t,a){var r=['
    '];if(this.recursion(r,t,0),r.length>0){r.push("
");var o=e(i);if(0===o.length)return void n.error("Menu config error:请配置elem参数.");o.html(r.join("")),n.isFunction(a)&&a()}},recursion:function(i,e,n){var a=this,r=[];t.forEach(e,function(i,e){i.pid===n&&r.push(i)}),r.length>0&&t.forEach(r,function(e){var n=e.open?"layui-show":"";i.push('
  • ');var r=t.isEmpty(e.path)?"javascript:;":e.path;e.blank?i.push(''):i.push(''),i.push(''+e.icon+" "),i.push(""+e.title+""),i.push("");var o=e.children;void 0!==o&&null!==o&&o.length>0&&(i.push('
      '),a.recursion(i,o,e.id),i.push("
    ")),i.push("
  • ")})},loadData:function(i,e){a(i).then(function(i){if(500===i.status)throw new Error(i.statusText);return i.data}).then(function(i){e(i)}).catch(function(i){n.error(i)})}};i("menu",new o)}); 3 | //# sourceMappingURL=menu.js.map 4 | -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/service/impl/ProductServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.service.impl; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | import org.springframework.transaction.annotation.Transactional; 8 | 9 | import com.neuedu.crm.mapper.ProductMapper; 10 | import com.neuedu.crm.pojo.Product; 11 | import com.neuedu.crm.pojo.ProductExample; 12 | import com.neuedu.crm.service.IProductService; 13 | 14 | /** 15 | * 创建wujunyou,修改malizhi 16 | * @author malihzi 17 | * 18 | */ 19 | @Service 20 | @Transactional(rollbackFor=Exception.class) 21 | public class ProductServiceImpl implements IProductService { 22 | 23 | @Autowired 24 | private ProductMapper productMapper; 25 | 26 | @Override 27 | public long countByProductExample(ProductExample productExample) { 28 | return productMapper.countByExample(productExample); 29 | } 30 | 31 | @Override 32 | public boolean deleteByProductExample(ProductExample productExample) { 33 | return productMapper.deleteByExample(productExample) > 0 ? true : false; 34 | } 35 | 36 | @Override 37 | public boolean deleteByPrimaryKey(Integer id) { 38 | return productMapper.deleteByPrimaryKey(id) > 0 ? true : false; 39 | } 40 | 41 | @Override 42 | public boolean insertProduct(Product product) { 43 | return productMapper.insert(product) > 0 ? true : false; 44 | } 45 | 46 | @Override 47 | public boolean insertSelective(Product product) { 48 | return productMapper.insertSelective(product) > 0 ? true : false; 49 | } 50 | 51 | @Override 52 | public List selectByProductExample(ProductExample productExample) { 53 | return productMapper.selectByExample(productExample); 54 | } 55 | 56 | @Override 57 | public Product selectProductByPrimaryKey(Integer id) { 58 | return productMapper.selectByPrimaryKey(id); 59 | } 60 | 61 | @Override 62 | public boolean updateByProductExampleSelective(Product product, ProductExample productExample) { 63 | return productMapper.updateByExampleSelective(product, productExample) > 0 ? true : false; 64 | } 65 | 66 | @Override 67 | public boolean updateByProductExample(Product product, ProductExample productExample) { 68 | return productMapper.updateByExample(product, productExample) > 0 ? true : false; 69 | } 70 | 71 | @Override 72 | public boolean updateProductByPrimaryKeySelective(Product product) { 73 | return productMapper.updateByPrimaryKeySelective(product) > 0 ? true : false; 74 | } 75 | 76 | @Override 77 | public boolean updateProductByPrimaryKey(Product product) { 78 | return productMapper.updateByPrimaryKey(product) > 0 ? true : false ; 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/kit.js: -------------------------------------------------------------------------------- 1 | /** kitadmin-v1.0.0-beta1 MIT License By http://kit.zhengjinfan.cn Author Van Zheng */ 2 | ;"use strict";layui.define(["layer"],function(i){var t=layui.jquery,a=t(window),s=function(){this.config={type:"TABS"},this.version="1.0.0"};s.prototype.set=function(i){return t.extend(!0,this.config,i),this},s.prototype.init=function(){e.tabsInit(this),e.toolsInit()};var e={toolsInit:function(){var i=t('[kit-toggle="side"]');i.on("click",function(){var a=t("div[kit-side]"),s=t("div[kit-body]"),e=t("div[kit-tabs-t]"),l=t("div[kit-footer]");switch(i.attr("data-toggle")){case"on":a.animate({width:"0px"}),s.animate({left:"0"}),e.animate({"margin-left":"0"}),l.animate({left:"0"}),t(this).attr("data-toggle","off"),i.find("i.layui-icon").html("");break;case"off":a.animate({width:"200px"}),s.animate({left:"200px"}),l.animate({left:"200px"}),e.animate({"margin-left":"200px"}),t(this).attr("data-toggle","on"),i.find("i.layui-icon").html("")}}),a.on("resize",function(){var a=t('[kit-toggle="side"]').attr("data-toggle"),s=this.innerWidth;s<1024&&"on"===a&&i.click(),s>1024&&"off"===a&&i.click()}),a.resize()},tabsInit:function(i){var a=(new Date).getTime(),s=['
    ','
    ',' ',"
    ",'
    ','
      ','
    • ',' 主页',"
    • ","
    ","
    ",'
    ',' ',"
    ",'
    ',' ',"
    ",'
    '," ","
    ","
    "],e=['
    ','
    '," ","
    ","
    "];if("TABS"===i.config.type.toUpperCase()){var l=t(".layui-layout-admin");l.append(s.join("")),l.find(".layui-body").html(e.join("")).css("top","90px")}}};i("kit",new s)}); 3 | //# sourceMappingURL=kit.js.map 4 | -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/utils/LocalDateConverter.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.utils; 2 | 3 | import java.time.LocalDate; 4 | import java.time.format.DateTimeFormatter; 5 | import java.util.ArrayList; 6 | import java.util.List; 7 | 8 | import org.springframework.core.convert.converter.Converter; 9 | 10 | /** 11 | * 描述:自定义时间转换器 12 | * @author wanghaoyu 13 | * 14 | */ 15 | public class LocalDateConverter implements Converter{ 16 | /** 17 | * 添加不同的日期格式 18 | */ 19 | private static List formats = new ArrayList(); 20 | static{ 21 | formats.add("yyyy"); 22 | formats.add("yyyy-MM"); 23 | formats.add("yyyy-MM-dd"); 24 | formats.add("yyyy/MM"); 25 | formats.add("yyyy/MM/dd"); 26 | } 27 | 28 | @Override 29 | public LocalDate convert(String source) { 30 | 31 | try { 32 | String string = "^\\\\d{4}$"; 33 | if (source.matches(string)) { 34 | //2017 35 | return parseDate(source, formats.get(0)); 36 | } else if (source.matches("^\\d{4}-\\d{1,2}$")) { 37 | //2017-09 38 | return parseDate(source, formats.get(1)); 39 | } else if (source.matches("^\\d{4}-\\d{1,2}-\\d{1,2}$")) { 40 | //2017-09-10 41 | return parseDate(source, formats.get(2)); 42 | } else if (source.matches("^\\d{4}/\\d{1,2}$")) { 43 | //2017/09 44 | return parseDate(source, formats.get(5)); 45 | } else if (source.matches("^\\d{4}/\\d{1,2}/\\d{1,2}$")) { 46 | //2017/09/10 47 | return parseDate(source, formats.get(6)); 48 | } else { 49 | throw new Exception("没有相应的日期类型匹配"); 50 | } 51 | } catch (Exception e) { 52 | e.printStackTrace(); 53 | } 54 | return null; 55 | } 56 | 57 | /** 58 | * 功能描述:格式化日期 59 | * 60 | * @param dateStr 61 | * String 字符型日期 62 | * @param format 63 | * String 格式 64 | * @return LocalDateTime 日期 65 | */ 66 | public LocalDate parseDate(String dateStr, String format) { 67 | LocalDate date=null; 68 | try { 69 | DateTimeFormatter df = DateTimeFormatter.ofPattern(format); 70 | date = LocalDate.parse(dateStr, df); 71 | } catch (Exception e1) { 72 | e1.printStackTrace(); 73 | } 74 | return date; 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/pojo/Role.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.pojo; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * role 7 | * @author 8 | */ 9 | public class Role implements Serializable { 10 | /** 11 | * 角色id 12 | */ 13 | private Integer id; 14 | 15 | /** 16 | * 角色名称 17 | */ 18 | private String name; 19 | 20 | /** 21 | * 角色描述 22 | */ 23 | private String description; 24 | 25 | private static final long serialVersionUID = 1L; 26 | 27 | public Integer getId() { 28 | return id; 29 | } 30 | 31 | public void setId(Integer id) { 32 | this.id = id; 33 | } 34 | 35 | public String getName() { 36 | return name; 37 | } 38 | 39 | public void setName(String name) { 40 | this.name = name; 41 | } 42 | 43 | public String getDescription() { 44 | return description; 45 | } 46 | 47 | public void setDescription(String description) { 48 | this.description = description; 49 | } 50 | 51 | @Override 52 | public boolean equals(Object that) { 53 | if (this == that) { 54 | return true; 55 | } 56 | if (that == null) { 57 | return false; 58 | } 59 | if (getClass() != that.getClass()) { 60 | return false; 61 | } 62 | Role other = (Role) that; 63 | return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) 64 | && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) 65 | && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription())); 66 | } 67 | 68 | @Override 69 | public int hashCode() { 70 | final int prime = 31; 71 | int result = 1; 72 | result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); 73 | result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); 74 | result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode()); 75 | return result; 76 | } 77 | 78 | @Override 79 | public String toString() { 80 | StringBuilder sb = new StringBuilder(); 81 | sb.append(getClass().getSimpleName()); 82 | sb.append(" ["); 83 | sb.append("Hash = ").append(hashCode()); 84 | sb.append(", id=").append(id); 85 | sb.append(", name=").append(name); 86 | sb.append(", description=").append(description); 87 | sb.append(", serialVersionUID=").append(serialVersionUID); 88 | sb.append("]"); 89 | return sb.toString(); 90 | } 91 | } -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/select.js: -------------------------------------------------------------------------------- 1 | /** kitadmin-v1.0.0-beta1 MIT License By http://kit.zhengjinfan.cn Author Van Zheng */ 2 | ;"use strict";var _createClass=function(){function t(t,i){for(var e=0;e','
  • ',' #xxx',"
  • ",'
  • ',' #xxx',"
  • ",'
  • ',' #xxx',"
  • ",'
  • ',' #xxx',"
  • ",""]),s=['
    ','
    ','
    ',' ","
    ","
    ","
    "];t("select",new(function(){function t(){_classCallCheck(this,t),this.config={}}return _createClass(t,[{key:"render",value:function(t){i(void 0===t?"select.kit-select-target":"select.kit-select-target[lay-filter="+t+"]").each(function(){var t=i(this),c=a.randomCode();this.id=c,this.style.display="none",console.log(t);var r=this.multiple;console.log(r),l(s.join("")).render({targetId:c},function(e){t.after(e);var a=i(".kit-select[kit-id="+c+"]"),s=a.width(),r=a[0].clientHeight;console.log(a),a.find(".kit-select-input").on("click",function(t){layui.stope(t);var e=i(this).find("input");e.focus(),e.on("input propertychange",function(t){layui.stope(t);var e=i(this).val().length;i(this).width(8*e)});var o=i(".kit-select-dropdown[kit-target="+c+"]");o.length>0?o.show():l(n.join("")).render({targetId:c,width:s,top:r+2},function(t){a.find(".kit-select-render").append(t)}),i(document).on("click",function(){i(".kit-select-dropdown[kit-target="+c+"]").hide(),i(this).off("click")})})});var o=[];e.forEach(this.children,function(t,i){o.push({value:t.value,text:t.innerText})}),i(this).on("change",function(){console.log("cc")})}),console.log("cccc")}}]),t}()))}); 3 | //# sourceMappingURL=select.js.map 4 | -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/rate.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.3.0 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var a=layui.jquery,i={config:{},index:layui.rate?layui.rate.index+1e4:0,set:function(e){var i=this;return i.config=a.extend({},i.config,e),i},on:function(e,a){return layui.onevent.call(this,n,e,a)}},l=function(){var e=this,a=e.config;return{setvalue:function(a){e.setvalue.call(e,a)},config:a}},n="rate",t="layui-rate",o="layui-icon-rate",s="layui-icon-rate-solid",u="layui-icon-rate-half",r="layui-icon-rate-solid layui-icon-rate-half",c="layui-icon-rate-solid layui-icon-rate",f="layui-icon-rate layui-icon-rate-half",v=function(e){var l=this;l.index=++i.index,l.config=a.extend({},l.config,i.config,e),l.render()};v.prototype.config={length:5,text:!1,readonly:!1,half:!1,value:0,theme:""},v.prototype.render=function(){var e=this,i=e.config,l=i.theme?'style="color: '+i.theme+';"':"";i.elem=a(i.elem),parseInt(i.value)!==i.value&&(i.half||(i.value=Math.ceil(i.value)-i.value<.5?Math.ceil(i.value):Math.floor(i.value)));for(var n='
      ",u=1;u<=i.length;u++){var r='
    • ";i.half&&parseInt(i.value)!==i.value&&u==Math.ceil(i.value)?n=n+'
    • ":n+=r}n+="
    "+(i.text?''+i.value+"星":"")+"";var c=i.elem,f=c.next("."+t);f[0]&&f.remove(),e.elemTemp=a(n),i.span=e.elemTemp.next("span"),i.setText&&i.setText(i.value),c.html(e.elemTemp),c.addClass("layui-inline"),i.readonly||e.action()},v.prototype.setvalue=function(e){var a=this,i=a.config;i.value=e,a.render()},v.prototype.action=function(){var e=this,i=e.config,l=e.elemTemp,n=l.find("i").width();l.children("li").each(function(e){var t=e+1,v=a(this);v.on("click",function(e){if(i.value=t,i.half){var o=e.pageX-a(this).offset().left;o<=n/2&&(i.value=i.value-.5)}i.text&&l.next("span").text(i.value+"星"),i.choose&&i.choose(i.value),i.setText&&i.setText(i.value)}),v.on("mousemove",function(e){if(l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+t+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half){var c=e.pageX-a(this).offset().left;c<=n/2&&v.children("i").addClass(u).removeClass(s)}}),v.on("mouseleave",function(){l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+Math.floor(i.value)+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half&&parseInt(i.value)!==i.value&&l.children("li:eq("+Math.floor(i.value)+")").children("i").addClass(u).removeClass(c)})})},v.prototype.events=function(){var e=this;e.config},i.render=function(e){var a=new v(e);return l.call(a)},e(n,i)}); -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/route.js: -------------------------------------------------------------------------------- 1 | /** kitadmin-v1.0.0-beta1 MIT License By http://kit.zhengjinfan.cn Author Van Zheng */ 2 | ;"use strict";layui.define(["utils","jquery","lodash","nprogress"],function(i){var e=layui.utils,t=e.localStorage,o=t.setItem,n=t.getItem,r=layui.jquery,a=layui.lodash,s=void 0,u=function(){this.config={name:"KITADMINROUTE",routerViewId:void 0,beforeRender:void 0},this.version="1.0.0"};u.prototype.set=function(i){return r.extend(!0,this.config,i),this},u.prototype.setRoutes=function(i){var t=this;i.name=i.name||t.config.name,t.config.name=i.name;var n={routes:[]};return r.extend(!0,n,i),a.forEach(n.routes,function(i){i.id=(new Date).getTime()+""+a.random(1e3,9999)}),o(n.name,n.routes),r(window).off("popstate").on("popstate",function(){e.isFunction(i.onChanged)?i.onChanged():t.render()}),t},u.prototype.getRoutes=function(){return n(this.config.name)},u.prototype.getRoute=function(i){var t=this.getRoutes(this.config.name);if(null!==t&&void 0!==t){i=i||location.hash;var o=layui.router(i);return e.find(t,function(i){return i.path===o.href.split("?")[0]})}},u.prototype.render=function(i,t,o){var n=this,a=n.config,u=void 0;if(NProgress.start(),t&&t.length>0)u=t;else{var d=void 0===a.routerViewId?r("router-view"):r("router-view#"+a.routerViewId);if(d.length>0){var l=e.randomCode();d.parent().append('
    '),d.remove(),u=r("#"+l),s=u}}void 0===u&&(u=s);var c=n.getRoute(i);function v(){NProgress.done(),e.isFunction(o)&&o()}return void 0!==c?("function"==typeof a.beforeRender&&(c=a.beforeRender(c)),e.tplLoader(c.component,function(i){u.html(i),v(),e.setUrlState(c.name,"#"+c.path)},function(i){var e=['
    ','
    ','
    ','
    ',i,"
    ","
    ","
    ","
    "].join("");u.html(e),v()})):(u.html(['
    ','
    ','
    ','
    ','
     
    ','
    ','
    ',' ','

    :>404 抱歉,你访问的页面不存在

    ',' 返回上一页',"
    ","
    ",'
     
    ',"
    ","
    ","
    ","
    "].join("")),NProgress.done()),n},u.prototype.params=function(){var i=layui.router();if(void 0===i.href)return null;var e=i.href,t=e.substr(e.indexOf("?")+1);if(e===t)return null;var o=t.split("&"),n={};return a.forEach(o,function(i,e){var t=i.split("="),o=t[0],r=t[1];n[o]=r}),n},i("route",new u)}); 3 | //# sourceMappingURL=route.js.map 4 | -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/service/impl/CategoryServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.service.impl; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | import org.springframework.transaction.annotation.Transactional; 8 | 9 | import com.neuedu.crm.mapper.CategoryMapper; 10 | import com.neuedu.crm.pojo.Category; 11 | import com.neuedu.crm.pojo.CategoryExample; 12 | import com.neuedu.crm.service.ICategoryService; 13 | /** 14 | * 15 | * @author huangqinwen 16 | * 17 | */ 18 | @Service 19 | @Transactional(rollbackFor = Exception.class) 20 | public class CategoryServiceImpl implements ICategoryService{ 21 | 22 | @Autowired 23 | private CategoryMapper categoryMapper; 24 | 25 | @Override 26 | public long countByCategoryExample(CategoryExample categoryExample) { 27 | return categoryMapper.countByExample(categoryExample); 28 | } 29 | 30 | @Override 31 | public boolean deleteByCategoryExample(CategoryExample categoryExample) { 32 | return categoryMapper.deleteByExample(categoryExample) > 0 ? true : false; 33 | } 34 | 35 | @Override 36 | public boolean deleteByPrimaryKey(Integer id) { 37 | return categoryMapper.deleteByPrimaryKey(id) > 0 ? true : false; 38 | } 39 | 40 | @Override 41 | public boolean insertCategory(Category category) { 42 | return categoryMapper.insert(category) > 0 ? true : false; 43 | } 44 | 45 | @Override 46 | public boolean insertSelective(Category category) { 47 | return categoryMapper.insertSelective(category) > 0 ? true : false; 48 | } 49 | 50 | @Override 51 | public List selectByCategoryExample(CategoryExample categoryExample) { 52 | return categoryMapper.selectByExample(categoryExample); 53 | } 54 | 55 | @Override 56 | public Category selectCategoryByPrimaryKey(Integer id) { 57 | return categoryMapper.selectByPrimaryKey(id); 58 | } 59 | 60 | @Override 61 | public boolean updateByCategoryExampleSelective(Category category, CategoryExample categoryExample) { 62 | return categoryMapper.updateByExampleSelective(category, categoryExample) > 0 ? true : false; 63 | } 64 | 65 | @Override 66 | public boolean updateByCategoryExample(Category category, CategoryExample categoryExample) { 67 | return categoryMapper.updateByExample(category, categoryExample) > 0 ? true : false; 68 | } 69 | 70 | @Override 71 | public boolean updateCategoryByPrimaryKeySelective(Category category) { 72 | return categoryMapper.updateByPrimaryKeySelective(category) > 0 ? true : false; 73 | } 74 | 75 | @Override 76 | public boolean updateCategoryByPrimaryKey(Category category) { 77 | return categoryMapper.updateByPrimaryKey(category) > 0 ? true : false ; 78 | } 79 | 80 | } 81 | -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/pojo/RolePermission.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.pojo; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * role_permission 7 | * @author 8 | */ 9 | public class RolePermission implements Serializable { 10 | /** 11 | * id 12 | */ 13 | private Integer id; 14 | 15 | /** 16 | * 角色id 17 | */ 18 | private Integer roleId; 19 | 20 | /** 21 | * 权限id 22 | */ 23 | private Integer permissionId; 24 | 25 | private static final long serialVersionUID = 1L; 26 | 27 | public Integer getId() { 28 | return id; 29 | } 30 | 31 | public void setId(Integer id) { 32 | this.id = id; 33 | } 34 | 35 | public Integer getRoleId() { 36 | return roleId; 37 | } 38 | 39 | public void setRoleId(Integer roleId) { 40 | this.roleId = roleId; 41 | } 42 | 43 | public Integer getPermissionId() { 44 | return permissionId; 45 | } 46 | 47 | public void setPermissionId(Integer permissionId) { 48 | this.permissionId = permissionId; 49 | } 50 | 51 | @Override 52 | public boolean equals(Object that) { 53 | if (this == that) { 54 | return true; 55 | } 56 | if (that == null) { 57 | return false; 58 | } 59 | if (getClass() != that.getClass()) { 60 | return false; 61 | } 62 | RolePermission other = (RolePermission) that; 63 | return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) 64 | && (this.getRoleId() == null ? other.getRoleId() == null : this.getRoleId().equals(other.getRoleId())) 65 | && (this.getPermissionId() == null ? other.getPermissionId() == null : this.getPermissionId().equals(other.getPermissionId())); 66 | } 67 | 68 | @Override 69 | public int hashCode() { 70 | final int prime = 31; 71 | int result = 1; 72 | result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); 73 | result = prime * result + ((getRoleId() == null) ? 0 : getRoleId().hashCode()); 74 | result = prime * result + ((getPermissionId() == null) ? 0 : getPermissionId().hashCode()); 75 | return result; 76 | } 77 | 78 | @Override 79 | public String toString() { 80 | StringBuilder sb = new StringBuilder(); 81 | sb.append(getClass().getSimpleName()); 82 | sb.append(" ["); 83 | sb.append("Hash = ").append(hashCode()); 84 | sb.append(", id=").append(id); 85 | sb.append(", roleId=").append(roleId); 86 | sb.append(", permissionId=").append(permissionId); 87 | sb.append(", serialVersionUID=").append(serialVersionUID); 88 | sb.append("]"); 89 | return sb.toString(); 90 | } 91 | } -------------------------------------------------------------------------------- /src/main/resources/mybatis/mybatis-config-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 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 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/controller/SystemController.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.controller; 2 | 3 | import java.net.InetAddress; 4 | import java.net.UnknownHostException; 5 | import java.util.HashMap; 6 | import java.util.List; 7 | import java.util.Map; 8 | 9 | import javax.servlet.ServletContext; 10 | import javax.servlet.http.HttpServletRequest; 11 | 12 | import org.springframework.beans.factory.annotation.Autowired; 13 | import org.springframework.stereotype.Controller; 14 | import org.springframework.web.bind.annotation.RequestMapping; 15 | import org.springframework.web.bind.annotation.ResponseBody; 16 | 17 | import com.neuedu.crm.pojo.CpuInfoVo; 18 | import com.neuedu.crm.pojo.ServerInfo; 19 | import com.neuedu.crm.service.IServerInfoService; 20 | import com.neuedu.crm.utils.Operation; 21 | 22 | /** 23 | * 24 | * @author HuangWanzong 25 | * @date 2018/07/26 26 | */ 27 | @Controller 28 | @RequestMapping("/system") 29 | public class SystemController { 30 | 31 | @Autowired 32 | private IServerInfoService serverService; 33 | 34 | @Operation(name="查询系统信息") 35 | @RequestMapping("info") 36 | @ResponseBody 37 | public Map getSystemInfo(HttpServletRequest request){ 38 | Map map = new HashMap(16); 39 | 40 | ServerInfo serverInfo = serverService.getServerInfo(); 41 | 42 | InetAddress address; 43 | try { 44 | address = InetAddress.getLocalHost(); 45 | serverInfo.setServerURL( 46 | request.getScheme() //请求头 47 | +"://" + address.getHostAddress() //服务器地址 48 | + ":" 49 | + request.getServerPort() //端口号 50 | + request.getContextPath()); //项目名称 51 | ServletContext application = request.getSession().getServletContext(); 52 | serverInfo.setServerType(application.getServerInfo()); 53 | 54 | 55 | } catch (UnknownHostException e) { 56 | } 57 | 58 | map.put("serverInfo", serverInfo); 59 | return map; 60 | } 61 | 62 | @Operation(name="查询cpu信息") 63 | @RequestMapping("cpu") 64 | @ResponseBody 65 | public Map getCpuInfo(String time){ 66 | Map map = new HashMap(16); 67 | 68 | List list = serverService.getCpuInfo(); 69 | 70 | map.put("time", time); 71 | map.put("cpuList", list); 72 | return map; 73 | } 74 | 75 | @Operation(name="查询cpu信息") 76 | @RequestMapping("memory") 77 | @ResponseBody 78 | public Map getMemoryInfo(String time){ 79 | Map map = null; 80 | map = serverService.getMemoryInfo(); 81 | map.put("success", true); 82 | map.put("time", time); 83 | return map; 84 | } 85 | 86 | } 87 | -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/controller/OrdersController.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.controller; 2 | 3 | import java.util.HashMap; 4 | import java.util.List; 5 | import java.util.Map; 6 | 7 | import org.apache.shiro.authz.annotation.RequiresAuthentication; 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 | import com.neuedu.crm.pojo.Customer; 14 | import com.neuedu.crm.pojo.OrderItem; 15 | import com.neuedu.crm.pojo.OrderItemExample; 16 | import com.neuedu.crm.pojo.Orders; 17 | import com.neuedu.crm.pojo.OrdersExample; 18 | import com.neuedu.crm.pojo.Pager; 19 | import com.neuedu.crm.service.IOrderItemService; 20 | import com.neuedu.crm.service.IOrdersService; 21 | import com.neuedu.crm.utils.Operation; 22 | 23 | /** 24 | * 订单控制器 25 | * @author huangqingwen 26 | * 27 | */ 28 | @Operation(name="订单控制器") 29 | @Controller 30 | @RequestMapping("/orders") 31 | public class OrdersController { 32 | 33 | @Autowired 34 | private IOrdersService ordersService; 35 | 36 | @Autowired 37 | private IOrderItemService orderItemService; 38 | 39 | /** 40 | * 获取客户的历史订单信息 41 | * @param customer 42 | * @return 43 | * @author huangqingwen 44 | */ 45 | @Operation(name="获取客户的历史订单") 46 | @RequiresAuthentication 47 | @RequestMapping("/getHistoryOrdersByCustomer") 48 | @ResponseBody 49 | public Map getHistoryOrdersByCustomer(Long page, Long limit, Customer customer){ 50 | 51 | Map maps = new HashMap(16); 52 | 53 | Pager pager = new Pager(page.intValue(), limit.intValue()); 54 | OrdersExample ordersExample = new OrdersExample(); 55 | ordersExample.createCriteria().andCustomerIdEqualTo(customer.getId()); 56 | List orders = ordersService.selectByOrdersExample(ordersExample, pager); 57 | maps.put("data", orders); 58 | maps.put("count", pager.getTotal()); 59 | maps.put("code", 0); 60 | return maps; 61 | } 62 | 63 | /** 64 | * 获取订单的订单项 65 | * @param orderItem 66 | * @return 67 | * @author huangqingwen 68 | */ 69 | @Operation(name="获取订单的订单项") 70 | @RequiresAuthentication 71 | @RequestMapping("/getOrderItem") 72 | @ResponseBody 73 | public Map getOrderItem(Long page, Long limit, Orders orders){ 74 | 75 | Map maps = new HashMap(16); 76 | 77 | Pager pager = new Pager(page.intValue(), limit.intValue()); 78 | 79 | OrderItemExample orderItemExample = new OrderItemExample(); 80 | orderItemExample.createCriteria().andOrdersIdEqualTo(orders.getId()); 81 | List orderItems = orderItemService.selectByOrderItemExample(orderItemExample, pager); 82 | 83 | maps.put("code", 0); 84 | maps.put("data", orderItems); 85 | maps.put("count", pager.getTotal()); 86 | return maps; 87 | } 88 | 89 | } 90 | -------------------------------------------------------------------------------- /src/main/resources/spring/applicationContext.xml: -------------------------------------------------------------------------------- 1 | 2 | 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 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/pojo/Report.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.pojo; 2 | 3 | import java.util.Date; 4 | 5 | public class Report { 6 | 7 | /** 8 | * 日期格式 9 | */ 10 | public static String TIME_YEAR = "%Y"; 11 | public static String TIME_YEAR_MONTH = "%Y-%m"; 12 | public static String TIME_YEAR_MONTH_DAY = "%Y-%m-%d"; 13 | public static String TIME_MONTH_DAY = "%m-%d"; 14 | 15 | 16 | 17 | public static String CATEGORY_LEVEL = "level"; 18 | public static String CATEGORY_TYPE = "type"; 19 | public static String CATEGORY_STATUS = "status"; 20 | public static String CATEGORY_CREDIT = "credit"; 21 | public static String CATEGORY_SOURCE = "source"; 22 | public static String CATEGORY_MATURITY = "maturity"; 23 | 24 | public static String SERVICE_STATUS = "status"; 25 | public static String SERVICE_TYPE = "type"; 26 | 27 | 28 | private String resultDateFormat = Report.TIME_YEAR_MONTH_DAY; 29 | private String timeFormat = Report.TIME_YEAR_MONTH_DAY; 30 | private Date startTime; 31 | private Date endTime; 32 | private String category = Report.CATEGORY_STATUS; 33 | private String service; 34 | private Integer userId; 35 | private Integer day; 36 | private Integer dictionaryTypeId; 37 | 38 | public String getResultDateFormat() { 39 | return resultDateFormat; 40 | } 41 | public void setResultDateFormat(String resultDateFormat) { 42 | this.resultDateFormat = resultDateFormat; 43 | } 44 | public String getTimeFormat() { 45 | return timeFormat; 46 | } 47 | public void setTimeFormat(String timeFormat) { 48 | this.timeFormat = timeFormat; 49 | } 50 | public Date getStartTime() { 51 | return startTime; 52 | } 53 | public void setStartTime(Date startTime) { 54 | this.startTime = startTime; 55 | } 56 | public Date getEndTime() { 57 | return endTime; 58 | } 59 | public void setEndTime(Date endTime) { 60 | this.endTime = endTime; 61 | } 62 | 63 | public String getCategory() { 64 | return category; 65 | } 66 | public void setCategory(String category) { 67 | this.category = category; 68 | } 69 | public Integer getUserId() { 70 | return userId; 71 | } 72 | public void setUserId(Integer userId) { 73 | this.userId = userId; 74 | } 75 | public String getService() { 76 | return service; 77 | } 78 | public void setService(String service) { 79 | this.service = service; 80 | } 81 | public Integer getDay() { 82 | return day; 83 | } 84 | public void setDay(Integer day) { 85 | this.day = day; 86 | } 87 | public Integer getDictionaryTypeId() { 88 | return dictionaryTypeId; 89 | } 90 | public void setDictionaryTypeId(Integer dictionaryTypeId) { 91 | this.dictionaryTypeId = dictionaryTypeId; 92 | } 93 | 94 | 95 | 96 | 97 | } 98 | -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/tree.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.3.0 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var o=layui.$,a=layui.hint(),i="layui-tree-enter",r=function(e){this.options=e},t={arrow:["",""],checkbox:["",""],radio:["",""],branch:["",""],leaf:""};r.prototype.init=function(e){var o=this;e.addClass("layui-box layui-tree"),o.options.skin&&e.addClass("layui-tree-skin-"+o.options.skin),o.tree(e),o.on(e)},r.prototype.tree=function(e,a){var i=this,r=i.options,n=a||r.nodes;layui.each(n,function(a,n){var l=n.children&&n.children.length>0,c=o('
      '),s=o(["
    • ",function(){return l?''+(n.spread?t.arrow[1]:t.arrow[0])+"":""}(),function(){return r.check?''+("checkbox"===r.check?t.checkbox[0]:"radio"===r.check?t.radio[0]:"")+"":""}(),function(){return'"+(''+(l?n.spread?t.branch[1]:t.branch[0]:t.leaf)+"")+(""+(n.name||"未命名")+"")}(),"
    • "].join(""));l&&(s.append(c),i.tree(c,n.children)),e.append(s),"function"==typeof r.click&&i.click(s,n),i.spread(s,n),r.drag&&i.drag(s,n)})},r.prototype.click=function(e,o){var a=this,i=a.options;e.children("a").on("click",function(e){layui.stope(e),i.click(o)})},r.prototype.spread=function(e,o){var a=this,i=(a.options,e.children(".layui-tree-spread")),r=e.children("ul"),n=e.children("a"),l=function(){e.data("spread")?(e.data("spread",null),r.removeClass("layui-show"),i.html(t.arrow[0]),n.find(".layui-icon").html(t.branch[0])):(e.data("spread",!0),r.addClass("layui-show"),i.html(t.arrow[1]),n.find(".layui-icon").html(t.branch[1]))};r[0]&&(i.on("click",l),n.on("dblclick",l))},r.prototype.on=function(e){var a=this,r=a.options,t="layui-tree-drag";e.find("i").on("selectstart",function(e){return!1}),r.drag&&o(document).on("mousemove",function(e){var i=a.move;if(i.from){var r=(i.to,o('
      '));e.preventDefault(),o("."+t)[0]||o("body").append(r);var n=o("."+t)[0]?o("."+t):r;n.addClass("layui-show").html(i.from.elem.children("a").html()),n.css({left:e.pageX+10,top:e.pageY+10})}}).on("mouseup",function(){var e=a.move;e.from&&(e.from.elem.children("a").removeClass(i),e.to&&e.to.elem.children("a").removeClass(i),a.move={},o("."+t).remove())})},r.prototype.move={},r.prototype.drag=function(e,a){var r=this,t=(r.options,e.children("a")),n=function(){var t=o(this),n=r.move;n.from&&(n.to={item:a,elem:e},t.addClass(i))};t.on("mousedown",function(){var o=r.move;o.from={item:a,elem:e}}),t.on("mouseenter",n).on("mousemove",n).on("mouseleave",function(){var e=o(this),a=r.move;a.from&&(delete a.to,e.removeClass(i))})},e("tree",function(e){var i=new r(e=e||{}),t=o(e.elem);return t[0]?void i.init(t):a.error("layui.tree 没有找到"+e.elem+"元素")})}); -------------------------------------------------------------------------------- /src/main/webapp/views/dictionary/edititem.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | 字典子项 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
      16 | 17 | 18 | 19 | 20 |
      21 | 22 |
      23 | 24 |
      25 | 26 |
      27 |
      28 | 29 |
      30 | 34 |
      35 | 36 |
      37 |
      38 | 39 |
      40 |
      41 | 42 | 43 | 44 | 45 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/pojo/DictionaryType.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.pojo; 2 | 3 | import java.io.Serializable; 4 | import java.util.List; 5 | 6 | /** 7 | * dictionary_type 8 | * @author 9 | */ 10 | public class DictionaryType implements Serializable { 11 | private Integer id; 12 | 13 | /** 14 | * 类别名称 15 | */ 16 | private String name; 17 | 18 | /** 19 | * 对于本数据字典的数据字典子项列表 20 | */ 21 | private List dictionaryItems; 22 | 23 | private static final long serialVersionUID = 1L; 24 | 25 | public Integer getId() { 26 | return id; 27 | } 28 | 29 | public void setId(Integer id) { 30 | this.id = id; 31 | } 32 | 33 | public String getName() { 34 | return name; 35 | } 36 | 37 | public void setName(String name) { 38 | this.name = name; 39 | } 40 | 41 | public List getDictionaryItems() { 42 | return dictionaryItems; 43 | } 44 | 45 | public void setDictionaryItems(List dictionaryItems) { 46 | this.dictionaryItems = dictionaryItems; 47 | } 48 | 49 | @Override 50 | public int hashCode() { 51 | final int prime = 31; 52 | int result = 1; 53 | result = prime * result + ((dictionaryItems == null) ? 0 : dictionaryItems.hashCode()); 54 | result = prime * result + ((id == null) ? 0 : id.hashCode()); 55 | result = prime * result + ((name == null) ? 0 : name.hashCode()); 56 | return result; 57 | } 58 | 59 | @Override 60 | public boolean equals(Object obj) { 61 | if (this == obj) 62 | { 63 | return true; 64 | } 65 | if (obj == null) 66 | { 67 | return false; 68 | } 69 | if (getClass() != obj.getClass()) 70 | { 71 | return false; 72 | } 73 | DictionaryType other = (DictionaryType) obj; 74 | if (dictionaryItems == null) { 75 | if (other.dictionaryItems != null) 76 | { 77 | return false; 78 | } 79 | } else if (!dictionaryItems.equals(other.dictionaryItems)) 80 | { 81 | return false; 82 | } 83 | if (id == null) { 84 | if (other.id != null) 85 | { 86 | return false; 87 | } 88 | } else if (!id.equals(other.id)) 89 | { 90 | return false; 91 | } 92 | if (name == null) { 93 | if (other.name != null) 94 | { 95 | return false; 96 | } 97 | } else if (!name.equals(other.name)) 98 | { 99 | return false; 100 | } 101 | return true; 102 | } 103 | 104 | @Override 105 | public String toString() { 106 | return "DictionaryType [id=" + id + ", name=" + name + ", dictionaryItems=" + dictionaryItems + "]"; 107 | } 108 | 109 | 110 | 111 | 112 | 113 | } -------------------------------------------------------------------------------- /src/main/webapp/views/customer/followupInfo.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | 跟踪记录 8 | 9 | 10 | 11 | 20 | 21 | 22 |
      23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 |
      39 |
      40 | 41 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /src/main/webapp/views/customer/customerOrders.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 客户历史订单详情页 11 | 12 | 13 | 14 |
      15 | 16 | 19 | 20 | 21 | 22 | 101 | -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/service/IUserService.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.service; 2 | 3 | import java.util.List; 4 | 5 | import com.neuedu.crm.pojo.User; 6 | import com.neuedu.crm.pojo.UserExample; 7 | /** 8 | * 9 | * @author WangHaoyu 10 | * @date 2018/07/24 11 | */ 12 | public interface IUserService { 13 | 14 | /** 15 | * 16 | * 描述:根据用户名查找用户 17 | * @author wanghaoyu 18 | * @version 1.0 19 | * @param account 20 | * @return 21 | * @exception Nothing 22 | * @since 1.8 23 | * 24 | */ 25 | public User findByAccount(String account); 26 | 27 | /** 28 | * 29 | * 描述:添加用户 30 | * @author wanghaoyu 31 | * @version 1.0 32 | * @param user 33 | * @return boolean 34 | * @exception Nothing 35 | * @since 1.8 36 | * 37 | */ 38 | public boolean save(User user); 39 | 40 | /** 41 | * 42 | * 描述:根据id删除用户 43 | * @author wanghaoyu 44 | * @version 1.0 45 | * @param id 46 | * @return 47 | * @exception Nothing 48 | * @since 1.8 49 | * 50 | */ 51 | public boolean deleteById(Integer id); 52 | 53 | /** 54 | * 55 | * 描述:根据id查找用户 56 | * @author wanghaoyu 57 | * @version 1.0 58 | * @param id 59 | * @return 60 | * @exception Nothing 61 | * @since 1.8 62 | * 63 | */ 64 | public User findById(Integer id); 65 | 66 | /** 67 | * 68 | * 描述:根据模板查找用户 69 | * @author wanghaoyu 70 | * @version 1.0 71 | * @param userExample 用户查询模板 72 | * @return 73 | * @exception Nothing 74 | * @since 1.8 75 | * 76 | */ 77 | public List findByExample(UserExample userExample); 78 | 79 | /** 80 | * 81 | * 描述:根据模板统计数量 82 | * @author wanghaoyu 83 | * @version 1.0 84 | * @param userExample 85 | * @return 86 | * @exception Nothing 87 | * @since 1.8 88 | * 89 | */ 90 | public long countByExample(UserExample userExample); 91 | /** 92 | * 93 | * 描述:根据id修改用户信息 94 | * @author wanghaoyu 95 | * @version 1.0 96 | * @param user 97 | * @return 98 | * @exception Nothing 99 | * @since 1.8 100 | * 101 | */ 102 | public boolean edit(User user); 103 | 104 | /** 105 | * 106 | * 描述:对用户的密码进行加密 107 | * @author wanghaoyu 108 | * @version 1.0 109 | * @param user 110 | * @return User 111 | * @exception Nothing 112 | * @since 1.8 113 | * 114 | */ 115 | public User encryptPassword(User user); 116 | 117 | /** 118 | * 119 | * 描述:修改用户密码 120 | * @author WangHaoyu 121 | * @date 2018/07/24 122 | * @version 1.0 123 | * @param user 124 | * @param oldPassword 125 | * @return boolean 126 | * @since 1.8 127 | * 128 | */ 129 | public boolean editPasswd(User user,String oldPassword); 130 | 131 | /** 132 | * 133 | * 描述:根据邮箱查找用户 134 | * @author wanghaoyu 135 | * @version 1.0 136 | * @param email 137 | * @return User 138 | * @exception Nothing 139 | * @since 1.8 140 | * 141 | */ 142 | public User findByEmail(String email); 143 | 144 | } 145 | -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/mapper/ReportMapper.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.mapper; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | import com.neuedu.crm.pojo.Report; 9 | 10 | 11 | /** 12 | * 报表模块 13 | * @author admin 14 | * 15 | */ 16 | public interface ReportMapper{ 17 | 18 | /** 19 | * 20 | * 描述:统计公司新增的客户量 近n天的记录 21 | * @author huangqingwen 22 | * @version 1.0 23 | * @param n 天数 24 | * @param 25 | * @return 26 | * @exception Nothing 27 | * @since 1.8 28 | * 29 | */ 30 | public List> countCustomerIncrease(@Param("n")int n); 31 | 32 | 33 | /** 34 | * 35 | * 描述:统计公司损失的客户量 近n天的记录 36 | * @author huangqingwen 37 | * @version 1.0 38 | * @param n 天数 39 | * @param 40 | * @return 41 | * @exception Nothing 42 | * @since 1.8 43 | * 44 | */ 45 | public List> countCustomerDecrease(@Param("n")int n); 46 | /** 47 | * 描述:查询某段时间内客户的新增客户 48 | * @author HuangWanzong 49 | * @date 2018/07/24 50 | * @version 1.0 51 | * @param report 52 | * @return List> 53 | * @since 1.8 54 | * 55 | */ 56 | public List> countCustomerByDate(Report report); 57 | /** 58 | * 描述:查询某段时间内客户的新增跟进记录 59 | * @author HuangWanzong 60 | * @date 2018/07/24 61 | * @version 1.0 62 | * @param report 63 | * @return List> 64 | * @since 1.8 65 | * 66 | */ 67 | public List> countFollowupByDate(Report report); 68 | /** 69 | * 描述:查询某段时间内客户的新增客户,按照某个客户信息某个字段分类 70 | * @author HuangWanzong 71 | * @date 2018/07/24 72 | * @version 1.0 73 | * @param report 74 | * @return List> 75 | * @since 1.8 76 | * 77 | */ 78 | public List> countCustomerByCategory(Report report); 79 | 80 | /** 81 | * 82 | * @Title: countManagerCustomer 83 | * @Description: TODO(统计某时段内客户经理客户量的排名) 84 | * @param @param report 85 | * @param @return 参数 86 | * @return List> 返回类型 87 | * @throws 88 | * @author huangqingwen 89 | */ 90 | public List> countManagerCustomerRank(Report report); 91 | 92 | /** 93 | * 94 | * @Title: countCustomerOrderPrice 95 | * @Description: TODO(统计某时段内客户与公司成交的金额数排名) 96 | * @param @param report 97 | * @param @return 参数 98 | * @return List> 返回类型 99 | * @throws 100 | * @author huangqingwen 101 | */ 102 | public List> customerOrderPriceRank(Report report); 103 | 104 | /** 105 | * 106 | * 描述:统计某个时段内某个客户经理服务的情况 107 | * @author wanghaoyu 108 | * @version 1.0 109 | * @param report 110 | * @return List> 111 | * @exception Nothing 112 | * @since 1.8 113 | * 114 | */ 115 | public List> countManagerSerivce(Report report); 116 | 117 | /** 118 | * 119 | * 描述:统计公司的客户来源情况 120 | * @author huangqingwen 121 | * @version 1.0 122 | * @param report 123 | * @return List> 124 | * @exception Nothing 125 | * @since 1.8 126 | * 127 | */ 128 | public List> countCustomerSource(); 129 | } 130 | -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/service/IRoleService.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.service; 2 | 3 | import java.util.List; 4 | 5 | import com.neuedu.crm.pojo.Role; 6 | import com.neuedu.crm.pojo.RoleExample; 7 | /** 8 | * 9 | * @author MaLizhi 10 | * @date 2018/07/24 11 | */ 12 | public interface IRoleService { 13 | 14 | /** 15 | * 根据example统计role条数 16 | * @author malizhi 17 | * @param roleExample 18 | * @return long 19 | * @version 1.0 20 | * @exception Nothing 21 | */ 22 | public long countByRoleExample(RoleExample roleExample); 23 | 24 | /** 25 | * 根据example删除role 26 | * @author malizhi 27 | * @param roleExample 28 | * @return boolean 29 | * @version 1.0 30 | * @exception Nothing 31 | */ 32 | public boolean deleteByRoleExample(RoleExample roleExample); 33 | 34 | /** 35 | * 根据主键删除role 36 | * @author malizhi 37 | * @param id 38 | * @return boolean 39 | * @version 1.0 40 | * @exception Nothing 41 | */ 42 | public boolean deleteRoleByPrimaryKey(Integer id); 43 | 44 | /** 45 | * 插入一条role,字段为空,插入相应的字段也为空 46 | * @author malizhi 47 | * @param role 48 | * @return boolean 49 | * @version 1.0 50 | * @exception Nothing 51 | */ 52 | public boolean insertRole(Role role); 53 | 54 | /** 55 | * 插入一条role,参数role中,如果字段为null,代表不插入此字段 56 | * @author malizhi 57 | * @param role 58 | * @return boolean 59 | * @version 1.0 60 | * @exception Nothing 61 | */ 62 | public boolean insertRoleSelective(Role role); 63 | 64 | /** 65 | * 根据example查找role 66 | * @author malizhi 67 | * @param roleExample 68 | * @return List 69 | * @version 1.0 70 | * @exception Nothing 71 | */ 72 | public List selectByRoleExample(RoleExample roleExample); 73 | 74 | /** 75 | * 根据主键id查找role 76 | * @author malizhi 77 | * @param id 78 | * @return Role 79 | * @version 1.0 80 | * @exception Nothing 81 | */ 82 | public Role selectRoleByPrimaryKey(Integer id); 83 | 84 | /** 85 | * 更新role,参数role中,如果某些字段为空,代表不更新此字段,example代表where条件 86 | * @author malizhi 87 | * @param role 88 | * @param roleExample 89 | * @return boolean 90 | * @version 1.0 91 | * @exception Nothing 92 | */ 93 | public boolean updateByRoleExampleSelective(Role role,RoleExample roleExample); 94 | 95 | /** 96 | * 更新role,参数role中,如果某些字段为空,代表相应的字段也更新为空,example代表where条件 97 | * @author malizhi 98 | * @param role 99 | * @param roleExample 100 | * @return boolean 101 | * @version 1.0 102 | * @exception Nothing 103 | */ 104 | public boolean updateByRoleExample(Role role, RoleExample roleExample); 105 | 106 | /** 107 | * 更新role,传入的参数中,如果某些字段为空,代表不更新此字段 108 | * @author malizhi 109 | * @param role 110 | * @return boolean 111 | * @version 1.0 112 | * @exception Nothing 113 | */ 114 | public boolean updateRoleByPrimaryKeySelective(Role role); 115 | 116 | /** 117 | * 更新role,传入的参数中,如果某些字段为空,代表相应字段也更新为空 118 | * @author malizhi 119 | * @param role 120 | * @return boolean 121 | * @version 1.0 122 | * @exception Nothing 123 | */ 124 | public boolean updateRoleByPrimaryKey(Role role); 125 | 126 | } 127 | -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/sidebar.js: -------------------------------------------------------------------------------- 1 | /** kitadmin-v1.0.0-beta1 MIT License By http://kit.zhengjinfan.cn Author Van Zheng */ 2 | ;"use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(i){return typeof i}:function(i){return i&&"function"==typeof Symbol&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i};function _defineProperty(i,e,t){return e in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}layui.define(["layer","laytpl","utils","lodash"],function(i){var e=layui.jquery,t=(layui.layer,layui.laytpl),n=layui.lodash,a=layui.utils,d=e("body"),o=function(){this.version="1.0.0"},r=['
      ','
      ','
      ','
      ',' {{d.title}}','
      ',' ',"
      ",'
      ',' ',"
      ","
      ",'
      '," {{d.content}}","
      ","
      ","
      ","
      "].join(""),l=['
      ',"
      ",' ',"
      ","
      "];o.prototype.defaults={elem:void 0,content:"",shade:!1,shadeClose:!0,title:"未命名",direction:"right",dynamicRender:!1,url:void 0,width:"280px",done:void 0},o.prototype.render=function(i){var t=this,d=n.cloneDeep(t.defaults);e.extend(!0,d,i);var o=d;if(!a.oneOf(o.direction,["left","right"]))return a.error('Sidebar error: [direction] property error,Only "left" or "right" .'),t;var r={title:o.title,id:a.randomCode(),content:o.content,direction:o.direction,width:o.width};if(o.dynamicRender){var l=o.url+"?version="+(new Date).getTime();a.tplLoader(l,function(i){r.content=i,c.renderHTML(o,r)},function(i){r.content=i,c.renderHTML(o,r)})}else c.renderHTML(o,r);return t};var c={renderHTML:function(i,n){var o=e(i.elem);void 0===o.attr("kit-sidebar-target")&&t(r).render(n,function(t){i.shade&&(t=t+'
      '),d.append(t),"function"==typeof i.done&&i.done();var r=e('div[kit-sidebar="'+n.id+'"]'),l=e('div[kit-shade="'+n.id+'"]');o.attr("data-toggle","off"),o.attr("kit-sidebar-target","true"),o.on("click",function(){switch(e(this).data("toggle")){case"on":r.animate(_defineProperty({},i.direction,"-"+i.width)),l.hide(),e(this).data("toggle","off");break;case"off":r.animate(_defineProperty({},i.direction,"0px")),l.show(),e(this).data("toggle","on")}}),"object"===_typeof(i.elem)&&o.click(),i.shadeClose&&l.on("click",function(){o.click()}),r.find(".kit-sidebar-reload").on("click",function(){var t=this;if(i.dynamicRender){c.showLoading(r);var n=i.url+"?version="+(new Date).getTime();a.tplLoader(n,function(i){e(t).parent().next(".layui-card-body").html(i),c.hideLoading(r)},function(i){e(t).parent().next(".layui-card-body").html("Loading error:"+i),c.hideLoading(r)})}}),r.find(".kit-sidebar-close").on("click",function(){o.click()})})},showLoading:function(i){i.append(l.join(""))},hideLoading:function(i){setTimeout(function(){var e=i.find(".kit-sidebar-loading");e.addClass("layui-anim-fadeout"),setTimeout(function(){e.remove()},300)},500)}};i("sidebar",new o)}); 3 | //# sourceMappingURL=sidebar.js.map 4 | -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/service/impl/OrdersServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.service.impl; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | import org.springframework.transaction.annotation.Transactional; 8 | 9 | import com.neuedu.crm.mapper.OrdersMapper; 10 | import com.neuedu.crm.pojo.Orders; 11 | import com.neuedu.crm.pojo.OrdersExample; 12 | import com.neuedu.crm.pojo.Pager; 13 | import com.neuedu.crm.service.IOrdersService; 14 | /** 15 | * 16 | * @author 17 | * @date 2018/07/24 18 | */ 19 | @Service 20 | @Transactional(rollbackFor=Exception.class) 21 | public class OrdersServiceImpl implements IOrdersService { 22 | 23 | @Autowired 24 | private OrdersMapper ordersMapper; 25 | 26 | @Override 27 | public long countByOrdersExample(OrdersExample ordersExample) { 28 | 29 | return ordersMapper.countByExample(ordersExample); 30 | } 31 | 32 | @Override 33 | public boolean deleteByOrdersExample(OrdersExample ordersExample) { 34 | 35 | return ordersMapper.deleteByExample(ordersExample) > 0 ? true : false; 36 | } 37 | 38 | @Override 39 | public boolean deleteByPrimaryKey(Integer id) { 40 | 41 | return ordersMapper.deleteByPrimaryKey(id)>0?true:false; 42 | } 43 | 44 | @Override 45 | public boolean insertOrder(Orders orders) { 46 | 47 | return ordersMapper.insert(orders)>0?true:false; 48 | } 49 | 50 | @Override 51 | public boolean insertSelective(Orders orders) { 52 | 53 | return ordersMapper.insertSelective(orders)>0?true:false; 54 | } 55 | 56 | @Override 57 | public List selectByOrdersExample(OrdersExample ordersExample) { 58 | 59 | return ordersMapper.selectByExample(ordersExample); 60 | } 61 | 62 | @Override 63 | public Orders selectOrderByPrimaryKey(Integer id) { 64 | 65 | return ordersMapper.selectByPrimaryKey(id); 66 | } 67 | 68 | @Override 69 | public boolean updateByOrdersExample(Orders orders, OrdersExample ordersExample) { 70 | 71 | return ordersMapper.updateByExample(orders, ordersExample) > 0 ? true : false; 72 | } 73 | 74 | @Override 75 | public boolean updateByOrdersExampleSelective(Orders orders, OrdersExample ordersExample) { 76 | 77 | return ordersMapper.updateByExampleSelective(orders, ordersExample) > 0 ? true : false; 78 | } 79 | 80 | @Override 81 | public boolean updateOrderByPrimaryKeySelective(Orders orders) { 82 | 83 | return ordersMapper.updateByPrimaryKeySelective(orders) > 0 ? true : false; 84 | } 85 | 86 | @Override 87 | public boolean updateOrderByPrimaryKey(Orders orders) { 88 | 89 | return ordersMapper.updateByPrimaryKey(orders) > 0 ? true : false; 90 | } 91 | 92 | @Override 93 | public List selectOrdersGroupByCustomerId() { 94 | return ordersMapper.selectOrdersGroupByCustomerId(); 95 | } 96 | 97 | /** 98 | * 分页查询客户历史订单信息 99 | * @author huangqingwen 100 | */ 101 | @Override 102 | public List selectByOrdersExample(OrdersExample ordersExample, Pager pager) { 103 | 104 | Long count = ordersMapper.countByExample(ordersExample); 105 | 106 | pager.setTotal(count.intValue()); 107 | 108 | ordersExample.setLimit(pager.getPageSize()); 109 | ordersExample.setOffset(new Long(pager.getOffset())); 110 | List orders = ordersMapper.selectByExample(ordersExample); 111 | 112 | return orders; 113 | } 114 | 115 | } 116 | -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/service/impl/LoggingEventServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.service.impl; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | import org.springframework.transaction.annotation.Transactional; 8 | 9 | import com.neuedu.crm.mapper.LoggingEventMapper; 10 | import com.neuedu.crm.pojo.LoggingEvent; 11 | import com.neuedu.crm.pojo.LoggingEventExample; 12 | import com.neuedu.crm.pojo.Pager; 13 | import com.neuedu.crm.service.ILoggingEventService; 14 | /** 15 | * 16 | * @author huangqinwen 17 | * 18 | */ 19 | 20 | @Service 21 | @Transactional(rollbackFor=Exception.class) 22 | public class LoggingEventServiceImpl implements ILoggingEventService{ 23 | 24 | @Autowired 25 | private LoggingEventMapper logMapper; 26 | 27 | @Override 28 | public long countByLoggingEventExample(LoggingEventExample loggingEventExample) { 29 | 30 | return logMapper.countByExample(loggingEventExample); 31 | } 32 | 33 | @Override 34 | public boolean deleteByLoggingEventExample(LoggingEventExample loggingEventExample) { 35 | 36 | return logMapper.deleteByExample(loggingEventExample) > 0 ? true : false; 37 | } 38 | 39 | @Override 40 | public boolean deleteByPrimaryKey(Long id) { 41 | 42 | return logMapper.deleteByPrimaryKey(id) > 0 ? true : false; 43 | } 44 | 45 | @Override 46 | public boolean insertLoggingEvent(LoggingEvent loggingEvent) { 47 | 48 | return logMapper.insert(loggingEvent) > 0 ? true : false; 49 | } 50 | 51 | @Override 52 | public boolean insertSelective(LoggingEvent loggingEvent) { 53 | 54 | return logMapper.insertSelective(loggingEvent) > 0 ? true : false; 55 | } 56 | 57 | @Override 58 | public List selectByLoggingEventExample(LoggingEventExample loggingEventExample, Pager pager) { 59 | //设置一页多少条数据 60 | loggingEventExample.setLimit(pager.getPageSize()); 61 | //按时间降序排列 62 | loggingEventExample.setOrderByClause("timestmp desc"); 63 | loggingEventExample.setOffset(new Long(pager.getOffset())); 64 | return logMapper.selectByExampleWithBLOBs(loggingEventExample); 65 | } 66 | 67 | @Override 68 | public LoggingEvent selectLoggingEventByPrimaryKey(Long id) { 69 | 70 | return logMapper.selectByPrimaryKey(id); 71 | } 72 | 73 | @Override 74 | public boolean updateByLoggingEventExampleSelective(LoggingEvent loggingEvent, 75 | LoggingEventExample loggingEventExample) { 76 | 77 | return logMapper.updateByExampleSelective(loggingEvent, loggingEventExample) > 0 ? true : false; 78 | } 79 | 80 | @Override 81 | public boolean updateByLoggingEventExample(LoggingEvent loggingEvent, LoggingEventExample loggingEventExample) { 82 | 83 | return logMapper.updateByExample(loggingEvent, loggingEventExample) > 0 ? true : false; 84 | } 85 | 86 | @Override 87 | public boolean updateLoggingEventByPrimaryKeySelective(LoggingEvent loggingEvent) { 88 | 89 | return logMapper.updateByPrimaryKeySelective(loggingEvent) >0 ? true : false; 90 | } 91 | 92 | @Override 93 | public boolean updateLoggingEventByPrimaryKey(LoggingEvent loggingEvent) { 94 | 95 | return logMapper.updateByPrimaryKey(loggingEvent) > 0 ? true : false; 96 | } 97 | 98 | @Override 99 | public boolean insertLog(LoggingEvent loggingEvent) { 100 | return logMapper.insertLog(loggingEvent) > 0 ? true : false; 101 | } 102 | 103 | 104 | 105 | } 106 | -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/utils/RedisUtil.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.utils; 2 | 3 | import java.io.Serializable; 4 | import java.util.Set; 5 | import java.util.concurrent.TimeUnit; 6 | 7 | import org.slf4j.Logger; 8 | import org.slf4j.LoggerFactory; 9 | import org.springframework.data.redis.core.RedisTemplate; 10 | import org.springframework.data.redis.core.ValueOperations; 11 | 12 | /** 13 | * Redis工具类 14 | * :用于缓存数据 15 | * @author wanghaoyu 16 | * 17 | */ 18 | public class RedisUtil { 19 | private Logger logger = LoggerFactory.getLogger(RedisUtil.class); 20 | private RedisTemplate redisTemplate; 21 | 22 | public void setRedisTemplate(RedisTemplate redisTemplate) { 23 | this.redisTemplate = redisTemplate; 24 | } 25 | 26 | /** 27 | * 批量删除对应的value 28 | * 29 | * @param keys 30 | */ 31 | public void remove(final String... keys) { 32 | for (String key : keys) { 33 | remove(key); 34 | } 35 | } 36 | 37 | /** 38 | * 批量删除key 39 | * 40 | * @param pattern 41 | */ 42 | public void removePattern(final String pattern) { 43 | Set keys = redisTemplate.keys(pattern); 44 | if (keys.size() > 0) { 45 | redisTemplate.delete(keys); 46 | } 47 | } 48 | 49 | /** 50 | * 删除对应的value 51 | * 52 | * @param key 53 | */ 54 | public void remove(final String key) { 55 | logger.info("要移除的key为:" + key); 56 | if (exists(key)) { 57 | redisTemplate.delete(key); 58 | } 59 | } 60 | 61 | /** 62 | * 判断缓存中是否有对应的value 63 | * 64 | * @param key 65 | * @return 66 | */ 67 | public boolean exists(final String key) { 68 | logger.info("要验证是否存在的key为:" + key); 69 | return redisTemplate.hasKey(key); 70 | } 71 | 72 | /** 73 | * 读取缓存 74 | * 75 | * @param key 76 | * @return 77 | */ 78 | public Object get(final String key) { 79 | Object result = null; 80 | ValueOperations operations = redisTemplate 81 | .opsForValue(); 82 | result = operations.get(key); 83 | return result; 84 | } 85 | 86 | /** 87 | * 写入缓存 88 | * 89 | * @param key 90 | * @param value 91 | * @return 92 | */ 93 | public boolean set(final String key, Object value) { 94 | boolean result = false; 95 | try { 96 | ValueOperations operations = redisTemplate 97 | .opsForValue(); 98 | operations.set(key, value); 99 | result = true; 100 | } catch (Exception e) { 101 | logger.error("系统异常",e); 102 | } 103 | return result; 104 | } 105 | 106 | /** 107 | * 写入缓存 108 | * 109 | * @param key 110 | * @param value 111 | * @return 112 | */ 113 | public boolean set(final String key, Object value, Long expireTime) { 114 | boolean result = false; 115 | try { 116 | ValueOperations operations = redisTemplate 117 | .opsForValue(); 118 | operations.set(key, value); 119 | redisTemplate.expire(key, expireTime, TimeUnit.SECONDS); 120 | result = true; 121 | } catch (Exception e) { 122 | logger.error("系统异常",e); 123 | } 124 | return result; 125 | } 126 | 127 | } 128 | -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/controller/FileController.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.controller; 2 | 3 | import java.io.File; 4 | import java.io.IOException; 5 | import java.util.HashMap; 6 | import java.util.Map; 7 | import java.util.UUID; 8 | 9 | import javax.servlet.http.HttpServletRequest; 10 | 11 | import org.slf4j.Logger; 12 | import org.slf4j.LoggerFactory; 13 | import org.springframework.stereotype.Controller; 14 | import org.springframework.web.bind.annotation.RequestMapping; 15 | import org.springframework.web.bind.annotation.ResponseBody; 16 | import org.springframework.web.multipart.MultipartFile; 17 | 18 | import com.neuedu.crm.utils.Operation; 19 | 20 | /** 21 | * 22 | * @author huangwanzong 23 | * @date 2018/07/12 24 | */ 25 | 26 | @Operation(name="文件管理接口") 27 | @Controller 28 | @RequestMapping("file") 29 | public class FileController { 30 | 31 | private Logger logger = LoggerFactory.getLogger(FileController.class); 32 | 33 | 34 | /** 35 | * 描述:文件上传功能 36 | * 返回参数说明: 37 | * status : 标记操作是否成功,true 成功, false 失败 38 | * code : 标记操作代码 0 成功 -1 file不存在 -2 -3 保存文件时读写异常 39 | * msg : 返回的信息 40 | * filename : 当文件上传完成后,服务器保存的文件名 41 | * 42 | * @author huangwanzong 43 | * @version 1.0 44 | * @param request 45 | * @param file 要上传的文件 46 | * @return Map 47 | * @exception Nothing 48 | * @since 1.8 49 | * 50 | */ 51 | @Operation(name="上传客户相关文件") 52 | @RequestMapping("upload") 53 | @ResponseBody 54 | public Map fileUpload(HttpServletRequest request,MultipartFile file){ 55 | Map map = new HashMap(16); 56 | 57 | if(file == null || file.isEmpty()) { 58 | map.put("status", false); 59 | map.put("code", -1); 60 | map.put("msg","上传文件为空"); 61 | return map; 62 | } 63 | 64 | 65 | //上传文件路径 66 | String path = request.getServletContext().getRealPath("/upload/"); 67 | //获取文件名 68 | String filename = file.getOriginalFilename(); 69 | //获取文件后缀名,即获取文件类型 70 | String fileExt = filename.substring(filename.lastIndexOf(".")); 71 | 72 | //随机生成一个uuid当做新的文件名 73 | String uuid = UUID.randomUUID().toString(); 74 | String newFile = uuid + fileExt; 75 | File filepath = new File(path,newFile); 76 | 77 | //System.out.println(filepath.getAbsolutePath()); 78 | logger.info("上传了一个文件:" + filepath.getAbsolutePath()); 79 | 80 | 81 | //判断文件路径是否存在 82 | if(!filepath.getParentFile().exists()) { 83 | filepath.getParentFile().mkdirs(); 84 | } 85 | 86 | //将文件保存到目标文件中 87 | try { 88 | file.transferTo(new File(path + File.separator + newFile)); 89 | } catch (IllegalStateException e) { 90 | e.printStackTrace(); 91 | map.put("status", false); 92 | map.put("code", -2); 93 | map.put("msg","保存文件发送错误"); 94 | return map; 95 | } catch (IOException e) { 96 | e.printStackTrace(); 97 | map.put("status", false); 98 | map.put("code", -3); 99 | map.put("msg","文件读写错误"); 100 | return map; 101 | } 102 | 103 | map.put("status", true); 104 | map.put("code", 0); 105 | map.put("msg","上传成功"); 106 | map.put("filename", newFile); 107 | 108 | return map; 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/service/ILogService.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.service; 2 | 3 | import java.util.List; 4 | 5 | import com.neuedu.crm.pojo.Log; 6 | import com.neuedu.crm.pojo.LogExample; 7 | /** 8 | * 9 | * @author WuJunyou 10 | * @date 2018/07/24 11 | */ 12 | public interface ILogService { 13 | /** 14 | * 15 | * 描述: 按照Example 统计记录总数 16 | * @author wujunyou 17 | * @version 1.0 18 | * @param logExample 查询条件 19 | * @return long 数据的数量 20 | * @exception Nothing 21 | * @since 1.8 22 | * 23 | */ 24 | public long countByLogExample(LogExample logExample); 25 | 26 | /** 27 | * 28 | * 描述:按照Example 删除Log 29 | * @author wujunyou 30 | * @version 1.0 31 | * @param logExample 32 | * @return boolean 删除的结果 33 | * @exception Nothing 34 | * @since 1.8 35 | * 36 | */ 37 | public boolean deleteByLogExample(LogExample logExample); 38 | 39 | /** 40 | * 41 | * 描述:按照Log主键id删除Log 42 | * @author wujunyou 43 | * @version 1.0 44 | * @param id 数据字典id 45 | * @return boolean 删除结果 46 | * @exception Nothing 47 | * @since 1.8 48 | * 49 | */ 50 | public boolean deleteByPrimaryKey(Integer id); 51 | 52 | /** 53 | * 54 | * 描述:插入一条Log数据 如字段为空,则插入null 55 | * @author wujunyou 56 | * @version 1.0 57 | * @param log 客户数据 58 | * @return boolean 插入结果 59 | * @exception Nothing 60 | * @since 1.8 61 | * 62 | */ 63 | public boolean insertLog(Log log); 64 | 65 | /** 66 | * 67 | * 描述:插入一条Log数据,如字段为空,则插入数据库表字段的默认值 68 | * @author wujunyou 69 | * @version 1.0 70 | * @param log 客户数据 71 | * @return boolean 插入结果 72 | * @exception Nothing 73 | * @since 1.8 74 | * 75 | */ 76 | public boolean insertSelective(Log log); 77 | 78 | /** 79 | * 80 | * 描述:按照Example条件 模糊查询 81 | * @author wujunyou 82 | * @version 1.0 83 | * @param logExample 查询条件 84 | * @return List 含Log的list 85 | * @exception Nothing 86 | * @since 1.8 87 | * 88 | */ 89 | public List selectByLogExample(LogExample logExample); 90 | 91 | /** 92 | * 93 | * 描述:按照Log 的id 查找 Log 94 | * @author wujunyou 95 | * @version 1.0 96 | * @param id 要查询的id 97 | * @return Log 查到的数据或空值 98 | * @exception Nothing 99 | * @since 1.8 100 | * 101 | */ 102 | public Log selectLogByPrimaryKey(Integer id); 103 | 104 | /** 105 | * 106 | * 描述:更新Log 107 | * @author wujunyou 108 | * @version 1.0 109 | * @param log 对象中若有空则更新字段为null 110 | * @param logExample 为where条件 111 | * @return boolean 更新结果 112 | * @exception Nothing 113 | * @since 1.8 114 | * 115 | */ 116 | public boolean updateByLogExample(Log log, LogExample logExample); 117 | 118 | /** 119 | * 120 | * 描述:更新Log 121 | * @author wujunyou 122 | * @version 1.0 123 | * @param log 对象中若有空则不会更新此字段 124 | * @param logExample 为where条件 125 | * @return boolean 更新结果 126 | * @exception Nothing 127 | * @since 1.8 128 | * 129 | */ 130 | public boolean updateByLogExampleSelective(Log log, LogExample logExample); 131 | 132 | /** 133 | * 134 | * 描述:按照Log id 更新Log 135 | * @author wujunyou 136 | * @version 1.0 137 | * @param log 对象中如有空则不会更新此字段 138 | * @return boolean 139 | * @exception Nothing 140 | * @since 1.8 141 | * 142 | */ 143 | public boolean updateLogByPrimaryKeySelective(Log log); 144 | 145 | /** 146 | * 147 | * 描述:按照Log id 更新Log 148 | * @author wujunyou 149 | * @version 1.0 150 | * @param log 对象中如有空则更新此字段为null 151 | * @return boolean 152 | * @exception Nothing 153 | * @since 1.8 154 | * 155 | */ 156 | public boolean updateLogByPrimaryKey(Log log); 157 | } 158 | -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/utils/LocalDateTimeConverter.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.utils; 2 | 3 | import java.time.LocalDateTime; 4 | import java.util.ArrayList; 5 | import java.util.List; 6 | 7 | import org.springframework.core.convert.converter.Converter; 8 | 9 | /** 10 | * 描述:自定义时间转换器 11 | * @author wanghaoyu 12 | * 13 | */ 14 | public class LocalDateTimeConverter implements Converter{ 15 | /** 16 | * 添加不同的日期格式 17 | */ 18 | private static List formats = new ArrayList(); 19 | static{ 20 | formats.add("yyyy"); 21 | formats.add("yyyy-MM"); 22 | formats.add("yyyy-MM-dd"); 23 | formats.add("yyyy-MM-dd HH:mm"); 24 | formats.add("yyyy-MM-dd HH:mm:ss"); 25 | formats.add("yyyy/MM"); 26 | formats.add("yyyy/MM/dd"); 27 | formats.add("yyyy/MM/dd HH:mm"); 28 | formats.add("yyyy/MM/dd HH:mm:ss"); 29 | } 30 | 31 | @Override 32 | public LocalDateTime convert(String source) { 33 | 34 | try { 35 | String string = "^\\d{4}$"; 36 | if (source.matches(string)) { 37 | //2017 38 | return parseDate(source, formats.get(0)); 39 | } else if (source.matches("^\\d{4}-\\d{1,2}$")) { 40 | //2017-09 41 | return parseDate(source, formats.get(1)); 42 | } else if (source.matches("^\\d{4}-\\d{1,2}-\\d{1,2}$")) { 43 | //2017-09-10 44 | return parseDate(source, formats.get(2)); 45 | } else if (source.matches("^\\d{4}-\\d{1,2}-\\d{1,2} {1}\\d{1,2}:\\d{1,2}$")) { 46 | //2017-09-10 21:15 47 | return parseDate(source, formats.get(3)); 48 | } else if (source.matches("^\\d{4}-\\d{1,2}-\\d{1,2} {1}\\d{1,2}:\\d{1,2}:\\d{1,2}$")) { 49 | //2017-09-10 21:15:30 50 | return parseDate(source, formats.get(4)); 51 | } else if (source.matches("^\\d{4}/\\d{1,2}$")) { 52 | //2017/09 53 | return parseDate(source, formats.get(5)); 54 | } else if (source.matches("^\\d{4}/\\d{1,2}/\\d{1,2}$")) { 55 | //2017/09/10 56 | return parseDate(source, formats.get(6)); 57 | } else if (source.matches("^\\d{4}/\\d{1,2}/\\d{1,2} {1}\\d{1,2}:\\d{1,2}$")) { 58 | //2017/09/10 21:15 59 | return parseDate(source, formats.get(7)); 60 | } else if (source.matches("^\\d{4}/\\d{1,2}/\\d{1,2} {1}\\d{1,2}:\\d{1,2}:\\d{1,2}$")) { 61 | //2017/09/10 21:15:30 62 | return parseDate(source, formats.get(8)); 63 | } else { 64 | throw new Exception("没有相应的日期类型匹配"); 65 | } 66 | } catch (Exception e) { 67 | e.printStackTrace(); 68 | } 69 | return null; 70 | } 71 | 72 | /** 73 | * 功能描述:格式化日期 74 | * 75 | * @param dateStr 76 | * String 字符型日期 77 | * @param format 78 | * String 格式 79 | * @return LocalDateTime 日期 80 | */ 81 | public LocalDateTime parseDate(String dateStr, String format) { 82 | LocalDateTime date=null; 83 | try { 84 | date = LocalDateTimeUtil.parse(dateStr, format); 85 | } catch (Exception e1) { 86 | e1.printStackTrace(); 87 | } 88 | return date; 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/utils/TaskController.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.utils; 2 | 3 | import java.time.Duration; 4 | import java.time.LocalDateTime; 5 | import java.util.ArrayList; 6 | import java.util.List; 7 | 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.scheduling.annotation.Scheduled; 10 | import org.springframework.stereotype.Component; 11 | 12 | import com.neuedu.crm.pojo.CustomerLoss; 13 | import com.neuedu.crm.pojo.CustomerLossExample; 14 | import com.neuedu.crm.pojo.Orders; 15 | import com.neuedu.crm.service.ICustomerLossService; 16 | import com.neuedu.crm.service.IOrdersService; 17 | 18 | /** 19 | * 20 | * @ClassName: TashController 21 | * @Description: TODO(定时任务) 22 | * @author 黄清文 23 | * @date 2018年7月13日 24 | * 25 | */ 26 | @Component 27 | public class TaskController { 28 | 29 | @Autowired 30 | private ICustomerLossService lossService; 31 | 32 | @Autowired 33 | private IOrdersService ordersService; 34 | 35 | 36 | /** 37 | * 38 | * @Title: checkCustomerLoss 39 | * @Description: TODO(检查客户流失 计算距离上一下下单时间超过 6 个月就自动添加到客户流失表) 40 | * @param 参数 41 | * @return void 返回类型 42 | * @throws 43 | * @author huangqingwen 44 | */ 45 | /** 46 | * 每天早上10:15触发 47 | */ 48 | @Scheduled(cron="0 15 10 ? * *") 49 | public void checkCustomerLoss(){ 50 | /** 51 | * 1. 按客户id分组查询时间最大的订单, 如果订单时间跟现在时间的差 time大于6个月,则自动添加到客户流失表 52 | */ 53 | /** 54 | * 按客户id分组查询时间最大的订单 55 | */ 56 | List orders = ordersService.selectOrdersGroupByCustomerId(); 57 | 58 | /** 59 | * 遍历订单集合 判断条件: 60 | * 1. 有历史订单客户最后一次下单的时间距离现在的时间差大于6个月 61 | * 2. 没有历史订单的客户判断客户的添加时间距离现在的时间差大于6个月 62 | */ 63 | 64 | for (Orders o : orders) { 65 | if(o.getDate() != null){ 66 | /** 67 | * 有历史订单的客户,计算最后一次下单的时间距离现在的时间查是否大于180天 68 | */ 69 | Duration duration = Duration.between(o.getLocalDateTimeDate(), LocalDateTime.now()); 70 | if(duration.toDays() > 1){ 71 | //插入 72 | insertCustomerLoss(o); 73 | } 74 | }else{ 75 | /** 76 | * 没有历史订单的客户,计算客户的添加时间距离现在的时间差是否大于180天 77 | */ 78 | Duration duration = Duration.between(o.getCustomer().getCreateTime(), LocalDateTime.now()); 79 | if(duration.toDays() > 1){ 80 | //插入 81 | insertCustomerLoss(o); 82 | } 83 | } 84 | } 85 | 86 | /** 87 | * 插入客户流失记录表 88 | */ 89 | 90 | } 91 | 92 | /** 93 | * 94 | * @Title: insertCustomerLoss 95 | * @Description: TODO(插入客户流失表) 96 | * @param @param loss 参数 97 | * @return void 返回类型 98 | * @throws 99 | * @author huangqingwen 100 | */ 101 | public void insertCustomerLoss(Orders orders){ 102 | /** 103 | * 组装需要插入流失客户表的数据 104 | */ 105 | CustomerLoss loss = new CustomerLoss(); 106 | loss.setCustomerId(orders.getCustomerId()); 107 | loss.setLastOrderTime(orders.getLocalDateTimeDate()); 108 | loss.setStatus("0"); 109 | /** 110 | * 先判断客户流失表是否已经存在这条客户记录 111 | */ 112 | List status = new ArrayList(); 113 | status.add("0"); 114 | status.add("1"); 115 | CustomerLossExample customerLossExample = new CustomerLossExample(); 116 | customerLossExample.createCriteria().andCustomerIdEqualTo(loss.getCustomerId()); 117 | customerLossExample.createCriteria().andStatusIn(status); 118 | List losses = lossService.selectByCustomerLossExample(customerLossExample); 119 | 120 | if(losses == null || losses.size() == 0){ 121 | /** 122 | * 如果客户流失表不存在这条客户记录 123 | */ 124 | lossService.insertSelective(loss); 125 | } 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/utils/MailUtil.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.neuedu.crm.utils; 5 | 6 | import java.util.List; 7 | 8 | import javax.mail.MessagingException; 9 | import javax.mail.internet.MimeMessage; 10 | 11 | import org.springframework.mail.SimpleMailMessage; 12 | import org.springframework.mail.javamail.JavaMailSenderImpl; 13 | import org.springframework.mail.javamail.MimeMessageHelper; 14 | import org.springframework.web.multipart.MultipartFile; 15 | 16 | /** 17 | * @author wanghaoyu 18 | * 19 | */ 20 | public class MailUtil { 21 | 22 | 23 | 24 | private JavaMailSenderImpl mailSender; 25 | 26 | /** 27 | * JavaMailSenderImpl支持MimeMessages和SimpleMailMessages。 28 | * MimeMessages为复杂邮件模板,支持文本、附件、html、图片等。 29 | * SimpleMailMessages实现了MimeMessageHelper,为普通邮件模板,支持文本 30 | */ 31 | private SimpleMailMessage simpleMailMessage; 32 | 33 | 34 | /** 35 | * 描述:Spring 依赖注入 36 | * @author wanghaoyu 37 | * @date 38 | * @version 1.0 39 | * @param mailSender 40 | * @since 1.8 41 | * 42 | */ 43 | public void setMailSender(JavaMailSenderImpl mailSender) { 44 | this.mailSender = mailSender; 45 | } 46 | 47 | /** 48 | * 描述:Spring 依赖注入 49 | * @author wanghaoyu 50 | * @date 51 | * @version 1.0 52 | * @param simpleMailMessage void 53 | * @since 1.8 54 | * 55 | */ 56 | public void setSimpleMailMessage(SimpleMailMessage simpleMailMessage) { 57 | this.simpleMailMessage = simpleMailMessage; 58 | } 59 | 60 | /** 61 | * 单发 62 | * 63 | * @param recipient 收件人 64 | * @param subject 主题 65 | * @param content 内容 66 | */ 67 | public void send(String recipient,String subject,String content){ 68 | System.out.println(simpleMailMessage); 69 | simpleMailMessage.setTo(recipient); 70 | simpleMailMessage.setSubject(subject); 71 | simpleMailMessage.setText(content); 72 | mailSender.send(simpleMailMessage); 73 | } 74 | 75 | /** 76 | * 群发 77 | * 78 | * @param recipients 收件人 79 | * @param subject 主题 80 | * @param content 内容 81 | */ 82 | public void send(List recipients,String subject,String content){ 83 | simpleMailMessage.setTo(recipients.toArray(new String[recipients.size()])); 84 | simpleMailMessage.setSubject(subject); 85 | simpleMailMessage.setText(content); 86 | mailSender.send(simpleMailMessage); 87 | } 88 | 89 | /** 90 | * 发送带附件的邮件 91 | * @author malizhi 92 | * @param recipient 93 | * @param subject 94 | * @param content 95 | * @param file void 96 | * @version 1.0 97 | * @exception Nothing 98 | */ 99 | public void sendWithFile(String recipient,String subject,String content,MultipartFile file){ 100 | //使用JavaMail的MimeMessage,支付更加复杂的邮件格式和内容 101 | MimeMessage msg = mailSender.createMimeMessage(); 102 | try { 103 | //创建MimeMessageHelper对象,处理MimeMessage的辅助类 104 | MimeMessageHelper helper = new MimeMessageHelper(msg, true); 105 | //使用辅助类MimeMessage设定参数 106 | helper.setFrom(mailSender.getUsername()); 107 | helper.setTo(recipient); 108 | helper.setSubject(subject); 109 | helper.setText(content); 110 | //加入附件 111 | helper.addAttachment(file.getOriginalFilename(), file); 112 | } catch (MessagingException e) { 113 | e.printStackTrace(); 114 | } 115 | // 发送邮件 116 | mailSender.send(msg); 117 | } 118 | 119 | } 120 | 121 | -------------------------------------------------------------------------------- /src/main/webapp/views/customer/productchoose.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | 产品选择 8 | 9 | 10 | 11 | 12 | 13 |
      14 | 15 |
      16 |
      17 | 18 |
      19 | 22 |
      23 |
      24 |
      25 | 26 |
      27 | 30 |
      31 |
      32 |
      33 |
      34 | 35 |
      36 |
      37 |
      38 | 39 |
      40 | 41 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/service/impl/OrderItemServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.service.impl; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | import org.springframework.transaction.annotation.Transactional; 8 | 9 | import com.neuedu.crm.mapper.OrderItemMapper; 10 | import com.neuedu.crm.mapper.ProductMapper; 11 | import com.neuedu.crm.pojo.OrderItem; 12 | import com.neuedu.crm.pojo.OrderItemExample; 13 | import com.neuedu.crm.pojo.Pager; 14 | import com.neuedu.crm.service.IOrderItemService; 15 | /** 16 | * 17 | * @author 18 | * @date 2018/07/24 19 | */ 20 | @Service 21 | @Transactional(rollbackFor=Exception.class) 22 | public class OrderItemServiceImpl implements IOrderItemService { 23 | 24 | @Autowired 25 | private OrderItemMapper orderItemMapper; 26 | 27 | @Autowired 28 | private ProductMapper productMapper; 29 | 30 | @Override 31 | public long countByOrderItemExample(OrderItemExample orderItemExample) { 32 | return orderItemMapper.countByExample(orderItemExample); 33 | } 34 | 35 | @Override 36 | public boolean deleteByOrderItemExample(OrderItemExample orderItemExample) { 37 | return orderItemMapper.deleteByExample(orderItemExample) > 0 ? true : false; 38 | } 39 | 40 | @Override 41 | public boolean deleteByPrimaryKey(Integer id) { 42 | return orderItemMapper.deleteByPrimaryKey(id) > 0 ? true : false; 43 | } 44 | 45 | @Override 46 | public boolean insertOrderItem(OrderItem orderItem) { 47 | return orderItemMapper.insert(orderItem) > 0 ? true : false; 48 | } 49 | 50 | @Override 51 | public boolean insertSelective(OrderItem orderItem) { 52 | return orderItemMapper.insertSelective(orderItem) > 0 ? true : false; 53 | } 54 | 55 | @Override 56 | public List selectByOrderItemExample(OrderItemExample orderItemExample) { 57 | return orderItemMapper.selectByExample(orderItemExample); 58 | } 59 | 60 | @Override 61 | public OrderItem selectOrderItemByPrimaryKey(Integer id) { 62 | return orderItemMapper.selectByPrimaryKey(id); 63 | } 64 | 65 | @Override 66 | public boolean updateByOrderItemExampleSelective(OrderItem orderItem, OrderItemExample orderItemExample) { 67 | return orderItemMapper.updateByExampleSelective(orderItem, orderItemExample) > 0 ? true : false; 68 | } 69 | 70 | @Override 71 | public boolean updateByOrderItemExample(OrderItem orderItem, OrderItemExample orderItemExample) { 72 | return orderItemMapper.updateByExample(orderItem, orderItemExample) > 0 ? true : false; 73 | } 74 | 75 | @Override 76 | public boolean updateOrderItemByPrimaryKeySelective(OrderItem orderItem) { 77 | return orderItemMapper.updateByPrimaryKeySelective(orderItem) > 0 ? true : false; 78 | } 79 | 80 | @Override 81 | public boolean updateOrderItemByPrimaryKey(OrderItem orderItem) { 82 | return orderItemMapper.updateByPrimaryKey(orderItem) > 0 ? true : false ; 83 | } 84 | 85 | /** 86 | * 分页获取订单的订单项 87 | */ 88 | @Override 89 | public List selectByOrderItemExample(OrderItemExample orderItemExample, Pager pager) { 90 | 91 | Long count = orderItemMapper.countByExample(orderItemExample); 92 | 93 | pager.setTotal(count.intValue()); 94 | 95 | orderItemExample.setLimit(pager.getPageSize()); 96 | orderItemExample.setOffset(new Long(pager.getOffset())); 97 | 98 | List orderItems = orderItemMapper.selectByExample(orderItemExample); 99 | 100 | //循环遍历设置产品的信息 101 | for (OrderItem orderItem : orderItems) { 102 | orderItem.setProduct(productMapper.selectByPrimaryKey(orderItem.getProductId())); 103 | } 104 | 105 | return orderItems; 106 | } 107 | 108 | 109 | } 110 | -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/carousel.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.3.0 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var i=layui.$,n=(layui.hint(),layui.device(),{config:{},set:function(e){var n=this;return n.config=i.extend({},n.config,e),n},on:function(e,i){return layui.onevent.call(this,t,e,i)}}),t="carousel",a="layui-this",l=">*[carousel-item]>*",o="layui-carousel-left",r="layui-carousel-right",d="layui-carousel-prev",s="layui-carousel-next",u="layui-carousel-arrow",c="layui-carousel-ind",m=function(e){var t=this;t.config=i.extend({},t.config,n.config,e),t.render()};m.prototype.config={width:"600px",height:"280px",full:!1,arrow:"hover",indicator:"inside",autoplay:!0,interval:3e3,anim:"",trigger:"click",index:0},m.prototype.render=function(){var e=this,n=e.config;n.elem=i(n.elem),n.elem[0]&&(e.elemItem=n.elem.find(l),n.index<0&&(n.index=0),n.index>=e.elemItem.length&&(n.index=e.elemItem.length-1),n.interval<800&&(n.interval=800),n.full?n.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):n.elem.css({width:n.width,height:n.height}),n.elem.attr("lay-anim",n.anim),e.elemItem.eq(n.index).addClass(a),e.elemItem.length<=1||(e.indicator(),e.arrow(),e.autoplay(),e.events()))},m.prototype.reload=function(e){var n=this;clearInterval(n.timer),n.config=i.extend({},n.config,e),n.render()},m.prototype.prevIndex=function(){var e=this,i=e.config,n=i.index-1;return n<0&&(n=e.elemItem.length-1),n},m.prototype.nextIndex=function(){var e=this,i=e.config,n=i.index+1;return n>=e.elemItem.length&&(n=0),n},m.prototype.addIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index+e,n.index>=i.elemItem.length&&(n.index=0)},m.prototype.subIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index-e,n.index<0&&(n.index=i.elemItem.length-1)},m.prototype.autoplay=function(){var e=this,i=e.config;i.autoplay&&(e.timer=setInterval(function(){e.slide()},i.interval))},m.prototype.arrow=function(){var e=this,n=e.config,t=i(['",'"].join(""));n.elem.attr("lay-arrow",n.arrow),n.elem.find("."+u)[0]&&n.elem.find("."+u).remove(),n.elem.append(t),t.on("click",function(){var n=i(this),t=n.attr("lay-type");e.slide(t)})},m.prototype.indicator=function(){var e=this,n=e.config,t=e.elemInd=i(['
        ',function(){var i=[];return layui.each(e.elemItem,function(e){i.push("")}),i.join("")}(),"
      "].join(""));n.elem.attr("lay-indicator",n.indicator),n.elem.find("."+c)[0]&&n.elem.find("."+c).remove(),n.elem.append(t),"updown"===n.anim&&t.css("margin-top",-(t.height()/2)),t.find("li").on("hover"===n.trigger?"mouseover":n.trigger,function(){var t=i(this),a=t.index();a>n.index?e.slide("add",a-n.index):a 3 | 4 | 5 | 6 | 7 | 字典添加 8 | 9 | 10 | 11 | 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 | 119 | 120 | 121 | -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/controller/ProductController.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.controller; 2 | 3 | import java.util.HashMap; 4 | import java.util.List; 5 | import java.util.Map; 6 | 7 | import org.slf4j.Logger; 8 | import org.slf4j.LoggerFactory; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.stereotype.Controller; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | import org.springframework.web.bind.annotation.ResponseBody; 13 | 14 | import com.neuedu.crm.pojo.Category; 15 | import com.neuedu.crm.pojo.CategoryExample; 16 | import com.neuedu.crm.pojo.Product; 17 | import com.neuedu.crm.pojo.ProductExample; 18 | import com.neuedu.crm.pojo.ProductExample.Criteria; 19 | import com.neuedu.crm.service.ICategoryService; 20 | import com.neuedu.crm.service.IProductService; 21 | import com.neuedu.crm.utils.Operation; 22 | 23 | 24 | /** 25 | * 26 | * @author malizhi 27 | * 28 | */ 29 | @Operation(name="产品管理") 30 | @Controller 31 | public class ProductController { 32 | 33 | @Autowired 34 | private IProductService productService; 35 | 36 | @Autowired 37 | private ICategoryService categoryService; 38 | 39 | private Logger logger = LoggerFactory.getLogger(ProductController.class); 40 | 41 | /** 42 | * 分页查找产品 43 | * 44 | * @author malizhi 45 | * @return Map 46 | * @version 1.0 47 | * @exception Nothing 48 | */ 49 | @Operation(name="查看所有产品") 50 | @RequestMapping("/findProduct") 51 | @ResponseBody 52 | public Map findProduct(Integer page, Integer limit, Product product) { 53 | 54 | Map map = new HashMap(16); 55 | 56 | ProductExample productExample = new ProductExample(); 57 | Criteria criteria = productExample.createCriteria(); 58 | 59 | if (page == null || page <= 0) { 60 | page = 1; 61 | } 62 | if (limit == null || limit <= 0) { 63 | limit = 10; 64 | } 65 | 66 | // where条件 67 | if (product.getId() != null) { 68 | criteria.andIdEqualTo(product.getId()); 69 | } 70 | if (product.getName() != null) { 71 | criteria.andNameLike("%" + product.getName() + "%"); 72 | } 73 | if (product.getLocation()!=null) { 74 | criteria.andLocationLike("%"+product.getLocation()+"%"); 75 | } 76 | if (product.getCategoryId()!=null) { 77 | criteria.andCategoryIdEqualTo(product.getCategoryId()); 78 | } 79 | 80 | Long count = productService.countByProductExample(productExample); 81 | 82 | //第几条开始分页 83 | Long offset = new Long((page - 1) * limit); 84 | //每页多少条 85 | productExample.setLimit(limit); 86 | productExample.setOffset(offset); 87 | 88 | List list = productService.selectByProductExample(productExample); 89 | 90 | logger.info(list.toString()); 91 | 92 | map.put("data", list); 93 | map.put("code", 0); 94 | map.put("msg", "success"); 95 | map.put("count", count); 96 | return map; 97 | } 98 | 99 | 100 | @Operation(name="查看产品的所有分类") 101 | @RequestMapping("/findCategory") 102 | @ResponseBody 103 | public Map findCategory(Category category){ 104 | Map map = new HashMap(16); 105 | 106 | CategoryExample categoryExample = new CategoryExample(); 107 | com.neuedu.crm.pojo.CategoryExample.Criteria criteria = categoryExample.createCriteria(); 108 | 109 | if(category.getId()!=null){ 110 | criteria.andIdEqualTo(category.getId()); 111 | } 112 | if(category.getName()!=null){ 113 | criteria.andNameLike("%"+category.getName()+"%"); 114 | } 115 | 116 | List list = categoryService.selectByCategoryExample(categoryExample); 117 | map.put("categorys", list); 118 | return map; 119 | } 120 | 121 | 122 | 123 | } 124 | -------------------------------------------------------------------------------- /src/main/java/com/neuedu/crm/mapper/MyBatisBaseDao.java: -------------------------------------------------------------------------------- 1 | package com.neuedu.crm.mapper; 2 | 3 | import java.io.Serializable; 4 | import java.util.List; 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | /** 8 | * DAO公共基类,由MybatisGenerator自动生成请勿修改 9 | * @author MybatisGenerator 10 | * @param The Model Class 11 | * @param The Primary Key Class 12 | * @param The Example Class 13 | */ 14 | public interface MyBatisBaseDao { 15 | /** 16 | * 描述:根据example统计符合条件的数据量 17 | * @author MybatisGenerator 18 | * @version 1.0 19 | * @param example 20 | * @return long 21 | * @since 1.8 22 | * 23 | */ 24 | long countByExample(E example); 25 | 26 | /** 27 | * 描述:根据example删除数据 28 | * @author MybatisGenerator 29 | * @date 2018/07/24 30 | * @version 1.0 31 | * @param example 32 | * @return int 33 | * @since 1.8 34 | * 35 | */ 36 | int deleteByExample(E example); 37 | 38 | /** 39 | * 描述:根据主键删除数据 40 | * @author MybatisGenerator 41 | * @date 2018/07/24 42 | * @version 1.0 43 | * @param id 44 | * @return int 45 | * @since 1.8 46 | * 47 | */ 48 | int deleteByPrimaryKey(PK id); 49 | 50 | /** 51 | * 描述:插入数据(若数据为空则设对应的字段为空) 52 | * @author MybatisGenerator 53 | * @date 2018/07/24 54 | * @version 1.0 55 | * @param record 56 | * @return int 57 | * @since 1.8 58 | * 59 | */ 60 | int insert(Model record); 61 | 62 | /** 63 | * 描述:插入数据,若属性不存在则对应的字段设为数据库默认值 64 | * @author MybatisGenerator 65 | * @date 2018/07/24 66 | * @version 1.0 67 | * @param record 68 | * @return int 69 | * @since 1.8 70 | * 71 | */ 72 | int insertSelective(Model record); 73 | 74 | /** 75 | * 描述:查询数据 76 | * @author MybatisGenerator 77 | * @date 2018/07/24 78 | * @version 1.0 79 | * @param example 80 | * @return List 81 | * @since 1.8 82 | * 83 | */ 84 | List selectByExample(E example); 85 | 86 | /** 87 | * 描述:根据主键查询数据 88 | * @author MybatisGenerator 89 | * @date 2018/07/24 90 | * @version 1.0 91 | * @param id 92 | * @return Model 93 | * @since 1.8 94 | * 95 | */ 96 | Model selectByPrimaryKey(PK id); 97 | 98 | /** 99 | * 描述:更新数据,若属性为空则对应字段不更新 100 | * @author MybatisGenerator 101 | * @date 2018/07/24 102 | * @version 1.0 103 | * @param record 104 | * @param example 105 | * @return int 106 | * @since 1.8 107 | * 108 | */ 109 | int updateByExampleSelective(@Param("record") Model record, @Param("example") E example); 110 | 111 | /** 112 | * 113 | * 描述:更新数据,若属性为空则对应字段也设置为空 114 | * @author MybatisGenerator 115 | * @date 2018/07/24 116 | * @version 1.0 117 | * @param record 118 | * @param example 119 | * @return int 120 | * @since 1.8 121 | * 122 | */ 123 | int updateByExample(@Param("record") Model record, @Param("example") E example); 124 | 125 | /** 126 | * 描述:根据主键更新数据,若属性为空则对应字段不更新 127 | * @author MybatisGenerator 128 | * @date 2018/07/24 129 | * @version 1.0 130 | * @param record 131 | * @return int 132 | * @since 1.8 133 | * 134 | */ 135 | int updateByPrimaryKeySelective(Model record); 136 | 137 | /** 138 | * 描述:根据主键更新数据,若属性为空则对应字段也设置为空 139 | * @author MybatisGenerator 140 | * @date 2018/07/24 141 | * @version 1.0 142 | * @param record 143 | * @return int 144 | * @since 1.8 145 | * 146 | */ 147 | int updateByPrimaryKey(Model record); 148 | } --------------------------------------------------------------------------------