├── [Help ├── src ├── main │ ├── resources │ │ ├── static │ │ │ ├── js │ │ │ │ ├── excanvas.js │ │ │ │ ├── respond.js │ │ │ │ ├── jquery-1.8.3.min.js │ │ │ │ ├── bootstrap-rtl.min.js │ │ │ │ ├── gallery.js │ │ │ │ ├── search.js │ │ │ │ ├── lock.js │ │ │ │ ├── contact-us.js │ │ │ │ ├── coming-soon.js │ │ │ │ ├── portlet-draggable.js │ │ │ │ ├── tmpl.min.js │ │ │ │ ├── canvas-to-blob.min.js │ │ │ │ ├── breakpoints.min.js │ │ │ │ ├── jquery.cookie.min.js │ │ │ │ ├── ui-modals.js │ │ │ │ ├── jquery.pulsate.min.js │ │ │ │ ├── form-samples.js │ │ │ │ ├── ui-nestable.js │ │ │ │ ├── maps-vector.js │ │ │ │ ├── jquery.bootpag.min.js │ │ │ │ ├── load-image.min.js │ │ │ │ ├── jquery.vmap.sampledata.js │ │ │ │ ├── form-fileupload.js │ │ │ │ ├── jquery.flot.resize.js │ │ │ │ ├── breakpoints.js │ │ │ │ ├── jquery.input-ip-address-control-1.0.min.js │ │ │ │ ├── ui-tree.js │ │ │ │ └── jquery.xdr-transport.js │ │ │ ├── css │ │ │ │ ├── jquery.ui.slider.css │ │ │ │ ├── bootstrap-responsive1.min.css │ │ │ │ ├── jquery-ui-1.10.1.custom.min.css │ │ │ │ ├── jquery.easy-pie-chart.css │ │ │ │ ├── about-us.css │ │ │ │ ├── print.css │ │ │ │ ├── pagination.css │ │ │ │ ├── invoice.css │ │ │ │ ├── email.css │ │ │ │ ├── jquery.tagsinput.css │ │ │ │ ├── promo.css │ │ │ │ ├── jqvmap.css │ │ │ │ ├── bootstrap-tree.css │ │ │ │ ├── jquery.fileupload-ui.css │ │ │ │ ├── multi-select-metro.css │ │ │ │ ├── colorpicker.css │ │ │ │ ├── timepicker.css │ │ │ │ ├── coming-soon.css │ │ │ │ ├── jquery.gritter.css │ │ │ │ ├── lock.css │ │ │ │ ├── bootstrap-tag.css │ │ │ │ ├── style-non-responsive.css │ │ │ │ ├── news.css │ │ │ │ ├── bootstrap-fileupload.css │ │ │ │ ├── error.css │ │ │ │ ├── bootstrap-wysihtml5.css │ │ │ │ ├── login-soft.css │ │ │ │ ├── login.css │ │ │ │ ├── jquery.nestable.css │ │ │ │ └── blog.css │ │ │ ├── image │ │ │ │ ├── logo.png │ │ │ │ └── logo_1.png │ │ │ ├── fonts │ │ │ │ ├── FontAwesome.otf │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ ├── fontawesome-webfont.woff │ │ │ │ └── fontawesome-webfont.woff2 │ │ │ └── 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 │ │ │ │ └── lay │ │ │ │ └── modules │ │ │ │ ├── code.js │ │ │ │ ├── laytpl.js │ │ │ │ ├── util.js │ │ │ │ ├── flow.js │ │ │ │ ├── tree.js │ │ │ │ └── carousel.js │ │ ├── templates │ │ │ ├── error.html │ │ │ └── mall │ │ │ │ ├── common.html │ │ │ │ └── user │ │ │ │ └── login.html │ │ └── logback.xml │ └── java │ │ └── priv │ │ └── jesse │ │ └── mall │ │ ├── web │ │ ├── user │ │ │ ├── ClassificationController.java │ │ │ ├── IndexController.java │ │ │ └── OrderController.java │ │ └── admin │ │ │ ├── AdminController.java │ │ │ ├── AdminOrderController.java │ │ │ └── AdminUserController.java │ │ ├── dao │ │ ├── AdminUserDao.java │ │ ├── OrderItemDao.java │ │ ├── ClassificationDao.java │ │ ├── UserDao.java │ │ ├── OrderDao.java │ │ └── ProductDao.java │ │ ├── service │ │ ├── exception │ │ │ └── LoginException.java │ │ ├── ShopCartService.java │ │ ├── UserService.java │ │ ├── AdminUserService.java │ │ ├── ClassificationService.java │ │ ├── ProductService.java │ │ ├── impl │ │ │ ├── UserServiceImpl.java │ │ │ ├── AdminUserServiceImpl.java │ │ │ ├── ClassificationServiceImpl.java │ │ │ └── ProductServiceImpl.java │ │ └── OrderService.java │ │ ├── MallApplication.java │ │ ├── utils │ │ ├── Helper.java │ │ ├── FileUtil.java │ │ └── DesUtil.java │ │ ├── entity │ │ ├── pojo │ │ │ └── ResultBean.java │ │ └── AdminUser.java │ │ └── aspect │ │ ├── WebLogAspect.java │ │ └── GlobalExceptionHandler.java └── test │ └── java │ └── priv │ └── jesse │ └── mall │ └── MallApplicationTests.java ├── .gitattributes ├── file ├── 0B1CDC0C82A79A25A4BA159D88D8AC.jpg ├── 0B1CDC0C82A79A25A4BA159D88D8AC.png ├── 05935ae1775543cd5ec7db541204e6a9.jpg ├── 265e3f321dd44c0e3c3be591fe2b85d1.jpg ├── 287a00b77ffc039926a041f3ceac67a8.jpg ├── 4a9fa874832ec5c49127b505c7613753.jpg ├── 4fdc48b9638219ad6e2134b7082d7cfd.jpg ├── 752c4450b93a84404147af339355f581.jpg ├── 7ae85d11d2ad69b7471b6366094e6f79.jpg ├── b3e806085a5d92185db6d22ac78b515e.jpg ├── b790cbb31e84a6f08fd011ac8f0249e3.jpg ├── b98d38a2879005be71af44e38946f327.jpg ├── c56a4eb167256dbd8d9577bd5b4bbeaf.jpg ├── f700146e15bca2d0a82d4b47274e1c78.jpg ├── O1CN01B4lyWL1HxR7b7mTXC_!!2503580824.jpg_Q75.jpg_.webp ├── O1CN01OuL1dB1hgCFI116Xy_!!4212324306.jpg_Q75.jpg_.webp ├── O1CN01ZycIeH26SKZyD3oVf_!!4229157660.jpg_Q75.jpg_.webp ├── O1CN01cocEs51szr4mG46o4_!!3437915838.jpg_Q75.jpg_.webp └── O1CN01UQOlIC1lqVaFiuJLg_!!2201217864870.jpg_Q75.jpg_.webp ├── .gitignore ├── README.md ├── 数据库表说明.txt ├── boot.sh └── pom.xml /[Help: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/static/js/excanvas.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/static/js/respond.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/static/js/jquery-1.8.3.min.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/static/css/jquery.ui.slider.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/static/js/bootstrap-rtl.min.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/static/css/bootstrap-responsive1.min.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/static/css/jquery-ui-1.10.1.custom.min.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.js linguist-language=java 2 | *.css linguist-language=java 3 | *.html linguist-language=java -------------------------------------------------------------------------------- /file/0B1CDC0C82A79A25A4BA159D88D8AC.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/file/0B1CDC0C82A79A25A4BA159D88D8AC.jpg -------------------------------------------------------------------------------- /file/0B1CDC0C82A79A25A4BA159D88D8AC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/file/0B1CDC0C82A79A25A4BA159D88D8AC.png -------------------------------------------------------------------------------- /src/main/resources/static/image/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/image/logo.png -------------------------------------------------------------------------------- /file/05935ae1775543cd5ec7db541204e6a9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/file/05935ae1775543cd5ec7db541204e6a9.jpg -------------------------------------------------------------------------------- /file/265e3f321dd44c0e3c3be591fe2b85d1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/file/265e3f321dd44c0e3c3be591fe2b85d1.jpg -------------------------------------------------------------------------------- /file/287a00b77ffc039926a041f3ceac67a8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/file/287a00b77ffc039926a041f3ceac67a8.jpg -------------------------------------------------------------------------------- /file/4a9fa874832ec5c49127b505c7613753.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/file/4a9fa874832ec5c49127b505c7613753.jpg -------------------------------------------------------------------------------- /file/4fdc48b9638219ad6e2134b7082d7cfd.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/file/4fdc48b9638219ad6e2134b7082d7cfd.jpg -------------------------------------------------------------------------------- /file/752c4450b93a84404147af339355f581.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/file/752c4450b93a84404147af339355f581.jpg -------------------------------------------------------------------------------- /file/7ae85d11d2ad69b7471b6366094e6f79.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/file/7ae85d11d2ad69b7471b6366094e6f79.jpg -------------------------------------------------------------------------------- /file/b3e806085a5d92185db6d22ac78b515e.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/file/b3e806085a5d92185db6d22ac78b515e.jpg -------------------------------------------------------------------------------- /file/b790cbb31e84a6f08fd011ac8f0249e3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/file/b790cbb31e84a6f08fd011ac8f0249e3.jpg -------------------------------------------------------------------------------- /file/b98d38a2879005be71af44e38946f327.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/file/b98d38a2879005be71af44e38946f327.jpg -------------------------------------------------------------------------------- /file/c56a4eb167256dbd8d9577bd5b4bbeaf.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/file/c56a4eb167256dbd8d9577bd5b4bbeaf.jpg -------------------------------------------------------------------------------- /file/f700146e15bca2d0a82d4b47274e1c78.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/file/f700146e15bca2d0a82d4b47274e1c78.jpg -------------------------------------------------------------------------------- /src/main/resources/static/image/logo_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/image/logo_1.png -------------------------------------------------------------------------------- /src/main/resources/static/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /src/main/resources/static/layui/font/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/font/iconfont.eot -------------------------------------------------------------------------------- /src/main/resources/static/layui/font/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/font/iconfont.ttf -------------------------------------------------------------------------------- /src/main/resources/static/layui/font/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/font/iconfont.woff -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/0.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/1.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/10.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/11.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/12.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/13.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/13.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/14.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/15.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/15.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/16.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/17.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/17.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/18.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/18.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/19.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/19.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/2.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/20.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/20.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/21.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/21.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/22.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/22.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/23.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/23.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/24.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/24.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/25.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/25.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/26.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/26.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/27.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/27.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/28.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/28.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/29.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/29.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/3.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/30.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/30.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/31.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/31.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/32.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/32.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/33.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/33.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/34.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/34.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/35.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/35.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/36.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/36.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/37.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/37.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/38.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/38.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/39.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/39.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/4.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/40.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/40.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/41.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/41.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/42.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/42.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/43.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/43.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/44.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/44.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/45.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/45.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/46.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/46.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/47.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/47.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/48.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/48.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/49.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/49.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/5.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/50.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/50.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/51.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/51.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/52.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/52.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/53.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/53.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/54.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/54.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/55.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/55.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/56.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/56.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/57.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/57.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/58.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/58.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/59.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/59.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/6.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/60.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/60.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/61.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/61.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/62.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/62.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/63.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/63.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/64.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/64.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/65.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/65.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/66.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/66.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/67.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/67.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/68.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/68.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/69.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/69.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/7.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/70.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/70.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/71.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/71.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/8.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/images/face/9.gif -------------------------------------------------------------------------------- /src/main/resources/static/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /src/main/resources/static/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /src/main/resources/static/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /src/main/resources/static/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /file/O1CN01B4lyWL1HxR7b7mTXC_!!2503580824.jpg_Q75.jpg_.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/file/O1CN01B4lyWL1HxR7b7mTXC_!!2503580824.jpg_Q75.jpg_.webp -------------------------------------------------------------------------------- /file/O1CN01OuL1dB1hgCFI116Xy_!!4212324306.jpg_Q75.jpg_.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/file/O1CN01OuL1dB1hgCFI116Xy_!!4212324306.jpg_Q75.jpg_.webp -------------------------------------------------------------------------------- /file/O1CN01ZycIeH26SKZyD3oVf_!!4229157660.jpg_Q75.jpg_.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/file/O1CN01ZycIeH26SKZyD3oVf_!!4229157660.jpg_Q75.jpg_.webp -------------------------------------------------------------------------------- /file/O1CN01cocEs51szr4mG46o4_!!3437915838.jpg_Q75.jpg_.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/file/O1CN01cocEs51szr4mG46o4_!!3437915838.jpg_Q75.jpg_.webp -------------------------------------------------------------------------------- /file/O1CN01UQOlIC1lqVaFiuJLg_!!2201217864870.jpg_Q75.jpg_.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/file/O1CN01UQOlIC1lqVaFiuJLg_!!2201217864870.jpg_Q75.jpg_.webp -------------------------------------------------------------------------------- /src/main/resources/static/layui/css/modules/layer/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/css/modules/layer/default/icon.png -------------------------------------------------------------------------------- /src/main/resources/static/layui/css/modules/layer/default/icon-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/css/modules/layer/default/icon-ext.png -------------------------------------------------------------------------------- /src/main/resources/static/layui/css/modules/layer/default/loading-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/css/modules/layer/default/loading-0.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/css/modules/layer/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/css/modules/layer/default/loading-1.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/css/modules/layer/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RunPiBoss/shymall_musical-instrument/HEAD/src/main/resources/static/layui/css/modules/layer/default/loading-2.gif -------------------------------------------------------------------------------- /src/main/resources/static/css/jquery.easy-pie-chart.css: -------------------------------------------------------------------------------- 1 | .easyPieChart { 2 | position: relative; 3 | text-align: center; 4 | } 5 | 6 | .easyPieChart canvas { 7 | position: absolute; 8 | top: 0; 9 | left: 0; 10 | } 11 | -------------------------------------------------------------------------------- /src/main/resources/static/js/gallery.js: -------------------------------------------------------------------------------- 1 | var Gallery = function () { 2 | 3 | return { 4 | //main function to initiate the module 5 | init: function () { 6 | 7 | App.initFancybox(); 8 | 9 | } 10 | 11 | }; 12 | 13 | }(); -------------------------------------------------------------------------------- /src/main/java/priv/jesse/mall/web/user/ClassificationController.java: -------------------------------------------------------------------------------- 1 | package priv.jesse.mall.web.user; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | 6 | @Controller 7 | @RequestMapping("/classification") 8 | public class ClassificationController { 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/priv/jesse/mall/dao/AdminUserDao.java: -------------------------------------------------------------------------------- 1 | package priv.jesse.mall.dao; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | import priv.jesse.mall.entity.AdminUser; 5 | 6 | public interface AdminUserDao extends JpaRepository { 7 | AdminUser findByUsernameAndPassword(String username, String pwd); 8 | } 9 | -------------------------------------------------------------------------------- /src/main/resources/static/js/search.js: -------------------------------------------------------------------------------- 1 | var Search = function () { 2 | 3 | return { 4 | //main function to initiate the module 5 | init: function () { 6 | if (jQuery().datepicker) { 7 | $('.date-picker').datepicker(); 8 | } 9 | 10 | App.initFancybox(); 11 | } 12 | 13 | }; 14 | 15 | }(); -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | 12 | ### IntelliJ IDEA ### 13 | .idea 14 | *.iws 15 | *.iml 16 | *.ipr 17 | 18 | ### NetBeans ### 19 | nbproject/private/ 20 | build/ 21 | nbbuild/ 22 | dist/ 23 | nbdist/ 24 | .nb-gradle/ 25 | /log/ 26 | -------------------------------------------------------------------------------- /src/main/resources/static/css/about-us.css: -------------------------------------------------------------------------------- 1 | /*** 2 | Anout Us Page 3 | ***/ 4 | 5 | .meet-our-team h3 { 6 | margin-bottom: 0; 7 | padding: 0 10px 10px; 8 | background: #fcfcfc; 9 | } 10 | 11 | .meet-our-team small { 12 | display:block; 13 | font-size:12px; 14 | } 15 | 16 | .meet-our-team .team-info { 17 | padding: 10px; 18 | overflow: hidden; 19 | background: #fafafa; 20 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 一个基于springboot+html+css+javascript的乐器商城项目,使用session用作购物车的功能 2 | ![](https://gitee.com/pipiboss/blog-img/raw/img/img/image-20231206142448020.png) 3 | ![image-20231206142654898](https://gitee.com/pipiboss/blog-img/raw/img/img/image-20231206142654898.png) 4 | ![image-20231206142731283](https://gitee.com/pipiboss/blog-img/raw/img/img/image-20231206142731283.png) 5 | 一个基于springboot+html+css+javascript的乐器商城项目,使用session用作购物车的功能 6 | -------------------------------------------------------------------------------- /src/test/java/priv/jesse/mall/MallApplicationTests.java: -------------------------------------------------------------------------------- 1 | package priv.jesse.mall; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class MallApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/priv/jesse/mall/dao/OrderItemDao.java: -------------------------------------------------------------------------------- 1 | package priv.jesse.mall.dao; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | import priv.jesse.mall.entity.OrderItem; 5 | 6 | import java.util.List; 7 | 8 | public interface OrderItemDao extends JpaRepository { 9 | /** 10 | * 根据订单Id查询 11 | * @param orderId 12 | * @return 13 | */ 14 | List findByOrderId(int orderId); 15 | } 16 | -------------------------------------------------------------------------------- /src/main/resources/static/js/lock.js: -------------------------------------------------------------------------------- 1 | var Lock = function () { 2 | 3 | return { 4 | //main function to initiate the module 5 | init: function () { 6 | 7 | $.backstretch([ 8 | "assets/img/bg/1.jpg", 9 | "assets/img/bg/2.jpg", 10 | "assets/img/bg/3.jpg", 11 | "assets/img/bg/4.jpg" 12 | ], { 13 | fade: 1000, 14 | duration: 8000 15 | }); 16 | } 17 | 18 | }; 19 | 20 | }(); -------------------------------------------------------------------------------- /src/main/resources/static/css/print.css: -------------------------------------------------------------------------------- 1 | /*** 2 | Import fonts 3 | ***/ 4 | .header { 5 | display: none; 6 | } 7 | 8 | .page-sidebar { 9 | display: none; 10 | } 11 | 12 | .color-panel { 13 | display: none; 14 | } 15 | 16 | .hidden-print { 17 | display: none; 18 | } 19 | 20 | .footer { 21 | display: none; 22 | } 23 | 24 | .no-page-break { 25 | page-break-after: avoid; 26 | } 27 | 28 | .page-container { 29 | margin: 0px; 30 | padding: 0px; 31 | } 32 | 33 | .page-content { 34 | min-height: auto !important; 35 | } -------------------------------------------------------------------------------- /src/main/resources/static/css/pagination.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | .pagination a { 3 | text-decoration: none; 4 | border: 1px solid #AAE; 5 | color: #15B; 6 | } 7 | 8 | .pagination a, .pagination span { 9 | display: inline-block; 10 | padding: 0.1em 0.4em; 11 | margin-right: 5px; 12 | margin-bottom: 5px; 13 | } 14 | 15 | .pagination .current { 16 | background: #26B; 17 | color: #fff; 18 | border: 1px solid #AAE; 19 | } 20 | 21 | .pagination .current.prev, .pagination .current.next{ 22 | color:#999; 23 | border-color:#999; 24 | background:#fff; 25 | } 26 | 27 | -------------------------------------------------------------------------------- /src/main/java/priv/jesse/mall/dao/ClassificationDao.java: -------------------------------------------------------------------------------- 1 | package priv.jesse.mall.dao; 2 | 3 | import org.springframework.data.domain.Page; 4 | import org.springframework.data.domain.Pageable; 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import priv.jesse.mall.entity.Classification; 7 | 8 | import java.util.List; 9 | 10 | public interface ClassificationDao extends JpaRepository { 11 | List findByType(int type); 12 | 13 | Page findByType(int type, Pageable pageable); 14 | 15 | List findByParentId(int cid); 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/priv/jesse/mall/dao/UserDao.java: -------------------------------------------------------------------------------- 1 | package priv.jesse.mall.dao; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | import priv.jesse.mall.entity.User; 5 | 6 | import java.util.List; 7 | 8 | public interface UserDao extends JpaRepository { 9 | /** 10 | * 根据用户名,密码查询用户 11 | * @param username 12 | * @param password 13 | * @return 14 | */ 15 | User findByUsernameAndPassword(String username, String password); 16 | 17 | /** 18 | * 根据用户名查询用户 19 | * @param username 20 | * @return 21 | */ 22 | List findByUsername(String username); 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/priv/jesse/mall/web/user/IndexController.java: -------------------------------------------------------------------------------- 1 | package priv.jesse.mall.web.user; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | 6 | import javax.servlet.http.HttpServletRequest; 7 | 8 | @Controller 9 | public class IndexController { 10 | /** 11 | * 打开首页 12 | * @return 13 | */ 14 | @RequestMapping("/index.html") 15 | public String toIndex() { 16 | return "mall/index"; 17 | } 18 | 19 | /** 20 | * 访问根目录转发到首页 21 | * @return 22 | */ 23 | @RequestMapping("/") 24 | public String index(){ 25 | return "forward:/index.html"; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/priv/jesse/mall/service/exception/LoginException.java: -------------------------------------------------------------------------------- 1 | package priv.jesse.mall.service.exception; 2 | 3 | public class LoginException extends RuntimeException { 4 | public LoginException() { 5 | } 6 | 7 | public LoginException(String message) { 8 | super(message); 9 | } 10 | 11 | public LoginException(String message, Throwable cause) { 12 | super(message, cause); 13 | } 14 | 15 | public LoginException(Throwable cause) { 16 | super(cause); 17 | } 18 | 19 | public LoginException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { 20 | super(message, cause, enableSuppression, writableStackTrace); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/resources/static/css/invoice.css: -------------------------------------------------------------------------------- 1 | /*** 2 | Invoice page 3 | ***/ 4 | .invoice table { 5 | margin:30px 0 30px; 6 | } 7 | 8 | .invoice .invoice-logo { 9 | margin-bottom:20px; 10 | } 11 | 12 | .invoice .invoice-logo p { 13 | padding:5px 0; 14 | font-size:26px; 15 | line-height:28px; 16 | text-align:right; 17 | } 18 | 19 | .invoice .invoice-logo p span { 20 | display:block; 21 | font-size:14px; 22 | } 23 | 24 | .invoice .invoice-logo-space { 25 | margin-bottom:15px; 26 | } 27 | 28 | .invoice .invoice-payment strong { 29 | margin-right:5px; 30 | } 31 | 32 | .invoice .invoice-block { 33 | text-align:right; 34 | } 35 | 36 | .invoice .invoice-block .amounts { 37 | margin-top: 20px; 38 | font-size: 14px; 39 | } -------------------------------------------------------------------------------- /src/main/resources/static/js/contact-us.js: -------------------------------------------------------------------------------- 1 | var ContactUs = function () { 2 | 3 | return { 4 | //main function to initiate the module 5 | init: function () { 6 | var map; 7 | $(document).ready(function(){ 8 | map = new GMaps({ 9 | div: '#map', 10 | lat: -13.004333, 11 | lng: -38.494333 12 | }); 13 | var marker = map.addMarker({ 14 | lat: -13.004333, 15 | lng: -38.494333, 16 | title: 'Loop, Inc.', 17 | infoWindow: { 18 | content: "Loop, Inc. 795 Park Ave, Suite 120
San Francisco, CA 94107" 19 | } 20 | }); 21 | 22 | marker.infoWindow.open(map, marker); 23 | }); 24 | } 25 | }; 26 | 27 | }(); -------------------------------------------------------------------------------- /src/main/resources/static/js/coming-soon.js: -------------------------------------------------------------------------------- 1 | var CoomingSoon = function () { 2 | 3 | return { 4 | //main function to initiate the module 5 | init: function () { 6 | 7 | $.backstretch([ 8 | "assets/img/bg/1.jpg", 9 | "assets/img/bg/2.jpg", 10 | "assets/img/bg/3.jpg", 11 | "assets/img/bg/4.jpg" 12 | ], { 13 | fade: 1000, 14 | duration: 10000 15 | }); 16 | 17 | var austDay = new Date(); 18 | austDay = new Date(austDay.getFullYear() + 1, 1 - 1, 26); 19 | $('#defaultCountdown').countdown({until: austDay}); 20 | $('#year').text(austDay.getFullYear()); 21 | } 22 | 23 | }; 24 | 25 | }(); -------------------------------------------------------------------------------- /src/main/resources/static/js/portlet-draggable.js: -------------------------------------------------------------------------------- 1 | var PortletDraggable = function () { 2 | 3 | return { 4 | //main function to initiate the module 5 | init: function () { 6 | 7 | if (!jQuery().sortable) { 8 | return; 9 | } 10 | 11 | $("#sortable_portlets").sortable({ 12 | connectWith: ".portlet", 13 | items: ".portlet", 14 | opacity: 0.8, 15 | coneHelperSize: true, 16 | placeholder: 'sortable-box-placeholder round-all', 17 | forcePlaceholderSize: true, 18 | tolerance: "pointer" 19 | }); 20 | 21 | $(".column").disableSelection(); 22 | 23 | } 24 | 25 | }; 26 | 27 | }(); -------------------------------------------------------------------------------- /src/main/java/priv/jesse/mall/service/ShopCartService.java: -------------------------------------------------------------------------------- 1 | package priv.jesse.mall.service; 2 | 3 | import priv.jesse.mall.entity.OrderItem; 4 | 5 | import javax.servlet.http.HttpServletRequest; 6 | import java.util.List; 7 | 8 | /** 9 | * 购物车 10 | */ 11 | public interface ShopCartService { 12 | 13 | String NAME_PREFIX = "shop_cart_"; 14 | 15 | /** 16 | * 加购物车 17 | * @param 18 | */ 19 | void addCart(int productId, HttpServletRequest request) throws Exception; 20 | 21 | /** 22 | * 移除 23 | * @param productId 24 | * @param request 25 | */ 26 | void remove(int productId, HttpServletRequest request) throws Exception; 27 | 28 | /** 29 | * 查看购物车 30 | * @param request 31 | * @return 32 | */ 33 | List listCart(HttpServletRequest request) throws Exception; 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/priv/jesse/mall/dao/OrderDao.java: -------------------------------------------------------------------------------- 1 | package priv.jesse.mall.dao; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | import org.springframework.data.jpa.repository.Modifying; 5 | import org.springframework.data.jpa.repository.Query; 6 | import priv.jesse.mall.entity.Order; 7 | 8 | import javax.transaction.Transactional; 9 | import java.util.List; 10 | 11 | public interface OrderDao extends JpaRepository { 12 | 13 | /** 14 | * 更改订单状态 15 | * @param state 16 | * @param id 17 | */ 18 | @Modifying 19 | @Transactional 20 | @Query(value = "update `order` o set o.state=?1 where o.id=?2",nativeQuery = true) 21 | void updateState(int state,int id); 22 | 23 | /** 24 | * 查找用户的订单 25 | * @param userId 26 | * @return 27 | */ 28 | List findByUserId(int userId); 29 | } 30 | -------------------------------------------------------------------------------- /src/main/resources/static/css/email.css: -------------------------------------------------------------------------------- 1 | /*** 2 | Email Template Page 3 | ***/ 4 | .mail-template ul { 5 | padding:0px; 6 | margin: 0px; 7 | list-style:none; 8 | } 9 | 10 | .mail-template li { 11 | margin:0 5px; 12 | cursor:pointer; 13 | list-style:none; 14 | border:solid 2px #fff; 15 | } 16 | 17 | .mail-template li:hover { 18 | border:solid 2px #aaa; 19 | } 20 | 21 | .mail-template li a{ 22 | display:block; 23 | padding:25px; 24 | } 25 | 26 | .mail-template li a:hover { 27 | text-decoration: none; 28 | } 29 | 30 | .mail-template li.color-black { 31 | background:#1f1f1f; 32 | } 33 | 34 | .mail-template li.color-darkblue { 35 | background:#1570a6; 36 | } 37 | 38 | .mail-template li.color-lightblue { 39 | background:#4aabf9; 40 | } 41 | 42 | .mail-template li.color-red { 43 | background:#eb4d41; 44 | } 45 | 46 | .mail-template li.color-green { 47 | background:#28b779; 48 | } -------------------------------------------------------------------------------- /src/main/resources/static/css/jquery.tagsinput.css: -------------------------------------------------------------------------------- 1 | div.tagsinput { border:1px solid #CCC; background: #FFF; padding:5px; width:300px; height:100px; overflow-y: auto;} 2 | div.tagsinput span.tag { border: 1px solid #a5d24a; -moz-border-radius:2px; -webkit-border-radius:2px; display: block; float: left; padding: 5px; text-decoration:none; background: #cde69c; color: #638421; margin-right: 5px; margin-bottom:5px;font-family: helvetica; font-size:13px;} 3 | div.tagsinput span.tag a { font-weight: bold; color: #82ad2b; text-decoration:none; font-size: 11px; } 4 | div.tagsinput input { width:80px; margin:0px; font-family: helvetica; font-size: 13px; border:1px solid transparent; padding:5px; background: transparent; color: #000; outline:0px; margin-right:5px; margin-bottom:5px; } 5 | div.tagsinput div { display:block; float: left; } 6 | .tags_clear { clear: both; width: 100%; height: 0px; } 7 | .not_valid {background: #FBD8DB !important; color: #90111A !important;} 8 | -------------------------------------------------------------------------------- /src/main/resources/static/css/promo.css: -------------------------------------------------------------------------------- 1 | /*** 2 | Promo Page 3 | ***/ 4 | 5 | .promo-page { 6 | padding-left: 0; 7 | padding-right: 0; 8 | min-height: 650px; 9 | } 10 | 11 | .promo-page h1, .promo-page h2 { 12 | font-size: 50px; 13 | line-height: 60px; 14 | } 15 | 16 | .promo-page .btn.xlarge { 17 | font-size: 22px; 18 | padding: 7px 25px; 19 | margin: 5px 0; 20 | } 21 | 22 | .promo-page input.m-wrap { 23 | background: #fff; 24 | } 25 | 26 | /*page row options*/ 27 | 28 | .promo-page .block-transparent { 29 | min-height: 350px; 30 | padding: 50px 20px 30px 20px; 31 | } 32 | 33 | .promo-page .block-grey { 34 | min-height: 350px; 35 | padding: 50px 20px 30px 20px; 36 | background: #eeedf2; 37 | } 38 | 39 | .promo-page .block-yellow { 40 | min-height: 350px; 41 | padding: 50px 20px 30px 20px; 42 | background: #ffd800; 43 | } 44 | 45 | .promo-page .block-footer { 46 | padding: 30px 20px 30px 20px; 47 | background: #eeedf2; 48 | } 49 | 50 | -------------------------------------------------------------------------------- /src/main/resources/static/js/tmpl.min.js: -------------------------------------------------------------------------------- 1 | (function(a){"use strict";var b=function(a,c){var d=/[^\w\-\.:]/.test(a)?new Function(b.arg+",tmpl","var _e=tmpl.encode"+b.helper+",_s='"+a.replace(b.regexp,b.func)+"';return _s;"):b.cache[a]=b.cache[a]||b(b.load(a));return c?d(c,b):function(a){return d(a,b)}};b.cache={},b.load=function(a){return document.getElementById(a).innerHTML},b.regexp=/([\s'\\])(?![^%]*%\})|(?:\{%(=|#)([\s\S]+?)%\})|(\{%)|(%\})/g,b.func=function(a,b,c,d,e,f){if(b)return{"\n":"\\n","\r":"\\r","\t":"\\t"," ":" "}[a]||"\\"+a;if(c)return c==="="?"'+_e("+d+")+'":"'+("+d+"||'')+'";if(e)return"';";if(f)return"_s+='"},b.encReg=/[<>&"'\x00]/g,b.encMap={"<":"<",">":">","&":"&",'"':""","'":"'"},b.encode=function(a){return String(a||"").replace(b.encReg,function(a){return b.encMap[a]||""})},b.arg="o",b.helper=",print=function(s,e){_s+=e&&(s||'')||_e(s);},include=function(s,d){_s+=tmpl(s,d);}",typeof define=="function"&&define.amd?define(function(){return b}):a.tmpl=b})(this); -------------------------------------------------------------------------------- /数据库表说明.txt: -------------------------------------------------------------------------------- 1 | 本项目一共有 2 | 3 | admin_user表:(后台管理员表) 4 | id: id 5 | username: 后台管理员的用户名 6 | password:后台管理员的密码 7 | 8 | 9 | classification表:(商品分类表)总共两级 10 | id: id 11 | cname: 分类名称 12 | parentId: 上级分类id 13 | type: 分类的类型,1代表一级分类 2代表二级分类 14 | 15 | 16 | 17 | order表:(订单表) 18 | id:id 19 | addr:订单的发货地址 20 | name:收货者姓名 21 | total:订单总价 22 | state:1:未付款 2:等待发货 3:等待收货 4:订单完成 23 | orderTime:订单时间 24 | name:收货人姓名 25 | phone: 收货人联系电话 26 | addr:收货地址 27 | userId:用户id 28 | 29 | 30 | order_item表:(订单项表,存储订单详情,关联订单和商品) 31 | id: id 32 | orderId: 订单Id 33 | productId: 商品Id 34 | subTotal: 总价 35 | 36 | 37 | product表:(商品表) 38 | id:id 39 | title: 商品标题 40 | 市场价: marketPrice 41 | 商城价: shopPrice 42 | 商品图片:image 43 | 商品描述:desc 44 | 是否热门商品:isHot 45 | csid:二级分类Id 46 | pdate: 商品创建日期 47 | 48 | 49 | user表:(用户表) 50 | id:id 51 | 用户名:username 52 | 密码:password 53 | 姓名:name 54 | 邮件:email 55 | 电话:phone 56 | 地址:addr 57 | 58 | 59 | 说明:购物车中的数据写在session中,位于service中的impl文件夹中,其他的dao也写在下面,用到了 jps,简写或不用写sql语句 -------------------------------------------------------------------------------- /src/main/java/priv/jesse/mall/MallApplication.java: -------------------------------------------------------------------------------- 1 | package priv.jesse.mall; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.boot.context.properties.EnableConfigurationProperties; 6 | import org.springframework.boot.web.servlet.ServletComponentScan; 7 | import org.springframework.transaction.annotation.EnableTransactionManagement; 8 | 9 | /** 10 | * 程序启动入口 11 | * 12 | * @ServletComponentScan 设置启动时spring能够扫描到我们自己编写的servlet和filter, 用于Druid监控 13 | * @MapperScan("com.imlaidian.springbootdemo.dao") 扫描mybatis Mapper接口 14 | * @EnableScheduling 启用定时任务 15 | * @EnableTransactionManagement 开启事务 16 | * 17 | * @author hfb 18 | * @date 2017/9/18 11:13 19 | */ 20 | @ServletComponentScan 21 | @EnableConfigurationProperties 22 | @EnableTransactionManagement 23 | @SpringBootApplication 24 | public class MallApplication { 25 | 26 | public static void main(String[] args) { 27 | SpringApplication.run(MallApplication.class, args); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/resources/static/js/canvas-to-blob.min.js: -------------------------------------------------------------------------------- 1 | (function(a){"use strict";var b=a.HTMLCanvasElement&&a.HTMLCanvasElement.prototype,c=a.Blob&&function(){try{return Boolean(new Blob)}catch(a){return!1}}(),d=c&&a.Uint8Array&&function(){try{return(new Blob([new Uint8Array(100)])).size===100}catch(a){return!1}}(),e=a.BlobBuilder||a.WebKitBlobBuilder||a.MozBlobBuilder||a.MSBlobBuilder,f=(c||e)&&a.atob&&a.ArrayBuffer&&a.Uint8Array&&function(a){var b,f,g,h,i,j;a.split(",")[0].indexOf("base64")>=0?b=atob(a.split(",")[1]):b=decodeURIComponent(a.split(",")[1]),f=new ArrayBuffer(b.length),g=new Uint8Array(f);for(h=0;h=d.breakpoints[i]&&b=d.breakpoints[i]){c("body").removeClass("breakpoint-"+d.breakpoints[i]);c(window).trigger("exitBreakpoint"+d.breakpoints[i])}if(d.distinct&&h>=d.breakpoints[i]&&hh&&b>0&&!c("body").hasClass("breakpoint-"+d.breakpoints[i])){c("body").addClass("breakpoint-"+d.breakpoints[i]);c(window).trigger("enterBreakpoint"+d.breakpoints[i])}}if(b!=h){b=h}},250)}})(jQuery); -------------------------------------------------------------------------------- /src/main/resources/static/css/jqvmap.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQVMap Version 1.0 3 | * 4 | * http://jqvmap.com 5 | * 6 | * Copyright 2012, Peter Schmalfeldt 7 | * Licensed under the MIT license. 8 | * 9 | * Fork Me @ https://github.com/manifestinteractive/jqvmap 10 | */ 11 | .jqvmap-label 12 | { 13 | position: absolute; 14 | display: none; 15 | -webkit-border-radius: 3px; 16 | -moz-border-radius: 3px; 17 | border-radius: 3px; 18 | background: #292929; 19 | color: white; 20 | font-family: sans-serif, Verdana; 21 | font-size: smaller; 22 | padding: 3px; 23 | } 24 | .jqvmap-zoomin, .jqvmap-zoomout 25 | { 26 | position: absolute; 27 | left: 10px; 28 | -webkit-border-radius: 3px; 29 | -moz-border-radius: 3px; 30 | border-radius: 3px; 31 | background: #000000; 32 | padding: 3px; 33 | color: white; 34 | width: 10px; 35 | height: 10px; 36 | cursor: pointer; 37 | line-height: 10px; 38 | text-align: center; 39 | } 40 | .jqvmap-zoomin 41 | { 42 | top: 10px; 43 | } 44 | .jqvmap-zoomout 45 | { 46 | top: 30px; 47 | } 48 | .jqvmap-region 49 | { 50 | cursor: pointer; 51 | } 52 | .jqvmap-ajax_response 53 | { 54 | width: 100%; 55 | height: 500px; 56 | } -------------------------------------------------------------------------------- /src/main/resources/static/layui/lay/modules/code.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.1.7 MIT License By http://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/resources/static/js/jquery.cookie.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery Cookie Plugin v1.3.1 3 | * https://github.com/carhartl/jquery-cookie 4 | * 5 | * Copyright 2013 Klaus Hartl 6 | * Released under the MIT license 7 | */ 8 | (function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a)}else{a(jQuery)}}(function(e){var a=/\+/g;function d(g){return g}function b(g){return decodeURIComponent(g.replace(a," "))}function f(g){if(g.indexOf('"')===0){g=g.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\")}try{return c.json?JSON.parse(g):g}catch(h){}}var c=e.cookie=function(p,o,u){if(o!==undefined){u=e.extend({},c.defaults,u);if(typeof u.expires==="number"){var q=u.expires,s=u.expires=new Date();s.setDate(s.getDate()+q)}o=c.json?JSON.stringify(o):String(o);return(document.cookie=[c.raw?p:encodeURIComponent(p),"=",c.raw?o:encodeURIComponent(o),u.expires?"; expires="+u.expires.toUTCString():"",u.path?"; path="+u.path:"",u.domain?"; domain="+u.domain:"",u.secure?"; secure":""].join(""))}var g=c.raw?d:b;var r=document.cookie.split("; ");var v=p?undefined:{};for(var n=0,k=r.length;n' + 30 | 'Updated!' + 31 | ''); 32 | }, 1000); 33 | }); 34 | 35 | } 36 | 37 | return { 38 | //main function to initiate the module 39 | init: function () { 40 | initModals(); 41 | } 42 | 43 | }; 44 | 45 | }(); -------------------------------------------------------------------------------- /src/main/java/priv/jesse/mall/service/UserService.java: -------------------------------------------------------------------------------- 1 | package priv.jesse.mall.service; 2 | 3 | import org.springframework.data.domain.Example; 4 | import org.springframework.data.domain.Page; 5 | import org.springframework.data.domain.Pageable; 6 | import priv.jesse.mall.entity.User; 7 | 8 | import java.util.List; 9 | 10 | public interface UserService { 11 | /** 12 | * 根据id查询 13 | * 14 | * @param id 15 | * @return 16 | */ 17 | User findById(int id); 18 | 19 | /** 20 | * 分页查询所有 21 | * 22 | * @param pageable 23 | * @return 24 | */ 25 | Page findAll(Pageable pageable); 26 | 27 | /** 28 | * 按条件查询 29 | * 30 | * @param example 31 | * @return 32 | */ 33 | List findAllExample(Example example); 34 | 35 | /** 36 | * 更新 37 | * 38 | * @param user 39 | * @return 40 | */ 41 | void update(User user); 42 | 43 | /** 44 | * 创建 45 | * 46 | * @param user 47 | * @return 48 | */ 49 | int create(User user); 50 | 51 | /** 52 | * 根据Id删除 53 | * 54 | * @param id 55 | * @return 56 | */ 57 | void delById(int id); 58 | 59 | /** 60 | * 根据用户名查询 61 | * @param username 62 | * @return 63 | */ 64 | List findByUsername(String username); 65 | 66 | /** 67 | * 检查登录 68 | * @param username 69 | * @param password 70 | * @return 71 | */ 72 | User checkLogin(String username,String password); 73 | 74 | 75 | } 76 | -------------------------------------------------------------------------------- /src/main/java/priv/jesse/mall/service/AdminUserService.java: -------------------------------------------------------------------------------- 1 | package priv.jesse.mall.service; 2 | 3 | import org.springframework.data.domain.Example; 4 | import org.springframework.data.domain.Page; 5 | import org.springframework.data.domain.Pageable; 6 | import org.springframework.http.HttpRequest; 7 | import priv.jesse.mall.entity.AdminUser; 8 | 9 | import javax.servlet.http.HttpServletRequest; 10 | import java.util.List; 11 | 12 | public interface AdminUserService { 13 | /** 14 | * 根据id查询 15 | * 16 | * @param id 17 | * @return 18 | */ 19 | AdminUser findById(int id); 20 | 21 | /** 22 | * 分页查询所有 23 | * 24 | * @param pageable 25 | * @return 26 | */ 27 | Page findAll(Pageable pageable); 28 | 29 | /** 30 | * 按条件查询 31 | * 32 | * @param example 33 | * @return 34 | */ 35 | List findAllExample(Example example); 36 | 37 | /** 38 | * 更新 39 | * 40 | * @param adminUser 41 | * @return 42 | */ 43 | void update(AdminUser adminUser); 44 | 45 | /** 46 | * 创建 47 | * 48 | * @param adminUser 49 | * @return 50 | */ 51 | int create(AdminUser adminUser); 52 | 53 | /** 54 | * 根据Id删除 55 | * 56 | * @param id 57 | * @return 58 | */ 59 | void delById(int id); 60 | 61 | /** 62 | * 检查登录 63 | * @param request 64 | * @param username 65 | * @param pwd 66 | * @return 67 | */ 68 | AdminUser checkLogin(HttpServletRequest request,String username, String pwd); 69 | 70 | } 71 | -------------------------------------------------------------------------------- /src/main/java/priv/jesse/mall/dao/ProductDao.java: -------------------------------------------------------------------------------- 1 | package priv.jesse.mall.dao; 2 | 3 | import org.springframework.data.domain.Page; 4 | import org.springframework.data.domain.Pageable; 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.data.jpa.repository.Query; 7 | import priv.jesse.mall.entity.Product; 8 | 9 | import java.util.Date; 10 | import java.util.List; 11 | 12 | public interface ProductDao extends JpaRepository { 13 | /** 14 | * 通过二级分类查找商品列表 15 | * 16 | * @param csid 17 | * @param pageable 18 | * @return 19 | */ 20 | List findByCsid(int csid, Pageable pageable); 21 | 22 | List findByCsidIn(List csids,Pageable pageable); 23 | 24 | /** 25 | * 通过标题搜索商品 26 | * 27 | * @param keyword 28 | * @param pageable 29 | * @return 30 | */ 31 | List findByTitleIsLike(String keyword, Pageable pageable); 32 | 33 | /** 34 | * 查找某个日期之后上架的商品 35 | * @param date 36 | * @param pageable 37 | * @return 38 | */ 39 | List findByPdateAfter(Date date, Pageable pageable); 40 | 41 | /** 42 | * 查找热门商品 43 | * @param isHot 44 | * @param pageable 45 | * @return 46 | */ 47 | List findByIsHot(int isHot,Pageable pageable); 48 | 49 | /** 50 | * 查询最新商品,最近上新的24个商品 51 | * @param pageable 52 | * @return 53 | */ 54 | @Query(value = "SELECT * FROM (SELECT * FROM product ORDER BY pdate DESC limit 0,24) a /*#pageable*/",nativeQuery = true) 55 | List findNew(Pageable pageable); 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/priv/jesse/mall/service/ClassificationService.java: -------------------------------------------------------------------------------- 1 | package priv.jesse.mall.service; 2 | 3 | import org.springframework.data.domain.Example; 4 | import org.springframework.data.domain.Page; 5 | import org.springframework.data.domain.Pageable; 6 | import priv.jesse.mall.entity.Classification; 7 | 8 | import java.util.List; 9 | 10 | public interface ClassificationService { 11 | /** 12 | * 根据id查询 13 | * 14 | * @param id 15 | * @return 16 | */ 17 | Classification findById(int id); 18 | 19 | /** 20 | * 按分类查询所有 21 | * 22 | * @param type 23 | * @return 24 | */ 25 | List findAll(int type); 26 | 27 | /** 28 | * 按分类查询所有 29 | * 30 | * @param pageable 31 | * @return 32 | */ 33 | Page findAll(int type,Pageable pageable); 34 | 35 | /** 36 | * 按条件查询 37 | * 38 | * @param example 39 | * @return 40 | */ 41 | List findAllExample(Example example); 42 | 43 | /** 44 | * 更新 45 | * 46 | * @param Classification 47 | * @return 48 | */ 49 | void update(Classification Classification); 50 | 51 | /** 52 | * 创建 53 | * 54 | * @param Classification 55 | * @return 56 | */ 57 | int create(Classification Classification); 58 | 59 | /** 60 | * 根据Id删除 61 | * 62 | * @param id 63 | * @return 64 | */ 65 | void delById(int id); 66 | 67 | /** 68 | * 通过一级分类id查找它所有的二级分类 69 | * @param cid 70 | * @return 71 | */ 72 | List findByParentId(int cid); 73 | } 74 | -------------------------------------------------------------------------------- /src/main/java/priv/jesse/mall/service/ProductService.java: -------------------------------------------------------------------------------- 1 | package priv.jesse.mall.service; 2 | 3 | import org.springframework.data.domain.Page; 4 | import org.springframework.data.domain.Pageable; 5 | import priv.jesse.mall.entity.Product; 6 | import java.util.List; 7 | 8 | public interface ProductService { 9 | /** 10 | * 根据id查询 11 | * 12 | * @param id 13 | * @return 14 | */ 15 | Product findById(int id); 16 | 17 | /** 18 | * 分页查询所有 19 | * 20 | * @param pageable 21 | * @return 22 | */ 23 | Page findAll(Pageable pageable); 24 | 25 | /** 26 | * 查找热门商品 27 | * @return 28 | */ 29 | List findHotProduct(); 30 | 31 | /** 32 | * 查找最新商品 33 | * @param pageable 34 | * @return 35 | */ 36 | List findNewProduct(Pageable pageable); 37 | 38 | /** 39 | * 根据一级分类查找商品 40 | * @param cid 41 | * @param pageable 42 | * @return 43 | */ 44 | List findByCid(int cid,Pageable pageable); 45 | 46 | /** 47 | * 根据二级分类查找商品 48 | * @param csid 49 | * @param pageable 50 | * @return 51 | */ 52 | List findByCsid(int csid,Pageable pageable); 53 | 54 | /** 55 | * 更新 56 | * 57 | * @param product 58 | * @return 59 | */ 60 | void update(Product product); 61 | 62 | /** 63 | * 创建 64 | * 65 | * @param product 66 | * @return 67 | */ 68 | int create(Product product); 69 | 70 | /** 71 | * 根据Id删除 72 | * 73 | * @param id 74 | * @return 75 | */ 76 | void delById(int id); 77 | 78 | } 79 | -------------------------------------------------------------------------------- /src/main/resources/static/js/jquery.pulsate.min.js: -------------------------------------------------------------------------------- 1 | (function(c){var i={init:function(a){var b={color:c(this).css("background-color"),reach:20,speed:1E3,pause:0,glow:!0,repeat:!0,onHover:!1};c(this).css({"-moz-outline-radius":c(this).css("border-top-left-radius"),"-webkit-outline-radius":c(this).css("border-top-left-radius"),"outline-radius":c(this).css("border-top-left-radius")});a&&c.extend(b,a);b.color=c("
").css("background-color");b.repeat!==!0&&!isNaN(b.repeat)&&b.repeat>0&&(b.repeat-=1);return this.each(function(){b.onHover? 2 | c(this).bind("mouseover",function(){g(b,this,0)}).bind("mouseout",function(){c(this).pulsate("destroy")}):g(b,this,0)})},destroy:function(){return this.each(function(){clearTimeout(this.timer);c(this).css("outline",0)})}},g=function(a,b,d){var f=a.reach;d=d>f?0:d;var h=(f-d)/f,e=a.color.split(",");h="rgba("+e[0].split("(")[1]+","+e[1]+","+e[2].split(")")[0]+","+h+")";e={outline:"2px solid "+h};a.glow?(e["box-shadow"]="0px 0px "+parseInt(d/1.5)+"px "+h,c.browser.webkit&&(e["outline-offset"]=d+"px", 3 | e["outline-radius"]="100 px")):e["outline-offset"]=d+"px";c(b).css(e);b.timer=setTimeout(function(){if(d>=f&&!a.repeat)return c(b).pulsate("destroy"),!1;else if(d>=f&&a.repeat!==!0&&!isNaN(a.repeat)&&a.repeat>0)a.repeat-=1;else if(a.pause&&d>=f)return j(a,b,d+1),!1;g(a,b,d+1)},a.speed/f)},j=function(a,b,c){innerfunc=function(){g(a,b,c)};setTimeout(innerfunc,a.pause)};c.fn.pulsate=function(a){if(i[a])return i[a].apply(this,Array.prototype.slice.call(arguments,1));else if(typeof a==="object"||!a)return i.init.apply(this, 4 | arguments);else c.error("Method "+a+" does not exist on jQuery.pulsate")}})(jQuery); -------------------------------------------------------------------------------- /src/main/resources/static/js/form-samples.js: -------------------------------------------------------------------------------- 1 | var FormSamples = function () { 2 | 3 | 4 | return { 5 | //main function to initiate the module 6 | init: function () { 7 | 8 | // use select2 dropdown instead of chosen as select2 works fine with bootstrap on responsive layouts. 9 | $('.select2_category').select2({ 10 | placeholder: "Select an option", 11 | allowClear: true 12 | }); 13 | 14 | $('.select2_sample1').select2({ 15 | placeholder: "Select a State", 16 | allowClear: true 17 | }); 18 | 19 | $(".select2_sample2").select2({ 20 | placeholder: "Type to select an option", 21 | allowClear: true, 22 | minimumInputLength: 1, 23 | query: function (query) { 24 | var data = { 25 | results: [] 26 | }, i, j, s; 27 | for (i = 1; i < 5; i++) { 28 | s = ""; 29 | for (j = 0; j < i; j++) { 30 | s = s + query.term; 31 | } 32 | data.results.push({ 33 | id: query.term + i, 34 | text: s 35 | }); 36 | } 37 | query.callback(data); 38 | } 39 | }); 40 | 41 | $(".select2_sample3").select2({ 42 | tags: ["red", "green", "blue", "yellow", "pink"] 43 | }); 44 | 45 | } 46 | 47 | }; 48 | 49 | }(); -------------------------------------------------------------------------------- /src/main/java/priv/jesse/mall/utils/Helper.java: -------------------------------------------------------------------------------- 1 | package priv.jesse.mall.utils; 2 | 3 | /** 4 | * @author hfb 5 | * @date 2017/9/29 6 | */ 7 | public class Helper { 8 | private static String key = "wow!@#$%"; 9 | 10 | public static boolean isStringInArray(String str, String[] array){ 11 | for (String val:array){ 12 | if(str.equals(val)){ 13 | return true; 14 | } 15 | } 16 | return false; 17 | } 18 | 19 | public static String encode(String str){ 20 | String enStr = ""; 21 | try { 22 | enStr = DesUtil.encrypt(str, key); 23 | } catch (Exception e) { 24 | e.printStackTrace(); 25 | } 26 | 27 | return enStr; 28 | } 29 | 30 | public static String decode(String str) { 31 | String deStr = ""; 32 | try { 33 | deStr = DesUtil.decrypt(str, key); 34 | } catch (Exception e) { 35 | e.printStackTrace(); 36 | } 37 | 38 | return deStr; 39 | } 40 | 41 | public static String bytesToHex(byte bytes[], int start, int end) { 42 | StringBuilder sb = new StringBuilder(); 43 | for (int i = start; i < start + end; i++) { 44 | sb.append(byteToHex(bytes[i])); 45 | } 46 | return sb.toString(); 47 | } 48 | 49 | /** 50 | * 16进制字符集 51 | */ 52 | private static final char HEX_DIGITS[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'}; 53 | 54 | /** 55 | * 将单个字节码转换成16进制字符串 * @param bt 目标字节 * @return 转换结果 56 | */ 57 | public static String byteToHex(byte bt) { 58 | return HEX_DIGITS[(bt & 0xf0) >> 4] + "" + HEX_DIGITS[bt & 0xf]; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/priv/jesse/mall/utils/FileUtil.java: -------------------------------------------------------------------------------- 1 | package priv.jesse.mall.utils; 2 | 3 | import org.springframework.web.multipart.MultipartFile; 4 | 5 | import java.io.File; 6 | import java.nio.file.Files; 7 | import java.nio.file.Paths; 8 | import java.nio.file.StandardOpenOption; 9 | import java.security.MessageDigest; 10 | 11 | public class FileUtil { 12 | 13 | /** 14 | * 保存上传的文件 15 | * 16 | * @param file 17 | * @return 文件下载的url 18 | * @throws Exception 19 | */ 20 | public static String saveFile(MultipartFile file) throws Exception { 21 | if (file == null || file.isEmpty()) 22 | return ""; 23 | File target = new File("file"); 24 | if (!target.isDirectory()) { 25 | target.mkdirs(); 26 | } 27 | String originalFilename = file.getOriginalFilename(); 28 | MessageDigest md = MessageDigest.getInstance("MD5"); 29 | md.update(file.getBytes()); 30 | String fileName = (Helper.bytesToHex(md.digest(),0,md.digest().length-1)) + "." + getPostfix(originalFilename); 31 | File file1 = new File(target.getPath() + "/" + fileName); 32 | Files.write(Paths.get(file1.toURI()), file.getBytes(), StandardOpenOption.CREATE_NEW); 33 | return "/mall/admin/product/img/" + fileName; 34 | } 35 | 36 | /** 37 | * 获得文件的后缀名 38 | * 39 | * @param fileName 40 | * @return 41 | */ 42 | public static String getPostfix(String fileName) { 43 | if (fileName == null || "".equals(fileName.trim())) { 44 | return ""; 45 | } 46 | if (fileName.contains(".")) { 47 | return fileName.substring(fileName.lastIndexOf(".") + 1, fileName.length()); 48 | } 49 | return ""; 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/main/resources/static/js/ui-nestable.js: -------------------------------------------------------------------------------- 1 | var UINestable = function () { 2 | 3 | var updateOutput = function (e) { 4 | var list = e.length ? e : $(e.target), 5 | output = list.data('output'); 6 | if (window.JSON) { 7 | output.val(window.JSON.stringify(list.nestable('serialize'))); //, null, 2)); 8 | } else { 9 | output.val('JSON browser support required for this demo.'); 10 | } 11 | }; 12 | 13 | 14 | return { 15 | //main function to initiate the module 16 | init: function () { 17 | 18 | // activate Nestable for list 1 19 | $('#nestable_list_1').nestable({ 20 | group: 1 21 | }) 22 | .on('change', updateOutput); 23 | 24 | // activate Nestable for list 2 25 | $('#nestable_list_2').nestable({ 26 | group: 1 27 | }) 28 | .on('change', updateOutput); 29 | 30 | // output initial serialised data 31 | updateOutput($('#nestable_list_1').data('output', $('#nestable_list_1_output'))); 32 | updateOutput($('#nestable_list_2').data('output', $('#nestable_list_2_output'))); 33 | 34 | $('#nestable_list_menu').on('click', function (e) { 35 | var target = $(e.target), 36 | action = target.data('action'); 37 | if (action === 'expand-all') { 38 | $('.dd').nestable('expandAll'); 39 | } 40 | if (action === 'collapse-all') { 41 | $('.dd').nestable('collapseAll'); 42 | } 43 | }); 44 | 45 | $('#nestable_list_3').nestable(); 46 | 47 | } 48 | 49 | }; 50 | 51 | }(); -------------------------------------------------------------------------------- /src/main/resources/templates/error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | SkyMall | 商城 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 |
21 |
22 |
23 |

24 |
25 |

6 秒后返回...

26 |
27 | 41 |
42 | 43 |
44 | 45 | -------------------------------------------------------------------------------- /src/main/resources/static/layui/lay/modules/laytpl.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.1.7 MIT License By http://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/resources/static/layui/lay/modules/util.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.1.7 MIT License By http://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var t=layui.$,o={fixbar:function(e){var o,i,a="layui-fixbar",l="layui-fixbar-top",n=t(document),r=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,""],u=t(['
    ',e.bar1?'
  • '+c[0]+"
  • ":"",e.bar2?'
  • '+c[1]+"
  • ":"",'
  • '+c[2]+"
  • ","
"].join("")),s=u.find("."+l),b=function(){var t=n.scrollTop();t>=e.showHeight?o||(s.show(),o=1):o&&(s.hide(),o=0)};t("."+a)[0]||("object"==typeof e.css&&u.css(e.css),r.append(u),b(),u.find("li").on("click",function(){var o=t(this),i=o.attr("lay-type");"top"===i&&t("html,body").animate({scrollTop:0},200),e.click&&e.click.call(this,i)}),n.on("scroll",function(){clearTimeout(i),i=setTimeout(function(){b()},100)}))},countdown:function(e,t,o){var i=this,a="function"==typeof t,l=new Date(e).getTime(),n=new Date(!t||a?(new Date).getTime():t).getTime(),r=l-n,c=[Math.floor(r/864e5),Math.floor(r/36e5)%24,Math.floor(r/6e4)%60,Math.floor(r/1e3)%60];a&&(o=t);var u=setTimeout(function(){i.countdown(e,n+1e3,o)},1e3);return o&&o(r>0?c:[0,0,0,0],t,u),r<=0&&clearTimeout(u),u},timeAgo:function(e,t){var o=[[],[]],i=(new Date).getTime()-new Date(e).getTime();return i>6912e5?(i=new Date(e),o[0][0]=i.getFullYear(),o[0][1]=i.getMonth()+1,o[0][2]=i.getDate(),t||(o[1][0]=i.getHours(),o[1][1]=i.getMinutes(),o[1][2]=i.getSeconds()),o[0].join("-")+" "+o[1].join(":")):i>=864e5?(i/1e3/60/60/24|0)+"天前":i>=36e5?(i/1e3/60/60|0)+"小时前":i>=12e4?(i/1e3/60|0)+"分钟前":i<0?"未来":"刚刚"}};e("util",o)}); -------------------------------------------------------------------------------- /src/main/resources/static/css/jquery.fileupload-ui.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | /* 3 | * jQuery File Upload UI Plugin CSS 6.10 4 | * https://github.com/blueimp/jQuery-File-Upload 5 | * 6 | * Copyright 2010, Sebastian Tschan 7 | * https://blueimp.net 8 | * 9 | * Licensed under the MIT license: 10 | * http://www.opensource.org/licenses/MIT 11 | */ 12 | 13 | .fileinput-button { 14 | position: relative; 15 | overflow: hidden; 16 | float: left; 17 | margin-right: 4px; 18 | } 19 | .fileinput-button input { 20 | position: absolute; 21 | top: 0; 22 | right: 0; 23 | margin: 0; 24 | opacity: 0; 25 | filter: alpha(opacity=0); 26 | transform: translate(-300px, 0) scale(4); 27 | font-size: 23px; 28 | direction: ltr; 29 | cursor: pointer; 30 | } 31 | .fileupload-buttonbar .btn, 32 | .fileupload-buttonbar .toggle { 33 | margin-bottom: 5px; 34 | } 35 | .files .progress { 36 | width: 200px; 37 | } 38 | .progress-animated .bar { 39 | background: url(../image/progressbar.gif) !important; 40 | filter: none; 41 | } 42 | .fileupload-loading { 43 | position: absolute; 44 | left: 50%; 45 | width: 128px; 46 | height: 128px; 47 | background: url(../image/loading.gif) center no-repeat; 48 | display: none; 49 | } 50 | .fileupload-processing .fileupload-loading { 51 | display: block; 52 | } 53 | 54 | /* Fix for IE 6: */ 55 | * html .fileinput-button { 56 | line-height: 24px; 57 | margin: 1px -3px 0 0; 58 | } 59 | 60 | /* Fix for IE 7: */ 61 | * + html .fileinput-button { 62 | padding: 2px 15px; 63 | margin: 1px 0 0 0; 64 | } 65 | 66 | @media (max-width: 767px) { 67 | .files .btn span { 68 | display: none; 69 | } 70 | .files .preview * { 71 | width: 40px; 72 | } 73 | .files .name * { 74 | width: 80px; 75 | display: inline-block; 76 | word-wrap: break-word; 77 | } 78 | .files .progress { 79 | width: 20px; 80 | } 81 | .files .delete { 82 | width: 60px; 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /src/main/java/priv/jesse/mall/service/impl/UserServiceImpl.java: -------------------------------------------------------------------------------- 1 | package priv.jesse.mall.service.impl; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.data.domain.Example; 5 | import org.springframework.data.domain.Page; 6 | import org.springframework.data.domain.Pageable; 7 | import org.springframework.stereotype.Service; 8 | import priv.jesse.mall.dao.UserDao; 9 | import priv.jesse.mall.entity.User; 10 | import priv.jesse.mall.service.UserService; 11 | 12 | import java.util.List; 13 | 14 | @Service 15 | public class UserServiceImpl implements UserService { 16 | @Autowired 17 | private UserDao userDao; 18 | 19 | @Override 20 | public User findById(int id) { 21 | return userDao.getOne(id); 22 | } 23 | 24 | @Override 25 | public Page findAll(Pageable pageable) { 26 | return userDao.findAll(pageable); 27 | } 28 | 29 | @Override 30 | public List findAllExample(Example example) { 31 | return userDao.findAll(example); 32 | } 33 | 34 | @Override 35 | public void update(User user) { 36 | userDao.save(user); 37 | } 38 | 39 | @Override 40 | public int create(User user) { 41 | return userDao.save(user).getId(); 42 | } 43 | 44 | @Override 45 | public void delById(int id) { 46 | userDao.delete(id); 47 | } 48 | 49 | /** 50 | * 根据用户名查询 51 | * 52 | * @param username 53 | * @return 54 | */ 55 | @Override 56 | public List findByUsername(String username) { 57 | return userDao.findByUsername(username); 58 | } 59 | 60 | /** 61 | * 检查登录 62 | * 63 | * @param username 64 | * @param password 65 | * @return 66 | */ 67 | @Override 68 | public User checkLogin(String username, String password) { 69 | return userDao.findByUsernameAndPassword(username, password); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /boot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # description: Auto-starts boot 3 | # $API_HOME/bin/boot.sh 4 | #启动命令: boot.sh start 5 | #重启命令: boot.sh restart 6 | #关闭命令: boot.sh stop 7 | #是否运行: boot.sh status 8 | 9 | CURRENT_DIR=`dirname $0` 10 | API_HOME=`cd "$CURRENT_DIR/.." >/dev/null; pwd` 11 | # 应用名 12 | Tag="mall" 13 | cd $API_HOME 14 | # 要执行的jar包 15 | Jar="$API_HOME/mall.jar" 16 | RETVAL="0" 17 | 18 | # See how we were called. 19 | start() 20 | { 21 | echo $$ > $API_HOME/api.pid 22 | nohup java \ 23 | -XX:-UseGCOverheadLimit \ 24 | -verbose:gc -Xloggc:jvm-gc.log \ 25 | -Dappliction=$Tag \ 26 | -jar $Jar --spring.config.location=$API_HOME/config > $API_HOME/log/api_stdout.log 2>&1 & 27 | echo "$Tag started!" 28 | # 这句是启动后查看控制台输出 29 | tail -f -n 0 $API_HOME/log/api_stdout.log 30 | } 31 | 32 | 33 | stop() 34 | { 35 | pid=$(ps -ef | grep -v 'grep' | egrep "$Jar"| awk '{printf $2 " "}') 36 | if [ "$pid" != "" ]; then 37 | echo -n "$Tag ( pid: $pid) is running" 38 | echo 39 | echo -n "Shutting down $Tag..." 40 | echo 41 | kill -9 "$pid" > /dev/null 2>&1 42 | fi 43 | status 44 | 45 | } 46 | 47 | status() 48 | { 49 | pid=$(ps -ef | grep -v 'grep' | egrep "$Jar"| awk '{printf $2 " "}') 50 | #echo "$pid" 51 | if [ "$pid" != "" ]; then 52 | echo "$Tag is running,pid is $pid" 53 | else 54 | echo "$Tag is stopped" 55 | fi 56 | } 57 | 58 | 59 | 60 | usage() 61 | { 62 | echo "Usage: $0 {start|stop|restart|status}" 63 | RETVAL="2" 64 | } 65 | 66 | # See how we were called. 67 | RETVAL="0" 68 | case "$1" in 69 | start) 70 | start 71 | ;; 72 | stop) 73 | stop 74 | ;; 75 | restart) 76 | stop 77 | start 78 | ;; 79 | reload) 80 | RETVAL="3" 81 | ;; 82 | status) 83 | status 84 | ;; 85 | *) 86 | usage 87 | ;; 88 | esac 89 | 90 | exit $RETVAL 91 | -------------------------------------------------------------------------------- /src/main/resources/static/layui/lay/modules/flow.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.1.7 MIT License By http://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/java/priv/jesse/mall/service/impl/AdminUserServiceImpl.java: -------------------------------------------------------------------------------- 1 | package priv.jesse.mall.service.impl; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.data.domain.Example; 5 | import org.springframework.data.domain.Page; 6 | import org.springframework.data.domain.Pageable; 7 | import org.springframework.stereotype.Service; 8 | import priv.jesse.mall.dao.AdminUserDao; 9 | import priv.jesse.mall.entity.AdminUser; 10 | import priv.jesse.mall.service.AdminUserService; 11 | import priv.jesse.mall.service.exception.LoginException; 12 | 13 | import javax.servlet.http.HttpServletRequest; 14 | import java.util.List; 15 | 16 | @Service 17 | public class AdminUserServiceImpl implements AdminUserService { 18 | @Autowired 19 | private AdminUserDao adminUserDao; 20 | 21 | @Override 22 | public AdminUser findById(int id) { 23 | return adminUserDao.getOne(id); 24 | } 25 | 26 | @Override 27 | public Page findAll(Pageable pageable) { 28 | return adminUserDao.findAll(pageable); 29 | } 30 | 31 | @Override 32 | public List findAllExample(Example example) { 33 | return adminUserDao.findAll(example); 34 | } 35 | 36 | @Override 37 | public void update(AdminUser adminUser) { 38 | adminUserDao.save(adminUser); 39 | } 40 | 41 | @Override 42 | public int create(AdminUser adminUser) { 43 | AdminUser adminUser1 = adminUserDao.save(adminUser); 44 | return adminUser.getId(); 45 | } 46 | 47 | @Override 48 | public void delById(int id) { 49 | adminUserDao.delete(id); 50 | } 51 | 52 | @Override 53 | public AdminUser checkLogin(HttpServletRequest request, String username, String pwd) { 54 | AdminUser adminUser = adminUserDao.findByUsernameAndPassword(username, pwd); 55 | if (adminUser != null) { 56 | request.getSession().setAttribute("login_user", adminUser); 57 | } else { 58 | throw new LoginException("用户名或密码错误"); 59 | } 60 | return adminUser; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/resources/static/js/maps-vector.js: -------------------------------------------------------------------------------- 1 | var MapsVector = function () { 2 | 3 | var setMap = function (name) { 4 | var data = { 5 | map: 'world_en', 6 | backgroundColor: null, 7 | borderColor: '#333333', 8 | borderOpacity: 0.5, 9 | borderWidth: 1, 10 | color: '#c6c6c6', 11 | enableZoom: true, 12 | hoverColor: '#c9dfaf', 13 | hoverOpacity: null, 14 | values: sample_data, 15 | normalizeFunction: 'linear', 16 | scaleColors: ['#b6da93', '#427d1a'], 17 | selectedColor: '#c9dfaf', 18 | selectedRegion: null, 19 | showTooltip: true, 20 | onRegionOver: function (event, code) { 21 | //sample to interact with map 22 | if (code == 'ca') { 23 | event.preventDefault(); 24 | } 25 | }, 26 | onRegionClick: function (element, code, region) { 27 | //sample to interact with map 28 | var message = 'You clicked "' + region + '" which has the code: ' + code.toUpperCase(); 29 | alert(message); 30 | } 31 | }; 32 | 33 | data.map = name + '_en'; 34 | var map = jQuery('#vmap_' + name); 35 | if (!map) { 36 | return; 37 | } 38 | map.width(map.parent().width()); 39 | map.vectorMap(data); 40 | } 41 | 42 | 43 | return { 44 | //main function to initiate map samples 45 | init: function () { 46 | setMap("world"); 47 | setMap("usa"); 48 | setMap("europe"); 49 | setMap("russia"); 50 | setMap("germany"); 51 | 52 | // redraw maps on window or content resized 53 | App.addResponsiveHandler(function(){ 54 | setMap("world"); 55 | setMap("usa"); 56 | setMap("europe"); 57 | setMap("russia"); 58 | setMap("germany"); 59 | }); 60 | } 61 | 62 | }; 63 | 64 | }(); -------------------------------------------------------------------------------- /src/main/java/priv/jesse/mall/web/admin/AdminController.java: -------------------------------------------------------------------------------- 1 | package priv.jesse.mall.web.admin; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.stereotype.Controller; 5 | import org.springframework.web.bind.annotation.RequestMapping; 6 | import org.springframework.web.bind.annotation.RequestMethod; 7 | import org.springframework.web.bind.annotation.ResponseBody; 8 | import priv.jesse.mall.entity.AdminUser; 9 | import priv.jesse.mall.entity.pojo.ResultBean; 10 | import priv.jesse.mall.service.AdminUserService; 11 | 12 | import javax.servlet.http.HttpServletRequest; 13 | import javax.servlet.http.HttpServletResponse; 14 | import java.io.IOException; 15 | 16 | @Controller 17 | @RequestMapping("/admin") 18 | public class AdminController { 19 | @Autowired 20 | private AdminUserService adminUserService; 21 | 22 | /** 23 | * 访问首页 24 | * 25 | * @return 26 | */ 27 | @RequestMapping("/toIndex.html") 28 | public String toIndex() { 29 | return "admin/index"; 30 | } 31 | 32 | /** 33 | * 访问登录页面 34 | * 35 | * @return 36 | */ 37 | @RequestMapping("/toLogin.html") 38 | public String toLogin() { 39 | return "admin/login"; 40 | } 41 | 42 | /** 43 | * 登录请求 44 | * 45 | * @param username 46 | * @param password 47 | */ 48 | //@ResponseBody 49 | @RequestMapping(method = RequestMethod.POST, value = "/login.do") 50 | public void login(String username, String password, HttpServletRequest request, HttpServletResponse response) throws IOException { 51 | AdminUser adminUser = adminUserService.checkLogin(request, username, password); 52 | response.sendRedirect("/mall/admin/toIndex.html"); 53 | } 54 | 55 | /** 56 | * 退出登录 57 | * @param request 58 | * @param response 59 | * @throws IOException 60 | */ 61 | @RequestMapping("/logout.do") 62 | public void logout(HttpServletRequest request, HttpServletResponse response) throws IOException { 63 | request.getSession().removeAttribute("login_user"); 64 | response.sendRedirect("toLogin.html"); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/main/java/priv/jesse/mall/service/impl/ClassificationServiceImpl.java: -------------------------------------------------------------------------------- 1 | package priv.jesse.mall.service.impl; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.data.domain.Example; 5 | import org.springframework.data.domain.Page; 6 | import org.springframework.data.domain.Pageable; 7 | import org.springframework.stereotype.Service; 8 | import priv.jesse.mall.dao.ClassificationDao; 9 | import priv.jesse.mall.entity.Classification; 10 | import priv.jesse.mall.service.ClassificationService; 11 | 12 | import java.util.List; 13 | 14 | @Service 15 | public class ClassificationServiceImpl implements ClassificationService { 16 | @Autowired 17 | private ClassificationDao classificationDao; 18 | 19 | @Override 20 | public Classification findById(int id) { 21 | return classificationDao.getOne(id); 22 | } 23 | 24 | @Override 25 | public List findAll(int type) { 26 | return classificationDao.findByType(type); 27 | } 28 | 29 | /** 30 | * 按分类查询所有 31 | * 32 | * @param pageable 33 | * @return 34 | */ 35 | @Override 36 | public Page findAll(int type, Pageable pageable) { 37 | return classificationDao.findByType(type, pageable); 38 | } 39 | 40 | @Override 41 | public List findAllExample(Example example) { 42 | return classificationDao.findAll(example); 43 | } 44 | 45 | @Override 46 | public void update(Classification classification) { 47 | classificationDao.save(classification); 48 | } 49 | 50 | @Override 51 | public int create(Classification classification) { 52 | Classification classification1 = classificationDao.save(classification); 53 | return classification.getId(); 54 | } 55 | 56 | @Override 57 | public void delById(int id) { 58 | classificationDao.delete(id); 59 | } 60 | 61 | /** 62 | * 通过一级分类id查找它所有的二级分类 63 | * 64 | * @param cid 65 | * @return 66 | */ 67 | @Override 68 | public List findByParentId(int cid) { 69 | return classificationDao.findByParentId(cid); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/main/resources/static/js/jquery.bootpag.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | bootpag - jQuery plugin for dynamic pagination 4 | 5 | Copyright (c) 2013 botmonster@7items.com 6 | 7 | Licensed under the MIT license: 8 | http://www.opensource.org/licenses/mit-license.php 9 | 10 | Project home: 11 | http://botmonster.com/jquery-bootpag/ 12 | 13 | Version: 1.0.4 14 | 15 | */ 16 | (function(f,q){f.fn.bootpag=function(p){function k(e,b){var c,d=0==a.maxVisible?1:a.maxVisible,n=1==a.maxVisible?0:1,m=Math.floor((b-1)/d)*d,g=e.find("li");a.page=b=0>b?0:b>a.total?a.total:b;g.removeClass("disabled");c=1>b-1?1:a.leaps&&b-1>=a.maxVisible?Math.floor((b-1)/d)*d:b-1;g.first().toggleClass("disabled",1===b).attr("data-lp",c).find("a").attr("href",h(c));n=1==a.maxVisible?0:1;c=b+1>a.total?a.total:a.leaps&&b+1=a.total)return this;!f.isNumeric(a.maxVisible)&&!a.maxVisible&&(a.maxVisible=a.total);l.data("settings",a);return this.each(function(){var e,b,c=f(this),d=['
    '];a.prev&&d.push('");for(b=1;b<=Math.min(a.total,a.maxVisible);b++)d.push('
  • '+b+"
  • ");a.next&&(b=a.leaps&&a.total>a.maxVisible? 19 | Math.min(a.maxVisible+1,a.total):2,d.push('"));d.push("
");c.find("ul.bootpag").remove();c.append(d.join("")).addClass("pagination");e=c.find("ul.bootpag");c.find("li").click(function(){var a=f(this);a.hasClass("disabled")||k(e,parseInt(a.attr("data-lp"),10))});k(e,a.page)})}})(jQuery,window); -------------------------------------------------------------------------------- /src/main/resources/static/js/load-image.min.js: -------------------------------------------------------------------------------- 1 | (function(a){"use strict";var b=function(a,c,d){var e=document.createElement("img"),f,g;return e.onerror=c,e.onload=function(){g&&(!d||!d.noRevoke)&&b.revokeObjectURL(g),c(b.scale(e,d))},window.Blob&&a instanceof Blob||window.File&&a instanceof File?(f=g=b.createObjectURL(a),e._type=a.type):f=a,f?(e.src=f,e):b.readFile(a,function(a){var b=a.target;b&&b.result?e.src=b.result:c(a)})},c=window.createObjectURL&&window||window.URL&&URL.revokeObjectURL&&URL||window.webkitURL&&webkitURL;b.detectSubsampling=function(a){var b=a.width,c=a.height,d,e;return b*c>1048576?(d=document.createElement("canvas"),d.width=d.height=1,e=d.getContext("2d"),e.drawImage(a,-b+1,0),e.getImageData(0,0,1,1).data[3]===0):!1},b.detectVerticalSquash=function(a,b){var c=document.createElement("canvas"),d=c.getContext("2d"),e,f,g,h,i;c.width=1,c.height=b,d.drawImage(a,0,0),e=d.getImageData(0,0,1,b).data,f=0,g=b,h=b;while(h>f)i=e[(h-1)*4+3],i===0?g=h:f=h,h=g+f>>1;return h/b},b.renderImageToCanvas=function(a,c,d,e){var f=a.width,g=a.height,h=c.getContext("2d"),i,j=1024,k=document.createElement("canvas"),l,m,n,o,p;h.save(),b.detectSubsampling(a)&&(f/=2,g/=2),i=b.detectVerticalSquash(a,g),k.width=k.height=j,l=k.getContext("2d"),m=0;while(mg?g-m:j,o=0;while(of?f-o:j,l.clearRect(0,0,j,j),l.drawImage(a,-o,-m),h.drawImage(k,0,0,p,n,Math.floor(o*d/f),Math.floor(m*e/g/i),Math.ceil(p*d/f),Math.ceil(n*e/g/i)),o+=j;m+=j}h.restore(),k=l=null},b.scale=function(a,c){c=c||{};var d=document.createElement("canvas"),e=a.width,f=a.height,g=Math.max((c.minWidth||e)/e,(c.minHeight||f)/f);return g>1&&(e=parseInt(e*g,10),f=parseInt(f*g,10)),g=Math.min((c.maxWidth||e)/e,(c.maxHeight||f)/f),g<1&&(e=parseInt(e*g,10),f=parseInt(f*g,10)),a.getContext||c.canvas&&d.getContext?(d.width=e,d.height=f,a._type==="image/jpeg"?b.renderImageToCanvas(a,d,e,f):d.getContext("2d").drawImage(a,0,0,e,f),d):(a.width=e,a.height=f,a)},b.createObjectURL=function(a){return c?c.createObjectURL(a):!1},b.revokeObjectURL=function(a){return c?c.revokeObjectURL(a):!1},b.readFile=function(a,b){if(window.FileReader&&FileReader.prototype.readAsDataURL){var c=new FileReader;return c.onload=c.onerror=b,c.readAsDataURL(a),c}return!1},typeof define=="function"&&define.amd?define(function(){return b}):a.loadImage=b})(this); -------------------------------------------------------------------------------- /src/main/resources/static/css/multi-select-metro.css: -------------------------------------------------------------------------------- 1 | .ms-container{ 2 | background: transparent url('../image/switch.png') no-repeat 170px 80px; 3 | display: inline-block; 4 | } 5 | 6 | .ms-container:after{ 7 | content: "."; display: block; height: 0; line-height: 0; font-size: 0; clear: both; min-height: 0; visibility: hidden; 8 | } 9 | 10 | .ms-container .ms-selectable, .ms-container .ms-selection{ 11 | 12 | background: #fff; 13 | color: #555555; 14 | float: left; 15 | } 16 | 17 | .ms-container .ms-list{ 18 | -webkit-transition: border linear 0.2s, box-shadow linear 0.2s; 19 | -moz-transition: border linear 0.2s, box-shadow linear 0.2s; 20 | -ms-transition: border linear 0.2s, box-shadow linear 0.2s; 21 | -o-transition: border linear 0.2s, box-shadow linear 0.2s; 22 | transition: border linear 0.2s, box-shadow linear 0.2s; 23 | border: 1px solid #ccc; 24 | -webkit-border-radius: 3px; 25 | -moz-border-radius: 3px; 26 | border-radius: 3px; 27 | } 28 | 29 | 30 | .ms-selected{ 31 | display:none; 32 | } 33 | .ms-container .ms-selectable{ 34 | margin-right: 40px; 35 | } 36 | 37 | .ms-container .ms-list.ms-focus{ 38 | border-color: rgba(82, 168, 236, 0.8); 39 | outline: 0; 40 | outline: thin dotted \9; 41 | } 42 | 43 | .ms-container ul{ 44 | margin: 0; 45 | list-style-type: none; 46 | padding: 0; 47 | } 48 | 49 | .ms-container .ms-optgroup-container{ 50 | width: 100%; 51 | } 52 | 53 | .ms-container ul.ms-list{ 54 | width: 160px; 55 | height: 200px; 56 | padding: 0; 57 | overflow-y: auto; 58 | } 59 | 60 | .ms-container .ms-optgroup-label{ 61 | margin: 0; 62 | padding: 5px 0px 0px 5px; 63 | cursor: pointer; 64 | font-size: 14px; 65 | color: #999; 66 | } 67 | 68 | .ms-container .ms-selectable li.ms-elem-selectable, 69 | .ms-container .ms-selection li.ms-elem-selection{ 70 | border-bottom: 1px #eee solid; 71 | padding: 2px 10px; 72 | color: #555; 73 | font-size: 13px; 74 | } 75 | 76 | .ms-container .ms-selectable li.ms-hover, 77 | .ms-container .ms-selection li.ms-hover{ 78 | cursor: pointer; 79 | color: #fff; 80 | text-decoration: none; 81 | background-color: #4b8df8; 82 | } 83 | 84 | .ms-container .ms-selectable li.disabled, 85 | .ms-container .ms-selection li.disabled{ 86 | background-color: #eee; 87 | color: #aaa; 88 | cursor: text; 89 | } 90 | -------------------------------------------------------------------------------- /src/main/java/priv/jesse/mall/entity/pojo/ResultBean.java: -------------------------------------------------------------------------------- 1 | package priv.jesse.mall.entity.pojo; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * 接口返回数据模型 7 | * 8 | * @author hfb 9 | * @date 2017/9/18 10 | */ 11 | public class ResultBean implements Serializable { 12 | private static final long serialVersionUID = -6248298306422072592L; 13 | /** 14 | * 表示接口调用成功 15 | */ 16 | public static final int SUCCESS = 0; 17 | /** 18 | * 表示接口调用失败 19 | */ 20 | public static final int FAIL = 1; 21 | /** 22 | * 表示没有权限调用该接口 23 | */ 24 | public static final int NO_PERMISSION = 2; 25 | 26 | public static final String NO_LOGIN_MSG = "未登录"; 27 | public static final String NO_PERMISSION_MSG = "没有权限"; 28 | public static final String SUCC_MSG = "成功"; 29 | public static final String FAIL_MSG = "失败"; 30 | 31 | private String message = SUCC_MSG; 32 | private int state = SUCCESS; 33 | /** 34 | * 返回的数据 35 | */ 36 | private T data; 37 | 38 | public ResultBean() { 39 | super(); 40 | } 41 | 42 | public ResultBean(T data) { 43 | super(); 44 | this.data = data; 45 | } 46 | 47 | /** 48 | * 包装异常信息 49 | * 50 | * @param e 51 | */ 52 | public ResultBean(Throwable e) { 53 | super(); 54 | this.message = e.getMessage(); 55 | this.state = FAIL; 56 | } 57 | 58 | public ResultBean(String message) { 59 | super(); 60 | this.message = message; 61 | this.state = FAIL; 62 | } 63 | 64 | public String getMessage() { 65 | return message; 66 | } 67 | 68 | public void setMessage(String message) { 69 | this.message = message; 70 | } 71 | 72 | public int getState() { 73 | return state; 74 | } 75 | 76 | public void setState(int state) { 77 | this.state = state; 78 | } 79 | 80 | public T getData() { 81 | return data; 82 | } 83 | 84 | public void setData(T data) { 85 | this.data = data; 86 | } 87 | 88 | @Override 89 | public String toString() { 90 | return "ResultBean{" + 91 | "message='" + message + '\'' + 92 | ", state=" + state + 93 | ", data=" + data + 94 | '}'; 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /src/main/resources/static/css/colorpicker.css: -------------------------------------------------------------------------------- 1 | /* 2 | Colorpicker for Bootstrap 3 | Copyright 2012 Stefan Petre 4 | Licensed under the Apache License v2.0 5 | http://www.apache.org/licenses/LICENSE-2.0 6 | */ 7 | .colorpicker-saturation { width: 100px; height: 100px; background-image: url(../image/saturation.png); cursor: crosshair; float: left; } .colorpicker-saturation i { display: block; height: 5px; width: 5px; border: 1px solid #000; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; position: absolute; top: 0; left: 0; margin: -4px 0 0 -4px; } .colorpicker-saturation i b { display: block; height: 5px; width: 5px; border: 1px solid #fff; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; } .colorpicker-hue, .colorpicker-alpha { width: 15px; height: 100px; float: left; cursor: row-resize; margin-left: 4px; margin-bottom: 4px; } .colorpicker-hue i, .colorpicker-alpha i { display: block; height: 1px; background: #000; border-top: 1px solid #fff; position: absolute; top: 0; left: 0; width: 100%; margin-top: -1px; } .colorpicker-hue { background-image: url(../image/hue.png); } .colorpicker-alpha { background-image: url(../image/alpha.png); display: none; } .colorpicker { *zoom: 1; top: 0; left: 0; padding: 4px; min-width: 120px; margin-top: 1px; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; } .colorpicker:before, .colorpicker:after { display: table; content: ""; } .colorpicker:after { clear: both; } .colorpicker:before { content: ''; display: inline-block; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 7px solid #ccc; border-bottom-color: rgba(0, 0, 0, 0.2); position: absolute; top: -7px; left: 6px; } .colorpicker:after { content: ''; display: inline-block; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 6px solid #ffffff; position: absolute; top: -6px; left: 7px; } .colorpicker div { position: relative; } .colorpicker.alpha { min-width: 140px; } .colorpicker.alpha .colorpicker-alpha { display: block; } .colorpicker-color { height: 10px; margin-top: 5px; clear: both; background-image: url(../image/alpha.png); background-position: 0 100%; } .colorpicker-color div { height: 10px; } .input-append.color .add-on i, .input-prepend.color .add-on i { display: block; cursor: pointer; width: 16px; height: 16px; } -------------------------------------------------------------------------------- /src/main/resources/static/css/timepicker.css: -------------------------------------------------------------------------------- 1 | .bootstrap-timepicker.dropdown-menu { 2 | border-radius: 4px 4px 4px 4px; 3 | display: none; 4 | left: 0; 5 | margin-top: 1px; 6 | padding: 4px; 7 | top: 0; 8 | min-width: 10px; 9 | z-index: 99999; 10 | } 11 | .bootstrap-timepicker.dropdown-menu.open { 12 | display: inline-block; 13 | } 14 | .bootstrap-timepicker.dropdown-menu:before { 15 | border-bottom: 7px solid rgba(0, 0, 0, 0.2); 16 | border-left: 7px solid transparent; 17 | border-right: 7px solid transparent; 18 | content: ""; 19 | left: 6px; 20 | position: absolute; 21 | top: -7px; 22 | } 23 | .bootstrap-timepicker.dropdown-menu:after { 24 | border-bottom: 6px solid #FFFFFF; 25 | border-left: 6px solid transparent; 26 | border-right: 6px solid transparent; 27 | content: ""; 28 | left: 7px; 29 | position: absolute; 30 | top: -6px; 31 | } 32 | .bootstrap-timepicker.modal { 33 | margin-left: -100px; 34 | margin-top: 0; 35 | top: 30%; 36 | width: 200px; 37 | } 38 | .bootstrap-timepicker.modal .modal-header h3 { 39 | font-size: 16px !important; 40 | margin-top: 3px; 41 | margin-bottom: 3px; 42 | } 43 | .bootstrap-timepicker.modal .modal-content { 44 | padding: 0; 45 | } 46 | .bootstrap-timepicker table { 47 | margin: 0; 48 | width: 100%; 49 | } 50 | .bootstrap-timepicker table td { 51 | height: 30px; 52 | margin: 0; 53 | padding: 2px; 54 | text-align: center; 55 | } 56 | .bootstrap-timepicker table td span { 57 | width: 100%; 58 | } 59 | .bootstrap-timepicker table td a { 60 | border: 1px solid transparent; 61 | display: inline-block; 62 | margin: 0; 63 | outline: 0 none; 64 | padding: 8px 0; 65 | width: 3em; 66 | } 67 | .bootstrap-timepicker table td a:hover { 68 | background-color: #EEEEEE; 69 | border-color: #DDDDDD; 70 | border-radius: 4px 4px 4px 4px; 71 | text-decoration: none; 72 | } 73 | .bootstrap-timepicker table td a i { 74 | margin-top: 2px; 75 | } 76 | .bootstrap-timepicker table td input { 77 | margin: 0; 78 | text-align: center; 79 | width: 25px; 80 | } 81 | .bootstrap-timepicker-component .add-on { 82 | cursor: pointer; 83 | } 84 | .bootstrap-timepicker-component .add-on i { 85 | display: block; 86 | height: 16px; 87 | width: 16px; 88 | } 89 | -------------------------------------------------------------------------------- /src/main/resources/static/js/jquery.vmap.sampledata.js: -------------------------------------------------------------------------------- 1 | var sample_data = {"af":"16.63","al":"11.58","dz":"158.97","ao":"85.81","ag":"1.1","ar":"351.02","am":"8.83","au":"1219.72","at":"366.26","az":"52.17","bs":"7.54","bh":"21.73","bd":"105.4","bb":"3.96","by":"52.89","be":"461.33","bz":"1.43","bj":"6.49","bt":"1.4","bo":"19.18","ba":"16.2","bw":"12.5","br":"2023.53","bn":"11.96","bg":"44.84","bf":"8.67","bi":"1.47","kh":"11.36","cm":"21.88","ca":"1563.66","cv":"1.57","cf":"2.11","td":"7.59","cl":"199.18","cn":"5745.13","co":"283.11","km":"0.56","cd":"12.6","cg":"11.88","cr":"35.02","ci":"22.38","hr":"59.92","cy":"22.75","cz":"195.23","dk":"304.56","dj":"1.14","dm":"0.38","do":"50.87","ec":"61.49","eg":"216.83","sv":"21.8","gq":"14.55","er":"2.25","ee":"19.22","et":"30.94","fj":"3.15","fi":"231.98","fr":"2555.44","ga":"12.56","gm":"1.04","ge":"11.23","de":"3305.9","gh":"18.06","gr":"305.01","gd":"0.65","gt":"40.77","gn":"4.34","gw":"0.83","gy":"2.2","ht":"6.5","hn":"15.34","hk":"226.49","hu":"132.28","is":"12.77","in":"1430.02","id":"695.06","ir":"337.9","iq":"84.14","ie":"204.14","il":"201.25","it":"2036.69","jm":"13.74","jp":"5390.9","jo":"27.13","kz":"129.76","ke":"32.42","ki":"0.15","kr":"986.26","undefined":"5.73","kw":"117.32","kg":"4.44","la":"6.34","lv":"23.39","lb":"39.15","ls":"1.8","lr":"0.98","ly":"77.91","lt":"35.73","lu":"52.43","mk":"9.58","mg":"8.33","mw":"5.04","my":"218.95","mv":"1.43","ml":"9.08","mt":"7.8","mr":"3.49","mu":"9.43","mx":"1004.04","md":"5.36","mn":"5.81","me":"3.88","ma":"91.7","mz":"10.21","mm":"35.65","na":"11.45","np":"15.11","nl":"770.31","nz":"138","ni":"6.38","ne":"5.6","ng":"206.66","no":"413.51","om":"53.78","pk":"174.79","pa":"27.2","pg":"8.81","py":"17.17","pe":"153.55","ph":"189.06","pl":"438.88","pt":"223.7","qa":"126.52","ro":"158.39","ru":"1476.91","rw":"5.69","ws":"0.55","st":"0.19","sa":"434.44","sn":"12.66","rs":"38.92","sc":"0.92","sl":"1.9","sg":"217.38","sk":"86.26","si":"46.44","sb":"0.67","za":"354.41","es":"1374.78","lk":"48.24","kn":"0.56","lc":"1","vc":"0.58","sd":"65.93","sr":"3.3","sz":"3.17","se":"444.59","ch":"522.44","sy":"59.63","tw":"426.98","tj":"5.58","tz":"22.43","th":"312.61","tl":"0.62","tg":"3.07","to":"0.3","tt":"21.2","tn":"43.86","tr":"729.05","tm":0,"ug":"17.12","ua":"136.56","ae":"239.65","gb":"2258.57","us":"14624.18","uy":"40.71","uz":"37.72","vu":"0.72","ve":"285.21","vn":"101.99","ye":"30.02","zm":"15.69","zw":"5.57"}; -------------------------------------------------------------------------------- /src/main/resources/static/css/coming-soon.css: -------------------------------------------------------------------------------- 1 | /*** 2 | Coming Soon Page 3 | ***/ 4 | body { 5 | background-color: #ddd; 6 | padding: 0; 7 | margin: 0; 8 | } 9 | 10 | .coming-soon-header { 11 | padding: 20px; 12 | margin-top: 80px; 13 | } 14 | 15 | .coming-soon-content { 16 | padding: 20px; 17 | margin-top: 10px; 18 | } 19 | 20 | .coming-soon-countdown { 21 | padding: 20px; 22 | } 23 | 24 | .coming-soon-content h1, 25 | .coming-soon-content p { 26 | color: #fff; 27 | } 28 | 29 | .coming-soon-content h1 { 30 | font-size: 42px; 31 | line-height: 50px; 32 | margin-bottom: 15px; 33 | font-weight: 300; 34 | } 35 | 36 | .coming-soon-content p { 37 | font-size: 13px; 38 | } 39 | 40 | 41 | .coming-soon-content input { 42 | background: #fff !important; 43 | } 44 | 45 | .coming-soon-footer { 46 | text-align: left !important; 47 | font-size: 12px; 48 | color: #333; 49 | padding: 20px 20px 20px 20px; 50 | } 51 | 52 | /*Countdown*/ 53 | #defaultCountdown { 54 | width: 100%; 55 | margin: 10px 0; 56 | overflow: hidden; 57 | } 58 | 59 | #defaultCountdown span.countdown_row { 60 | overflow: hidden; 61 | } 62 | 63 | #defaultCountdown span.countdown_row span { 64 | font-size: 16px; 65 | font-weight: 300; 66 | line-height: 20px; 67 | margin-right: 2px; 68 | } 69 | 70 | #defaultCountdown span.countdown_row > span { 71 | float: left; 72 | } 73 | 74 | #defaultCountdown span.countdown_section { 75 | color: #fff; 76 | padding: 7px 15px !important; 77 | margin-bottom: 2px; 78 | font-weight: 300; 79 | background: url(../image/bg-white.png) repeat; 80 | text-align: center; 81 | } 82 | 83 | #defaultCountdown span.countdown_amount { 84 | display: inline-block; 85 | font-size: 38px !important; 86 | padding: 15px !important; 87 | font-weight: 300; 88 | } 89 | 90 | /*Responsive*/ 91 | @media (max-width: 1024px) { 92 | #defaultCountdown span.countdown_amount { 93 | padding: 10px; 94 | } 95 | } 96 | 97 | @media (max-width: 767px) { 98 | 99 | .coming-soon-header, 100 | .coming-soon-countdown, 101 | .coming-soon-content, 102 | .coming-soon-footer { 103 | margin-top: 0px; 104 | padding: 10px; 105 | } 106 | } 107 | 108 | @media (max-width: 320px) { 109 | 110 | .coming-soon-content .btn-subscribe span { 111 | display: none; 112 | } 113 | 114 | } -------------------------------------------------------------------------------- /src/main/java/priv/jesse/mall/aspect/WebLogAspect.java: -------------------------------------------------------------------------------- 1 | package priv.jesse.mall.aspect; 2 | 3 | import org.aspectj.lang.JoinPoint; 4 | import org.aspectj.lang.annotation.AfterReturning; 5 | import org.aspectj.lang.annotation.Aspect; 6 | import org.aspectj.lang.annotation.Before; 7 | import org.aspectj.lang.annotation.Pointcut; 8 | import org.slf4j.Logger; 9 | import org.slf4j.LoggerFactory; 10 | import org.springframework.core.annotation.Order; 11 | import org.springframework.stereotype.Component; 12 | import org.springframework.web.context.request.RequestContextHolder; 13 | import org.springframework.web.context.request.ServletRequestAttributes; 14 | 15 | import javax.servlet.http.HttpServletRequest; 16 | import java.util.Arrays; 17 | 18 | /** 19 | * WEB层日志切面,用来记录请求信息 20 | */ 21 | @Aspect 22 | @Order(5) 23 | @Component 24 | public class WebLogAspect { 25 | 26 | private static final Logger LOGGER = LoggerFactory.getLogger(WebLogAspect.class); 27 | 28 | ThreadLocal startTime = new ThreadLocal<>(); 29 | 30 | @Pointcut("execution(public * priv.jesse.mall.controller.*.*(..))")//切入点 31 | public void webLog() { 32 | } 33 | 34 | @Before("webLog()") 35 | public void doBefore(JoinPoint joinPoint) throws Throwable { 36 | startTime.set(System.currentTimeMillis()); 37 | 38 | // 接收到请求,记录请求内容 39 | ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); 40 | HttpServletRequest request = attributes.getRequest(); 41 | 42 | // 记录下请求内容 43 | LOGGER.info("**************Start API Request**************"); 44 | LOGGER.info("URL : " + request.getRequestURI().toString()); 45 | LOGGER.info("HTTP_METHOD : " + request.getMethod()); 46 | LOGGER.info("IP : " + request.getRemoteAddr()); 47 | LOGGER.info("CLASS_METHOD : " + joinPoint.getSignature().getDeclaringTypeName() + "." + joinPoint.getSignature().getName()); 48 | LOGGER.info("ARGS : " + Arrays.toString(joinPoint.getArgs())); 49 | } 50 | 51 | @AfterReturning(returning = "ret", pointcut = "webLog()") 52 | public void doAfterReturning(Object ret) throws Throwable { 53 | // 处理完请求,返回内容 54 | LOGGER.info("RESPONSE : " + ret); 55 | LOGGER.info("SPEND TIME : " + (System.currentTimeMillis() - startTime.get())); 56 | LOGGER.info("***************End API Request***************"); 57 | } 58 | 59 | 60 | } 61 | 62 | -------------------------------------------------------------------------------- /src/main/resources/static/js/form-fileupload.js: -------------------------------------------------------------------------------- 1 | var FormFileUpload = function () { 2 | 3 | 4 | return { 5 | //main function to initiate the module 6 | init: function () { 7 | 8 | // Initialize the jQuery File Upload widget: 9 | $('#fileupload').fileupload({ 10 | // Uncomment the following to send cross-domain cookies: 11 | //xhrFields: {withCredentials: true}, 12 | url: 'assets/plugins/jquery-file-upload/server/php/' 13 | }); 14 | 15 | // Load existing files: 16 | // Demo settings: 17 | $.ajax({ 18 | // Uncomment the following to send cross-domain cookies: 19 | //xhrFields: {withCredentials: true}, 20 | url: $('#fileupload').fileupload('option', 'url'), 21 | dataType: 'json', 22 | context: $('#fileupload')[0], 23 | maxFileSize: 5000000, 24 | acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i, 25 | process: [{ 26 | action: 'load', 27 | fileTypes: /^image\/(gif|jpeg|png)$/, 28 | maxFileSize: 20000000 // 20MB 29 | }, { 30 | action: 'resize', 31 | maxWidth: 1440, 32 | maxHeight: 900 33 | }, { 34 | action: 'save' 35 | } 36 | ] 37 | }).done(function (result) { 38 | $(this).fileupload('option', 'done') 39 | .call(this, null, { 40 | result: result 41 | }); 42 | }); 43 | 44 | // Upload server status check for browsers with CORS support: 45 | if ($.support.cors) { 46 | $.ajax({ 47 | url: 'assets/plugins/jquery-file-upload/server/php/', 48 | type: 'HEAD' 49 | }).fail(function () { 50 | $('') 51 | .text('Upload server currently unavailable - ' + 52 | new Date()) 53 | .appendTo('#fileupload'); 54 | }); 55 | } 56 | 57 | // initialize uniform checkboxes 58 | App.initUniform('.fileupload-toggle-checkbox'); 59 | } 60 | 61 | }; 62 | 63 | }(); -------------------------------------------------------------------------------- /src/main/resources/static/css/jquery.gritter.css: -------------------------------------------------------------------------------- 1 | /* the norm */ 2 | #gritter-notice-wrapper { 3 | position:fixed; 4 | top:20px; 5 | right:20px; 6 | width:301px; 7 | z-index:9999; 8 | } 9 | #gritter-notice-wrapper.top-left { 10 | left: 20px; 11 | right: auto; 12 | } 13 | #gritter-notice-wrapper.bottom-right { 14 | top: auto; 15 | left: auto; 16 | bottom: 20px; 17 | right: 20px; 18 | } 19 | #gritter-notice-wrapper.bottom-left { 20 | top: auto; 21 | right: auto; 22 | bottom: 20px; 23 | left: 20px; 24 | } 25 | .gritter-item-wrapper { 26 | position:relative; 27 | margin:0 0 10px 0; 28 | background:url('../image/ie-spacer.gif'); /* ie7/8 fix */ 29 | } 30 | .gritter-top { 31 | background:url(../image/gritter.png) no-repeat left -30px; 32 | height:10px; 33 | } 34 | .hover .gritter-top { 35 | background-position:right -30px; 36 | } 37 | .gritter-bottom { 38 | background:url(../image/gritter.png) no-repeat left bottom; 39 | height:8px; 40 | margin:0; 41 | } 42 | .hover .gritter-bottom { 43 | background-position: bottom right; 44 | } 45 | .gritter-item { 46 | display:block; 47 | background:url(../image/gritter.png) no-repeat left -40px; 48 | color:#eee; 49 | padding:2px 11px 8px 11px; 50 | font-size: 11px; 51 | font-family:verdana; 52 | } 53 | .hover .gritter-item { 54 | background-position:right -40px; 55 | } 56 | .gritter-item p { 57 | padding:0; 58 | margin:0; 59 | word-wrap:break-word; 60 | } 61 | .gritter-close { 62 | display:none; 63 | position:absolute; 64 | top:5px; 65 | left:3px; 66 | background:url(../image/gritter.png) no-repeat left top; 67 | cursor:pointer; 68 | width:30px; 69 | height:30px; 70 | } 71 | .gritter-title { 72 | font-size:14px; 73 | font-weight:bold; 74 | padding:0 0 7px 0; 75 | display:block; 76 | text-shadow:1px 1px 0 #000; /* Not supported by IE :( */ 77 | } 78 | .gritter-image { 79 | width:48px; 80 | height:48px; 81 | float:left; 82 | } 83 | .gritter-with-image, 84 | .gritter-without-image { 85 | padding:0; 86 | } 87 | .gritter-with-image { 88 | width:220px; 89 | float:right; 90 | } 91 | /* for the light (white) version of the gritter notice */ 92 | .gritter-light .gritter-item, 93 | .gritter-light .gritter-bottom, 94 | .gritter-light .gritter-top, 95 | .gritter-light .gritter-close { 96 | background-image: url(../image/gritter-light.png); 97 | color: #222; 98 | } 99 | .gritter-light .gritter-title { 100 | text-shadow: none; 101 | } 102 | -------------------------------------------------------------------------------- /src/main/resources/static/css/lock.css: -------------------------------------------------------------------------------- 1 | /*** 2 | Lock Page 3 | ***/ 4 | body { 5 | background-color: #ddd; 6 | padding: 0; 7 | margin: 0; 8 | } 9 | 10 | .page-lock { 11 | top: 50%; 12 | left: 50%; 13 | position: absolute; 14 | margin-top: -140px; 15 | margin-left: -260px; 16 | } 17 | 18 | .page-lock .page-logo { 19 | margin-bottom: 15px; 20 | } 21 | 22 | .page-lock .page-body { 23 | width: 500px; 24 | padding: 10px; 25 | background: url(../image/bg-white-lock.png) repeat; 26 | } 27 | 28 | .page-lock .page-body:after, 29 | .page-lock .page-body:before { 30 | display: table; 31 | content: ""; 32 | line-height: 0; 33 | } 34 | 35 | .page-lock .page-body:after { 36 | clear: both; 37 | } 38 | 39 | .page-lock .page-footer { 40 | margin-top: 10px; 41 | text-align: left !important; 42 | font-size: 12px; 43 | color: #333; 44 | } 45 | 46 | .page-lock img.page-lock-img { 47 | float: left; 48 | width: 200px; 49 | height: auto; 50 | } 51 | 52 | .page-lock .page-lock-info { 53 | float: right; 54 | width: 280px; 55 | } 56 | 57 | .page-lock .page-lock-info h1 { 58 | margin-top: -5px; 59 | font-weight: 300; 60 | color: #fff; 61 | font-size: 28px; 62 | line-height: 32px; 63 | } 64 | 65 | .page-lock .page-lock-info span { 66 | color: #eee; 67 | display: block; 68 | font-size: 14px; 69 | margin-top: -5px; 70 | margin-bottom: 10px; 71 | } 72 | 73 | .page-lock .page-lock-info span em { 74 | color: #333; 75 | font-size: 14px; 76 | font-style: normal; 77 | } 78 | 79 | .page-lock .page-lock-info form { 80 | margin: 28px 0; 81 | } 82 | 83 | .page-lock .page-lock-info input { 84 | background: #fff; 85 | } 86 | 87 | .page-lock .relogin { 88 | margin-top: 10px; 89 | } 90 | 91 | .page-lock .relogin a { 92 | color: #e1e1e1; 93 | } 94 | 95 | /*Responsive*/ 96 | @media (max-width: 480px) { 97 | .page-lock { 98 | top:0px; 99 | width: 260px; 100 | margin-top: 20px; 101 | margin-left: -140px; 102 | } 103 | 104 | .page-lock .page-body { 105 | padding: 10px; 106 | text-align: center; 107 | width: 260px; 108 | } 109 | 110 | .page-lock img.page-lock-img { 111 | float: none !important; 112 | display: block; 113 | margin: 0 auto; 114 | text-align: center; 115 | margin-bottom: 15px; 116 | } 117 | .page-lock .page-lock-info { 118 | float: none !important; 119 | width: 260px; 120 | margin: 0 auto; 121 | } 122 | .page-lock .page-lock-info1 form { 123 | margin-bottom: 0; 124 | } 125 | } -------------------------------------------------------------------------------- /src/main/resources/static/css/bootstrap-tag.css: -------------------------------------------------------------------------------- 1 | .tags { 2 | display: inline-block; 3 | padding: 4px 6px; 4 | margin-bottom: 10px; 5 | color: #555555; 6 | vertical-align: middle; 7 | -webkit-border-radius: 4px; 8 | -moz-border-radius: 4px; 9 | border-radius: 4px; 10 | background-color: #ffffff; 11 | border: 1px solid #cccccc; 12 | -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); 13 | -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); 14 | box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); 15 | -webkit-transition: border linear .2s, box-shadow linear .2s; 16 | -moz-transition: border linear .2s, box-shadow linear .2s; 17 | -o-transition: border linear .2s, box-shadow linear .2s; 18 | transition: border linear .2s, box-shadow linear .2s; 19 | width: 206px; 20 | } 21 | .tags-hover { 22 | border-color: rgba(82, 168, 236, 0.8); 23 | outline: 0; 24 | outline: thin dotted \9; 25 | /* IE6-9 */ 26 | 27 | -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); 28 | -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); 29 | box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); 30 | } 31 | .tags[class*="span"] { 32 | float: none; 33 | margin-left: 0; 34 | } 35 | .tags input[type="text"], 36 | .tags input[type="text"]:focus { 37 | border: none; 38 | display: inline; 39 | outline: 0; 40 | margin: 0; 41 | padding: 0; 42 | font-size: 11.844px; 43 | line-height: 14px; 44 | -webkit-box-shadow: none; 45 | -moz-box-shadow: none; 46 | box-shadow: none; 47 | width: 100%; 48 | } 49 | .tag { 50 | display: inline-block; 51 | padding: 2px 4px; 52 | font-size: 11.844px; 53 | font-weight: bold; 54 | line-height: 14px; 55 | color: #ffffff; 56 | vertical-align: baseline; 57 | white-space: nowrap; 58 | text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); 59 | background-color: #999999; 60 | padding-left: 9px; 61 | padding-right: 9px; 62 | -webkit-border-radius: 9px; 63 | -moz-border-radius: 9px; 64 | border-radius: 9px; 65 | margin-bottom: 5px; 66 | margin-right: 5px; 67 | -webkit-transition: all 0.2s; 68 | -moz-transition: all 0.2s; 69 | -o-transition: all 0.2s; 70 | transition: all 0.2s; 71 | } 72 | .tag:empty { 73 | display: none; 74 | } 75 | .tag-important { 76 | background-color: #953b39; 77 | } 78 | .tag-warning { 79 | background-color: #c67605; 80 | } 81 | .tag-success { 82 | background-color: #356635; 83 | } 84 | .tag-info { 85 | background-color: #2d6987; 86 | } 87 | .tag-inverse { 88 | background-color: #1a1a1a; 89 | } 90 | .tag .close { 91 | font-size: 14px; 92 | line-height: 14px; 93 | margin-left: 7px; 94 | } 95 | -------------------------------------------------------------------------------- /src/main/java/priv/jesse/mall/web/admin/AdminOrderController.java: -------------------------------------------------------------------------------- 1 | package priv.jesse.mall.web.admin; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.data.domain.PageRequest; 5 | import org.springframework.data.domain.Pageable; 6 | import org.springframework.stereotype.Controller; 7 | import org.springframework.web.bind.annotation.RequestMapping; 8 | import org.springframework.web.bind.annotation.RequestParam; 9 | import org.springframework.web.bind.annotation.ResponseBody; 10 | import priv.jesse.mall.entity.Order; 11 | import priv.jesse.mall.entity.OrderItem; 12 | import priv.jesse.mall.entity.pojo.ResultBean; 13 | import priv.jesse.mall.service.OrderService; 14 | 15 | import java.util.List; 16 | 17 | @Controller 18 | @RequestMapping("/admin/order") 19 | public class AdminOrderController { 20 | @Autowired 21 | private OrderService orderService; 22 | 23 | /** 24 | * 打开订单列表页面 25 | * @return 26 | */ 27 | @RequestMapping("/toList.html") 28 | public String toList() { 29 | return "admin/order/list"; 30 | } 31 | 32 | /** 33 | * 获取所有订单的总数 34 | * @return 35 | */ 36 | @ResponseBody 37 | @RequestMapping("/getTotal.do") 38 | public ResultBean getTotal() { 39 | Pageable pageable = new PageRequest(1, 15, null); 40 | int total = (int) orderService.findAll(pageable).getTotalElements(); 41 | return new ResultBean<>(total); 42 | } 43 | 44 | /** 45 | * 获取所有订单 46 | * @param pageindex 47 | * @param pageSize 48 | * @return 49 | */ 50 | @ResponseBody 51 | @RequestMapping("/list.do") 52 | public ResultBean> listData(int pageindex, 53 | @RequestParam(value = "pageSize", defaultValue = "15") int pageSize) { 54 | Pageable pageable = new PageRequest(pageindex, pageSize, null); 55 | List list = orderService.findAll(pageable).getContent(); 56 | return new ResultBean<>(list); 57 | } 58 | 59 | /** 60 | * 获取订单项 61 | * @param orderId 62 | * @return 63 | */ 64 | @ResponseBody 65 | @RequestMapping("/getDetail.do") 66 | public ResultBean> getDetail(int orderId) { 67 | List list = orderService.findItems(orderId); 68 | return new ResultBean<>(list); 69 | } 70 | 71 | /** 72 | * 发货 73 | * @param id 74 | * @return 75 | */ 76 | @ResponseBody 77 | @RequestMapping("/send.do") 78 | public ResultBean send(int id) { 79 | orderService.updateStatus(id,3); 80 | return new ResultBean<>(true); 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /src/main/java/priv/jesse/mall/service/OrderService.java: -------------------------------------------------------------------------------- 1 | package priv.jesse.mall.service; 2 | 3 | import org.springframework.data.domain.Example; 4 | import org.springframework.data.domain.Page; 5 | import org.springframework.data.domain.Pageable; 6 | import priv.jesse.mall.entity.Order; 7 | import priv.jesse.mall.entity.OrderItem; 8 | 9 | import javax.servlet.http.HttpServletRequest; 10 | import javax.servlet.http.HttpServletResponse; 11 | import java.util.List; 12 | 13 | public interface OrderService { 14 | 15 | /** 16 | * 订单状态 1:未付款 2:等待发货 3:等待收货 4:订单完成 17 | */ 18 | int STATE_NO_PAY = 1; 19 | int STATE_WAITE_SEND = 2; 20 | int STATE_WAITE_RECEIVE = 3; 21 | int STATE_COMPLETE = 4; 22 | 23 | 24 | /** 25 | * 根据id查询 26 | * 27 | * @param id 28 | * @return 29 | */ 30 | Order findById(int id); 31 | 32 | /** 33 | * 分页查询所有 34 | * 35 | * @param pageable 36 | * @return 37 | */ 38 | Page findAll(Pageable pageable); 39 | 40 | /** 41 | * 按条件查询 42 | * 43 | * @param example 44 | * @return 45 | */ 46 | List findAllExample(Example example); 47 | 48 | /** 49 | * 更新 50 | * 51 | * @param order 52 | * @return 53 | */ 54 | void update(Order order); 55 | 56 | /** 57 | * 创建 58 | * 59 | * @param order 60 | * @return 61 | */ 62 | int create(Order order); 63 | 64 | /** 65 | * 根据Id删除 66 | * 67 | * @param id 68 | * @return 69 | */ 70 | void delById(int id); 71 | 72 | /** 73 | * 查询订单的订单项 74 | * 75 | * @param orderId 76 | * @return 77 | */ 78 | List findItems(int orderId); 79 | 80 | /** 81 | * 更改订单状态 82 | * 83 | * @param id 84 | * @param status 85 | */ 86 | void updateStatus(int id, int status); 87 | 88 | /** 89 | * 查找用户的订单列表 90 | * 91 | * @param request 92 | * @return 93 | */ 94 | List findUserOrder(HttpServletRequest request); 95 | 96 | /** 97 | * 支付 98 | * @param orderId 99 | */ 100 | void pay(int orderId); 101 | 102 | /** 103 | * 提交订单 104 | * @param name 105 | * @param phone 106 | * @param addr 107 | * @param request 108 | * @param response 109 | */ 110 | void submit(String name, String phone, String addr, HttpServletRequest request, HttpServletResponse response) throws Exception; 111 | 112 | /** 113 | * 确认收货 114 | * @param orderId 115 | */ 116 | void receive(int orderId); 117 | } 118 | -------------------------------------------------------------------------------- /src/main/resources/static/css/style-non-responsive.css: -------------------------------------------------------------------------------- 1 | /*** 2 | Large notebooks and desktops 3 | ***/ 4 | 5 | /*** 6 | Page sidebar 7 | ***/ 8 | .page-sidebar { 9 | position: absolute; 10 | width: 225px; 11 | } 12 | 13 | .page-sidebar-fixed .page-sidebar { 14 | position: fixed !important; 15 | top: 41px; 16 | } 17 | 18 | .page-sidebar-fixed ul.page-sidebar-menu > li.last { 19 | margin-bottom: 15px !important; 20 | } 21 | 22 | .page-sidebar-fixed.page-sidebar-hover-on .page-sidebar { 23 | z-index: 10000; 24 | width: 35px; 25 | } 26 | 27 | .page-sidebar-fixed.page-sidebar-hover-on .page-sidebar .selected { 28 | display: none; 29 | } 30 | 31 | .page-sidebar-fixed.page-sidebar-hover-on .page-content { 32 | margin-left: 35px; 33 | } 34 | .page-sidebar-fixed.page-sidebar-hover-on .footer { 35 | margin-left: 35px; 36 | } 37 | 38 | .page-sidebar-fixed .page-sidebar-closed .page-sidebar .sidebar-search .submit, 39 | .page-sidebar-fixed .page-sidebar .sidebar-toggler { 40 | -webkit-transition: all 0.2s ease; 41 | -moz-transition: all 0.2s ease; 42 | -o-transition: all 0.2s ease; 43 | transition: all 0.2s ease; 44 | } 45 | 46 | .page-sidebar-hovering { 47 | overflow: hidden !important; 48 | } 49 | 50 | .page-sidebar-hovering .sub-menu, 51 | .page-sidebar-hovering span.title, 52 | .page-sidebar-hovering span.arrow { 53 | display: none !important; 54 | } 55 | 56 | .page-sidebar-hovering .submit { 57 | opacity: 0; 58 | width: 0 !important; 59 | height: 0 !important; 60 | } 61 | 62 | /*** 63 | Page content 64 | ***/ 65 | .page-content { 66 | margin-left: 225px; 67 | margin-top: 0px; 68 | min-height: 760px; 69 | } 70 | 71 | .page-sidebar-fixed .page-content { 72 | min-height: 600px; 73 | } 74 | 75 | .page-content.no-min-height { 76 | min-height: auto; 77 | } 78 | 79 | /*** 80 | Footer 81 | ***/ 82 | 83 | /* fixed sidebar */ 84 | .page-sidebar-fixed .footer { 85 | margin-left: 225px; 86 | background-color: #fff; 87 | } 88 | 89 | .page-sidebar-fixed .footer .footer-inner { 90 | color: #333; 91 | } 92 | 93 | .page-sidebar-fixed.page-sidebar-closed .footer { 94 | margin-left: 35px; 95 | } 96 | 97 | .page-sidebar-fixed .footer .footer-tools .go-top { 98 | background-color: #666; 99 | } 100 | 101 | .page-sidebar-fixed .footer .footer-tools .go-top i { 102 | color: #ddd; 103 | } 104 | 105 | /* boxed layout */ 106 | .page-boxed .header .brand { 107 | margin-left: 0px !important; 108 | width: 226px; 109 | } 110 | 111 | .page-boxed .header .brand img { 112 | margin-left: 10px; 113 | } 114 | -------------------------------------------------------------------------------- /src/main/resources/static/js/jquery.flot.resize.js: -------------------------------------------------------------------------------- 1 | /* Flot plugin for automatically redrawing plots as the placeholder resizes. 2 | 3 | Copyright (c) 2007-2013 IOLA and Ole Laursen. 4 | Licensed under the MIT license. 5 | 6 | It works by listening for changes on the placeholder div (through the jQuery 7 | resize event plugin) - if the size changes, it will redraw the plot. 8 | 9 | There are no options. If you need to disable the plugin for some plots, you 10 | can just fix the size of their placeholders. 11 | 12 | */ 13 | 14 | /* Inline dependency: 15 | * jQuery resize event - v1.1 - 3/14/2010 16 | * http://benalman.com/projects/jquery-resize-plugin/ 17 | * 18 | * Copyright (c) 2010 "Cowboy" Ben Alman 19 | * Dual licensed under the MIT and GPL licenses. 20 | * http://benalman.com/about/license/ 21 | */ 22 | 23 | (function($,h,c){var a=$([]),e=$.resize=$.extend($.resize,{}),i,k="setTimeout",j="resize",d=j+"-special-event",b="delay",f="throttleWindow";e[b]=250;e[f]=true;$.event.special[j]={setup:function(){if(!e[f]&&this[k]){return false}var l=$(this);a=a.add(l);$.data(this,d,{w:l.width(),h:l.height()});if(a.length===1){g()}},teardown:function(){if(!e[f]&&this[k]){return false}var l=$(this);a=a.not(l);l.removeData(d);if(!a.length){clearTimeout(i)}},add:function(l){if(!e[f]&&this[k]){return false}var n;function m(s,o,p){var q=$(this),r=$.data(this,d);r.w=o!==c?o:q.width();r.h=p!==c?p:q.height();n.apply(this,arguments)}if($.isFunction(l)){n=l;return m}else{n=l.handler;l.handler=m}}};function g(){i=h[k](function(){a.each(function(){var n=$(this),m=n.width(),l=n.height(),o=$.data(this,d);if(m!==o.w||l!==o.h){n.trigger(j,[o.w=m,o.h=l])}});g()},e[b])}})(jQuery,this); 24 | 25 | (function ($) { 26 | var options = { }; // no options 27 | 28 | function init(plot) { 29 | function onResize() { 30 | var placeholder = plot.getPlaceholder(); 31 | 32 | // somebody might have hidden us and we can't plot 33 | // when we don't have the dimensions 34 | if (placeholder.width() == 0 || placeholder.height() == 0) 35 | return; 36 | 37 | plot.resize(); 38 | plot.setupGrid(); 39 | plot.draw(); 40 | } 41 | 42 | function bindEvents(plot, eventHolder) { 43 | plot.getPlaceholder().resize(onResize); 44 | } 45 | 46 | function shutdown(plot, eventHolder) { 47 | plot.getPlaceholder().unbind("resize", onResize); 48 | } 49 | 50 | plot.hooks.bindEvents.push(bindEvents); 51 | plot.hooks.shutdown.push(shutdown); 52 | } 53 | 54 | $.plot.plugins.push({ 55 | init: init, 56 | options: options, 57 | name: 'resize', 58 | version: '1.0' 59 | }); 60 | })(jQuery); 61 | -------------------------------------------------------------------------------- /src/main/resources/static/css/news.css: -------------------------------------------------------------------------------- 1 | /*** 2 | News Page 3 | ***/ 4 | 5 | .news-page { 6 | padding-bottom: 20px; 7 | } 8 | 9 | .news-page h1 { 10 | margin-bottom: 20px; 11 | } 12 | 13 | .news-page h2 { 14 | font-size: 38.5px; 15 | margin-bottom: 20px; 16 | } 17 | 18 | .news-page .top-news { 19 | margin-top: 0; 20 | } 21 | 22 | /*News Feeds*/ 23 | .news-blocks { 24 | padding: 10px; 25 | margin-bottom: 10px; 26 | background: #faf6ea; 27 | border-top: solid 2px #faf6ea; 28 | } 29 | 30 | .news-blocks:hover { 31 | background: #fff; 32 | border-color: #78cff8; 33 | transition: all 0.4s ease-in-out 0s; 34 | -moz-transition: all 0.4s ease-in-out 0s; 35 | -webkit-transition: all 0.4s ease-in-out 0s; 36 | } 37 | 38 | .news-blocks h3 { 39 | margin: 0 0 5px 0; 40 | font-size: 23px; 41 | line-height: 32px; 42 | } 43 | 44 | .news-blocks h3 a { 45 | color: #000; 46 | } 47 | 48 | .news-blocks h3 a:hover { 49 | color: #78cff8; 50 | text-decoration: none; 51 | } 52 | 53 | .news-blocks p { 54 | overflow: hidden; 55 | } 56 | 57 | .news-blocks a.news-block-btn { 58 | color: #000; 59 | display: block; 60 | font-size: 14px; 61 | background: none; 62 | padding: 5px 10px 0; 63 | text-align: right; 64 | text-decoration: none; 65 | } 66 | 67 | .news-blocks a.news-block-btn i { 68 | margin-left: 3px; 69 | } 70 | 71 | 72 | .news-blocks a.news-block-btn:hover { 73 | text-decoration: none; 74 | } 75 | 76 | .news-blocks img.news-block-img { 77 | width: 70px; 78 | height: 70px; 79 | margin: 5px 10px 0 0; 80 | } 81 | 82 | .news-blocks .news-block-tags { 83 | margin-bottom: 8px; 84 | } 85 | 86 | .news-blocks .news-block-tags strong { 87 | margin-right: 10px; 88 | font-weight: 400; 89 | } 90 | 91 | .news-blocks .news-block-tags em { 92 | font-style: normal; 93 | } 94 | 95 | /*News Item Page*/ 96 | .news-item-page { 97 | padding: 10px 0; 98 | } 99 | 100 | .blog-tag-data ul { 101 | margin-bottom: 5px; 102 | } 103 | 104 | .blog-tag-data li { 105 | padding: 0; 106 | } 107 | 108 | .blog-tag-data li i { 109 | color: #78cff8; 110 | } 111 | 112 | .blog-tag-data li a { 113 | padding: 0; 114 | color: #555; 115 | margin-right: 8px; 116 | } 117 | 118 | .blog-tag-data { 119 | margin-bottom: 10px; 120 | } 121 | 122 | .blog-tag-data img { 123 | margin-bottom: 12px; 124 | } 125 | 126 | .blog-tag-data ul.blog-tags a { 127 | background: #eee; 128 | padding: 1px 4px; 129 | margin: 0 4px 4px 0; 130 | display: inline-block; 131 | } 132 | 133 | .blog-tag-data ul.blog-tags a:hover { 134 | background: #ddd; 135 | text-decoration: none; 136 | } 137 | 138 | .blog-tag-data .blog-tag-data-inner { 139 | text-align: right; 140 | } 141 | 142 | 143 | -------------------------------------------------------------------------------- /src/main/resources/static/css/bootstrap-fileupload.css: -------------------------------------------------------------------------------- 1 | .btn-file { 2 | position: relative; 3 | overflow: hidden; 4 | vertical-align: middle; 5 | } 6 | 7 | .btn-file > input { 8 | position: absolute; 9 | top: 0; 10 | right: 0; 11 | margin: 0; 12 | font-size: 23px; 13 | cursor: pointer; 14 | opacity: 0; 15 | filter: alpha(opacity=0); 16 | transform: translate(-300px, 0) scale(4); 17 | direction: ltr; 18 | } 19 | 20 | .fileupload { 21 | margin-bottom: 9px; 22 | } 23 | 24 | .fileupload .uneditable-input { 25 | display: inline-block; 26 | margin-bottom: 0; 27 | vertical-align: middle; 28 | cursor: text; 29 | } 30 | 31 | .fileupload .thumbnail { 32 | display: inline-block; 33 | margin-bottom: 5px; 34 | overflow: hidden; 35 | text-align: center; 36 | vertical-align: middle; 37 | } 38 | 39 | .fileupload .thumbnail > img { 40 | display: inline-block; 41 | max-height: 100%; 42 | vertical-align: middle; 43 | } 44 | 45 | .fileupload .btn { 46 | vertical-align: middle; 47 | } 48 | 49 | .fileupload-exists .fileupload-new, 50 | .fileupload-new .fileupload-exists { 51 | display: none; 52 | } 53 | 54 | .fileupload-inline .fileupload-controls { 55 | display: inline; 56 | } 57 | 58 | .fileupload-new .input-append .btn-file { 59 | -webkit-border-radius: 0 3px 3px 0; 60 | -moz-border-radius: 0 3px 3px 0; 61 | border-radius: 0 3px 3px 0; 62 | } 63 | 64 | .thumbnail-borderless .thumbnail { 65 | padding: 0; 66 | border: none; 67 | -webkit-border-radius: 0; 68 | -moz-border-radius: 0; 69 | border-radius: 0; 70 | -webkit-box-shadow: none; 71 | -moz-box-shadow: none; 72 | box-shadow: none; 73 | } 74 | 75 | .fileupload-new.thumbnail-borderless .thumbnail { 76 | border: 1px solid #ddd; 77 | } 78 | 79 | .control-group.warning .fileupload .uneditable-input { 80 | color: #a47e3c; 81 | border-color: #a47e3c; 82 | } 83 | 84 | .control-group.warning .fileupload .fileupload-preview { 85 | color: #a47e3c; 86 | } 87 | 88 | .control-group.warning .fileupload .thumbnail { 89 | border-color: #a47e3c; 90 | } 91 | 92 | .control-group.error .fileupload .uneditable-input { 93 | color: #b94a48; 94 | border-color: #b94a48; 95 | } 96 | 97 | .control-group.error .fileupload .fileupload-preview { 98 | color: #b94a48; 99 | } 100 | 101 | .control-group.error .fileupload .thumbnail { 102 | border-color: #b94a48; 103 | } 104 | 105 | .control-group.success .fileupload .uneditable-input { 106 | color: #468847; 107 | border-color: #468847; 108 | } 109 | 110 | .control-group.success .fileupload .fileupload-preview { 111 | color: #468847; 112 | } 113 | 114 | .control-group.success .fileupload .thumbnail { 115 | border-color: #468847; 116 | } 117 | -------------------------------------------------------------------------------- /src/main/resources/static/css/error.css: -------------------------------------------------------------------------------- 1 | /*** 2 | Error Pages 3 | ***/ 4 | 5 | /* 404 page option #1 */ 6 | 7 | .page-404 { 8 | text-align: center; 9 | } 10 | 11 | .page-404 .number { 12 | display: inline-block; 13 | letter-spacing: -10px; 14 | margin-top: 0px; 15 | line-height: 128px; 16 | font-size: 158px; 17 | font-weight: 300; 18 | color: #7bbbd6; 19 | text-align: right; 20 | } 21 | 22 | .page-404 .details { 23 | margin-left: 40px; 24 | display: inline-block; 25 | padding-top: 0px; 26 | text-align: left; 27 | } 28 | 29 | /* 500 page option #1 */ 30 | .page-500 { 31 | text-align: center; 32 | } 33 | 34 | .page-500 .number { 35 | display: inline-block; 36 | letter-spacing: -10px; 37 | line-height: 128px; 38 | font-size: 158px; 39 | font-weight: 300; 40 | color: #ec8c8c; 41 | text-align: right; 42 | } 43 | 44 | .page-500 .details { 45 | margin-left: 40px; 46 | display: inline-block; 47 | text-align: left; 48 | } 49 | 50 | /* 404 page option #2*/ 51 | .page-404-full-page { 52 | padding: 20px; 53 | background-color: #fafafa !important; 54 | } 55 | 56 | .page-404-full-page .details input { 57 | background-color: #ffffff; 58 | } 59 | 60 | .page-404-full-page .page-404 { 61 | margin-top: 100px; 62 | } 63 | 64 | /* 500 page option #2*/ 65 | .page-500-full-page { 66 | padding: 20px; 67 | background-color: #fafafa !important; 68 | } 69 | 70 | .page-500-full-page .details input { 71 | background-color: #ffffff; 72 | } 73 | 74 | .page-500-full-page .page-500 { 75 | margin-top: 100px; 76 | } 77 | 78 | /* 404 page option #3*/ 79 | 80 | .page-404-3 { 81 | background: #000 !important ; 82 | } 83 | 84 | .page-404-3 .page-inner img { 85 | right: 0; 86 | bottom: 0; 87 | z-index: -1; 88 | position: absolute; 89 | } 90 | 91 | .page-404-3 .error-404 { 92 | color: #fff; 93 | text-align: left; 94 | padding: 70px 20px 0; 95 | } 96 | 97 | .page-404-3 h1 { 98 | color: #fff; 99 | font-size: 130px; 100 | line-height: 160px; 101 | } 102 | 103 | .page-404-3 h2 { 104 | color: #fff; 105 | font-size: 30px; 106 | margin-bottom: 30px; 107 | } 108 | 109 | .page-404-3 p { 110 | color: #fff; 111 | font-size: 16px; 112 | } 113 | 114 | 115 | @media (max-width: 480px) { 116 | 117 | .page-404 .number, 118 | .page-500 .number, 119 | .page-404 .details, 120 | .page-500 .details { 121 | text-align: center; 122 | margin-left: 0px; 123 | } 124 | 125 | .page-404-full-page .page-404 { 126 | margin-top: 30px; 127 | } 128 | 129 | .page-404-3 .error-404 { 130 | text-align: left; 131 | padding-top: 10px; 132 | } 133 | 134 | .page-404-3 .page-inner img { 135 | right: 0; 136 | bottom: 0; 137 | z-index: -1; 138 | position: fixed; 139 | } 140 | 141 | } -------------------------------------------------------------------------------- /src/main/resources/static/css/bootstrap-wysihtml5.css: -------------------------------------------------------------------------------- 1 | ul.wysihtml5-toolbar { 2 | margin: 0; 3 | padding: 0; 4 | display: block; 5 | } 6 | 7 | ul.wysihtml5-toolbar::after { 8 | clear: both; 9 | display: table; 10 | content: ""; 11 | } 12 | 13 | ul.wysihtml5-toolbar > li { 14 | float: left; 15 | display: list-item; 16 | list-style: none; 17 | margin: 0 5px 10px 0; 18 | } 19 | 20 | ul.wysihtml5-toolbar a[data-wysihtml5-command=bold] { 21 | font-weight: bold; 22 | } 23 | 24 | ul.wysihtml5-toolbar a[data-wysihtml5-command=italic] { 25 | font-style: italic; 26 | } 27 | 28 | ul.wysihtml5-toolbar a[data-wysihtml5-command=underline] { 29 | text-decoration: underline; 30 | } 31 | 32 | ul.wysihtml5-toolbar a.btn.wysihtml5-command-active { 33 | background-image: none; 34 | -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05); 35 | -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05); 36 | box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05); 37 | background-color: #E6E6E6; 38 | background-color: #D9D9D9; 39 | outline: 0; 40 | } 41 | 42 | ul.wysihtml5-commands-disabled .dropdown-menu { 43 | display: none !important; 44 | } 45 | 46 | ul.wysihtml5-toolbar div.wysihtml5-colors { 47 | display:block; 48 | width: 50px; 49 | height: 20px; 50 | margin-top: 2px; 51 | margin-left: 5px; 52 | position: absolute; 53 | pointer-events: none; 54 | } 55 | 56 | ul.wysihtml5-toolbar a.wysihtml5-colors-title { 57 | padding-left: 70px; 58 | } 59 | 60 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="black"] { 61 | background: black !important; 62 | } 63 | 64 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="silver"] { 65 | background: silver !important; 66 | } 67 | 68 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="gray"] { 69 | background: gray !important; 70 | } 71 | 72 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="maroon"] { 73 | background: maroon !important; 74 | } 75 | 76 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="red"] { 77 | background: red !important; 78 | } 79 | 80 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="purple"] { 81 | background: purple !important; 82 | } 83 | 84 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="green"] { 85 | background: green !important; 86 | } 87 | 88 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="olive"] { 89 | background: olive !important; 90 | } 91 | 92 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="navy"] { 93 | background: navy !important; 94 | } 95 | 96 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="blue"] { 97 | background: blue !important; 98 | } 99 | 100 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="orange"] { 101 | background: orange !important; 102 | } 103 | -------------------------------------------------------------------------------- /src/main/resources/static/layui/lay/modules/tree.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.1.7 MIT License By http://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/java/priv/jesse/mall/service/impl/ProductServiceImpl.java: -------------------------------------------------------------------------------- 1 | package priv.jesse.mall.service.impl; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.data.domain.Page; 5 | import org.springframework.data.domain.Pageable; 6 | import org.springframework.stereotype.Service; 7 | import priv.jesse.mall.dao.ClassificationDao; 8 | import priv.jesse.mall.dao.ProductDao; 9 | import priv.jesse.mall.entity.Classification; 10 | import priv.jesse.mall.entity.Product; 11 | import priv.jesse.mall.service.ProductService; 12 | 13 | import java.util.ArrayList; 14 | import java.util.List; 15 | 16 | @Service 17 | public class ProductServiceImpl implements ProductService { 18 | @Autowired 19 | private ProductDao productDao; 20 | @Autowired 21 | private ClassificationDao classificationDao; 22 | 23 | @Override 24 | public Product findById(int id) { 25 | return productDao.getOne(id); 26 | } 27 | 28 | @Override 29 | public Page findAll(Pageable pageable) { 30 | return productDao.findAll(pageable); 31 | } 32 | 33 | /** 34 | * 查找热门商品 35 | * 36 | * @return 37 | */ 38 | @Override 39 | public List findHotProduct() { 40 | return productDao.findByIsHot(1, null); 41 | } 42 | 43 | /** 44 | * 查找最新商品 45 | * 46 | * @param pageable 47 | * @return 48 | */ 49 | @Override 50 | public List findNewProduct(Pageable pageable) { 51 | // 查找两周内上架的商品 52 | // Calendar calendar = Calendar.getInstance(); 53 | // calendar.add(Calendar.DAY_OF_MONTH, -14); 54 | return productDao.findNew(pageable); 55 | } 56 | 57 | /** 58 | * 根据一级分类查找商品 59 | * 60 | * @param cid 61 | * @param pageable 62 | * @return 63 | */ 64 | @Override 65 | public List findByCid(int cid, Pageable pageable) { 66 | //查找出所有二级分类 67 | List sec = classificationDao.findByParentId(cid); 68 | List secIds = new ArrayList<>(); 69 | for (Classification classification : sec) { 70 | secIds.add(classification.getId()); 71 | } 72 | return productDao.findByCsidIn(secIds,pageable); 73 | } 74 | 75 | /** 76 | * 根据二级分类查找商品 77 | * 78 | * @param csid 79 | * @param pageable 80 | * @return 81 | */ 82 | @Override 83 | public List findByCsid(int csid, Pageable pageable) { 84 | return productDao.findByCsid(csid,pageable); 85 | } 86 | 87 | 88 | @Override 89 | public void update(Product product) { 90 | productDao.save(product); 91 | } 92 | 93 | @Override 94 | public int create(Product product) { 95 | return productDao.save(product).getId(); 96 | } 97 | 98 | @Override 99 | public void delById(int id) { 100 | productDao.delete(id); 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /src/main/java/priv/jesse/mall/aspect/GlobalExceptionHandler.java: -------------------------------------------------------------------------------- 1 | package priv.jesse.mall.aspect; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | import org.springframework.web.bind.annotation.ControllerAdvice; 6 | import org.springframework.web.bind.annotation.ExceptionHandler; 7 | import org.springframework.web.bind.annotation.ResponseBody; 8 | import org.springframework.web.multipart.MultipartException; 9 | import priv.jesse.mall.entity.pojo.ResultBean; 10 | 11 | import javax.servlet.http.HttpServletRequest; 12 | import javax.servlet.http.HttpServletResponse; 13 | import javax.validation.ConstraintViolation; 14 | import javax.validation.ConstraintViolationException; 15 | import java.io.Serializable; 16 | import java.util.Set; 17 | 18 | /** 19 | * 统一异常处理 20 | * 在Controller中抛出的异常,GlobalExceptionHandler中定义的处理方法可以起作用 21 | * 其他的业务层异常也可以单独处理 22 | * 23 | * @author hfb 24 | * @date 2017/9/18 25 | */ 26 | @ControllerAdvice 27 | public class GlobalExceptionHandler implements Serializable{ 28 | private static final long serialVersionUID = 1L; 29 | private static final Logger LOGGER = LoggerFactory.getLogger(GlobalExceptionHandler.class); 30 | 31 | /** 32 | * 默认的异常处理 33 | * 34 | * @param req 35 | * @param e 36 | * @return 37 | * @throws Exception 38 | */ 39 | @ExceptionHandler(value = Exception.class) 40 | @ResponseBody 41 | public ResultBean defaultErrorHandler(HttpServletRequest req, Exception e) throws Exception { 42 | //记录日志 43 | LOGGER.error(e.getMessage(), e); 44 | e.printStackTrace(); 45 | ResultBean r = new ResultBean<>(e); 46 | r.setData(req.getRequestURI()); 47 | return r; 48 | } 49 | 50 | @ExceptionHandler(value = RuntimeException.class) 51 | public void runtimeExceptionHandler(HttpServletRequest req, HttpServletResponse res, Exception e) throws Exception { 52 | //记录日志 53 | LOGGER.error(e.getMessage(), e); 54 | req.setAttribute("msg", e.getMessage()); 55 | //转发到error页面 56 | req.getRequestDispatcher("/mall/user/error.html").forward(req, res); 57 | } 58 | 59 | /** 60 | * 处理validation异常 61 | * 62 | * @param req 63 | * @param e 64 | * @return 65 | * @throws Exception 66 | */ 67 | @ExceptionHandler(value = ConstraintViolationException.class) 68 | @ResponseBody 69 | public ResultBean validationExceptionHandler(HttpServletRequest req, ConstraintViolationException e) throws Exception { 70 | Set> violations = e.getConstraintViolations(); 71 | StringBuilder strBuilder = new StringBuilder(); 72 | for (ConstraintViolation violation : violations) { 73 | strBuilder.append(violation.getMessage() + ","); 74 | } 75 | LOGGER.error(strBuilder.toString(), e); 76 | ResultBean r = new ResultBean(strBuilder.toString()); 77 | r.setData(req.getRequestURI()); 78 | return r; 79 | } 80 | 81 | 82 | } 83 | -------------------------------------------------------------------------------- /src/main/java/priv/jesse/mall/entity/AdminUser.java: -------------------------------------------------------------------------------- 1 | package priv.jesse.mall.entity; 2 | 3 | 4 | import javax.persistence.*; 5 | import java.io.Serializable; 6 | 7 | /** 8 | * 管理员用户 9 | */ 10 | @Entity 11 | public class AdminUser implements Serializable { 12 | private static final long serialVersionUID = 1L; 13 | @Id 14 | @GeneratedValue 15 | @Column 16 | private Integer id; 17 | @Column(nullable = false) 18 | private String username; 19 | @Column 20 | private String password; 21 | 22 | public AdminUser(Integer id, String username, String password) { 23 | this.id = id; 24 | this.username = username; 25 | this.password = password; 26 | } 27 | 28 | public AdminUser() { 29 | super(); 30 | } 31 | 32 | public Integer getId() { 33 | return id; 34 | } 35 | 36 | public void setId(Integer id) { 37 | this.id = id; 38 | } 39 | 40 | public String getUsername() { 41 | return username; 42 | } 43 | 44 | public void setUsername(String username) { 45 | this.username = username == null ? null : username.trim(); 46 | } 47 | 48 | public String getPassword() { 49 | return password; 50 | } 51 | 52 | public void setPassword(String password) { 53 | this.password = password == null ? null : password.trim(); 54 | } 55 | 56 | @Override 57 | public boolean equals(Object that) { 58 | if (this == that) { 59 | return true; 60 | } 61 | if (that == null) { 62 | return false; 63 | } 64 | if (getClass() != that.getClass()) { 65 | return false; 66 | } 67 | AdminUser other = (AdminUser) that; 68 | return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) 69 | && (this.getUsername() == null ? other.getUsername() == null : this.getUsername().equals(other.getUsername())) 70 | && (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword())); 71 | } 72 | 73 | @Override 74 | public int hashCode() { 75 | final int prime = 31; 76 | int result = 1; 77 | result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); 78 | result = prime * result + ((getUsername() == null) ? 0 : getUsername().hashCode()); 79 | result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode()); 80 | return result; 81 | } 82 | 83 | @Override 84 | public String toString() { 85 | StringBuilder sb = new StringBuilder(); 86 | sb.append(getClass().getSimpleName()); 87 | sb.append(" ["); 88 | sb.append("Hash = ").append(hashCode()); 89 | sb.append(", id=").append(id); 90 | sb.append(", username=").append(username); 91 | sb.append(", password=").append(password); 92 | sb.append(", serialVersionUID=").append(serialVersionUID); 93 | sb.append("]"); 94 | return sb.toString(); 95 | } 96 | } -------------------------------------------------------------------------------- /src/main/resources/static/js/breakpoints.js: -------------------------------------------------------------------------------- 1 | /* 2 | Breakpoints.js 3 | version 1.0 4 | 5 | Creates handy events for your responsive design breakpoints 6 | 7 | Copyright 2011 XOXCO, Inc 8 | http://xoxco.com/ 9 | 10 | Documentation for this plugin lives here: 11 | http://xoxco.com/projects/code/breakpoints 12 | 13 | Licensed under the MIT license: 14 | http://www.opensource.org/licenses/mit-license.php 15 | 16 | */ 17 | (function($) { 18 | 19 | var lastSize = 0; 20 | var interval = null; 21 | 22 | $.fn.resetBreakpoints = function() { 23 | $(window).unbind('resize'); 24 | if (interval) { 25 | clearInterval(interval); 26 | } 27 | lastSize = 0; 28 | }; 29 | 30 | $.fn.setBreakpoints = function(settings) { 31 | var options = jQuery.extend({ 32 | distinct: true, 33 | breakpoints: new Array(320,480,768,1024) 34 | },settings); 35 | 36 | 37 | interval = setInterval(function() { 38 | 39 | var w = $(window).width(); 40 | var done = false; 41 | 42 | for (var bp in options.breakpoints.sort(function(a,b) { return (b-a) })) { 43 | 44 | // fire onEnter when a browser expands into a new breakpoint 45 | // if in distinct mode, remove all other breakpoints first. 46 | if (!done && w >= options.breakpoints[bp] && lastSize < options.breakpoints[bp]) { 47 | if (options.distinct) { 48 | for (var x in options.breakpoints.sort(function(a,b) { return (b-a) })) { 49 | if ($('body').hasClass('breakpoint-' + options.breakpoints[x])) { 50 | $('body').removeClass('breakpoint-' + options.breakpoints[x]); 51 | $(window).trigger('exitBreakpoint' + options.breakpoints[x]); 52 | } 53 | } 54 | done = true; 55 | } 56 | $('body').addClass('breakpoint-' + options.breakpoints[bp]); 57 | $(window).trigger('enterBreakpoint' + options.breakpoints[bp]); 58 | 59 | } 60 | 61 | // fire onExit when browser contracts out of a larger breakpoint 62 | if (w < options.breakpoints[bp] && lastSize >= options.breakpoints[bp]) { 63 | $('body').removeClass('breakpoint-' + options.breakpoints[bp]); 64 | $(window).trigger('exitBreakpoint' + options.breakpoints[bp]); 65 | 66 | } 67 | 68 | // if in distinct mode, fire onEnter when browser contracts into a smaller breakpoint 69 | if ( 70 | options.distinct && // only one breakpoint at a time 71 | w >= options.breakpoints[bp] && // and we are in this one 72 | w < options.breakpoints[bp-1] && // and smaller than the bigger one 73 | lastSize > w && // and we contracted 74 | lastSize >0 && // and this is not the first time 75 | !$('body').hasClass('breakpoint-' + options.breakpoints[bp]) // and we aren't already in this breakpoint 76 | ) { 77 | $('body').addClass('breakpoint-' + options.breakpoints[bp]); 78 | $(window).trigger('enterBreakpoint' + options.breakpoints[bp]); 79 | 80 | } 81 | } 82 | 83 | // set up for next call 84 | if (lastSize != w) { 85 | lastSize = w; 86 | } 87 | },250); 88 | }; 89 | 90 | })(jQuery); 91 | -------------------------------------------------------------------------------- /src/main/java/priv/jesse/mall/web/admin/AdminUserController.java: -------------------------------------------------------------------------------- 1 | package priv.jesse.mall.web.admin; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.data.domain.PageRequest; 5 | import org.springframework.data.domain.Pageable; 6 | import org.springframework.stereotype.Controller; 7 | import org.springframework.web.bind.annotation.*; 8 | import priv.jesse.mall.entity.User; 9 | import priv.jesse.mall.entity.pojo.ResultBean; 10 | import priv.jesse.mall.service.UserService; 11 | 12 | import java.util.List; 13 | import java.util.Map; 14 | 15 | @Controller 16 | @RequestMapping("/admin/user") 17 | public class AdminUserController { 18 | @Autowired 19 | private UserService userService; 20 | 21 | /** 22 | * 打开用户列表页面 23 | * @return 24 | */ 25 | @RequestMapping("/toList.html") 26 | public String toList() { 27 | return "admin/user/list"; 28 | } 29 | 30 | /** 31 | * 打开编辑页面 32 | * @param id 33 | * @param map 34 | * @return 35 | */ 36 | @RequestMapping("/toEdit.html") 37 | public String toEdit(int id, Map map) { 38 | User user = userService.findById(id); 39 | map.put("user", user); 40 | return "admin/user/edit"; 41 | } 42 | 43 | /** 44 | * 获取所有用户列表 45 | * 46 | * @param pageindex 47 | * @return 48 | */ 49 | @ResponseBody 50 | @RequestMapping("/list.do") 51 | public ResultBean> findAllUser(int pageindex, 52 | @RequestParam(value = "pageSize", defaultValue = "15") int pageSize) { 53 | Pageable pageable = new PageRequest(pageindex, pageSize, null); 54 | List users = userService.findAll(pageable).getContent(); 55 | return new ResultBean<>(users); 56 | } 57 | 58 | @ResponseBody 59 | @RequestMapping("/getTotal.do") 60 | public ResultBean geTotal() { 61 | Pageable pageable = new PageRequest(1, 15, null); 62 | int total = (int) userService.findAll(pageable).getTotalElements(); 63 | return new ResultBean<>(total); 64 | } 65 | 66 | @ResponseBody 67 | @RequestMapping("/del.do") 68 | public ResultBean del(int id) { 69 | userService.delById(id); 70 | return new ResultBean<>(true); 71 | } 72 | 73 | @ResponseBody 74 | @RequestMapping(method = RequestMethod.POST, value = "/update.do") 75 | public ResultBean update(int id,String username, 76 | String password,String name, 77 | String phone,String email, 78 | String addr) { 79 | // 更新前先查询 80 | User user = userService.findById(id); 81 | user.setId(id); 82 | user.setName(name); 83 | user.setUsername(username); 84 | user.setPassword(password); 85 | user.setAddr(addr); 86 | user.setEmail(email); 87 | user.setPhone(phone); 88 | userService.update(user); 89 | return new ResultBean<>(true); 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /src/main/resources/static/css/login-soft.css: -------------------------------------------------------------------------------- 1 | /*** 2 | Login page 3 | ***/ 4 | 5 | /* logo page */ 6 | .login { 7 | background-color: #666 !important; 8 | } 9 | 10 | .login .logo { 11 | width: 247px; 12 | margin: 0 auto; 13 | margin-top:60px; 14 | padding: 15px; 15 | text-align: center; 16 | } 17 | 18 | 19 | .login .content { 20 | background: url(../image/bg-white-lock.png) repeat; 21 | width: 291px; 22 | margin: 0 auto; 23 | margin-bottom: 0px; 24 | padding: 30px; 25 | padding-top: 20px; 26 | padding-bottom: 15px; 27 | } 28 | 29 | .login .content h3 { 30 | color: #eee; 31 | } 32 | .login .content h4 { 33 | color: #eee; 34 | } 35 | 36 | .login .content p, 37 | .login .content label { 38 | color: #fff; 39 | } 40 | 41 | .login .content .login-form, 42 | .login .content .forget-form { 43 | padding: 0px; 44 | margin: 0px; 45 | } 46 | 47 | .login .content .m-wrap { 48 | width: 249px; 49 | background-color: #fff; 50 | } 51 | 52 | 53 | .login .content .control-group { 54 | margin-bottom: 20px !important; 55 | } 56 | 57 | .login .content .input-icon .m-wrap { 58 | margin: 0px !important; 59 | } 60 | 61 | .login .content .forget-form { 62 | display: none; 63 | } 64 | 65 | .login .content .register-form { 66 | display: none; 67 | } 68 | 69 | .login .content .form-title { 70 | font-weight: 300; 71 | margin-bottom: 25px; 72 | } 73 | 74 | .login .content .form-actions { 75 | background-color: transparent; 76 | clear: both; 77 | border: 0px; 78 | border-bottom1: 1px solid #999; 79 | padding: 0px 30px 25px 30px; 80 | margin-left: -30px; 81 | margin-right: -30px; 82 | } 83 | 84 | .login .content .forget-form .form-actions { 85 | border: 0; 86 | margin-bottom: 0; 87 | padding-bottom: 20px; 88 | } 89 | 90 | .login .content .register-form .form-actions { 91 | border: 0; 92 | margin-bottom: 0; 93 | padding-bottom: 0px; 94 | } 95 | 96 | .login .content .form-actions .checkbox { 97 | margin-top: 8px; 98 | display: inline-block; 99 | } 100 | 101 | .login .content .form-actions .btn { 102 | margin-top: 1px; 103 | } 104 | 105 | .login .content .forget-password { 106 | margin-top: 25px; 107 | } 108 | 109 | .login .content .create-account { 110 | border-top: 1px dotted #eee; 111 | padding-top: 10px; 112 | margin-top: 15px; 113 | } 114 | 115 | .login .content .create-account a { 116 | display: inline-block; 117 | margin-top: 5px; 118 | } 119 | 120 | .login .copyright { 121 | text-align: center; 122 | width: 270px; 123 | margin: 0 auto; 124 | padding: 10px 10px 0 10px; 125 | color: #eee; 126 | font-size: 12px; 127 | } 128 | 129 | @media (max-width: 480px) { 130 | /*** 131 | Login page 132 | ***/ 133 | .login .logo { 134 | margin-top:10px; 135 | } 136 | 137 | .login .content { 138 | padding: 30px; 139 | width: 222px; 140 | } 141 | 142 | .login .content h3 { 143 | font-size: 22px; 144 | } 145 | 146 | .login .content .m-wrap { 147 | width: 180px; 148 | } 149 | 150 | .login .checkbox { 151 | font-size: 13px; 152 | } 153 | } -------------------------------------------------------------------------------- /src/main/resources/static/css/login.css: -------------------------------------------------------------------------------- 1 | /*** 2 | Login page 3 | ***/ 4 | 5 | /* logo page */ 6 | .login { 7 | background-color: #444 !important; 8 | } 9 | 10 | .login .logo { 11 | width: 247px; 12 | margin: 0 auto; 13 | margin-top:60px; 14 | padding: 15px; 15 | text-align: center; 16 | } 17 | 18 | .login .content { 19 | background-color:#fff; 20 | width: 291px; 21 | margin: 0 auto; 22 | margin-bottom: 0px; 23 | padding: 30px; 24 | padding-top: 20px; 25 | padding-bottom: 15px; 26 | } 27 | 28 | .login .content h3 { 29 | color: #000; 30 | } 31 | .login .content h4 { 32 | color: #555; 33 | } 34 | 35 | .login .content p { 36 | color: #222; 37 | } 38 | 39 | .login .content .login-form, 40 | .login .content .forget-form { 41 | padding: 0px; 42 | margin: 0px; 43 | } 44 | 45 | .login .content .m-wrap { 46 | width: 249px; 47 | border-left: 0 !important; 48 | } 49 | 50 | .login .content .input-icon { 51 | border-left: 2px solid #35aa47 !important; 52 | } 53 | 54 | .login .content .control-group { 55 | margin-bottom: 20px !important; 56 | } 57 | 58 | .login .content .input-icon .m-wrap { 59 | margin: 0px !important; 60 | } 61 | 62 | .login .content .forget-form { 63 | display: none; 64 | } 65 | 66 | .login .content .register-form { 67 | display: none; 68 | } 69 | 70 | .login .content .form-title { 71 | font-weight: 300; 72 | margin-bottom: 25px; 73 | } 74 | 75 | .login .content .form-actions { 76 | background-color: #fff; 77 | clear: both; 78 | border: 0px; 79 | border-bottom: 1px solid #eee; 80 | padding: 0px 30px 25px 30px; 81 | margin-left: -30px; 82 | margin-right: -30px; 83 | } 84 | 85 | .login .content .forget-form .form-actions { 86 | border: 0; 87 | margin-bottom: 0; 88 | padding-bottom: 20px; 89 | } 90 | 91 | .login .content .register-form .form-actions { 92 | border: 0; 93 | margin-bottom: 0; 94 | padding-bottom: 0px; 95 | } 96 | 97 | .login .content .form-actions .checkbox { 98 | margin-top: 8px; 99 | display: inline-block; 100 | } 101 | 102 | .login .content .form-actions .btn { 103 | margin-top: 1px; 104 | } 105 | 106 | .login .content .forget-password { 107 | margin-top: 25px; 108 | } 109 | 110 | .login .content .create-account { 111 | border-top: 1px dotted #eee; 112 | padding-top: 10px; 113 | margin-top: 15px; 114 | } 115 | 116 | .login .content .create-account a { 117 | display: inline-block; 118 | margin-top: 5px; 119 | } 120 | 121 | .login .copyright { 122 | text-align: center; 123 | width: 250px; 124 | margin: 0 auto; 125 | padding: 10px 10px 0 10px; 126 | color: #999; 127 | font-size: 11px; 128 | } 129 | 130 | @media (max-width: 480px) { 131 | /*** 132 | Login page 133 | ***/ 134 | .login .logo { 135 | margin-top:10px; 136 | } 137 | 138 | .login .content { 139 | padding: 30px; 140 | width: 222px; 141 | } 142 | 143 | .login .content h3 { 144 | font-size: 22px; 145 | } 146 | 147 | .login .content .m-wrap { 148 | width: 180px; 149 | } 150 | 151 | .login .checkbox { 152 | font-size: 13px; 153 | } 154 | } -------------------------------------------------------------------------------- /src/main/resources/static/css/jquery.nestable.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Nestable 3 | */ 4 | .dd-list { display: block; position: relative; margin: 0; padding: 0; list-style: none; } 5 | .dd-list .dd-list { padding-left: 30px; } 6 | .dd-collapsed .dd-list { display: none; } 7 | 8 | .dd-item, 9 | .dd-empty, 10 | .dd-placeholder { display: block; position: relative; margin: 0; padding: 0; min-height: 20px; font-size: 13px; line-height: 20px; } 11 | 12 | .dd-handle { display: block; height: 30px; margin: 5px 0; cursor: move; padding: 5px 10px; color: #333; text-decoration: none; font-weight: 400; border: 1px solid #ccc; 13 | background: #fafafa; 14 | -webkit-border-radius: 3px; 15 | border-radius: 3px; 16 | box-sizing: border-box; -moz-box-sizing: border-box; 17 | } 18 | .dd-handle:hover { color: #2ea8e5; background: #fff; } 19 | 20 | .dd-item > button { display: block; position: relative; cursor: pointer; float: left; width: 25px; height: 20px; margin: 7px 0; padding: 0; text-indent: 100%; white-space: nowrap; overflow: hidden; border: 0; background: transparent; font-size: 10px; line-height: 1; text-align: center; font-weight: bold; } 21 | .dd-item > button:before { content: '\f067'; display: block; position: absolute; width: 100%; text-align: center; text-indent: 0; font-family: 'FontAwesome' } 22 | .dd-item > button[data-action="collapse"]:before { content: '\f068'; } 23 | 24 | .dd-placeholder, 25 | .dd-empty { 26 | margin: 5px 0; padding: 0; min-height: 30px; background: #f2fbff; border: 1px dashed #b6bcbf; 27 | box-sizing: border-box; -moz-box-sizing: border-box; } 28 | .dd-empty { border: 1px dashed #bbb; min-height: 100px; background-color: #e5e5e5; 29 | background-size: 60px 60px; 30 | background-position: 0 0, 30px 30px; 31 | } 32 | 33 | .dd-dragel { position: absolute; pointer-events: none; z-index: 9999; } 34 | .dd-dragel > .dd-item .dd-handle { margin-top: 0; } 35 | .dd-dragel .dd-handle { 36 | -webkit-box-shadow: 2px 4px 6px 0 rgba(0,0,0,.1); 37 | box-shadow: 2px 4px 6px 0 rgba(0,0,0,.1); 38 | } 39 | 40 | .dd-hover > .dd-handle { background: #2ea8e5 !important; } 41 | 42 | /** 43 | * Nestable Draggable Handles 44 | */ 45 | 46 | .dd3-content { display: block; height: 30px; margin: 5px 0; padding: 5px 10px 5px 40px; color: #333; text-decoration: none; font-weight: 400; border: 1px solid #ccc; 47 | background: #fafafa; 48 | -webkit-border-radius: 3px; 49 | border-radius: 3px; 50 | box-sizing: border-box; -moz-box-sizing: border-box; 51 | } 52 | .dd3-content:hover { color: #2ea8e5; background: #fff; } 53 | 54 | .dd-dragel > .dd3-item > .dd3-content { margin: 0; } 55 | 56 | .dd3-item > button { margin-left: 30px; } 57 | 58 | .dd3-handle { position: absolute; margin: 0; left: 0; top: 0; cursor:move; width: 30px; text-indent: 100%; white-space: nowrap; overflow: hidden; 59 | border: 1px solid #aaa; 60 | background: #ddd; 61 | border-top-right-radius: 0; 62 | border-bottom-right-radius: 0; 63 | } 64 | .dd3-handle:before { content: '≡'; display: block; position: absolute; left: 0; top: 3px; width: 100%; text-align: center; text-indent: 0; color: #fff; font-size: 20px; font-weight: normal; } 65 | .dd3-handle:hover { background: #ddd; } -------------------------------------------------------------------------------- /src/main/java/priv/jesse/mall/web/user/OrderController.java: -------------------------------------------------------------------------------- 1 | package priv.jesse.mall.web.user; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.stereotype.Controller; 5 | import org.springframework.web.bind.annotation.RequestMapping; 6 | import org.springframework.web.bind.annotation.ResponseBody; 7 | import priv.jesse.mall.entity.Order; 8 | import priv.jesse.mall.entity.OrderItem; 9 | import priv.jesse.mall.entity.pojo.ResultBean; 10 | import priv.jesse.mall.service.OrderService; 11 | 12 | import javax.servlet.http.HttpServletRequest; 13 | import javax.servlet.http.HttpServletResponse; 14 | import java.io.IOException; 15 | import java.util.List; 16 | 17 | @Controller 18 | @RequestMapping("/order") 19 | public class OrderController { 20 | @Autowired 21 | private OrderService orderService; 22 | 23 | /** 24 | * 打开订单列表页面 25 | * 26 | * @return 27 | */ 28 | @RequestMapping("/toList.html") 29 | public String toOrderList() { 30 | return "mall/order/list"; 31 | } 32 | 33 | /** 34 | * 查询用户订单列表 35 | * 36 | * @param request 37 | * @return 38 | */ 39 | @RequestMapping("/list.do") 40 | @ResponseBody 41 | public ResultBean> listData(HttpServletRequest request) { 42 | List orders = orderService.findUserOrder(request); 43 | return new ResultBean<>(orders); 44 | } 45 | 46 | /** 47 | * 查询订单详情 48 | * 49 | * @param orderId 50 | * @return 51 | */ 52 | @RequestMapping("/getDetail.do") 53 | @ResponseBody 54 | public ResultBean> getDetail(int orderId) { 55 | List orderItems = orderService.findItems(orderId); 56 | return new ResultBean<>(orderItems); 57 | } 58 | 59 | /** 60 | * 提交订单 61 | * 62 | * @param name 63 | * @param phone 64 | * @param addr 65 | * @param request 66 | * @param response 67 | */ 68 | @RequestMapping("/submit.do") 69 | public void submit(String name, 70 | String phone, 71 | String addr, 72 | HttpServletRequest request, 73 | HttpServletResponse response) throws Exception { 74 | orderService.submit(name, phone, addr, request, response); 75 | } 76 | 77 | /** 78 | * 支付方法 79 | * 80 | * @param orderId 81 | */ 82 | @RequestMapping("pay.do") 83 | @ResponseBody 84 | public ResultBean pay(int orderId, HttpServletResponse response) throws IOException { 85 | orderService.pay(orderId); 86 | return new ResultBean<>(true); 87 | } 88 | 89 | /** 90 | * 确认收货 91 | * @param orderId 92 | * @param response 93 | * @return 94 | * @throws IOException 95 | */ 96 | @RequestMapping("receive.do") 97 | @ResponseBody 98 | public ResultBean receive(int orderId, HttpServletResponse response) throws IOException { 99 | orderService.receive(orderId); 100 | return new ResultBean<>(true); 101 | } 102 | 103 | 104 | } 105 | -------------------------------------------------------------------------------- /src/main/resources/static/css/blog.css: -------------------------------------------------------------------------------- 1 | /*** 2 | Blog Page 3 | ***/ 4 | 5 | /*--Block Article--*/ 6 | .blog-page { 7 | padding-bottom: 20px; 8 | } 9 | 10 | .blog-page h1 { 11 | margin-bottom: 20px; 12 | } 13 | 14 | .blog-page h2 a { 15 | color: #000; 16 | } 17 | 18 | .blog-page h2 a:hover { 19 | color: #0d638f; 20 | text-decoration: none; 21 | } 22 | 23 | .blog-page hr { 24 | margin-top: 30px !important; 25 | } 26 | 27 | .blog-page .article-block { 28 | padding-bottom: 20px; 29 | } 30 | 31 | .blog-page .news-img img { 32 | margin-top: 9px; 33 | } 34 | 35 | .blog-page .blog-tag-data ul { 36 | margin-bottom: 5px; 37 | } 38 | 39 | .blog-page .blog-tag-data li { 40 | padding: 0; 41 | } 42 | 43 | .blog-page .blog-tag-data li i { 44 | color: #78cff8; 45 | } 46 | 47 | .blog-page .blog-tag-data li a { 48 | padding: 0; 49 | color: #555; 50 | margin-right: 8px; 51 | } 52 | 53 | .blog-page .blog-tag-data { 54 | margin-bottom: 10px; 55 | } 56 | 57 | .blog-page .blog-tag-data ul.blog-tags a { 58 | background: #eee; 59 | padding: 1px 4px; 60 | margin: 0 4px 4px 0; 61 | display: inline-block; 62 | } 63 | 64 | .blog-page .blog-tag-data ul.blog-tags a:hover { 65 | background: #ddd; 66 | text-decoration: none; 67 | } 68 | 69 | .blog-page .blog-tag-data .blog-tag-data-inner { 70 | text-align: right; 71 | } 72 | 73 | .blog-page .blog-tag-data img { 74 | margin-bottom: 12px; 75 | } 76 | 77 | .blog-page .blog-article { 78 | padding-bottom: 20px; 79 | } 80 | 81 | .blog-page .blog-article h2 { 82 | margin-top: 0; 83 | } 84 | 85 | /*--Block Sidebar--*/ 86 | .blog-sidebar h2 { 87 | font-size: 38.5px; 88 | margin-bottom: 20px; 89 | } 90 | 91 | /*Twitter block*/ 92 | .blog-twitter-block { 93 | padding: 5px; 94 | position: relative; 95 | margin-bottom: 10px; 96 | border-right: solid 2px #ddd; 97 | } 98 | 99 | .blog-twitter-block:hover { 100 | background: #fafafa; 101 | border-color: #35aa47; 102 | } 103 | 104 | .blog-twitter-block a { 105 | color: #4d90fe; 106 | } 107 | 108 | .blog-twitter-block p { 109 | margin-bottom: 0; 110 | } 111 | 112 | .blog-twitter-block span { 113 | color: #555; 114 | display: block; 115 | font-size: 12px; 116 | } 117 | 118 | .blog-twitter-block i.blog-twiiter-icon { 119 | color: #eee; 120 | right: 10px; 121 | bottom: 10px; 122 | font-size: 30px; 123 | position: absolute; 124 | } 125 | 126 | /*** 127 | Blog & News Item Page 128 | ***/ 129 | /*--Media Object--*/ 130 | .blog-page .media img { 131 | height: 54px; 132 | position: relative; 133 | top: 3px; 134 | width: 54px; 135 | } 136 | 137 | .blog-page h4.media-heading { 138 | position: relative; 139 | } 140 | 141 | .blog-page h4.media-heading span { 142 | color: #777777; 143 | font-size: 12px; 144 | position: absolute; 145 | right: 0; 146 | top: 3px; 147 | } 148 | 149 | .blog-page h4.media-heading span a { 150 | color: #78cff8; 151 | } 152 | 153 | /*Post Comment*/ 154 | .blog-page .post-comment .color-red { 155 | color: #f00; 156 | } 157 | 158 | /*For Responsive*/ 159 | @media (max-width: 768px) { 160 | .blog-page .blog-tag-data .blog-tag-data-inner { 161 | text-align: left; 162 | } 163 | } -------------------------------------------------------------------------------- /src/main/resources/static/js/jquery.input-ip-address-control-1.0.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery Input Ip Address Control : v0.1beta (2010/11/09 16:15:43) 3 | * Copyright (c) 2010 jquery-input-ip-address-control@googlecode.com 4 | * Licensed under the MIT license and GPL licenses. 5 | * 6 | */ 7 | eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(l($){Q.1o.1t=l(){E=/\\b(?:(?:25[0-5]|2[0-4][0-9]|[1m]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[1m]?[0-9][0-9]?)\\b/;h E.1a(p.1i())};Q.1o.1S=l(){E=/\\b([A-16-9]{1,4}:){7}([A-16-9]{1,4})\\b/i;h E.1a(p.1i())};$.1X.1h({y:l(u,c){f(p.z==0)h;f(1k u==\'1f\'){c=(1k c==\'1f\')?c:u;h p.1d(l(){f(p.18){p.1s();p.18(u,c)}w f(p.1e){t C=p.1e();C.1L(S);C.1z(\'10\',c);C.1b(\'10\',u);C.1w()}})}w{f(p[0].18){u=p[0].1u;c=p[0].1C}w f(14.12&&14.12.19){t C=14.12.19();u=0-C.1D().1b(\'10\',-1E);c=u+C.1H.z}h{u:u,c:c}}},1B:l(s){s=$.1h({v:4},s);f(s.v==4){s.W=M I(\'[0-9]\',\'g\');s.r=\'R.R.R.R\'}f(s.v==6){s.W=M I(\'[A-16-9]\',\'1x\');s.r=\'x:x:x:x:x:x:x:x\'}s.D=s.r.K(\'\').Y();s.q=s.r.X(M I(s.D,\'g\'),\'\').K(\'\').Y();s.O=s.r.K(s.q).Y();h $(p).1d(l(){t a={k:T,n:T,o:T,d:T};a.d=$(p);f(a.d.m()==\'\'||!J(a.d.m()))a.d.m(s.r);a.d.1j(\'1Z\',(s.v==4?15:1c)).1j(\'1W\',(s.v==4?15:1c));l J(o){h 24("o.21"+s.v+"()")};l P(){a.k=a.d.y();a.o=J(L(a.d.m()))?L(a.d.m()):a.o;a.n=a.d.m().K(\'\')};l 1n(o){t G=o.K(s.q);1p(t j=0;j0)G[j]+=s.D}h G.H(s.q)};l L(o){t E=M I(s.O,\'g\');t 1g=M I(s.D,\'g\');h o.X(E,\'0\').X(1g,\'\')};l 11(e){1R(e.1Q){U 8:f(a.n[a.k.c-1]!=s.q){a.n[a.k.c-1]=s.D;a.d.m(a.n.H("")).m()}a.d.y(a.k.c-1);h B;V;U 13:U 1T:a.d.17();V;U 1P:f(a.n[a.k.c]!=s.q&&a.k.c=20&&e.F<=1N)||e.F>1J){f(Q.1q(e.F).1y(s.W)){a.n[a.k.c]=Q.1q(e.F);f(!J(L(a.n.H(\'\')))){f((a.k.c==0||a.n[a.k.c-1]==s.q)){1p(t i=a.k.c+1;i 2 | 3 | 4 | 5 | 6 | 7 | 8 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | %highlight(%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger) -%msg%n 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | ${log_dir}/%d{yyyy-MM-dd}/log.log 43 | 45 | ${maxHistory} 46 | 47 | 48 | 54 | 58 | 59 | 60 | %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | priv.jesse 7 | mall 8 | 1.0 9 | jar 10 | 11 | mall 12 | shopping mall project 13 | 14 | 15 | org.springframework.boot 16 | spring-boot-starter-parent 17 | 1.5.8.RELEASE 18 | 19 | 20 | 21 | 22 | UTF-8 23 | UTF-8 24 | 1.8 25 | 26 | 27 | 28 | 29 | 30 | mysql 31 | mysql-connector-java 32 | 8.0.29 33 | 34 | 35 | 36 | 37 | com.h2database 38 | h2 39 | runtime 40 | 41 | 42 | 43 | 44 | org.springframework.boot 45 | spring-boot-starter-data-jpa 46 | 47 | 48 | 49 | com.alibaba 50 | druid-spring-boot-starter 51 | 1.1.3 52 | 53 | 54 | 55 | org.springframework.boot 56 | spring-boot-starter-aop 57 | 58 | 59 | 60 | org.springframework.boot 61 | spring-boot-starter-web 62 | 63 | 64 | 65 | org.springframework.boot 66 | spring-boot-starter-thymeleaf 67 | 68 | 69 | commons-lang 70 | commons-lang 71 | 2.6 72 | 73 | 74 | 75 | org.springframework.boot 76 | spring-boot-devtools 77 | runtime 78 | true 79 | 80 | 81 | 82 | org.springframework.boot 83 | spring-boot-starter-test 84 | test 85 | 86 | 87 | 88 | 89 | ${project.artifactId} 90 | 91 | 92 | 93 | org.springframework.boot 94 | spring-boot-maven-plugin 95 | 96 | 97 | 98 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /src/main/resources/templates/mall/common.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 | 11 | 12 |
    13 | 22 |
    23 | 26 | 27 | 28 | 29 | 30 |
      31 |
    • 32 | 分类 33 |
      34 | 35 |
      36 | 52 |
    • 53 |
    • 54 | 55 |   56 | 请登陆 57 | 请登陆 58 | 59 |
      60 |
      退出登录
      61 |
      我的订单
      62 |
      购物车
      63 |
      登录
      64 |
      注册
      65 |
      66 |
    • 67 | 68 |
    69 |
    70 |
    71 | 72 | 73 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /src/main/resources/static/js/ui-tree.js: -------------------------------------------------------------------------------- 1 | var UITree = function () { 2 | 3 | return { 4 | //main function to initiate the module 5 | init: function () { 6 | // handle collapse/expand for tree_1 7 | $('#tree_1_collapse').click(function () { 8 | $('.tree-toggle', $('#tree_1 > li > ul')).addClass("closed"); 9 | $('.branch', $('#tree_1 > li > ul')).removeClass("in"); 10 | }); 11 | 12 | $('#tree_1_expand').click(function () { 13 | $('.tree-toggle', $('#tree_1 > li > ul')).removeClass("closed"); 14 | $('.branch', $('#tree_1 > li > ul')).addClass("in"); 15 | }); 16 | 17 | // handle collapse/expand for tree_2 18 | $('#tree_2_collapse').click(function () { 19 | $('.tree-toggle', $('#tree_2 > li > ul')).addClass("closed"); 20 | $('.branch', $('#tree_2 > li > ul')).removeClass("in"); 21 | }); 22 | 23 | $('#tree_2_expand').click(function () { 24 | //$('.tree-toggle', $('#tree_2 > li > ul')).removeClass("closed"); 25 | // iterate tree nodes and exppand all nodes 26 | $('.tree-toggle', $('#tree_2 > li > ul')).each(function () { 27 | $(this).click(); //trigger tree node click 28 | }); 29 | $('.branch', $('#tree_2 > li > ul')).addClass("in"); 30 | }); 31 | 32 | //This is a quick example of capturing the select event on tree leaves, not branches 33 | $("#tree_1").on("nodeselect.tree.data-api", "[data-role=leaf]", function (e) { 34 | var output = ""; 35 | 36 | output += "Node nodeselect event fired:\n"; 37 | output += "Node Type: leaf\n"; 38 | output += "Value: " + ((e.node.value) ? e.node.value : e.node.el.text()) + "\n"; 39 | output += "Parentage: " + e.node.parentage.join("/"); 40 | 41 | alert(output); 42 | }); 43 | 44 | //This is a quick example of capturing the select event on tree branches, not leaves 45 | $("#tree_1").on("nodeselect.tree.data-api", "[role=branch]", function (e) { 46 | var output = "Node nodeselect event fired:\n"; + "Node Type: branch\n" + "Value: " + ((e.node.value) ? e.node.value : e.node.el.text()) + "\n" + "Parentage: " + e.node.parentage.join("/") + "\n" 47 | 48 | alert(output); 49 | }); 50 | 51 | //Listening for the 'openbranch' event. Look for e.node, which is the actual node the user opens 52 | 53 | $("#tree_1").on("openbranch.tree", "[data-toggle=branch]", function (e) { 54 | 55 | var output = "Node openbranch event fired:\n" + "Node Type: branch\n" + "Value: " + ((e.node.value) ? e.node.value : e.node.el.text()) + "\n" + "Parentage: " + e.node.parentage.join("/") + "\n" 56 | 57 | alert(output); 58 | }); 59 | 60 | 61 | //Listening for the 'closebranch' event. Look for e.node, which is the actual node the user closed 62 | 63 | $("#tree_1").on("closebranch.tree", "[data-toggle=branch]", function (e) { 64 | 65 | var output = "Node closebranch event fired:\n" + "Node Type: branch\n" + "Value: " + ((e.node.value) ? e.node.value : e.node.el.text()) + "\n" + "Parentage: " + e.node.parentage.join("/") + "\n" 66 | 67 | alert(output); 68 | }); 69 | } 70 | 71 | }; 72 | 73 | }(); -------------------------------------------------------------------------------- /src/main/java/priv/jesse/mall/utils/DesUtil.java: -------------------------------------------------------------------------------- 1 | package priv.jesse.mall.utils; 2 | 3 | import sun.misc.BASE64Decoder; 4 | import sun.misc.BASE64Encoder; 5 | 6 | import javax.crypto.Cipher; 7 | import javax.crypto.SecretKey; 8 | import javax.crypto.SecretKeyFactory; 9 | import javax.crypto.spec.DESKeySpec; 10 | import java.io.IOException; 11 | import java.security.SecureRandom; 12 | 13 | /** 14 | * 加密解密工具类 15 | * @author hfb 16 | * @date 2017/9/29 17 | */ 18 | public class DesUtil { 19 | private final static String DES = "DES"; 20 | 21 | public static void main(String[] args) throws Exception { 22 | String data = "123 456"; 23 | String key = "wow!@#$%"; 24 | System.err.println(encrypt(data, key)); 25 | System.err.println(decrypt(encrypt(data, key), key)); 26 | 27 | } 28 | 29 | /** 30 | * Description 根据键值进行加密 31 | * @param data 32 | * @param key 加密键byte数组 33 | * @return 34 | * @throws Exception 35 | */ 36 | public static String encrypt(String data, String key) throws Exception { 37 | byte[] bt = encrypt(data.getBytes(), key.getBytes()); 38 | String strs = new BASE64Encoder().encode(bt); 39 | return strs; 40 | } 41 | 42 | /** 43 | * Description 根据键值进行解密 44 | * @param data 45 | * @param key 加密键byte数组 46 | * @return 47 | * @throws IOException 48 | * @throws Exception 49 | */ 50 | public static String decrypt(String data, String key) throws IOException, 51 | Exception { 52 | if (data == null) 53 | return null; 54 | BASE64Decoder decoder = new BASE64Decoder(); 55 | byte[] buf = decoder.decodeBuffer(data); 56 | byte[] bt = decrypt(buf,key.getBytes()); 57 | return new String(bt); 58 | } 59 | 60 | /** 61 | * Description 根据键值进行加密 62 | * @param data 63 | * @param key 加密键byte数组 64 | * @return 65 | * @throws Exception 66 | */ 67 | private static byte[] encrypt(byte[] data, byte[] key) throws Exception { 68 | // 生成一个可信任的随机数源 69 | SecureRandom sr = new SecureRandom(); 70 | 71 | // 从原始密钥数据创建DESKeySpec对象 72 | DESKeySpec dks = new DESKeySpec(key); 73 | 74 | // 创建一个密钥工厂,然后用它把DESKeySpec转换成SecretKey对象 75 | SecretKeyFactory keyFactory = SecretKeyFactory.getInstance(DES); 76 | SecretKey securekey = keyFactory.generateSecret(dks); 77 | 78 | // Cipher对象实际完成加密操作 79 | Cipher cipher = Cipher.getInstance(DES); 80 | 81 | // 用密钥初始化Cipher对象 82 | cipher.init(Cipher.ENCRYPT_MODE, securekey, sr); 83 | 84 | return cipher.doFinal(data); 85 | } 86 | 87 | 88 | /** 89 | * Description 根据键值进行解密 90 | * @param data 91 | * @param key 加密键byte数组 92 | * @return 93 | * @throws Exception 94 | */ 95 | private static byte[] decrypt(byte[] data, byte[] key) throws Exception { 96 | // 生成一个可信任的随机数源 97 | SecureRandom sr = new SecureRandom(); 98 | 99 | // 从原始密钥数据创建DESKeySpec对象 100 | DESKeySpec dks = new DESKeySpec(key); 101 | 102 | // 创建一个密钥工厂,然后用它把DESKeySpec转换成SecretKey对象 103 | SecretKeyFactory keyFactory = SecretKeyFactory.getInstance(DES); 104 | SecretKey securekey = keyFactory.generateSecret(dks); 105 | 106 | // Cipher对象实际完成解密操作 107 | Cipher cipher = Cipher.getInstance(DES); 108 | 109 | // 用密钥初始化Cipher对象 110 | cipher.init(Cipher.DECRYPT_MODE, securekey, sr); 111 | 112 | return cipher.doFinal(data); 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /src/main/resources/templates/mall/user/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | SkyMall | 商城 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 |
    21 |
    22 |
    23 |
    24 |
    25 | 欢迎登录 26 |
    27 |
    28 |
    29 | 30 |
    31 | 34 |
    35 |
    36 | 37 |
    38 | 39 |
    40 | 43 |
    44 |
    45 | 46 |
    47 |
    48 | 51 | 54 |
    55 |
    56 |
    57 |
    58 |
    59 |
    60 | 61 | 62 |
    63 | 77 |
    78 | 79 |
    80 | 81 | -------------------------------------------------------------------------------- /src/main/resources/static/js/jquery.xdr-transport.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery XDomainRequest Transport Plugin 1.1.3 3 | * https://github.com/blueimp/jQuery-File-Upload 4 | * 5 | * Copyright 2011, Sebastian Tschan 6 | * https://blueimp.net 7 | * 8 | * Licensed under the MIT license: 9 | * http://www.opensource.org/licenses/MIT 10 | * 11 | * Based on Julian Aubourg's ajaxHooks xdr.js: 12 | * https://github.com/jaubourg/ajaxHooks/ 13 | */ 14 | 15 | /*jslint unparam: true */ 16 | /*global define, window, XDomainRequest */ 17 | 18 | (function (factory) { 19 | 'use strict'; 20 | if (typeof define === 'function' && define.amd) { 21 | // Register as an anonymous AMD module: 22 | define(['jquery'], factory); 23 | } else { 24 | // Browser globals: 25 | factory(window.jQuery); 26 | } 27 | }(function ($) { 28 | 'use strict'; 29 | if (window.XDomainRequest && !$.support.cors) { 30 | $.ajaxTransport(function (s) { 31 | if (s.crossDomain && s.async) { 32 | if (s.timeout) { 33 | s.xdrTimeout = s.timeout; 34 | delete s.timeout; 35 | } 36 | var xdr; 37 | return { 38 | send: function (headers, completeCallback) { 39 | var addParamChar = /\?/.test(s.url) ? '&' : '?'; 40 | function callback(status, statusText, responses, responseHeaders) { 41 | xdr.onload = xdr.onerror = xdr.ontimeout = $.noop; 42 | xdr = null; 43 | completeCallback(status, statusText, responses, responseHeaders); 44 | } 45 | xdr = new XDomainRequest(); 46 | // XDomainRequest only supports GET and POST: 47 | if (s.type === 'DELETE') { 48 | s.url = s.url + addParamChar + '_method=DELETE'; 49 | s.type = 'POST'; 50 | } else if (s.type === 'PUT') { 51 | s.url = s.url + addParamChar + '_method=PUT'; 52 | s.type = 'POST'; 53 | } else if (s.type === 'PATCH') { 54 | s.url = s.url + addParamChar + '_method=PATCH'; 55 | s.type = 'POST'; 56 | } 57 | xdr.open(s.type, s.url); 58 | xdr.onload = function () { 59 | callback( 60 | 200, 61 | 'OK', 62 | {text: xdr.responseText}, 63 | 'Content-Type: ' + xdr.contentType 64 | ); 65 | }; 66 | xdr.onerror = function () { 67 | callback(404, 'Not Found'); 68 | }; 69 | if (s.xdrTimeout) { 70 | xdr.ontimeout = function () { 71 | callback(0, 'timeout'); 72 | }; 73 | xdr.timeout = s.xdrTimeout; 74 | } 75 | xdr.send((s.hasContent && s.data) || null); 76 | }, 77 | abort: function () { 78 | if (xdr) { 79 | xdr.onerror = $.noop(); 80 | xdr.abort(); 81 | } 82 | } 83 | }; 84 | } 85 | }); 86 | } 87 | })); 88 | -------------------------------------------------------------------------------- /src/main/resources/static/layui/lay/modules/carousel.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.1.7 MIT License By http://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.indicator(),e.elemItem.length<=1||(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