├── 小白点餐 ├── miniprogram │ ├── pages │ │ ├── base.wxss │ │ ├── kefu │ │ │ ├── kefu.wxss │ │ │ ├── kefu.json │ │ │ ├── kefu.wxml │ │ │ └── kefu.js │ │ ├── my │ │ │ ├── my.json │ │ │ ├── my.wxss │ │ │ ├── my.wxml │ │ │ └── my.js │ │ └── base │ │ │ ├── base.json │ │ │ └── base.wxml │ ├── components │ │ └── chatroom │ │ │ ├── chatroom.json │ │ │ ├── dots.gif │ │ │ ├── photo.png │ │ │ ├── chatroom.wxml │ │ │ └── chatroom.wxss │ ├── images │ │ ├── me_no.png │ │ ├── me_yes.png │ │ ├── home_no.png │ │ └── home_yes.png │ ├── sitemap.json │ ├── app.js │ ├── app.json │ ├── wxs │ │ └── util.wxs │ ├── css │ │ └── my.wxss │ ├── style │ │ └── guide.wxss │ └── app.wxss ├── cloudfunctions │ ├── echo │ │ ├── config.json │ │ ├── index.js │ │ └── package.json │ ├── login │ │ ├── config.json │ │ ├── package.json │ │ └── index.js │ ├── callback │ │ ├── config.json │ │ ├── package.json │ │ └── index.js │ └── openapi │ │ ├── package.json │ │ ├── config.json │ │ └── index.js ├── README.md └── project.config.json ├── XBDCInterface ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── src │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── hnit │ │ │ │ ├── biz │ │ │ │ ├── OrderListBiz.java │ │ │ │ ├── FoodBiz.java │ │ │ │ └── Impl │ │ │ │ │ ├── OrderListBizImpl.java │ │ │ │ │ └── FoodBizImpl.java │ │ │ │ ├── Utils │ │ │ │ └── OutputObject.java │ │ │ │ ├── XBDC.java │ │ │ │ ├── kafka │ │ │ │ └── KafkaProducer.java │ │ │ │ ├── bean │ │ │ │ ├── OrderList.java │ │ │ │ └── OrderFood.java │ │ │ │ ├── controller │ │ │ │ ├── OrderController.java │ │ │ │ └── FoodController.java │ │ │ │ ├── dao │ │ │ │ ├── OrderFoodMapper.java │ │ │ │ └── MongoDBDao.java │ │ │ │ └── config │ │ │ │ └── MongodbConfig.java │ │ └── resources │ │ │ ├── application.properties │ │ │ └── generatorConfig.xml │ └── test │ │ └── java │ │ └── com │ │ └── hnit │ │ └── XBDCInterface │ │ └── XbdcInterfaceApplicationTests.java ├── .gitignore └── pom.xml ├── xiaobaidiancan ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── src │ ├── main │ │ ├── resources │ │ │ ├── static │ │ │ │ ├── images │ │ │ │ │ ├── kefu.gif │ │ │ │ │ ├── logo.gif │ │ │ │ │ └── user.jpg │ │ │ │ ├── fonts │ │ │ │ │ ├── iconfont.eot │ │ │ │ │ ├── iconfont.ttf │ │ │ │ │ ├── iconfont.woff │ │ │ │ │ └── iconfont.woff2 │ │ │ │ ├── layui │ │ │ │ │ ├── font │ │ │ │ │ │ ├── iconfont.eot │ │ │ │ │ │ ├── iconfont.ttf │ │ │ │ │ │ └── iconfont.woff │ │ │ │ │ ├── images │ │ │ │ │ │ └── face │ │ │ │ │ │ │ ├── 0.gif │ │ │ │ │ │ │ ├── 1.gif │ │ │ │ │ │ │ ├── 2.gif │ │ │ │ │ │ │ ├── 3.gif │ │ │ │ │ │ │ ├── 4.gif │ │ │ │ │ │ │ ├── 5.gif │ │ │ │ │ │ │ ├── 6.gif │ │ │ │ │ │ │ ├── 7.gif │ │ │ │ │ │ │ ├── 8.gif │ │ │ │ │ │ │ ├── 9.gif │ │ │ │ │ │ │ ├── 10.gif │ │ │ │ │ │ │ ├── 11.gif │ │ │ │ │ │ │ ├── 12.gif │ │ │ │ │ │ │ ├── 13.gif │ │ │ │ │ │ │ ├── 14.gif │ │ │ │ │ │ │ ├── 15.gif │ │ │ │ │ │ │ ├── 16.gif │ │ │ │ │ │ │ ├── 17.gif │ │ │ │ │ │ │ ├── 18.gif │ │ │ │ │ │ │ ├── 19.gif │ │ │ │ │ │ │ ├── 20.gif │ │ │ │ │ │ │ ├── 21.gif │ │ │ │ │ │ │ ├── 22.gif │ │ │ │ │ │ │ ├── 23.gif │ │ │ │ │ │ │ ├── 24.gif │ │ │ │ │ │ │ ├── 25.gif │ │ │ │ │ │ │ ├── 26.gif │ │ │ │ │ │ │ ├── 27.gif │ │ │ │ │ │ │ ├── 28.gif │ │ │ │ │ │ │ ├── 29.gif │ │ │ │ │ │ │ ├── 30.gif │ │ │ │ │ │ │ ├── 31.gif │ │ │ │ │ │ │ ├── 32.gif │ │ │ │ │ │ │ ├── 33.gif │ │ │ │ │ │ │ ├── 34.gif │ │ │ │ │ │ │ ├── 35.gif │ │ │ │ │ │ │ ├── 36.gif │ │ │ │ │ │ │ ├── 37.gif │ │ │ │ │ │ │ ├── 38.gif │ │ │ │ │ │ │ ├── 39.gif │ │ │ │ │ │ │ ├── 40.gif │ │ │ │ │ │ │ ├── 41.gif │ │ │ │ │ │ │ ├── 42.gif │ │ │ │ │ │ │ ├── 43.gif │ │ │ │ │ │ │ ├── 44.gif │ │ │ │ │ │ │ ├── 45.gif │ │ │ │ │ │ │ ├── 46.gif │ │ │ │ │ │ │ ├── 47.gif │ │ │ │ │ │ │ ├── 48.gif │ │ │ │ │ │ │ ├── 49.gif │ │ │ │ │ │ │ ├── 50.gif │ │ │ │ │ │ │ ├── 51.gif │ │ │ │ │ │ │ ├── 52.gif │ │ │ │ │ │ │ ├── 53.gif │ │ │ │ │ │ │ ├── 54.gif │ │ │ │ │ │ │ ├── 55.gif │ │ │ │ │ │ │ ├── 56.gif │ │ │ │ │ │ │ ├── 57.gif │ │ │ │ │ │ │ ├── 58.gif │ │ │ │ │ │ │ ├── 59.gif │ │ │ │ │ │ │ ├── 60.gif │ │ │ │ │ │ │ ├── 61.gif │ │ │ │ │ │ │ ├── 62.gif │ │ │ │ │ │ │ ├── 63.gif │ │ │ │ │ │ │ ├── 64.gif │ │ │ │ │ │ │ ├── 65.gif │ │ │ │ │ │ │ ├── 66.gif │ │ │ │ │ │ │ ├── 67.gif │ │ │ │ │ │ │ ├── 68.gif │ │ │ │ │ │ │ ├── 69.gif │ │ │ │ │ │ │ ├── 70.gif │ │ │ │ │ │ │ └── 71.gif │ │ │ │ │ ├── css │ │ │ │ │ │ └── modules │ │ │ │ │ │ │ ├── laydate │ │ │ │ │ │ │ └── icon.png │ │ │ │ │ │ │ ├── layim │ │ │ │ │ │ │ ├── skin │ │ │ │ │ │ │ │ ├── 1.jpg │ │ │ │ │ │ │ │ ├── 2.jpg │ │ │ │ │ │ │ │ ├── 3.jpg │ │ │ │ │ │ │ │ ├── 4.jpg │ │ │ │ │ │ │ │ ├── 5.jpg │ │ │ │ │ │ │ │ └── logo.jpg │ │ │ │ │ │ │ ├── voice │ │ │ │ │ │ │ │ └── default.wav │ │ │ │ │ │ │ ├── html │ │ │ │ │ │ │ │ ├── find.html │ │ │ │ │ │ │ │ ├── getmsg.json │ │ │ │ │ │ │ │ └── chatlog.html │ │ │ │ │ │ │ └── mobile │ │ │ │ │ │ │ │ └── layim.css │ │ │ │ │ │ │ ├── layer │ │ │ │ │ │ │ └── default │ │ │ │ │ │ │ │ ├── icon.png │ │ │ │ │ │ │ │ ├── icon-ext.png │ │ │ │ │ │ │ │ ├── loading-0.gif │ │ │ │ │ │ │ │ ├── loading-1.gif │ │ │ │ │ │ │ │ └── loading-2.gif │ │ │ │ │ │ │ └── code.css │ │ │ │ │ └── lay │ │ │ │ │ │ └── modules │ │ │ │ │ │ ├── util.js │ │ │ │ │ │ ├── code.js │ │ │ │ │ │ ├── laytpl.js │ │ │ │ │ │ ├── flow.js │ │ │ │ │ │ ├── upload.js │ │ │ │ │ │ ├── tree.js │ │ │ │ │ │ ├── laypage.js │ │ │ │ │ │ ├── carousel.js │ │ │ │ │ │ ├── element.js │ │ │ │ │ │ └── form.js │ │ │ │ ├── css │ │ │ │ │ └── login.css │ │ │ │ ├── framework │ │ │ │ │ └── cframe.js │ │ │ │ └── js │ │ │ │ │ └── base.js │ │ │ ├── generatorConfig.xml │ │ │ ├── templates │ │ │ │ └── freemarker │ │ │ │ │ ├── login.ftl │ │ │ │ │ ├── chat.ftl │ │ │ │ │ ├── kefu.ftl │ │ │ │ │ ├── addManagerType.ftl │ │ │ │ │ ├── updataType.ftl │ │ │ │ │ ├── orderList.ftl │ │ │ │ │ ├── addFood.ftl │ │ │ │ │ ├── foodList.ftl │ │ │ │ │ ├── managerList.ftl │ │ │ │ │ ├── updateFood.ftl │ │ │ │ │ ├── addManager.ftl │ │ │ │ │ └── changePassword.ftl │ │ │ └── application.properties │ │ └── java │ │ │ ├── com │ │ │ └── hnit │ │ │ │ ├── utils │ │ │ │ ├── OutputObject.java │ │ │ │ ├── UserUtil.java │ │ │ │ ├── IpUtil.java │ │ │ │ ├── RedisUtil.java │ │ │ │ ├── SMSUtil.java │ │ │ │ └── IdentityUtil.java │ │ │ │ ├── biz │ │ │ │ ├── OrderBiz.java │ │ │ │ ├── Exception │ │ │ │ │ └── MyException.java │ │ │ │ ├── FoodBiz.java │ │ │ │ ├── Impl │ │ │ │ │ ├── OrderBizImpl.java │ │ │ │ │ └── FoodBizImpl.java │ │ │ │ ├── UserBiz.java │ │ │ │ └── aop │ │ │ │ │ ├── FoodAop.java │ │ │ │ │ └── UserAop.java │ │ │ │ ├── config │ │ │ │ ├── WebSocketConfig.java │ │ │ │ └── UploadFileConfig.java │ │ │ │ ├── XiaobaidiancanApplication.java │ │ │ │ ├── bean │ │ │ │ ├── OrderManagertype.java │ │ │ │ ├── OrderList.java │ │ │ │ ├── OrderFood.java │ │ │ │ └── OrderUser.java │ │ │ │ ├── kafka │ │ │ │ └── KafkaConsumer.java │ │ │ │ ├── dao │ │ │ │ ├── OrderFoodMapper.java │ │ │ │ ├── OrderManagertypeMapper.java │ │ │ │ ├── OrderUserMapper.java │ │ │ │ └── MongodbDao.java │ │ │ │ ├── web │ │ │ │ └── controller │ │ │ │ │ └── OrderController.java │ │ │ │ └── webSocket │ │ │ │ ├── UserWebSocket.java │ │ │ │ └── kefuWebSocket.java │ │ │ └── test │ │ │ └── test.java │ └── test │ │ └── java │ │ └── com │ │ └── huit │ │ └── XiaobaidiancanApplicationTests.java └── .gitignore └── README.md /小白点餐/miniprogram/pages/base.wxss: -------------------------------------------------------------------------------- 1 | /* pages/base.wxss */ -------------------------------------------------------------------------------- /小白点餐/miniprogram/pages/kefu/kefu.wxss: -------------------------------------------------------------------------------- 1 | /* pages/kefu/kefu.wxss */ -------------------------------------------------------------------------------- /小白点餐/miniprogram/pages/my/my.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /小白点餐/miniprogram/pages/base/base.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /小白点餐/miniprogram/pages/kefu/kefu.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /小白点餐/cloudfunctions/echo/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "permissions": { 3 | "openapi": [] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /小白点餐/cloudfunctions/login/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "permissions": { 3 | "openapi": [] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /小白点餐/miniprogram/components/chatroom/chatroom.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /小白点餐/miniprogram/pages/kefu/kefu.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /小白点餐/miniprogram/images/me_no.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/小白点餐/miniprogram/images/me_no.png -------------------------------------------------------------------------------- /小白点餐/miniprogram/images/me_yes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/小白点餐/miniprogram/images/me_yes.png -------------------------------------------------------------------------------- /小白点餐/miniprogram/images/home_no.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/小白点餐/miniprogram/images/home_no.png -------------------------------------------------------------------------------- /小白点餐/miniprogram/images/home_yes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/小白点餐/miniprogram/images/home_yes.png -------------------------------------------------------------------------------- /XBDCInterface/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/XBDCInterface/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /xiaobaidiancan/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /小白点餐/miniprogram/components/chatroom/dots.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/小白点餐/miniprogram/components/chatroom/dots.gif -------------------------------------------------------------------------------- /小白点餐/miniprogram/components/chatroom/photo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/小白点餐/miniprogram/components/chatroom/photo.png -------------------------------------------------------------------------------- /小白点餐/cloudfunctions/callback/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "permissions": { 3 | "openapi": [ 4 | "customerServiceMessage.send" 5 | ] 6 | } 7 | } -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/images/kefu.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/images/kefu.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/images/logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/images/logo.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/images/user.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/images/user.jpg -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/fonts/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/fonts/iconfont.eot -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/fonts/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/fonts/iconfont.ttf -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/fonts/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/fonts/iconfont.woff -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/fonts/iconfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/fonts/iconfont.woff2 -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/font/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/font/iconfont.eot -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/font/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/font/iconfont.ttf -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/0.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/1.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/2.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/3.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/4.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/5.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/6.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/7.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/8.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/9.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/font/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/font/iconfont.woff -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/10.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/11.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/12.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/13.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/13.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/14.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/15.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/15.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/16.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/17.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/17.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/18.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/18.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/19.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/19.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/20.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/20.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/21.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/21.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/22.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/22.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/23.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/23.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/24.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/24.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/25.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/25.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/26.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/26.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/27.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/27.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/28.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/28.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/29.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/29.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/30.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/30.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/31.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/31.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/32.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/32.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/33.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/33.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/34.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/34.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/35.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/35.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/36.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/36.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/37.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/37.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/38.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/38.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/39.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/39.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/40.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/40.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/41.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/41.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/42.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/42.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/43.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/43.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/44.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/44.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/45.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/45.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/46.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/46.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/47.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/47.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/48.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/48.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/49.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/49.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/50.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/50.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/51.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/51.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/52.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/52.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/53.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/53.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/54.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/54.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/55.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/55.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/56.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/56.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/57.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/57.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/58.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/58.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/59.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/59.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/60.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/60.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/61.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/61.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/62.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/62.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/63.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/63.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/64.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/64.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/65.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/65.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/66.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/66.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/67.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/67.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/68.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/68.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/69.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/69.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/70.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/70.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/images/face/71.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/images/face/71.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/css/modules/laydate/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/css/modules/laydate/icon.png -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/css/modules/layim/skin/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/css/modules/layim/skin/1.jpg -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/css/modules/layim/skin/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/css/modules/layim/skin/2.jpg -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/css/modules/layim/skin/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/css/modules/layim/skin/3.jpg -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/css/modules/layim/skin/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/css/modules/layim/skin/4.jpg -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/css/modules/layim/skin/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/css/modules/layim/skin/5.jpg -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/css/modules/layim/skin/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/css/modules/layim/skin/logo.jpg -------------------------------------------------------------------------------- /小白点餐/miniprogram/sitemap.json: -------------------------------------------------------------------------------- 1 | { 2 | "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html", 3 | "rules": [{ 4 | "action": "allow", 5 | "page": "*" 6 | }] 7 | } -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/css/modules/layer/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/css/modules/layer/default/icon.png -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/css/modules/layim/voice/default.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/css/modules/layim/voice/default.wav -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/css/modules/layer/default/icon-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/css/modules/layer/default/icon-ext.png -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/css/modules/layer/default/loading-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/css/modules/layer/default/loading-0.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/css/modules/layer/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/css/modules/layer/default/loading-1.gif -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/css/modules/layer/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2336583532/diancan/HEAD/xiaobaidiancan/src/main/resources/static/layui/css/modules/layer/default/loading-2.gif -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # diancan 2 | 一款基于springboot和微信小程序的点餐系统 3 | 客户端用微信小程序实现 4 | 服务端由springboot整合,使用了mybatis、kafka、websocket、vue.js、layui、Lombok、freemarker等技术 5 | JDK版本:1.8 6 | 数据库:mysql 7 | 由于是个人开发,微信小程序有些功能无法使用,比如付款,暂时实现基本功能,后续会对项目进行扩展 8 | -------------------------------------------------------------------------------- /小白点餐/cloudfunctions/echo/index.js: -------------------------------------------------------------------------------- 1 | const cloud = require('wx-server-sdk') 2 | 3 | exports.main = async (event, context) => { 4 | // event.userInfo 是已废弃的保留字段,在此不做展示 5 | // 获取 OPENID 等微信上下文请使用 cloud.getWXContext() 6 | delete event.userInfo 7 | return event 8 | } 9 | -------------------------------------------------------------------------------- /XBDCInterface/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar 3 | -------------------------------------------------------------------------------- /xiaobaidiancan/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar 3 | -------------------------------------------------------------------------------- /XBDCInterface/src/main/java/com/hnit/biz/OrderListBiz.java: -------------------------------------------------------------------------------- 1 | package com.hnit.biz; 2 | 3 | import com.hnit.bean.OrderList; 4 | 5 | import java.util.List; 6 | 7 | public interface OrderListBiz { 8 | public List getOrderByUsername(String userName); 9 | } 10 | -------------------------------------------------------------------------------- /XBDCInterface/src/main/java/com/hnit/Utils/OutputObject.java: -------------------------------------------------------------------------------- 1 | package com.hnit.Utils; 2 | 3 | import lombok.Data; 4 | /** 5 | * 6 | * @author 23365 7 | *返回数据的包装类 8 | */ 9 | @Data 10 | public class OutputObject { 11 | private int code; 12 | private String message; 13 | private Object data; 14 | } 15 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/java/com/hnit/utils/OutputObject.java: -------------------------------------------------------------------------------- 1 | package com.hnit.utils; 2 | 3 | import lombok.Data; 4 | /** 5 | * 6 | * @author 23365 7 | *返回数据的包装类 8 | */ 9 | @Data 10 | public class OutputObject { 11 | private int code; 12 | private String message; 13 | private Object data; 14 | } 15 | -------------------------------------------------------------------------------- /小白点餐/miniprogram/app.js: -------------------------------------------------------------------------------- 1 | //app.js 2 | App({ 3 | onLaunch: function () { 4 | 5 | if (!wx.cloud) { 6 | console.error('请使用 2.2.3 或以上的基础库以使用云能力') 7 | } else { 8 | wx.cloud.init({ 9 | traceUser: true, 10 | }) 11 | } 12 | 13 | this.globalData = {} 14 | } 15 | }) 16 | -------------------------------------------------------------------------------- /XBDCInterface/src/main/java/com/hnit/biz/FoodBiz.java: -------------------------------------------------------------------------------- 1 | package com.hnit.biz; 2 | 3 | import com.hnit.bean.OrderFood; 4 | import com.hnit.bean.OrderList; 5 | 6 | import java.util.List;; 7 | 8 | public interface FoodBiz { 9 | public List getAllFoodMessage(); 10 | 11 | public String addOrder(OrderList orderList); 12 | } 13 | -------------------------------------------------------------------------------- /小白点餐/README.md: -------------------------------------------------------------------------------- 1 | # 云开发 quickstart 2 | 3 | 这是云开发的快速启动指引,其中演示了如何上手使用云开发的三大基础能力: 4 | 5 | - 数据库:一个既可在小程序前端操作,也能在云函数中读写的 JSON 文档型数据库 6 | - 文件存储:在小程序前端直接上传/下载云端文件,在云开发控制台可视化管理 7 | - 云函数:在云端运行的代码,微信私有协议天然鉴权,开发者只需编写业务逻辑代码 8 | 9 | ## 参考文档 10 | 11 | - [云开发文档](https://developers.weixin.qq.com/miniprogram/dev/wxcloud/basis/getting-started.html) 12 | 13 | -------------------------------------------------------------------------------- /小白点餐/cloudfunctions/echo/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "echo", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "wx-server-sdk": "~1.8.3" 13 | } 14 | } -------------------------------------------------------------------------------- /小白点餐/miniprogram/pages/my/my.wxss: -------------------------------------------------------------------------------- 1 | /* pages/my/my.wxss */ 2 | .line{ 3 | width:100%; 4 | height:2rpx; 5 | background:#aaa; 6 | } 7 | .orderBody{ 8 | margin-top: 20rpx; 9 | } 10 | #kefu{ 11 | margin-left: 550rpx; 12 | margin-top: -48rpx; 13 | font-size: larger; 14 | } 15 | 16 | #my{ 17 | font-size: larger; 18 | } -------------------------------------------------------------------------------- /小白点餐/cloudfunctions/callback/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "callback", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "wx-server-sdk": "~1.8.3" 13 | } 14 | } -------------------------------------------------------------------------------- /小白点餐/cloudfunctions/login/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "login", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "wx-server-sdk": "~1.8.3" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /小白点餐/cloudfunctions/openapi/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "openapi", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "wx-server-sdk": "~1.8.3" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/java/com/hnit/biz/OrderBiz.java: -------------------------------------------------------------------------------- 1 | package com.hnit.biz; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | import com.github.pagehelper.PageInfo; 7 | import com.hnit.bean.OrderList; 8 | 9 | public interface OrderBiz { 10 | public Map queryOrderList(int pageNumber,int pageSize); 11 | 12 | public long orders(String id); 13 | } 14 | -------------------------------------------------------------------------------- /XBDCInterface/src/test/java/com/hnit/XBDCInterface/XbdcInterfaceApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.hnit.XBDCInterface; 2 | 3 | import com.hnit.dao.OrderFoodMapper; 4 | import org.junit.jupiter.api.Test; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | 7 | @SpringBootTest 8 | class XbdcInterfaceApplicationTests { 9 | 10 | @Test 11 | void contextLoads() { 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/java/com/hnit/biz/Exception/MyException.java: -------------------------------------------------------------------------------- 1 | package com.hnit.biz.Exception; 2 | /** 3 | * 自定义的异常类 4 | * @author 23365 5 | * 6 | */ 7 | public class MyException extends Exception{ 8 | 9 | /** 10 | * 11 | */ 12 | private static final long serialVersionUID = 1L; 13 | public MyException(){ 14 | super(); 15 | } 16 | public MyException(String msg){ 17 | super(msg); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/java/com/hnit/biz/FoodBiz.java: -------------------------------------------------------------------------------- 1 | package com.hnit.biz; 2 | 3 | 4 | import com.github.pagehelper.PageInfo; 5 | import com.hnit.bean.OrderFood; 6 | 7 | public interface FoodBiz { 8 | public int addFood(OrderFood food); 9 | public PageInfo queryFoodList(int pageNumber,int pageSize); 10 | public OrderFood queryFoodByFid(int fid); 11 | public int updateFood(OrderFood food); 12 | public int deleteFoodByFid(int fid); 13 | } 14 | -------------------------------------------------------------------------------- /XBDCInterface/src/main/java/com/hnit/XBDC.java: -------------------------------------------------------------------------------- 1 | package com.hnit; 2 | 3 | import org.mybatis.spring.annotation.MapperScan; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | 7 | @SpringBootApplication 8 | //mybaits包扫描 9 | @MapperScan("com.hnit.dao") 10 | public class XBDC { 11 | public static void main(String[] args) { 12 | SpringApplication.run(XBDC.class,args); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /小白点餐/cloudfunctions/openapi/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "permissions": { 3 | "openapi": [ 4 | "wxacode.get", 5 | "subscribeMessage.send", 6 | "subscribeMessage.addTemplate", 7 | "templateMessage.send", 8 | "templateMessage.addTemplate", 9 | "templateMessage.deleteTemplate", 10 | "templateMessage.getTemplateList", 11 | "templateMessage.getTemplateLibraryById", 12 | "templateMessage.getTemplateLibraryList" 13 | ] 14 | } 15 | } -------------------------------------------------------------------------------- /XBDCInterface/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/java/test/test.java: -------------------------------------------------------------------------------- 1 | package test; 2 | 3 | import java.io.IOException; 4 | import java.io.UnsupportedEncodingException; 5 | 6 | import org.apache.http.client.ClientProtocolException; 7 | 8 | import com.hnit.utils.IpUtil; 9 | import com.hnit.utils.RedisUtil; 10 | 11 | import redis.clients.jedis.Jedis; 12 | 13 | public class test { 14 | 15 | public static void main(String[] args) { 16 | 17 | RedisUtil redis = new RedisUtil(); 18 | 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /xiaobaidiancan/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/java/com/hnit/config/WebSocketConfig.java: -------------------------------------------------------------------------------- 1 | package com.hnit.config; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.web.socket.server.standard.ServerEndpointExporter; 6 | 7 | @Configuration 8 | public class WebSocketConfig { 9 | @Bean 10 | public ServerEndpointExporter serverEndpointExporter() { 11 | return new ServerEndpointExporter(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/test/java/com/huit/XiaobaidiancanApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.huit; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | import org.springframework.data.redis.core.RedisTemplate; 6 | 7 | @SpringBootTest 8 | class XiaobaidiancanApplicationTests { 9 | 10 | @Test 11 | void contextLoads() { 12 | RedisTemplate redis = new RedisTemplate(); 13 | System.out.println(redis); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/java/com/hnit/XiaobaidiancanApplication.java: -------------------------------------------------------------------------------- 1 | package com.hnit; 2 | 3 | import org.mybatis.spring.annotation.MapperScan; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | 7 | @SpringBootApplication 8 | //mybaits包扫描 9 | @MapperScan("com.hnit.dao") 10 | public class XiaobaidiancanApplication { 11 | 12 | public static void main(String[] args) { 13 | SpringApplication.run(XiaobaidiancanApplication.class, args); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /小白点餐/miniprogram/pages/my/my.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 我的订单 在线客服 5 | 6 | 7 | 8 | 9 | 10 | 订单:{{item.orderList}} 11 | 创建时间:{{filter.dateFormat(item.date)}} 12 | 手机号:{{item.phone}} 13 | 14 | 15 | -------------------------------------------------------------------------------- /小白点餐/cloudfunctions/callback/index.js: -------------------------------------------------------------------------------- 1 | const cloud = require('wx-server-sdk') 2 | 3 | cloud.init({ 4 | // API 调用都保持和云函数当前所在环境一致 5 | env: cloud.DYNAMIC_CURRENT_ENV 6 | }) 7 | 8 | // 云函数入口函数 9 | exports.main = async (event, context) => { 10 | 11 | console.log(event) 12 | 13 | const { OPENID } = cloud.getWXContext() 14 | 15 | const result = await cloud.openapi.customerServiceMessage.send({ 16 | touser: OPENID, 17 | msgtype: 'text', 18 | text: { 19 | content: '收到:' + event.Content, 20 | } 21 | }) 22 | 23 | console.log(result) 24 | 25 | return result 26 | } 27 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/java/com/hnit/bean/OrderManagertype.java: -------------------------------------------------------------------------------- 1 | package com.hnit.bean; 2 | 3 | import java.io.Serializable; 4 | 5 | public class OrderManagertype implements Serializable { 6 | private Integer typeid; 7 | 8 | private String typename; 9 | 10 | private static final long serialVersionUID = 1L; 11 | 12 | public Integer getTypeid() { 13 | return typeid; 14 | } 15 | 16 | public void setTypeid(Integer typeid) { 17 | this.typeid = typeid; 18 | } 19 | 20 | public String getTypename() { 21 | return typename; 22 | } 23 | 24 | public void setTypename(String typename) { 25 | this.typename = typename; 26 | } 27 | } -------------------------------------------------------------------------------- /XBDCInterface/src/main/java/com/hnit/biz/Impl/OrderListBizImpl.java: -------------------------------------------------------------------------------- 1 | package com.hnit.biz.Impl; 2 | 3 | import com.hnit.bean.OrderList; 4 | import com.hnit.biz.OrderListBiz; 5 | import com.hnit.dao.MongoDBDao; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | 9 | import java.util.List; 10 | @Service 11 | public class OrderListBizImpl implements OrderListBiz { 12 | @Autowired 13 | private MongoDBDao mongoDBDao; 14 | 15 | @Override 16 | public List getOrderByUsername(String userName) { 17 | List orderByUsername = mongoDBDao.getOrderByUsername(userName); 18 | return orderByUsername; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /XBDCInterface/src/main/java/com/hnit/kafka/KafkaProducer.java: -------------------------------------------------------------------------------- 1 | package com.hnit.kafka; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.kafka.core.KafkaTemplate; 5 | import org.springframework.kafka.support.SendResult; 6 | import org.springframework.stereotype.Component; 7 | import org.springframework.util.concurrent.ListenableFuture; 8 | @Component 9 | public class KafkaProducer { 10 | @Autowired 11 | KafkaTemplate producer; 12 | public ListenableFuture> send(String topic, Object message){ 13 | ListenableFuture> send = producer.send(topic, message); 14 | return send; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/java/com/hnit/kafka/KafkaConsumer.java: -------------------------------------------------------------------------------- 1 | package com.hnit.kafka; 2 | 3 | import org.apache.kafka.clients.consumer.ConsumerRecord; 4 | import org.springframework.kafka.annotation.KafkaListener; 5 | import org.springframework.stereotype.Component; 6 | 7 | import com.hnit.utils.UserUtil; 8 | import com.hnit.webSocket.UserWebSocket; 9 | @Component 10 | public class KafkaConsumer { 11 | @KafkaListener(topics = "${kafka.topics}") 12 | public void getData(ConsumerRecord record) { 13 | Object value=record.value(); 14 | if(value != null) { 15 | String phone = UserUtil.getRandomToOrders(); 16 | if(phone != null) { 17 | UserWebSocket.sendMessage(phone, "1"); 18 | } 19 | 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /小白点餐/miniprogram/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "pages": [ 3 | "pages/base/base", 4 | "pages/my/my", 5 | "pages/kefu/kefu" 6 | ], 7 | "window": { 8 | "backgroundColor": "#F6F6F6", 9 | "backgroundTextStyle": "light", 10 | "navigationBarBackgroundColor": "#F6F6F6", 11 | "navigationBarTitleText": "点餐小程序", 12 | "navigationBarTextStyle": "black" 13 | }, 14 | "tabBar": { 15 | "list": [{ 16 | "pagePath": "pages/base/base", 17 | "text": "首页", 18 | "iconPath": "images/home_no.png", 19 | "selectedIconPath": "images/home_yes.png" 20 | }, 21 | { 22 | "pagePath": "pages/my/my", 23 | "text": "我的", 24 | "iconPath": "images/me_no.png", 25 | "selectedIconPath": "images/me_yes.png" 26 | }] 27 | }, 28 | "sitemapLocation": "sitemap.json", 29 | "style": "v2" 30 | } -------------------------------------------------------------------------------- /小白点餐/cloudfunctions/login/index.js: -------------------------------------------------------------------------------- 1 | // 云函数模板 2 | // 部署:在 cloud-functions/login 文件夹右击选择 “上传并部署” 3 | 4 | const cloud = require('wx-server-sdk') 5 | 6 | // 初始化 cloud 7 | cloud.init({ 8 | // API 调用都保持和云函数当前所在环境一致 9 | env: cloud.DYNAMIC_CURRENT_ENV 10 | }) 11 | 12 | /** 13 | * 这个示例将经自动鉴权过的小程序用户 openid 返回给小程序端 14 | * 15 | * event 参数包含小程序端调用传入的 data 16 | * 17 | */ 18 | exports.main = (event, context) => { 19 | console.log(event) 20 | console.log(context) 21 | 22 | // 可执行其他自定义逻辑 23 | // console.log 的内容可以在云开发云函数调用日志查看 24 | 25 | // 获取 WX Context (微信调用上下文),包括 OPENID、APPID、及 UNIONID(需满足 UNIONID 获取条件)等信息 26 | const wxContext = cloud.getWXContext() 27 | 28 | return { 29 | event, 30 | openid: wxContext.OPENID, 31 | appid: wxContext.APPID, 32 | unionid: wxContext.UNIONID, 33 | env: wxContext.ENV, 34 | } 35 | } 36 | 37 | -------------------------------------------------------------------------------- /XBDCInterface/src/main/java/com/hnit/bean/OrderList.java: -------------------------------------------------------------------------------- 1 | package com.hnit.bean; 2 | 3 | import lombok.Data; 4 | import org.springframework.data.annotation.Id; 5 | import org.springframework.data.mongodb.core.mapping.Document; 6 | 7 | import java.io.Serializable; 8 | 9 | @Data 10 | @Document("orderList") 11 | public class OrderList implements Serializable { 12 | @Id 13 | private String id; 14 | private String username; 15 | private String phone; 16 | private String orderList; 17 | private String date; 18 | private Integer type; 19 | 20 | @Override 21 | public String toString() { 22 | return "OrderList{" + 23 | "id='" + id + '\'' + 24 | ", username='" + username + '\'' + 25 | ", orderList='" + orderList + '\'' + 26 | ", date=" + date + 27 | ", type=" + type + 28 | '}'; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/java/com/hnit/bean/OrderList.java: -------------------------------------------------------------------------------- 1 | package com.hnit.bean; 2 | 3 | import lombok.Data; 4 | import org.springframework.data.annotation.Id; 5 | import org.springframework.data.mongodb.core.mapping.Document; 6 | 7 | import java.io.Serializable; 8 | 9 | @Data 10 | @Document("orderList") 11 | public class OrderList implements Serializable { 12 | @Id 13 | private String id; 14 | private String username; 15 | private String phone; 16 | private String orderList; 17 | private String date; 18 | private Integer type; 19 | 20 | @Override 21 | public String toString() { 22 | return "OrderList{" + 23 | "id='" + id + '\'' + 24 | ", username='" + username + '\'' + 25 | ", orderList='" + orderList + '\'' + 26 | ", date=" + date + 27 | ", type=" + type + 28 | '}'; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/java/com/hnit/utils/UserUtil.java: -------------------------------------------------------------------------------- 1 | package com.hnit.utils; 2 | 3 | import java.io.IOException; 4 | 5 | import org.apache.http.client.ClientProtocolException; 6 | import org.springframework.boot.autoconfigure.cache.CacheProperties.Redis; 7 | 8 | public class UserUtil { 9 | public String getUserPhone() throws ClientProtocolException, IOException { 10 | IpUtil ipUtil = new IpUtil(); 11 | RedisUtil redisUtil = new RedisUtil(); 12 | String ip = ipUtil.getIp(); 13 | String phone = redisUtil.getValue(ip); 14 | return phone; 15 | 16 | } 17 | 18 | public static String getRandomToOrders() { 19 | RedisUtil redis = new RedisUtil(); 20 | String phone=redis.getRandomFromList("manager_3"); 21 | if(phone == null) { 22 | phone=redis.getRandomFromList("manager_2"); 23 | if(phone == null) { 24 | phone=redis.getRandomFromList("manager_1"); 25 | } 26 | } 27 | return phone; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/java/com/hnit/config/UploadFileConfig.java: -------------------------------------------------------------------------------- 1 | package com.hnit.config; 2 | 3 | import javax.servlet.MultipartConfigElement; 4 | 5 | import org.springframework.beans.factory.annotation.Value; 6 | import org.springframework.boot.web.servlet.MultipartConfigFactory; 7 | import org.springframework.context.annotation.Bean; 8 | import org.springframework.context.annotation.Configuration; 9 | import org.springframework.util.unit.DataSize; 10 | 11 | @Configuration 12 | public class UploadFileConfig { 13 | @Value("${file.uploadFolder}") 14 | private String uploadFolder; 15 | 16 | @Bean 17 | MultipartConfigElement multipartConfigElement() { 18 | MultipartConfigFactory factory = new MultipartConfigFactory(); 19 | //单个文件大小200mb 20 | factory.setMaxFileSize(DataSize.ofMegabytes(4L)); 21 | //设置总上传数据大小10GB 22 | factory.setMaxRequestSize(DataSize.ofGigabytes(10L)); 23 | 24 | return factory.createMultipartConfig(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /XBDCInterface/src/main/java/com/hnit/controller/OrderController.java: -------------------------------------------------------------------------------- 1 | package com.hnit.controller; 2 | 3 | import com.hnit.Utils.OutputObject; 4 | import com.hnit.bean.OrderList; 5 | import com.hnit.biz.OrderListBiz; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Controller; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.ResponseBody; 10 | 11 | import java.util.List; 12 | 13 | @Controller 14 | public class OrderController { 15 | @Autowired 16 | private OrderListBiz orderListBiz; 17 | 18 | @RequestMapping("/getOrderByUsername") 19 | @ResponseBody 20 | public OutputObject getOrderByUsername(String userName){ 21 | OutputObject out = new OutputObject(); 22 | List orderByUsername = orderListBiz.getOrderByUsername(userName); 23 | out.setData(orderByUsername); 24 | return out; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/java/com/hnit/biz/Impl/OrderBizImpl.java: -------------------------------------------------------------------------------- 1 | package com.hnit.biz.Impl; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.boot.autoconfigure.security.SecurityProperties.User; 8 | import org.springframework.stereotype.Service; 9 | 10 | import com.hnit.bean.OrderList; 11 | import com.hnit.biz.OrderBiz; 12 | import com.hnit.dao.MongodbDao; 13 | import com.hnit.utils.UserUtil; 14 | import com.hnit.webSocket.UserWebSocket; 15 | 16 | @Service 17 | public class OrderBizImpl implements OrderBiz{ 18 | @Autowired 19 | MongodbDao mongodb; 20 | 21 | @Override 22 | public Map queryOrderList(int pageNumber, int pageSize) { 23 | Map orderList=mongodb.getData("orderList",pageNumber,pageSize); 24 | return orderList; 25 | } 26 | 27 | @Override 28 | public long orders(String id) { 29 | long result=mongodb.orders(id); 30 | return result; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/java/com/hnit/dao/OrderFoodMapper.java: -------------------------------------------------------------------------------- 1 | package com.hnit.dao; 2 | 3 | import com.hnit.bean.OrderFood; 4 | import com.hnit.bean.OrderFoodExample; 5 | import java.util.List; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | public interface OrderFoodMapper { 9 | int countByExample(OrderFoodExample example); 10 | 11 | int deleteByExample(OrderFoodExample example); 12 | 13 | int deleteByPrimaryKey(Integer fid); 14 | 15 | int insert(OrderFood record); 16 | 17 | int insertSelective(OrderFood record); 18 | 19 | List selectByExample(OrderFoodExample example); 20 | 21 | OrderFood selectByPrimaryKey(Integer fid); 22 | 23 | int updateByExampleSelective(@Param("record") OrderFood record, @Param("example") OrderFoodExample example); 24 | 25 | int updateByExample(@Param("record") OrderFood record, @Param("example") OrderFoodExample example); 26 | 27 | int updateByPrimaryKeySelective(OrderFood record); 28 | 29 | int updateByPrimaryKey(OrderFood record); 30 | } -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/css/modules/layim/html/find.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 发现 9 | 10 | 11 | 14 | 15 | 16 | 17 |
18 |
此为自定义的【查找】页面,因需求不一,所以官方暂不提供该模版结构与样式,实际使用时,可移至该文件到你的项目中,对页面自行把控。 19 |
文件所在目录(相对于layui.js):/css/modules/layim/html/find.html
20 |
21 | 22 | 23 | 24 | 25 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /XBDCInterface/src/main/java/com/hnit/bean/OrderFood.java: -------------------------------------------------------------------------------- 1 | package com.hnit.bean; 2 | 3 | import java.io.Serializable; 4 | 5 | public class OrderFood implements Serializable { 6 | private Integer fid; 7 | 8 | private String fname; 9 | 10 | private Double fprice; 11 | 12 | private String fphoto; 13 | 14 | private static final long serialVersionUID = 1L; 15 | 16 | public Integer getFid() { 17 | return fid; 18 | } 19 | 20 | public void setFid(Integer fid) { 21 | this.fid = fid; 22 | } 23 | 24 | public String getFname() { 25 | return fname; 26 | } 27 | 28 | public void setFname(String fname) { 29 | this.fname = fname; 30 | } 31 | 32 | public Double getFprice() { 33 | return fprice; 34 | } 35 | 36 | public void setFprice(Double fprice) { 37 | this.fprice = fprice; 38 | } 39 | 40 | public String getFphoto() { 41 | return fphoto; 42 | } 43 | 44 | public void setFphoto(String fphoto) { 45 | this.fphoto = fphoto; 46 | } 47 | } -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/java/com/hnit/bean/OrderFood.java: -------------------------------------------------------------------------------- 1 | package com.hnit.bean; 2 | 3 | import java.io.Serializable; 4 | 5 | public class OrderFood implements Serializable { 6 | private Integer fid; 7 | 8 | private String fname; 9 | 10 | private Double fprice; 11 | 12 | private String fphoto; 13 | 14 | private static final long serialVersionUID = 1L; 15 | 16 | public Integer getFid() { 17 | return fid; 18 | } 19 | 20 | public void setFid(Integer fid) { 21 | this.fid = fid; 22 | } 23 | 24 | public String getFname() { 25 | return fname; 26 | } 27 | 28 | public void setFname(String fname) { 29 | this.fname = fname; 30 | } 31 | 32 | public Double getFprice() { 33 | return fprice; 34 | } 35 | 36 | public void setFprice(Double fprice) { 37 | this.fprice = fprice; 38 | } 39 | 40 | public String getFphoto() { 41 | return fphoto; 42 | } 43 | 44 | public void setFphoto(String fphoto) { 45 | this.fphoto = fphoto; 46 | } 47 | } -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/css/modules/code.css: -------------------------------------------------------------------------------- 1 | /** layui-v1.0.7 MIT License By http://www.layui.com */ 2 | html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #ddd;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:30px;line-height:30px;border-bottom:1px solid #ddd}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #ddd;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none} -------------------------------------------------------------------------------- /XBDCInterface/src/main/java/com/hnit/dao/OrderFoodMapper.java: -------------------------------------------------------------------------------- 1 | package com.hnit.dao; 2 | 3 | import com.hnit.bean.OrderFood; 4 | import com.hnit.bean.OrderFoodExample; 5 | import java.util.List; 6 | 7 | import org.apache.ibatis.annotations.Mapper; 8 | import org.apache.ibatis.annotations.Param; 9 | 10 | @Mapper 11 | public interface OrderFoodMapper { 12 | int countByExample(OrderFoodExample example); 13 | 14 | int deleteByExample(OrderFoodExample example); 15 | 16 | int deleteByPrimaryKey(Integer fid); 17 | 18 | int insert(OrderFood record); 19 | 20 | int insertSelective(OrderFood record); 21 | 22 | List selectByExample(OrderFoodExample example); 23 | 24 | OrderFood selectByPrimaryKey(Integer fid); 25 | 26 | int updateByExampleSelective(@Param("record") OrderFood record, @Param("example") OrderFoodExample example); 27 | 28 | int updateByExample(@Param("record") OrderFood record, @Param("example") OrderFoodExample example); 29 | 30 | int updateByPrimaryKeySelective(OrderFood record); 31 | 32 | int updateByPrimaryKey(OrderFood record); 33 | } -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/lay/modules/util.js: -------------------------------------------------------------------------------- 1 | /** layui-v1.0.7 MIT License By http://www.layui.com */ 2 | ;layui.define("jquery",function(l){"use strict";var o=layui.jquery,i={fixbar:function(l){l=l||{},l.bgcolor=l.bgcolor?"background-color:"+l.bgcolor:"";var i,a,c="layui-fixbar-top",t=[l.bar1===!0?"":l.bar1,l.bar2===!0?"":l.bar2,""],r=o(['
    ',l.bar1?'
  • '+t[0]+"
  • ":"",l.bar2?'
  • '+t[1]+"
  • ":"",'
  • '+t[2]+"
  • ","
"].join("")),e=r.find("."+c),s=function(){var i=o(document).scrollTop();i>=(l.showHeight||200)?a||(e.show(),a=1):a&&(e.hide(),a=0)};o(".layui-fixbar")[0]||("object"==typeof l.css&&r.css(l.css),o("body").append(r),s(),r.find("li").on("click",function(){var i=o(this),a=i.attr("lay-type");"top"===a&&o("html,body").animate({scrollTop:0},200),l.click&&l.click.call(this,a)}),o(document).on("scroll",function(){i&&clearTimeout(i),i=setTimeout(function(){s()},100)}))}};l("util",i)}); -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/java/com/hnit/dao/OrderManagertypeMapper.java: -------------------------------------------------------------------------------- 1 | package com.hnit.dao; 2 | 3 | import com.hnit.bean.OrderManagertype; 4 | import com.hnit.bean.OrderManagertypeExample; 5 | import java.util.List; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | public interface OrderManagertypeMapper { 9 | int countByExample(OrderManagertypeExample example); 10 | 11 | int deleteByExample(OrderManagertypeExample example); 12 | 13 | int deleteByPrimaryKey(Integer typeid); 14 | 15 | int insert(OrderManagertype record); 16 | 17 | int insertSelective(OrderManagertype record); 18 | 19 | List selectByExample(OrderManagertypeExample example); 20 | 21 | OrderManagertype selectByPrimaryKey(Integer typeid); 22 | 23 | int updateByExampleSelective(@Param("record") OrderManagertype record, @Param("example") OrderManagertypeExample example); 24 | 25 | int updateByExample(@Param("record") OrderManagertype record, @Param("example") OrderManagertypeExample example); 26 | 27 | int updateByPrimaryKeySelective(OrderManagertype record); 28 | 29 | int updateByPrimaryKey(OrderManagertype record); 30 | } -------------------------------------------------------------------------------- /XBDCInterface/src/main/java/com/hnit/dao/MongoDBDao.java: -------------------------------------------------------------------------------- 1 | package com.hnit.dao; 2 | 3 | import com.hnit.bean.OrderList; 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import org.springframework.data.mongodb.core.MongoTemplate; 6 | import org.springframework.data.mongodb.core.query.Criteria; 7 | import org.springframework.data.mongodb.core.query.Query; 8 | import org.springframework.stereotype.Repository; 9 | 10 | import java.util.List; 11 | 12 | @Repository 13 | public class MongoDBDao { 14 | @Autowired 15 | private MongoTemplate mongoTemplate; 16 | 17 | public String saveObj(OrderList orderList) { 18 | 19 | OrderList save = mongoTemplate.insert(orderList); 20 | if(save != null && save.getId() != null){ 21 | return save.getId(); 22 | }else{ 23 | return null; 24 | } 25 | } 26 | 27 | public List getOrderByUsername(String userName){ 28 | Query query = new Query(Criteria.where("username").is(userName)); 29 | List orderLists = mongoTemplate.find(query,OrderList.class,"orderList"); 30 | return orderLists; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /XBDCInterface/src/main/java/com/hnit/config/MongodbConfig.java: -------------------------------------------------------------------------------- 1 | package com.hnit.config; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.context.ApplicationListener; 5 | import org.springframework.context.event.ContextRefreshedEvent; 6 | import org.springframework.data.mongodb.core.MongoTemplate; 7 | import org.springframework.data.mongodb.core.convert.DefaultMongoTypeMapper; 8 | import org.springframework.data.mongodb.core.convert.MappingMongoConverter; 9 | import org.springframework.data.mongodb.core.convert.MongoConverter; 10 | 11 | public class MongodbConfig implements ApplicationListener { 12 | @Autowired 13 | MongoTemplate oneMongoTemplate; 14 | 15 | private static final String TYPEKEY = "_class"; 16 | 17 | @Override 18 | public void onApplicationEvent(ContextRefreshedEvent contextRefreshedEvent) { 19 | MongoConverter converter = oneMongoTemplate.getConverter(); 20 | if (converter.getTypeMapper().isTypeKey(TYPEKEY)) { 21 | ((MappingMongoConverter) converter).setTypeMapper(new DefaultMongoTypeMapper(null)); 22 | } 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/lay/modules/code.js: -------------------------------------------------------------------------------- 1 | /** layui-v1.0.7 MIT License By http://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var a=layui.jquery,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"); -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/java/com/hnit/dao/OrderUserMapper.java: -------------------------------------------------------------------------------- 1 | package com.hnit.dao; 2 | 3 | import com.hnit.bean.OrderUser; 4 | import com.hnit.bean.OrderUserExample; 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | import org.apache.ibatis.annotations.Param; 9 | 10 | public interface OrderUserMapper { 11 | int countByExample(OrderUserExample example); 12 | 13 | int deleteByExample(OrderUserExample example); 14 | 15 | int deleteByPrimaryKey(Integer uid); 16 | 17 | int insert(OrderUser record); 18 | 19 | int insertSelective(OrderUser record); 20 | 21 | List selectByExample(OrderUserExample example); 22 | 23 | OrderUser selectByPrimaryKey(Integer uid); 24 | 25 | int updateByExampleSelective(@Param("record") OrderUser record, @Param("example") OrderUserExample example); 26 | 27 | int updateByExample(@Param("record") OrderUser record, @Param("example") OrderUserExample example); 28 | 29 | int updateByPrimaryKeySelective(OrderUser record); 30 | 31 | int updateByPrimaryKey(OrderUser record); 32 | 33 | //自定义的sql语句 34 | List> selectManager(); 35 | int updatePassword(@Param("phone")String phone,@Param("password")String password); 36 | } -------------------------------------------------------------------------------- /XBDCInterface/src/main/java/com/hnit/biz/Impl/FoodBizImpl.java: -------------------------------------------------------------------------------- 1 | package com.hnit.biz.Impl; 2 | 3 | import com.hnit.bean.OrderFood; 4 | import com.hnit.bean.OrderList; 5 | import com.hnit.biz.FoodBiz; 6 | import com.hnit.dao.MongoDBDao; 7 | import com.hnit.dao.OrderFoodMapper; 8 | import com.hnit.kafka.KafkaProducer; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.stereotype.Service; 11 | 12 | import java.util.List; 13 | 14 | @Service 15 | public class FoodBizImpl implements FoodBiz { 16 | @Autowired 17 | private OrderFoodMapper orderFoodMapper; 18 | @Autowired 19 | private MongoDBDao mongoDB; 20 | @Autowired 21 | private KafkaProducer produder; 22 | @Override 23 | public List getAllFoodMessage() { 24 | List result = orderFoodMapper.selectByExample(null); 25 | return result; 26 | } 27 | 28 | @Override 29 | public String addOrder(OrderList orderList) { 30 | orderList.setOrderList(orderList.getOrderList().replace("null,","")); 31 | String result = mongoDB.saveObj(orderList); 32 | if(result != null){ 33 | produder.send("orderList",result); 34 | } 35 | return result; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/java/com/hnit/utils/IpUtil.java: -------------------------------------------------------------------------------- 1 | package com.hnit.utils; 2 | 3 | import java.io.IOException; 4 | 5 | import org.apache.http.HttpEntity; 6 | import org.apache.http.client.ClientProtocolException; 7 | import org.apache.http.client.methods.CloseableHttpResponse; 8 | import org.apache.http.client.methods.HttpGet; 9 | import org.apache.http.impl.client.CloseableHttpClient; 10 | import org.apache.http.impl.client.HttpClientBuilder; 11 | import org.apache.http.util.EntityUtils; 12 | import com.alibaba.fastjson.JSONObject; 13 | 14 | public class IpUtil { 15 | public String getIp() throws ClientProtocolException, IOException { 16 | String ip=""; 17 | CloseableHttpClient httpClient = HttpClientBuilder.create().build(); 18 | HttpGet get = new HttpGet("http://pv.sohu.com/cityjson"); 19 | CloseableHttpResponse response = null; 20 | response=httpClient.execute(get); 21 | HttpEntity responseEntity=response.getEntity(); 22 | if (responseEntity != null) { 23 | 24 | String resp=EntityUtils.toString(responseEntity,"GBK"); 25 | resp=resp.replace("var returnCitySN = ", ""); 26 | resp=resp.replace(";", ""); 27 | JSONObject object = (JSONObject) JSONObject.parse(resp); 28 | ip=object.get("cip").toString(); 29 | } 30 | return ip; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /XBDCInterface/src/main/java/com/hnit/controller/FoodController.java: -------------------------------------------------------------------------------- 1 | package com.hnit.controller; 2 | 3 | import com.hnit.bean.OrderFood; 4 | import com.hnit.bean.OrderList; 5 | import com.hnit.biz.FoodBiz; 6 | import com.hnit.kafka.KafkaProducer; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Controller; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.ResponseBody; 11 | 12 | import java.util.Date; 13 | import java.util.List; 14 | 15 | @Controller 16 | public class FoodController { 17 | @Autowired 18 | private FoodBiz foodBiz; 19 | @Autowired 20 | private KafkaProducer producer; 21 | 22 | @RequestMapping("/getAllFoodMessage") 23 | @ResponseBody 24 | public List getAllFoodMessage(){ 25 | List allFoodMessage = foodBiz.getAllFoodMessage(); 26 | return allFoodMessage; 27 | 28 | } 29 | 30 | @RequestMapping("/addOrder") 31 | @ResponseBody 32 | public int addOrder(OrderList orderList){ 33 | String result = foodBiz.addOrder(orderList); 34 | if(result != null){ 35 | return 1; 36 | }else{ 37 | return -1; 38 | } 39 | 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/java/com/hnit/utils/RedisUtil.java: -------------------------------------------------------------------------------- 1 | package com.hnit.utils; 2 | 3 | import java.util.Random; 4 | 5 | import redis.clients.jedis.Jedis; 6 | public class RedisUtil { 7 | private static Jedis jedis; 8 | 9 | private void getJedis() { 10 | jedis=new Jedis(""); 11 | jedis.auth(""); 12 | 13 | } 14 | public void addList(String key,String value) { 15 | 16 | getJedis(); 17 | jedis.lpush(key, value); 18 | jedis.close(); 19 | 20 | } 21 | 22 | public void deleteList(String key,String value) { 23 | getJedis(); 24 | jedis.lrem(key, 0, value); 25 | jedis.close(); 26 | } 27 | 28 | public void addString(String key,String value) { 29 | 30 | getJedis(); 31 | jedis.set(key, value); 32 | jedis.close(); 33 | 34 | } 35 | 36 | public void deleteKey(String key) { 37 | getJedis(); 38 | jedis.del(key); 39 | jedis.close(); 40 | } 41 | 42 | public String getValue(String key) { 43 | getJedis(); 44 | String value = jedis.get(key); 45 | jedis.close(); 46 | return value; 47 | } 48 | 49 | public String getRandomFromList(String listName) { 50 | getJedis(); 51 | Long llen = jedis.llen(listName); 52 | if(llen == null || llen == 0) { 53 | return null; 54 | } 55 | Random r = new Random(); 56 | return jedis.lindex(listName,r.nextInt((int) (llen+0))); 57 | 58 | } 59 | 60 | 61 | 62 | } 63 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/java/com/hnit/biz/UserBiz.java: -------------------------------------------------------------------------------- 1 | package com.hnit.biz; 2 | 3 | import java.io.IOException; 4 | import java.io.UnsupportedEncodingException; 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | import org.apache.http.client.ClientProtocolException; 9 | 10 | import com.github.pagehelper.PageInfo; 11 | import com.hnit.bean.OrderManagertype; 12 | import com.hnit.bean.OrderUser; 13 | import com.hnit.biz.Exception.MyException; 14 | 15 | public interface UserBiz { 16 | //用户登录返回用户类型 17 | public OrderUser login(OrderUser user) throws ClientProtocolException, IOException; 18 | 19 | public int addManager(OrderUser user) throws MyException, UnsupportedEncodingException; 20 | 21 | public PageInfo>> queryManagerList(int pageNumber,int pageSize); 22 | 23 | public List queryAllManagerType(); 24 | 25 | public int addManagerType(OrderManagertype orderManagerType) throws MyException; 26 | 27 | public OrderUser queryManagerByUid(int uid); 28 | 29 | public void userOutLogin() throws ClientProtocolException, IOException; 30 | 31 | public int updataManagerType(OrderUser user) throws MyException; 32 | 33 | public int deleteManager(OrderUser user) throws MyException; 34 | 35 | public String changePassword(String phone) throws MyException; 36 | 37 | public int changePassword(String phone, String password1); 38 | } 39 | -------------------------------------------------------------------------------- /XBDCInterface/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | #服务器地址 2 | my.address=localhost 3 | server.port=9000 4 | #配置热部署 5 | spring.devtools.restart.enabled=true 6 | 7 | 8 | #配置MySQL连接 9 | spring.datasource.url=jdbc:mysql://47.94.88.204:3306/order?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true 10 | spring.datasource.username= 11 | spring.datasource.password= 12 | spring.datasource.driver-class-name=com.mysql.jdbc.Driver 13 | #配置pagehelper插件 14 | pagehelper.helper-dialect=mysql 15 | pagehelper.params=count=countSql 16 | pagehelper.reasonable=true 17 | pagehelper.support-methods-arguments=true 18 | pagehelper.pageSize=10 19 | #mongodb配置 20 | spring.data.mongodb.uri= 21 | #kafka配置 22 | spring.kafka.bootstrap-servers= 23 | spring.kafka.producer.retries=0 24 | spring.kafka.producer.batch-size=16384 25 | spring.kafka.producer.buffer-memory=33554432 26 | spring.kafka.producer.key-serializer=org.apache.kafka.common.serialization.StringSerializer 27 | spring.kafka.producer.value-serializer=org.apache.kafka.common.serialization.StringSerializer 28 | spring.kafka.consumer.group-id=orderList 29 | spring.kafka.consumer.auto-commit-interval=100 30 | spring.kafka.consumer.key-deserializer=org.apache.kafka.common.serialization.StringDeserializer 31 | spring.kafka.consumer.value-deserializer=org.apache.kafka.common.serialization.StringDeserializer 32 | //配置订阅主题 33 | kafka.topics=orderList 34 | -------------------------------------------------------------------------------- /小白点餐/project.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "miniprogramRoot": "miniprogram/", 3 | "cloudfunctionRoot": "cloudfunctions/", 4 | "setting": { 5 | "urlCheck": false, 6 | "es6": true, 7 | "enhance": true, 8 | "postcss": true, 9 | "preloadBackgroundData": false, 10 | "minified": true, 11 | "newFeature": true, 12 | "coverView": true, 13 | "autoAudits": false, 14 | "showShadowRootInWxmlPanel": true, 15 | "scopeDataCheck": false, 16 | "checkInvalidKey": true, 17 | "checkSiteMap": true, 18 | "uploadWithSourceMap": true, 19 | "babelSetting": { 20 | "ignore": [], 21 | "disablePlugins": [], 22 | "outputPath": "" 23 | } 24 | }, 25 | "appid": "wxd878919421f628b2", 26 | "projectname": "%E5%B0%8F%E7%99%BD%E7%82%B9%E9%A4%90", 27 | "libVersion": "2.8.1", 28 | "simulatorType": "wechat", 29 | "simulatorPluginLibVersion": {}, 30 | "cloudfunctionTemplateRoot": "cloudfunctionTemplate", 31 | "condition": { 32 | "search": { 33 | "current": -1, 34 | "list": [] 35 | }, 36 | "conversation": { 37 | "current": -1, 38 | "list": [] 39 | }, 40 | "plugin": { 41 | "current": -1, 42 | "list": [] 43 | }, 44 | "game": { 45 | "list": [] 46 | }, 47 | "miniprogram": { 48 | "current": 0, 49 | "list": [ 50 | { 51 | "id": -1, 52 | "name": "db guide", 53 | "pathName": "pages/databaseGuide/databaseGuide" 54 | } 55 | ] 56 | } 57 | } 58 | } -------------------------------------------------------------------------------- /小白点餐/miniprogram/pages/kefu/kefu.js: -------------------------------------------------------------------------------- 1 | // pages/kefu/kefu.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | userName:"" 9 | }, 10 | 11 | /** 12 | * 生命周期函数--监听页面加载 13 | */ 14 | onLoad: function (options) { 15 | let that = this; 16 | wx.getSetting({ 17 | success (res){ 18 | if (res.authSetting['scope.userInfo']) { 19 | // 已经授权,可以直接调用 getUserInfo 获取头像昵称 20 | wx.getUserInfo({ 21 | success: function(res) { 22 | that.setData({ 23 | URL:"http://localhost:8080/toChat?userName="+res.userInfo.nickName 24 | }) 25 | } 26 | }) 27 | } 28 | } 29 | }) 30 | }, 31 | 32 | /** 33 | * 生命周期函数--监听页面初次渲染完成 34 | */ 35 | onReady: function () { 36 | 37 | }, 38 | 39 | /** 40 | * 生命周期函数--监听页面显示 41 | */ 42 | onShow: function () { 43 | 44 | }, 45 | 46 | /** 47 | * 生命周期函数--监听页面隐藏 48 | */ 49 | onHide: function () { 50 | 51 | }, 52 | 53 | /** 54 | * 生命周期函数--监听页面卸载 55 | */ 56 | onUnload: function () { 57 | 58 | }, 59 | 60 | /** 61 | * 页面相关事件处理函数--监听用户下拉动作 62 | */ 63 | onPullDownRefresh: function () { 64 | 65 | }, 66 | 67 | /** 68 | * 页面上拉触底事件的处理函数 69 | */ 70 | onReachBottom: function () { 71 | 72 | }, 73 | 74 | /** 75 | * 用户点击右上角分享 76 | */ 77 | onShareAppMessage: function () { 78 | 79 | } 80 | }) -------------------------------------------------------------------------------- /小白点餐/miniprogram/wxs/util.wxs: -------------------------------------------------------------------------------- 1 | var formatNumber = function(n){ 2 | n = n.toString() 3 | return n[1] ? n : '0' + n 4 | } 5 | 6 | var regYear = getRegExp("(y+)", "i"); 7 | 8 | var dateFormat = function(timestamp,format){ 9 | 10 | if (!format) { 11 | format = "yyyy-MM-dd hh:mm:ss"; 12 | } 13 | timestamp = parseInt(timestamp); 14 | timestamp = timestamp * 1000; 15 | var realDate = getDate(timestamp); 16 | function timeFormat(num) { 17 | return num < 10 ? '0' + num : num; 18 | } 19 | var date = [ 20 | ["M+", timeFormat(realDate.getMonth() + 1)], 21 | ["d+", timeFormat(realDate.getDate())], 22 | ["h+", timeFormat(realDate.getHours())], 23 | ["m+", timeFormat(realDate.getMinutes())], 24 | ["s+", timeFormat(realDate.getSeconds())], 25 | ["q+", Math.floor((realDate.getMonth() + 3) / 3)], 26 | ["S+", realDate.getMilliseconds()], 27 | ]; 28 | var reg1 = regYear.exec(format); 29 | // console.log(reg1[0]); 30 | if (reg1) { 31 | 32 | format = format.replace(reg1[1], (realDate.getFullYear() + '').substring(4 - reg1[1].length)); 33 | } 34 | for (var i=0;i 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 18 | 19 | 20 | 21 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 33 | 34 | 35 | 36 |
37 | 38 |
39 | 40 |
41 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/lay/modules/laytpl.js: -------------------------------------------------------------------------------- 1 | /** layui-v1.0.7 MIT License By http://www.layui.com */ 2 | ;layui.define(function(e){"use strict";var r={open:"{{",close:"}}"},n={exp:function(e){return new RegExp(e,"g")},query:function(e,n,t){var o=["#([\\s\\S])+?","([^{#}])*?"][e||0];return c((n||"")+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 n="Laytpl Error:";return"object"==typeof console&&console.error(n+e+"\n"+(r||"")),n+e}},c=n.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=c("^"+r.open+"#",""),l=c(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(c(r.open+"#"),r.open+"# ").replace(c(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(/(?="|')/g,"\\").replace(n.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(n.query(1),function(e){var n='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(c(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),n='"+_escape_('),n+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,n.escape)}catch(u){return delete o.cache,n.error(u,p)}},t.pt.render=function(e,r){var c,t=this;return e?(c=t.cache?t.cache(e,n.escape):t.parse(t.tpl,e),r?void r(c):c):n.error("no data")};var o=function(e){return"string"!=typeof e?n.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var n in e)r[n]=e[n]},o.v="1.2.0",e("laytpl",o)}); -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/generatorConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 18 | 19 | 20 | 21 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 33 | 34 | 35 |
36 |
37 |
38 |
39 | 40 |
41 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/css/login.css: -------------------------------------------------------------------------------- 1 | .login_title{ 2 | width: 50px !important; 3 | background-color: #e7f0f4 !important; 4 | border-width: 0 !important; 5 | line-height: 29px !important; 6 | height: 45px !important; 7 | padding: 8px 10px !important; 8 | } 9 | .login_title i{ 10 | font-size: 24px; 11 | color: #819dab; 12 | } 13 | .login_input{ 14 | margin-left: 50px !important; 15 | } 16 | .login_input input{ 17 | background-color: #f2f8fb !important; 18 | border-width: 0 !important; 19 | height: 45px !important; 20 | } 21 | .login_but{ 22 | height: 45px; 23 | background-color: #57c201 !important; 24 | } 25 | .layui-form-radio>i{ 26 | margin-right: 0; 27 | } 28 | .layui-form-radio{ 29 | margin: 0; 30 | marker: 0; 31 | } 32 | 33 | body{ 34 | overflow: hidden; 35 | } 36 | .loginBg{ 37 | width: 100%; 38 | height: 460px; 39 | background: url(../images/logo.gif) no-repeat; 40 | background-size: 1920px 460px; 41 | } 42 | .login_main{ 43 | width: 100%; 44 | } 45 | .login_main .box{ 46 | width: 800px; 47 | margin: 0 auto; 48 | overflow: hidden; 49 | margin-top: 20px; 50 | } 51 | .login_main .box .left{ 52 | width: 50%; 53 | height: 240px; 54 | float: left; 55 | text-align: center; 56 | border-right: 1px solid #dfe2e3; 57 | box-sizing:border-box; 58 | -moz-box-sizing:border-box; /* Firefox */ 59 | -webkit-box-sizing:border-box; /* Safari */ 60 | } 61 | .login_main .box .left img{ 62 | width: 160px; 63 | height: 160px; 64 | } 65 | .login_main .box .left p{ 66 | font-size: 30px; 67 | font-weight: 600; 68 | } 69 | .login_main .box .right{ 70 | width: 50%; 71 | height: 240px; 72 | float: left; 73 | padding: 10px 80px; 74 | box-sizing:border-box; 75 | -moz-box-sizing:border-box; /* Firefox */ 76 | -webkit-box-sizing:border-box; /* Safari */ 77 | } 78 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/java/com/hnit/biz/Impl/FoodBizImpl.java: -------------------------------------------------------------------------------- 1 | package com.hnit.biz.Impl; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.beans.factory.annotation.Value; 7 | import org.springframework.stereotype.Service; 8 | 9 | import com.github.pagehelper.PageHelper; 10 | import com.github.pagehelper.PageInfo; 11 | import com.hnit.bean.OrderFood; 12 | import com.hnit.biz.FoodBiz; 13 | import com.hnit.dao.OrderFoodMapper; 14 | @Service 15 | public class FoodBizImpl implements FoodBiz{ 16 | @Autowired 17 | OrderFoodMapper orderFoodMapper; 18 | @Value("${pagehelper.pageSize}") 19 | private int pageSize; 20 | @Override 21 | public int addFood(OrderFood food) { 22 | if(food.getFname()==null || food.getFname().trim()=="" || food.getFprice()==null) { 23 | return -1; 24 | } 25 | return orderFoodMapper.insert(food); 26 | } 27 | @Override 28 | public PageInfo queryFoodList(int pageNumber, int pageSize) { 29 | PageHelper.startPage(pageNumber, pageSize); 30 | List foodList = orderFoodMapper.selectByExample(null); 31 | PageInfo pageInfo = new PageInfo(foodList); 32 | return pageInfo; 33 | } 34 | @Override 35 | public OrderFood queryFoodByFid(int fid) { 36 | OrderFood food=orderFoodMapper.selectByPrimaryKey(fid); 37 | return food; 38 | } 39 | @Override 40 | public int updateFood(OrderFood food) { 41 | if(food.getFname()==null || food.getFname().trim()=="" || food.getFprice()==null) { 42 | return -1; 43 | } 44 | int result = orderFoodMapper.updateByPrimaryKey(food); 45 | return result; 46 | } 47 | @Override 48 | public int deleteFoodByFid(int fid) { 49 | int result = orderFoodMapper.deleteByPrimaryKey(fid); 50 | return result; 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/java/com/hnit/utils/SMSUtil.java: -------------------------------------------------------------------------------- 1 | package com.hnit.utils; 2 | 3 | import com.alibaba.fastjson.JSON; 4 | import com.alibaba.fastjson.JSONObject; 5 | import com.aliyuncs.CommonRequest; 6 | import com.aliyuncs.CommonResponse; 7 | import com.aliyuncs.DefaultAcsClient; 8 | import com.aliyuncs.IAcsClient; 9 | import com.aliyuncs.exceptions.ClientException; 10 | import com.aliyuncs.exceptions.ServerException; 11 | import com.aliyuncs.http.MethodType; 12 | import com.aliyuncs.profile.DefaultProfile; 13 | 14 | public class SMSUtil { 15 | public static String send(String phone,String signName,String templateCode,String templateParam) { 16 | String result=""; 17 | DefaultProfile profile = DefaultProfile.getProfile("cn-hangzhou", "", ""); 18 | IAcsClient client = new DefaultAcsClient(profile); 19 | 20 | CommonRequest request = new CommonRequest(); 21 | request.setSysMethod(MethodType.POST); 22 | request.setSysDomain("dysmsapi.aliyuncs.com"); 23 | request.setSysVersion("2017-05-25"); 24 | request.setSysAction("SendSms"); 25 | request.putQueryParameter("RegionId", "cn-hangzhou"); 26 | request.putQueryParameter("PhoneNumbers", phone); 27 | request.putQueryParameter("SignName", signName); 28 | request.putQueryParameter("TemplateCode", templateCode); 29 | request.putQueryParameter("TemplateParam", templateParam); 30 | try { 31 | CommonResponse response = client.getCommonResponse(request); 32 | String data=response.getData(); 33 | JSONObject json=JSON.parseObject(data); 34 | result= json.get("Code").toString(); 35 | } catch (ServerException e) { 36 | e.printStackTrace(); 37 | } catch (ClientException e) { 38 | e.printStackTrace(); 39 | } 40 | return result; 41 | } 42 | 43 | 44 | } 45 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/java/com/hnit/bean/OrderUser.java: -------------------------------------------------------------------------------- 1 | package com.hnit.bean; 2 | 3 | import java.io.Serializable; 4 | 5 | public class OrderUser implements Serializable { 6 | private Integer uid; 7 | 8 | private String uname; 9 | 10 | private String password; 11 | 12 | private String phone; 13 | 14 | private String identity; 15 | 16 | private Integer sex; 17 | 18 | private String email; 19 | 20 | private Integer type; 21 | 22 | private static final long serialVersionUID = 1L; 23 | 24 | public Integer getUid() { 25 | return uid; 26 | } 27 | 28 | public void setUid(Integer uid) { 29 | this.uid = uid; 30 | } 31 | 32 | public String getUname() { 33 | return uname; 34 | } 35 | 36 | public void setUname(String uname) { 37 | this.uname = uname; 38 | } 39 | 40 | public String getPassword() { 41 | return password; 42 | } 43 | 44 | public void setPassword(String password) { 45 | this.password = password; 46 | } 47 | 48 | public String getPhone() { 49 | return phone; 50 | } 51 | 52 | public void setPhone(String phone) { 53 | this.phone = phone; 54 | } 55 | 56 | public String getIdentity() { 57 | return identity; 58 | } 59 | 60 | public void setIdentity(String identity) { 61 | this.identity = identity; 62 | } 63 | 64 | public Integer getSex() { 65 | return sex; 66 | } 67 | 68 | public void setSex(Integer sex) { 69 | this.sex = sex; 70 | } 71 | 72 | public String getEmail() { 73 | return email; 74 | } 75 | 76 | public void setEmail(String email) { 77 | this.email = email; 78 | } 79 | 80 | public Integer getType() { 81 | return type; 82 | } 83 | 84 | public void setType(Integer type) { 85 | this.type = type; 86 | } 87 | } -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/templates/freemarker/login.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 登录系统 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/java/com/hnit/biz/aop/FoodAop.java: -------------------------------------------------------------------------------- 1 | package com.hnit.biz.aop; 2 | 3 | import java.io.IOException; 4 | import java.util.List; 5 | 6 | import org.aspectj.lang.annotation.Aspect; 7 | import org.aspectj.lang.annotation.Before; 8 | import org.aspectj.lang.annotation.Pointcut; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.context.annotation.Bean; 11 | import org.springframework.stereotype.Component; 12 | 13 | import com.hnit.bean.OrderUser; 14 | import com.hnit.bean.OrderUserExample; 15 | import com.hnit.biz.Exception.MyException; 16 | import com.hnit.dao.OrderUserMapper; 17 | import com.hnit.utils.UserUtil; 18 | 19 | @Aspect 20 | @Component 21 | public class FoodAop { 22 | @Autowired 23 | OrderUserMapper orderUserMapper; 24 | @Pointcut("execution(* com.hnit.biz.FoodBiz.addFood(..))") 25 | public void addFood() { 26 | 27 | } 28 | 29 | @Pointcut("execution(* com.hnit.biz.FoodBiz.deleteFoodByFid(..))") 30 | public void deleteFoodByFid() { 31 | 32 | } 33 | 34 | @Pointcut("execution(* com.hnit.biz.FoodBiz.updateFood(..))") 35 | public void updateFood() { 36 | 37 | } 38 | 39 | @Before("addFood()|| deleteFoodByFid() || updateFood()") 40 | public void theAuthorityNeedTwo() throws MyException { 41 | UserUtil userUtil = new UserUtil(); 42 | String phone = null; 43 | try { 44 | phone = userUtil.getUserPhone(); 45 | } catch (IOException e) { 46 | throw new MyException("请重试!"); 47 | } 48 | if(phone == null) { 49 | throw new MyException("登录信息已过期,请重新登录"); 50 | } 51 | OrderUserExample orderUserExample = new OrderUserExample(); 52 | orderUserExample.createCriteria().andPhoneEqualTo(phone); 53 | List user = orderUserMapper.selectByExample(orderUserExample); 54 | if(user.isEmpty() || user.size()==0) { 55 | throw new MyException("请重试"); 56 | } 57 | if(user.get(0).getType() > 2) { 58 | throw new MyException("权限不足"); 59 | } 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/java/com/hnit/web/controller/OrderController.java: -------------------------------------------------------------------------------- 1 | package com.hnit.web.controller; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.beans.factory.annotation.Value; 8 | import org.springframework.ui.Model; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RequestParam; 11 | import org.springframework.web.bind.annotation.ResponseBody; 12 | import org.springframework.web.bind.annotation.RestController; 13 | import org.springframework.web.servlet.ModelAndView; 14 | 15 | import com.hnit.bean.OrderList; 16 | import com.hnit.biz.OrderBiz; 17 | import com.hnit.utils.OutputObject; 18 | 19 | @RestController 20 | public class OrderController { 21 | @Autowired 22 | OrderBiz orderBiz; 23 | 24 | @Value("${pagehelper.pageSize}") 25 | private int pageSize; 26 | 27 | @RequestMapping("/toOrderList") 28 | public ModelAndView toOrderList(ModelAndView model) { 29 | model.setViewName("freemarker/orderList"); 30 | return model; 31 | } 32 | 33 | @RequestMapping("/queryOrderList") 34 | @ResponseBody 35 | public Map queryOrderList(@RequestParam(name = "limit")Integer pageSize,@RequestParam(name = "page")Integer pageNumber){ 36 | if(pageSize!=null) { 37 | this.pageSize=pageSize; 38 | } 39 | Map result=orderBiz.queryOrderList(pageNumber, pageSize); 40 | if(result != null) { 41 | result.put("code",0); 42 | result.put("msg", ""); 43 | }else { 44 | result.put("code",1); 45 | result.put("msg", "请刷新重试"); 46 | } 47 | 48 | return result; 49 | } 50 | 51 | @RequestMapping("/orders") 52 | @ResponseBody 53 | public OutputObject orders(String id) { 54 | OutputObject out = new OutputObject(); 55 | long result=orderBiz.orders(id); 56 | if(result>0) { 57 | out.setCode(1); 58 | }else { 59 | out.setCode(-1); 60 | } 61 | return out; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/lay/modules/flow.js: -------------------------------------------------------------------------------- 1 | /** layui-v1.0.7 MIT License By http://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var l=layui.jquery,o=function(e){},t='';o.prototype.load=function(e){var o,i,n,r,a=this,c=0;e=e||{};var u=l(e.elem);if(u[0]){var f=l(e.scrollElem||document),m=e.mb||50,s=!("isAuto"in e)||e.isAuto,y=e.end||"没有更多了",v=e.scrollElem&&e.scrollElem!==document,d="加载更多",h=l('");u.find(".layui-flow-more")[0]||u.append(h);var p=function(e,t){e=l(e),h.before(e),t=0==t||null,t?h.html(y):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?(f.on("scroll",function(){var e=l(this),t=e.scrollTop();r&&clearTimeout(r),i||(r=setTimeout(function(){var i=v?e.height():l(window).height(),n=v?e.prop("scrollHeight"):document.documentElement.scrollHeight;n-t-i<=m&&(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 f=e.attr("lay-src");layui.img(f,function(){var l=t.lazyimg.elem.eq(i);e.attr("src",f).removeAttr("lay-src"),l[0]&&u(l),i++})}},u=function(e,o){var u=a?(o||n).height():l(window).height(),f=n.scrollTop(),m=f+u;if(t.lazyimg.elem=l(r),e)c(e,u);else for(var s=0;sm)break}};if(u(),!o){var f;n.on("scroll",function(){var e=l(this);f&&clearTimeout(f),f=setTimeout(function(){u(null,e)},50)}),o=!0}return u},e("flow",new o)}); -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/templates/freemarker/chat.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 小白点餐 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 68 | 69 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/templates/freemarker/kefu.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 小白点餐 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 75 | 76 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/java/com/hnit/utils/IdentityUtil.java: -------------------------------------------------------------------------------- 1 | package com.hnit.utils; 2 | 3 | import java.io.IOException; 4 | import java.io.UnsupportedEncodingException; 5 | import java.net.URLEncoder; 6 | 7 | import org.apache.http.HttpEntity; 8 | import org.apache.http.ParseException; 9 | import org.apache.http.client.ClientProtocolException; 10 | import org.apache.http.client.methods.CloseableHttpResponse; 11 | import org.apache.http.client.methods.HttpPost; 12 | import org.apache.http.impl.client.CloseableHttpClient; 13 | import org.apache.http.impl.client.HttpClientBuilder; 14 | import org.apache.http.util.EntityUtils; 15 | 16 | import com.hnit.bean.OrderUser; 17 | 18 | public class IdentityUtil { 19 | //判断员工信息是否真实 20 | /** 21 | * 这里只进行了身份证是否为真实存在,没有做身份证和姓名的比对 22 | * @param user 23 | * @return 24 | * @throws UnsupportedEncodingException 25 | */ 26 | public boolean isReally(OrderUser user) throws UnsupportedEncodingException { 27 | boolean result = false; 28 | CloseableHttpClient httpClient = HttpClientBuilder.create().build(); 29 | StringBuffer params = new StringBuffer(); 30 | params.append("id=" + URLEncoder.encode(user.getIdentity(), "utf-8")); 31 | HttpPost httpPost = new HttpPost("https://shenfen.supfree.net/search.asp" + "?" + params); 32 | 33 | // 响应模型 34 | CloseableHttpResponse response = null; 35 | try { 36 | // 由客户端执行(发送)Post请求 37 | response = httpClient.execute(httpPost); 38 | 39 | // 从响应模型中获取响应实体 40 | HttpEntity responseEntity = response.getEntity(); 41 | 42 | if (responseEntity != null) { 43 | 44 | String resp=EntityUtils.toString(responseEntity,"GBK"); 45 | result=resp.contains("身份证号码校验为合法号码"); 46 | 47 | } 48 | } catch (Exception e) { 49 | e.printStackTrace(); 50 | result= false; 51 | } finally { 52 | try { 53 | // 释放资源 54 | if (httpClient != null) { 55 | httpClient.close(); 56 | } 57 | if (response != null) { 58 | response.close(); 59 | } 60 | } catch (IOException e) { 61 | e.printStackTrace(); 62 | } 63 | } 64 | return result; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /小白点餐/miniprogram/pages/my/my.js: -------------------------------------------------------------------------------- 1 | // pages/my/my.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | userName:"" 9 | }, 10 | toKefu:function(){ 11 | wx.navigateTo({ 12 | url: '/pages/kefu/kefu', 13 | }) 14 | }, 15 | /** 16 | * 生命周期函数--监听页面加载 17 | */ 18 | onLoad: function (options) { 19 | let that = this; 20 | 21 | wx.getSetting({ 22 | success (res){ 23 | if (res.authSetting['scope.userInfo']) { 24 | // 已经授权,可以直接调用 getUserInfo 获取头像昵称 25 | wx.getUserInfo({ 26 | success: function(res) { 27 | that.setData({ 28 | userName:res.userInfo.nickName 29 | }) 30 | wx.request({ 31 | 32 | url: 'http://localhost:9000/getOrderByUsername', 33 | data:{ 34 | "userName":that.data.userName 35 | }, 36 | method:"GET", 37 | header:{ 38 | 'content-Type':'application.json' 39 | }, 40 | success:function(res){ 41 | 42 | that.setData({ 43 | data:res.data.data, 44 | }); 45 | } 46 | }) 47 | } 48 | }) 49 | } 50 | } 51 | }) 52 | 53 | 54 | }, 55 | 56 | /** 57 | * 生命周期函数--监听页面初次渲染完成 58 | */ 59 | onReady: function () { 60 | 61 | }, 62 | 63 | /** 64 | * 生命周期函数--监听页面显示 65 | */ 66 | onShow: function () { 67 | 68 | }, 69 | 70 | /** 71 | * 生命周期函数--监听页面隐藏 72 | */ 73 | onHide: function () { 74 | 75 | }, 76 | 77 | /** 78 | * 生命周期函数--监听页面卸载 79 | */ 80 | onUnload: function () { 81 | 82 | }, 83 | 84 | /** 85 | * 页面相关事件处理函数--监听用户下拉动作 86 | */ 87 | onPullDownRefresh: function () { 88 | 89 | }, 90 | 91 | /** 92 | * 页面上拉触底事件的处理函数 93 | */ 94 | onReachBottom: function () { 95 | 96 | }, 97 | 98 | /** 99 | * 用户点击右上角分享 100 | */ 101 | onShareAppMessage: function () { 102 | 103 | } 104 | }) -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/lay/modules/upload.js: -------------------------------------------------------------------------------- 1 | /** layui-v1.0.7 MIT License By http://www.layui.com */ 2 | ;layui.define("layer",function(e){"use strict";var a=layui.jquery,t=layui.layer,i=(layui.device(),"layui-upload-enter"),n="layui-upload-iframe",r={icon:2,shift:6},o={file:"文件",video:"视频",audio:"音频"},s=function(e){this.options=e};s.prototype.init=function(){var e=this,t=e.options,r=a("body"),s=a(t.elem||".layui-upload-file"),u=a('');return a("#"+n)[0]||r.append(u),s.each(function(r,s){s=a(s);var u='
',l=s.attr("lay-type")||t.type;t.unwrap||(u='
'+u+''+(s.attr("lay-title")||t.title||"上传"+(o[l]||"图片"))+"
"),u=a(u),t.unwrap||u.on("dragover",function(e){e.preventDefault(),a(this).addClass(i)}).on("dragleave",function(){a(this).removeClass(i)}).on("drop",function(){a(this).removeClass(i)}),s.parent("form").attr("target")===n&&(t.unwrap?s.unwrap():(s.parent().next().remove(),s.unwrap().unwrap())),s.wrap(u),s.off("change").on("change",function(){e.action(this,l)})})},s.prototype.action=function(e,i){var o=this,s=o.options,u=e.value,l=a(e),p=l.attr("lay-ext")||s.ext||"";if(u){switch(i){case"file":if(p&&!RegExp("\\w\\.("+p+")$","i").test(escape(u)))return t.msg("不支持该文件格式",r),e.value="";break;case"video":if(!RegExp("\\w\\.("+(p||"avi|mp4|wma|rmvb|rm|flash|3gp|flv")+")$","i").test(escape(u)))return t.msg("不支持该视频格式",r),e.value="";break;case"audio":if(!RegExp("\\w\\.("+(p||"mp3|wav|mid")+")$","i").test(escape(u)))return t.msg("不支持该音频格式",r),e.value="";break;default:if(!RegExp("\\w\\.("+(p||"jpg|png|gif|bmp|jpeg")+")$","i").test(escape(u)))return t.msg("不支持该图片格式",r),e.value=""}s.before&&s.before(e),l.parent().submit();var c=a("#"+n),f=setInterval(function(){var a;try{a=c.contents().find("body").text()}catch(i){t.msg("上传接口存在跨域",r),clearInterval(f)}if(a){clearInterval(f),c.contents().find("body").html("");try{a=JSON.parse(a)}catch(i){return a={},t.msg("请对上传接口返回JSON字符",r)}"function"==typeof s.success&&s.success(a,e)}},30);e.value=""}},e("upload",function(e){var a=new s(e=e||{});a.init()})}); -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/java/com/hnit/biz/aop/UserAop.java: -------------------------------------------------------------------------------- 1 | package com.hnit.biz.aop; 2 | 3 | import java.io.IOException; 4 | import java.util.List; 5 | 6 | import javax.persistence.criteria.Order; 7 | 8 | import org.aspectj.lang.annotation.Aspect; 9 | import org.aspectj.lang.annotation.Before; 10 | import org.aspectj.lang.annotation.Pointcut; 11 | import org.springframework.beans.factory.annotation.Autowired; 12 | import org.springframework.stereotype.Component; 13 | 14 | import com.hnit.bean.OrderUser; 15 | import com.hnit.bean.OrderUserExample; 16 | import com.hnit.biz.Exception.MyException; 17 | import com.hnit.dao.OrderUserMapper; 18 | import com.hnit.utils.IpUtil; 19 | import com.hnit.utils.UserUtil; 20 | 21 | @Aspect 22 | @Component 23 | public class UserAop { 24 | 25 | @Autowired 26 | OrderUserMapper orderUserMapper; 27 | 28 | @Pointcut("execution(* com.hnit.biz.UserBiz.addManager(..))") 29 | public void addManager() { 30 | 31 | } 32 | 33 | @Pointcut("execution(* com.hnit.biz.UserBiz.addManagerType(..))") 34 | public void addManagerType() { 35 | 36 | } 37 | 38 | @Pointcut("execution(* com.hnit.biz.UserBiz.updataManagerType(..))") 39 | public void updataManagerType() { 40 | 41 | } 42 | 43 | @Pointcut("execution(* com.hnit.biz.UserBiz.deleteManager(..))") 44 | public void deleteManager() { 45 | 46 | } 47 | 48 | @Before("addManager() || addManagerType() || updataManagerType() || deleteManager()") 49 | public void theAuthorityNeedOne() throws MyException { 50 | UserUtil userUtil = new UserUtil(); 51 | try { 52 | String phone = userUtil.getUserPhone(); 53 | if(phone==null || phone == "") { 54 | throw new MyException("请重试"); 55 | } 56 | if(phone == null) { 57 | throw new MyException("登录信息已过期,请重新登录"); 58 | } 59 | OrderUserExample orderUserExample = new OrderUserExample(); 60 | orderUserExample.createCriteria().andPhoneEqualTo(phone); 61 | List user = orderUserMapper.selectByExample(orderUserExample); 62 | if(user.isEmpty() || user.size()==0) { 63 | throw new MyException("请重试"); 64 | } 65 | if(user.get(0).getType() != 1) { 66 | throw new MyException("权限不足"); 67 | } 68 | } catch (IOException e) { 69 | throw new MyException("请重试"); 70 | } 71 | } 72 | 73 | 74 | 75 | 76 | } 77 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/java/com/hnit/dao/MongodbDao.java: -------------------------------------------------------------------------------- 1 | package com.hnit.dao; 2 | 3 | import java.util.HashMap; 4 | import java.util.List; 5 | import java.util.Map; 6 | 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.data.domain.Sort; 9 | import org.springframework.data.mongodb.core.MongoTemplate; 10 | import org.springframework.data.mongodb.core.query.Criteria; 11 | import org.springframework.data.mongodb.core.query.CriteriaDefinition; 12 | import org.springframework.data.mongodb.core.query.Query; 13 | import org.springframework.data.mongodb.core.query.Update; 14 | import org.springframework.stereotype.Repository; 15 | 16 | import com.hnit.bean.OrderList; 17 | import com.mongodb.WriteResult; 18 | import com.mongodb.client.result.UpdateResult; 19 | 20 | @Repository 21 | public class MongodbDao { 22 | @Autowired 23 | private MongoTemplate mongoTemplate; 24 | 25 | public Map getData(String collectionName,int pageNumber,int pageSize) { 26 | 27 | 28 | Map map = new HashMap<>(); 29 | Query query = new Query(); 30 | int totalCount = (int) mongoTemplate.count(new Query(),OrderList.class,collectionName); 31 | if(pageNumber != 1) { 32 | 33 | query.with(Sort.by(Sort.DEFAULT_DIRECTION.DESC,"date")); 34 | int number = (pageNumber-1)*pageSize; 35 | query.limit(number); 36 | List temp = mongoTemplate.find(query, OrderList.class,collectionName); 37 | OrderList order = temp.get(temp.size()-1); 38 | String date = order.getDate(); 39 | query.addCriteria(Criteria.where("date").lt(date)); 40 | query.limit(pageSize); 41 | }else { 42 | query.with(Sort.by(Sort.DEFAULT_DIRECTION.DESC,"date")); 43 | int number = (pageNumber-1)*pageSize; 44 | query.limit(number); 45 | } 46 | 47 | List orderList = mongoTemplate.find(query, OrderList.class,collectionName); 48 | map.put("count",totalCount); 49 | map.put("data", orderList); 50 | return map; 51 | } 52 | 53 | public long orders(String id) { 54 | Query query = new Query(); 55 | query.addCriteria(Criteria.where("id").is(id)); 56 | Update update = Update.update("type", "2"); 57 | UpdateResult result = mongoTemplate.updateFirst(query, update, OrderList.class); 58 | return result.getModifiedCount(); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/java/com/hnit/webSocket/UserWebSocket.java: -------------------------------------------------------------------------------- 1 | package com.hnit.webSocket; 2 | 3 | import java.io.IOException; 4 | import java.util.Map; 5 | import java.util.concurrent.ConcurrentHashMap; 6 | 7 | import javax.websocket.OnClose; 8 | import javax.websocket.OnMessage; 9 | import javax.websocket.OnOpen; 10 | import javax.websocket.Session; 11 | import javax.websocket.server.PathParam; 12 | import javax.websocket.server.ServerEndpoint; 13 | 14 | import org.springframework.beans.factory.annotation.Autowired; 15 | import org.springframework.stereotype.Component; 16 | 17 | import com.hnit.biz.UserBiz; 18 | import com.hnit.utils.UserUtil; 19 | 20 | @ServerEndpoint("/userWebSocket/{phone}") 21 | @Component 22 | public class UserWebSocket { 23 | // concurrent包的线程安全Set,用来存放每个客户端对应的ProductWebSocket对象。 24 | private static Map webSocketSet = new ConcurrentHashMap<>(); 25 | //与某个客户端的连接会话,需要通过它来给客户端发送数据 26 | private Session session; 27 | private static UserBiz userBiz; 28 | 29 | @Autowired 30 | public void setUserBiz(UserBiz userBiz) { 31 | this.userBiz=userBiz; 32 | } 33 | 34 | @OnOpen 35 | public void open(Session session,@PathParam(value="phone") String phone) { 36 | this.session=session; 37 | webSocketSet.put(phone, this); 38 | } 39 | 40 | @OnClose 41 | public void close(@PathParam("phone")String phone) { 42 | try { 43 | userBiz.userOutLogin(); 44 | webSocketSet.remove(phone); 45 | } catch (IOException e) { 46 | // TODO Auto-generated catch block 47 | e.printStackTrace(); 48 | } 49 | } 50 | 51 | @OnMessage 52 | public void message(String message) { 53 | 54 | } 55 | 56 | //服务器推送新订单 57 | public static void sendMessage(String phone, String message) { 58 | UserWebSocket webSocket = webSocketSet.get(phone); 59 | Session session = webSocket.session; 60 | try { 61 | if (session.isOpen()) { 62 | // 同步消息 63 | /** 64 | * 1:提示前台接单 65 | */ 66 | session.getBasicRemote().sendText(message); 67 | } 68 | } catch (IOException e) { 69 | e.printStackTrace(); 70 | 71 | } 72 | } 73 | 74 | //服务器消息给客服 75 | public static void sendMessage(String message) { 76 | String phone = UserUtil.getRandomToOrders(); 77 | kefuWebSocket.sendMessageToUser(phone, message); 78 | 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /小白点餐/cloudfunctions/openapi/index.js: -------------------------------------------------------------------------------- 1 | // 云函数入口文件 2 | const cloud = require('wx-server-sdk') 3 | 4 | cloud.init() 5 | 6 | // 云函数入口函数 7 | exports.main = async (event, context) => { 8 | console.log(event) 9 | switch (event.action) { 10 | case 'requestSubscribeMessage': { 11 | return requestSubscribeMessage(event) 12 | } 13 | case 'sendSubscribeMessage': { 14 | return sendSubscribeMessage(event) 15 | } 16 | case 'getWXACode': { 17 | return getWXACode(event) 18 | } 19 | case 'getOpenData': { 20 | return getOpenData(event) 21 | } 22 | default: { 23 | return 24 | } 25 | } 26 | } 27 | 28 | async function requestSubscribeMessage(event) { 29 | // 此处为模板 ID,开发者需要到小程序管理后台 - 订阅消息 - 公共模板库中添加模板, 30 | // 然后在我的模板中找到对应模板的 ID,填入此处 31 | return '请到管理后台申请模板 ID 然后在此替换' // 如 'N_J6F05_bjhqd6zh2h1LHJ9TAv9IpkCiAJEpSw0PrmQ' 32 | } 33 | 34 | async function sendSubscribeMessage(event) { 35 | const { OPENID } = cloud.getWXContext() 36 | 37 | const { templateId } = event 38 | 39 | const sendResult = await cloud.openapi.subscribeMessage.send({ 40 | touser: OPENID, 41 | templateId, 42 | miniprogram_state: 'developer', 43 | page: 'pages/openapi/openapi', 44 | // 此处字段应修改为所申请模板所要求的字段 45 | data: { 46 | thing1: { 47 | value: '咖啡', 48 | }, 49 | time3: { 50 | value: '2020-01-01 00:00', 51 | }, 52 | } 53 | }) 54 | 55 | return sendResult 56 | } 57 | 58 | async function getWXACode(event) { 59 | 60 | // 此处将获取永久有效的小程序码,并将其保存在云文件存储中,最后返回云文件 ID 给前端使用 61 | 62 | const wxacodeResult = await cloud.openapi.wxacode.get({ 63 | path: 'pages/openapi/openapi', 64 | }) 65 | 66 | const fileExtensionMatches = wxacodeResult.contentType.match(/\/([^\/]+)/) 67 | const fileExtension = (fileExtensionMatches && fileExtensionMatches[1]) || 'jpg' 68 | 69 | const uploadResult = await cloud.uploadFile({ 70 | // 云文件路径,此处为演示采用一个固定名称 71 | cloudPath: `wxacode_default_openapi_page.${fileExtension}`, 72 | // 要上传的文件内容可直接传入图片 Buffer 73 | fileContent: wxacodeResult.buffer, 74 | }) 75 | 76 | if (!uploadResult.fileID) { 77 | throw new Error(`upload failed with empty fileID and storage server status code ${uploadResult.statusCode}`) 78 | } 79 | 80 | return uploadResult.fileID 81 | } 82 | 83 | async function getOpenData(event) { 84 | return cloud.getOpenData({ 85 | list: event.openData.list, 86 | }) 87 | } 88 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/templates/freemarker/addManagerType.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 新增员工类型 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 | 18 |
19 |
20 | 21 |
22 | 23 |
24 |

25 |
26 |
27 | 28 | 29 |
30 |
31 | 32 | 33 |
34 | 35 | 36 | 37 | 38 | 39 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/java/com/hnit/webSocket/kefuWebSocket.java: -------------------------------------------------------------------------------- 1 | package com.hnit.webSocket; 2 | 3 | import java.io.IOException; 4 | import java.util.Map; 5 | import java.util.concurrent.ConcurrentHashMap; 6 | 7 | import javax.websocket.OnClose; 8 | import javax.websocket.OnMessage; 9 | import javax.websocket.OnOpen; 10 | import javax.websocket.Session; 11 | import javax.websocket.server.PathParam; 12 | import javax.websocket.server.ServerEndpoint; 13 | 14 | import org.springframework.beans.factory.annotation.Autowired; 15 | import org.springframework.stereotype.Component; 16 | 17 | import com.alibaba.fastjson.JSONObject; 18 | import com.hnit.biz.UserBiz; 19 | import com.hnit.web.controller.UserController; 20 | 21 | @ServerEndpoint("/kefuWebSocket/{userName}") 22 | @Component 23 | public class kefuWebSocket { 24 | private static Map webSocketSet = new ConcurrentHashMap<>(); 25 | // 与某个客户端的连接会话,需要通过它来给客户端发送数据 26 | private Session session; 27 | private static UserBiz userBiz; 28 | 29 | @Autowired 30 | public void setUserBiz(UserBiz userBiz) { 31 | this.userBiz=userBiz; 32 | } 33 | 34 | @OnOpen 35 | public void open(Session session,@PathParam(value="userName") String userName) { 36 | this.session=session; 37 | webSocketSet.put(userName, this); 38 | } 39 | 40 | @OnClose 41 | public void close(@PathParam("userName")String userName) { 42 | 43 | } 44 | 45 | @OnMessage 46 | public void message(String message) { 47 | JSONObject object = (JSONObject) JSONObject.parse(message); 48 | if(object != null && object.get("type").toString().equals("msg")) { 49 | sendMessageToKefu(object.get("data").toString()); 50 | }else if(object != null && object.get("type").toString().equals("huifu")){ 51 | sendMessageToUser(object.get("to").toString(),object.get("data").toString()); 52 | } 53 | } 54 | 55 | private void sendMessageToKefu(String message) { 56 | UserWebSocket.sendMessage(message); 57 | 58 | 59 | } 60 | 61 | public static void sendMessageToUser(String userName,String message) { 62 | kefuWebSocket webSocket = webSocketSet.get(userName); 63 | Session session = webSocket.session; 64 | 65 | if (session.isOpen()) { 66 | try { 67 | session.getBasicRemote().sendText(message); 68 | } catch (IOException e) { 69 | // TODO Auto-generated catch block 70 | e.printStackTrace(); 71 | } 72 | } 73 | 74 | } 75 | 76 | 77 | } 78 | -------------------------------------------------------------------------------- /小白点餐/miniprogram/css/my.wxss: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'iconfont'; 3 | src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAXcAA0AAAAACFgAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAFwAAAABoAAAAcf7+j60dERUYAAAWkAAAAHAAAAB4AJwAMT1MvMgAAAaAAAABCAAAAVlbmSABjbWFwAAAB/AAAAE4AAAFKy8chmmdhc3AAAAWcAAAACAAAAAj//wADZ2x5ZgAAAlwAAAHLAAACLGyxjtFoZWFkAAABMAAAADAAAAA2DrhOw2hoZWEAAAFgAAAAHQAAACQH0gOGaG10eAAAAeQAAAAWAAAAFg1MADZsb2NhAAACTAAAAA4AAAAOAYwAvm1heHAAAAGAAAAAHwAAACABFQBdbmFtZQAABCgAAAFJAAACiCnmEVVwb3N0AAAFdAAAACgAAAA7ElgeUHicY2BkYGAA4jNbVWvj+W2+MnCzMIDA1bOtSXCa638P8xfmMiCXg4EJJAoATAQL9XicY2BkYGBu+N/AEMPCAALMXxgYGVABKwBZEwNhAAAAeJxjYGRgYGBjCGRgZQABJiDmAkIGhv9gPgMAEUgBcwB4nGNgZP7BOIGBlYGBqZPpDAMDQz+EZnzNYMTIARRlYGVmwAoC0lxTGBwYKp6JMTf8b2CIYW5gaAAKM4LkACKWDHoAAAQAAAAAAAAAAVUAAAPpACwEAAAKAA4AAHicY2BgYGaAYBkGRgYQcAHyGMF8FgYNIM0GpBkZmBgqnon9/w/kVzwT/f//f7fke6h6IGBkY4BzGJmABBMDKmBkoBlgpp3RJAEAQpQKSAAAAAAAAAAAAAAAdgC+ARYAAHicfZC/btNQFMbPuTfXsXMdp7Hj/00Tx9QGtUQiccNQtR1g4c9QiYmRBwCkDu3C0AWJoUN5BYTEA2TtlOQNnEgMLAiidmRgtG64JsDI1dHV90m/o/OdAwx2V1/pFfXAgttwDx7CMQAqO9gzSBujNOuTHbQjZrstg6ZxGlXjXp8eoNtTWs5glCWuUlUaaOAWDqPBKO2TFPeyQ7KPA6eN6IfBM3N706SXWPPSrbfiMfmAdifebBzeFY92j1qDrqWe6abpm+aFqjCmElJpGPjSdTSm1RTxkTUC+6pzh3RQ99Pg6fN6NzRfvMtetbddDfH8HK2wa3w6agZNWW8CxzL96kZd9YJ6fKuFZ9+5Z+nt5BvIR6G2uqA/6SlwcCEu94SqA+4I7idAE0ilkFYBKyq3K/fJElzNxVJRMJwvMGRMLBdTUTCGlekMK9IXTLxWdV3F9/KnpyWwEEsJhAvZUDyQ5OwPOZuJAr9wk8ta5zFWl/QHPfmdZ/ifPPFelvSUNsZlrn20y9Mf4HCdLxc3Mp+Xz9GTU27mEyHkeDKZIpFeVMa8ycca59pfQU+YuM5zcS0xP8/RL56U/GTNT2Q/fh6rnKtjfUP/J+AXSs57JgB4nH2QPU4DMRCFn/MHJBJCIKhdUQDa/JQpEyn0CKWjSDbekGjXXnmdSDkBLRUHoOUYHIAbINFyCl6WSZMia+3o85uZ57EBnOMbCv/fJe6EFY7xKFzBETLhKvUX4Rr5XbiOFj6FG9R/hJu4VQPhFi7UGx1U7YS7m9JtywpnGAhXcIon4Sr1lXCN/CpcxxU+hBvUv4SbGONXuIVrZakM4WEwQWCcQWOKDeMCMRwskjIG1qE59GYSzExPN3oRO5s4GyjvV2KXAx5oOeeAKe09t2a+Sif+YMuB1JhuHgVLtimNLiJ0KBtfLJzV3ahzsP2e7ba02L9rgTXH7FENbNT8Pdsz0khsDK+QkjXyMrekElOPaGus8btnKdbzXgiJTrzL9IjHmjR1OvduaeLA4ufyjBx9tLmSPfeoHD5jWQh5v91OxCCKXYY/k9hxGQAAAHicY2BigAAuBuyADYgZGZgYohmZGJnZcjPzSouNWAtySosNASgNBNYAAAAB//8AAnicY2BkYGDgAWIxIGZiYARCViBmAfMYAAPVADR4nGNgYGBkAIIrKjPVQPTVs61JMBoAQ08GywAA) format('woff'), 4 | url('iconfont.ttf') format('truetype'); 5 | font-weight: normal; 6 | font-style: normal; 7 | } 8 | .iconfont { 9 | font-family: "iconfont" !important; 10 | font-size: 16px; 11 | font-style: normal; 12 | -webkit-font-smoothing: antialiased; 13 | -moz-osx-font-smoothing: grayscale; 14 | } 15 | 16 | .icon-minus2:before { 17 | content: "\e615"; 18 | } 19 | 20 | .icon-plus1:before { 21 | content: "\e616"; 22 | } -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/css/modules/layim/html/getmsg.json: -------------------------------------------------------------------------------- 1 | { 2 | "code": 0, 3 | "pages": 1, 4 | "data": [ 5 | { 6 | "id": 76, 7 | "content": "申请添加你为好友", 8 | "uid": 168, 9 | "from": 166488, 10 | "from_group": 0, 11 | "type": 1, 12 | "remark": "有问题要问", 13 | "href": null, 14 | "read": 1, 15 | "time": "刚刚", 16 | "user": { 17 | "id": 166488, 18 | "avatar": "http://q.qlogo.cn/qqapp/101235792/B704597964F9BD0DB648292D1B09F7E8/100", 19 | "username": "李彦宏", 20 | "sign": null 21 | } 22 | }, 23 | { 24 | "id": 75, 25 | "content": "申请添加你为好友", 26 | "uid": 168, 27 | "from": 347592, 28 | "from_group": 0, 29 | "type": 1, 30 | "remark": "你好啊!", 31 | "href": null, 32 | "read": 1, 33 | "time": "刚刚", 34 | "user": { 35 | "id": 347592, 36 | "avatar": "http://q.qlogo.cn/qqapp/101235792/B78751375E0531675B1272AD994BA875/100", 37 | "username": "麻花疼", 38 | "sign": null 39 | } 40 | }, 41 | { 42 | "id": 62, 43 | "content": "雷军 拒绝了你的好友申请", 44 | "uid": 168, 45 | "from": null, 46 | "from_group": null, 47 | "type": 1, 48 | "remark": null, 49 | "href": null, 50 | "read": 1, 51 | "time": "10天前", 52 | "user": { 53 | "id": null 54 | } 55 | }, 56 | { 57 | "id": 60, 58 | "content": "马小云 已经同意你的好友申请", 59 | "uid": 168, 60 | "from": null, 61 | "from_group": null, 62 | "type": 1, 63 | "remark": null, 64 | "href": null, 65 | "read": 1, 66 | "time": "10天前", 67 | "user": { 68 | "id": null 69 | } 70 | }, 71 | { 72 | "id": 61, 73 | "content": "贤心 已经同意你的好友申请", 74 | "uid": 168, 75 | "from": null, 76 | "from_group": null, 77 | "type": 1, 78 | "remark": null, 79 | "href": null, 80 | "read": 1, 81 | "time": "10天前", 82 | "user": { 83 | "id": null 84 | } 85 | } 86 | ] 87 | } -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/templates/freemarker/updataType.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 修改员工类型 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 | 18 |
19 |
20 | 21 | 22 |
23 | 34 |
35 |

36 |
37 |
38 | 39 |
40 |
41 |
42 |
43 |
44 | 45 | 46 | 47 | 48 | 49 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /小白点餐/miniprogram/components/chatroom/chatroom.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{groupName}} 7 | 8 | 9 | 10 | 11 | 12 | 20 | 26 | 31 | 32 | {{item.nickName}} 33 | 34 | 35 | {{item.writeStatus}}% 36 | 43 | 44 | 45 | 46 | 47 | ··· 48 | {{item.textContent}} 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 66 | 67 | 73 | 74 | 75 | 76 | 81 | 82 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | #配置热部署 2 | spring.devtools.restart.enabled=true 3 | 4 | 5 | #配置MySQL连接 6 | spring.datasource.url=jdbc:mysql://47.94.88.204:3306/order?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true 7 | spring.datasource.username= 8 | spring.datasource.password= 9 | spring.datasource.driver-class-name=com.mysql.jdbc.Driver 10 | #配置pagehelper插件 11 | pagehelper.helper-dialect=mysql 12 | pagehelper.params=count=countSql 13 | pagehelper.reasonable=true 14 | pagehelper.support-methods-arguments=true 15 | pagehelper.pageSize=10 16 | #配置freemarker 17 | # 设定ftl文件路径 18 | spring.freemarker.tempalte-loader-path=classpath:/templates 19 | # 关闭缓存,及时刷新,上线生产环境需要修改为true 20 | spring.freemarker.cache=false 21 | spring.freemarker.charset=UTF-8 22 | spring.freemarker.check-template-location=true 23 | spring.freemarker.content-type=text/html 24 | spring.freemarker.expose-request-attributes=true 25 | spring.freemarker.expose-session-attributes=true 26 | spring.freemarker.request-context-attribute=request 27 | spring.freemarker.suffix=.ftl 28 | 29 | 30 | ## Redis 配置 31 | ## Redis服务器地址 32 | spring.redis.host= 33 | ## Redis服务器连接端口 34 | spring.redis.port= 35 | ## Redis服务器连接密码 36 | spring.redis.password= 37 | # 连接池最大连接数(使用负值表示没有限制) 38 | spring.redis.jedis.pool.max-active=8 39 | # 连接池最大阻塞等待时间(使用负值表示没有限制) 40 | spring.redis.jedis.pool.max-wait=-1 41 | # 连接池中的最大空闲连接 42 | spring.redis.jedis.pool.max-idle=8 43 | # 连接池中的最小空闲连接 44 | spring.redis.jedis.pool.min-idle=0 45 | # 连接超时时间(毫秒) 46 | spring.redis.timeout=5000ms 47 | 48 | # 文件上传目录,这里需要注意文件夹后面必须得带上斜杠,否则会出现404的问题 49 | file.uploadFolder=D:/images/ 50 | #静态文件访问路劲 51 | spring.resources.static-locations=classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/,file:${file.uploadFolder} 52 | # linux下的文件路径配置 53 | # file.uploadFolder=/usr/local/images 54 | spring.servlet.multipart.max-file-size=200MB 55 | spring.servlet.multipart.max-request-size=200MB 56 | #kakka配置 57 | spring.kafka.bootstrap-servers= 58 | spring.kafka.producer.retries=0 59 | spring.kafka.producer.batch-size=16384 60 | spring.kafka.producer.buffer-memory=33554432 61 | spring.kafka.producer.key-serializer=org.apache.kafka.common.serialization.StringSerializer 62 | spring.kafka.producer.value-serializer=org.apache.kafka.common.serialization.StringSerializer 63 | spring.kafka.consumer.group-id=orderList 64 | spring.kafka.consumer.auto-commit-interval=100 65 | spring.kafka.consumer.key-deserializer=org.apache.kafka.common.serialization.StringDeserializer 66 | spring.kafka.consumer.value-deserializer=org.apache.kafka.common.serialization.StringDeserializer 67 | #配置订阅主题 68 | kafka.topics=orderList 69 | #mongodb配置 70 | spring.data.mongodb.uri= 71 | #时间戳转换 72 | spring.jackson.time-zone=GMT+8 73 | spring.jackson.date-format=yyyy/MM/dd HH:mm:ss 74 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/framework/cframe.js: -------------------------------------------------------------------------------- 1 | $(function(){ 2 | 3 | $(window).load(function(){ 4 | cframeInit(); 5 | //后台首页的全屏功能的bug,如果不得不取出Iframe的大小变化后的监听事件。 6 | $(window).resize(function(){ 7 | cframeInit(); 8 | }); 9 | }); 10 | 11 | //公共form表单验证 12 | layui.use('form', function() { 13 | var form = layui.form; 14 | form.verify({ 15 | //数组的两个值分别代表:[正则匹配、匹配不符时的提示文字] 16 | 17 | //只能输入中文 18 | ZHCheck: [ 19 | /^[\u0391-\uFFE5]+$/ 20 | ,'只允许输入中文' 21 | ], 22 | //先非空,如果有内容则验证邮箱格式 23 | NEWEmail: function(value, item){ //value:表单的值、item:表单的DOM对象 24 | if(value != null && value != ""){ 25 | if(!/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(value)){ 26 | return '邮箱格式不正确'; 27 | } 28 | } 29 | }, 30 | //校验登录名是否重复 31 | LoginName:function(value,item){ 32 | var tag = submitcheck(value); 33 | if(!tag){ 34 | return "用户名已存在"; 35 | } 36 | }, 37 | //验证价格数字 38 | //^[1-9]\d*(.\d{1,2})?$ : 1-9开头,后跟是0-9,可以跟小数点,但小数点后要带上1-2位小数,类似2,2.0,2.1,2.22等 39 | //^0(.\d{1,2})?$ : 0开头,后可以跟小数点,小数点后要待上1-2位小数,类似0,0.22,0.1等 40 | PriceCheck:[ 41 | /(^[1-9]\d*(\.\d{1,2})?$)|(^0(\.\d{1,2})?$)/ 42 | ,'请按照标准价格格式输入,小数位可选择输入两位' 43 | ] 44 | //身份证号 45 | // identity: function(value, item){ //value:表单的值、item:表单的DOM对象 46 | // var reg1 = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/; 47 | // var reg2 = /^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}[0-9Xx]$/; 48 | // if(!reg1.test(value) $$ !reg2.test(value)){ 49 | // return '请输入正确的身份证号......'; 50 | // } 51 | // } 52 | 53 | }); 54 | }); 55 | }) 56 | 57 | //初始化页面 58 | //function cframeInit(){ 59 | // var fh = $('.mainIframe',parent.document).parents(".frameMain").find(".con").height(); 60 | // var ch = document.body.scrollHeight; 61 | // if(fh > ch){ 62 | // $('.mainIframe',parent.document).height(fh); 63 | // }else{ 64 | // $('.mainIframe',parent.document).height(ch); 65 | // } 66 | // $("#pages").css("top",(fh-55)+"px"); 67 | //} 68 | function cframeInit(){ 69 | var fh = $('.mainIframe',parent.document).parents(".frameMain").find(".con").height(); 70 | var ch = document.body.scrollHeight; 71 | $('.mainIframe',parent.document).height(fh); 72 | $("#pages").css("top",(fh-55)+"px"); 73 | } 74 | 75 | //商品图片放大 76 | function imgBig(_this){ 77 | _this.className = "imgBig"; 78 | _this.width = "200"; 79 | _this.height = "200"; 80 | } 81 | 82 | //商品图片放小 83 | function imgSmall(_this){ 84 | _this.className = "imgSmall"; 85 | _this.width = "20"; 86 | _this.height = "20"; 87 | } 88 | -------------------------------------------------------------------------------- /小白点餐/miniprogram/style/guide.wxss: -------------------------------------------------------------------------------- 1 | page { 2 | background: #f6f6f6; 3 | display: flex; 4 | flex-direction: column; 5 | justify-content: flex-start; 6 | } 7 | 8 | .list { 9 | margin-top: 40rpx; 10 | height: auto; 11 | width: 100%; 12 | background: #fff; 13 | padding: 0 40rpx; 14 | border: 1px solid rgba(0, 0, 0, 0.1); 15 | border-left: none; 16 | border-right: none; 17 | transition: all 300ms ease; 18 | display: flex; 19 | flex-direction: column; 20 | align-items: stretch; 21 | box-sizing: border-box; 22 | } 23 | 24 | .list-item { 25 | width: 100%; 26 | padding: 0; 27 | line-height: 104rpx; 28 | font-size: 34rpx; 29 | color: #007aff; 30 | border-top: 1px solid rgba(0, 0, 0, 0.1); 31 | display: flex; 32 | flex-direction: row; 33 | align-content: center; 34 | justify-content: space-between; 35 | box-sizing: border-box; 36 | } 37 | 38 | .list-item:first-child { 39 | border-top: none; 40 | } 41 | 42 | .list-item image { 43 | max-width: 100%; 44 | max-height: 20vh; 45 | margin: 20rpx 0; 46 | } 47 | 48 | .request-text { 49 | color: #222; 50 | padding: 20rpx 0; 51 | font-size: 24rpx; 52 | line-height: 36rpx; 53 | word-break: break-all; 54 | } 55 | 56 | .guide { 57 | width: 100%; 58 | padding: 40rpx; 59 | box-sizing: border-box; 60 | display: flex; 61 | flex-direction: column; 62 | } 63 | 64 | .guide .headline { 65 | font-size: 34rpx; 66 | font-weight: bold; 67 | color: #555; 68 | line-height: 40rpx; 69 | } 70 | 71 | .guide .p { 72 | margin-top: 20rpx; 73 | font-size: 28rpx; 74 | line-height: 36rpx; 75 | color: #666; 76 | } 77 | 78 | .guide .code { 79 | margin-top: 20rpx; 80 | font-size: 28rpx; 81 | line-height: 36rpx; 82 | color: #666; 83 | background: white; 84 | white-space: pre; 85 | } 86 | 87 | .guide .code-dark { 88 | margin-top: 20rpx; 89 | background: rgba(0, 0, 0, 0.8); 90 | padding: 20rpx; 91 | font-size: 28rpx; 92 | line-height: 36rpx; 93 | border-radius: 6rpx; 94 | color: #fff; 95 | white-space: pre 96 | } 97 | 98 | .guide image { 99 | max-width: 100%; 100 | } 101 | 102 | .guide .image1 { 103 | margin-top: 20rpx; 104 | max-width: 100%; 105 | width: 356px; 106 | height: 47px; 107 | } 108 | 109 | .guide .image2 { 110 | margin-top: 20rpx; 111 | width: 264px; 112 | height: 100px; 113 | } 114 | 115 | .guide .flat-image { 116 | height: 100px; 117 | } 118 | 119 | .guide .code-image { 120 | max-width: 100%; 121 | } 122 | 123 | .guide .copyBtn { 124 | width: 180rpx; 125 | font-size: 20rpx; 126 | margin-top: 16rpx; 127 | margin-left: 0; 128 | } 129 | 130 | .guide .nav { 131 | margin-top: 50rpx; 132 | display: flex; 133 | flex-direction: row; 134 | align-content: space-between; 135 | } 136 | 137 | .guide .nav .prev { 138 | margin-left: unset; 139 | } 140 | 141 | .guide .nav .next { 142 | margin-right: unset; 143 | } 144 | 145 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/lay/modules/tree.js: -------------------------------------------------------------------------------- 1 | /** layui-v1.0.7 MIT License By http://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var o=layui.jquery,a=layui.hint(),r="layui-tree-enter",i=function(e){this.options=e},t={arrow:["",""],checkbox:["",""],radio:["",""],branch:["",""],leaf:""};i.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)},i.prototype.tree=function(e,a){var r=this,i=r.options,n=a||i.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 i.check?''+("checkbox"===i.check?t.checkbox[0]:"radio"===i.check?t.radio[0]:"")+"":""}(),function(){return'"+(''+(l?n.spread?t.branch[1]:t.branch[0]:t.leaf)+"")+(""+(n.name||"未命名")+"")}(),"
  • "].join(""));l&&(s.append(c),r.tree(c,n.children)),e.append(s),"function"==typeof i.click&&r.click(s,n),r.spread(s,n),i.drag&&r.drag(s,n)})},i.prototype.click=function(e,o){var a=this,r=a.options;e.children("a").on("click",function(e){layui.stope(e),r.click(o)})},i.prototype.spread=function(e,o){var a=this,r=(a.options,e.children(".layui-tree-spread")),i=e.children("ul"),n=e.children("a"),l=function(){e.data("spread")?(e.data("spread",null),i.removeClass("layui-show"),r.html(t.arrow[0]),n.find(".layui-icon").html(t.branch[0])):(e.data("spread",!0),i.addClass("layui-show"),r.html(t.arrow[1]),n.find(".layui-icon").html(t.branch[1]))};i[0]&&(r.on("click",l),n.on("dblclick",l))},i.prototype.on=function(e){var a=this,i=a.options,t="layui-tree-drag";e.find("i").on("selectstart",function(e){return!1}),i.drag&&o(document).on("mousemove",function(e){var r=a.move;if(r.from){var i=(r.to,o('
    '));e.preventDefault(),o("."+t)[0]||o("body").append(i);var n=o("."+t)[0]?o("."+t):i;n.addClass("layui-show").html(r.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(r),e.to&&e.to.elem.children("a").removeClass(r),a.move={},o("."+t).remove())})},i.prototype.move={},i.prototype.drag=function(e,a){var i=this,t=(i.options,e.children("a")),n=function(){var t=o(this),n=i.move;n.from&&(n.to={item:a,elem:e},t.addClass(r))};t.on("mousedown",function(){var o=i.move;o.from={item:a,elem:e}}),t.on("mouseenter",n).on("mousemove",n).on("mouseleave",function(){var e=o(this),a=i.move;a.from&&(delete a.to,e.removeClass(r))})},e("tree",function(e){var r=new i(e=e||{}),t=o(e.elem);return t[0]?void r.init(t):a.error("layui.tree 没有找到"+e.elem+"元素")})}); -------------------------------------------------------------------------------- /小白点餐/miniprogram/pages/base/base.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | {{item.fname}} 10 | ¥{{item.fprice}} 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 总计:{{totalNumber}}件商品,共{{totalPrice}}元 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 返回购物车 31 | 清空购物车 32 | 33 | 34 | 35 | 36 | 37 | {{item.name}} 38 | {{item.price}} 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 57 | 58 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/templates/freemarker/orderList.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 菜品列表 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
    19 | 20 | 21 |
    22 |
    23 | 24 | 29 | 36 | 41 | 42 | 46 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /小白点餐/miniprogram/app.wxss: -------------------------------------------------------------------------------- 1 | /**app.wxss**/ 2 | .container { 3 | display: flex; 4 | flex-direction: column; 5 | align-items: center; 6 | box-sizing: border-box; 7 | } 8 | 9 | button { 10 | background: initial; 11 | } 12 | 13 | button:focus{ 14 | outline: 0; 15 | } 16 | 17 | button::after{ 18 | border: none; 19 | } 20 | 21 | 22 | page { 23 | background: #f6f6f6; 24 | display: flex; 25 | flex-direction: column; 26 | justify-content: flex-start; 27 | } 28 | 29 | .userinfo, .uploader, .tunnel { 30 | margin-top: 40rpx; 31 | height: 140rpx; 32 | width: 100%; 33 | background: #fff; 34 | border: 1px solid rgba(0, 0, 0, 0.1); 35 | border-left: none; 36 | border-right: none; 37 | display: flex; 38 | flex-direction: row; 39 | align-items: center; 40 | transition: all 300ms ease; 41 | } 42 | 43 | .userinfo-avatar { 44 | width: 100rpx; 45 | height: 100rpx; 46 | margin: 20rpx; 47 | border-radius: 50%; 48 | background-size: cover; 49 | background-color: white; 50 | } 51 | 52 | .userinfo-avatar:after { 53 | border: none; 54 | } 55 | 56 | .userinfo-nickname { 57 | font-size: 32rpx; 58 | color: #007aff; 59 | background-color: white; 60 | background-size: cover; 61 | } 62 | 63 | .userinfo-nickname::after { 64 | border: none; 65 | } 66 | 67 | .uploader, .tunnel { 68 | height: auto; 69 | padding: 0 0 0 40rpx; 70 | flex-direction: column; 71 | align-items: flex-start; 72 | box-sizing: border-box; 73 | } 74 | 75 | .uploader-text, .tunnel-text { 76 | width: 100%; 77 | line-height: 52px; 78 | font-size: 34rpx; 79 | color: #007aff; 80 | } 81 | 82 | .uploader-container { 83 | width: 100%; 84 | height: 400rpx; 85 | padding: 20rpx 20rpx 20rpx 0; 86 | display: flex; 87 | align-content: center; 88 | justify-content: center; 89 | box-sizing: border-box; 90 | border-top: 1px solid rgba(0, 0, 0, 0.1); 91 | } 92 | 93 | .uploader-image { 94 | width: 100%; 95 | height: 360rpx; 96 | } 97 | 98 | .tunnel { 99 | padding: 0 0 0 40rpx; 100 | } 101 | 102 | .tunnel-text { 103 | position: relative; 104 | color: #222; 105 | display: flex; 106 | flex-direction: row; 107 | align-content: center; 108 | justify-content: space-between; 109 | box-sizing: border-box; 110 | border-top: 1px solid rgba(0, 0, 0, 0.1); 111 | } 112 | 113 | .tunnel-text:first-child { 114 | border-top: none; 115 | } 116 | 117 | .tunnel-switch { 118 | position: absolute; 119 | right: 20rpx; 120 | top: -2rpx; 121 | } 122 | 123 | .disable { 124 | color: #888; 125 | } 126 | 127 | .service { 128 | position: fixed; 129 | right: 40rpx; 130 | bottom: 40rpx; 131 | width: 140rpx; 132 | height: 140rpx; 133 | border-radius: 50%; 134 | background: linear-gradient(#007aff, #0063ce); 135 | box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3); 136 | display: flex; 137 | align-content: center; 138 | justify-content: center; 139 | transition: all 300ms ease; 140 | } 141 | 142 | .service-button { 143 | position: absolute; 144 | top: 40rpx; 145 | } 146 | 147 | .service:active { 148 | box-shadow: none; 149 | } 150 | 151 | .request-text { 152 | padding: 20rpx 0; 153 | font-size: 24rpx; 154 | line-height: 36rpx; 155 | word-break: break-all; 156 | } 157 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/css/modules/layim/html/chatlog.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 聊天记录 9 | 10 | 11 | 14 | 15 | 16 | 17 |
    18 |
      19 |
      20 | 21 |
      22 | 23 | 24 | 33 | 34 | 38 | 39 | 40 | 41 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/js/base.js: -------------------------------------------------------------------------------- 1 | 2 | //图片加载失败后默认图片 3 | function errorImg(_this){ 4 | _this.src = '/static/res/images/imgError.png'; 5 | _this.onerror=null; 6 | } 7 | 8 | //身份证正面图片加载失败后默认图片 9 | function errorCardZMImg(_this){ 10 | _this.src = '/static/res/images/cardZMImgError.png'; 11 | _this.onerror=null; 12 | } 13 | 14 | //身份证反面图片加载失败后默认图片 15 | function errorCardFMImg(_this){ 16 | _this.src = '/static/res/images/cardFMImgError.png'; 17 | _this.onerror=null; 18 | } 19 | 20 | //营业执照图片加载失败后默认图片 21 | function errorYyzzImg(_this){ 22 | _this.src = '/static/res/images/yyzzImgError.png'; 23 | _this.onerror=null; 24 | } 25 | 26 | //2018年07月13日 新功能tips提示功能详细用途的提示栏 27 | function getTips(_this, str){ 28 | layer.tips(str , $(_this), { 29 | tips: [1, '#3595CC'], 30 | time: 0 31 | }); 32 | } 33 | 34 | //2019年01月04日 新功能tips提示功能,方向左 35 | function getLeftTips(_this, str){ 36 | layer.tips(str , $(_this), { 37 | tips: [4, '#000'], 38 | time: 0 39 | }); 40 | } 41 | 42 | //2019年01月04日 提示层 43 | function getMsg(str){ 44 | layer.msg(str); 45 | } 46 | 47 | //2018年07月20日 营业执照、身份证正反面放大看图功能 48 | function seeBigImg(_this){ 49 | var url = $(_this).attr("src"); 50 | layui.use('layer', function(){ 51 | var layer = layui.layer; 52 | 53 | layer.open({ 54 | type: 1, 55 | area: ['80%', '80%'], 56 | fixed: false, //不固定 57 | maxmin: true, 58 | content: '' 59 | }); 60 | }); 61 | } 62 | 63 | /***获取当前时间 - 开始***/ 64 | function getDate(){ 65 | var today=new Date(); 66 | var y=today.getFullYear(); 67 | var mo=today.getMonth()+1; 68 | var d=today.getDate(); 69 | var h=today.getHours(); 70 | var m=today.getMinutes(); 71 | var s=today.getSeconds();// 在小于10的数字前加一个‘0’ 72 | mo=checkTime(mo); 73 | d=checkTime(d); 74 | h=checkTime(h); 75 | m=checkTime(m); 76 | s=checkTime(s); 77 | return y+"/"+mo+"/"+d+"  "+h+":"+m+":"+s; 78 | } 79 | function checkTime(i){ 80 | if (i<10){ 81 | i="0" + i; 82 | } 83 | return i; 84 | } 85 | /***获取当前时间 - 结束***/ 86 | 87 | //判断IE 88 | function IEVersion() { 89 | var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串 90 | var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; //判断是否IE<11浏览器 91 | var isEdge = userAgent.indexOf("Edge") > -1 && !isIE; //判断是否IE的Edge浏览器 92 | var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1; 93 | if(isIE) { 94 | var reIE = new RegExp("MSIE (\\d+\\.\\d+);"); 95 | reIE.test(userAgent); 96 | var fIEVersion = parseFloat(RegExp["$1"]); 97 | if(fIEVersion == 7) { 98 | return 7; 99 | } else if(fIEVersion == 8) { 100 | return 8; 101 | } else if(fIEVersion == 9) { 102 | return 9; 103 | } else if(fIEVersion == 10) { 104 | return 10; 105 | } else { 106 | return 6;//IE版本<=7 107 | } 108 | } else if(isEdge) { 109 | return 'edge';//edge 110 | } else if(isIE11) { 111 | return 11; //IE11 112 | }else{ 113 | return -1;//不是ie浏览器 114 | } 115 | } -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/lay/modules/laypage.js: -------------------------------------------------------------------------------- 1 | /** layui-v1.0.7 MIT License By http://www.layui.com */ 2 | ;layui.define(function(a){"use strict";function t(a){new p(a)}var e=document,r="getElementById",n="getElementsByTagName",s=0,p=function(a){var t=this,e=t.config=a||{};e.item=s++,t.render(!0)};p.on=function(a,t,e){return a.attachEvent?a.attachEvent("on"+t,function(){e.call(a,window.even)}):a.addEventListener(t,e,!1),p},p.prototype.type=function(){var a=this.config;if("object"==typeof a.cont)return void 0===a.cont.length?2:3},p.prototype.view=function(){var a=this,t=a.config,e=[],r={};if(t.pages=0|t.pages,t.curr=0|t.curr||1,t.groups="groups"in t?0|t.groups:5,t.first="first"in t?t.first:"首页",t.last="last"in t?t.last:"末页",t.prev="prev"in t?t.prev:"上一页",t.next="next"in t?t.next:"下一页",t.pages<=1)return"";for(t.groups>t.pages&&(t.groups=t.pages),r.index=Math.ceil((t.curr+(t.groups>1&&t.groups!==t.pages?1:0))/(0===t.groups?1:t.groups)),t.curr>1&&t.prev&&e.push(''+t.prev+""),r.index>1&&t.first&&0!==t.groups&&e.push(''+t.first+""),r.poor=Math.floor((t.groups-1)/2),r.start=r.index>1?t.curr-r.poor:1,r.end=r.index>1?function(){var a=t.curr+(t.groups-r.poor-1);return a>t.pages?t.pages:a}():t.groups,r.end-r.start"+r.start+""):e.push(''+r.start+"");return t.pages>t.groups&&r.end'+t.last+""),r.flow=!t.prev&&0===t.groups,(t.curr!==t.pages&&t.next||r.flow)&&e.push(function(){return r.flow&&t.curr===t.pages?''+t.next+"":''+t.next+""}()),'
      '+e.join("")+function(){return t.skip?'到第 ':""}()+"
      "},p.prototype.jump=function(a){if(a){for(var t=this,e=t.config,r=a.children,s=a[n]("button")[0],i=a[n]("input")[0],u=0,o=r.length;u 2 | 3 | 4 | 5 | 修改菜品 6 | 7 | 8 | 9 | 10 | 11 | 12 |
      13 | 14 |
      15 | 16 |

      17 | 18 |
      19 | 20 |

      21 | 22 |
      23 | 24 |
      25 | 26 |

      27 |
      28 |
      29 | 30 | 31 |
      32 | 33 | 103 | 104 | -------------------------------------------------------------------------------- /小白点餐/miniprogram/components/chatroom/chatroom.wxss: -------------------------------------------------------------------------------- 1 | .chatroom { 2 | width: 100%; 3 | height: 100%; 4 | display: flex; 5 | flex-direction: column; 6 | } 7 | 8 | .chatroom .header { 9 | flex-basis: fit-content; 10 | display: flex; 11 | flex-direction: row; 12 | border-bottom: 1px solid #ddd; 13 | padding: 20rpx 0 30rpx; 14 | font-size: 30rpx; 15 | /* background: rgb(34, 187, 47); 16 | color: rgba(255, 255, 255, 1) */ 17 | /* font-family: 'Microsoft YaHei' */ 18 | } 19 | 20 | .chatroom .header .left { 21 | flex: 1; 22 | } 23 | 24 | .chatroom .header .middle { 25 | flex: 2; 26 | text-align: center; 27 | } 28 | 29 | .chatroom .header .right { 30 | flex: 1; 31 | } 32 | 33 | .chatroom .body { 34 | flex: 2; 35 | display: flex; 36 | flex-direction: column; 37 | background: rgb(237,237,237); 38 | padding-bottom: 16rpx; 39 | } 40 | 41 | .body .message { 42 | display: flex; 43 | flex-direction: row; 44 | position: relative; 45 | margin: 12rpx 0; 46 | } 47 | 48 | .body .message.message__self { 49 | flex-direction: row-reverse; 50 | } 51 | 52 | .body .message .avatar { 53 | position: relative; 54 | top: 5rpx; 55 | width: 60rpx; 56 | height: 60rpx; 57 | border-radius: 5rpx; 58 | margin: 15rpx; 59 | } 60 | 61 | .body .message .main { 62 | flex: 1; 63 | display: flex; 64 | flex-direction: column; 65 | align-items: flex-start; 66 | } 67 | 68 | .body .message.message__self .main { 69 | align-items: flex-end; 70 | } 71 | 72 | .body .message .nickname { 73 | font-size: 24rpx; 74 | color: #444; 75 | } 76 | 77 | .body .message .text-content { 78 | border: 1px solid transparent; 79 | border-radius: 3px; 80 | background-color: #fff; 81 | margin: 2px 0 0 0; 82 | padding: 4px 10px; 83 | font-size: 30rpx; 84 | display: inline-block; 85 | } 86 | 87 | .body .message.message__self .text-content { 88 | background-color: paleturquoise; 89 | } 90 | 91 | .body .message .text-wrapper { 92 | display: flex; 93 | flex-direction: row; 94 | align-items: center; 95 | max-width: 80%; 96 | } 97 | 98 | .body .message.message__self .text-wrapper .loading{ 99 | font-size: 16rpx; 100 | margin-right: 18rpx; 101 | } 102 | 103 | .body .message .image-wrapper { 104 | display: flex; 105 | flex-direction: row; 106 | align-items: center; 107 | } 108 | 109 | .body .message .image-content { 110 | max-width: 240rpx; 111 | max-height: 240rpx; 112 | } 113 | 114 | .body .message.message__self .image-wrapper .loading { 115 | font-size: 20rpx; 116 | margin-right: 18rpx; 117 | } 118 | 119 | .chatroom .footer { 120 | flex-basis: fit-content; 121 | display: flex; 122 | flex-direction: row; 123 | border-top: 1px solid #ddd; 124 | font-size: 10rpx; 125 | padding: 20rpx 30rpx; 126 | background: rgb(246,246,246); 127 | } 128 | 129 | .chatroom .footer .message-sender { 130 | flex: 1; 131 | display: flex; 132 | flex-direction: row; 133 | } 134 | 135 | .message-sender .text-input { 136 | flex: 1; 137 | font-size: 16px; 138 | border: 1px solid transparent; 139 | border-radius: 5px; 140 | padding: 3px 6px; 141 | margin: 0 10px 0 5px; 142 | background: #fff; 143 | } 144 | 145 | .message-sender .btn-send-image { 146 | width: 50rpx; 147 | height: 50rpx; 148 | align-self: center; 149 | } 150 | 151 | button { 152 | font-size: 30rpx; 153 | } 154 | 155 | button.userinfo { 156 | background: darkturquoise; 157 | color: aliceblue; 158 | padding: 0 100rpx; 159 | border: 1px solid #ddd; 160 | border-radius: 20px; 161 | } 162 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/templates/freemarker/foodList.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 菜品列表 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
      19 | 20 | 21 |
      22 |
      23 | 24 | 29 | 32 | 33 | 34 | 35 | 112 | 113 | 114 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/templates/freemarker/managerList.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 管理员列表 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
      19 | 20 | 21 |
      22 |
      23 | 24 | 28 | 29 | 37 | 38 | 113 | 114 | 115 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/templates/freemarker/updateFood.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 添加菜品 6 | 7 | 8 | 9 | 10 | 11 | 12 |
      13 | 14 |
      15 | 16 |

      17 | 18 |
      19 | 20 |

      21 | 22 | 23 |
      24 | 25 |
      26 | 27 |

      28 |
      29 |
      30 | 31 | 32 |
      33 | 34 | 107 | 108 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/lay/modules/carousel.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.2.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var i=layui.$,n=(layui.hint(),layui.device(),{config:{},set:function(e){var n=this;return n.config=i.extend({},n.config,e),n},on:function(e,i){return layui.onevent.call(this,t,e,i)}}),t="carousel",a="layui-this",l=">*[carousel-item]>*",o="layui-carousel-left",r="layui-carousel-right",d="layui-carousel-prev",s="layui-carousel-next",u="layui-carousel-arrow",c="layui-carousel-ind",m=function(e){var t=this;t.config=i.extend({},t.config,n.config,e),t.render()};m.prototype.config={width:"600px",height:"280px",full:!1,arrow:"hover",indicator:"inside",autoplay:!0,interval:3e3,anim:"",trigger:"click",index:0},m.prototype.render=function(){var e=this,n=e.config;n.elem=i(n.elem),n.elem[0]&&(e.elemItem=n.elem.find(l),n.index<0&&(n.index=0),n.index>=e.elemItem.length&&(n.index=e.elemItem.length-1),n.interval<800&&(n.interval=800),n.full?n.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):n.elem.css({width:n.width,height:n.height}),n.elem.attr("lay-anim",n.anim),e.elemItem.eq(n.index).addClass(a),e.elemItem.length<=1||(e.indicator(),e.arrow(),e.autoplay(),e.events()))},m.prototype.reload=function(e){var n=this;clearInterval(n.timer),n.config=i.extend({},n.config,e),n.render()},m.prototype.prevIndex=function(){var e=this,i=e.config,n=i.index-1;return n<0&&(n=e.elemItem.length-1),n},m.prototype.nextIndex=function(){var e=this,i=e.config,n=i.index+1;return n>=e.elemItem.length&&(n=0),n},m.prototype.addIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index+e,n.index>=i.elemItem.length&&(n.index=0)},m.prototype.subIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index-e,n.index<0&&(n.index=i.elemItem.length-1)},m.prototype.autoplay=function(){var e=this,i=e.config;i.autoplay&&(e.timer=setInterval(function(){e.slide()},i.interval))},m.prototype.arrow=function(){var e=this,n=e.config,t=i(['",'"].join(""));n.elem.attr("lay-arrow",n.arrow),n.elem.find("."+u)[0]&&n.elem.find("."+u).remove(),n.elem.append(t),t.on("click",function(){var n=i(this),t=n.attr("lay-type");e.slide(t)})},m.prototype.indicator=function(){var e=this,n=e.config,t=e.elemInd=i(['
        ',function(){var i=[];return layui.each(e.elemItem,function(e){i.push("")}),i.join("")}(),"
      "].join(""));n.elem.attr("lay-indicator",n.indicator),n.elem.find("."+c)[0]&&n.elem.find("."+c).remove(),n.elem.append(t),"updown"===n.anim&&t.css("margin-top",-(t.height()/2)),t.find("li").on("hover"===n.trigger?"mouseover":n.trigger,function(){var t=i(this),a=t.index();a>n.index?e.slide("add",a-n.index):a 2 | 3 | 4 | 5 | Layui 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
      15 |
      16 | 17 | 18 |
      19 |
      20 | 21 |
      22 | 23 |
      24 |

      25 |
      26 | 27 |
      28 | 29 |
      30 |

      31 |
      32 | 33 |
      34 | 35 |
      36 |
      37 | 38 |
      39 | 40 |
      41 | 42 |
      43 |
      44 |
      45 | 46 |
      47 | 54 |
      55 |
      56 |
      57 | 58 | 59 | 60 |
      61 | 62 |
      63 | 64 | 65 |
      66 |
      67 | 68 | 69 |
      70 |
      71 | 72 | 73 |
      74 |
      75 | 76 |
      77 |
      78 | 79 | 80 | 81 | 82 | 83 | 123 | 124 | 125 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/css/modules/layim/mobile/layim.css: -------------------------------------------------------------------------------- 1 | /** layui-v1.0.7 MIT License By http://www.layui.com */ 2 | .layim-chat-main,.layim-chat-main ul{overflow-x:hidden}html #layuicss-skinlayim-mobilecss{display:none;position:absolute;width:1989px}.layim-chat,.layim-chat-main,.layim-chat-title{position:fixed;left:0;right:0}.layim-chat{bottom:0;top:0;background-color:#eee}.layim-chat-title{top:0;height:50px;line-height:50px;text-align:center;background-color:#36373C;color:#fff;font-size:16px}.layim-chat-status{padding-left:5px;font-size:14px}.layim-chat-main{width:100%;bottom:85px;top:50px;padding:15px;overflow-y:auto;-webkit-box-sizing:border-box!important;-moz-box-sizing:border-box!important;box-sizing:border-box!important}.layim-chat-main[nonetitle]{top:0}.layim-chat-main ul li{position:relative;font-size:0;margin-bottom:10px;padding-left:60px;min-height:68px}.layim-chat-text,.layim-chat-user{display:inline-block;*display:inline;*zoom:1;vertical-align:top;font-size:14px}.layim-chat-user{position:absolute;left:3px}.layim-chat-user img{width:40px;height:40px;border-radius:100%}.layim-chat-user cite{position:absolute;left:60px;top:-2px;width:500px;line-height:24px;font-size:12px;white-space:nowrap;color:#999;text-align:left;font-style:normal}.layim-chat-user cite i{padding-left:15px;font-style:normal}.layim-chat-text{position:relative;min-height:22px;line-height:22px;margin-top:25px;padding:8px 15px;background-color:#fff;border-radius:3px;color:#333;word-break:break-all}.layim-chat-text:after{content:'';position:absolute;left:-10px;top:13px;width:0;height:0;border-style:solid dashed dashed;border-color:#fff transparent transparent;overflow:hidden;border-width:10px}.layim-chat-text a{color:#33DF83}.layim-chat-text img{max-width:100%;vertical-align:middle}.layim-chat-text .layui-layim-file,.layui-layim-file{display:block;text-align:center}.layim-chat-text .layui-layim-file{color:#333}.layui-layim-file:hover{opacity:.9}.layui-layim-file i{font-size:80px;line-height:80px}.layui-layim-file cite{display:block;line-height:20px;font-size:14px}.layim-chat-main ul .layim-chat-mine{text-align:right;padding-left:0;padding-right:60px}.layim-chat-mine .layim-chat-user{left:auto;right:3px}.layim-chat-mine .layim-chat-user cite{left:auto;right:60px;text-align:right}.layim-chat-mine .layim-chat-user cite i{padding-left:0;padding-right:15px}.layim-chat-mine .layim-chat-text{margin-left:0;text-align:left;background-color:#5FB878;color:#fff}.layim-chat-mine .layim-chat-text:after{left:auto;right:-10px;border-top-color:#5FB878}.layim-chat-mine .layim-chat-text a{color:#fff}.layim-chat-main ul .layim-chat-system{min-height:0;margin:20px 0 5px;padding:0}.layim-chat-system{margin:10px 0;text-align:center}.layim-chat-system span{display:inline-block;line-height:30px;padding:0 15px;border-radius:3px;background-color:#ddd;color:#fff;font-size:14px}.layim-chat-footer{position:fixed;bottom:0;left:10px;right:10px;height:80px}.layim-chat-send{display:-webkit-box;display:-webkit-flex;display:flex}.layim-chat-send input{-webkit-box-flex:1;-webkit-flex:1;flex:1;height:36px;padding-left:5px;border:0;background-color:#fff;border-radius:3px}.layim-chat-send button{border-radius:3px;height:36px;padding:0 10px;border:0;margin-left:10px;background-color:#5FB878;color:#fff}.layim-chat-tool{position:relative;width:100%;overflow-x:auto;padding:0;height:38px;line-height:38px;margin-top:5px;font-size:0;white-space:nowrap}.layim-chat-tool span{position:relative;margin:0 10px;display:inline-block;*display:inline;*zoom:1;vertical-align:top;font-size:24px;cursor:pointer}.layim-chat-tool .layim-tool-log{position:absolute;right:5px;font-size:14px}.layim-tool-log i{position:relative;top:2px;margin-right:5px;font-size:20px;color:#999}.layim-tool-image input{position:absolute;font-size:0;left:0;top:0;width:100%;height:100%;opacity:.01;filter:Alpha(opacity=1);cursor:pointer}.layim-layer{position:fixed;bottom:85px;left:10px;right:10px;margin:0 auto}.layui-layim-face{position:relative;max-height:180px;overflow:auto;padding:10px;font-size:0}.layui-layim-face li{cursor:pointer;display:inline-block;vertical-align:bottom;padding:5px 2px;text-align:center;width:10%;-webkit-box-sizing:border-box!important;-moz-box-sizing:border-box!important;box-sizing:border-box!important}.layui-layim-face li img{width:22px;height:22px} -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/templates/freemarker/changePassword.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 修改密码 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
      15 |
      16 | 17 | 18 |
      19 | 20 |
      21 | 22 |
      23 | 24 |
      25 |

      26 |
      27 | 28 |
      29 | 30 |
      31 |

      32 |
      33 | 34 |
      35 | 36 |
      37 | 38 | 39 |

      40 | 41 |
      42 |
      43 | 44 |
      45 |
      46 | 47 | 48 |
      49 | 50 | 51 | 52 | 53 | 54 | 94 | 128 | 129 | -------------------------------------------------------------------------------- /XBDCInterface/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.2.7.RELEASE 9 | 10 | 11 | com.hnit 12 | XBDCInterface 13 | 0.0.1-SNAPSHOT 14 | XBDCInterface 15 | Demo project for Spring Boot 16 | 17 | 18 | 1.8 19 | 20 | 21 | 22 | 23 | org.springframework.boot 24 | spring-boot-starter-web 25 | 26 | 27 | org.springframework.boot 28 | spring-boot-starter-tomcat 29 | 30 | 31 | 32 | 33 | org.springframework.boot 34 | spring-boot-starter-undertow 35 | 36 | 37 | org.springframework.boot 38 | spring-boot-starter-test 39 | 40 | 41 | 42 | mysql 43 | mysql-connector-java 44 | 5.1.38 45 | 46 | 47 | 48 | org.mybatis.spring.boot 49 | mybatis-spring-boot-starter 50 | 2.0.0 51 | 52 | 53 | org.mybatis.generator 54 | mybatis-generator-core 55 | 1.3.2 56 | 57 | 58 | org.springframework.boot 59 | spring-boot-starter-test 60 | test 61 | 62 | 63 | org.junit.vintage 64 | junit-vintage-engine 65 | 66 | 67 | 68 | 69 | org.springframework.boot 70 | spring-boot-devtools 71 | true 72 | 73 | 74 | org.springframework.boot 75 | spring-boot-starter-data-mongodb 76 | 77 | 78 | 79 | 80 | org.projectlombok 81 | lombok 82 | 1.18.0 83 | 84 | 85 | 86 | org.springframework.kafka 87 | spring-kafka 88 | 89 | 90 | 91 | com.alibaba 92 | fastjson 93 | 1.2.62 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | org.springframework.boot 102 | spring-boot-maven-plugin 103 | 104 | 105 | 106 | 107 | org.mybatis.generator 108 | mybatis-generator-maven-plugin 109 | 1.3.2 110 | 111 | 112 | 113 | mysql 114 | mysql-connector-java 115 | 5.1.6 116 | 117 | 118 | 119 | 120 | 121 | true 122 | 123 | true 124 | 125 | 126 | 127 | 128 | 129 | src/main/java 130 | 131 | **/*.xml 132 | 133 | true 134 | 135 | 136 | 137 | 138 | 139 | -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/lay/modules/element.js: -------------------------------------------------------------------------------- 1 | /** layui-v1.0.7 MIT License By http://www.layui.com */ 2 | ;layui.define("jquery",function(i){"use strict";var t=layui.jquery,a=(layui.hint(),layui.device()),e="element",l="layui-this",n="layui-show",s=function(){this.config={}};s.prototype.set=function(i){var a=this;return t.extend(!0,a.config,i),a},s.prototype.on=function(i,t){return layui.onevent(e,i,t)},s.prototype.tabAdd=function(i,a){var e=t(".layui-tab[lay-filter="+i+"]"),l=e.children(".layui-tab-title"),n=e.children(".layui-tab-content");return l.append("
    • "+(a.title||"unnaming")+"
    • "),n.append('
      '+(a.content||"")+"
      "),y.tabAuto(),this},s.prototype.tabDelete=function(i,a){var e=t(".layui-tab[lay-filter="+i+"]"),l=e.children(".layui-tab-title").find(">li").eq(a);return y.tabDelete(null,l),this},s.prototype.tabChange=function(i,a){var e=t(".layui-tab[lay-filter="+i+"]"),l=e.children(".layui-tab-title").find(">li").eq(a);return y.tabClick(null,a,l),this};var o=".layui-nav",c="layui-nav-item",r="layui-nav-bar",u="layui-nav-tree",d="layui-nav-child",h="layui-nav-more",f="layui-anim layui-anim-upbit",y={tabClick:function(i,a,s){var o=s||t(this),a=a||o.index(),c=o.parents(".layui-tab"),r=c.children(".layui-tab-content").children(".layui-tab-item"),u=c.attr("lay-filter");o.addClass(l).siblings().removeClass(l),r.eq(a).addClass(n).siblings().removeClass(n),layui.event.call(this,e,"tab("+u+")",{elem:c,index:a})},tabDelete:function(i,a){var e=a||t(this).parent(),n=e.index(),s=e.parents(".layui-tab"),o=s.children(".layui-tab-content").children(".layui-tab-item");e.hasClass(l)&&(e.next()[0]?y.tabClick.call(e.next()[0],null,n+1):e.prev()[0]&&y.tabClick.call(e.prev()[0],null,n-1)),e.remove(),o.eq(n).remove()},tabAuto:function(){var i="layui-tab-more",e="layui-tab-bar",l="layui-tab-close",n=this;t(".layui-tab").each(function(){var s=t(this),o=s.children(".layui-tab-title"),c=(s.children(".layui-tab-content").children(".layui-tab-item"),'lay-stope="tabmore"'),r=t('');if(n===window&&8!=a.ie&&y.hideTabMore(!0),s.attr("lay-allowClose")&&o.find("li").each(function(){var i=t(this);if(!i.find("."+l)[0]){var a=t('');a.on("click",y.tabDelete),i.append(a)}}),o.prop("scrollWidth")>o.outerWidth()+1){if(o.find("."+e)[0])return;o.append(r),r.on("click",function(t){o[this.title?"removeClass":"addClass"](i),this.title=this.title?"":"收缩"})}else o.find("."+e).remove()})},hideTabMore:function(i){var a=t(".layui-tab-title");i!==!0&&"tabmore"===t(i.target).attr("lay-stope")||(a.removeClass("layui-tab-more"),a.find(".layui-tab-bar").attr("title",""))},clickThis:function(){var i=t(this),a=i.parents(o),n=a.attr("lay-filter");i.find("."+d)[0]||(a.find("."+l).removeClass(l),i.addClass(l),layui.event.call(this,e,"nav("+n+")",i))},clickChild:function(){var i=t(this),a=i.parents(o),n=a.attr("lay-filter");a.find("."+l).removeClass(l),i.addClass(l),layui.event.call(this,e,"nav("+n+")",i)},showChild:function(){var i=t(this),a=i.parents(o),e=i.parent(),l=i.siblings("."+d);a.hasClass(u)&&(l.removeClass(f),e["none"===l.css("display")?"addClass":"removeClass"](c+"ed"))}};s.prototype.init=function(i){var e={tab:function(){y.tabAuto.call({})},nav:function(){var i,e,l,s=200,p=function(o,c){var r=t(this),y=r.find("."+d);c.hasClass(u)?o.css({top:r.position().top,height:r.children("a").height(),opacity:1}):(y.addClass(f),o.css({left:r.position().left+parseFloat(r.css("marginLeft")),top:r.position().top+r.height()-5}),i=setTimeout(function(){o.css({width:r.width(),opacity:1})},a.ie&&a.ie<10?0:s),clearTimeout(l),"block"===y.css("display")&&clearTimeout(e),e=setTimeout(function(){y.addClass(n),r.find("."+h).addClass(h+"d")},300))};t(o).each(function(){var a=t(this),o=t(''),f=a.find("."+c);a.find("."+r)[0]||(a.append(o),f.on("mouseenter",function(){p.call(this,o,a)}).on("mouseleave",function(){a.hasClass(u)||(clearTimeout(e),e=setTimeout(function(){a.find("."+d).removeClass(n),a.find("."+h).removeClass(h+"d")},300))}),a.on("mouseleave",function(){clearTimeout(i),l=setTimeout(function(){a.hasClass(u)?o.css({height:0,top:o.position().top+o.height()/2,opacity:0}):o.css({width:0,left:o.position().left+o.width()/2,opacity:0})},s)})),f.each(function(){var i=t(this),a=i.find("."+d);if(a[0]&&!i.find("."+h)[0]){var e=i.children("a");e.append('')}i.off("click",y.clickThis).on("click",y.clickThis),i.children("a").off("click",y.showChild).on("click",y.showChild),a.children("dd").off("click",y.clickChild).on("click",y.clickChild)})})},breadcrumb:function(){var i=".layui-breadcrumb";t(i).each(function(){var i=t(this),a=i.attr("lay-separator")||">",e=i.find("a");e.find(".layui-box")[0]||(e.each(function(i){i!==e.length-1&&t(this).append(''+a+"")}),i.css("visibility","visible"))})}};return layui.each(e,function(i,t){t()})};var p=new s,b=t(document);p.init();var v=".layui-tab-title li";b.on("click",v,y.tabClick),b.on("click",y.hideTabMore),t(window).on("resize",y.tabAuto),i(e,function(i){return p.set(i)})}); -------------------------------------------------------------------------------- /xiaobaidiancan/src/main/resources/static/layui/lay/modules/form.js: -------------------------------------------------------------------------------- 1 | /** layui-v1.0.7 MIT License By http://www.layui.com */ 2 | ;layui.define("layer",function(e){"use strict";var i=layui.jquery,a=layui.layer,t=layui.hint(),n=layui.device(),l="form",s=".layui-form",c="layui-this",r="layui-disabled",u=function(){this.config={verify:{required:[/[\S]+/,"必填项不能为空"],phone:[/^1\d{10}$/,"请输入正确的手机号"],email:[/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/,"邮箱格式不正确"],url:[/(^#)|(^http(s*):\/\/[^\s]+\.[^\s]+)/,"链接格式不正确"],number:[/^\d+$/,"只能填写数字"],date:[/^(\d{4})[-\/](\d{1}|0\d{1}|1[0-2])([-\/](\d{1}|0\d{1}|[1-2][0-9]|3[0-1]))*$/,"日期格式不正确"],identity:[/(^\d{15}$)|(^\d{17}(x|X|\d)$)/,"请输入正确的身份证号"]}}};u.prototype.set=function(e){var a=this;return i.extend(!0,a.config,e),a},u.prototype.verify=function(e){var a=this;return i.extend(!0,a.config.verify,e),a},u.prototype.on=function(e,i){return layui.onevent(l,e,i)},u.prototype.render=function(e){var a=this,n={select:function(){var e="请选择",a="layui-form-select",t="layui-select-title",n=i(s).find("select"),u=function(e,n){i(e.target).parent().hasClass(t)&&!n||i("."+a).removeClass(a+"ed")},o=function(e,n){var s=i(this),o=e.find("."+t);n||(o.on("click",function(i){e.hasClass(a+"ed")?e.removeClass(a+"ed"):(u(i,!0),e.addClass(a+"ed"))}),e.find("dl>dd").on("click",function(){var e=i(this),a=e.attr("lay-value"),t=s.attr("lay-filter");return!e.hasClass(r)&&(s.val(a).removeClass("layui-form-danger"),o.find("input").val(e.text()),e.addClass(c).siblings().removeClass(c),void layui.event(l,"select("+t+")",{elem:s[0],value:a}))}),e.find("dl>dt").on("click",function(e){return!1}),i(document).off("click",u).on("click",u))};n.each(function(n,l){var s=i(this),u=s.next("."+a),d=this.disabled,f=l.value,y=i(l.options[l.selectedIndex]),v=i(['
      ','
      ','
      ','
      '+function(e){var i=[];return layui.each(e,function(e,a){(0!==e||a.value)&&("optgroup"===a.tagName.toLowerCase()?i.push("
      "+a.label+"
      "):i.push('
      '+a.innerHTML+"
      "))}),i.join("")}(s.find("*"))+"
      ","
      "].join(""));u[0]&&u.remove(),s.after(v),o.call(this,v,d)})},checkbox:function(){var e={checkbox:["layui-form-checkbox","layui-form-checked","checkbox"],_switch:["layui-form-switch","layui-form-onswitch","switch"]},a=i(s).find("input[type=checkbox]"),t=function(e,a){var t=i(this);e.on("click",function(){var i=t.attr("lay-filter");t[0].disabled||(t[0].checked?(t[0].checked=!1,e.removeClass(a[1])):(t[0].checked=!0,e.addClass(a[1])),layui.event(l,a[2]+"("+i+")",{elem:t[0],value:t[0].value}))})};a.each(function(a,n){var l=i(this),s=l.attr("lay-skin"),c=this.disabled;"switch"===s&&(s="_"+s);var u=e[s]||e.checkbox,o=l.next("."+u[0]),d=i(['
      ',{_switch:""}[s]||""+(n.title||"勾选")+'',"
      "].join(""));o[0]&&o.remove(),l.after(d),t.call(this,d,u)})},radio:function(){var e="layui-form-radio",a=["",""],t=i(s).find("input[type=radio]"),n=function(t){var n=i(this),c="layui-anim-scaleSpring";t.on("click",function(){var r=n[0].name,u=n.parents(s),o=n.attr("lay-filter"),d=u.find("input[name="+r.replace(/(\.|#|\[|\])/g,"\\$1")+"]");n[0].disabled||(layui.each(d,function(){var t=i(this).next("."+e);this.checked=!1,t.removeClass(e+"ed"),t.find(".layui-icon").removeClass(c).html(a[1])}),n[0].checked=!0,t.addClass(e+"ed"),t.find(".layui-icon").addClass(c).html(a[0]),layui.event(l,"radio("+o+")",{elem:n[0],value:n[0].value}))})};t.each(function(t,l){var s=i(this),c=s.next("."+e),u=this.disabled,o=i(['
      ',''+a[l.checked?0:1]+"",""+(l.title||"未命名")+"","
      "].join(""));c[0]&&c.remove(),s.after(o),n.call(this,o)})}};return e?n[e]?n[e]():t.error("不支持的"+e+"表单渲染"):layui.each(n,function(e,i){i()}),a};var o=function(){var e=i(this),t=d.config.verify,c=null,r="layui-form-danger",u={},o=e.parents(s),f=o.find("*[lay-verify]"),y=e.parents("form")[0],v=o.find("input,select,textarea"),h=e.attr("lay-filter");return layui.each(f,function(e,l){var s=i(this),u=s.attr("lay-verify"),o="",d=s.val(),f="function"==typeof t[u];if(s.removeClass(r),t[u]&&(f?o=t[u](d,l):!t[u][0].test(d)))return a.msg(o||t[u][1],{icon:5,shift:6}),n.android||n.ios||l.focus(),s.addClass(r),c=!0}),!c&&(layui.each(v,function(e,i){i.name&&(/^checkbox|radio$/.test(i.type)&&!i.checked||(u[i.name]=i.value))}),layui.event.call(this,l,"submit("+h+")",{elem:this,form:y,field:u}))},d=new u,f=i(document);d.render(),f.on("reset",s,function(){setTimeout(function(){d.render()},50)}),f.on("submit",s,o).on("click","*[lay-submit]",o),e(l,function(e){return d.set(e)})}); --------------------------------------------------------------------------------