├── .gitignore ├── .idea └── .gitignore ├── README.md ├── assets ├── Snipaste_2023-08-31_15-51-07-1693469094126.png ├── Snipaste_2023-08-31_15-51-07.png ├── Snipaste_2023-08-31_15-51-41.png ├── Snipaste_2023-08-31_15-51-58.png ├── Snipaste_2023-08-31_15-53-18.png ├── Snipaste_2023-08-31_15-54-08.png ├── Snipaste_2023-08-31_15-56-10.png ├── Snipaste_2023-08-31_15-56-34.png ├── Snipaste_2023-08-31_15-57-53.png ├── image-20230831160829756.png └── image-20230831160908186.png ├── pom.xml └── src └── main ├── java └── com │ ├── config │ └── MyMetaObjectHandler.java │ ├── controller │ ├── DiscusstesemeishiController.java │ ├── NewsController.java │ ├── QuxiaopeisongController.java │ ├── StoreupController.java │ └── UserController.java │ ├── dao │ ├── DingdanxinxiDao.java │ ├── NewsDao.java │ ├── QuxiaopeisongDao.java │ └── SongdatongzhiDao.java │ ├── entity │ ├── DingdanxinxiEntity.java │ ├── MeishifenleiEntity.java │ ├── PeisongyuanEntity.java │ └── QuxiaopeisongEntity.java │ └── service │ ├── NewsService.java │ ├── PeisongyuanService.java │ ├── SongdatongzhiService.java │ ├── TesemeishiService.java │ └── impl │ ├── DingdanxinxiServiceImpl.java │ ├── MeishifenleiServiceImpl.java │ ├── PeisongyuanServiceImpl.java │ └── SongdatongzhiServiceImpl.java ├── resources ├── config.properties ├── log4j.properties ├── mapper │ ├── DingdanxinxiDao.xml │ ├── NewsDao.xml │ ├── PeisongjiedanDao.xml │ └── StoreupDao.xml ├── mybatis │ └── mybatis-config.xml └── spring │ ├── spring-mvc.xml │ ├── spring-mybatis.xml │ └── spring.xml └── webapp ├── WEB-INF ├── pages │ ├── common │ │ └── include.jsp │ ├── index.jsp │ └── save.jsp └── web.xml ├── front ├── css │ ├── bootstrap.min.css │ ├── canvas-bg-1.css │ ├── canvas-bg-2.css │ ├── canvas-bg-3.css │ ├── canvas-bg-4.css │ ├── canvas-bg-6.css │ ├── common.css │ ├── style.css │ ├── swiper.min.css │ └── theme.css ├── elementui │ ├── elementui.css │ ├── elementui.js │ └── fonts │ │ ├── element-icons.ttf │ │ └── element-icons.woff ├── img │ ├── jianshe.png │ ├── jiaotong.png │ ├── nongye.png │ ├── now.png │ ├── seckilling.jpg │ ├── select.png │ ├── unselect.png │ ├── weixin.png │ ├── yuan.png │ ├── zhifubao.png │ └── zhongguo.png ├── index.jsp └── js │ ├── bootstrap.AMapPositionPicker.js │ ├── bootstrap.min.js │ ├── canvas-bg-web-1.js │ ├── canvas-bg-web-2.js │ ├── canvas-bg-web-3.js │ ├── canvas-bg-web-4.js │ ├── canvas-bg-web-5.js │ ├── config.js │ ├── jquery.js │ ├── swiper.min.js │ ├── utils.js │ ├── validate.js │ └── vue.js ├── index.jsp └── jsp ├── login.jsp ├── pay.jsp ├── static ├── crossBtnControl.js ├── foot.jsp ├── getRoleButtons.js ├── head.jsp ├── logout.jsp ├── md5.js ├── myInfo.js ├── setMenu.js ├── setMenu.js.bak ├── toLogin.jsp ├── topNav.jsp ├── topNav.jsp.bak └── utils.js └── utils ├── baseUrl.jsp └── menu.jsp /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled class file 2 | *.class 3 | 4 | # Log file 5 | *.log 6 | 7 | # BlueJ files 8 | *.ctxt 9 | 10 | # Mobile Tools for Java (J2ME) 11 | .mtj.tmp/ 12 | 13 | # Package Files # 14 | *.jar 15 | *.war 16 | *.nar 17 | *.ear 18 | *.zip 19 | *.tar.gz 20 | *.rar 21 | 22 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 23 | hs_err_pid* 24 | replay_pid* 25 | -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Editor-based HTTP Client requests 5 | /httpRequests/ 6 | # Datasource local storage ignored files 7 | /dataSources/ 8 | /dataSources.local.xml 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## 2 | >【项目特色】 3 | > 4 | >- **在线客服** 5 | >- **接单**,配送员可以看到所有订单,进行接单抢单 6 | >- **送达通知**,配送员送到之后,会向用户发送配送通知 7 | >- **数量预警**,当库存少于指定数目会发送预警,确保及时供货 8 | >- **QQ:3270728362** 9 | 10 | 11 | 12 | ## 简介 13 | 14 | **基于SSM的点餐外卖配送系统** 15 | 16 | - 开发语言:Java 17 | - 数据库:MySQL 18 | - 技术:Spring+SpringMVC+MyBatis+ElementUI 19 | - 工具:IDEA/Ecilpse、Navicat、Maven 20 | 21 | ## 功能描述 22 | 23 | **角色**:管理员、用户、配送员 24 | 25 | - 用户的功能及权限 用户登录注册后,进入系统对个人中心,订单信息管理,订单取消管理,配送接单管理,取消配送管理,送达通知管理等功能进行操作管理。 26 | - 配送员的功能及权限 用户登录注册后,进入系统对个人中心,订单信息管理,配送接单管理,取消配送管理,送达通知管理等功能进行操作管理。 27 | - 管理员的功能及权限 用户信息的添加和管理,校园外卖配送详细信息添加和管理和文档信息添加和管理以及网站信息管理,这些都是管理员的功能。 28 | 29 | ## 系统展示 30 | 31 | **前台** 32 | 33 | >外卖食物详情,可以点赞以及不喜欢踩一下,并且可以收藏。 34 | 35 | 36 | 37 | >我的收藏 38 | 39 | 40 | 41 | >在线客服 42 | 43 | 44 | 45 | > 用户配送通知,可以看到自己的外卖配送情况。 46 | 47 |  48 | 49 | >配送员可以看到所有订单,进行接单抢单 50 | 51 |  52 | 53 | > 管理员功能 54 | 55 |  56 | 57 |  58 | 59 |  60 | 61 | ## 相关文档 62 | 63 | > 相关文档PPT也是完整的,需要的可以联系我。 64 | 65 |  66 | 67 |  -------------------------------------------------------------------------------- /assets/Snipaste_2023-08-31_15-51-07-1693469094126.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsxj97/order-and-delivery-system/35b9df99f78e84a972d3905b742cdb243c667d28/assets/Snipaste_2023-08-31_15-51-07-1693469094126.png -------------------------------------------------------------------------------- /assets/Snipaste_2023-08-31_15-51-07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsxj97/order-and-delivery-system/35b9df99f78e84a972d3905b742cdb243c667d28/assets/Snipaste_2023-08-31_15-51-07.png -------------------------------------------------------------------------------- /assets/Snipaste_2023-08-31_15-51-41.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsxj97/order-and-delivery-system/35b9df99f78e84a972d3905b742cdb243c667d28/assets/Snipaste_2023-08-31_15-51-41.png -------------------------------------------------------------------------------- /assets/Snipaste_2023-08-31_15-51-58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsxj97/order-and-delivery-system/35b9df99f78e84a972d3905b742cdb243c667d28/assets/Snipaste_2023-08-31_15-51-58.png -------------------------------------------------------------------------------- /assets/Snipaste_2023-08-31_15-53-18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsxj97/order-and-delivery-system/35b9df99f78e84a972d3905b742cdb243c667d28/assets/Snipaste_2023-08-31_15-53-18.png -------------------------------------------------------------------------------- /assets/Snipaste_2023-08-31_15-54-08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsxj97/order-and-delivery-system/35b9df99f78e84a972d3905b742cdb243c667d28/assets/Snipaste_2023-08-31_15-54-08.png -------------------------------------------------------------------------------- /assets/Snipaste_2023-08-31_15-56-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsxj97/order-and-delivery-system/35b9df99f78e84a972d3905b742cdb243c667d28/assets/Snipaste_2023-08-31_15-56-10.png -------------------------------------------------------------------------------- /assets/Snipaste_2023-08-31_15-56-34.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsxj97/order-and-delivery-system/35b9df99f78e84a972d3905b742cdb243c667d28/assets/Snipaste_2023-08-31_15-56-34.png -------------------------------------------------------------------------------- /assets/Snipaste_2023-08-31_15-57-53.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsxj97/order-and-delivery-system/35b9df99f78e84a972d3905b742cdb243c667d28/assets/Snipaste_2023-08-31_15-57-53.png -------------------------------------------------------------------------------- /assets/image-20230831160829756.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsxj97/order-and-delivery-system/35b9df99f78e84a972d3905b742cdb243c667d28/assets/image-20230831160829756.png -------------------------------------------------------------------------------- /assets/image-20230831160908186.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsxj97/order-and-delivery-system/35b9df99f78e84a972d3905b742cdb243c667d28/assets/image-20230831160908186.png -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | com.jlwl 5 | jspmv0k22 6 | war 7 | 1.0-SNAPSHOT 8 | 9 | 10 | UTF-8 11 | 5.0.0.RELEASE 12 | 4.12 13 | 1.1.0 14 | 1.2.8 15 | 2.3 16 | 8.0.27 17 | 1.2.17 18 | 1.7.19 19 | 1.8.8 20 | 1.3.1 21 | 1.2 22 | 23 | 24 | 25 | 26 | 27 | junit 28 | junit 29 | ${junit.version} 30 | test 31 | 32 | 33 | 34 | 35 | org.springframework 36 | spring-core 37 | ${spring.version} 38 | jar 39 | compile 40 | 41 | 42 | org.springframework 43 | spring-context 44 | ${spring.version} 45 | jar 46 | compile 47 | 48 | 49 | org.springframework 50 | spring-context-support 51 | ${spring.version} 52 | jar 53 | compile 54 | 55 | 56 | org.springframework 57 | spring-tx 58 | ${spring.version} 59 | jar 60 | compile 61 | 62 | 63 | org.springframework 64 | spring-aop 65 | ${spring.version} 66 | jar 67 | compile 68 | 69 | 70 | org.springframework 71 | spring-beans 72 | ${spring.version} 73 | jar 74 | compile 75 | 76 | 77 | org.springframework 78 | spring-jdbc 79 | ${spring.version} 80 | jar 81 | compile 82 | 83 | 84 | 85 | 86 | org.springframework 87 | spring-web 88 | ${spring.version} 89 | jar 90 | compile 91 | 92 | 93 | org.springframework 94 | spring-webmvc 95 | ${spring.version} 96 | jar 97 | compile 98 | 99 | 100 | 101 | 102 | org.aspectj 103 | aspectjweaver 104 | ${aspectjweaver.version} 105 | 106 | 107 | 108 | 109 | commons-fileupload 110 | commons-fileupload 111 | ${fileupload.version} 112 | 113 | 114 | 115 | javax.servlet 116 | jstl 117 | ${jstl.version} 118 | 119 | 120 | 121 | 122 | com.baomidou 123 | mybatis-plus 124 | ${mybaitsplus.version} 125 | 126 | 127 | 128 | 129 | mysql 130 | mysql-connector-java 131 | ${mysql.version} 132 | 133 | 134 | com.microsoft.sqlserver 135 | sqljdbc4 136 | 4.0 137 | 4.0 138 | 139 | 140 | 141 | com.microsoft.sqlserver 142 | mssql-jdbc 143 | 6.2.0.jre8 144 | runtime 145 | 146 | 147 | 148 | com.alibaba 149 | druid 150 | ${druid.version} 151 | 152 | 153 | 154 | 155 | com.alibaba 156 | fastjson 157 | ${fastjson.version} 158 | 159 | 160 | 161 | 162 | log4j 163 | log4j 164 | ${log4j.version} 165 | 166 | 167 | org.slf4j 168 | slf4j-api 169 | ${slf4j.version} 170 | 171 | 172 | org.slf4j 173 | slf4j-log4j12 174 | ${slf4j.version} 175 | 176 | 177 | 178 | org.springframework 179 | spring-test 180 | ${spring.version} 181 | 182 | 183 | 184 | org.apache.commons 185 | commons-lang3 186 | 3.0 187 | 188 | 189 | 190 | javax.validation 191 | validation-api 192 | 2.0.1.Final 193 | 194 | 195 | 196 | commons-io 197 | commons-io 198 | 2.5 199 | 200 | 201 | 202 | cn.hutool 203 | hutool-all 204 | 4.0.12 205 | 206 | 207 | 208 | org.apache.tomcat.embed 209 | tomcat-embed-core 210 | 9.0.29 211 | 212 | 213 | 214 | 215 | commons-beanutils 216 | commons-beanutils 217 | 1.8.0 218 | 219 | 220 | 221 | 222 | com.fasterxml.jackson.core 223 | jackson-annotations 224 | 2.10.1 225 | 226 | 227 | 228 | com.fasterxml.jackson.core 229 | jackson-databind 230 | 2.10.1 231 | 232 | 233 | 234 | org.codehaus.jackson 235 | jackson-mapper-asl 236 | 1.9.13 237 | 238 | 239 | 240 | 241 | javax.servlet.jsp 242 | jsp-api 243 | 2.1 244 | provided 245 | 246 | 247 | 248 | 249 | com.baidu.aip 250 | java-sdk 251 | 4.4.1 252 | 253 | 254 | 255 | org.apache.poi 256 | poi 257 | 3.11 258 | 259 | 260 | 261 | org.apache.poi 262 | poi-ooxml 263 | 3.9 264 | 265 | 266 | 267 | 268 | org.apache.tomcat.embed 269 | tomcat-embed-jasper 270 | 9.0.27 271 | provided 272 | 273 | 274 | 275 | 276 | 277 | jspmv0k22 278 | 279 | 280 | org.apache.maven.plugins 281 | maven-compiler-plugin 282 | 283 | 1.7 284 | 1.7 285 | 286 | 287 | 288 | 289 | 290 | -------------------------------------------------------------------------------- /src/main/java/com/config/MyMetaObjectHandler.java: -------------------------------------------------------------------------------- 1 | package com.config; 2 | 3 | import java.util.Date; 4 | 5 | import org.apache.ibatis.reflection.MetaObject; 6 | 7 | import com.baomidou.mybatisplus.mapper.MetaObjectHandler; 8 | 9 | /** 10 | * 自定义填充处理器 11 | */ 12 | public class MyMetaObjectHandler extends MetaObjectHandler { 13 | 14 | @Override 15 | public void insertFill(MetaObject metaObject) { 16 | this.setFieldValByName("ctime", new Date(), metaObject); 17 | } 18 | 19 | @Override 20 | public boolean openUpdateFill() { 21 | return false; 22 | } 23 | 24 | @Override 25 | public void updateFill(MetaObject metaObject) { 26 | // 关闭更新填充、这里不执行 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/controller/DiscusstesemeishiController.java: -------------------------------------------------------------------------------- 1 | package com.controller; 2 | 3 | import java.text.SimpleDateFormat; 4 | import java.util.ArrayList; 5 | import java.util.Arrays; 6 | import java.util.Calendar; 7 | import java.util.Map; 8 | import java.util.HashMap; 9 | import java.util.Iterator; 10 | import java.util.Date; 11 | import java.util.List; 12 | import javax.servlet.http.HttpServletRequest; 13 | 14 | import com.utils.ValidatorUtils; 15 | import org.apache.commons.lang3.StringUtils; 16 | import org.springframework.beans.factory.annotation.Autowired; 17 | import org.springframework.format.annotation.DateTimeFormat; 18 | import org.springframework.web.bind.annotation.PathVariable; 19 | import org.springframework.web.bind.annotation.RequestBody; 20 | import org.springframework.web.bind.annotation.RequestMapping; 21 | import org.springframework.web.bind.annotation.RequestParam; 22 | import org.springframework.web.bind.annotation.RestController; 23 | import com.baomidou.mybatisplus.mapper.EntityWrapper; 24 | import com.baomidou.mybatisplus.mapper.Wrapper; 25 | import com.annotation.IgnoreAuth; 26 | 27 | import com.entity.DiscusstesemeishiEntity; 28 | import com.entity.view.DiscusstesemeishiView; 29 | 30 | import com.service.DiscusstesemeishiService; 31 | import com.service.TokenService; 32 | import com.utils.PageUtils; 33 | import com.utils.R; 34 | import com.utils.MD5Util; 35 | import com.utils.MPUtil; 36 | import com.utils.CommonUtil; 37 | import java.io.IOException; 38 | 39 | /** 40 | * 特色美食评论表 41 | * 后端接口 42 | * @author 43 | * @email 44 | * @date 2022-03-26 17:40:37 45 | */ 46 | @RestController 47 | @RequestMapping("/discusstesemeishi") 48 | public class DiscusstesemeishiController { 49 | @Autowired 50 | private DiscusstesemeishiService discusstesemeishiService; 51 | 52 | 53 | 54 | 55 | 56 | 57 | /** 58 | * 后端列表 59 | */ 60 | @RequestMapping("/page") 61 | public R page(@RequestParam Map params,DiscusstesemeishiEntity discusstesemeishi, 62 | HttpServletRequest request){ 63 | 64 | EntityWrapper ew = new EntityWrapper(); 65 | PageUtils page = discusstesemeishiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, discusstesemeishi), params), params)); 66 | request.setAttribute("data", page); 67 | return R.ok().put("data", page); 68 | } 69 | 70 | /** 71 | * 前端列表 72 | */ 73 | @IgnoreAuth 74 | @RequestMapping("/list") 75 | public R list(@RequestParam Map params,DiscusstesemeishiEntity discusstesemeishi, 76 | HttpServletRequest request){ 77 | EntityWrapper ew = new EntityWrapper(); 78 | PageUtils page = discusstesemeishiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, discusstesemeishi), params), params)); 79 | request.setAttribute("data", page); 80 | return R.ok().put("data", page); 81 | } 82 | 83 | /** 84 | * 列表 85 | */ 86 | @RequestMapping("/lists") 87 | public R list( DiscusstesemeishiEntity discusstesemeishi){ 88 | EntityWrapper ew = new EntityWrapper(); 89 | ew.allEq(MPUtil.allEQMapPre( discusstesemeishi, "discusstesemeishi")); 90 | return R.ok().put("data", discusstesemeishiService.selectListView(ew)); 91 | } 92 | 93 | /** 94 | * 查询 95 | */ 96 | @RequestMapping("/query") 97 | public R query(DiscusstesemeishiEntity discusstesemeishi){ 98 | EntityWrapper< DiscusstesemeishiEntity> ew = new EntityWrapper< DiscusstesemeishiEntity>(); 99 | ew.allEq(MPUtil.allEQMapPre( discusstesemeishi, "discusstesemeishi")); 100 | DiscusstesemeishiView discusstesemeishiView = discusstesemeishiService.selectView(ew); 101 | return R.ok("查询特色美食评论表成功").put("data", discusstesemeishiView); 102 | } 103 | 104 | /** 105 | * 后端详情 106 | */ 107 | @RequestMapping("/info/{id}") 108 | public R info(@PathVariable("id") Long id){ 109 | DiscusstesemeishiEntity discusstesemeishi = discusstesemeishiService.selectById(id); 110 | return R.ok().put("data", discusstesemeishi); 111 | } 112 | 113 | /** 114 | * 前端详情 115 | */ 116 | @IgnoreAuth 117 | @RequestMapping("/detail/{id}") 118 | public R detail(@PathVariable("id") Long id){ 119 | DiscusstesemeishiEntity discusstesemeishi = discusstesemeishiService.selectById(id); 120 | return R.ok().put("data", discusstesemeishi); 121 | } 122 | 123 | 124 | 125 | 126 | /** 127 | * 后端保存 128 | */ 129 | @RequestMapping("/save") 130 | public R save(@RequestBody DiscusstesemeishiEntity discusstesemeishi, HttpServletRequest request){ 131 | discusstesemeishi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue()); 132 | //ValidatorUtils.validateEntity(discusstesemeishi); 133 | 134 | discusstesemeishiService.insert(discusstesemeishi); 135 | return R.ok(); 136 | } 137 | 138 | /** 139 | * 前端保存 140 | */ 141 | @RequestMapping("/add") 142 | public R add(@RequestBody DiscusstesemeishiEntity discusstesemeishi, HttpServletRequest request){ 143 | discusstesemeishi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue()); 144 | //ValidatorUtils.validateEntity(discusstesemeishi); 145 | 146 | discusstesemeishiService.insert(discusstesemeishi); 147 | return R.ok(); 148 | } 149 | 150 | /** 151 | * 修改 152 | */ 153 | @RequestMapping("/update") 154 | public R update(@RequestBody DiscusstesemeishiEntity discusstesemeishi, HttpServletRequest request){ 155 | //ValidatorUtils.validateEntity(discusstesemeishi); 156 | discusstesemeishiService.updateById(discusstesemeishi);//全部更新 157 | return R.ok(); 158 | } 159 | 160 | 161 | /** 162 | * 删除 163 | */ 164 | @RequestMapping("/delete") 165 | public R delete(@RequestBody Long[] ids){ 166 | discusstesemeishiService.deleteBatchIds(Arrays.asList(ids)); 167 | return R.ok(); 168 | } 169 | 170 | /** 171 | * 提醒接口 172 | */ 173 | @RequestMapping("/remind/{columnName}/{type}") 174 | public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, 175 | @PathVariable("type") String type,@RequestParam Map map) { 176 | map.put("column", columnName); 177 | map.put("type", type); 178 | 179 | if(type.equals("2")) { 180 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); 181 | Calendar c = Calendar.getInstance(); 182 | Date remindStartDate = null; 183 | Date remindEndDate = null; 184 | if(map.get("remindstart")!=null) { 185 | Integer remindStart = Integer.parseInt(map.get("remindstart").toString()); 186 | c.setTime(new Date()); 187 | c.add(Calendar.DAY_OF_MONTH,remindStart); 188 | remindStartDate = c.getTime(); 189 | map.put("remindstart", sdf.format(remindStartDate)); 190 | } 191 | if(map.get("remindend")!=null) { 192 | Integer remindEnd = Integer.parseInt(map.get("remindend").toString()); 193 | c.setTime(new Date()); 194 | c.add(Calendar.DAY_OF_MONTH,remindEnd); 195 | remindEndDate = c.getTime(); 196 | map.put("remindend", sdf.format(remindEndDate)); 197 | } 198 | } 199 | 200 | Wrapper wrapper = new EntityWrapper(); 201 | if(map.get("remindstart")!=null) { 202 | wrapper.ge(columnName, map.get("remindstart")); 203 | } 204 | if(map.get("remindend")!=null) { 205 | wrapper.le(columnName, map.get("remindend")); 206 | } 207 | 208 | 209 | int count = discusstesemeishiService.selectCount(wrapper); 210 | return R.ok().put("count", count); 211 | } 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | } 220 | -------------------------------------------------------------------------------- /src/main/java/com/controller/NewsController.java: -------------------------------------------------------------------------------- 1 | package com.controller; 2 | 3 | import java.text.SimpleDateFormat; 4 | import java.util.ArrayList; 5 | import java.util.Arrays; 6 | import java.util.Calendar; 7 | import java.util.Map; 8 | import java.util.HashMap; 9 | import java.util.Iterator; 10 | import java.util.Date; 11 | import java.util.List; 12 | import javax.servlet.http.HttpServletRequest; 13 | 14 | import com.utils.ValidatorUtils; 15 | import org.apache.commons.lang3.StringUtils; 16 | import org.springframework.beans.factory.annotation.Autowired; 17 | import org.springframework.format.annotation.DateTimeFormat; 18 | import org.springframework.web.bind.annotation.PathVariable; 19 | import org.springframework.web.bind.annotation.RequestBody; 20 | import org.springframework.web.bind.annotation.RequestMapping; 21 | import org.springframework.web.bind.annotation.RequestParam; 22 | import org.springframework.web.bind.annotation.RestController; 23 | import com.baomidou.mybatisplus.mapper.EntityWrapper; 24 | import com.baomidou.mybatisplus.mapper.Wrapper; 25 | import com.annotation.IgnoreAuth; 26 | 27 | import com.entity.NewsEntity; 28 | import com.entity.view.NewsView; 29 | 30 | import com.service.NewsService; 31 | import com.service.TokenService; 32 | import com.utils.PageUtils; 33 | import com.utils.R; 34 | import com.utils.MD5Util; 35 | import com.utils.MPUtil; 36 | import com.utils.CommonUtil; 37 | import java.io.IOException; 38 | 39 | /** 40 | * 公告信息 41 | * 后端接口 42 | * @author 43 | * @email 44 | * @date 2022-03-26 17:40:36 45 | */ 46 | @RestController 47 | @RequestMapping("/news") 48 | public class NewsController { 49 | @Autowired 50 | private NewsService newsService; 51 | 52 | 53 | 54 | 55 | 56 | 57 | /** 58 | * 后端列表 59 | */ 60 | @RequestMapping("/page") 61 | public R page(@RequestParam Map params,NewsEntity news, 62 | HttpServletRequest request){ 63 | 64 | EntityWrapper ew = new EntityWrapper(); 65 | PageUtils page = newsService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, news), params), params)); 66 | request.setAttribute("data", page); 67 | return R.ok().put("data", page); 68 | } 69 | 70 | /** 71 | * 前端列表 72 | */ 73 | @IgnoreAuth 74 | @RequestMapping("/list") 75 | public R list(@RequestParam Map params,NewsEntity news, 76 | HttpServletRequest request){ 77 | EntityWrapper ew = new EntityWrapper(); 78 | PageUtils page = newsService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, news), params), params)); 79 | request.setAttribute("data", page); 80 | return R.ok().put("data", page); 81 | } 82 | 83 | /** 84 | * 列表 85 | */ 86 | @RequestMapping("/lists") 87 | public R list( NewsEntity news){ 88 | EntityWrapper ew = new EntityWrapper(); 89 | ew.allEq(MPUtil.allEQMapPre( news, "news")); 90 | return R.ok().put("data", newsService.selectListView(ew)); 91 | } 92 | 93 | /** 94 | * 查询 95 | */ 96 | @RequestMapping("/query") 97 | public R query(NewsEntity news){ 98 | EntityWrapper< NewsEntity> ew = new EntityWrapper< NewsEntity>(); 99 | ew.allEq(MPUtil.allEQMapPre( news, "news")); 100 | NewsView newsView = newsService.selectView(ew); 101 | return R.ok("查询公告信息成功").put("data", newsView); 102 | } 103 | 104 | /** 105 | * 后端详情 106 | */ 107 | @RequestMapping("/info/{id}") 108 | public R info(@PathVariable("id") Long id){ 109 | NewsEntity news = newsService.selectById(id); 110 | return R.ok().put("data", news); 111 | } 112 | 113 | /** 114 | * 前端详情 115 | */ 116 | @IgnoreAuth 117 | @RequestMapping("/detail/{id}") 118 | public R detail(@PathVariable("id") Long id){ 119 | NewsEntity news = newsService.selectById(id); 120 | return R.ok().put("data", news); 121 | } 122 | 123 | 124 | 125 | 126 | /** 127 | * 后端保存 128 | */ 129 | @RequestMapping("/save") 130 | public R save(@RequestBody NewsEntity news, HttpServletRequest request){ 131 | news.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue()); 132 | //ValidatorUtils.validateEntity(news); 133 | 134 | newsService.insert(news); 135 | return R.ok(); 136 | } 137 | 138 | /** 139 | * 前端保存 140 | */ 141 | @RequestMapping("/add") 142 | public R add(@RequestBody NewsEntity news, HttpServletRequest request){ 143 | news.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue()); 144 | //ValidatorUtils.validateEntity(news); 145 | 146 | newsService.insert(news); 147 | return R.ok(); 148 | } 149 | 150 | /** 151 | * 修改 152 | */ 153 | @RequestMapping("/update") 154 | public R update(@RequestBody NewsEntity news, HttpServletRequest request){ 155 | //ValidatorUtils.validateEntity(news); 156 | newsService.updateById(news);//全部更新 157 | return R.ok(); 158 | } 159 | 160 | 161 | /** 162 | * 删除 163 | */ 164 | @RequestMapping("/delete") 165 | public R delete(@RequestBody Long[] ids){ 166 | newsService.deleteBatchIds(Arrays.asList(ids)); 167 | return R.ok(); 168 | } 169 | 170 | /** 171 | * 提醒接口 172 | */ 173 | @RequestMapping("/remind/{columnName}/{type}") 174 | public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, 175 | @PathVariable("type") String type,@RequestParam Map map) { 176 | map.put("column", columnName); 177 | map.put("type", type); 178 | 179 | if(type.equals("2")) { 180 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); 181 | Calendar c = Calendar.getInstance(); 182 | Date remindStartDate = null; 183 | Date remindEndDate = null; 184 | if(map.get("remindstart")!=null) { 185 | Integer remindStart = Integer.parseInt(map.get("remindstart").toString()); 186 | c.setTime(new Date()); 187 | c.add(Calendar.DAY_OF_MONTH,remindStart); 188 | remindStartDate = c.getTime(); 189 | map.put("remindstart", sdf.format(remindStartDate)); 190 | } 191 | if(map.get("remindend")!=null) { 192 | Integer remindEnd = Integer.parseInt(map.get("remindend").toString()); 193 | c.setTime(new Date()); 194 | c.add(Calendar.DAY_OF_MONTH,remindEnd); 195 | remindEndDate = c.getTime(); 196 | map.put("remindend", sdf.format(remindEndDate)); 197 | } 198 | } 199 | 200 | Wrapper wrapper = new EntityWrapper(); 201 | if(map.get("remindstart")!=null) { 202 | wrapper.ge(columnName, map.get("remindstart")); 203 | } 204 | if(map.get("remindend")!=null) { 205 | wrapper.le(columnName, map.get("remindend")); 206 | } 207 | 208 | 209 | int count = newsService.selectCount(wrapper); 210 | return R.ok().put("count", count); 211 | } 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | } 220 | -------------------------------------------------------------------------------- /src/main/java/com/controller/QuxiaopeisongController.java: -------------------------------------------------------------------------------- 1 | package com.controller; 2 | 3 | import java.text.SimpleDateFormat; 4 | import java.util.ArrayList; 5 | import java.util.Arrays; 6 | import java.util.Calendar; 7 | import java.util.Map; 8 | import java.util.HashMap; 9 | import java.util.Iterator; 10 | import java.util.Date; 11 | import java.util.List; 12 | import javax.servlet.http.HttpServletRequest; 13 | 14 | import com.utils.ValidatorUtils; 15 | import org.apache.commons.lang3.StringUtils; 16 | import org.springframework.beans.factory.annotation.Autowired; 17 | import org.springframework.format.annotation.DateTimeFormat; 18 | import org.springframework.web.bind.annotation.PathVariable; 19 | import org.springframework.web.bind.annotation.RequestBody; 20 | import org.springframework.web.bind.annotation.RequestMapping; 21 | import org.springframework.web.bind.annotation.RequestParam; 22 | import org.springframework.web.bind.annotation.RestController; 23 | import com.baomidou.mybatisplus.mapper.EntityWrapper; 24 | import com.baomidou.mybatisplus.mapper.Wrapper; 25 | import com.annotation.IgnoreAuth; 26 | 27 | import com.entity.QuxiaopeisongEntity; 28 | import com.entity.view.QuxiaopeisongView; 29 | 30 | import com.service.QuxiaopeisongService; 31 | import com.service.TokenService; 32 | import com.utils.PageUtils; 33 | import com.utils.R; 34 | import com.utils.MD5Util; 35 | import com.utils.MPUtil; 36 | import com.utils.CommonUtil; 37 | import java.io.IOException; 38 | 39 | /** 40 | * 取消配送 41 | * 后端接口 42 | * @author 43 | * @email 44 | * @date 2022-03-26 17:40:36 45 | */ 46 | @RestController 47 | @RequestMapping("/quxiaopeisong") 48 | public class QuxiaopeisongController { 49 | @Autowired 50 | private QuxiaopeisongService quxiaopeisongService; 51 | 52 | 53 | 54 | 55 | 56 | 57 | /** 58 | * 后端列表 59 | */ 60 | @RequestMapping("/page") 61 | public R page(@RequestParam Map params,QuxiaopeisongEntity quxiaopeisong, 62 | HttpServletRequest request){ 63 | 64 | String tableName = request.getSession().getAttribute("tableName").toString(); 65 | if(tableName.equals("peisongyuan")) { 66 | quxiaopeisong.setPeisongzhanghao((String)request.getSession().getAttribute("username")); 67 | } 68 | if(tableName.equals("yonghu")) { 69 | quxiaopeisong.setYonghuzhanghao((String)request.getSession().getAttribute("username")); 70 | } 71 | EntityWrapper ew = new EntityWrapper(); 72 | PageUtils page = quxiaopeisongService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, quxiaopeisong), params), params)); 73 | request.setAttribute("data", page); 74 | return R.ok().put("data", page); 75 | } 76 | 77 | /** 78 | * 前端列表 79 | */ 80 | @IgnoreAuth 81 | @RequestMapping("/list") 82 | public R list(@RequestParam Map params,QuxiaopeisongEntity quxiaopeisong, 83 | HttpServletRequest request){ 84 | EntityWrapper ew = new EntityWrapper(); 85 | PageUtils page = quxiaopeisongService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, quxiaopeisong), params), params)); 86 | request.setAttribute("data", page); 87 | return R.ok().put("data", page); 88 | } 89 | 90 | /** 91 | * 列表 92 | */ 93 | @RequestMapping("/lists") 94 | public R list( QuxiaopeisongEntity quxiaopeisong){ 95 | EntityWrapper ew = new EntityWrapper(); 96 | ew.allEq(MPUtil.allEQMapPre( quxiaopeisong, "quxiaopeisong")); 97 | return R.ok().put("data", quxiaopeisongService.selectListView(ew)); 98 | } 99 | 100 | /** 101 | * 查询 102 | */ 103 | @RequestMapping("/query") 104 | public R query(QuxiaopeisongEntity quxiaopeisong){ 105 | EntityWrapper< QuxiaopeisongEntity> ew = new EntityWrapper< QuxiaopeisongEntity>(); 106 | ew.allEq(MPUtil.allEQMapPre( quxiaopeisong, "quxiaopeisong")); 107 | QuxiaopeisongView quxiaopeisongView = quxiaopeisongService.selectView(ew); 108 | return R.ok("查询取消配送成功").put("data", quxiaopeisongView); 109 | } 110 | 111 | /** 112 | * 后端详情 113 | */ 114 | @RequestMapping("/info/{id}") 115 | public R info(@PathVariable("id") Long id){ 116 | QuxiaopeisongEntity quxiaopeisong = quxiaopeisongService.selectById(id); 117 | return R.ok().put("data", quxiaopeisong); 118 | } 119 | 120 | /** 121 | * 前端详情 122 | */ 123 | @IgnoreAuth 124 | @RequestMapping("/detail/{id}") 125 | public R detail(@PathVariable("id") Long id){ 126 | QuxiaopeisongEntity quxiaopeisong = quxiaopeisongService.selectById(id); 127 | return R.ok().put("data", quxiaopeisong); 128 | } 129 | 130 | 131 | 132 | 133 | /** 134 | * 后端保存 135 | */ 136 | @RequestMapping("/save") 137 | public R save(@RequestBody QuxiaopeisongEntity quxiaopeisong, HttpServletRequest request){ 138 | quxiaopeisong.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue()); 139 | //ValidatorUtils.validateEntity(quxiaopeisong); 140 | 141 | quxiaopeisongService.insert(quxiaopeisong); 142 | return R.ok(); 143 | } 144 | 145 | /** 146 | * 前端保存 147 | */ 148 | @RequestMapping("/add") 149 | public R add(@RequestBody QuxiaopeisongEntity quxiaopeisong, HttpServletRequest request){ 150 | quxiaopeisong.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue()); 151 | //ValidatorUtils.validateEntity(quxiaopeisong); 152 | 153 | quxiaopeisongService.insert(quxiaopeisong); 154 | return R.ok(); 155 | } 156 | 157 | /** 158 | * 修改 159 | */ 160 | @RequestMapping("/update") 161 | public R update(@RequestBody QuxiaopeisongEntity quxiaopeisong, HttpServletRequest request){ 162 | //ValidatorUtils.validateEntity(quxiaopeisong); 163 | quxiaopeisongService.updateById(quxiaopeisong);//全部更新 164 | return R.ok(); 165 | } 166 | 167 | 168 | /** 169 | * 删除 170 | */ 171 | @RequestMapping("/delete") 172 | public R delete(@RequestBody Long[] ids){ 173 | quxiaopeisongService.deleteBatchIds(Arrays.asList(ids)); 174 | return R.ok(); 175 | } 176 | 177 | /** 178 | * 提醒接口 179 | */ 180 | @RequestMapping("/remind/{columnName}/{type}") 181 | public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, 182 | @PathVariable("type") String type,@RequestParam Map map) { 183 | map.put("column", columnName); 184 | map.put("type", type); 185 | 186 | if(type.equals("2")) { 187 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); 188 | Calendar c = Calendar.getInstance(); 189 | Date remindStartDate = null; 190 | Date remindEndDate = null; 191 | if(map.get("remindstart")!=null) { 192 | Integer remindStart = Integer.parseInt(map.get("remindstart").toString()); 193 | c.setTime(new Date()); 194 | c.add(Calendar.DAY_OF_MONTH,remindStart); 195 | remindStartDate = c.getTime(); 196 | map.put("remindstart", sdf.format(remindStartDate)); 197 | } 198 | if(map.get("remindend")!=null) { 199 | Integer remindEnd = Integer.parseInt(map.get("remindend").toString()); 200 | c.setTime(new Date()); 201 | c.add(Calendar.DAY_OF_MONTH,remindEnd); 202 | remindEndDate = c.getTime(); 203 | map.put("remindend", sdf.format(remindEndDate)); 204 | } 205 | } 206 | 207 | Wrapper wrapper = new EntityWrapper(); 208 | if(map.get("remindstart")!=null) { 209 | wrapper.ge(columnName, map.get("remindstart")); 210 | } 211 | if(map.get("remindend")!=null) { 212 | wrapper.le(columnName, map.get("remindend")); 213 | } 214 | 215 | String tableName = request.getSession().getAttribute("tableName").toString(); 216 | if(tableName.equals("peisongyuan")) { 217 | wrapper.eq("peisongzhanghao", (String)request.getSession().getAttribute("username")); 218 | } 219 | if(tableName.equals("yonghu")) { 220 | wrapper.eq("yonghuzhanghao", (String)request.getSession().getAttribute("username")); 221 | } 222 | 223 | int count = quxiaopeisongService.selectCount(wrapper); 224 | return R.ok().put("count", count); 225 | } 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | } 234 | -------------------------------------------------------------------------------- /src/main/java/com/controller/StoreupController.java: -------------------------------------------------------------------------------- 1 | package com.controller; 2 | 3 | import java.text.SimpleDateFormat; 4 | import java.util.ArrayList; 5 | import java.util.Arrays; 6 | import java.util.Calendar; 7 | import java.util.Map; 8 | import java.util.HashMap; 9 | import java.util.Iterator; 10 | import java.util.Date; 11 | import java.util.List; 12 | import javax.servlet.http.HttpServletRequest; 13 | 14 | import com.utils.ValidatorUtils; 15 | import org.apache.commons.lang3.StringUtils; 16 | import org.springframework.beans.factory.annotation.Autowired; 17 | import org.springframework.format.annotation.DateTimeFormat; 18 | import org.springframework.web.bind.annotation.PathVariable; 19 | import org.springframework.web.bind.annotation.RequestBody; 20 | import org.springframework.web.bind.annotation.RequestMapping; 21 | import org.springframework.web.bind.annotation.RequestParam; 22 | import org.springframework.web.bind.annotation.RestController; 23 | import com.baomidou.mybatisplus.mapper.EntityWrapper; 24 | import com.baomidou.mybatisplus.mapper.Wrapper; 25 | import com.annotation.IgnoreAuth; 26 | 27 | import com.entity.StoreupEntity; 28 | import com.entity.view.StoreupView; 29 | 30 | import com.service.StoreupService; 31 | import com.service.TokenService; 32 | import com.utils.PageUtils; 33 | import com.utils.R; 34 | import com.utils.MD5Util; 35 | import com.utils.MPUtil; 36 | import com.utils.CommonUtil; 37 | import java.io.IOException; 38 | 39 | /** 40 | * 收藏表 41 | * 后端接口 42 | * @author 43 | * @email 44 | * @date 2022-03-26 17:40:36 45 | */ 46 | @RestController 47 | @RequestMapping("/storeup") 48 | public class StoreupController { 49 | @Autowired 50 | private StoreupService storeupService; 51 | 52 | 53 | 54 | 55 | 56 | 57 | /** 58 | * 后端列表 59 | */ 60 | @RequestMapping("/page") 61 | public R page(@RequestParam Map params,StoreupEntity storeup, 62 | HttpServletRequest request){ 63 | if(!request.getSession().getAttribute("role").toString().equals("管理员")) { 64 | storeup.setUserid((Long)request.getSession().getAttribute("userId")); 65 | } 66 | 67 | EntityWrapper ew = new EntityWrapper(); 68 | PageUtils page = storeupService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, storeup), params), params)); 69 | request.setAttribute("data", page); 70 | return R.ok().put("data", page); 71 | } 72 | 73 | /** 74 | * 前端列表 75 | */ 76 | @RequestMapping("/list") 77 | public R list(@RequestParam Map params,StoreupEntity storeup, 78 | HttpServletRequest request){ 79 | if(!request.getSession().getAttribute("role").toString().equals("管理员")) { 80 | storeup.setUserid((Long)request.getSession().getAttribute("userId")); 81 | } 82 | 83 | EntityWrapper ew = new EntityWrapper(); 84 | PageUtils page = storeupService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, storeup), params), params)); 85 | request.setAttribute("data", page); 86 | return R.ok().put("data", page); 87 | } 88 | 89 | /** 90 | * 列表 91 | */ 92 | @RequestMapping("/lists") 93 | public R list( StoreupEntity storeup){ 94 | EntityWrapper ew = new EntityWrapper(); 95 | ew.allEq(MPUtil.allEQMapPre( storeup, "storeup")); 96 | return R.ok().put("data", storeupService.selectListView(ew)); 97 | } 98 | 99 | /** 100 | * 查询 101 | */ 102 | @RequestMapping("/query") 103 | public R query(StoreupEntity storeup){ 104 | EntityWrapper< StoreupEntity> ew = new EntityWrapper< StoreupEntity>(); 105 | ew.allEq(MPUtil.allEQMapPre( storeup, "storeup")); 106 | StoreupView storeupView = storeupService.selectView(ew); 107 | return R.ok("查询收藏表成功").put("data", storeupView); 108 | } 109 | 110 | /** 111 | * 后端详情 112 | */ 113 | @RequestMapping("/info/{id}") 114 | public R info(@PathVariable("id") Long id){ 115 | StoreupEntity storeup = storeupService.selectById(id); 116 | return R.ok().put("data", storeup); 117 | } 118 | 119 | /** 120 | * 前端详情 121 | */ 122 | @IgnoreAuth 123 | @RequestMapping("/detail/{id}") 124 | public R detail(@PathVariable("id") Long id){ 125 | StoreupEntity storeup = storeupService.selectById(id); 126 | return R.ok().put("data", storeup); 127 | } 128 | 129 | 130 | 131 | 132 | /** 133 | * 后端保存 134 | */ 135 | @RequestMapping("/save") 136 | public R save(@RequestBody StoreupEntity storeup, HttpServletRequest request){ 137 | storeup.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue()); 138 | //ValidatorUtils.validateEntity(storeup); 139 | storeup.setUserid((Long)request.getSession().getAttribute("userId")); 140 | 141 | storeupService.insert(storeup); 142 | return R.ok(); 143 | } 144 | 145 | /** 146 | * 前端保存 147 | */ 148 | @RequestMapping("/add") 149 | public R add(@RequestBody StoreupEntity storeup, HttpServletRequest request){ 150 | storeup.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue()); 151 | //ValidatorUtils.validateEntity(storeup); 152 | storeup.setUserid((Long)request.getSession().getAttribute("userId")); 153 | 154 | storeupService.insert(storeup); 155 | return R.ok(); 156 | } 157 | 158 | /** 159 | * 修改 160 | */ 161 | @RequestMapping("/update") 162 | public R update(@RequestBody StoreupEntity storeup, HttpServletRequest request){ 163 | //ValidatorUtils.validateEntity(storeup); 164 | storeupService.updateById(storeup);//全部更新 165 | return R.ok(); 166 | } 167 | 168 | 169 | /** 170 | * 删除 171 | */ 172 | @RequestMapping("/delete") 173 | public R delete(@RequestBody Long[] ids){ 174 | storeupService.deleteBatchIds(Arrays.asList(ids)); 175 | return R.ok(); 176 | } 177 | 178 | /** 179 | * 提醒接口 180 | */ 181 | @RequestMapping("/remind/{columnName}/{type}") 182 | public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, 183 | @PathVariable("type") String type,@RequestParam Map map) { 184 | map.put("column", columnName); 185 | map.put("type", type); 186 | 187 | if(type.equals("2")) { 188 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); 189 | Calendar c = Calendar.getInstance(); 190 | Date remindStartDate = null; 191 | Date remindEndDate = null; 192 | if(map.get("remindstart")!=null) { 193 | Integer remindStart = Integer.parseInt(map.get("remindstart").toString()); 194 | c.setTime(new Date()); 195 | c.add(Calendar.DAY_OF_MONTH,remindStart); 196 | remindStartDate = c.getTime(); 197 | map.put("remindstart", sdf.format(remindStartDate)); 198 | } 199 | if(map.get("remindend")!=null) { 200 | Integer remindEnd = Integer.parseInt(map.get("remindend").toString()); 201 | c.setTime(new Date()); 202 | c.add(Calendar.DAY_OF_MONTH,remindEnd); 203 | remindEndDate = c.getTime(); 204 | map.put("remindend", sdf.format(remindEndDate)); 205 | } 206 | } 207 | 208 | Wrapper wrapper = new EntityWrapper(); 209 | if(map.get("remindstart")!=null) { 210 | wrapper.ge(columnName, map.get("remindstart")); 211 | } 212 | if(map.get("remindend")!=null) { 213 | wrapper.le(columnName, map.get("remindend")); 214 | } 215 | if(!request.getSession().getAttribute("role").toString().equals("管理员")) { 216 | wrapper.eq("userid", (Long)request.getSession().getAttribute("userId")); 217 | } 218 | 219 | 220 | int count = storeupService.selectCount(wrapper); 221 | return R.ok().put("count", count); 222 | } 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | } 231 | -------------------------------------------------------------------------------- /src/main/java/com/controller/UserController.java: -------------------------------------------------------------------------------- 1 | 2 | package com.controller; 3 | 4 | 5 | import java.util.Arrays; 6 | import java.util.Calendar; 7 | import java.util.Date; 8 | import java.util.Map; 9 | 10 | import javax.servlet.http.HttpServletRequest; 11 | 12 | import org.springframework.beans.factory.annotation.Autowired; 13 | import org.springframework.stereotype.Controller; 14 | import org.springframework.web.bind.annotation.GetMapping; 15 | import org.springframework.web.bind.annotation.PathVariable; 16 | import org.springframework.web.bind.annotation.PostMapping; 17 | import org.springframework.web.bind.annotation.RequestBody; 18 | import org.springframework.web.bind.annotation.RequestMapping; 19 | import org.springframework.web.bind.annotation.RequestParam; 20 | import org.springframework.web.bind.annotation.ResponseBody; 21 | import org.springframework.web.bind.annotation.RestController; 22 | 23 | import com.annotation.IgnoreAuth; 24 | import com.baomidou.mybatisplus.mapper.EntityWrapper; 25 | import com.entity.TokenEntity; 26 | import com.entity.UserEntity; 27 | import com.service.TokenService; 28 | import com.service.UserService; 29 | import com.utils.CommonUtil; 30 | import com.utils.MPUtil; 31 | import com.utils.PageUtils; 32 | import com.utils.R; 33 | import com.utils.ValidatorUtils; 34 | 35 | /** 36 | * 登录相关 37 | */ 38 | @RequestMapping("users") 39 | @RestController 40 | public class UserController{ 41 | 42 | @Autowired 43 | private UserService userService; 44 | 45 | @Autowired 46 | private TokenService tokenService; 47 | 48 | /** 49 | * 登录 50 | */ 51 | @IgnoreAuth 52 | @PostMapping(value = "/login") 53 | public R login(String username, String password, String captcha, HttpServletRequest request) { 54 | UserEntity user = userService.selectOne(new EntityWrapper().eq("username", username)); 55 | if(user==null || !user.getPassword().equals(password)) { 56 | return R.error("账号或密码不正确"); 57 | } 58 | String token = tokenService.generateToken(user.getId(),username, "users", user.getRole()); 59 | return R.ok().put("token", token); 60 | } 61 | 62 | /** 63 | * 注册 64 | */ 65 | @IgnoreAuth 66 | @PostMapping(value = "/register") 67 | public R register(@RequestBody UserEntity user){ 68 | // ValidatorUtils.validateEntity(user); 69 | if(userService.selectOne(new EntityWrapper().eq("username", user.getUsername())) !=null) { 70 | return R.error("用户已存在"); 71 | } 72 | userService.insert(user); 73 | return R.ok(); 74 | } 75 | 76 | /** 77 | * 退出 78 | */ 79 | @GetMapping(value = "logout") 80 | public R logout(HttpServletRequest request) { 81 | request.getSession().invalidate(); 82 | return R.ok("退出成功"); 83 | } 84 | 85 | /** 86 | * 密码重置 87 | */ 88 | @IgnoreAuth 89 | @RequestMapping(value = "/resetPass") 90 | public R resetPass(String username, HttpServletRequest request){ 91 | UserEntity user = userService.selectOne(new EntityWrapper().eq("username", username)); 92 | if(user==null) { 93 | return R.error("账号不存在"); 94 | } 95 | user.setPassword("123456"); 96 | userService.update(user,null); 97 | return R.ok("密码已重置为:123456"); 98 | } 99 | 100 | /** 101 | * 列表 102 | */ 103 | @RequestMapping("/page") 104 | public R page(@RequestParam Map params,UserEntity user){ 105 | EntityWrapper ew = new EntityWrapper(); 106 | PageUtils page = userService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.allLike(ew, user), params), params)); 107 | return R.ok().put("data", page); 108 | } 109 | 110 | /** 111 | * 列表 112 | */ 113 | @RequestMapping("/list") 114 | public R list( UserEntity user){ 115 | EntityWrapper ew = new EntityWrapper(); 116 | ew.allEq(MPUtil.allEQMapPre( user, "user")); 117 | return R.ok().put("data", userService.selectListView(ew)); 118 | } 119 | 120 | /** 121 | * 信息 122 | */ 123 | @RequestMapping("/info/{id}") 124 | public R info(@PathVariable("id") String id){ 125 | UserEntity user = userService.selectById(id); 126 | return R.ok().put("data", user); 127 | } 128 | 129 | /** 130 | * 获取用户的session用户信息 131 | */ 132 | @RequestMapping("/session") 133 | public R getCurrUser(HttpServletRequest request){ 134 | Long id = (Long)request.getSession().getAttribute("userId"); 135 | UserEntity user = userService.selectById(id); 136 | return R.ok().put("data", user); 137 | } 138 | 139 | /** 140 | * 保存 141 | */ 142 | @PostMapping("/save") 143 | public R save(@RequestBody UserEntity user){ 144 | // ValidatorUtils.validateEntity(user); 145 | if(userService.selectOne(new EntityWrapper().eq("username", user.getUsername())) !=null) { 146 | return R.error("用户已存在"); 147 | } 148 | userService.insert(user); 149 | return R.ok(); 150 | } 151 | 152 | /** 153 | * 修改 154 | */ 155 | @RequestMapping("/update") 156 | public R update(@RequestBody UserEntity user){ 157 | // ValidatorUtils.validateEntity(user); 158 | UserEntity u = userService.selectOne(new EntityWrapper().eq("username", user.getUsername())); 159 | if(u!=null && u.getId()!=user.getId() && u.getUsername().equals(user.getUsername())) { 160 | return R.error("用户名已存在。"); 161 | } 162 | userService.updateById(user);//全部更新 163 | return R.ok(); 164 | } 165 | 166 | /** 167 | * 删除 168 | */ 169 | @RequestMapping("/delete") 170 | public R delete(@RequestBody Long[] ids){ 171 | userService.deleteBatchIds(Arrays.asList(ids)); 172 | return R.ok(); 173 | } 174 | } 175 | -------------------------------------------------------------------------------- /src/main/java/com/dao/DingdanxinxiDao.java: -------------------------------------------------------------------------------- 1 | package com.dao; 2 | 3 | import com.entity.DingdanxinxiEntity; 4 | import com.baomidou.mybatisplus.mapper.BaseMapper; 5 | import java.util.List; 6 | import java.util.Map; 7 | import com.baomidou.mybatisplus.mapper.Wrapper; 8 | import com.baomidou.mybatisplus.plugins.pagination.Pagination; 9 | 10 | import org.apache.ibatis.annotations.Param; 11 | import com.entity.vo.DingdanxinxiVO; 12 | import com.entity.view.DingdanxinxiView; 13 | 14 | 15 | /** 16 | * 订单信息 17 | * 18 | * @author 19 | * @email 20 | * @date 2022-03-26 17:40:36 21 | */ 22 | public interface DingdanxinxiDao extends BaseMapper { 23 | 24 | List selectListVO(@Param("ew") Wrapper wrapper); 25 | 26 | DingdanxinxiVO selectVO(@Param("ew") Wrapper wrapper); 27 | 28 | List selectListView(@Param("ew") Wrapper wrapper); 29 | 30 | List selectListView(Pagination page,@Param("ew") Wrapper wrapper); 31 | 32 | DingdanxinxiView selectView(@Param("ew") Wrapper wrapper); 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/dao/NewsDao.java: -------------------------------------------------------------------------------- 1 | package com.dao; 2 | 3 | import com.entity.NewsEntity; 4 | import com.baomidou.mybatisplus.mapper.BaseMapper; 5 | import java.util.List; 6 | import java.util.Map; 7 | import com.baomidou.mybatisplus.mapper.Wrapper; 8 | import com.baomidou.mybatisplus.plugins.pagination.Pagination; 9 | 10 | import org.apache.ibatis.annotations.Param; 11 | import com.entity.vo.NewsVO; 12 | import com.entity.view.NewsView; 13 | 14 | 15 | /** 16 | * 公告信息 17 | * 18 | * @author 19 | * @email 20 | * @date 2022-03-26 17:40:36 21 | */ 22 | public interface NewsDao extends BaseMapper { 23 | 24 | List selectListVO(@Param("ew") Wrapper wrapper); 25 | 26 | NewsVO selectVO(@Param("ew") Wrapper wrapper); 27 | 28 | List selectListView(@Param("ew") Wrapper wrapper); 29 | 30 | List selectListView(Pagination page,@Param("ew") Wrapper wrapper); 31 | 32 | NewsView selectView(@Param("ew") Wrapper wrapper); 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/dao/QuxiaopeisongDao.java: -------------------------------------------------------------------------------- 1 | package com.dao; 2 | 3 | import com.entity.QuxiaopeisongEntity; 4 | import com.baomidou.mybatisplus.mapper.BaseMapper; 5 | import java.util.List; 6 | import java.util.Map; 7 | import com.baomidou.mybatisplus.mapper.Wrapper; 8 | import com.baomidou.mybatisplus.plugins.pagination.Pagination; 9 | 10 | import org.apache.ibatis.annotations.Param; 11 | import com.entity.vo.QuxiaopeisongVO; 12 | import com.entity.view.QuxiaopeisongView; 13 | 14 | 15 | /** 16 | * 取消配送 17 | * 18 | * @author 19 | * @email 20 | * @date 2022-03-26 17:40:36 21 | */ 22 | public interface QuxiaopeisongDao extends BaseMapper { 23 | 24 | List selectListVO(@Param("ew") Wrapper wrapper); 25 | 26 | QuxiaopeisongVO selectVO(@Param("ew") Wrapper wrapper); 27 | 28 | List selectListView(@Param("ew") Wrapper wrapper); 29 | 30 | List selectListView(Pagination page,@Param("ew") Wrapper wrapper); 31 | 32 | QuxiaopeisongView selectView(@Param("ew") Wrapper wrapper); 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/dao/SongdatongzhiDao.java: -------------------------------------------------------------------------------- 1 | package com.dao; 2 | 3 | import com.entity.SongdatongzhiEntity; 4 | import com.baomidou.mybatisplus.mapper.BaseMapper; 5 | import java.util.List; 6 | import java.util.Map; 7 | import com.baomidou.mybatisplus.mapper.Wrapper; 8 | import com.baomidou.mybatisplus.plugins.pagination.Pagination; 9 | 10 | import org.apache.ibatis.annotations.Param; 11 | import com.entity.vo.SongdatongzhiVO; 12 | import com.entity.view.SongdatongzhiView; 13 | 14 | 15 | /** 16 | * 送达通知 17 | * 18 | * @author 19 | * @email 20 | * @date 2022-03-26 17:40:36 21 | */ 22 | public interface SongdatongzhiDao extends BaseMapper { 23 | 24 | List selectListVO(@Param("ew") Wrapper wrapper); 25 | 26 | SongdatongzhiVO selectVO(@Param("ew") Wrapper wrapper); 27 | 28 | List selectListView(@Param("ew") Wrapper wrapper); 29 | 30 | List selectListView(Pagination page,@Param("ew") Wrapper wrapper); 31 | 32 | SongdatongzhiView selectView(@Param("ew") Wrapper wrapper); 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/entity/DingdanxinxiEntity.java: -------------------------------------------------------------------------------- 1 | package com.entity; 2 | 3 | import com.baomidou.mybatisplus.annotations.TableId; 4 | import com.baomidou.mybatisplus.annotations.TableName; 5 | import javax.validation.constraints.NotBlank; 6 | import javax.validation.constraints.NotEmpty; 7 | import javax.validation.constraints.NotNull; 8 | 9 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 10 | import java.lang.reflect.InvocationTargetException; 11 | 12 | import java.io.Serializable; 13 | import java.util.Date; 14 | import java.util.List; 15 | 16 | import org.springframework.format.annotation.DateTimeFormat; 17 | import com.fasterxml.jackson.annotation.JsonFormat; 18 | import org.apache.commons.beanutils.BeanUtils; 19 | import com.baomidou.mybatisplus.annotations.TableField; 20 | import com.baomidou.mybatisplus.enums.FieldFill; 21 | import com.baomidou.mybatisplus.enums.IdType; 22 | 23 | 24 | /** 25 | * 订单信息 26 | * 数据库通用操作实体类(普通增删改查) 27 | * @author 28 | * @email 29 | * @date 2022-03-26 17:40:36 30 | */ 31 | @TableName("dingdanxinxi") 32 | public class DingdanxinxiEntity implements Serializable { 33 | private static final long serialVersionUID = 1L; 34 | 35 | 36 | public DingdanxinxiEntity() { 37 | 38 | } 39 | 40 | public DingdanxinxiEntity(T t) { 41 | try { 42 | BeanUtils.copyProperties(this, t); 43 | } catch (IllegalAccessException | InvocationTargetException e) { 44 | // TODO Auto-generated catch block 45 | e.printStackTrace(); 46 | } 47 | } 48 | 49 | /** 50 | * 主键id 51 | */ 52 | @TableId 53 | private Long id; 54 | /** 55 | * 订单编号 56 | */ 57 | 58 | private String dingdanbianhao; 59 | 60 | /** 61 | * 美食名称 62 | */ 63 | 64 | private String meishimingcheng; 65 | 66 | /** 67 | * 图片 68 | */ 69 | 70 | private String tupian; 71 | 72 | /** 73 | * 美食分类 74 | */ 75 | 76 | private String meishifenlei; 77 | 78 | /** 79 | * 价格 80 | */ 81 | 82 | private Float jiage; 83 | 84 | /** 85 | * 数量 86 | */ 87 | 88 | private Integer shuliang; 89 | 90 | /** 91 | * 总金额 92 | */ 93 | 94 | private Float zongjine; 95 | 96 | /** 97 | * 配送地址 98 | */ 99 | 100 | private String peisongdizhi; 101 | 102 | /** 103 | * 订单状态 104 | */ 105 | 106 | private String dingdanzhuangtai; 107 | 108 | /** 109 | * 下单时间 110 | */ 111 | 112 | @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd") 113 | @DateTimeFormat 114 | private Date xiadanshijian; 115 | 116 | /** 117 | * 用户账号 118 | */ 119 | 120 | private String yonghuzhanghao; 121 | 122 | /** 123 | * 用户姓名 124 | */ 125 | 126 | private String yonghuxingming; 127 | 128 | /** 129 | * 联系方式 130 | */ 131 | 132 | private String lianxifangshi; 133 | 134 | /** 135 | * 是否支付 136 | */ 137 | 138 | private String ispay; 139 | 140 | 141 | @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") 142 | @DateTimeFormat 143 | private Date addtime; 144 | 145 | public Date getAddtime() { 146 | return addtime; 147 | } 148 | public void setAddtime(Date addtime) { 149 | this.addtime = addtime; 150 | } 151 | 152 | public Long getId() { 153 | return id; 154 | } 155 | 156 | public void setId(Long id) { 157 | this.id = id; 158 | } 159 | /** 160 | * 设置:订单编号 161 | */ 162 | public void setDingdanbianhao(String dingdanbianhao) { 163 | this.dingdanbianhao = dingdanbianhao; 164 | } 165 | /** 166 | * 获取:订单编号 167 | */ 168 | public String getDingdanbianhao() { 169 | return dingdanbianhao; 170 | } 171 | /** 172 | * 设置:美食名称 173 | */ 174 | public void setMeishimingcheng(String meishimingcheng) { 175 | this.meishimingcheng = meishimingcheng; 176 | } 177 | /** 178 | * 获取:美食名称 179 | */ 180 | public String getMeishimingcheng() { 181 | return meishimingcheng; 182 | } 183 | /** 184 | * 设置:图片 185 | */ 186 | public void setTupian(String tupian) { 187 | this.tupian = tupian; 188 | } 189 | /** 190 | * 获取:图片 191 | */ 192 | public String getTupian() { 193 | return tupian; 194 | } 195 | /** 196 | * 设置:美食分类 197 | */ 198 | public void setMeishifenlei(String meishifenlei) { 199 | this.meishifenlei = meishifenlei; 200 | } 201 | /** 202 | * 获取:美食分类 203 | */ 204 | public String getMeishifenlei() { 205 | return meishifenlei; 206 | } 207 | /** 208 | * 设置:价格 209 | */ 210 | public void setJiage(Float jiage) { 211 | this.jiage = jiage; 212 | } 213 | /** 214 | * 获取:价格 215 | */ 216 | public Float getJiage() { 217 | return jiage; 218 | } 219 | /** 220 | * 设置:数量 221 | */ 222 | public void setShuliang(Integer shuliang) { 223 | this.shuliang = shuliang; 224 | } 225 | /** 226 | * 获取:数量 227 | */ 228 | public Integer getShuliang() { 229 | return shuliang; 230 | } 231 | /** 232 | * 设置:总金额 233 | */ 234 | public void setZongjine(Float zongjine) { 235 | this.zongjine = zongjine; 236 | } 237 | /** 238 | * 获取:总金额 239 | */ 240 | public Float getZongjine() { 241 | return zongjine; 242 | } 243 | /** 244 | * 设置:配送地址 245 | */ 246 | public void setPeisongdizhi(String peisongdizhi) { 247 | this.peisongdizhi = peisongdizhi; 248 | } 249 | /** 250 | * 获取:配送地址 251 | */ 252 | public String getPeisongdizhi() { 253 | return peisongdizhi; 254 | } 255 | /** 256 | * 设置:订单状态 257 | */ 258 | public void setDingdanzhuangtai(String dingdanzhuangtai) { 259 | this.dingdanzhuangtai = dingdanzhuangtai; 260 | } 261 | /** 262 | * 获取:订单状态 263 | */ 264 | public String getDingdanzhuangtai() { 265 | return dingdanzhuangtai; 266 | } 267 | /** 268 | * 设置:下单时间 269 | */ 270 | public void setXiadanshijian(Date xiadanshijian) { 271 | this.xiadanshijian = xiadanshijian; 272 | } 273 | /** 274 | * 获取:下单时间 275 | */ 276 | public Date getXiadanshijian() { 277 | return xiadanshijian; 278 | } 279 | /** 280 | * 设置:用户账号 281 | */ 282 | public void setYonghuzhanghao(String yonghuzhanghao) { 283 | this.yonghuzhanghao = yonghuzhanghao; 284 | } 285 | /** 286 | * 获取:用户账号 287 | */ 288 | public String getYonghuzhanghao() { 289 | return yonghuzhanghao; 290 | } 291 | /** 292 | * 设置:用户姓名 293 | */ 294 | public void setYonghuxingming(String yonghuxingming) { 295 | this.yonghuxingming = yonghuxingming; 296 | } 297 | /** 298 | * 获取:用户姓名 299 | */ 300 | public String getYonghuxingming() { 301 | return yonghuxingming; 302 | } 303 | /** 304 | * 设置:联系方式 305 | */ 306 | public void setLianxifangshi(String lianxifangshi) { 307 | this.lianxifangshi = lianxifangshi; 308 | } 309 | /** 310 | * 获取:联系方式 311 | */ 312 | public String getLianxifangshi() { 313 | return lianxifangshi; 314 | } 315 | /** 316 | * 设置:是否支付 317 | */ 318 | public void setIspay(String ispay) { 319 | this.ispay = ispay; 320 | } 321 | /** 322 | * 获取:是否支付 323 | */ 324 | public String getIspay() { 325 | return ispay; 326 | } 327 | 328 | } 329 | -------------------------------------------------------------------------------- /src/main/java/com/entity/MeishifenleiEntity.java: -------------------------------------------------------------------------------- 1 | package com.entity; 2 | 3 | import com.baomidou.mybatisplus.annotations.TableId; 4 | import com.baomidou.mybatisplus.annotations.TableName; 5 | import javax.validation.constraints.NotBlank; 6 | import javax.validation.constraints.NotEmpty; 7 | import javax.validation.constraints.NotNull; 8 | 9 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 10 | import java.lang.reflect.InvocationTargetException; 11 | 12 | import java.io.Serializable; 13 | import java.util.Date; 14 | import java.util.List; 15 | 16 | import org.springframework.format.annotation.DateTimeFormat; 17 | import com.fasterxml.jackson.annotation.JsonFormat; 18 | import org.apache.commons.beanutils.BeanUtils; 19 | import com.baomidou.mybatisplus.annotations.TableField; 20 | import com.baomidou.mybatisplus.enums.FieldFill; 21 | import com.baomidou.mybatisplus.enums.IdType; 22 | 23 | 24 | /** 25 | * 美食分类 26 | * 数据库通用操作实体类(普通增删改查) 27 | * @author 28 | * @email 29 | * @date 2022-03-26 17:40:36 30 | */ 31 | @TableName("meishifenlei") 32 | public class MeishifenleiEntity implements Serializable { 33 | private static final long serialVersionUID = 1L; 34 | 35 | 36 | public MeishifenleiEntity() { 37 | 38 | } 39 | 40 | public MeishifenleiEntity(T t) { 41 | try { 42 | BeanUtils.copyProperties(this, t); 43 | } catch (IllegalAccessException | InvocationTargetException e) { 44 | // TODO Auto-generated catch block 45 | e.printStackTrace(); 46 | } 47 | } 48 | 49 | /** 50 | * 主键id 51 | */ 52 | @TableId 53 | private Long id; 54 | /** 55 | * 美食分类 56 | */ 57 | 58 | private String meishifenlei; 59 | 60 | 61 | @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") 62 | @DateTimeFormat 63 | private Date addtime; 64 | 65 | public Date getAddtime() { 66 | return addtime; 67 | } 68 | public void setAddtime(Date addtime) { 69 | this.addtime = addtime; 70 | } 71 | 72 | public Long getId() { 73 | return id; 74 | } 75 | 76 | public void setId(Long id) { 77 | this.id = id; 78 | } 79 | /** 80 | * 设置:美食分类 81 | */ 82 | public void setMeishifenlei(String meishifenlei) { 83 | this.meishifenlei = meishifenlei; 84 | } 85 | /** 86 | * 获取:美食分类 87 | */ 88 | public String getMeishifenlei() { 89 | return meishifenlei; 90 | } 91 | 92 | } 93 | -------------------------------------------------------------------------------- /src/main/java/com/entity/PeisongyuanEntity.java: -------------------------------------------------------------------------------- 1 | package com.entity; 2 | 3 | import com.baomidou.mybatisplus.annotations.TableId; 4 | import com.baomidou.mybatisplus.annotations.TableName; 5 | import javax.validation.constraints.NotBlank; 6 | import javax.validation.constraints.NotEmpty; 7 | import javax.validation.constraints.NotNull; 8 | 9 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 10 | import java.lang.reflect.InvocationTargetException; 11 | 12 | import java.io.Serializable; 13 | import java.util.Date; 14 | import java.util.List; 15 | 16 | import org.springframework.format.annotation.DateTimeFormat; 17 | import com.fasterxml.jackson.annotation.JsonFormat; 18 | import org.apache.commons.beanutils.BeanUtils; 19 | import com.baomidou.mybatisplus.annotations.TableField; 20 | import com.baomidou.mybatisplus.enums.FieldFill; 21 | import com.baomidou.mybatisplus.enums.IdType; 22 | 23 | 24 | /** 25 | * 配送员 26 | * 数据库通用操作实体类(普通增删改查) 27 | * @author 28 | * @email 29 | * @date 2022-03-26 17:40:36 30 | */ 31 | @TableName("peisongyuan") 32 | public class PeisongyuanEntity implements Serializable { 33 | private static final long serialVersionUID = 1L; 34 | 35 | 36 | public PeisongyuanEntity() { 37 | 38 | } 39 | 40 | public PeisongyuanEntity(T t) { 41 | try { 42 | BeanUtils.copyProperties(this, t); 43 | } catch (IllegalAccessException | InvocationTargetException e) { 44 | // TODO Auto-generated catch block 45 | e.printStackTrace(); 46 | } 47 | } 48 | 49 | /** 50 | * 主键id 51 | */ 52 | @TableId 53 | private Long id; 54 | /** 55 | * 配送账号 56 | */ 57 | 58 | private String peisongzhanghao; 59 | 60 | /** 61 | * 密码 62 | */ 63 | 64 | private String mima; 65 | 66 | /** 67 | * 配送姓名 68 | */ 69 | 70 | private String peisongxingming; 71 | 72 | /** 73 | * 头像 74 | */ 75 | 76 | private String touxiang; 77 | 78 | /** 79 | * 性别 80 | */ 81 | 82 | private String xingbie; 83 | 84 | /** 85 | * 联系电话 86 | */ 87 | 88 | private String lianxidianhua; 89 | 90 | /** 91 | * 身份证 92 | */ 93 | 94 | private String shenfenzheng; 95 | 96 | 97 | @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") 98 | @DateTimeFormat 99 | private Date addtime; 100 | 101 | public Date getAddtime() { 102 | return addtime; 103 | } 104 | public void setAddtime(Date addtime) { 105 | this.addtime = addtime; 106 | } 107 | 108 | public Long getId() { 109 | return id; 110 | } 111 | 112 | public void setId(Long id) { 113 | this.id = id; 114 | } 115 | /** 116 | * 设置:配送账号 117 | */ 118 | public void setPeisongzhanghao(String peisongzhanghao) { 119 | this.peisongzhanghao = peisongzhanghao; 120 | } 121 | /** 122 | * 获取:配送账号 123 | */ 124 | public String getPeisongzhanghao() { 125 | return peisongzhanghao; 126 | } 127 | /** 128 | * 设置:密码 129 | */ 130 | public void setMima(String mima) { 131 | this.mima = mima; 132 | } 133 | /** 134 | * 获取:密码 135 | */ 136 | public String getMima() { 137 | return mima; 138 | } 139 | /** 140 | * 设置:配送姓名 141 | */ 142 | public void setPeisongxingming(String peisongxingming) { 143 | this.peisongxingming = peisongxingming; 144 | } 145 | /** 146 | * 获取:配送姓名 147 | */ 148 | public String getPeisongxingming() { 149 | return peisongxingming; 150 | } 151 | /** 152 | * 设置:头像 153 | */ 154 | public void setTouxiang(String touxiang) { 155 | this.touxiang = touxiang; 156 | } 157 | /** 158 | * 获取:头像 159 | */ 160 | public String getTouxiang() { 161 | return touxiang; 162 | } 163 | /** 164 | * 设置:性别 165 | */ 166 | public void setXingbie(String xingbie) { 167 | this.xingbie = xingbie; 168 | } 169 | /** 170 | * 获取:性别 171 | */ 172 | public String getXingbie() { 173 | return xingbie; 174 | } 175 | /** 176 | * 设置:联系电话 177 | */ 178 | public void setLianxidianhua(String lianxidianhua) { 179 | this.lianxidianhua = lianxidianhua; 180 | } 181 | /** 182 | * 获取:联系电话 183 | */ 184 | public String getLianxidianhua() { 185 | return lianxidianhua; 186 | } 187 | /** 188 | * 设置:身份证 189 | */ 190 | public void setShenfenzheng(String shenfenzheng) { 191 | this.shenfenzheng = shenfenzheng; 192 | } 193 | /** 194 | * 获取:身份证 195 | */ 196 | public String getShenfenzheng() { 197 | return shenfenzheng; 198 | } 199 | 200 | } 201 | -------------------------------------------------------------------------------- /src/main/java/com/entity/QuxiaopeisongEntity.java: -------------------------------------------------------------------------------- 1 | package com.entity; 2 | 3 | import com.baomidou.mybatisplus.annotations.TableId; 4 | import com.baomidou.mybatisplus.annotations.TableName; 5 | import javax.validation.constraints.NotBlank; 6 | import javax.validation.constraints.NotEmpty; 7 | import javax.validation.constraints.NotNull; 8 | 9 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 10 | import java.lang.reflect.InvocationTargetException; 11 | 12 | import java.io.Serializable; 13 | import java.util.Date; 14 | import java.util.List; 15 | 16 | import org.springframework.format.annotation.DateTimeFormat; 17 | import com.fasterxml.jackson.annotation.JsonFormat; 18 | import org.apache.commons.beanutils.BeanUtils; 19 | import com.baomidou.mybatisplus.annotations.TableField; 20 | import com.baomidou.mybatisplus.enums.FieldFill; 21 | import com.baomidou.mybatisplus.enums.IdType; 22 | 23 | 24 | /** 25 | * 取消配送 26 | * 数据库通用操作实体类(普通增删改查) 27 | * @author 28 | * @email 29 | * @date 2022-03-26 17:40:36 30 | */ 31 | @TableName("quxiaopeisong") 32 | public class QuxiaopeisongEntity implements Serializable { 33 | private static final long serialVersionUID = 1L; 34 | 35 | 36 | public QuxiaopeisongEntity() { 37 | 38 | } 39 | 40 | public QuxiaopeisongEntity(T t) { 41 | try { 42 | BeanUtils.copyProperties(this, t); 43 | } catch (IllegalAccessException | InvocationTargetException e) { 44 | // TODO Auto-generated catch block 45 | e.printStackTrace(); 46 | } 47 | } 48 | 49 | /** 50 | * 主键id 51 | */ 52 | @TableId 53 | private Long id; 54 | /** 55 | * 订单编号 56 | */ 57 | 58 | private String dingdanbianhao; 59 | 60 | /** 61 | * 美食名称 62 | */ 63 | 64 | private String meishimingcheng; 65 | 66 | /** 67 | * 取消原因 68 | */ 69 | 70 | private String quxiaoyuanyin; 71 | 72 | /** 73 | * 取消时间 74 | */ 75 | 76 | @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd") 77 | @DateTimeFormat 78 | private Date quxiaoshijian; 79 | 80 | /** 81 | * 配送账号 82 | */ 83 | 84 | private String peisongzhanghao; 85 | 86 | /** 87 | * 用户账号 88 | */ 89 | 90 | private String yonghuzhanghao; 91 | 92 | 93 | @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") 94 | @DateTimeFormat 95 | private Date addtime; 96 | 97 | public Date getAddtime() { 98 | return addtime; 99 | } 100 | public void setAddtime(Date addtime) { 101 | this.addtime = addtime; 102 | } 103 | 104 | public Long getId() { 105 | return id; 106 | } 107 | 108 | public void setId(Long id) { 109 | this.id = id; 110 | } 111 | /** 112 | * 设置:订单编号 113 | */ 114 | public void setDingdanbianhao(String dingdanbianhao) { 115 | this.dingdanbianhao = dingdanbianhao; 116 | } 117 | /** 118 | * 获取:订单编号 119 | */ 120 | public String getDingdanbianhao() { 121 | return dingdanbianhao; 122 | } 123 | /** 124 | * 设置:美食名称 125 | */ 126 | public void setMeishimingcheng(String meishimingcheng) { 127 | this.meishimingcheng = meishimingcheng; 128 | } 129 | /** 130 | * 获取:美食名称 131 | */ 132 | public String getMeishimingcheng() { 133 | return meishimingcheng; 134 | } 135 | /** 136 | * 设置:取消原因 137 | */ 138 | public void setQuxiaoyuanyin(String quxiaoyuanyin) { 139 | this.quxiaoyuanyin = quxiaoyuanyin; 140 | } 141 | /** 142 | * 获取:取消原因 143 | */ 144 | public String getQuxiaoyuanyin() { 145 | return quxiaoyuanyin; 146 | } 147 | /** 148 | * 设置:取消时间 149 | */ 150 | public void setQuxiaoshijian(Date quxiaoshijian) { 151 | this.quxiaoshijian = quxiaoshijian; 152 | } 153 | /** 154 | * 获取:取消时间 155 | */ 156 | public Date getQuxiaoshijian() { 157 | return quxiaoshijian; 158 | } 159 | /** 160 | * 设置:配送账号 161 | */ 162 | public void setPeisongzhanghao(String peisongzhanghao) { 163 | this.peisongzhanghao = peisongzhanghao; 164 | } 165 | /** 166 | * 获取:配送账号 167 | */ 168 | public String getPeisongzhanghao() { 169 | return peisongzhanghao; 170 | } 171 | /** 172 | * 设置:用户账号 173 | */ 174 | public void setYonghuzhanghao(String yonghuzhanghao) { 175 | this.yonghuzhanghao = yonghuzhanghao; 176 | } 177 | /** 178 | * 获取:用户账号 179 | */ 180 | public String getYonghuzhanghao() { 181 | return yonghuzhanghao; 182 | } 183 | 184 | } 185 | -------------------------------------------------------------------------------- /src/main/java/com/service/NewsService.java: -------------------------------------------------------------------------------- 1 | package com.service; 2 | 3 | import com.baomidou.mybatisplus.mapper.Wrapper; 4 | import com.baomidou.mybatisplus.service.IService; 5 | import com.utils.PageUtils; 6 | import com.entity.NewsEntity; 7 | import java.util.List; 8 | import java.util.Map; 9 | import com.entity.vo.NewsVO; 10 | import org.apache.ibatis.annotations.Param; 11 | import com.entity.view.NewsView; 12 | 13 | 14 | /** 15 | * 公告信息 16 | * 17 | * @author 18 | * @email 19 | * @date 2022-03-26 17:40:36 20 | */ 21 | public interface NewsService extends IService { 22 | 23 | PageUtils queryPage(Map params); 24 | 25 | List selectListVO(Wrapper wrapper); 26 | 27 | NewsVO selectVO(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Wrapper wrapper); 30 | 31 | NewsView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | PageUtils queryPage(Map params,Wrapper wrapper); 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /src/main/java/com/service/PeisongyuanService.java: -------------------------------------------------------------------------------- 1 | package com.service; 2 | 3 | import com.baomidou.mybatisplus.mapper.Wrapper; 4 | import com.baomidou.mybatisplus.service.IService; 5 | import com.utils.PageUtils; 6 | import com.entity.PeisongyuanEntity; 7 | import java.util.List; 8 | import java.util.Map; 9 | import com.entity.vo.PeisongyuanVO; 10 | import org.apache.ibatis.annotations.Param; 11 | import com.entity.view.PeisongyuanView; 12 | 13 | 14 | /** 15 | * 配送员 16 | * 17 | * @author 18 | * @email 19 | * @date 2022-03-26 17:40:36 20 | */ 21 | public interface PeisongyuanService extends IService { 22 | 23 | PageUtils queryPage(Map params); 24 | 25 | List selectListVO(Wrapper wrapper); 26 | 27 | PeisongyuanVO selectVO(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Wrapper wrapper); 30 | 31 | PeisongyuanView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | PageUtils queryPage(Map params,Wrapper wrapper); 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /src/main/java/com/service/SongdatongzhiService.java: -------------------------------------------------------------------------------- 1 | package com.service; 2 | 3 | import com.baomidou.mybatisplus.mapper.Wrapper; 4 | import com.baomidou.mybatisplus.service.IService; 5 | import com.utils.PageUtils; 6 | import com.entity.SongdatongzhiEntity; 7 | import java.util.List; 8 | import java.util.Map; 9 | import com.entity.vo.SongdatongzhiVO; 10 | import org.apache.ibatis.annotations.Param; 11 | import com.entity.view.SongdatongzhiView; 12 | 13 | 14 | /** 15 | * 送达通知 16 | * 17 | * @author 18 | * @email 19 | * @date 2022-03-26 17:40:36 20 | */ 21 | public interface SongdatongzhiService extends IService { 22 | 23 | PageUtils queryPage(Map params); 24 | 25 | List selectListVO(Wrapper wrapper); 26 | 27 | SongdatongzhiVO selectVO(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Wrapper wrapper); 30 | 31 | SongdatongzhiView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | PageUtils queryPage(Map params,Wrapper wrapper); 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /src/main/java/com/service/TesemeishiService.java: -------------------------------------------------------------------------------- 1 | package com.service; 2 | 3 | import com.baomidou.mybatisplus.mapper.Wrapper; 4 | import com.baomidou.mybatisplus.service.IService; 5 | import com.utils.PageUtils; 6 | import com.entity.TesemeishiEntity; 7 | import java.util.List; 8 | import java.util.Map; 9 | import com.entity.vo.TesemeishiVO; 10 | import org.apache.ibatis.annotations.Param; 11 | import com.entity.view.TesemeishiView; 12 | 13 | 14 | /** 15 | * 特色美食 16 | * 17 | * @author 18 | * @email 19 | * @date 2022-03-26 17:40:36 20 | */ 21 | public interface TesemeishiService extends IService { 22 | 23 | PageUtils queryPage(Map params); 24 | 25 | List selectListVO(Wrapper wrapper); 26 | 27 | TesemeishiVO selectVO(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Wrapper wrapper); 30 | 31 | TesemeishiView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | PageUtils queryPage(Map params,Wrapper wrapper); 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /src/main/java/com/service/impl/DingdanxinxiServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.service.impl; 2 | 3 | import org.springframework.stereotype.Service; 4 | import java.util.Map; 5 | import java.util.List; 6 | 7 | import com.baomidou.mybatisplus.mapper.Wrapper; 8 | import com.baomidou.mybatisplus.mapper.EntityWrapper; 9 | import com.baomidou.mybatisplus.plugins.Page; 10 | import com.baomidou.mybatisplus.service.impl.ServiceImpl; 11 | import com.utils.PageUtils; 12 | import com.utils.Query; 13 | 14 | 15 | import com.dao.DingdanxinxiDao; 16 | import com.entity.DingdanxinxiEntity; 17 | import com.service.DingdanxinxiService; 18 | import com.entity.vo.DingdanxinxiVO; 19 | import com.entity.view.DingdanxinxiView; 20 | 21 | @Service("dingdanxinxiService") 22 | public class DingdanxinxiServiceImpl extends ServiceImpl implements DingdanxinxiService { 23 | 24 | 25 | @Override 26 | public PageUtils queryPage(Map params) { 27 | Page page = this.selectPage( 28 | new Query(params).getPage(), 29 | new EntityWrapper() 30 | ); 31 | return new PageUtils(page); 32 | } 33 | 34 | @Override 35 | public PageUtils queryPage(Map params, Wrapper wrapper) { 36 | Page page =new Query(params).getPage(); 37 | page.setRecords(baseMapper.selectListView(page,wrapper)); 38 | PageUtils pageUtil = new PageUtils(page); 39 | return pageUtil; 40 | } 41 | 42 | @Override 43 | public List selectListVO(Wrapper wrapper) { 44 | return baseMapper.selectListVO(wrapper); 45 | } 46 | 47 | @Override 48 | public DingdanxinxiVO selectVO(Wrapper wrapper) { 49 | return baseMapper.selectVO(wrapper); 50 | } 51 | 52 | @Override 53 | public List selectListView(Wrapper wrapper) { 54 | return baseMapper.selectListView(wrapper); 55 | } 56 | 57 | @Override 58 | public DingdanxinxiView selectView(Wrapper wrapper) { 59 | return baseMapper.selectView(wrapper); 60 | } 61 | 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/com/service/impl/MeishifenleiServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.service.impl; 2 | 3 | import org.springframework.stereotype.Service; 4 | import java.util.Map; 5 | import java.util.List; 6 | 7 | import com.baomidou.mybatisplus.mapper.Wrapper; 8 | import com.baomidou.mybatisplus.mapper.EntityWrapper; 9 | import com.baomidou.mybatisplus.plugins.Page; 10 | import com.baomidou.mybatisplus.service.impl.ServiceImpl; 11 | import com.utils.PageUtils; 12 | import com.utils.Query; 13 | 14 | 15 | import com.dao.MeishifenleiDao; 16 | import com.entity.MeishifenleiEntity; 17 | import com.service.MeishifenleiService; 18 | import com.entity.vo.MeishifenleiVO; 19 | import com.entity.view.MeishifenleiView; 20 | 21 | @Service("meishifenleiService") 22 | public class MeishifenleiServiceImpl extends ServiceImpl implements MeishifenleiService { 23 | 24 | 25 | @Override 26 | public PageUtils queryPage(Map params) { 27 | Page page = this.selectPage( 28 | new Query(params).getPage(), 29 | new EntityWrapper() 30 | ); 31 | return new PageUtils(page); 32 | } 33 | 34 | @Override 35 | public PageUtils queryPage(Map params, Wrapper wrapper) { 36 | Page page =new Query(params).getPage(); 37 | page.setRecords(baseMapper.selectListView(page,wrapper)); 38 | PageUtils pageUtil = new PageUtils(page); 39 | return pageUtil; 40 | } 41 | 42 | @Override 43 | public List selectListVO(Wrapper wrapper) { 44 | return baseMapper.selectListVO(wrapper); 45 | } 46 | 47 | @Override 48 | public MeishifenleiVO selectVO(Wrapper wrapper) { 49 | return baseMapper.selectVO(wrapper); 50 | } 51 | 52 | @Override 53 | public List selectListView(Wrapper wrapper) { 54 | return baseMapper.selectListView(wrapper); 55 | } 56 | 57 | @Override 58 | public MeishifenleiView selectView(Wrapper wrapper) { 59 | return baseMapper.selectView(wrapper); 60 | } 61 | 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/com/service/impl/PeisongyuanServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.service.impl; 2 | 3 | import org.springframework.stereotype.Service; 4 | import java.util.Map; 5 | import java.util.List; 6 | 7 | import com.baomidou.mybatisplus.mapper.Wrapper; 8 | import com.baomidou.mybatisplus.mapper.EntityWrapper; 9 | import com.baomidou.mybatisplus.plugins.Page; 10 | import com.baomidou.mybatisplus.service.impl.ServiceImpl; 11 | import com.utils.PageUtils; 12 | import com.utils.Query; 13 | 14 | 15 | import com.dao.PeisongyuanDao; 16 | import com.entity.PeisongyuanEntity; 17 | import com.service.PeisongyuanService; 18 | import com.entity.vo.PeisongyuanVO; 19 | import com.entity.view.PeisongyuanView; 20 | 21 | @Service("peisongyuanService") 22 | public class PeisongyuanServiceImpl extends ServiceImpl implements PeisongyuanService { 23 | 24 | 25 | @Override 26 | public PageUtils queryPage(Map params) { 27 | Page page = this.selectPage( 28 | new Query(params).getPage(), 29 | new EntityWrapper() 30 | ); 31 | return new PageUtils(page); 32 | } 33 | 34 | @Override 35 | public PageUtils queryPage(Map params, Wrapper wrapper) { 36 | Page page =new Query(params).getPage(); 37 | page.setRecords(baseMapper.selectListView(page,wrapper)); 38 | PageUtils pageUtil = new PageUtils(page); 39 | return pageUtil; 40 | } 41 | 42 | @Override 43 | public List selectListVO(Wrapper wrapper) { 44 | return baseMapper.selectListVO(wrapper); 45 | } 46 | 47 | @Override 48 | public PeisongyuanVO selectVO(Wrapper wrapper) { 49 | return baseMapper.selectVO(wrapper); 50 | } 51 | 52 | @Override 53 | public List selectListView(Wrapper wrapper) { 54 | return baseMapper.selectListView(wrapper); 55 | } 56 | 57 | @Override 58 | public PeisongyuanView selectView(Wrapper wrapper) { 59 | return baseMapper.selectView(wrapper); 60 | } 61 | 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/com/service/impl/SongdatongzhiServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.service.impl; 2 | 3 | import org.springframework.stereotype.Service; 4 | import java.util.Map; 5 | import java.util.List; 6 | 7 | import com.baomidou.mybatisplus.mapper.Wrapper; 8 | import com.baomidou.mybatisplus.mapper.EntityWrapper; 9 | import com.baomidou.mybatisplus.plugins.Page; 10 | import com.baomidou.mybatisplus.service.impl.ServiceImpl; 11 | import com.utils.PageUtils; 12 | import com.utils.Query; 13 | 14 | 15 | import com.dao.SongdatongzhiDao; 16 | import com.entity.SongdatongzhiEntity; 17 | import com.service.SongdatongzhiService; 18 | import com.entity.vo.SongdatongzhiVO; 19 | import com.entity.view.SongdatongzhiView; 20 | 21 | @Service("songdatongzhiService") 22 | public class SongdatongzhiServiceImpl extends ServiceImpl implements SongdatongzhiService { 23 | 24 | 25 | @Override 26 | public PageUtils queryPage(Map params) { 27 | Page page = this.selectPage( 28 | new Query(params).getPage(), 29 | new EntityWrapper() 30 | ); 31 | return new PageUtils(page); 32 | } 33 | 34 | @Override 35 | public PageUtils queryPage(Map params, Wrapper wrapper) { 36 | Page page =new Query(params).getPage(); 37 | page.setRecords(baseMapper.selectListView(page,wrapper)); 38 | PageUtils pageUtil = new PageUtils(page); 39 | return pageUtil; 40 | } 41 | 42 | @Override 43 | public List selectListVO(Wrapper wrapper) { 44 | return baseMapper.selectListVO(wrapper); 45 | } 46 | 47 | @Override 48 | public SongdatongzhiVO selectVO(Wrapper wrapper) { 49 | return baseMapper.selectVO(wrapper); 50 | } 51 | 52 | @Override 53 | public List selectListView(Wrapper wrapper) { 54 | return baseMapper.selectListView(wrapper); 55 | } 56 | 57 | @Override 58 | public SongdatongzhiView selectView(Wrapper wrapper) { 59 | return baseMapper.selectView(wrapper); 60 | } 61 | 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/main/resources/config.properties: -------------------------------------------------------------------------------- 1 | validationQuery=SELECT 1 2 | 3 | jdbc_url=jdbc:mysql://127.0.0.1:3306/order?useUnicode=true&characterEncoding=UTF-8&tinyInt1isBit=false 4 | jdbc_username=root 5 | jdbc_password=root 6 | -------------------------------------------------------------------------------- /src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.rootLogger=DEBUG,CONSOLE,A 2 | log4j.addivity.org.apache=false 3 | log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender 4 | log4j.appender.CONSOLE.Threshold=DEBUG 5 | log4j.appender.CONSOLE.layout.ConversionPattern=%d{yyyy-MM-dd HH\:mm\:ss} -%-4r [%t] %-5p %x - %m%n 6 | log4j.appender.CONSOLE.Target=System.out 7 | #log4j.appender.CONSOLE.charset=utf-8 8 | log4j.appender.CONSOLE.encoding=utf-8 9 | log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout 10 | log4j.appender.A=org.apache.log4j.DailyRollingFileAppender 11 | log4j.appender.A.File=${catalina.home}/logs/yo_log/PurePro_ 12 | log4j.appender.A.DatePattern=yyyy-MM-dd'.log' 13 | log4j.appender.A.layout=org.apache.log4j.PatternLayout 14 | log4j.appender.A.layout.ConversionPattern=[FH_sys] %d{yyyy-MM-dd HH\:mm\:ss} %5p %c{1}\:%L \: %m%n 15 | log4j.logger.java.sql.ResultSet=INFO 16 | log4j.logger.org.apache=DEBUG 17 | log4j.logger.java.sql.Connection=DEBUG 18 | log4j.logger.java.sql.Statement=DEBUG 19 | log4j.logger.java.sql.PreparedStatement=DEBUG -------------------------------------------------------------------------------- /src/main/resources/mapper/DingdanxinxiDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | SELECT * FROM dingdanxinxi dingdanxinxi 27 | 1=1 ${ew.sqlSegment} 28 | 29 | 30 | 32 | SELECT dingdanxinxi.* FROM dingdanxinxi dingdanxinxi 33 | 1=1 ${ew.sqlSegment} 34 | 35 | 36 | 38 | 39 | SELECT dingdanxinxi.* FROM dingdanxinxi dingdanxinxi 40 | 1=1 ${ew.sqlSegment} 41 | 42 | 43 | 45 | SELECT * FROM dingdanxinxi dingdanxinxi 1=1 ${ew.sqlSegment} 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /src/main/resources/mapper/NewsDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 16 | SELECT * FROM news news 17 | 1=1 ${ew.sqlSegment} 18 | 19 | 20 | 22 | SELECT news.* FROM news news 23 | 1=1 ${ew.sqlSegment} 24 | 25 | 26 | 28 | 29 | SELECT news.* FROM news news 30 | 1=1 ${ew.sqlSegment} 31 | 32 | 33 | 35 | SELECT * FROM news news 1=1 ${ew.sqlSegment} 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /src/main/resources/mapper/PeisongjiedanDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 25 | SELECT * FROM peisongjiedan peisongjiedan 26 | 1=1 ${ew.sqlSegment} 27 | 28 | 29 | 31 | SELECT peisongjiedan.* FROM peisongjiedan peisongjiedan 32 | 1=1 ${ew.sqlSegment} 33 | 34 | 35 | 37 | 38 | SELECT peisongjiedan.* FROM peisongjiedan peisongjiedan 39 | 1=1 ${ew.sqlSegment} 40 | 41 | 42 | 44 | SELECT * FROM peisongjiedan peisongjiedan 1=1 ${ew.sqlSegment} 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /src/main/resources/mapper/StoreupDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 19 | SELECT * FROM storeup storeup 20 | 1=1 ${ew.sqlSegment} 21 | 22 | 23 | 25 | SELECT storeup.* FROM storeup storeup 26 | 1=1 ${ew.sqlSegment} 27 | 28 | 29 | 31 | 32 | SELECT storeup.* FROM storeup storeup 33 | 1=1 ${ew.sqlSegment} 34 | 35 | 36 | 38 | SELECT * FROM storeup storeup 1=1 ${ew.sqlSegment} 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/main/resources/mybatis/mybatis-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 12 | 13 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /src/main/resources/spring/spring-mvc.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /src/main/resources/spring/spring-mybatis.xml: -------------------------------------------------------------------------------- 1 | 2 | 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 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 77 | 78 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | -------------------------------------------------------------------------------- /src/main/resources/spring/spring.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/pages/common/include.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/pages/index.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 3 | 4 | 5 | 6 | 用户列表 7 | <%@include file="common/include.jsp" %> 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 添加 17 | 18 | 19 | 20 | 21 | ID 22 | 姓名 23 | 年龄 24 | 类型 25 | 创建时间 26 | 操作 27 | 28 | 29 | 30 | 31 | 32 | ${user.id} 33 | ${user.name} 34 | ${user.age} 35 | ${user.type} 36 | ${user.ctime} 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/pages/save.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 3 | 4 | 5 | 6 | 编辑 7 | <%@include file="common/include.jsp" %> 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 姓名 17 | 18 | 19 | 20 | 年龄 21 | 22 | 23 | 保存 24 | 取消 25 | 26 | 27 | 28 | 29 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | spring 6 | 7 | 8 | 9 | contextConfigLocation 10 | classpath:spring/spring.xml 11 | 12 | 13 | 14 | 15 | encodingFilter 16 | org.springframework.web.filter.CharacterEncodingFilter 17 | 18 | encoding 19 | UTF-8 20 | 21 | 22 | 23 | encodingFilter 24 | /* 25 | 26 | 27 | 28 | 29 | Spring监听器 30 | org.springframework.web.context.ContextLoaderListener 31 | 32 | 33 | 34 | org.springframework.web.util.IntrospectorCleanupListener 35 | 36 | 37 | 38 | 39 | SpringMVC 40 | org.springframework.web.servlet.DispatcherServlet 41 | 42 | SpringMVC 43 | contextConfigLocation 44 | classpath:spring/spring-mvc.xml 45 | 46 | 1 47 | 48 | 49 | 50 | 51 | 52 | default 53 | *.js 54 | *.css 55 | *.html 56 | /upload/* 57 | 58 | 59 | 60 | SpringMVC 61 | / 62 | 63 | 64 | 65 | 68 | 69 | -------------------------------------------------------------------------------- /src/main/webapp/front/css/canvas-bg-1.css: -------------------------------------------------------------------------------- 1 | #canvas { 2 | position: fixed; 3 | top: 0; 4 | left: 0; 5 | width: 100%; 6 | margin: 0; 7 | overflow: hidden; 8 | background: hsla(0, 5%, 5%, 1); 9 | background-repeat: no-repeat; 10 | background-attachment: fixed; 11 | background-image: linear-gradient(to right top, hsla(0, 5%, 15%, 0.5), hsla(0, 5%, 5%, 1)); 12 | background-image: -moz-linear-gradient(to right top, hsla(0, 5%, 15%, 0.5), hsla(0, 5%, 5%, 1)); 13 | } -------------------------------------------------------------------------------- /src/main/webapp/front/css/canvas-bg-2.css: -------------------------------------------------------------------------------- 1 | #canvas { 2 | background: rgba(0,0,0,1); 3 | position: absolute; 4 | left: 0; 5 | top: 0; 6 | } -------------------------------------------------------------------------------- /src/main/webapp/front/css/canvas-bg-3.css: -------------------------------------------------------------------------------- 1 | #canvas { 2 | position: fixed; 3 | left: 0; 4 | top: 0; 5 | } -------------------------------------------------------------------------------- /src/main/webapp/front/css/canvas-bg-4.css: -------------------------------------------------------------------------------- 1 | html, body { 2 | margin: 0; 3 | padding: 0; 4 | } 5 | 6 | #canvas { 7 | position: fixed; 8 | left: 0; 9 | top: 0; 10 | background: radial-gradient(ellipse farthest-corner at center top, #000d4d 0%, #000105 100%);; 11 | } -------------------------------------------------------------------------------- /src/main/webapp/front/css/canvas-bg-6.css: -------------------------------------------------------------------------------- 1 | html, body { 2 | margin: 0; 3 | padding: 0; 4 | } 5 | 6 | #canvas { 7 | position: fixed; 8 | left: 0; 9 | top: 0; 10 | background: #000000; 11 | } -------------------------------------------------------------------------------- /src/main/webapp/front/css/common.css: -------------------------------------------------------------------------------- 1 | /** 2 | * 工具类css 3 | */ 4 | /* 嵌套文字横线 */ 5 | .line-container { 6 | width: 100%; 7 | background: url(../img/line.jpg) left center repeat-x; 8 | text-align: center; 9 | } 10 | .line { 11 | display: inline-block; 12 | padding: 0 10px; 13 | text-align: center; 14 | font-family: 'Microsoft Yahei'; 15 | font-size: 24px; 16 | background: #fff; 17 | color: #000000; 18 | line-height: 1.3; 19 | } 20 | /** 21 | * 工具类css end 22 | */ -------------------------------------------------------------------------------- /src/main/webapp/front/css/theme.css: -------------------------------------------------------------------------------- 1 | /* 导航栏 */ 2 | .nav { 3 | background: #F3F3F3; 4 | } 5 | 6 | .layui-nav .layui-nav-item a { 7 | color: #31C27C; 8 | } 9 | 10 | .layui-nav .layui-this:after, 11 | .layui-nav-bar, 12 | .layui-nav-tree .layui-nav-itemed:after { 13 | background-color: #31C27C; 14 | } 15 | 16 | .layui-nav .layui-nav-item a:hover { 17 | color: #FFFFFF; 18 | background-color: #31C27C; 19 | } 20 | 21 | .layui-nav .layui-nav-child dd.layui-this a, 22 | .layui-nav-child dd.layui-this { 23 | background-color: #31C27C; 24 | } 25 | 26 | .layui-nav-tree .layui-nav-child dd.layui-this, .layui-nav-tree .layui-nav-child dd.layui-this a, .layui-nav-tree .layui-this, .layui-nav-tree .layui-this>a, .layui-nav-tree .layui-this>a:hover { 27 | background-color: #31C27C; 28 | color: #fff; 29 | } 30 | 31 | /* 轮播图 */ 32 | .layui-carousel[lay-indicator=outside] .layui-carousel-ind ul { 33 | background-color: #FFFFFF; 34 | } 35 | 36 | .layui-carousel-ind li.layui-this { 37 | background-color: #31C27C; 38 | } 39 | 40 | .layui-carousel-ind li { 41 | background-color: #E0E0E0; 42 | } 43 | 44 | .layui-carousel-ind li:hover { 45 | background-color: #E0E0E0; 46 | } 47 | /* 首页标题 */ 48 | .index-title { 49 | color: #31C27C; 50 | } 51 | 52 | /* 首页新闻 */ 53 | .news-home-container { 54 | background: #e5e5e5; 55 | } 56 | 57 | .news-home-container .layui-colla-item { 58 | border: 1px solid #EEEEEE; 59 | } 60 | 61 | .news-home-container .layui-colla-content { 62 | background: #FFFFFF; 63 | } 64 | 65 | .news-home-container .layui-colla-title { 66 | background: #d1d1d1; 67 | border: 1px solid #EEEEEE; 68 | color: #515151; 69 | } 70 | 71 | .news-home-container .layui-colla-title:hover { 72 | background: #31C27C; 73 | color: #FFFFFF; 74 | } 75 | 76 | .news-home-container .layui-card-header { 77 | background: #d1d1d1; 78 | border: 1px solid #FFFFFF; 79 | color: #515151; 80 | } 81 | 82 | /* 图文列表 */ 83 | .data-container:nth-child(odd) { 84 | background-color: #F3F3F3; 85 | } 86 | 87 | .data-container .data-list .data-item:hover { 88 | border: 2px dashed #31C27C; 89 | } 90 | 91 | .data-container .data-list .data-item .title:hover { 92 | color: #FFFFFF; 93 | background: #31C27C; 94 | } 95 | 96 | 97 | .data-container .data-list .data-item .title { 98 | background: #f0f0f0; 99 | color: #31C27C; 100 | } 101 | 102 | .data-container .data-list .data-item .price { 103 | color: #31C27C; 104 | } 105 | 106 | /* 详情页 */ 107 | .data-detail { 108 | background: #FFFFFF; 109 | } 110 | 111 | .data-detail-breadcrumb { 112 | background: #EEEEEE; 113 | color: #515151; 114 | } 115 | 116 | .data-detail .title { 117 | color: #515151; 118 | border: 3px dotted #EEEEEE; 119 | } 120 | 121 | .data-detail .count-container { 122 | color: #FFFFFF; 123 | } 124 | 125 | .data-detail .count-container .number { 126 | background: #443b3b; 127 | } 128 | 129 | .data-detail .tool-container{ 130 | border: 3px dotted #EEEEEE; 131 | } 132 | 133 | .data-detail .price{ 134 | color: #31C27C; 135 | } 136 | 137 | 138 | .layui-tab-card>.layui-tab-title .layui-this { 139 | background-color: #31C27C; 140 | color: #FFFFFF; 141 | } 142 | 143 | /* 底部导航栏 */ 144 | .nav-bottom { 145 | background: #31C27C; 146 | } 147 | 148 | .nav-bottom .layui-nav-item a { 149 | color: #FFFFFF; 150 | } 151 | 152 | /* banner */ 153 | .banner { 154 | background: #31C27C; 155 | } 156 | 157 | /* 新闻资讯 */ 158 | .news-container .news-list .news-item .detail-container .h2 { 159 | color: #4e6990; 160 | } 161 | 162 | .news-container .news-list .news-item .detail-container .desc { 163 | color: #515151; 164 | } 165 | 166 | .news-container .news-list .news-item .detail-container .create-time { 167 | color: #515151; 168 | } 169 | 170 | .news-container .title { 171 | color: #31C27C; 172 | } 173 | 174 | 175 | .news-container .bottom-container .btn { 176 | background: #31C27C; 177 | color: #FFFFFF; 178 | } 179 | 180 | /* 论坛 */ 181 | 182 | .forum-container .bottom-container .btn { 183 | background: #31C27C; 184 | color: #FFFFFF; 185 | } 186 | 187 | .forum-container .forum-list .forum-item:hover { 188 | background: #31C27C; 189 | color: #FFFFFF; 190 | } 191 | 192 | .forum-container .forum-list .forum-item.line:hover { 193 | background: #31C27C; 194 | color: #FFFFFF; 195 | } 196 | 197 | /* 考试 */ 198 | .paper-container thead tr{ 199 | background: #31C27C ; 200 | color: #FFFFFF; 201 | } 202 | 203 | .paper-container tbody tr:hover{ 204 | color: #FFFFFF; 205 | background-color: #31C27C; 206 | } 207 | 208 | /* 个人中心 */ 209 | 210 | .center-container .layui-nav .layui-nav-more { 211 | border-color: #515151 transparent transparent; 212 | } 213 | 214 | .center-container .layui-nav-itemed>a, .layui-nav-tree .layui-nav-title a, .layui-nav-tree .layui-nav-title a:hover { 215 | color: #515151 !important; 216 | } 217 | 218 | .center-container .layui-nav .layui-nav-mored, .layui-nav-itemed>a .layui-nav-more { 219 | border-color: transparent transparent #515151; 220 | } 221 | 222 | .center-container .layui-nav { 223 | background-color: #FFFFFF; 224 | color: #515151; 225 | } 226 | 227 | .center-container .layui-nav-itemed>.layui-nav-child { 228 | background-color: #FFFFFF !important; 229 | } 230 | 231 | .center-container .layui-nav-tree .layui-nav-bar { 232 | width: 5px; 233 | height: 0; 234 | background-color: #31C27C; 235 | } 236 | 237 | /* 分页插件 */ 238 | .layui-laypage .layui-laypage-curr .layui-laypage-em { 239 | background-color: #31C27C; 240 | } 241 | 242 | .layui-laypage a:hover { 243 | color: #31C27C; 244 | } 245 | 246 | .btn-submit { 247 | background: #31C27C; 248 | } 249 | 250 | .btn-theme{ 251 | background: #31C27C; 252 | } 253 | 254 | 255 | /* checkbox */ 256 | .layui-form-radio>i:hover, .layui-form-radioed>i { 257 | color: #31C27C; 258 | } 259 | 260 | .layui-form-select dl dd.layui-this { 261 | background-color: #31C27C; 262 | color: #fff; 263 | } 264 | 265 | .layui-tab-brief>.layui-tab-title .layui-this { 266 | color: #31C27C; 267 | } 268 | 269 | .layui-tab-brief>.layui-tab-more li.layui-this:after, .layui-tab-brief>.layui-tab-title .layui-this:after { 270 | border-bottom: 2px solid #31C27C; 271 | } -------------------------------------------------------------------------------- /src/main/webapp/front/elementui/fonts/element-icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsxj97/order-and-delivery-system/35b9df99f78e84a972d3905b742cdb243c667d28/src/main/webapp/front/elementui/fonts/element-icons.ttf -------------------------------------------------------------------------------- /src/main/webapp/front/elementui/fonts/element-icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsxj97/order-and-delivery-system/35b9df99f78e84a972d3905b742cdb243c667d28/src/main/webapp/front/elementui/fonts/element-icons.woff -------------------------------------------------------------------------------- /src/main/webapp/front/img/jianshe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsxj97/order-and-delivery-system/35b9df99f78e84a972d3905b742cdb243c667d28/src/main/webapp/front/img/jianshe.png -------------------------------------------------------------------------------- /src/main/webapp/front/img/jiaotong.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsxj97/order-and-delivery-system/35b9df99f78e84a972d3905b742cdb243c667d28/src/main/webapp/front/img/jiaotong.png -------------------------------------------------------------------------------- /src/main/webapp/front/img/nongye.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsxj97/order-and-delivery-system/35b9df99f78e84a972d3905b742cdb243c667d28/src/main/webapp/front/img/nongye.png -------------------------------------------------------------------------------- /src/main/webapp/front/img/now.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsxj97/order-and-delivery-system/35b9df99f78e84a972d3905b742cdb243c667d28/src/main/webapp/front/img/now.png -------------------------------------------------------------------------------- /src/main/webapp/front/img/seckilling.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsxj97/order-and-delivery-system/35b9df99f78e84a972d3905b742cdb243c667d28/src/main/webapp/front/img/seckilling.jpg -------------------------------------------------------------------------------- /src/main/webapp/front/img/select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsxj97/order-and-delivery-system/35b9df99f78e84a972d3905b742cdb243c667d28/src/main/webapp/front/img/select.png -------------------------------------------------------------------------------- /src/main/webapp/front/img/unselect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsxj97/order-and-delivery-system/35b9df99f78e84a972d3905b742cdb243c667d28/src/main/webapp/front/img/unselect.png -------------------------------------------------------------------------------- /src/main/webapp/front/img/weixin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsxj97/order-and-delivery-system/35b9df99f78e84a972d3905b742cdb243c667d28/src/main/webapp/front/img/weixin.png -------------------------------------------------------------------------------- /src/main/webapp/front/img/yuan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsxj97/order-and-delivery-system/35b9df99f78e84a972d3905b742cdb243c667d28/src/main/webapp/front/img/yuan.png -------------------------------------------------------------------------------- /src/main/webapp/front/img/zhifubao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsxj97/order-and-delivery-system/35b9df99f78e84a972d3905b742cdb243c667d28/src/main/webapp/front/img/zhifubao.png -------------------------------------------------------------------------------- /src/main/webapp/front/img/zhongguo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsxj97/order-and-delivery-system/35b9df99f78e84a972d3905b742cdb243c667d28/src/main/webapp/front/img/zhongguo.png -------------------------------------------------------------------------------- /src/main/webapp/front/js/canvas-bg-web-1.js: -------------------------------------------------------------------------------- 1 | window.requestAnimFrame = (function() { 2 | return window.requestAnimationFrame || 3 | window.webkitRequestAnimationFrame || 4 | window.mozRequestAnimationFrame || 5 | window.oRequestAnimationFrame || 6 | window.msRequestAnimationFrame || 7 | function(callback) { 8 | window.setTimeout(callback, 1000 / 60); 9 | }; 10 | })(); 11 | var c = document.getElementById('canvas'); 12 | var $ = c.getContext('2d'); 13 | var w = c.width = window.innerWidth; 14 | var h = c.height = window.innerHeight; 15 | var _w = w * 0.5; 16 | var _h = h * 0.5; 17 | var arr = []; 18 | var cnt = 0; 19 | 20 | window.addEventListener('load', resize); 21 | window.addEventListener('resize', resize, false); 22 | 23 | function resize() { 24 | c.width = w = window.innerWidth; 25 | c.height = h = window.innerHeight; 26 | c.style.position = 'absolute'; 27 | c.style.left = (window.innerWidth - w) * 28 | .01 + 'px'; 29 | c.style.top = (window.innerHeight - h) * 30 | .01 + 'px'; 31 | } 32 | 33 | function anim() { 34 | cnt++; 35 | if (cnt % 6) draw(); 36 | window.requestAnimFrame(anim); 37 | } 38 | anim(); 39 | 40 | function draw() { 41 | var splot = { 42 | x: rng(_w - 900, _w + 900), 43 | y: rng(_h - 900, _h + 900), 44 | r: rng(20, 80), 45 | spX: rng(-1, 1), 46 | spY: rng(-1, 1) 47 | }; 48 | 49 | arr.push(splot); 50 | while (arr.length > 100) { 51 | arr.shift(); 52 | } 53 | $.clearRect(0, 0, w, h); 54 | 55 | for (var i = 0; i < arr.length; i++) { 56 | 57 | splot = arr[i];; 58 | $.fillStyle = rndCol(); 59 | $.beginPath(); 60 | $.arc(splot.x, splot.y, splot.r, 0, Math.PI * 2, true); 61 | $.shadowBlur = 80; 62 | $.shadowOffsetX = 2; 63 | $.shadowOffsetY = 2; 64 | $.shadowColor = rndCol(); 65 | $.globalCompositeOperation = 'lighter'; 66 | $.fill(); 67 | 68 | splot.x = splot.x + splot.spX; 69 | splot.y = splot.y + splot.spY; 70 | splot.r = splot.r * 0.96; 71 | } 72 | } 73 | 74 | function rndCol() { 75 | var r = Math.floor(Math.random() * 180); 76 | var g = Math.floor(Math.random() * 60); 77 | var b = Math.floor(Math.random() * 100); 78 | return "rgb(" + r + "," + g + "," + b + ")"; 79 | } 80 | 81 | function rng(min, max) { 82 | return Math.floor(Math.random() * (max - min + 1)) + min; 83 | } 84 | -------------------------------------------------------------------------------- /src/main/webapp/front/js/canvas-bg-web-2.js: -------------------------------------------------------------------------------- 1 | var w = window.innerWidth; 2 | var h = window.innerHeight; 3 | var ctx = document.getElementById('canvas'); 4 | 5 | window.addEventListener('load', resize); 6 | window.addEventListener('resize', resize, false); 7 | 8 | function resize() { 9 | ctx.width = w = window.innerWidth; 10 | ctx.height = h = window.innerHeight; 11 | } 12 | 13 | resize(); 14 | 15 | let ctxfr = ctx.getContext('2d'); 16 | 17 | // min and max radius, radius threshold and percentage of filled circles 18 | var radMin = 5, 19 | radMax = 125, 20 | filledCircle = 60, //percentage of filled circles 21 | concentricCircle = 30, //percentage of concentric circles 22 | radThreshold = 25; //IFF special, over this radius concentric, otherwise filled 23 | 24 | //min and max speed to move 25 | var speedMin = 0.3, 26 | speedMax = 2.5; 27 | 28 | //max reachable opacity for every circle and blur effect 29 | var maxOpacity = 0.6; 30 | 31 | //default palette choice 32 | var colors = ['52,168,83', '117,95,147', '199,108,23', '194,62,55', '0,172,212', '120,120,120'], 33 | bgColors = ['52,168,83', '117,95,147', '199,108,23', '194,62,55', '0,172,212', '120,120,120'], 34 | circleBorder = 10, 35 | backgroundLine = bgColors[0]; 36 | var backgroundMlt = 0.85; 37 | 38 | //min distance for links 39 | var linkDist = Math.min(canvas.width, canvas.height) / 2.4, 40 | lineBorder = 2.5; 41 | 42 | //most importantly: number of overall circles and arrays containing them 43 | var maxCircles = 12, 44 | points = [], 45 | pointsBack = []; 46 | 47 | //populating the screen 48 | for (var i = 0; i < maxCircles * 2; i++) points.push(new Circle()); 49 | for (var i = 0; i < maxCircles; i++) pointsBack.push(new Circle(true)); 50 | 51 | //experimental vars 52 | var circleExp = 1, 53 | circleExpMax = 1.003, 54 | circleExpMin = 0.997, 55 | circleExpSp = 0.00004, 56 | circlePulse = false; 57 | 58 | //circle class 59 | function Circle(background) { 60 | //if background, it has different rules 61 | this.background = (background || false); 62 | this.x = randRange(-canvas.width / 2, canvas.width / 2); 63 | this.y = randRange(-canvas.height / 2, canvas.height / 2); 64 | this.radius = background ? hyperRange(radMin, radMax) * backgroundMlt : hyperRange(radMin, radMax); 65 | this.filled = this.radius < radThreshold ? (randint(0, 100) > filledCircle ? false : 'full') : (randint(0, 100) > 66 | concentricCircle ? false : 'concentric'); 67 | this.color = background ? bgColors[randint(0, bgColors.length - 1)] : colors[randint(0, colors.length - 1)]; 68 | this.borderColor = background ? bgColors[randint(0, bgColors.length - 1)] : colors[randint(0, colors.length - 1)]; 69 | this.opacity = 0.05; 70 | this.speed = (background ? randRange(speedMin, speedMax) / backgroundMlt : randRange(speedMin, speedMax)); // * (radMin / this.radius); 71 | this.speedAngle = Math.random() * 2 * Math.PI; 72 | this.speedx = Math.cos(this.speedAngle) * this.speed; 73 | this.speedy = Math.sin(this.speedAngle) * this.speed; 74 | var spacex = Math.abs((this.x - (this.speedx < 0 ? -1 : 1) * (canvas.width / 2 + this.radius)) / this.speedx), 75 | spacey = Math.abs((this.y - (this.speedy < 0 ? -1 : 1) * (canvas.height / 2 + this.radius)) / this.speedy); 76 | this.ttl = Math.min(spacex, spacey); 77 | }; 78 | 79 | Circle.prototype.init = function() { 80 | Circle.call(this, this.background); 81 | } 82 | 83 | //support functions 84 | //generate random int a<=x<=b 85 | function randint(a, b) { 86 | return Math.floor(Math.random() * (b - a + 1) + a); 87 | } 88 | //generate random float 89 | function randRange(a, b) { 90 | return Math.random() * (b - a) + a; 91 | } 92 | //generate random float more likely to be close to a 93 | function hyperRange(a, b) { 94 | return Math.random() * Math.random() * Math.random() * (b - a) + a; 95 | } 96 | 97 | //rendering function 98 | function drawCircle(ctx, circle) { 99 | //circle.radius *= circleExp; 100 | var radius = circle.background ? circle.radius *= circleExp : circle.radius /= circleExp; 101 | ctx.beginPath(); 102 | ctx.arc(circle.x, circle.y, radius * circleExp, 0, 2 * Math.PI, false); 103 | ctx.lineWidth = Math.max(1, circleBorder * (radMin - circle.radius) / (radMin - radMax)); 104 | ctx.strokeStyle = ['rgba(', circle.borderColor, ',', circle.opacity, ')'].join(''); 105 | if (circle.filled == 'full') { 106 | ctx.fillStyle = ['rgba(', circle.borderColor, ',', circle.background ? circle.opacity * 0.8 : circle.opacity, ')'] 107 | .join(''); 108 | ctx.fill(); 109 | ctx.lineWidth = 0; 110 | ctx.strokeStyle = ['rgba(', circle.borderColor, ',', 0, ')'].join(''); 111 | } 112 | ctx.stroke(); 113 | if (circle.filled == 'concentric') { 114 | ctx.beginPath(); 115 | ctx.arc(circle.x, circle.y, radius / 2, 0, 2 * Math.PI, false); 116 | ctx.lineWidth = Math.max(1, circleBorder * (radMin - circle.radius) / (radMin - radMax)); 117 | ctx.strokeStyle = ['rgba(', circle.color, ',', circle.opacity, ')'].join(''); 118 | ctx.stroke(); 119 | } 120 | circle.x += circle.speedx; 121 | circle.y += circle.speedy; 122 | if (circle.opacity < (circle.background ? maxOpacity : 1)) circle.opacity += 0.01; 123 | circle.ttl--; 124 | } 125 | 126 | //initializing function 127 | function init() { 128 | window.requestAnimationFrame(draw); 129 | } 130 | 131 | //rendering function 132 | function draw() { 133 | 134 | if (circlePulse) { 135 | if (circleExp < circleExpMin || circleExp > circleExpMax) circleExpSp *= -1; 136 | circleExp += circleExpSp; 137 | } 138 | 139 | ctxfr.globalCompositeOperation = 'destination-over'; 140 | ctxfr.clearRect(0, 0, canvas.width, canvas.height); // clear canvas 141 | 142 | ctxfr.save(); 143 | ctxfr.translate(canvas.width / 2, canvas.height / 2); 144 | 145 | //function to render each single circle, its connections and to manage its out of boundaries replacement 146 | function renderPoints(ctx, arr) { 147 | for (var i = 0; i < arr.length; i++) { 148 | var circle = arr[i]; 149 | //checking if out of boundaries 150 | if (circle.ttl < 0) {} 151 | var xEscape = canvas.width / 2 + circle.radius, 152 | yEscape = canvas.height / 2 + circle.radius; 153 | if (circle.ttl < -20) arr[i].init(arr[i].background); 154 | //if (Math.abs(circle.y) > yEscape || Math.abs(circle.x) > xEscape) arr[i].init(arr[i].background); 155 | drawCircle(ctx, circle); 156 | } 157 | for (var i = 0; i < arr.length - 1; i++) { 158 | for (var j = i + 1; j < arr.length; j++) { 159 | var deltax = arr[i].x - arr[j].x; 160 | var deltay = arr[i].y - arr[j].y; 161 | var dist = Math.pow(Math.pow(deltax, 2) + Math.pow(deltay, 2), 0.5); 162 | //if the circles are overlapping, no laser connecting them 163 | if (dist <= arr[i].radius + arr[j].radius) continue; 164 | //otherwise we connect them only if the dist is < linkDist 165 | if (dist < linkDist) { 166 | var xi = (arr[i].x < arr[j].x ? 1 : -1) * Math.abs(arr[i].radius * deltax / dist); 167 | var yi = (arr[i].y < arr[j].y ? 1 : -1) * Math.abs(arr[i].radius * deltay / dist); 168 | var xj = (arr[i].x < arr[j].x ? -1 : 1) * Math.abs(arr[j].radius * deltax / dist); 169 | var yj = (arr[i].y < arr[j].y ? -1 : 1) * Math.abs(arr[j].radius * deltay / dist); 170 | ctx.beginPath(); 171 | ctx.moveTo(arr[i].x + xi, arr[i].y + yi); 172 | ctx.lineTo(arr[j].x + xj, arr[j].y + yj); 173 | var samecolor = arr[i].color == arr[j].color; 174 | ctx.strokeStyle = ["rgba(", arr[i].borderColor, ",", Math.min(arr[i].opacity, arr[j].opacity) * ((linkDist - 175 | dist) / linkDist), ")"].join(""); 176 | ctx.lineWidth = (arr[i].background ? lineBorder * backgroundMlt : lineBorder) * ((linkDist - dist) / linkDist); //*((linkDist-dist)/linkDist); 177 | ctx.stroke(); 178 | } 179 | } 180 | } 181 | } 182 | 183 | renderPoints(ctxfr, points); 184 | ctxfr.restore(); 185 | 186 | window.requestAnimationFrame(draw); 187 | } 188 | 189 | init(); 190 | -------------------------------------------------------------------------------- /src/main/webapp/front/js/canvas-bg-web-3.js: -------------------------------------------------------------------------------- 1 | var canvas, 2 | ctx, 3 | width, 4 | height, 5 | size, 6 | lines, 7 | tick; 8 | 9 | function line() { 10 | this.path = []; 11 | this.speed = rand(10, 20); 12 | this.count = randInt(10, 30); 13 | this.x = width / 2, +1; 14 | this.y = height / 2 + 1; 15 | this.target = { 16 | x: width / 2, 17 | y: height / 2 18 | }; 19 | this.dist = 0; 20 | this.angle = 0; 21 | this.hue = tick / 5; 22 | this.life = 1; 23 | this.updateAngle(); 24 | this.updateDist(); 25 | } 26 | 27 | line.prototype.step = function(i) { 28 | this.x += Math.cos(this.angle) * this.speed; 29 | this.y += Math.sin(this.angle) * this.speed; 30 | 31 | this.updateDist(); 32 | 33 | if (this.dist < this.speed) { 34 | this.x = this.target.x; 35 | this.y = this.target.y; 36 | this.changeTarget(); 37 | } 38 | 39 | this.path.push({ 40 | x: this.x, 41 | y: this.y 42 | }); 43 | if (this.path.length > this.count) { 44 | this.path.shift(); 45 | } 46 | 47 | this.life -= 0.001; 48 | 49 | if (this.life <= 0) { 50 | this.path = null; 51 | lines.splice(i, 1); 52 | } 53 | }; 54 | 55 | line.prototype.updateDist = function() { 56 | var dx = this.target.x - this.x, 57 | dy = this.target.y - this.y; 58 | this.dist = Math.sqrt(dx * dx + dy * dy); 59 | } 60 | 61 | line.prototype.updateAngle = function() { 62 | var dx = this.target.x - this.x, 63 | dy = this.target.y - this.y; 64 | this.angle = Math.atan2(dy, dx); 65 | } 66 | 67 | line.prototype.changeTarget = function() { 68 | var randStart = randInt(0, 3); 69 | switch (randStart) { 70 | case 0: // up 71 | this.target.y = this.y - size; 72 | break; 73 | case 1: // right 74 | this.target.x = this.x + size; 75 | break; 76 | case 2: // down 77 | this.target.y = this.y + size; 78 | break; 79 | case 3: // left 80 | this.target.x = this.x - size; 81 | } 82 | this.updateAngle(); 83 | }; 84 | 85 | line.prototype.draw = function(i) { 86 | ctx.beginPath(); 87 | var rando = rand(0, 10); 88 | for (var j = 0, length = this.path.length; j < length; j++) { 89 | ctx[(j === 0) ? 'moveTo' : 'lineTo'](this.path[j].x + rand(-rando, rando), this.path[j].y + 90 | rand(-rando, rando)); 91 | } 92 | ctx.strokeStyle = 'hsla(' + rand(this.hue, this.hue + 30) + ', 80%, 55%, ' + (this.life / 3) + ')'; 93 | ctx.lineWidth = rand(0.1, 2); 94 | ctx.stroke(); 95 | }; 96 | 97 | function rand(min, max) { 98 | return Math.random() * (max - min) + min; 99 | } 100 | 101 | function randInt(min, max) { 102 | return Math.floor(min + Math.random() * (max - min + 1)); 103 | }; 104 | 105 | function init() { 106 | canvas = document.getElementById('canvas'); 107 | ctx = canvas.getContext('2d'); 108 | size = 30; 109 | lines = []; 110 | reset(); 111 | loop(); 112 | } 113 | 114 | function reset() { 115 | width = Math.ceil(window.innerWidth / 2) * 2; 116 | height = Math.ceil(window.innerHeight / 2) * 2; 117 | tick = 0; 118 | 119 | lines.length = 0; 120 | canvas.width = width; 121 | canvas.height = height; 122 | } 123 | 124 | function create() { 125 | if (tick % 10 === 0) { 126 | lines.push(new line()); 127 | } 128 | } 129 | 130 | function step() { 131 | var i = lines.length; 132 | while (i--) { 133 | lines[i].step(i); 134 | } 135 | } 136 | 137 | function clear() { 138 | ctx.globalCompositeOperation = 'destination-out'; 139 | ctx.fillStyle = 'hsla(0, 0%, 0%, 0.1)'; 140 | ctx.fillRect(0, 0, width, height); 141 | ctx.globalCompositeOperation = 'lighter'; 142 | } 143 | 144 | function draw() { 145 | ctx.save(); 146 | ctx.translate(width / 2, height / 2); 147 | ctx.rotate(tick * 0.001); 148 | var scale = 0.8 + Math.cos(tick * 0.02) * 0.2; 149 | ctx.scale(scale, scale); 150 | ctx.translate(-width / 2, -height / 2); 151 | var i = lines.length; 152 | while (i--) { 153 | lines[i].draw(i); 154 | } 155 | ctx.restore(); 156 | } 157 | 158 | function loop() { 159 | requestAnimationFrame(loop); 160 | create(); 161 | step(); 162 | clear(); 163 | draw(); 164 | tick++; 165 | } 166 | 167 | function onresize() { 168 | reset(); 169 | } 170 | 171 | window.addEventListener('resize', onresize); 172 | 173 | init(); 174 | -------------------------------------------------------------------------------- /src/main/webapp/front/js/canvas-bg-web-5.js: -------------------------------------------------------------------------------- 1 | var canvas = document.getElementById('canvas'), 2 | ctx = canvas.getContext('2d') 3 | canvas.width = window.innerWidth; 4 | canvas.height = window.innerHeight; 5 | ctx.lineWidth = .3; 6 | ctx.strokeStyle = (new Color(150)).style; 7 | 8 | var mousePosition = { 9 | x: 30 * canvas.width / 100, 10 | y: 30 * canvas.height / 100 11 | }; 12 | 13 | var dots = { 14 | nb: 750, 15 | distance: 50, 16 | d_radius: 100, 17 | array: [] 18 | }; 19 | 20 | function colorValue(min) { 21 | return Math.floor(Math.random() * 255 + min); 22 | } 23 | 24 | function createColorStyle(r, g, b) { 25 | return 'rgba(' + r + ',' + g + ',' + b + ', 0.8)'; 26 | } 27 | 28 | function mixComponents(comp1, weight1, comp2, weight2) { 29 | return (comp1 * weight1 + comp2 * weight2) / (weight1 + weight2); 30 | } 31 | 32 | function averageColorStyles(dot1, dot2) { 33 | var color1 = dot1.color, 34 | color2 = dot2.color; 35 | 36 | var r = mixComponents(color1.r, dot1.radius, color2.r, dot2.radius), 37 | g = mixComponents(color1.g, dot1.radius, color2.g, dot2.radius), 38 | b = mixComponents(color1.b, dot1.radius, color2.b, dot2.radius); 39 | return createColorStyle(Math.floor(r), Math.floor(g), Math.floor(b)); 40 | } 41 | 42 | function Color(min) { 43 | min = min || 0; 44 | this.r = colorValue(min); 45 | this.g = colorValue(min); 46 | this.b = colorValue(min); 47 | this.style = createColorStyle(this.r, this.g, this.b); 48 | } 49 | 50 | function Dot() { 51 | this.x = Math.random() * canvas.width; 52 | this.y = Math.random() * canvas.height; 53 | 54 | this.vx = -.5 + Math.random(); 55 | this.vy = -.5 + Math.random(); 56 | 57 | this.radius = Math.random() * 2; 58 | 59 | this.color = new Color(); 60 | // console.log(this); 61 | } 62 | 63 | Dot.prototype = { 64 | draw: function() { 65 | ctx.beginPath(); 66 | ctx.fillStyle = this.color.style; 67 | ctx.arc(this.x, this.y, this.radius, 0, Math.PI * 2, false); 68 | ctx.fill(); 69 | } 70 | }; 71 | 72 | function createDots() { 73 | for (i = 0; i < dots.nb; i++) { 74 | dots.array.push(new Dot()); 75 | } 76 | } 77 | 78 | function moveDots() { 79 | for (i = 0; i < dots.nb; i++) { 80 | 81 | var dot = dots.array[i]; 82 | 83 | if (dot.y < 0 || dot.y > canvas.height) { 84 | dot.vx = dot.vx; 85 | dot.vy = -dot.vy; 86 | } else if (dot.x < 0 || dot.x > canvas.width) { 87 | dot.vx = -dot.vx; 88 | dot.vy = dot.vy; 89 | } 90 | dot.x += dot.vx; 91 | dot.y += dot.vy; 92 | } 93 | } 94 | 95 | function connectDots() { 96 | for (i = 0; i < dots.nb; i++) { 97 | for (j = 0; j < dots.nb; j++) { 98 | i_dot = dots.array[i]; 99 | j_dot = dots.array[j]; 100 | 101 | if ((i_dot.x - j_dot.x) < dots.distance && (i_dot.y - j_dot.y) < dots.distance && (i_dot.x - 102 | j_dot.x) > -dots.distance && (i_dot.y - j_dot.y) > -dots.distance) { 103 | if ((i_dot.x - mousePosition.x) < dots.d_radius && (i_dot.y - mousePosition.y) < dots 104 | .d_radius && (i_dot.x - mousePosition.x) > -dots.d_radius && (i_dot.y - mousePosition 105 | .y) > -dots.d_radius) { 106 | ctx.beginPath(); 107 | ctx.strokeStyle = averageColorStyles(i_dot, j_dot); 108 | ctx.moveTo(i_dot.x, i_dot.y); 109 | ctx.lineTo(j_dot.x, j_dot.y); 110 | ctx.stroke(); 111 | ctx.closePath(); 112 | } 113 | } 114 | } 115 | } 116 | } 117 | 118 | function drawDots() { 119 | for (i = 0; i < dots.nb; i++) { 120 | var dot = dots.array[i]; 121 | dot.draw(); 122 | } 123 | } 124 | 125 | function animateDots() { 126 | ctx.clearRect(0, 0, canvas.width, canvas.height); 127 | moveDots(); 128 | connectDots(); 129 | drawDots(); 130 | 131 | requestAnimationFrame(animateDots); 132 | } 133 | 134 | canvas.addEventListener('mousemove', function(e) { 135 | mousePosition.x = e.pageX; 136 | mousePosition.y = e.pageY; 137 | }) 138 | // canvas.on('mousemove', function(e) { 139 | // mousePosition.x = e.pageX; 140 | // mousePosition.y = e.pageY; 141 | // }); 142 | canvas.addEventListener('mouseleave', function(e) { 143 | mousePosition.x = canvas.width / 2; 144 | mousePosition.y = canvas.height / 2; 145 | }) 146 | // canvas.on('mouseleave', function(e) { 147 | // mousePosition.x = canvas.width / 2; 148 | // mousePosition.y = canvas.height / 2; 149 | // }); 150 | 151 | createDots(); 152 | requestAnimationFrame(animateDots); 153 | -------------------------------------------------------------------------------- /src/main/webapp/front/js/config.js: -------------------------------------------------------------------------------- 1 | 2 | var projectName = '校园外卖配送系统'; 3 | /** 4 | * 轮播图配置 5 | */ 6 | var swiper = { 7 | // 设定轮播容器宽度,支持像素和百分比 8 | width: '100%', 9 | height: '400px', 10 | // hover(悬停显示) 11 | // always(始终显示) 12 | // none(始终不显示) 13 | arrow: 'none', 14 | // default(左右切换) 15 | // updown(上下切换) 16 | // fade(渐隐渐显切换) 17 | anim: 'default', 18 | // 自动切换的时间间隔 19 | // 默认3000 20 | interval: 2000, 21 | // 指示器位置 22 | // inside(容器内部) 23 | // outside(容器外部) 24 | // none(不显示) 25 | indicator: 'outside' 26 | } 27 | 28 | /** 29 | * 个人中心菜单 30 | */ 31 | var centerMenu = [{ 32 | name: '个人中心', 33 | url: '../' + localStorage.getItem('userTable') + '/center.jsp' 34 | }, 35 | { 36 | name: '我的收藏', 37 | url: '../storeup/list.jsp' 38 | } 39 | ] 40 | 41 | 42 | var indexNav = [ 43 | 44 | { 45 | name: '特色美食', 46 | url: './pages/tesemeishi/list.jsp' 47 | }, 48 | 49 | { 50 | name: '公告信息', 51 | url: './pages/news/list.jsp' 52 | }, 53 | ] 54 | 55 | var adminurl = "http://localhost:8080/jspmv0k22/index.jsp"; 56 | 57 | var cartFlag = false 58 | 59 | var chatFlag = false 60 | 61 | 62 | chatFlag = true 63 | 64 | 65 | var menu = [{"backMenu":[{"child":[{"appFrontIcon":"cuIcon-form","buttons":["新增","查看","修改","删除"],"menu":"用户","menuJump":"列表","tableName":"yonghu"}],"menu":"用户管理"},{"child":[{"appFrontIcon":"cuIcon-discover","buttons":["新增","查看","修改","删除"],"menu":"配送员","menuJump":"列表","tableName":"peisongyuan"}],"menu":"配送员管理"},{"child":[{"appFrontIcon":"cuIcon-form","buttons":["新增","查看","修改","删除"],"menu":"美食分类","menuJump":"列表","tableName":"meishifenlei"}],"menu":"美食分类管理"},{"child":[{"appFrontIcon":"cuIcon-addressbook","buttons":["新增","查看","修改","删除","查看评论"],"menu":"特色美食","menuJump":"列表","tableName":"tesemeishi"}],"menu":"特色美食管理"},{"child":[{"appFrontIcon":"cuIcon-brand","buttons":["查看","修改","删除"],"menu":"订单信息","menuJump":"列表","tableName":"dingdanxinxi"}],"menu":"订单信息管理"},{"child":[{"appFrontIcon":"cuIcon-keyboard","buttons":["查看","修改","删除","审核","支付"],"menu":"订单取消","menuJump":"列表","tableName":"dingdanquxiao"}],"menu":"订单取消管理"},{"child":[{"appFrontIcon":"cuIcon-time","buttons":["查看","修改","删除","审核"],"menu":"配送接单","menuJump":"列表","tableName":"peisongjiedan"}],"menu":"配送接单管理"},{"child":[{"appFrontIcon":"cuIcon-flashlightopen","buttons":["删除","修改","查看"],"menu":"取消配送","menuJump":"列表","tableName":"quxiaopeisong"}],"menu":"取消配送管理"},{"child":[{"appFrontIcon":"cuIcon-camera","buttons":["查看","修改","删除"],"menu":"送达通知","menuJump":"列表","tableName":"songdatongzhi"}],"menu":"送达通知管理"},{"child":[{"appFrontIcon":"cuIcon-news","buttons":["新增","查看","修改","删除"],"menu":"公告信息","tableName":"news"},{"appFrontIcon":"cuIcon-service","buttons":["新增","查看","修改","删除"],"menu":"在线客服","tableName":"chat"},{"appFrontIcon":"cuIcon-album","buttons":["新增","查看","修改","删除"],"menu":"轮播图管理","tableName":"config"}],"menu":"系统管理"}],"frontMenu":[{"child":[{"appFrontIcon":"cuIcon-list","buttons":["查看","查看评论","立即购买"],"menu":"特色美食列表","menuJump":"列表","tableName":"tesemeishi"}],"menu":"特色美食模块"}],"hasBackLogin":"是","hasBackRegister":"否","hasFrontLogin":"否","hasFrontRegister":"否","roleName":"管理员","tableName":"users"},{"backMenu":[{"child":[{"appFrontIcon":"cuIcon-brand","buttons":["查看","删除","支付","撤消订单"],"menu":"订单信息","menuJump":"列表","tableName":"dingdanxinxi"}],"menu":"订单信息管理"},{"child":[{"appFrontIcon":"cuIcon-keyboard","buttons":["查看","删除"],"menu":"订单取消","menuJump":"列表","tableName":"dingdanquxiao"}],"menu":"订单取消管理"},{"child":[{"appFrontIcon":"cuIcon-time","buttons":["查看","删除"],"menu":"配送接单","menuJump":"列表","tableName":"peisongjiedan"}],"menu":"配送接单管理"},{"child":[{"appFrontIcon":"cuIcon-flashlightopen","buttons":["删除","查看"],"menu":"取消配送","menuJump":"列表","tableName":"quxiaopeisong"}],"menu":"取消配送管理"},{"child":[{"appFrontIcon":"cuIcon-camera","buttons":["查看","删除"],"menu":"送达通知","menuJump":"列表","tableName":"songdatongzhi"}],"menu":"送达通知管理"}],"frontMenu":[{"child":[{"appFrontIcon":"cuIcon-list","buttons":["查看","查看评论","立即购买"],"menu":"特色美食列表","menuJump":"列表","tableName":"tesemeishi"}],"menu":"特色美食模块"}],"hasBackLogin":"是","hasBackRegister":"否","hasFrontLogin":"是","hasFrontRegister":"是","roleName":"用户","tableName":"yonghu"},{"backMenu":[{"child":[{"appFrontIcon":"cuIcon-brand","buttons":["查看","接单"],"menu":"订单信息","menuJump":"列表","tableName":"dingdanxinxi"}],"menu":"订单信息管理"},{"child":[{"appFrontIcon":"cuIcon-time","buttons":["查看","删除","送达通知","取消配送"],"menu":"配送接单","menuJump":"列表","tableName":"peisongjiedan"}],"menu":"配送接单管理"},{"child":[{"appFrontIcon":"cuIcon-flashlightopen","buttons":["查看","删除"],"menu":"取消配送","menuJump":"列表","tableName":"quxiaopeisong"}],"menu":"取消配送管理"},{"child":[{"appFrontIcon":"cuIcon-camera","buttons":["查看","删除"],"menu":"送达通知","menuJump":"列表","tableName":"songdatongzhi"}],"menu":"送达通知管理"}],"frontMenu":[{"child":[{"appFrontIcon":"cuIcon-list","buttons":["查看","查看评论","立即购买"],"menu":"特色美食列表","menuJump":"列表","tableName":"tesemeishi"}],"menu":"特色美食模块"}],"hasBackLogin":"是","hasBackRegister":"否","hasFrontLogin":"是","hasFrontRegister":"是","roleName":"配送员","tableName":"peisongyuan"}] 66 | 67 | 68 | var isAuth = function (tableName,key) { 69 | let role = localStorage.getItem("userTable"); 70 | let menus = menu; 71 | for(let i=0;i 3 | 4 | 5 | 6 | 7 | <%@ include file="jsp/static/head.jsp"%> 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | <%@ include file="jsp/static/topNav.jsp"%> 29 | 30 | 31 | 32 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 主页 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 欢迎使用xxx系统 74 | 75 | 76 | 77 | 78 | 79 | 80 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | <%@ include file="jsp/static/foot.jsp"%> 95 | 96 | 125 | 126 | 127 | 128 | -------------------------------------------------------------------------------- /src/main/webapp/jsp/pay.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | <%@ include file="static/head.jsp"%> 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | <%@ include file="static/topNav.jsp"%> 26 | 27 | 28 | 29 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 支付 50 | 51 | 52 | 53 | 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 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 支付 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 121 | 122 | 123 | <%@ include file="static/foot.jsp"%> 124 | 126 | 128 | 129 | 177 | 178 | 179 | 180 | -------------------------------------------------------------------------------- /src/main/webapp/jsp/static/crossBtnControl.js: -------------------------------------------------------------------------------- 1 | function crossBtnControl(btnName){ 2 | var role = window.sessionStorage.getItem('role'); 3 | 4 | for(var i=0;i 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/webapp/jsp/static/getRoleButtons.js: -------------------------------------------------------------------------------- 1 | function getRoleButtons() { 2 | var role = window.sessionStorage.getItem('role'); 3 | var allButtons = ["新增", "修改", "查看", "删除", "审核", "回复", "发货", "确认收货", "报表", "支付", "查看评论", "打印", "导出", "导入", "日销量", "月销量", "年销量", "品销量", "类销量", "日销额", "月销额", "年销额", "品销额", "类销额","物流","爬取"]; 4 | for (var i = 0; i < menus.length; i++) { 5 | // 找到当前登录角色的菜单 6 | if (menus[i].roleName == role) { 7 | //后台菜单 8 | var backMenu = menus[i].backMenu; 9 | for (var j = 0; j < backMenu.length; j++) { 10 | // 一级菜单 11 | var menuChild = backMenu[j].child; 12 | for (var k = 0; k < menuChild.length; k++) { 13 | // 二级菜单 14 | if (tableName == menuChild[k].tableName) { 15 | var buttons = menuChild[k].buttons; 16 | //console.log("you can see: "+buttons); 17 | //将allButtons剔除能看到的按钮,剩下的就是不能看到的按钮 18 | if(buttons && buttons.length>0){ 19 | for(var l=0;l= 0; n--) { 32 | elements[n].parentNode.removeChild(elements[n]); 33 | } 34 | } 35 | } 36 | 37 | } 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/webapp/jsp/static/head.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 校园外卖配送系统 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/main/webapp/jsp/static/logout.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | function logout() { 4 | $.ajax({ 5 | type: "GET", 6 | url: baseUrl + "users/logout", 7 | beforeSend: function(xhr) { 8 | xhr.setRequestHeader("token", window.sessionStorage.getItem('token')); 9 | }, 10 | success: function(res){ 11 | if(res.code == 0 || res.code == 401){ 12 | window.sessionStorage.clear(); 13 | window.location.href="${pageContext.request.contextPath}/jsp/login.jsp" 14 | }else{ 15 | alert(res.msg); 16 | } 17 | }, 18 | }); 19 | } 20 | function toFront() { 21 | window.location.assign(baseUrl+'front'); 22 | } -------------------------------------------------------------------------------- /src/main/webapp/jsp/static/md5.js: -------------------------------------------------------------------------------- 1 | /* 2 | * * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message 3 | * * Digest Algorithm, as defined in RFC 1321. 4 | * * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002. 5 | * * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet 6 | * * Distributed under the BSD License 7 | * * See http://pajhome.org.uk/crypt/md5 for more info. 8 | * */ 9 | 10 | /* 11 | * * Configurable variables. You may need to tweak these to be compatible with 12 | * * the server-side, but the defaults work in most cases. 13 | * */ 14 | var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */ 15 | var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */ 16 | var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */ 17 | 18 | /* 19 | * * These are the functions you'll usually want to call 20 | * * They take string arguments and return either hex or base-64 encoded strings 21 | * */ 22 | function hex_md5(s){ return binl2hex(core_md5(str2binl(s), s.length * chrsz));} 23 | function b64_md5(s){ return binl2b64(core_md5(str2binl(s), s.length * chrsz));} 24 | function str_md5(s){ return binl2str(core_md5(str2binl(s), s.length * chrsz));} 25 | function hex_hmac_md5(key, data) { return binl2hex(core_hmac_md5(key, data)); } 26 | function b64_hmac_md5(key, data) { return binl2b64(core_hmac_md5(key, data)); } 27 | function str_hmac_md5(key, data) { return binl2str(core_hmac_md5(key, data)); } 28 | 29 | /* 30 | * * Perform a simple self-test to see if the VM is working 31 | * */ 32 | function md5_vm_test() 33 | { 34 | return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72"; 35 | } 36 | 37 | /* 38 | * * Calculate the MD5 of an array of little-endian words, and a bit length 39 | * */ 40 | function core_md5(x, len) 41 | { 42 | /* append padding */ 43 | x[len >> 5] |= 0x80 << ((len) % 32); 44 | x[(((len + 64) >>> 9) << 4) + 14] = len; 45 | 46 | var a = 1732584193; 47 | var b = -271733879; 48 | var c = -1732584194; 49 | var d = 271733878; 50 | 51 | for(var i = 0; i < x.length; i += 16) 52 | { 53 | var olda = a; 54 | var oldb = b; 55 | var oldc = c; 56 | var oldd = d; 57 | 58 | a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936); 59 | d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586); 60 | c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819); 61 | b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330); 62 | a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897); 63 | d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426); 64 | c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341); 65 | b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983); 66 | a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416); 67 | d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417); 68 | c = md5_ff(c, d, a, b, x[i+10], 17, -42063); 69 | b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162); 70 | a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682); 71 | d = md5_ff(d, a, b, c, x[i+13], 12, -40341101); 72 | c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290); 73 | b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329); 74 | 75 | a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510); 76 | d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632); 77 | c = md5_gg(c, d, a, b, x[i+11], 14, 643717713); 78 | b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302); 79 | a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691); 80 | d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083); 81 | c = md5_gg(c, d, a, b, x[i+15], 14, -660478335); 82 | b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848); 83 | a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438); 84 | d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690); 85 | c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961); 86 | b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501); 87 | a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467); 88 | d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784); 89 | c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473); 90 | b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734); 91 | 92 | a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558); 93 | d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463); 94 | c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562); 95 | b = md5_hh(b, c, d, a, x[i+14], 23, -35309556); 96 | a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060); 97 | d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353); 98 | c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632); 99 | b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640); 100 | a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174); 101 | d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222); 102 | c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979); 103 | b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189); 104 | a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487); 105 | d = md5_hh(d, a, b, c, x[i+12], 11, -421815835); 106 | c = md5_hh(c, d, a, b, x[i+15], 16, 530742520); 107 | b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651); 108 | 109 | a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844); 110 | d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415); 111 | c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905); 112 | b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055); 113 | a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571); 114 | d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606); 115 | c = md5_ii(c, d, a, b, x[i+10], 15, -1051523); 116 | b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799); 117 | a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359); 118 | d = md5_ii(d, a, b, c, x[i+15], 10, -30611744); 119 | c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380); 120 | b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649); 121 | a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070); 122 | d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379); 123 | c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259); 124 | b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551); 125 | 126 | a = safe_add(a, olda); 127 | b = safe_add(b, oldb); 128 | c = safe_add(c, oldc); 129 | d = safe_add(d, oldd); 130 | } 131 | return Array(a, b, c, d); 132 | 133 | } 134 | 135 | /* 136 | * * These functions implement the four basic operations the algorithm uses. 137 | * */ 138 | function md5_cmn(q, a, b, x, s, t) 139 | { 140 | return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b); 141 | } 142 | function md5_ff(a, b, c, d, x, s, t) 143 | { 144 | return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t); 145 | } 146 | function md5_gg(a, b, c, d, x, s, t) 147 | { 148 | return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t); 149 | } 150 | function md5_hh(a, b, c, d, x, s, t) 151 | { 152 | return md5_cmn(b ^ c ^ d, a, b, x, s, t); 153 | } 154 | function md5_ii(a, b, c, d, x, s, t) 155 | { 156 | return md5_cmn(c ^ (b | (~d)), a, b, x, s, t); 157 | } 158 | 159 | /* 160 | * * Calculate the HMAC-MD5, of a key and some data 161 | * */ 162 | function core_hmac_md5(key, data) 163 | { 164 | var bkey = str2binl(key); 165 | if(bkey.length > 16) bkey = core_md5(bkey, key.length * chrsz); 166 | 167 | var ipad = Array(16), opad = Array(16); 168 | for(var i = 0; i < 16; i++) 169 | { 170 | ipad[i] = bkey[i] ^ 0x36363636; 171 | opad[i] = bkey[i] ^ 0x5C5C5C5C; 172 | } 173 | 174 | var hash = core_md5(ipad.concat(str2binl(data)), 512 + data.length * chrsz); 175 | return core_md5(opad.concat(hash), 512 + 128); 176 | } 177 | 178 | /* 179 | * * Add integers, wrapping at 2^32. This uses 16-bit operations internally 180 | * * to work around bugs in some JS interpreters. 181 | * */ 182 | function safe_add(x, y) 183 | { 184 | var lsw = (x & 0xFFFF) + (y & 0xFFFF); 185 | var msw = (x >> 16) + (y >> 16) + (lsw >> 16); 186 | return (msw << 16) | (lsw & 0xFFFF); 187 | } 188 | 189 | /* 190 | * * Bitwise rotate a 32-bit number to the left. 191 | * */ 192 | function bit_rol(num, cnt) 193 | { 194 | return (num << cnt) | (num >>> (32 - cnt)); 195 | } 196 | 197 | /* 198 | * * Convert a string to an array of little-endian words 199 | * * If chrsz is ASCII, characters >255 have their hi-byte silently ignored. 200 | * */ 201 | function str2binl(str) 202 | { 203 | var bin = Array(); 204 | var mask = (1 << chrsz) - 1; 205 | for(var i = 0; i < str.length * chrsz; i += chrsz) 206 | bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (i%32); 207 | return bin; 208 | } 209 | 210 | /* 211 | * * Convert an array of little-endian words to a string 212 | * */ 213 | function binl2str(bin) 214 | { 215 | var str = ""; 216 | var mask = (1 << chrsz) - 1; 217 | for(var i = 0; i < bin.length * 32; i += chrsz) 218 | str += String.fromCharCode((bin[i>>5] >>> (i % 32)) & mask); 219 | return str; 220 | } 221 | 222 | /* 223 | * * Convert an array of little-endian words to a hex string. 224 | * */ 225 | function binl2hex(binarray) 226 | { 227 | var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; 228 | var str = ""; 229 | for(var i = 0; i < binarray.length * 4; i++) 230 | { 231 | str += hex_tab.charAt((binarray[i>>2] >> ((i%4)*8+4)) & 0xF) + 232 | hex_tab.charAt((binarray[i>>2] >> ((i%4)*8 )) & 0xF); 233 | } 234 | return str; 235 | } 236 | 237 | /* 238 | * * Convert an array of little-endian words to a base-64 string 239 | * */ 240 | function binl2b64(binarray) 241 | { 242 | var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; 243 | var str = ""; 244 | for(var i = 0; i < binarray.length * 4; i += 3) 245 | { 246 | var triplet = (((binarray[i >> 2] >> 8 * ( i %4)) & 0xFF) << 16) 247 | | (((binarray[i+1 >> 2] >> 8 * ((i+1)%4)) & 0xFF) << 8 ) 248 | | ((binarray[i+2 >> 2] >> 8 * ((i+2)%4)) & 0xFF); 249 | for(var j = 0; j < 4; j++) 250 | { 251 | if(i * 8 + j * 6 > binarray.length * 32) str += b64pad; 252 | else str += tab.charAt((triplet >> 6*(3-j)) & 0x3F); 253 | } 254 | } 255 | return str; 256 | } 257 | -------------------------------------------------------------------------------- /src/main/webapp/jsp/static/myInfo.js: -------------------------------------------------------------------------------- 1 | //设置用户个人中心入口 2 | if(window.sessionStorage.getItem('role') != '管理员'){ 3 | var accountTableName = window.sessionStorage.getItem('accountTableName'); 4 | $('#myinfo').attr('href','#'); 5 | $('#myinfo').on('click', function(e) { 6 | e.preventDefault(); 7 | http(accountTableName+'/session','GET',{},(res)=>{ 8 | if(res.code == 0){ 9 | window.sessionStorage.setItem('id',res.data.id); 10 | window.sessionStorage.setItem('onlyme',true); 11 | window.location.href = baseUrl + 'jsp/modules/' + accountTableName + '/user-info.jsp'; 12 | } 13 | }); 14 | }); 15 | } 16 | -------------------------------------------------------------------------------- /src/main/webapp/jsp/static/setMenu.js: -------------------------------------------------------------------------------- 1 | function setMenu(){ 2 | $('#navUl').append("个人中心修改密码个人信息") 3 | var role = window.sessionStorage.getItem('role'); 4 | if(menus) { 5 | for(var i=0;i6 && menuChild[k].tableName.substr(0, 6)=="orders") { 43 | //订单管理 44 | var orderStatus = menuChild[k].tableName.substr(7); 45 | childHrefAttr = "${pageContext.request.contextPath}/jsp/modules/orders/list.jsp?orderStatus="+orderStatus ; 46 | }else { 47 | childHrefAttr = "${pageContext.request.contextPath}/jsp/modules/" + menuChild[k].tableName + "/list.jsp" ; 48 | } 49 | secondMenuName = menuChild[k].tableName; 50 | } 51 | menuChildHref.setAttribute('href',childHrefAttr); 52 | menuChildHref.innerHTML = menuChild[k].menu ; 53 | menuChildDiv.appendChild(menuChildHref); 54 | } 55 | menuItem.appendChild(menuChildDiv); 56 | $('#navUl').append(menuItem); 57 | } 58 | } 59 | } 60 | } else { 61 | http("menu/list","GET",{ 62 | page: 1, 63 | limit: 1 64 | },(res)=>{ 65 | if(res.code == 0){ 66 | menus = eval('(' + res.data.list[0].menujson+ ')'); 67 | window.sessionStorage.setItem('menus',res.data.list[0].menujson) 68 | for(var i=0;i6 && menuChild[k].tableName.substr(0, 6)=="orders") { 106 | //订单管理 107 | var orderStatus = menuChild[k].tableName.substr(7); 108 | childHrefAttr = "${pageContext.request.contextPath}/jsp/modules/orders/list.jsp?orderStatus="+orderStatus ; 109 | }else { 110 | childHrefAttr = "${pageContext.request.contextPath}/jsp/modules/" + menuChild[k].tableName + "/list.jsp" ; 111 | } 112 | secondMenuName = menuChild[k].tableName; 113 | } 114 | menuChildHref.setAttribute('href',childHrefAttr); 115 | menuChildHref.innerHTML = menuChild[k].menu ; 116 | menuChildDiv.appendChild(menuChildHref); 117 | } 118 | menuItem.appendChild(menuChildDiv); 119 | $('#navUl').append(menuItem); 120 | } 121 | } 122 | } 123 | } 124 | }); 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /src/main/webapp/jsp/static/setMenu.js.bak: -------------------------------------------------------------------------------- 1 | function setMenu(){ 2 | $('#navUl').append("个人中心修改密码个人信息") 3 | var role = window.sessionStorage.getItem('role'); 4 | for(var i=0;i6 && menuChild[k].tableName.substr(0, 6)=="orders") { 42 | //订单管理 43 | var orderStatus = menuChild[k].tableName.substr(7); 44 | childHrefAttr = "${pageContext.request.contextPath}/jsp/modules/orders/list.jsp?orderStatus="+orderStatus ; 45 | }else { 46 | childHrefAttr = "${pageContext.request.contextPath}/jsp/modules/" + menuChild[k].tableName + "/list.jsp" ; 47 | } 48 | secondMenuName = menuChild[k].tableName; 49 | } 50 | menuChildHref.setAttribute('href',childHrefAttr); 51 | menuChildHref.innerHTML = menuChild[k].menu ; 52 | menuChildDiv.appendChild(menuChildHref); 53 | } 54 | menuItem.appendChild(menuChildDiv); 55 | $('#navUl').append(menuItem); 56 | } 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/main/webapp/jsp/static/toLogin.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | alert('token过期或未登录!') 5 | window.location.href="${pageContext.request.contextPath}/jsp/login.jsp" -------------------------------------------------------------------------------- /src/main/webapp/jsp/static/topNav.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 306 | 307 | 308 | 309 | 310 | 校园外卖配送系统 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 321 | 322 | 323 | 324 | 325 | 326 | 跳到前台 327 | 328 | 退出 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 343 | -------------------------------------------------------------------------------- /src/main/webapp/jsp/static/topNav.jsp.bak: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 后台管理系统 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 18 | 19 | 20 | 21 | John Willing 22 | 23 | 跳到前台 24 | 25 | 退出 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/main/webapp/jsp/static/utils.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 获取当前时间(yyyy-MM-dd hh:mm:ss) 3 | */ 4 | function getCurDateTime() { 5 | var currentTime = new Date(), 6 | year = currentTime.getFullYear(), 7 | month = currentTime.getMonth() + 1 < 10 ? '0' + (currentTime.getMonth() + 1) : currentTime.getMonth() + 1, 8 | day = currentTime.getDate() < 10 ? '0' + currentTime.getDate() : currentTime.getDate(), 9 | hour = currentTime.getHours(), 10 | minute = currentTime.getMinutes(), 11 | second = currentTime.getSeconds(); 12 | return year + "-" + month + "-" + day + " " +hour +":" +minute+":"+second; 13 | } 14 | 15 | /** 16 | * 获取当前日期(yyyy-MM-dd) 17 | */ 18 | function getCurDate() { 19 | var currentTime = new Date(), 20 | year = currentTime.getFullYear(), 21 | month = currentTime.getMonth() + 1 < 10 ? '0' + (currentTime.getMonth() + 1) : currentTime.getMonth() + 1, 22 | day = currentTime.getDate() < 10 ? '0' + currentTime.getDate() : currentTime.getDate(); 23 | return year + "-" + month + "-" + day; 24 | } 25 | 26 | -------------------------------------------------------------------------------- /src/main/webapp/jsp/utils/baseUrl.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | var baseUrl = "http://localhost:8080/jspmv0k22/"; 4 | var projectName = "校园外卖配送系统" 5 | 6 | /** 7 | * 网络请求 8 | * @param {Object} url 地址 9 | * @param {Object} method get/post 10 | * @param {Object} param 参数 11 | * @param {Object} callback 回调函数 12 | */ 13 | function http(url, type, data, callback) { 14 | url = baseUrl + url; 15 | $.ajax({ 16 | url: url, 17 | beforeSend: function(request) { 18 | request.setRequestHeader("token", window.sessionStorage.getItem("token")); 19 | }, 20 | contentType: 'application/x-www-form-urlencoded', 21 | data: data, 22 | dataType: 'json', 23 | type: type, 24 | success: function(result, status, xhr) { 25 | if (result.code == 0) { 26 | callback(result); 27 | } else if (result.code == 401) { 28 | window.location.href = '${pageContext.request.contextPath}/jsp/login.jsp'; 29 | } else { 30 | alert(result.msg) 31 | } 32 | }, 33 | error: function(xhr, status, error) { 34 | console.log(xhr, status, error) 35 | } 36 | }); 37 | } 38 | function httpApi(url, type, data, callback) { 39 | $.ajax({ 40 | url: url, 41 | contentType: 'application/x-www-form-urlencoded', 42 | data: data, 43 | dataType: 'json', 44 | type: type, 45 | success: function(result, status, xhr) { 46 | if (result.code == 0) { 47 | callback(result); 48 | } else { 49 | alert(result.msg) 50 | } 51 | }, 52 | error: function(xhr, status, error) { 53 | console.log(xhr, status, error) 54 | } 55 | }); 56 | } 57 | 58 | function httpJson(url, type, data, callback) { 59 | url = baseUrl + url; 60 | var params = null; 61 | if (data) { 62 | var params = JSON.stringify(data); 63 | } 64 | $.ajax({ 65 | url: url, 66 | beforeSend: function(request) { 67 | request.setRequestHeader("token", window.sessionStorage.getItem("token")); 68 | }, 69 | contentType: 'application/json', 70 | data: params, 71 | dataType: 'json', 72 | type: type, 73 | success: function(result, status, xhr) { 74 | if (result.code == 0) { 75 | callback(result); 76 | } else if (result.code == 401) { 77 | window.location.href = '${pageContext.request.contextPath}/jsp/login.jsp'; 78 | } else { 79 | alert(result.msg) 80 | } 81 | }, 82 | error: function(xhr, status, error) { 83 | console.log(xhr, status, error) 84 | } 85 | }); 86 | } 87 | -------------------------------------------------------------------------------- /src/main/webapp/jsp/utils/menu.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | var menus = [{"backMenu":[{"child":[{"appFrontIcon":"cuIcon-form","buttons":["新增","查看","修改","删除"],"menu":"用户","menuJump":"列表","tableName":"yonghu"}],"menu":"用户管理"},{"child":[{"appFrontIcon":"cuIcon-discover","buttons":["新增","查看","修改","删除"],"menu":"配送员","menuJump":"列表","tableName":"peisongyuan"}],"menu":"配送员管理"},{"child":[{"appFrontIcon":"cuIcon-form","buttons":["新增","查看","修改","删除"],"menu":"美食分类","menuJump":"列表","tableName":"meishifenlei"}],"menu":"美食分类管理"},{"child":[{"appFrontIcon":"cuIcon-addressbook","buttons":["新增","查看","修改","删除","查看评论"],"menu":"特色美食","menuJump":"列表","tableName":"tesemeishi"}],"menu":"特色美食管理"},{"child":[{"appFrontIcon":"cuIcon-brand","buttons":["查看","修改","删除"],"menu":"订单信息","menuJump":"列表","tableName":"dingdanxinxi"}],"menu":"订单信息管理"},{"child":[{"appFrontIcon":"cuIcon-keyboard","buttons":["查看","修改","删除","审核","支付"],"menu":"订单取消","menuJump":"列表","tableName":"dingdanquxiao"}],"menu":"订单取消管理"},{"child":[{"appFrontIcon":"cuIcon-time","buttons":["查看","修改","删除","审核"],"menu":"配送接单","menuJump":"列表","tableName":"peisongjiedan"}],"menu":"配送接单管理"},{"child":[{"appFrontIcon":"cuIcon-flashlightopen","buttons":["删除","修改","查看"],"menu":"取消配送","menuJump":"列表","tableName":"quxiaopeisong"}],"menu":"取消配送管理"},{"child":[{"appFrontIcon":"cuIcon-camera","buttons":["查看","修改","删除"],"menu":"送达通知","menuJump":"列表","tableName":"songdatongzhi"}],"menu":"送达通知管理"},{"child":[{"appFrontIcon":"cuIcon-news","buttons":["新增","查看","修改","删除"],"menu":"公告信息","tableName":"news"},{"appFrontIcon":"cuIcon-service","buttons":["新增","查看","修改","删除"],"menu":"在线客服","tableName":"chat"},{"appFrontIcon":"cuIcon-album","buttons":["新增","查看","修改","删除"],"menu":"轮播图管理","tableName":"config"}],"menu":"系统管理"}],"frontMenu":[{"child":[{"appFrontIcon":"cuIcon-list","buttons":["查看","查看评论","立即购买"],"menu":"特色美食列表","menuJump":"列表","tableName":"tesemeishi"}],"menu":"特色美食模块"}],"hasBackLogin":"是","hasBackRegister":"否","hasFrontLogin":"否","hasFrontRegister":"否","roleName":"管理员","tableName":"users"},{"backMenu":[{"child":[{"appFrontIcon":"cuIcon-brand","buttons":["查看","删除","支付","撤消订单"],"menu":"订单信息","menuJump":"列表","tableName":"dingdanxinxi"}],"menu":"订单信息管理"},{"child":[{"appFrontIcon":"cuIcon-keyboard","buttons":["查看","删除"],"menu":"订单取消","menuJump":"列表","tableName":"dingdanquxiao"}],"menu":"订单取消管理"},{"child":[{"appFrontIcon":"cuIcon-time","buttons":["查看","删除"],"menu":"配送接单","menuJump":"列表","tableName":"peisongjiedan"}],"menu":"配送接单管理"},{"child":[{"appFrontIcon":"cuIcon-flashlightopen","buttons":["删除","查看"],"menu":"取消配送","menuJump":"列表","tableName":"quxiaopeisong"}],"menu":"取消配送管理"},{"child":[{"appFrontIcon":"cuIcon-camera","buttons":["查看","删除"],"menu":"送达通知","menuJump":"列表","tableName":"songdatongzhi"}],"menu":"送达通知管理"}],"frontMenu":[{"child":[{"appFrontIcon":"cuIcon-list","buttons":["查看","查看评论","立即购买"],"menu":"特色美食列表","menuJump":"列表","tableName":"tesemeishi"}],"menu":"特色美食模块"}],"hasBackLogin":"是","hasBackRegister":"否","hasFrontLogin":"是","hasFrontRegister":"是","roleName":"用户","tableName":"yonghu"},{"backMenu":[{"child":[{"appFrontIcon":"cuIcon-brand","buttons":["查看","接单"],"menu":"订单信息","menuJump":"列表","tableName":"dingdanxinxi"}],"menu":"订单信息管理"},{"child":[{"appFrontIcon":"cuIcon-time","buttons":["查看","删除","送达通知","取消配送"],"menu":"配送接单","menuJump":"列表","tableName":"peisongjiedan"}],"menu":"配送接单管理"},{"child":[{"appFrontIcon":"cuIcon-flashlightopen","buttons":["查看","删除"],"menu":"取消配送","menuJump":"列表","tableName":"quxiaopeisong"}],"menu":"取消配送管理"},{"child":[{"appFrontIcon":"cuIcon-camera","buttons":["查看","删除"],"menu":"送达通知","menuJump":"列表","tableName":"songdatongzhi"}],"menu":"送达通知管理"}],"frontMenu":[{"child":[{"appFrontIcon":"cuIcon-list","buttons":["查看","查看评论","立即购买"],"menu":"特色美食列表","menuJump":"列表","tableName":"tesemeishi"}],"menu":"特色美食模块"}],"hasBackLogin":"是","hasBackRegister":"否","hasFrontLogin":"是","hasFrontRegister":"是","roleName":"配送员","tableName":"peisongyuan"}]; 4 | 5 | var hasMessage = ''; 6 | --------------------------------------------------------------------------------