├── .gitignore ├── README.md ├── image ├── 1.png ├── 10.png ├── 11.png ├── 12.png ├── 13.png ├── 2.png ├── 3.png ├── 4.png ├── 5.png ├── 6.png ├── 7.png ├── 8.png └── 9.png ├── limage ├── 1.png ├── 2.png └── 3.png ├── mvnw ├── mvnw.cmd ├── pom-war.xml ├── pom.xml └── src ├── main ├── java │ └── com │ │ ├── SpringbootSchemaApplication.java │ │ ├── annotation │ │ ├── APPLoginUser.java │ │ ├── IgnoreAuth.java │ │ └── LoginUser.java │ │ ├── config │ │ ├── AlipayConfig.java │ │ ├── InterceptorConfig.java │ │ └── MybatisPlusConfig.java │ │ ├── controller │ │ ├── AboutusController.java │ │ ├── AddressController.java │ │ ├── CartController.java │ │ ├── ChatController.java │ │ ├── CommonController.java │ │ ├── ConfigController.java │ │ ├── DiscussshangchengshangpinController.java │ │ ├── FileController.java │ │ ├── NewsController.java │ │ ├── OrdersController.java │ │ ├── ShangchengshangpinController.java │ │ ├── ShangjiaController.java │ │ ├── ShangpinzhongleiController.java │ │ ├── StoreupController.java │ │ ├── SystemintroController.java │ │ ├── UsersController.java │ │ └── YonghuController.java │ │ ├── dao │ │ ├── AboutusDao.java │ │ ├── AddressDao.java │ │ ├── CartDao.java │ │ ├── ChatDao.java │ │ ├── CommonDao.java │ │ ├── ConfigDao.java │ │ ├── DiscussshangchengshangpinDao.java │ │ ├── NewsDao.java │ │ ├── OrdersDao.java │ │ ├── ShangchengshangpinDao.java │ │ ├── ShangjiaDao.java │ │ ├── ShangpinzhongleiDao.java │ │ ├── StoreupDao.java │ │ ├── SystemintroDao.java │ │ ├── TokenDao.java │ │ ├── UsersDao.java │ │ └── YonghuDao.java │ │ ├── entity │ │ ├── AboutusEntity.java │ │ ├── AddressEntity.java │ │ ├── CartEntity.java │ │ ├── ChatEntity.java │ │ ├── ConfigEntity.java │ │ ├── DiscussshangchengshangpinEntity.java │ │ ├── EIException.java │ │ ├── NewsEntity.java │ │ ├── OrdersEntity.java │ │ ├── ShangchengshangpinEntity.java │ │ ├── ShangjiaEntity.java │ │ ├── ShangpinzhongleiEntity.java │ │ ├── StoreupEntity.java │ │ ├── SystemintroEntity.java │ │ ├── TokenEntity.java │ │ ├── UsersEntity.java │ │ ├── YonghuEntity.java │ │ ├── model │ │ │ ├── AboutusModel.java │ │ │ ├── AddressModel.java │ │ │ ├── CartModel.java │ │ │ ├── ChatModel.java │ │ │ ├── DiscussshangchengshangpinModel.java │ │ │ ├── NewsModel.java │ │ │ ├── OrdersModel.java │ │ │ ├── ShangchengshangpinModel.java │ │ │ ├── ShangjiaModel.java │ │ │ ├── ShangpinzhongleiModel.java │ │ │ ├── StoreupModel.java │ │ │ ├── SystemintroModel.java │ │ │ └── YonghuModel.java │ │ ├── view │ │ │ ├── AboutusView.java │ │ │ ├── AddressView.java │ │ │ ├── CartView.java │ │ │ ├── ChatView.java │ │ │ ├── DiscussshangchengshangpinView.java │ │ │ ├── NewsView.java │ │ │ ├── OrdersView.java │ │ │ ├── ShangchengshangpinView.java │ │ │ ├── ShangjiaView.java │ │ │ ├── ShangpinzhongleiView.java │ │ │ ├── StoreupView.java │ │ │ ├── SystemintroView.java │ │ │ └── YonghuView.java │ │ └── vo │ │ │ ├── AboutusVO.java │ │ │ ├── AddressVO.java │ │ │ ├── CartVO.java │ │ │ ├── ChatVO.java │ │ │ ├── DiscussshangchengshangpinVO.java │ │ │ ├── NewsVO.java │ │ │ ├── OrdersVO.java │ │ │ ├── ShangchengshangpinVO.java │ │ │ ├── ShangjiaVO.java │ │ │ ├── ShangpinzhongleiVO.java │ │ │ ├── StoreupVO.java │ │ │ ├── SystemintroVO.java │ │ │ └── YonghuVO.java │ │ ├── interceptor │ │ └── AuthorizationInterceptor.java │ │ ├── service │ │ ├── AboutusService.java │ │ ├── AddressService.java │ │ ├── CartService.java │ │ ├── ChatService.java │ │ ├── CommonService.java │ │ ├── ConfigService.java │ │ ├── DiscussshangchengshangpinService.java │ │ ├── NewsService.java │ │ ├── OrdersService.java │ │ ├── ShangchengshangpinService.java │ │ ├── ShangjiaService.java │ │ ├── ShangpinzhongleiService.java │ │ ├── StoreupService.java │ │ ├── SystemintroService.java │ │ ├── TokenService.java │ │ ├── UsersService.java │ │ ├── YonghuService.java │ │ └── impl │ │ │ ├── AboutusServiceImpl.java │ │ │ ├── AddressServiceImpl.java │ │ │ ├── CartServiceImpl.java │ │ │ ├── ChatServiceImpl.java │ │ │ ├── CommonServiceImpl.java │ │ │ ├── ConfigServiceImpl.java │ │ │ ├── DiscussshangchengshangpinServiceImpl.java │ │ │ ├── NewsServiceImpl.java │ │ │ ├── OrdersServiceImpl.java │ │ │ ├── ShangchengshangpinServiceImpl.java │ │ │ ├── ShangjiaServiceImpl.java │ │ │ ├── ShangpinzhongleiServiceImpl.java │ │ │ ├── StoreupServiceImpl.java │ │ │ ├── SystemintroServiceImpl.java │ │ │ ├── TokenServiceImpl.java │ │ │ ├── UsersServiceImpl.java │ │ │ └── YonghuServiceImpl.java │ │ └── utils │ │ ├── BaiduUtil.java │ │ ├── CommonUtil.java │ │ ├── FileUtil.java │ │ ├── HttpClientUtils.java │ │ ├── JQPageInfo.java │ │ ├── MD5Util.java │ │ ├── MPUtil.java │ │ ├── PageUtils.java │ │ ├── Query.java │ │ ├── R.java │ │ ├── SQLFilter.java │ │ ├── SpringContextUtils.java │ │ └── ValidatorUtils.java └── resources │ ├── application.yml │ └── mapper │ ├── AboutusDao.xml │ ├── AddressDao.xml │ ├── CartDao.xml │ ├── ChatDao.xml │ ├── CommonDao.xml │ ├── ConfigDao.xml │ ├── DiscussshangchengshangpinDao.xml │ ├── NewsDao.xml │ ├── OrdersDao.xml │ ├── ShangchengshangpinDao.xml │ ├── ShangjiaDao.xml │ ├── ShangpinzhongleiDao.xml │ ├── StoreupDao.xml │ ├── SystemintroDao.xml │ ├── TokenDao.xml │ ├── UsersDao.xml │ └── YonghuDao.xml └── test └── java └── com └── SpringbootSchemaApplicationTests.java /.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 基于Springboot的pc端仿淘宝系统(程序+论文) 2 | = 3 | ### 完整代码获取地址:从戎源码网 ([https://armycodes.com/](https://armycodes.com/)) 4 | ### 作者微信:19941326836 QQ:952045282 5 | ### 承接计算机毕业设计、Java毕业设计、Python毕业设计、深度学习、机器学习 6 | ### 选题+开题报告+任务书+程序定制+安装调试+论文+答辩ppt 一条龙服务 7 | ### 所有选题地址https://github.com/nature924/allProject 8 | 9 | 一、项目介绍 10 | --- 11 | 基于Spring Boot框架实现的pc端仿淘宝系统,系统包含三种角色:管理员、用户,商家主要功能如下。 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 | - 编程语言:Java 49 | - 数据库:MySQL 50 | - 项目管理工具:Maven 51 | - 前端技术:VUE、HTML、Jquery、Bootstrap 52 | - 后端技术:Spring、SpringMVC、MyBatis 53 | 54 | 三、运行环境 55 | --- 56 | - 操作系统:Windows、macOS都可以 57 | - JDK版本:JDK1.8以上都可以 58 | - 开发工具:IDEA、Ecplise、Myecplise都可以 59 | - 数据库: MySQL5.7以上都可以 60 | - Tomcat:任意版本都可以 61 | - Maven:任意版本都可以 62 | 63 | 四、运行截图 64 | --- 65 | ### 论文截图: 66 | ![image/1.png](limage/1.png) 67 | 68 | ### 程序截图: 69 | ![image/1.png](image/1.png) 70 | ![image/1.png](image/2.png) 71 | ![image/1.png](image/3.png) 72 | ![image/1.png](image/4.png) 73 | ![image/1.png](image/5.png) 74 | ![image/1.png](image/6.png) 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /image/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No249PC-imitation-of-Taobao-system/3514886c67cc05ea85ca4ab12593dc888eda132d/image/1.png -------------------------------------------------------------------------------- /image/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No249PC-imitation-of-Taobao-system/3514886c67cc05ea85ca4ab12593dc888eda132d/image/10.png -------------------------------------------------------------------------------- /image/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No249PC-imitation-of-Taobao-system/3514886c67cc05ea85ca4ab12593dc888eda132d/image/11.png -------------------------------------------------------------------------------- /image/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No249PC-imitation-of-Taobao-system/3514886c67cc05ea85ca4ab12593dc888eda132d/image/12.png -------------------------------------------------------------------------------- /image/13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No249PC-imitation-of-Taobao-system/3514886c67cc05ea85ca4ab12593dc888eda132d/image/13.png -------------------------------------------------------------------------------- /image/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No249PC-imitation-of-Taobao-system/3514886c67cc05ea85ca4ab12593dc888eda132d/image/2.png -------------------------------------------------------------------------------- /image/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No249PC-imitation-of-Taobao-system/3514886c67cc05ea85ca4ab12593dc888eda132d/image/3.png -------------------------------------------------------------------------------- /image/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No249PC-imitation-of-Taobao-system/3514886c67cc05ea85ca4ab12593dc888eda132d/image/4.png -------------------------------------------------------------------------------- /image/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No249PC-imitation-of-Taobao-system/3514886c67cc05ea85ca4ab12593dc888eda132d/image/5.png -------------------------------------------------------------------------------- /image/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No249PC-imitation-of-Taobao-system/3514886c67cc05ea85ca4ab12593dc888eda132d/image/6.png -------------------------------------------------------------------------------- /image/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No249PC-imitation-of-Taobao-system/3514886c67cc05ea85ca4ab12593dc888eda132d/image/7.png -------------------------------------------------------------------------------- /image/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No249PC-imitation-of-Taobao-system/3514886c67cc05ea85ca4ab12593dc888eda132d/image/8.png -------------------------------------------------------------------------------- /image/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No249PC-imitation-of-Taobao-system/3514886c67cc05ea85ca4ab12593dc888eda132d/image/9.png -------------------------------------------------------------------------------- /limage/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No249PC-imitation-of-Taobao-system/3514886c67cc05ea85ca4ab12593dc888eda132d/limage/1.png -------------------------------------------------------------------------------- /limage/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No249PC-imitation-of-Taobao-system/3514886c67cc05ea85ca4ab12593dc888eda132d/limage/2.png -------------------------------------------------------------------------------- /limage/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No249PC-imitation-of-Taobao-system/3514886c67cc05ea85ca4ab12593dc888eda132d/limage/3.png -------------------------------------------------------------------------------- /src/main/java/com/SpringbootSchemaApplication.java: -------------------------------------------------------------------------------- 1 | package com; 2 | 3 | import org.mybatis.spring.annotation.MapperScan; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | import org.springframework.boot.builder.SpringApplicationBuilder; 7 | import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; 8 | 9 | @SpringBootApplication 10 | @MapperScan(basePackages = {"com.dao"}) 11 | public class SpringbootSchemaApplication extends SpringBootServletInitializer{ 12 | 13 | public static void main(String[] args) { 14 | SpringApplication.run(SpringbootSchemaApplication.class, args); 15 | } 16 | 17 | @Override 18 | protected SpringApplicationBuilder configure(SpringApplicationBuilder applicationBuilder) { 19 | return applicationBuilder.sources(SpringbootSchemaApplication.class); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/com/annotation/APPLoginUser.java: -------------------------------------------------------------------------------- 1 | package com.annotation; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | /** 9 | * 登录用户信息 10 | */ 11 | @Target(ElementType.PARAMETER) 12 | @Retention(RetentionPolicy.RUNTIME) 13 | public @interface APPLoginUser { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/com/annotation/IgnoreAuth.java: -------------------------------------------------------------------------------- 1 | package com.annotation; 2 | 3 | import java.lang.annotation.*; 4 | 5 | /** 6 | * 忽略Token验证 7 | */ 8 | @Target(ElementType.METHOD) 9 | @Retention(RetentionPolicy.RUNTIME) 10 | @Documented 11 | public @interface IgnoreAuth { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/com/annotation/LoginUser.java: -------------------------------------------------------------------------------- 1 | package com.annotation; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | /** 9 | * 登录用户信息 10 | */ 11 | @Target(ElementType.PARAMETER) 12 | @Retention(RetentionPolicy.RUNTIME) 13 | public @interface LoginUser { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/com/config/AlipayConfig.java: -------------------------------------------------------------------------------- 1 | package com.config; 2 | 3 | import java.io.FileWriter; 4 | import java.io.IOException; 5 | 6 | /* * 7 | *类名:AlipayConfig 8 | *功能:基础配置类 9 | *详细:设置帐户有关信息及返回路径 10 | *修改日期:2017-04-05 11 | *说明: 12 | *以下代码只是为了方便商户测试而提供的样例代码,商户可以根据自己网站的需要,按照技术文档编写,并非一定要使用该代码。 13 | *该代码仅供学习和研究支付宝接口使用,只是提供一个参考。 14 | */ 15 | 16 | public class AlipayConfig { 17 | } 18 | 19 | -------------------------------------------------------------------------------- /src/main/java/com/config/InterceptorConfig.java: -------------------------------------------------------------------------------- 1 | package com.config; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.web.servlet.config.annotation.InterceptorRegistry; 6 | import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; 7 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport; 8 | 9 | import com.interceptor.AuthorizationInterceptor; 10 | 11 | @Configuration 12 | public class InterceptorConfig extends WebMvcConfigurationSupport{ 13 | 14 | @Bean 15 | public AuthorizationInterceptor getAuthorizationInterceptor() { 16 | return new AuthorizationInterceptor(); 17 | } 18 | 19 | @Override 20 | public void addInterceptors(InterceptorRegistry registry) { 21 | registry.addInterceptor(getAuthorizationInterceptor()).addPathPatterns("/**").excludePathPatterns("/static/**"); 22 | super.addInterceptors(registry); 23 | } 24 | 25 | /** 26 | * springboot 2.0配置WebMvcConfigurationSupport之后,会导致默认配置被覆盖,要访问静态资源需要重写addResourceHandlers方法 27 | */ 28 | @Override 29 | public void addResourceHandlers(ResourceHandlerRegistry registry) { 30 | registry.addResourceHandler("/**") 31 | .addResourceLocations("classpath:/resources/") 32 | .addResourceLocations("classpath:/static/") 33 | .addResourceLocations("classpath:/admin/") 34 | .addResourceLocations("classpath:/front/") 35 | .addResourceLocations("classpath:/public/"); 36 | super.addResourceHandlers(registry); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/com/config/MybatisPlusConfig.java: -------------------------------------------------------------------------------- 1 | 2 | package com.config; 3 | 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | 7 | import com.baomidou.mybatisplus.mapper.MetaObjectHandler; 8 | import com.baomidou.mybatisplus.plugins.PaginationInterceptor; 9 | 10 | /** 11 | * mybatis-plus配置 12 | */ 13 | @Configuration 14 | public class MybatisPlusConfig { 15 | 16 | /** 17 | * 分页插件 18 | */ 19 | @Bean 20 | public PaginationInterceptor paginationInterceptor() { 21 | return new PaginationInterceptor(); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/controller/ConfigController.java: -------------------------------------------------------------------------------- 1 | 2 | package com.controller; 3 | 4 | 5 | import java.util.Arrays; 6 | import java.util.Map; 7 | 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.web.bind.annotation.PathVariable; 10 | import org.springframework.web.bind.annotation.PostMapping; 11 | import org.springframework.web.bind.annotation.RequestBody; 12 | import org.springframework.web.bind.annotation.RequestMapping; 13 | import org.springframework.web.bind.annotation.RequestParam; 14 | import org.springframework.web.bind.annotation.RestController; 15 | 16 | import com.annotation.IgnoreAuth; 17 | import com.baomidou.mybatisplus.mapper.EntityWrapper; 18 | import com.entity.ConfigEntity; 19 | import com.service.ConfigService; 20 | import com.utils.MPUtil; 21 | import com.utils.PageUtils; 22 | import com.utils.R; 23 | import com.utils.ValidatorUtils; 24 | 25 | /** 26 | * 登录相关 27 | */ 28 | @RequestMapping("config") 29 | @RestController 30 | public class ConfigController{ 31 | 32 | @Autowired 33 | private ConfigService configService; 34 | 35 | /** 36 | * 列表 37 | */ 38 | @RequestMapping("/page") 39 | public R page(@RequestParam Map params,ConfigEntity config){ 40 | EntityWrapper ew = new EntityWrapper(); 41 | PageUtils page = configService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, config), params), params)); 42 | return R.ok().put("data", page); 43 | } 44 | 45 | /** 46 | * 列表 47 | */ 48 | @IgnoreAuth 49 | @RequestMapping("/list") 50 | public R list(@RequestParam Map params,ConfigEntity config){ 51 | EntityWrapper ew = new EntityWrapper(); 52 | PageUtils page = configService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, config), params), params)); 53 | return R.ok().put("data", page); 54 | } 55 | 56 | /** 57 | * 信息 58 | */ 59 | @RequestMapping("/info/{id}") 60 | public R info(@PathVariable("id") String id){ 61 | ConfigEntity config = configService.selectById(id); 62 | return R.ok().put("data", config); 63 | } 64 | 65 | /** 66 | * 详情 67 | */ 68 | @IgnoreAuth 69 | @RequestMapping("/detail/{id}") 70 | public R detail(@PathVariable("id") String id){ 71 | ConfigEntity config = configService.selectById(id); 72 | return R.ok().put("data", config); 73 | } 74 | 75 | /** 76 | * 根据name获取信息 77 | */ 78 | @RequestMapping("/info") 79 | public R infoByName(@RequestParam String name){ 80 | ConfigEntity config = configService.selectOne(new EntityWrapper().eq("name", "faceFile")); 81 | return R.ok().put("data", config); 82 | } 83 | 84 | /** 85 | * 保存 86 | */ 87 | @PostMapping("/save") 88 | public R save(@RequestBody ConfigEntity config){ 89 | // ValidatorUtils.validateEntity(config); 90 | configService.insert(config); 91 | return R.ok(); 92 | } 93 | 94 | /** 95 | * 修改 96 | */ 97 | @RequestMapping("/update") 98 | public R update(@RequestBody ConfigEntity config){ 99 | // ValidatorUtils.validateEntity(config); 100 | configService.updateById(config);//全部更新 101 | return R.ok(); 102 | } 103 | 104 | /** 105 | * 删除 106 | */ 107 | @RequestMapping("/delete") 108 | public R delete(@RequestBody Long[] ids){ 109 | configService.deleteBatchIds(Arrays.asList(ids)); 110 | return R.ok(); 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /src/main/java/com/dao/AboutusDao.java: -------------------------------------------------------------------------------- 1 | package com.dao; 2 | 3 | import com.entity.AboutusEntity; 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.AboutusVO; 12 | import com.entity.view.AboutusView; 13 | 14 | 15 | /** 16 | * 关于我们 17 | * 18 | * @author 19 | * @email 20 | * @date 2023-03-09 17:28:21 21 | */ 22 | public interface AboutusDao extends BaseMapper { 23 | 24 | List selectListVO(@Param("ew") Wrapper wrapper); 25 | 26 | AboutusVO 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 | AboutusView selectView(@Param("ew") Wrapper wrapper); 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/dao/AddressDao.java: -------------------------------------------------------------------------------- 1 | package com.dao; 2 | 3 | import com.entity.AddressEntity; 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.AddressVO; 12 | import com.entity.view.AddressView; 13 | 14 | 15 | /** 16 | * 地址 17 | * 18 | * @author 19 | * @email 20 | * @date 2023-03-09 17:28:21 21 | */ 22 | public interface AddressDao extends BaseMapper { 23 | 24 | List selectListVO(@Param("ew") Wrapper wrapper); 25 | 26 | AddressVO 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 | AddressView selectView(@Param("ew") Wrapper wrapper); 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/dao/CartDao.java: -------------------------------------------------------------------------------- 1 | package com.dao; 2 | 3 | import com.entity.CartEntity; 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.CartVO; 12 | import com.entity.view.CartView; 13 | 14 | 15 | /** 16 | * 购物车表 17 | * 18 | * @author 19 | * @email 20 | * @date 2023-03-09 17:28:21 21 | */ 22 | public interface CartDao extends BaseMapper { 23 | 24 | List selectListVO(@Param("ew") Wrapper wrapper); 25 | 26 | CartVO 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 | CartView selectView(@Param("ew") Wrapper wrapper); 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/dao/ChatDao.java: -------------------------------------------------------------------------------- 1 | package com.dao; 2 | 3 | import com.entity.ChatEntity; 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.ChatVO; 12 | import com.entity.view.ChatView; 13 | 14 | 15 | /** 16 | * 官方客服 17 | * 18 | * @author 19 | * @email 20 | * @date 2023-03-09 17:28:21 21 | */ 22 | public interface ChatDao extends BaseMapper { 23 | 24 | List selectListVO(@Param("ew") Wrapper wrapper); 25 | 26 | ChatVO 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 | ChatView selectView(@Param("ew") Wrapper wrapper); 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/dao/CommonDao.java: -------------------------------------------------------------------------------- 1 | 2 | package com.dao; 3 | 4 | import java.util.List; 5 | import java.util.Map; 6 | 7 | /** 8 | * 通用接口 9 | */ 10 | public interface CommonDao{ 11 | List getOption(Map params); 12 | 13 | Map getFollowByOption(Map params); 14 | 15 | List getFollowByOption2(Map params); 16 | 17 | void sh(Map params); 18 | 19 | int remindCount(Map params); 20 | 21 | Map selectCal(Map params); 22 | 23 | List> selectGroup(Map params); 24 | 25 | List> selectValue(Map params); 26 | 27 | List> selectTimeStatValue(Map params); 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/dao/ConfigDao.java: -------------------------------------------------------------------------------- 1 | 2 | package com.dao; 3 | 4 | import com.baomidou.mybatisplus.mapper.BaseMapper; 5 | import com.entity.ConfigEntity; 6 | 7 | /** 8 | * 配置 9 | */ 10 | public interface ConfigDao extends BaseMapper { 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/com/dao/DiscussshangchengshangpinDao.java: -------------------------------------------------------------------------------- 1 | package com.dao; 2 | 3 | import com.entity.DiscussshangchengshangpinEntity; 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.DiscussshangchengshangpinVO; 12 | import com.entity.view.DiscussshangchengshangpinView; 13 | 14 | 15 | /** 16 | * 商城商品评论表 17 | * 18 | * @author 19 | * @email 20 | * @date 2023-03-09 17:28:21 21 | */ 22 | public interface DiscussshangchengshangpinDao extends BaseMapper { 23 | 24 | List selectListVO(@Param("ew") Wrapper wrapper); 25 | 26 | DiscussshangchengshangpinVO 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 | DiscussshangchengshangpinView 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 2023-03-09 17:28:21 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/OrdersDao.java: -------------------------------------------------------------------------------- 1 | package com.dao; 2 | 3 | import com.entity.OrdersEntity; 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.OrdersVO; 12 | import com.entity.view.OrdersView; 13 | 14 | 15 | /** 16 | * 订单 17 | * 18 | * @author 19 | * @email 20 | * @date 2023-03-09 17:28:21 21 | */ 22 | public interface OrdersDao extends BaseMapper { 23 | 24 | List selectListVO(@Param("ew") Wrapper wrapper); 25 | 26 | OrdersVO 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 | OrdersView selectView(@Param("ew") Wrapper wrapper); 33 | 34 | 35 | List> selectValue(@Param("params") Map params,@Param("ew") Wrapper wrapper); 36 | 37 | List> selectTimeStatValue(@Param("params") Map params,@Param("ew") Wrapper wrapper); 38 | 39 | List> selectGroup(@Param("params") Map params,@Param("ew") Wrapper wrapper); 40 | 41 | 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/com/dao/ShangchengshangpinDao.java: -------------------------------------------------------------------------------- 1 | package com.dao; 2 | 3 | import com.entity.ShangchengshangpinEntity; 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.ShangchengshangpinVO; 12 | import com.entity.view.ShangchengshangpinView; 13 | 14 | 15 | /** 16 | * 商城商品 17 | * 18 | * @author 19 | * @email 20 | * @date 2023-03-09 17:28:21 21 | */ 22 | public interface ShangchengshangpinDao extends BaseMapper { 23 | 24 | List selectListVO(@Param("ew") Wrapper wrapper); 25 | 26 | ShangchengshangpinVO 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 | ShangchengshangpinView selectView(@Param("ew") Wrapper wrapper); 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/dao/ShangjiaDao.java: -------------------------------------------------------------------------------- 1 | package com.dao; 2 | 3 | import com.entity.ShangjiaEntity; 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.ShangjiaVO; 12 | import com.entity.view.ShangjiaView; 13 | 14 | 15 | /** 16 | * 商家 17 | * 18 | * @author 19 | * @email 20 | * @date 2023-03-09 17:28:21 21 | */ 22 | public interface ShangjiaDao extends BaseMapper { 23 | 24 | List selectListVO(@Param("ew") Wrapper wrapper); 25 | 26 | ShangjiaVO 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 | ShangjiaView selectView(@Param("ew") Wrapper wrapper); 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/dao/ShangpinzhongleiDao.java: -------------------------------------------------------------------------------- 1 | package com.dao; 2 | 3 | import com.entity.ShangpinzhongleiEntity; 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.ShangpinzhongleiVO; 12 | import com.entity.view.ShangpinzhongleiView; 13 | 14 | 15 | /** 16 | * 商品种类 17 | * 18 | * @author 19 | * @email 20 | * @date 2023-03-09 17:28:21 21 | */ 22 | public interface ShangpinzhongleiDao extends BaseMapper { 23 | 24 | List selectListVO(@Param("ew") Wrapper wrapper); 25 | 26 | ShangpinzhongleiVO 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 | ShangpinzhongleiView selectView(@Param("ew") Wrapper wrapper); 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/dao/StoreupDao.java: -------------------------------------------------------------------------------- 1 | package com.dao; 2 | 3 | import com.entity.StoreupEntity; 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.StoreupVO; 12 | import com.entity.view.StoreupView; 13 | 14 | 15 | /** 16 | * 收藏表 17 | * 18 | * @author 19 | * @email 20 | * @date 2023-03-09 17:28:21 21 | */ 22 | public interface StoreupDao extends BaseMapper { 23 | 24 | List selectListVO(@Param("ew") Wrapper wrapper); 25 | 26 | StoreupVO 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 | StoreupView selectView(@Param("ew") Wrapper wrapper); 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/dao/SystemintroDao.java: -------------------------------------------------------------------------------- 1 | package com.dao; 2 | 3 | import com.entity.SystemintroEntity; 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.SystemintroVO; 12 | import com.entity.view.SystemintroView; 13 | 14 | 15 | /** 16 | * 关于我们 17 | * 18 | * @author 19 | * @email 20 | * @date 2023-03-09 17:28:21 21 | */ 22 | public interface SystemintroDao extends BaseMapper { 23 | 24 | List selectListVO(@Param("ew") Wrapper wrapper); 25 | 26 | SystemintroVO 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 | SystemintroView selectView(@Param("ew") Wrapper wrapper); 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/dao/TokenDao.java: -------------------------------------------------------------------------------- 1 | 2 | package com.dao; 3 | 4 | import java.util.List; 5 | 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | import com.baomidou.mybatisplus.mapper.BaseMapper; 9 | import com.baomidou.mybatisplus.mapper.Wrapper; 10 | import com.baomidou.mybatisplus.plugins.pagination.Pagination; 11 | import com.entity.TokenEntity; 12 | 13 | /** 14 | * token 15 | */ 16 | public interface TokenDao extends BaseMapper { 17 | 18 | List selectListView(@Param("ew") Wrapper wrapper); 19 | 20 | List selectListView(Pagination page,@Param("ew") Wrapper wrapper); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/com/dao/UsersDao.java: -------------------------------------------------------------------------------- 1 | 2 | package com.dao; 3 | 4 | import java.util.List; 5 | 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | import com.baomidou.mybatisplus.mapper.BaseMapper; 9 | import com.baomidou.mybatisplus.mapper.Wrapper; 10 | import com.baomidou.mybatisplus.plugins.pagination.Pagination; 11 | import com.entity.UsersEntity; 12 | 13 | /** 14 | * 用户 15 | */ 16 | public interface UsersDao extends BaseMapper { 17 | 18 | List selectListView(@Param("ew") Wrapper wrapper); 19 | 20 | List selectListView(Pagination page,@Param("ew") Wrapper wrapper); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/com/dao/YonghuDao.java: -------------------------------------------------------------------------------- 1 | package com.dao; 2 | 3 | import com.entity.YonghuEntity; 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.YonghuVO; 12 | import com.entity.view.YonghuView; 13 | 14 | 15 | /** 16 | * 用户 17 | * 18 | * @author 19 | * @email 20 | * @date 2023-03-09 17:28:21 21 | */ 22 | public interface YonghuDao extends BaseMapper { 23 | 24 | List selectListVO(@Param("ew") Wrapper wrapper); 25 | 26 | YonghuVO 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 | YonghuView selectView(@Param("ew") Wrapper wrapper); 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/entity/AddressEntity.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 2023-03-09 17:28:21 30 | */ 31 | @TableName("address") 32 | public class AddressEntity implements Serializable { 33 | private static final long serialVersionUID = 1L; 34 | 35 | 36 | public AddressEntity() { 37 | 38 | } 39 | 40 | public AddressEntity(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 | * 用户id 56 | */ 57 | 58 | private Long userid; 59 | 60 | /** 61 | * 地址 62 | */ 63 | 64 | private String address; 65 | 66 | /** 67 | * 收货人 68 | */ 69 | 70 | private String name; 71 | 72 | /** 73 | * 电话 74 | */ 75 | 76 | private String phone; 77 | 78 | /** 79 | * 是否默认地址[是/否] 80 | */ 81 | 82 | private String isdefault; 83 | 84 | 85 | @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") 86 | @DateTimeFormat 87 | private Date addtime; 88 | 89 | public Date getAddtime() { 90 | return addtime; 91 | } 92 | public void setAddtime(Date addtime) { 93 | this.addtime = addtime; 94 | } 95 | 96 | public Long getId() { 97 | return id; 98 | } 99 | 100 | public void setId(Long id) { 101 | this.id = id; 102 | } 103 | /** 104 | * 设置:用户id 105 | */ 106 | public void setUserid(Long userid) { 107 | this.userid = userid; 108 | } 109 | /** 110 | * 获取:用户id 111 | */ 112 | public Long getUserid() { 113 | return userid; 114 | } 115 | /** 116 | * 设置:地址 117 | */ 118 | public void setAddress(String address) { 119 | this.address = address; 120 | } 121 | /** 122 | * 获取:地址 123 | */ 124 | public String getAddress() { 125 | return address; 126 | } 127 | /** 128 | * 设置:收货人 129 | */ 130 | public void setName(String name) { 131 | this.name = name; 132 | } 133 | /** 134 | * 获取:收货人 135 | */ 136 | public String getName() { 137 | return name; 138 | } 139 | /** 140 | * 设置:电话 141 | */ 142 | public void setPhone(String phone) { 143 | this.phone = phone; 144 | } 145 | /** 146 | * 获取:电话 147 | */ 148 | public String getPhone() { 149 | return phone; 150 | } 151 | /** 152 | * 设置:是否默认地址[是/否] 153 | */ 154 | public void setIsdefault(String isdefault) { 155 | this.isdefault = isdefault; 156 | } 157 | /** 158 | * 获取:是否默认地址[是/否] 159 | */ 160 | public String getIsdefault() { 161 | return isdefault; 162 | } 163 | 164 | } 165 | -------------------------------------------------------------------------------- /src/main/java/com/entity/ChatEntity.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 2023-03-09 17:28:21 30 | */ 31 | @TableName("chat") 32 | public class ChatEntity implements Serializable { 33 | private static final long serialVersionUID = 1L; 34 | 35 | 36 | public ChatEntity() { 37 | 38 | } 39 | 40 | public ChatEntity(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 | * 用户id 56 | */ 57 | 58 | private Long userid; 59 | 60 | /** 61 | * 管理员id 62 | */ 63 | 64 | private Long adminid; 65 | 66 | /** 67 | * 提问 68 | */ 69 | 70 | private String ask; 71 | 72 | /** 73 | * 回复 74 | */ 75 | 76 | private String reply; 77 | 78 | /** 79 | * 是否回复 80 | */ 81 | 82 | private Integer isreply; 83 | 84 | 85 | @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") 86 | @DateTimeFormat 87 | private Date addtime; 88 | 89 | public Date getAddtime() { 90 | return addtime; 91 | } 92 | public void setAddtime(Date addtime) { 93 | this.addtime = addtime; 94 | } 95 | 96 | public Long getId() { 97 | return id; 98 | } 99 | 100 | public void setId(Long id) { 101 | this.id = id; 102 | } 103 | /** 104 | * 设置:用户id 105 | */ 106 | public void setUserid(Long userid) { 107 | this.userid = userid; 108 | } 109 | /** 110 | * 获取:用户id 111 | */ 112 | public Long getUserid() { 113 | return userid; 114 | } 115 | /** 116 | * 设置:管理员id 117 | */ 118 | public void setAdminid(Long adminid) { 119 | this.adminid = adminid; 120 | } 121 | /** 122 | * 获取:管理员id 123 | */ 124 | public Long getAdminid() { 125 | return adminid; 126 | } 127 | /** 128 | * 设置:提问 129 | */ 130 | public void setAsk(String ask) { 131 | this.ask = ask; 132 | } 133 | /** 134 | * 获取:提问 135 | */ 136 | public String getAsk() { 137 | return ask; 138 | } 139 | /** 140 | * 设置:回复 141 | */ 142 | public void setReply(String reply) { 143 | this.reply = reply; 144 | } 145 | /** 146 | * 获取:回复 147 | */ 148 | public String getReply() { 149 | return reply; 150 | } 151 | /** 152 | * 设置:是否回复 153 | */ 154 | public void setIsreply(Integer isreply) { 155 | this.isreply = isreply; 156 | } 157 | /** 158 | * 获取:是否回复 159 | */ 160 | public Integer getIsreply() { 161 | return isreply; 162 | } 163 | 164 | } 165 | -------------------------------------------------------------------------------- /src/main/java/com/entity/ConfigEntity.java: -------------------------------------------------------------------------------- 1 | package com.entity; 2 | 3 | import java.io.Serializable; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableId; 6 | import com.baomidou.mybatisplus.annotations.TableName; 7 | import com.baomidou.mybatisplus.enums.IdType; 8 | 9 | /** 10 | * 类说明 : 11 | */ 12 | @TableName("config") 13 | public class ConfigEntity implements Serializable{ 14 | private static final long serialVersionUID = 1L; 15 | 16 | @TableId(type = IdType.AUTO) 17 | private Long id; 18 | 19 | /** 20 | * key 21 | */ 22 | private String name; 23 | 24 | /** 25 | * value 26 | */ 27 | private String value; 28 | 29 | public Long getId() { 30 | return id; 31 | } 32 | 33 | public void setId(Long id) { 34 | this.id = id; 35 | } 36 | 37 | public String getName() { 38 | return name; 39 | } 40 | 41 | public void setName(String name) { 42 | this.name = name; 43 | } 44 | 45 | public String getValue() { 46 | return value; 47 | } 48 | 49 | public void setValue(String value) { 50 | this.value = value; 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/com/entity/EIException.java: -------------------------------------------------------------------------------- 1 | 2 | package com.entity; 3 | 4 | /** 5 | * 自定义异常 6 | */ 7 | public class EIException extends RuntimeException { 8 | private static final long serialVersionUID = 1L; 9 | 10 | private String msg; 11 | private int code = 500; 12 | 13 | public EIException(String msg) { 14 | super(msg); 15 | this.msg = msg; 16 | } 17 | 18 | public EIException(String msg, Throwable e) { 19 | super(msg, e); 20 | this.msg = msg; 21 | } 22 | 23 | public EIException(String msg, int code) { 24 | super(msg); 25 | this.msg = msg; 26 | this.code = code; 27 | } 28 | 29 | public EIException(String msg, int code, Throwable e) { 30 | super(msg, e); 31 | this.msg = msg; 32 | this.code = code; 33 | } 34 | 35 | public String getMsg() { 36 | return msg; 37 | } 38 | 39 | public void setMsg(String msg) { 40 | this.msg = msg; 41 | } 42 | 43 | public int getCode() { 44 | return code; 45 | } 46 | 47 | public void setCode(int code) { 48 | this.code = code; 49 | } 50 | 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/entity/NewsEntity.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 2023-03-09 17:28:21 30 | */ 31 | @TableName("news") 32 | public class NewsEntity implements Serializable { 33 | private static final long serialVersionUID = 1L; 34 | 35 | 36 | public NewsEntity() { 37 | 38 | } 39 | 40 | public NewsEntity(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 title; 59 | 60 | /** 61 | * 简介 62 | */ 63 | 64 | private String introduction; 65 | 66 | /** 67 | * 图片 68 | */ 69 | 70 | private String picture; 71 | 72 | /** 73 | * 内容 74 | */ 75 | 76 | private String content; 77 | 78 | 79 | @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") 80 | @DateTimeFormat 81 | private Date addtime; 82 | 83 | public Date getAddtime() { 84 | return addtime; 85 | } 86 | public void setAddtime(Date addtime) { 87 | this.addtime = addtime; 88 | } 89 | 90 | public Long getId() { 91 | return id; 92 | } 93 | 94 | public void setId(Long id) { 95 | this.id = id; 96 | } 97 | /** 98 | * 设置:标题 99 | */ 100 | public void setTitle(String title) { 101 | this.title = title; 102 | } 103 | /** 104 | * 获取:标题 105 | */ 106 | public String getTitle() { 107 | return title; 108 | } 109 | /** 110 | * 设置:简介 111 | */ 112 | public void setIntroduction(String introduction) { 113 | this.introduction = introduction; 114 | } 115 | /** 116 | * 获取:简介 117 | */ 118 | public String getIntroduction() { 119 | return introduction; 120 | } 121 | /** 122 | * 设置:图片 123 | */ 124 | public void setPicture(String picture) { 125 | this.picture = picture; 126 | } 127 | /** 128 | * 获取:图片 129 | */ 130 | public String getPicture() { 131 | return picture; 132 | } 133 | /** 134 | * 设置:内容 135 | */ 136 | public void setContent(String content) { 137 | this.content = content; 138 | } 139 | /** 140 | * 获取:内容 141 | */ 142 | public String getContent() { 143 | return content; 144 | } 145 | 146 | } 147 | -------------------------------------------------------------------------------- /src/main/java/com/entity/ShangpinzhongleiEntity.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 2023-03-09 17:28:21 30 | */ 31 | @TableName("shangpinzhonglei") 32 | public class ShangpinzhongleiEntity implements Serializable { 33 | private static final long serialVersionUID = 1L; 34 | 35 | 36 | public ShangpinzhongleiEntity() { 37 | 38 | } 39 | 40 | public ShangpinzhongleiEntity(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 shangpinzhonglei; 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 setShangpinzhonglei(String shangpinzhonglei) { 83 | this.shangpinzhonglei = shangpinzhonglei; 84 | } 85 | /** 86 | * 获取:商品种类 87 | */ 88 | public String getShangpinzhonglei() { 89 | return shangpinzhonglei; 90 | } 91 | 92 | } 93 | -------------------------------------------------------------------------------- /src/main/java/com/entity/TokenEntity.java: -------------------------------------------------------------------------------- 1 | package com.entity; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | 6 | import com.baomidou.mybatisplus.annotations.TableId; 7 | import com.baomidou.mybatisplus.annotations.TableName; 8 | import com.baomidou.mybatisplus.enums.IdType; 9 | 10 | /** 11 | * token表 12 | */ 13 | @TableName("token") 14 | public class TokenEntity implements Serializable { 15 | private static final long serialVersionUID = 1L; 16 | 17 | @TableId(type = IdType.AUTO) 18 | private Long id; 19 | 20 | /** 21 | * 用户id 22 | */ 23 | private Long userid; 24 | 25 | /** 26 | * 用户名 27 | */ 28 | private String username; 29 | 30 | /** 31 | * 表名 32 | */ 33 | private String tablename; 34 | 35 | /** 36 | * 角色 37 | */ 38 | private String role; 39 | 40 | /** 41 | * token 42 | */ 43 | private String token; 44 | 45 | /** 46 | * 过期时间 47 | */ 48 | private Date expiratedtime; 49 | 50 | /** 51 | * 新增时间 52 | */ 53 | private Date addtime; 54 | 55 | public Long getId() { 56 | return id; 57 | } 58 | 59 | public void setId(Long id) { 60 | this.id = id; 61 | } 62 | 63 | public Long getUserid() { 64 | return userid; 65 | } 66 | 67 | public void setUserid(Long userid) { 68 | this.userid = userid; 69 | } 70 | 71 | public String getRole() { 72 | return role; 73 | } 74 | 75 | public void setRole(String role) { 76 | this.role = role; 77 | } 78 | 79 | public String getToken() { 80 | return token; 81 | } 82 | 83 | public String getTablename() { 84 | return tablename; 85 | } 86 | 87 | public void setTablename(String tablename) { 88 | this.tablename = tablename; 89 | } 90 | 91 | public void setToken(String token) { 92 | this.token = token; 93 | } 94 | 95 | public Date getExpiratedtime() { 96 | return expiratedtime; 97 | } 98 | 99 | public void setExpiratedtime(Date expiratedtime) { 100 | this.expiratedtime = expiratedtime; 101 | } 102 | 103 | public Date getAddtime() { 104 | return addtime; 105 | } 106 | 107 | public void setAddtime(Date addtime) { 108 | this.addtime = addtime; 109 | } 110 | 111 | public String getUsername() { 112 | return username; 113 | } 114 | 115 | public void setUsername(String username) { 116 | this.username = username; 117 | } 118 | 119 | public TokenEntity(Long userid, String username, String tablename,String role, String token, Date expiratedtime) { 120 | super(); 121 | this.userid = userid; 122 | this.username = username; 123 | this.tablename = tablename; 124 | this.role = role; 125 | this.token = token; 126 | this.expiratedtime = expiratedtime; 127 | } 128 | 129 | public TokenEntity() { 130 | } 131 | 132 | } 133 | -------------------------------------------------------------------------------- /src/main/java/com/entity/UsersEntity.java: -------------------------------------------------------------------------------- 1 | package com.entity; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | 6 | import com.baomidou.mybatisplus.annotations.TableId; 7 | import com.baomidou.mybatisplus.annotations.TableName; 8 | import com.baomidou.mybatisplus.enums.IdType; 9 | 10 | /** 11 | * 用户 12 | */ 13 | @TableName("users") 14 | public class UsersEntity implements Serializable { 15 | private static final long serialVersionUID = 1L; 16 | 17 | @TableId(type = IdType.AUTO) 18 | private Long id; 19 | 20 | /** 21 | * 用户账号 22 | */ 23 | private String username; 24 | 25 | /** 26 | * 密码 27 | */ 28 | private String password; 29 | 30 | /** 31 | * 用户类型 32 | */ 33 | private String role; 34 | 35 | private Date addtime; 36 | 37 | public String getUsername() { 38 | return username; 39 | } 40 | 41 | public void setUsername(String username) { 42 | this.username = username; 43 | } 44 | 45 | public String getPassword() { 46 | return password; 47 | } 48 | 49 | public void setPassword(String password) { 50 | this.password = password; 51 | } 52 | 53 | public String getRole() { 54 | return role; 55 | } 56 | 57 | public void setRole(String role) { 58 | this.role = role; 59 | } 60 | 61 | public Date getAddtime() { 62 | return addtime; 63 | } 64 | 65 | public void setAddtime(Date addtime) { 66 | this.addtime = addtime; 67 | } 68 | 69 | public Long getId() { 70 | return id; 71 | } 72 | 73 | public void setId(Long id) { 74 | this.id = id; 75 | } 76 | 77 | } 78 | -------------------------------------------------------------------------------- /src/main/java/com/entity/model/AboutusModel.java: -------------------------------------------------------------------------------- 1 | package com.entity.model; 2 | 3 | import com.entity.AboutusEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 关于我们 15 | * 接收传参的实体类 16 | *(实际开发中配合移动端接口开发手动去掉些没用的字段, 后端一般用entity就够用了) 17 | * 取自ModelAndView 的model名称 18 | * @author 19 | * @email 20 | * @date 2023-03-09 17:28:21 21 | */ 22 | public class AboutusModel implements Serializable { 23 | private static final long serialVersionUID = 1L; 24 | 25 | 26 | /** 27 | * 副标题 28 | */ 29 | 30 | private String subtitle; 31 | 32 | /** 33 | * 内容 34 | */ 35 | 36 | private String content; 37 | 38 | /** 39 | * 图片1 40 | */ 41 | 42 | private String picture1; 43 | 44 | /** 45 | * 图片2 46 | */ 47 | 48 | private String picture2; 49 | 50 | /** 51 | * 图片3 52 | */ 53 | 54 | private String picture3; 55 | 56 | 57 | /** 58 | * 设置:副标题 59 | */ 60 | 61 | public void setSubtitle(String subtitle) { 62 | this.subtitle = subtitle; 63 | } 64 | 65 | /** 66 | * 获取:副标题 67 | */ 68 | public String getSubtitle() { 69 | return subtitle; 70 | } 71 | 72 | 73 | /** 74 | * 设置:内容 75 | */ 76 | 77 | public void setContent(String content) { 78 | this.content = content; 79 | } 80 | 81 | /** 82 | * 获取:内容 83 | */ 84 | public String getContent() { 85 | return content; 86 | } 87 | 88 | 89 | /** 90 | * 设置:图片1 91 | */ 92 | 93 | public void setPicture1(String picture1) { 94 | this.picture1 = picture1; 95 | } 96 | 97 | /** 98 | * 获取:图片1 99 | */ 100 | public String getPicture1() { 101 | return picture1; 102 | } 103 | 104 | 105 | /** 106 | * 设置:图片2 107 | */ 108 | 109 | public void setPicture2(String picture2) { 110 | this.picture2 = picture2; 111 | } 112 | 113 | /** 114 | * 获取:图片2 115 | */ 116 | public String getPicture2() { 117 | return picture2; 118 | } 119 | 120 | 121 | /** 122 | * 设置:图片3 123 | */ 124 | 125 | public void setPicture3(String picture3) { 126 | this.picture3 = picture3; 127 | } 128 | 129 | /** 130 | * 获取:图片3 131 | */ 132 | public String getPicture3() { 133 | return picture3; 134 | } 135 | 136 | } 137 | -------------------------------------------------------------------------------- /src/main/java/com/entity/model/AddressModel.java: -------------------------------------------------------------------------------- 1 | package com.entity.model; 2 | 3 | import com.entity.AddressEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 地址 15 | * 接收传参的实体类 16 | *(实际开发中配合移动端接口开发手动去掉些没用的字段, 后端一般用entity就够用了) 17 | * 取自ModelAndView 的model名称 18 | * @author 19 | * @email 20 | * @date 2023-03-09 17:28:21 21 | */ 22 | public class AddressModel implements Serializable { 23 | private static final long serialVersionUID = 1L; 24 | 25 | 26 | /** 27 | * 地址 28 | */ 29 | 30 | private String address; 31 | 32 | /** 33 | * 收货人 34 | */ 35 | 36 | private String name; 37 | 38 | /** 39 | * 电话 40 | */ 41 | 42 | private String phone; 43 | 44 | /** 45 | * 是否默认地址[是/否] 46 | */ 47 | 48 | private String isdefault; 49 | 50 | 51 | /** 52 | * 设置:地址 53 | */ 54 | 55 | public void setAddress(String address) { 56 | this.address = address; 57 | } 58 | 59 | /** 60 | * 获取:地址 61 | */ 62 | public String getAddress() { 63 | return address; 64 | } 65 | 66 | 67 | /** 68 | * 设置:收货人 69 | */ 70 | 71 | public void setName(String name) { 72 | this.name = name; 73 | } 74 | 75 | /** 76 | * 获取:收货人 77 | */ 78 | public String getName() { 79 | return name; 80 | } 81 | 82 | 83 | /** 84 | * 设置:电话 85 | */ 86 | 87 | public void setPhone(String phone) { 88 | this.phone = phone; 89 | } 90 | 91 | /** 92 | * 获取:电话 93 | */ 94 | public String getPhone() { 95 | return phone; 96 | } 97 | 98 | 99 | /** 100 | * 设置:是否默认地址[是/否] 101 | */ 102 | 103 | public void setIsdefault(String isdefault) { 104 | this.isdefault = isdefault; 105 | } 106 | 107 | /** 108 | * 获取:是否默认地址[是/否] 109 | */ 110 | public String getIsdefault() { 111 | return isdefault; 112 | } 113 | 114 | } 115 | -------------------------------------------------------------------------------- /src/main/java/com/entity/model/ChatModel.java: -------------------------------------------------------------------------------- 1 | package com.entity.model; 2 | 3 | import com.entity.ChatEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 官方客服 15 | * 接收传参的实体类 16 | *(实际开发中配合移动端接口开发手动去掉些没用的字段, 后端一般用entity就够用了) 17 | * 取自ModelAndView 的model名称 18 | * @author 19 | * @email 20 | * @date 2023-03-09 17:28:21 21 | */ 22 | public class ChatModel implements Serializable { 23 | private static final long serialVersionUID = 1L; 24 | 25 | 26 | /** 27 | * 管理员id 28 | */ 29 | 30 | private Long adminid; 31 | 32 | /** 33 | * 提问 34 | */ 35 | 36 | private String ask; 37 | 38 | /** 39 | * 回复 40 | */ 41 | 42 | private String reply; 43 | 44 | /** 45 | * 是否回复 46 | */ 47 | 48 | private Integer isreply; 49 | 50 | 51 | /** 52 | * 设置:管理员id 53 | */ 54 | 55 | public void setAdminid(Long adminid) { 56 | this.adminid = adminid; 57 | } 58 | 59 | /** 60 | * 获取:管理员id 61 | */ 62 | public Long getAdminid() { 63 | return adminid; 64 | } 65 | 66 | 67 | /** 68 | * 设置:提问 69 | */ 70 | 71 | public void setAsk(String ask) { 72 | this.ask = ask; 73 | } 74 | 75 | /** 76 | * 获取:提问 77 | */ 78 | public String getAsk() { 79 | return ask; 80 | } 81 | 82 | 83 | /** 84 | * 设置:回复 85 | */ 86 | 87 | public void setReply(String reply) { 88 | this.reply = reply; 89 | } 90 | 91 | /** 92 | * 获取:回复 93 | */ 94 | public String getReply() { 95 | return reply; 96 | } 97 | 98 | 99 | /** 100 | * 设置:是否回复 101 | */ 102 | 103 | public void setIsreply(Integer isreply) { 104 | this.isreply = isreply; 105 | } 106 | 107 | /** 108 | * 获取:是否回复 109 | */ 110 | public Integer getIsreply() { 111 | return isreply; 112 | } 113 | 114 | } 115 | -------------------------------------------------------------------------------- /src/main/java/com/entity/model/DiscussshangchengshangpinModel.java: -------------------------------------------------------------------------------- 1 | package com.entity.model; 2 | 3 | import com.entity.DiscussshangchengshangpinEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 商城商品评论表 15 | * 接收传参的实体类 16 | *(实际开发中配合移动端接口开发手动去掉些没用的字段, 后端一般用entity就够用了) 17 | * 取自ModelAndView 的model名称 18 | * @author 19 | * @email 20 | * @date 2023-03-09 17:28:21 21 | */ 22 | public class DiscussshangchengshangpinModel implements Serializable { 23 | private static final long serialVersionUID = 1L; 24 | 25 | 26 | /** 27 | * 用户id 28 | */ 29 | 30 | private Long userid; 31 | 32 | /** 33 | * 头像 34 | */ 35 | 36 | private String avatarurl; 37 | 38 | /** 39 | * 用户名 40 | */ 41 | 42 | private String nickname; 43 | 44 | /** 45 | * 评论内容 46 | */ 47 | 48 | private String content; 49 | 50 | /** 51 | * 回复内容 52 | */ 53 | 54 | private String reply; 55 | 56 | 57 | /** 58 | * 设置:用户id 59 | */ 60 | 61 | public void setUserid(Long userid) { 62 | this.userid = userid; 63 | } 64 | 65 | /** 66 | * 获取:用户id 67 | */ 68 | public Long getUserid() { 69 | return userid; 70 | } 71 | 72 | 73 | /** 74 | * 设置:头像 75 | */ 76 | 77 | public void setAvatarurl(String avatarurl) { 78 | this.avatarurl = avatarurl; 79 | } 80 | 81 | /** 82 | * 获取:头像 83 | */ 84 | public String getAvatarurl() { 85 | return avatarurl; 86 | } 87 | 88 | 89 | /** 90 | * 设置:用户名 91 | */ 92 | 93 | public void setNickname(String nickname) { 94 | this.nickname = nickname; 95 | } 96 | 97 | /** 98 | * 获取:用户名 99 | */ 100 | public String getNickname() { 101 | return nickname; 102 | } 103 | 104 | 105 | /** 106 | * 设置:评论内容 107 | */ 108 | 109 | public void setContent(String content) { 110 | this.content = content; 111 | } 112 | 113 | /** 114 | * 获取:评论内容 115 | */ 116 | public String getContent() { 117 | return content; 118 | } 119 | 120 | 121 | /** 122 | * 设置:回复内容 123 | */ 124 | 125 | public void setReply(String reply) { 126 | this.reply = reply; 127 | } 128 | 129 | /** 130 | * 获取:回复内容 131 | */ 132 | public String getReply() { 133 | return reply; 134 | } 135 | 136 | } 137 | -------------------------------------------------------------------------------- /src/main/java/com/entity/model/NewsModel.java: -------------------------------------------------------------------------------- 1 | package com.entity.model; 2 | 3 | import com.entity.NewsEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 商城公告 15 | * 接收传参的实体类 16 | *(实际开发中配合移动端接口开发手动去掉些没用的字段, 后端一般用entity就够用了) 17 | * 取自ModelAndView 的model名称 18 | * @author 19 | * @email 20 | * @date 2023-03-09 17:28:21 21 | */ 22 | public class NewsModel implements Serializable { 23 | private static final long serialVersionUID = 1L; 24 | 25 | 26 | /** 27 | * 简介 28 | */ 29 | 30 | private String introduction; 31 | 32 | /** 33 | * 图片 34 | */ 35 | 36 | private String picture; 37 | 38 | /** 39 | * 内容 40 | */ 41 | 42 | private String content; 43 | 44 | 45 | /** 46 | * 设置:简介 47 | */ 48 | 49 | public void setIntroduction(String introduction) { 50 | this.introduction = introduction; 51 | } 52 | 53 | /** 54 | * 获取:简介 55 | */ 56 | public String getIntroduction() { 57 | return introduction; 58 | } 59 | 60 | 61 | /** 62 | * 设置:图片 63 | */ 64 | 65 | public void setPicture(String picture) { 66 | this.picture = picture; 67 | } 68 | 69 | /** 70 | * 获取:图片 71 | */ 72 | public String getPicture() { 73 | return picture; 74 | } 75 | 76 | 77 | /** 78 | * 设置:内容 79 | */ 80 | 81 | public void setContent(String content) { 82 | this.content = content; 83 | } 84 | 85 | /** 86 | * 获取:内容 87 | */ 88 | public String getContent() { 89 | return content; 90 | } 91 | 92 | } 93 | -------------------------------------------------------------------------------- /src/main/java/com/entity/model/ShangjiaModel.java: -------------------------------------------------------------------------------- 1 | package com.entity.model; 2 | 3 | import com.entity.ShangjiaEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 商家 15 | * 接收传参的实体类 16 | *(实际开发中配合移动端接口开发手动去掉些没用的字段, 后端一般用entity就够用了) 17 | * 取自ModelAndView 的model名称 18 | * @author 19 | * @email 20 | * @date 2023-03-09 17:28:21 21 | */ 22 | public class ShangjiaModel implements Serializable { 23 | private static final long serialVersionUID = 1L; 24 | 25 | 26 | /** 27 | * 密码 28 | */ 29 | 30 | private String mima; 31 | 32 | /** 33 | * 店铺名 34 | */ 35 | 36 | private String dianpuming; 37 | 38 | /** 39 | * 店铺地址 40 | */ 41 | 42 | private String dianpudizhi; 43 | 44 | /** 45 | * 联系方式 46 | */ 47 | 48 | private String lianxifangshi; 49 | 50 | /** 51 | * 封面图片 52 | */ 53 | 54 | private String fengmiantupian; 55 | 56 | /** 57 | * 联系人 58 | */ 59 | 60 | private String lianxiren; 61 | 62 | /** 63 | * 商家介绍 64 | */ 65 | 66 | private String shangjiajieshao; 67 | 68 | /** 69 | * 余额 70 | */ 71 | 72 | private Float money; 73 | 74 | 75 | /** 76 | * 设置:密码 77 | */ 78 | 79 | public void setMima(String mima) { 80 | this.mima = mima; 81 | } 82 | 83 | /** 84 | * 获取:密码 85 | */ 86 | public String getMima() { 87 | return mima; 88 | } 89 | 90 | 91 | /** 92 | * 设置:店铺名 93 | */ 94 | 95 | public void setDianpuming(String dianpuming) { 96 | this.dianpuming = dianpuming; 97 | } 98 | 99 | /** 100 | * 获取:店铺名 101 | */ 102 | public String getDianpuming() { 103 | return dianpuming; 104 | } 105 | 106 | 107 | /** 108 | * 设置:店铺地址 109 | */ 110 | 111 | public void setDianpudizhi(String dianpudizhi) { 112 | this.dianpudizhi = dianpudizhi; 113 | } 114 | 115 | /** 116 | * 获取:店铺地址 117 | */ 118 | public String getDianpudizhi() { 119 | return dianpudizhi; 120 | } 121 | 122 | 123 | /** 124 | * 设置:联系方式 125 | */ 126 | 127 | public void setLianxifangshi(String lianxifangshi) { 128 | this.lianxifangshi = lianxifangshi; 129 | } 130 | 131 | /** 132 | * 获取:联系方式 133 | */ 134 | public String getLianxifangshi() { 135 | return lianxifangshi; 136 | } 137 | 138 | 139 | /** 140 | * 设置:封面图片 141 | */ 142 | 143 | public void setFengmiantupian(String fengmiantupian) { 144 | this.fengmiantupian = fengmiantupian; 145 | } 146 | 147 | /** 148 | * 获取:封面图片 149 | */ 150 | public String getFengmiantupian() { 151 | return fengmiantupian; 152 | } 153 | 154 | 155 | /** 156 | * 设置:联系人 157 | */ 158 | 159 | public void setLianxiren(String lianxiren) { 160 | this.lianxiren = lianxiren; 161 | } 162 | 163 | /** 164 | * 获取:联系人 165 | */ 166 | public String getLianxiren() { 167 | return lianxiren; 168 | } 169 | 170 | 171 | /** 172 | * 设置:商家介绍 173 | */ 174 | 175 | public void setShangjiajieshao(String shangjiajieshao) { 176 | this.shangjiajieshao = shangjiajieshao; 177 | } 178 | 179 | /** 180 | * 获取:商家介绍 181 | */ 182 | public String getShangjiajieshao() { 183 | return shangjiajieshao; 184 | } 185 | 186 | 187 | /** 188 | * 设置:余额 189 | */ 190 | 191 | public void setMoney(Float money) { 192 | this.money = money; 193 | } 194 | 195 | /** 196 | * 获取:余额 197 | */ 198 | public Float getMoney() { 199 | return money; 200 | } 201 | 202 | } 203 | -------------------------------------------------------------------------------- /src/main/java/com/entity/model/ShangpinzhongleiModel.java: -------------------------------------------------------------------------------- 1 | package com.entity.model; 2 | 3 | import com.entity.ShangpinzhongleiEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 商品种类 15 | * 接收传参的实体类 16 | *(实际开发中配合移动端接口开发手动去掉些没用的字段, 后端一般用entity就够用了) 17 | * 取自ModelAndView 的model名称 18 | * @author 19 | * @email 20 | * @date 2023-03-09 17:28:21 21 | */ 22 | public class ShangpinzhongleiModel implements Serializable { 23 | private static final long serialVersionUID = 1L; 24 | 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/entity/model/StoreupModel.java: -------------------------------------------------------------------------------- 1 | package com.entity.model; 2 | 3 | import com.entity.StoreupEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 收藏表 15 | * 接收传参的实体类 16 | *(实际开发中配合移动端接口开发手动去掉些没用的字段, 后端一般用entity就够用了) 17 | * 取自ModelAndView 的model名称 18 | * @author 19 | * @email 20 | * @date 2023-03-09 17:28:21 21 | */ 22 | public class StoreupModel implements Serializable { 23 | private static final long serialVersionUID = 1L; 24 | 25 | 26 | /** 27 | * 商品id 28 | */ 29 | 30 | private Long refid; 31 | 32 | /** 33 | * 表名 34 | */ 35 | 36 | private String tablename; 37 | 38 | /** 39 | * 名称 40 | */ 41 | 42 | private String name; 43 | 44 | /** 45 | * 图片 46 | */ 47 | 48 | private String picture; 49 | 50 | /** 51 | * 类型(1:收藏,21:赞,22:踩,31:竞拍参与,41:关注) 52 | */ 53 | 54 | private String type; 55 | 56 | /** 57 | * 推荐类型 58 | */ 59 | 60 | private String inteltype; 61 | 62 | /** 63 | * 备注 64 | */ 65 | 66 | private String remark; 67 | 68 | 69 | /** 70 | * 设置:商品id 71 | */ 72 | 73 | public void setRefid(Long refid) { 74 | this.refid = refid; 75 | } 76 | 77 | /** 78 | * 获取:商品id 79 | */ 80 | public Long getRefid() { 81 | return refid; 82 | } 83 | 84 | 85 | /** 86 | * 设置:表名 87 | */ 88 | 89 | public void setTablename(String tablename) { 90 | this.tablename = tablename; 91 | } 92 | 93 | /** 94 | * 获取:表名 95 | */ 96 | public String getTablename() { 97 | return tablename; 98 | } 99 | 100 | 101 | /** 102 | * 设置:名称 103 | */ 104 | 105 | public void setName(String name) { 106 | this.name = name; 107 | } 108 | 109 | /** 110 | * 获取:名称 111 | */ 112 | public String getName() { 113 | return name; 114 | } 115 | 116 | 117 | /** 118 | * 设置:图片 119 | */ 120 | 121 | public void setPicture(String picture) { 122 | this.picture = picture; 123 | } 124 | 125 | /** 126 | * 获取:图片 127 | */ 128 | public String getPicture() { 129 | return picture; 130 | } 131 | 132 | 133 | /** 134 | * 设置:类型(1:收藏,21:赞,22:踩,31:竞拍参与,41:关注) 135 | */ 136 | 137 | public void setType(String type) { 138 | this.type = type; 139 | } 140 | 141 | /** 142 | * 获取:类型(1:收藏,21:赞,22:踩,31:竞拍参与,41:关注) 143 | */ 144 | public String getType() { 145 | return type; 146 | } 147 | 148 | 149 | /** 150 | * 设置:推荐类型 151 | */ 152 | 153 | public void setInteltype(String inteltype) { 154 | this.inteltype = inteltype; 155 | } 156 | 157 | /** 158 | * 获取:推荐类型 159 | */ 160 | public String getInteltype() { 161 | return inteltype; 162 | } 163 | 164 | 165 | /** 166 | * 设置:备注 167 | */ 168 | 169 | public void setRemark(String remark) { 170 | this.remark = remark; 171 | } 172 | 173 | /** 174 | * 获取:备注 175 | */ 176 | public String getRemark() { 177 | return remark; 178 | } 179 | 180 | } 181 | -------------------------------------------------------------------------------- /src/main/java/com/entity/model/SystemintroModel.java: -------------------------------------------------------------------------------- 1 | package com.entity.model; 2 | 3 | import com.entity.SystemintroEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 关于我们 15 | * 接收传参的实体类 16 | *(实际开发中配合移动端接口开发手动去掉些没用的字段, 后端一般用entity就够用了) 17 | * 取自ModelAndView 的model名称 18 | * @author 19 | * @email 20 | * @date 2023-03-09 17:28:21 21 | */ 22 | public class SystemintroModel implements Serializable { 23 | private static final long serialVersionUID = 1L; 24 | 25 | 26 | /** 27 | * 副标题 28 | */ 29 | 30 | private String subtitle; 31 | 32 | /** 33 | * 内容 34 | */ 35 | 36 | private String content; 37 | 38 | /** 39 | * 图片1 40 | */ 41 | 42 | private String picture1; 43 | 44 | /** 45 | * 图片2 46 | */ 47 | 48 | private String picture2; 49 | 50 | /** 51 | * 图片3 52 | */ 53 | 54 | private String picture3; 55 | 56 | 57 | /** 58 | * 设置:副标题 59 | */ 60 | 61 | public void setSubtitle(String subtitle) { 62 | this.subtitle = subtitle; 63 | } 64 | 65 | /** 66 | * 获取:副标题 67 | */ 68 | public String getSubtitle() { 69 | return subtitle; 70 | } 71 | 72 | 73 | /** 74 | * 设置:内容 75 | */ 76 | 77 | public void setContent(String content) { 78 | this.content = content; 79 | } 80 | 81 | /** 82 | * 获取:内容 83 | */ 84 | public String getContent() { 85 | return content; 86 | } 87 | 88 | 89 | /** 90 | * 设置:图片1 91 | */ 92 | 93 | public void setPicture1(String picture1) { 94 | this.picture1 = picture1; 95 | } 96 | 97 | /** 98 | * 获取:图片1 99 | */ 100 | public String getPicture1() { 101 | return picture1; 102 | } 103 | 104 | 105 | /** 106 | * 设置:图片2 107 | */ 108 | 109 | public void setPicture2(String picture2) { 110 | this.picture2 = picture2; 111 | } 112 | 113 | /** 114 | * 获取:图片2 115 | */ 116 | public String getPicture2() { 117 | return picture2; 118 | } 119 | 120 | 121 | /** 122 | * 设置:图片3 123 | */ 124 | 125 | public void setPicture3(String picture3) { 126 | this.picture3 = picture3; 127 | } 128 | 129 | /** 130 | * 获取:图片3 131 | */ 132 | public String getPicture3() { 133 | return picture3; 134 | } 135 | 136 | } 137 | -------------------------------------------------------------------------------- /src/main/java/com/entity/model/YonghuModel.java: -------------------------------------------------------------------------------- 1 | package com.entity.model; 2 | 3 | import com.entity.YonghuEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 用户 15 | * 接收传参的实体类 16 | *(实际开发中配合移动端接口开发手动去掉些没用的字段, 后端一般用entity就够用了) 17 | * 取自ModelAndView 的model名称 18 | * @author 19 | * @email 20 | * @date 2023-03-09 17:28:21 21 | */ 22 | public class YonghuModel implements Serializable { 23 | private static final long serialVersionUID = 1L; 24 | 25 | 26 | /** 27 | * 密码 28 | */ 29 | 30 | private String mima; 31 | 32 | /** 33 | * 用户姓名 34 | */ 35 | 36 | private String yonghuxingming; 37 | 38 | /** 39 | * 性别 40 | */ 41 | 42 | private String xingbie; 43 | 44 | /** 45 | * 年龄 46 | */ 47 | 48 | private String nianling; 49 | 50 | /** 51 | * 头像 52 | */ 53 | 54 | private String touxiang; 55 | 56 | /** 57 | * 余额 58 | */ 59 | 60 | private Float money; 61 | 62 | /** 63 | * 是否会员 64 | */ 65 | 66 | private String vip; 67 | 68 | 69 | /** 70 | * 设置:密码 71 | */ 72 | 73 | public void setMima(String mima) { 74 | this.mima = mima; 75 | } 76 | 77 | /** 78 | * 获取:密码 79 | */ 80 | public String getMima() { 81 | return mima; 82 | } 83 | 84 | 85 | /** 86 | * 设置:用户姓名 87 | */ 88 | 89 | public void setYonghuxingming(String yonghuxingming) { 90 | this.yonghuxingming = yonghuxingming; 91 | } 92 | 93 | /** 94 | * 获取:用户姓名 95 | */ 96 | public String getYonghuxingming() { 97 | return yonghuxingming; 98 | } 99 | 100 | 101 | /** 102 | * 设置:性别 103 | */ 104 | 105 | public void setXingbie(String xingbie) { 106 | this.xingbie = xingbie; 107 | } 108 | 109 | /** 110 | * 获取:性别 111 | */ 112 | public String getXingbie() { 113 | return xingbie; 114 | } 115 | 116 | 117 | /** 118 | * 设置:年龄 119 | */ 120 | 121 | public void setNianling(String nianling) { 122 | this.nianling = nianling; 123 | } 124 | 125 | /** 126 | * 获取:年龄 127 | */ 128 | public String getNianling() { 129 | return nianling; 130 | } 131 | 132 | 133 | /** 134 | * 设置:头像 135 | */ 136 | 137 | public void setTouxiang(String touxiang) { 138 | this.touxiang = touxiang; 139 | } 140 | 141 | /** 142 | * 获取:头像 143 | */ 144 | public String getTouxiang() { 145 | return touxiang; 146 | } 147 | 148 | 149 | /** 150 | * 设置:余额 151 | */ 152 | 153 | public void setMoney(Float money) { 154 | this.money = money; 155 | } 156 | 157 | /** 158 | * 获取:余额 159 | */ 160 | public Float getMoney() { 161 | return money; 162 | } 163 | 164 | 165 | /** 166 | * 设置:是否会员 167 | */ 168 | 169 | public void setVip(String vip) { 170 | this.vip = vip; 171 | } 172 | 173 | /** 174 | * 获取:是否会员 175 | */ 176 | public String getVip() { 177 | return vip; 178 | } 179 | 180 | } 181 | -------------------------------------------------------------------------------- /src/main/java/com/entity/view/AboutusView.java: -------------------------------------------------------------------------------- 1 | package com.entity.view; 2 | 3 | import com.entity.AboutusEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import org.apache.commons.beanutils.BeanUtils; 7 | import java.lang.reflect.InvocationTargetException; 8 | 9 | import java.io.Serializable; 10 | 11 | 12 | /** 13 | * 关于我们 14 | * 后端返回视图实体辅助类 15 | * (通常后端关联的表或者自定义的字段需要返回使用) 16 | * @author 17 | * @email 18 | * @date 2023-03-09 17:28:21 19 | */ 20 | @TableName("aboutus") 21 | public class AboutusView extends AboutusEntity implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | public AboutusView(){ 25 | } 26 | 27 | public AboutusView(AboutusEntity aboutusEntity){ 28 | try { 29 | BeanUtils.copyProperties(this, aboutusEntity); 30 | } catch (IllegalAccessException | InvocationTargetException e) { 31 | // TODO Auto-generated catch block 32 | e.printStackTrace(); 33 | } 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/entity/view/AddressView.java: -------------------------------------------------------------------------------- 1 | package com.entity.view; 2 | 3 | import com.entity.AddressEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import org.apache.commons.beanutils.BeanUtils; 7 | import java.lang.reflect.InvocationTargetException; 8 | 9 | import java.io.Serializable; 10 | 11 | 12 | /** 13 | * 地址 14 | * 后端返回视图实体辅助类 15 | * (通常后端关联的表或者自定义的字段需要返回使用) 16 | * @author 17 | * @email 18 | * @date 2023-03-09 17:28:21 19 | */ 20 | @TableName("address") 21 | public class AddressView extends AddressEntity implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | public AddressView(){ 25 | } 26 | 27 | public AddressView(AddressEntity addressEntity){ 28 | try { 29 | BeanUtils.copyProperties(this, addressEntity); 30 | } catch (IllegalAccessException | InvocationTargetException e) { 31 | // TODO Auto-generated catch block 32 | e.printStackTrace(); 33 | } 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/entity/view/CartView.java: -------------------------------------------------------------------------------- 1 | package com.entity.view; 2 | 3 | import com.entity.CartEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import org.apache.commons.beanutils.BeanUtils; 7 | import java.lang.reflect.InvocationTargetException; 8 | 9 | import java.io.Serializable; 10 | 11 | 12 | /** 13 | * 购物车表 14 | * 后端返回视图实体辅助类 15 | * (通常后端关联的表或者自定义的字段需要返回使用) 16 | * @author 17 | * @email 18 | * @date 2023-03-09 17:28:21 19 | */ 20 | @TableName("cart") 21 | public class CartView extends CartEntity implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | public CartView(){ 25 | } 26 | 27 | public CartView(CartEntity cartEntity){ 28 | try { 29 | BeanUtils.copyProperties(this, cartEntity); 30 | } catch (IllegalAccessException | InvocationTargetException e) { 31 | // TODO Auto-generated catch block 32 | e.printStackTrace(); 33 | } 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/entity/view/ChatView.java: -------------------------------------------------------------------------------- 1 | package com.entity.view; 2 | 3 | import com.entity.ChatEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import org.apache.commons.beanutils.BeanUtils; 7 | import java.lang.reflect.InvocationTargetException; 8 | 9 | import java.io.Serializable; 10 | 11 | 12 | /** 13 | * 官方客服 14 | * 后端返回视图实体辅助类 15 | * (通常后端关联的表或者自定义的字段需要返回使用) 16 | * @author 17 | * @email 18 | * @date 2023-03-09 17:28:21 19 | */ 20 | @TableName("chat") 21 | public class ChatView extends ChatEntity implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | public ChatView(){ 25 | } 26 | 27 | public ChatView(ChatEntity chatEntity){ 28 | try { 29 | BeanUtils.copyProperties(this, chatEntity); 30 | } catch (IllegalAccessException | InvocationTargetException e) { 31 | // TODO Auto-generated catch block 32 | e.printStackTrace(); 33 | } 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/entity/view/DiscussshangchengshangpinView.java: -------------------------------------------------------------------------------- 1 | package com.entity.view; 2 | 3 | import com.entity.DiscussshangchengshangpinEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import org.apache.commons.beanutils.BeanUtils; 7 | import java.lang.reflect.InvocationTargetException; 8 | 9 | import java.io.Serializable; 10 | 11 | 12 | /** 13 | * 商城商品评论表 14 | * 后端返回视图实体辅助类 15 | * (通常后端关联的表或者自定义的字段需要返回使用) 16 | * @author 17 | * @email 18 | * @date 2023-03-09 17:28:21 19 | */ 20 | @TableName("discussshangchengshangpin") 21 | public class DiscussshangchengshangpinView extends DiscussshangchengshangpinEntity implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | public DiscussshangchengshangpinView(){ 25 | } 26 | 27 | public DiscussshangchengshangpinView(DiscussshangchengshangpinEntity discussshangchengshangpinEntity){ 28 | try { 29 | BeanUtils.copyProperties(this, discussshangchengshangpinEntity); 30 | } catch (IllegalAccessException | InvocationTargetException e) { 31 | // TODO Auto-generated catch block 32 | e.printStackTrace(); 33 | } 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/entity/view/NewsView.java: -------------------------------------------------------------------------------- 1 | package com.entity.view; 2 | 3 | import com.entity.NewsEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import org.apache.commons.beanutils.BeanUtils; 7 | import java.lang.reflect.InvocationTargetException; 8 | 9 | import java.io.Serializable; 10 | 11 | 12 | /** 13 | * 商城公告 14 | * 后端返回视图实体辅助类 15 | * (通常后端关联的表或者自定义的字段需要返回使用) 16 | * @author 17 | * @email 18 | * @date 2023-03-09 17:28:21 19 | */ 20 | @TableName("news") 21 | public class NewsView extends NewsEntity implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | public NewsView(){ 25 | } 26 | 27 | public NewsView(NewsEntity newsEntity){ 28 | try { 29 | BeanUtils.copyProperties(this, newsEntity); 30 | } catch (IllegalAccessException | InvocationTargetException e) { 31 | // TODO Auto-generated catch block 32 | e.printStackTrace(); 33 | } 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/entity/view/OrdersView.java: -------------------------------------------------------------------------------- 1 | package com.entity.view; 2 | 3 | import com.entity.OrdersEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import org.apache.commons.beanutils.BeanUtils; 7 | import java.lang.reflect.InvocationTargetException; 8 | 9 | import java.io.Serializable; 10 | 11 | 12 | /** 13 | * 订单 14 | * 后端返回视图实体辅助类 15 | * (通常后端关联的表或者自定义的字段需要返回使用) 16 | * @author 17 | * @email 18 | * @date 2023-03-09 17:28:21 19 | */ 20 | @TableName("orders") 21 | public class OrdersView extends OrdersEntity implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | public OrdersView(){ 25 | } 26 | 27 | public OrdersView(OrdersEntity ordersEntity){ 28 | try { 29 | BeanUtils.copyProperties(this, ordersEntity); 30 | } catch (IllegalAccessException | InvocationTargetException e) { 31 | // TODO Auto-generated catch block 32 | e.printStackTrace(); 33 | } 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/entity/view/ShangchengshangpinView.java: -------------------------------------------------------------------------------- 1 | package com.entity.view; 2 | 3 | import com.entity.ShangchengshangpinEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import org.apache.commons.beanutils.BeanUtils; 7 | import java.lang.reflect.InvocationTargetException; 8 | 9 | import java.io.Serializable; 10 | 11 | 12 | /** 13 | * 商城商品 14 | * 后端返回视图实体辅助类 15 | * (通常后端关联的表或者自定义的字段需要返回使用) 16 | * @author 17 | * @email 18 | * @date 2023-03-09 17:28:21 19 | */ 20 | @TableName("shangchengshangpin") 21 | public class ShangchengshangpinView extends ShangchengshangpinEntity implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | public ShangchengshangpinView(){ 25 | } 26 | 27 | public ShangchengshangpinView(ShangchengshangpinEntity shangchengshangpinEntity){ 28 | try { 29 | BeanUtils.copyProperties(this, shangchengshangpinEntity); 30 | } catch (IllegalAccessException | InvocationTargetException e) { 31 | // TODO Auto-generated catch block 32 | e.printStackTrace(); 33 | } 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/entity/view/ShangjiaView.java: -------------------------------------------------------------------------------- 1 | package com.entity.view; 2 | 3 | import com.entity.ShangjiaEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import org.apache.commons.beanutils.BeanUtils; 7 | import java.lang.reflect.InvocationTargetException; 8 | 9 | import java.io.Serializable; 10 | 11 | 12 | /** 13 | * 商家 14 | * 后端返回视图实体辅助类 15 | * (通常后端关联的表或者自定义的字段需要返回使用) 16 | * @author 17 | * @email 18 | * @date 2023-03-09 17:28:21 19 | */ 20 | @TableName("shangjia") 21 | public class ShangjiaView extends ShangjiaEntity implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | public ShangjiaView(){ 25 | } 26 | 27 | public ShangjiaView(ShangjiaEntity shangjiaEntity){ 28 | try { 29 | BeanUtils.copyProperties(this, shangjiaEntity); 30 | } catch (IllegalAccessException | InvocationTargetException e) { 31 | // TODO Auto-generated catch block 32 | e.printStackTrace(); 33 | } 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/entity/view/ShangpinzhongleiView.java: -------------------------------------------------------------------------------- 1 | package com.entity.view; 2 | 3 | import com.entity.ShangpinzhongleiEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import org.apache.commons.beanutils.BeanUtils; 7 | import java.lang.reflect.InvocationTargetException; 8 | 9 | import java.io.Serializable; 10 | 11 | 12 | /** 13 | * 商品种类 14 | * 后端返回视图实体辅助类 15 | * (通常后端关联的表或者自定义的字段需要返回使用) 16 | * @author 17 | * @email 18 | * @date 2023-03-09 17:28:21 19 | */ 20 | @TableName("shangpinzhonglei") 21 | public class ShangpinzhongleiView extends ShangpinzhongleiEntity implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | public ShangpinzhongleiView(){ 25 | } 26 | 27 | public ShangpinzhongleiView(ShangpinzhongleiEntity shangpinzhongleiEntity){ 28 | try { 29 | BeanUtils.copyProperties(this, shangpinzhongleiEntity); 30 | } catch (IllegalAccessException | InvocationTargetException e) { 31 | // TODO Auto-generated catch block 32 | e.printStackTrace(); 33 | } 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/entity/view/StoreupView.java: -------------------------------------------------------------------------------- 1 | package com.entity.view; 2 | 3 | import com.entity.StoreupEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import org.apache.commons.beanutils.BeanUtils; 7 | import java.lang.reflect.InvocationTargetException; 8 | 9 | import java.io.Serializable; 10 | 11 | 12 | /** 13 | * 收藏表 14 | * 后端返回视图实体辅助类 15 | * (通常后端关联的表或者自定义的字段需要返回使用) 16 | * @author 17 | * @email 18 | * @date 2023-03-09 17:28:21 19 | */ 20 | @TableName("storeup") 21 | public class StoreupView extends StoreupEntity implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | public StoreupView(){ 25 | } 26 | 27 | public StoreupView(StoreupEntity storeupEntity){ 28 | try { 29 | BeanUtils.copyProperties(this, storeupEntity); 30 | } catch (IllegalAccessException | InvocationTargetException e) { 31 | // TODO Auto-generated catch block 32 | e.printStackTrace(); 33 | } 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/entity/view/SystemintroView.java: -------------------------------------------------------------------------------- 1 | package com.entity.view; 2 | 3 | import com.entity.SystemintroEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import org.apache.commons.beanutils.BeanUtils; 7 | import java.lang.reflect.InvocationTargetException; 8 | 9 | import java.io.Serializable; 10 | 11 | 12 | /** 13 | * 关于我们 14 | * 后端返回视图实体辅助类 15 | * (通常后端关联的表或者自定义的字段需要返回使用) 16 | * @author 17 | * @email 18 | * @date 2023-03-09 17:28:21 19 | */ 20 | @TableName("systemintro") 21 | public class SystemintroView extends SystemintroEntity implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | public SystemintroView(){ 25 | } 26 | 27 | public SystemintroView(SystemintroEntity systemintroEntity){ 28 | try { 29 | BeanUtils.copyProperties(this, systemintroEntity); 30 | } catch (IllegalAccessException | InvocationTargetException e) { 31 | // TODO Auto-generated catch block 32 | e.printStackTrace(); 33 | } 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/entity/view/YonghuView.java: -------------------------------------------------------------------------------- 1 | package com.entity.view; 2 | 3 | import com.entity.YonghuEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import org.apache.commons.beanutils.BeanUtils; 7 | import java.lang.reflect.InvocationTargetException; 8 | 9 | import java.io.Serializable; 10 | 11 | 12 | /** 13 | * 用户 14 | * 后端返回视图实体辅助类 15 | * (通常后端关联的表或者自定义的字段需要返回使用) 16 | * @author 17 | * @email 18 | * @date 2023-03-09 17:28:21 19 | */ 20 | @TableName("yonghu") 21 | public class YonghuView extends YonghuEntity implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | public YonghuView(){ 25 | } 26 | 27 | public YonghuView(YonghuEntity yonghuEntity){ 28 | try { 29 | BeanUtils.copyProperties(this, yonghuEntity); 30 | } catch (IllegalAccessException | InvocationTargetException e) { 31 | // TODO Auto-generated catch block 32 | e.printStackTrace(); 33 | } 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/entity/vo/AboutusVO.java: -------------------------------------------------------------------------------- 1 | package com.entity.vo; 2 | 3 | import com.entity.AboutusEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 关于我们 15 | * 手机端接口返回实体辅助类 16 | * (主要作用去除一些不必要的字段) 17 | * @author 18 | * @email 19 | * @date 2023-03-09 17:28:21 20 | */ 21 | public class AboutusVO implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | 25 | /** 26 | * 副标题 27 | */ 28 | 29 | private String subtitle; 30 | 31 | /** 32 | * 内容 33 | */ 34 | 35 | private String content; 36 | 37 | /** 38 | * 图片1 39 | */ 40 | 41 | private String picture1; 42 | 43 | /** 44 | * 图片2 45 | */ 46 | 47 | private String picture2; 48 | 49 | /** 50 | * 图片3 51 | */ 52 | 53 | private String picture3; 54 | 55 | 56 | /** 57 | * 设置:副标题 58 | */ 59 | 60 | public void setSubtitle(String subtitle) { 61 | this.subtitle = subtitle; 62 | } 63 | 64 | /** 65 | * 获取:副标题 66 | */ 67 | public String getSubtitle() { 68 | return subtitle; 69 | } 70 | 71 | 72 | /** 73 | * 设置:内容 74 | */ 75 | 76 | public void setContent(String content) { 77 | this.content = content; 78 | } 79 | 80 | /** 81 | * 获取:内容 82 | */ 83 | public String getContent() { 84 | return content; 85 | } 86 | 87 | 88 | /** 89 | * 设置:图片1 90 | */ 91 | 92 | public void setPicture1(String picture1) { 93 | this.picture1 = picture1; 94 | } 95 | 96 | /** 97 | * 获取:图片1 98 | */ 99 | public String getPicture1() { 100 | return picture1; 101 | } 102 | 103 | 104 | /** 105 | * 设置:图片2 106 | */ 107 | 108 | public void setPicture2(String picture2) { 109 | this.picture2 = picture2; 110 | } 111 | 112 | /** 113 | * 获取:图片2 114 | */ 115 | public String getPicture2() { 116 | return picture2; 117 | } 118 | 119 | 120 | /** 121 | * 设置:图片3 122 | */ 123 | 124 | public void setPicture3(String picture3) { 125 | this.picture3 = picture3; 126 | } 127 | 128 | /** 129 | * 获取:图片3 130 | */ 131 | public String getPicture3() { 132 | return picture3; 133 | } 134 | 135 | } 136 | -------------------------------------------------------------------------------- /src/main/java/com/entity/vo/AddressVO.java: -------------------------------------------------------------------------------- 1 | package com.entity.vo; 2 | 3 | import com.entity.AddressEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 地址 15 | * 手机端接口返回实体辅助类 16 | * (主要作用去除一些不必要的字段) 17 | * @author 18 | * @email 19 | * @date 2023-03-09 17:28:21 20 | */ 21 | public class AddressVO implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | 25 | /** 26 | * 地址 27 | */ 28 | 29 | private String address; 30 | 31 | /** 32 | * 收货人 33 | */ 34 | 35 | private String name; 36 | 37 | /** 38 | * 电话 39 | */ 40 | 41 | private String phone; 42 | 43 | /** 44 | * 是否默认地址[是/否] 45 | */ 46 | 47 | private String isdefault; 48 | 49 | 50 | /** 51 | * 设置:地址 52 | */ 53 | 54 | public void setAddress(String address) { 55 | this.address = address; 56 | } 57 | 58 | /** 59 | * 获取:地址 60 | */ 61 | public String getAddress() { 62 | return address; 63 | } 64 | 65 | 66 | /** 67 | * 设置:收货人 68 | */ 69 | 70 | public void setName(String name) { 71 | this.name = name; 72 | } 73 | 74 | /** 75 | * 获取:收货人 76 | */ 77 | public String getName() { 78 | return name; 79 | } 80 | 81 | 82 | /** 83 | * 设置:电话 84 | */ 85 | 86 | public void setPhone(String phone) { 87 | this.phone = phone; 88 | } 89 | 90 | /** 91 | * 获取:电话 92 | */ 93 | public String getPhone() { 94 | return phone; 95 | } 96 | 97 | 98 | /** 99 | * 设置:是否默认地址[是/否] 100 | */ 101 | 102 | public void setIsdefault(String isdefault) { 103 | this.isdefault = isdefault; 104 | } 105 | 106 | /** 107 | * 获取:是否默认地址[是/否] 108 | */ 109 | public String getIsdefault() { 110 | return isdefault; 111 | } 112 | 113 | } 114 | -------------------------------------------------------------------------------- /src/main/java/com/entity/vo/CartVO.java: -------------------------------------------------------------------------------- 1 | package com.entity.vo; 2 | 3 | import com.entity.CartEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 购物车表 15 | * 手机端接口返回实体辅助类 16 | * (主要作用去除一些不必要的字段) 17 | * @author 18 | * @email 19 | * @date 2023-03-09 17:28:21 20 | */ 21 | public class CartVO implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | 25 | /** 26 | * 用户id 27 | */ 28 | 29 | private Long userid; 30 | 31 | /** 32 | * 商品id 33 | */ 34 | 35 | private Long goodid; 36 | 37 | /** 38 | * 商品名称 39 | */ 40 | 41 | private String goodname; 42 | 43 | /** 44 | * 图片 45 | */ 46 | 47 | private String picture; 48 | 49 | /** 50 | * 购买数量 51 | */ 52 | 53 | private Integer buynumber; 54 | 55 | /** 56 | * 单价 57 | */ 58 | 59 | private Float price; 60 | 61 | /** 62 | * 会员价 63 | */ 64 | 65 | private Float discountprice; 66 | 67 | /** 68 | * 商户名称 69 | */ 70 | 71 | private String shangjiazhanghao; 72 | 73 | /** 74 | * 商品类型 75 | */ 76 | 77 | private String goodtype; 78 | 79 | 80 | /** 81 | * 设置:用户id 82 | */ 83 | 84 | public void setUserid(Long userid) { 85 | this.userid = userid; 86 | } 87 | 88 | /** 89 | * 获取:用户id 90 | */ 91 | public Long getUserid() { 92 | return userid; 93 | } 94 | 95 | 96 | /** 97 | * 设置:商品id 98 | */ 99 | 100 | public void setGoodid(Long goodid) { 101 | this.goodid = goodid; 102 | } 103 | 104 | /** 105 | * 获取:商品id 106 | */ 107 | public Long getGoodid() { 108 | return goodid; 109 | } 110 | 111 | 112 | /** 113 | * 设置:商品名称 114 | */ 115 | 116 | public void setGoodname(String goodname) { 117 | this.goodname = goodname; 118 | } 119 | 120 | /** 121 | * 获取:商品名称 122 | */ 123 | public String getGoodname() { 124 | return goodname; 125 | } 126 | 127 | 128 | /** 129 | * 设置:图片 130 | */ 131 | 132 | public void setPicture(String picture) { 133 | this.picture = picture; 134 | } 135 | 136 | /** 137 | * 获取:图片 138 | */ 139 | public String getPicture() { 140 | return picture; 141 | } 142 | 143 | 144 | /** 145 | * 设置:购买数量 146 | */ 147 | 148 | public void setBuynumber(Integer buynumber) { 149 | this.buynumber = buynumber; 150 | } 151 | 152 | /** 153 | * 获取:购买数量 154 | */ 155 | public Integer getBuynumber() { 156 | return buynumber; 157 | } 158 | 159 | 160 | /** 161 | * 设置:单价 162 | */ 163 | 164 | public void setPrice(Float price) { 165 | this.price = price; 166 | } 167 | 168 | /** 169 | * 获取:单价 170 | */ 171 | public Float getPrice() { 172 | return price; 173 | } 174 | 175 | 176 | /** 177 | * 设置:会员价 178 | */ 179 | 180 | public void setDiscountprice(Float discountprice) { 181 | this.discountprice = discountprice; 182 | } 183 | 184 | /** 185 | * 获取:会员价 186 | */ 187 | public Float getDiscountprice() { 188 | return discountprice; 189 | } 190 | 191 | 192 | /** 193 | * 设置:商户名称 194 | */ 195 | 196 | public void setShangjiazhanghao(String shangjiazhanghao) { 197 | this.shangjiazhanghao = shangjiazhanghao; 198 | } 199 | 200 | /** 201 | * 获取:商户名称 202 | */ 203 | public String getShangjiazhanghao() { 204 | return shangjiazhanghao; 205 | } 206 | 207 | 208 | /** 209 | * 设置:商品类型 210 | */ 211 | 212 | public void setGoodtype(String goodtype) { 213 | this.goodtype = goodtype; 214 | } 215 | 216 | /** 217 | * 获取:商品类型 218 | */ 219 | public String getGoodtype() { 220 | return goodtype; 221 | } 222 | 223 | } 224 | -------------------------------------------------------------------------------- /src/main/java/com/entity/vo/ChatVO.java: -------------------------------------------------------------------------------- 1 | package com.entity.vo; 2 | 3 | import com.entity.ChatEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 官方客服 15 | * 手机端接口返回实体辅助类 16 | * (主要作用去除一些不必要的字段) 17 | * @author 18 | * @email 19 | * @date 2023-03-09 17:28:21 20 | */ 21 | public class ChatVO implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | 25 | /** 26 | * 管理员id 27 | */ 28 | 29 | private Long adminid; 30 | 31 | /** 32 | * 提问 33 | */ 34 | 35 | private String ask; 36 | 37 | /** 38 | * 回复 39 | */ 40 | 41 | private String reply; 42 | 43 | /** 44 | * 是否回复 45 | */ 46 | 47 | private Integer isreply; 48 | 49 | 50 | /** 51 | * 设置:管理员id 52 | */ 53 | 54 | public void setAdminid(Long adminid) { 55 | this.adminid = adminid; 56 | } 57 | 58 | /** 59 | * 获取:管理员id 60 | */ 61 | public Long getAdminid() { 62 | return adminid; 63 | } 64 | 65 | 66 | /** 67 | * 设置:提问 68 | */ 69 | 70 | public void setAsk(String ask) { 71 | this.ask = ask; 72 | } 73 | 74 | /** 75 | * 获取:提问 76 | */ 77 | public String getAsk() { 78 | return ask; 79 | } 80 | 81 | 82 | /** 83 | * 设置:回复 84 | */ 85 | 86 | public void setReply(String reply) { 87 | this.reply = reply; 88 | } 89 | 90 | /** 91 | * 获取:回复 92 | */ 93 | public String getReply() { 94 | return reply; 95 | } 96 | 97 | 98 | /** 99 | * 设置:是否回复 100 | */ 101 | 102 | public void setIsreply(Integer isreply) { 103 | this.isreply = isreply; 104 | } 105 | 106 | /** 107 | * 获取:是否回复 108 | */ 109 | public Integer getIsreply() { 110 | return isreply; 111 | } 112 | 113 | } 114 | -------------------------------------------------------------------------------- /src/main/java/com/entity/vo/DiscussshangchengshangpinVO.java: -------------------------------------------------------------------------------- 1 | package com.entity.vo; 2 | 3 | import com.entity.DiscussshangchengshangpinEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 商城商品评论表 15 | * 手机端接口返回实体辅助类 16 | * (主要作用去除一些不必要的字段) 17 | * @author 18 | * @email 19 | * @date 2023-03-09 17:28:21 20 | */ 21 | public class DiscussshangchengshangpinVO implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | 25 | /** 26 | * 用户id 27 | */ 28 | 29 | private Long userid; 30 | 31 | /** 32 | * 头像 33 | */ 34 | 35 | private String avatarurl; 36 | 37 | /** 38 | * 用户名 39 | */ 40 | 41 | private String nickname; 42 | 43 | /** 44 | * 评论内容 45 | */ 46 | 47 | private String content; 48 | 49 | /** 50 | * 回复内容 51 | */ 52 | 53 | private String reply; 54 | 55 | 56 | /** 57 | * 设置:用户id 58 | */ 59 | 60 | public void setUserid(Long userid) { 61 | this.userid = userid; 62 | } 63 | 64 | /** 65 | * 获取:用户id 66 | */ 67 | public Long getUserid() { 68 | return userid; 69 | } 70 | 71 | 72 | /** 73 | * 设置:头像 74 | */ 75 | 76 | public void setAvatarurl(String avatarurl) { 77 | this.avatarurl = avatarurl; 78 | } 79 | 80 | /** 81 | * 获取:头像 82 | */ 83 | public String getAvatarurl() { 84 | return avatarurl; 85 | } 86 | 87 | 88 | /** 89 | * 设置:用户名 90 | */ 91 | 92 | public void setNickname(String nickname) { 93 | this.nickname = nickname; 94 | } 95 | 96 | /** 97 | * 获取:用户名 98 | */ 99 | public String getNickname() { 100 | return nickname; 101 | } 102 | 103 | 104 | /** 105 | * 设置:评论内容 106 | */ 107 | 108 | public void setContent(String content) { 109 | this.content = content; 110 | } 111 | 112 | /** 113 | * 获取:评论内容 114 | */ 115 | public String getContent() { 116 | return content; 117 | } 118 | 119 | 120 | /** 121 | * 设置:回复内容 122 | */ 123 | 124 | public void setReply(String reply) { 125 | this.reply = reply; 126 | } 127 | 128 | /** 129 | * 获取:回复内容 130 | */ 131 | public String getReply() { 132 | return reply; 133 | } 134 | 135 | } 136 | -------------------------------------------------------------------------------- /src/main/java/com/entity/vo/NewsVO.java: -------------------------------------------------------------------------------- 1 | package com.entity.vo; 2 | 3 | import com.entity.NewsEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 商城公告 15 | * 手机端接口返回实体辅助类 16 | * (主要作用去除一些不必要的字段) 17 | * @author 18 | * @email 19 | * @date 2023-03-09 17:28:21 20 | */ 21 | public class NewsVO implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | 25 | /** 26 | * 简介 27 | */ 28 | 29 | private String introduction; 30 | 31 | /** 32 | * 图片 33 | */ 34 | 35 | private String picture; 36 | 37 | /** 38 | * 内容 39 | */ 40 | 41 | private String content; 42 | 43 | 44 | /** 45 | * 设置:简介 46 | */ 47 | 48 | public void setIntroduction(String introduction) { 49 | this.introduction = introduction; 50 | } 51 | 52 | /** 53 | * 获取:简介 54 | */ 55 | public String getIntroduction() { 56 | return introduction; 57 | } 58 | 59 | 60 | /** 61 | * 设置:图片 62 | */ 63 | 64 | public void setPicture(String picture) { 65 | this.picture = picture; 66 | } 67 | 68 | /** 69 | * 获取:图片 70 | */ 71 | public String getPicture() { 72 | return picture; 73 | } 74 | 75 | 76 | /** 77 | * 设置:内容 78 | */ 79 | 80 | public void setContent(String content) { 81 | this.content = content; 82 | } 83 | 84 | /** 85 | * 获取:内容 86 | */ 87 | public String getContent() { 88 | return content; 89 | } 90 | 91 | } 92 | -------------------------------------------------------------------------------- /src/main/java/com/entity/vo/ShangjiaVO.java: -------------------------------------------------------------------------------- 1 | package com.entity.vo; 2 | 3 | import com.entity.ShangjiaEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 商家 15 | * 手机端接口返回实体辅助类 16 | * (主要作用去除一些不必要的字段) 17 | * @author 18 | * @email 19 | * @date 2023-03-09 17:28:21 20 | */ 21 | public class ShangjiaVO implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | 25 | /** 26 | * 密码 27 | */ 28 | 29 | private String mima; 30 | 31 | /** 32 | * 店铺名 33 | */ 34 | 35 | private String dianpuming; 36 | 37 | /** 38 | * 店铺地址 39 | */ 40 | 41 | private String dianpudizhi; 42 | 43 | /** 44 | * 联系方式 45 | */ 46 | 47 | private String lianxifangshi; 48 | 49 | /** 50 | * 封面图片 51 | */ 52 | 53 | private String fengmiantupian; 54 | 55 | /** 56 | * 联系人 57 | */ 58 | 59 | private String lianxiren; 60 | 61 | /** 62 | * 商家介绍 63 | */ 64 | 65 | private String shangjiajieshao; 66 | 67 | /** 68 | * 余额 69 | */ 70 | 71 | private Float money; 72 | 73 | 74 | /** 75 | * 设置:密码 76 | */ 77 | 78 | public void setMima(String mima) { 79 | this.mima = mima; 80 | } 81 | 82 | /** 83 | * 获取:密码 84 | */ 85 | public String getMima() { 86 | return mima; 87 | } 88 | 89 | 90 | /** 91 | * 设置:店铺名 92 | */ 93 | 94 | public void setDianpuming(String dianpuming) { 95 | this.dianpuming = dianpuming; 96 | } 97 | 98 | /** 99 | * 获取:店铺名 100 | */ 101 | public String getDianpuming() { 102 | return dianpuming; 103 | } 104 | 105 | 106 | /** 107 | * 设置:店铺地址 108 | */ 109 | 110 | public void setDianpudizhi(String dianpudizhi) { 111 | this.dianpudizhi = dianpudizhi; 112 | } 113 | 114 | /** 115 | * 获取:店铺地址 116 | */ 117 | public String getDianpudizhi() { 118 | return dianpudizhi; 119 | } 120 | 121 | 122 | /** 123 | * 设置:联系方式 124 | */ 125 | 126 | public void setLianxifangshi(String lianxifangshi) { 127 | this.lianxifangshi = lianxifangshi; 128 | } 129 | 130 | /** 131 | * 获取:联系方式 132 | */ 133 | public String getLianxifangshi() { 134 | return lianxifangshi; 135 | } 136 | 137 | 138 | /** 139 | * 设置:封面图片 140 | */ 141 | 142 | public void setFengmiantupian(String fengmiantupian) { 143 | this.fengmiantupian = fengmiantupian; 144 | } 145 | 146 | /** 147 | * 获取:封面图片 148 | */ 149 | public String getFengmiantupian() { 150 | return fengmiantupian; 151 | } 152 | 153 | 154 | /** 155 | * 设置:联系人 156 | */ 157 | 158 | public void setLianxiren(String lianxiren) { 159 | this.lianxiren = lianxiren; 160 | } 161 | 162 | /** 163 | * 获取:联系人 164 | */ 165 | public String getLianxiren() { 166 | return lianxiren; 167 | } 168 | 169 | 170 | /** 171 | * 设置:商家介绍 172 | */ 173 | 174 | public void setShangjiajieshao(String shangjiajieshao) { 175 | this.shangjiajieshao = shangjiajieshao; 176 | } 177 | 178 | /** 179 | * 获取:商家介绍 180 | */ 181 | public String getShangjiajieshao() { 182 | return shangjiajieshao; 183 | } 184 | 185 | 186 | /** 187 | * 设置:余额 188 | */ 189 | 190 | public void setMoney(Float money) { 191 | this.money = money; 192 | } 193 | 194 | /** 195 | * 获取:余额 196 | */ 197 | public Float getMoney() { 198 | return money; 199 | } 200 | 201 | } 202 | -------------------------------------------------------------------------------- /src/main/java/com/entity/vo/ShangpinzhongleiVO.java: -------------------------------------------------------------------------------- 1 | package com.entity.vo; 2 | 3 | import com.entity.ShangpinzhongleiEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 商品种类 15 | * 手机端接口返回实体辅助类 16 | * (主要作用去除一些不必要的字段) 17 | * @author 18 | * @email 19 | * @date 2023-03-09 17:28:21 20 | */ 21 | public class ShangpinzhongleiVO implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/entity/vo/StoreupVO.java: -------------------------------------------------------------------------------- 1 | package com.entity.vo; 2 | 3 | import com.entity.StoreupEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 收藏表 15 | * 手机端接口返回实体辅助类 16 | * (主要作用去除一些不必要的字段) 17 | * @author 18 | * @email 19 | * @date 2023-03-09 17:28:21 20 | */ 21 | public class StoreupVO implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | 25 | /** 26 | * 商品id 27 | */ 28 | 29 | private Long refid; 30 | 31 | /** 32 | * 表名 33 | */ 34 | 35 | private String tablename; 36 | 37 | /** 38 | * 名称 39 | */ 40 | 41 | private String name; 42 | 43 | /** 44 | * 图片 45 | */ 46 | 47 | private String picture; 48 | 49 | /** 50 | * 类型(1:收藏,21:赞,22:踩,31:竞拍参与,41:关注) 51 | */ 52 | 53 | private String type; 54 | 55 | /** 56 | * 推荐类型 57 | */ 58 | 59 | private String inteltype; 60 | 61 | /** 62 | * 备注 63 | */ 64 | 65 | private String remark; 66 | 67 | 68 | /** 69 | * 设置:商品id 70 | */ 71 | 72 | public void setRefid(Long refid) { 73 | this.refid = refid; 74 | } 75 | 76 | /** 77 | * 获取:商品id 78 | */ 79 | public Long getRefid() { 80 | return refid; 81 | } 82 | 83 | 84 | /** 85 | * 设置:表名 86 | */ 87 | 88 | public void setTablename(String tablename) { 89 | this.tablename = tablename; 90 | } 91 | 92 | /** 93 | * 获取:表名 94 | */ 95 | public String getTablename() { 96 | return tablename; 97 | } 98 | 99 | 100 | /** 101 | * 设置:名称 102 | */ 103 | 104 | public void setName(String name) { 105 | this.name = name; 106 | } 107 | 108 | /** 109 | * 获取:名称 110 | */ 111 | public String getName() { 112 | return name; 113 | } 114 | 115 | 116 | /** 117 | * 设置:图片 118 | */ 119 | 120 | public void setPicture(String picture) { 121 | this.picture = picture; 122 | } 123 | 124 | /** 125 | * 获取:图片 126 | */ 127 | public String getPicture() { 128 | return picture; 129 | } 130 | 131 | 132 | /** 133 | * 设置:类型(1:收藏,21:赞,22:踩,31:竞拍参与,41:关注) 134 | */ 135 | 136 | public void setType(String type) { 137 | this.type = type; 138 | } 139 | 140 | /** 141 | * 获取:类型(1:收藏,21:赞,22:踩,31:竞拍参与,41:关注) 142 | */ 143 | public String getType() { 144 | return type; 145 | } 146 | 147 | 148 | /** 149 | * 设置:推荐类型 150 | */ 151 | 152 | public void setInteltype(String inteltype) { 153 | this.inteltype = inteltype; 154 | } 155 | 156 | /** 157 | * 获取:推荐类型 158 | */ 159 | public String getInteltype() { 160 | return inteltype; 161 | } 162 | 163 | 164 | /** 165 | * 设置:备注 166 | */ 167 | 168 | public void setRemark(String remark) { 169 | this.remark = remark; 170 | } 171 | 172 | /** 173 | * 获取:备注 174 | */ 175 | public String getRemark() { 176 | return remark; 177 | } 178 | 179 | } 180 | -------------------------------------------------------------------------------- /src/main/java/com/entity/vo/SystemintroVO.java: -------------------------------------------------------------------------------- 1 | package com.entity.vo; 2 | 3 | import com.entity.SystemintroEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 关于我们 15 | * 手机端接口返回实体辅助类 16 | * (主要作用去除一些不必要的字段) 17 | * @author 18 | * @email 19 | * @date 2023-03-09 17:28:21 20 | */ 21 | public class SystemintroVO implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | 25 | /** 26 | * 副标题 27 | */ 28 | 29 | private String subtitle; 30 | 31 | /** 32 | * 内容 33 | */ 34 | 35 | private String content; 36 | 37 | /** 38 | * 图片1 39 | */ 40 | 41 | private String picture1; 42 | 43 | /** 44 | * 图片2 45 | */ 46 | 47 | private String picture2; 48 | 49 | /** 50 | * 图片3 51 | */ 52 | 53 | private String picture3; 54 | 55 | 56 | /** 57 | * 设置:副标题 58 | */ 59 | 60 | public void setSubtitle(String subtitle) { 61 | this.subtitle = subtitle; 62 | } 63 | 64 | /** 65 | * 获取:副标题 66 | */ 67 | public String getSubtitle() { 68 | return subtitle; 69 | } 70 | 71 | 72 | /** 73 | * 设置:内容 74 | */ 75 | 76 | public void setContent(String content) { 77 | this.content = content; 78 | } 79 | 80 | /** 81 | * 获取:内容 82 | */ 83 | public String getContent() { 84 | return content; 85 | } 86 | 87 | 88 | /** 89 | * 设置:图片1 90 | */ 91 | 92 | public void setPicture1(String picture1) { 93 | this.picture1 = picture1; 94 | } 95 | 96 | /** 97 | * 获取:图片1 98 | */ 99 | public String getPicture1() { 100 | return picture1; 101 | } 102 | 103 | 104 | /** 105 | * 设置:图片2 106 | */ 107 | 108 | public void setPicture2(String picture2) { 109 | this.picture2 = picture2; 110 | } 111 | 112 | /** 113 | * 获取:图片2 114 | */ 115 | public String getPicture2() { 116 | return picture2; 117 | } 118 | 119 | 120 | /** 121 | * 设置:图片3 122 | */ 123 | 124 | public void setPicture3(String picture3) { 125 | this.picture3 = picture3; 126 | } 127 | 128 | /** 129 | * 获取:图片3 130 | */ 131 | public String getPicture3() { 132 | return picture3; 133 | } 134 | 135 | } 136 | -------------------------------------------------------------------------------- /src/main/java/com/entity/vo/YonghuVO.java: -------------------------------------------------------------------------------- 1 | package com.entity.vo; 2 | 3 | import com.entity.YonghuEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 用户 15 | * 手机端接口返回实体辅助类 16 | * (主要作用去除一些不必要的字段) 17 | * @author 18 | * @email 19 | * @date 2023-03-09 17:28:21 20 | */ 21 | public class YonghuVO implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | 25 | /** 26 | * 密码 27 | */ 28 | 29 | private String mima; 30 | 31 | /** 32 | * 用户姓名 33 | */ 34 | 35 | private String yonghuxingming; 36 | 37 | /** 38 | * 性别 39 | */ 40 | 41 | private String xingbie; 42 | 43 | /** 44 | * 年龄 45 | */ 46 | 47 | private String nianling; 48 | 49 | /** 50 | * 头像 51 | */ 52 | 53 | private String touxiang; 54 | 55 | /** 56 | * 余额 57 | */ 58 | 59 | private Float money; 60 | 61 | /** 62 | * 是否会员 63 | */ 64 | 65 | private String vip; 66 | 67 | 68 | /** 69 | * 设置:密码 70 | */ 71 | 72 | public void setMima(String mima) { 73 | this.mima = mima; 74 | } 75 | 76 | /** 77 | * 获取:密码 78 | */ 79 | public String getMima() { 80 | return mima; 81 | } 82 | 83 | 84 | /** 85 | * 设置:用户姓名 86 | */ 87 | 88 | public void setYonghuxingming(String yonghuxingming) { 89 | this.yonghuxingming = yonghuxingming; 90 | } 91 | 92 | /** 93 | * 获取:用户姓名 94 | */ 95 | public String getYonghuxingming() { 96 | return yonghuxingming; 97 | } 98 | 99 | 100 | /** 101 | * 设置:性别 102 | */ 103 | 104 | public void setXingbie(String xingbie) { 105 | this.xingbie = xingbie; 106 | } 107 | 108 | /** 109 | * 获取:性别 110 | */ 111 | public String getXingbie() { 112 | return xingbie; 113 | } 114 | 115 | 116 | /** 117 | * 设置:年龄 118 | */ 119 | 120 | public void setNianling(String nianling) { 121 | this.nianling = nianling; 122 | } 123 | 124 | /** 125 | * 获取:年龄 126 | */ 127 | public String getNianling() { 128 | return nianling; 129 | } 130 | 131 | 132 | /** 133 | * 设置:头像 134 | */ 135 | 136 | public void setTouxiang(String touxiang) { 137 | this.touxiang = touxiang; 138 | } 139 | 140 | /** 141 | * 获取:头像 142 | */ 143 | public String getTouxiang() { 144 | return touxiang; 145 | } 146 | 147 | 148 | /** 149 | * 设置:余额 150 | */ 151 | 152 | public void setMoney(Float money) { 153 | this.money = money; 154 | } 155 | 156 | /** 157 | * 获取:余额 158 | */ 159 | public Float getMoney() { 160 | return money; 161 | } 162 | 163 | 164 | /** 165 | * 设置:是否会员 166 | */ 167 | 168 | public void setVip(String vip) { 169 | this.vip = vip; 170 | } 171 | 172 | /** 173 | * 获取:是否会员 174 | */ 175 | public String getVip() { 176 | return vip; 177 | } 178 | 179 | } 180 | -------------------------------------------------------------------------------- /src/main/java/com/interceptor/AuthorizationInterceptor.java: -------------------------------------------------------------------------------- 1 | package com.interceptor; 2 | 3 | import java.io.IOException; 4 | import java.io.PrintWriter; 5 | import java.util.HashMap; 6 | import java.util.Map; 7 | import com.alibaba.fastjson.JSONObject; 8 | import javax.servlet.http.HttpServletRequest; 9 | import javax.servlet.http.HttpServletResponse; 10 | 11 | import org.apache.commons.lang3.StringUtils; 12 | import org.springframework.beans.factory.annotation.Autowired; 13 | import org.springframework.stereotype.Component; 14 | import org.springframework.web.method.HandlerMethod; 15 | import org.springframework.web.servlet.HandlerInterceptor; 16 | import org.springframework.web.bind.annotation.RequestMethod; 17 | import org.springframework.http.HttpStatus; 18 | 19 | import com.annotation.IgnoreAuth; 20 | import com.entity.EIException; 21 | import com.entity.TokenEntity; 22 | import com.service.TokenService; 23 | import com.utils.R; 24 | 25 | /** 26 | * 权限(Token)验证 27 | */ 28 | @Component 29 | public class AuthorizationInterceptor implements HandlerInterceptor { 30 | 31 | public static final String LOGIN_TOKEN_KEY = "Token"; 32 | 33 | @Autowired 34 | private TokenService tokenService; 35 | 36 | @Override 37 | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { 38 | 39 | //支持跨域请求 40 | response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE"); 41 | response.setHeader("Access-Control-Max-Age", "3600"); 42 | response.setHeader("Access-Control-Allow-Credentials", "true"); 43 | response.setHeader("Access-Control-Allow-Headers", "x-requested-with,request-source,Token, Origin,imgType, Content-Type, cache-control,postman-token,Cookie, Accept,authorization"); 44 | response.setHeader("Access-Control-Allow-Origin", request.getHeader("Origin")); 45 | // 跨域时会首先发送一个OPTIONS请求,这里我们给OPTIONS请求直接返回正常状态 46 | if (request.getMethod().equals(RequestMethod.OPTIONS.name())) { 47 | response.setStatus(HttpStatus.OK.value()); 48 | return false; 49 | } 50 | 51 | IgnoreAuth annotation; 52 | if (handler instanceof HandlerMethod) { 53 | annotation = ((HandlerMethod) handler).getMethodAnnotation(IgnoreAuth.class); 54 | } else { 55 | return true; 56 | } 57 | 58 | //从header中获取token 59 | String token = request.getHeader(LOGIN_TOKEN_KEY); 60 | 61 | /** 62 | * 不需要验证权限的方法直接放过 63 | */ 64 | if(annotation!=null) { 65 | return true; 66 | } 67 | 68 | TokenEntity tokenEntity = null; 69 | if(StringUtils.isNotBlank(token)) { 70 | tokenEntity = tokenService.getTokenEntity(token); 71 | } 72 | 73 | if(tokenEntity != null) { 74 | request.getSession().setAttribute("userId", tokenEntity.getUserid()); 75 | request.getSession().setAttribute("role", tokenEntity.getRole()); 76 | request.getSession().setAttribute("tableName", tokenEntity.getTablename()); 77 | request.getSession().setAttribute("username", tokenEntity.getUsername()); 78 | return true; 79 | } 80 | 81 | PrintWriter writer = null; 82 | response.setCharacterEncoding("UTF-8"); 83 | response.setContentType("application/json; charset=utf-8"); 84 | try { 85 | writer = response.getWriter(); 86 | writer.print(JSONObject.toJSONString(R.error(401, "请先登录"))); 87 | } finally { 88 | if(writer != null){ 89 | writer.close(); 90 | } 91 | } 92 | // throw new EIException("请先登录", 401); 93 | return false; 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /src/main/java/com/service/AboutusService.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.AboutusEntity; 7 | import java.util.List; 8 | import java.util.Map; 9 | import com.entity.vo.AboutusVO; 10 | import org.apache.ibatis.annotations.Param; 11 | import com.entity.view.AboutusView; 12 | 13 | 14 | /** 15 | * 关于我们 16 | * 17 | * @author 18 | * @email 19 | * @date 2023-03-09 17:28:21 20 | */ 21 | public interface AboutusService extends IService { 22 | 23 | PageUtils queryPage(Map params); 24 | 25 | List selectListVO(Wrapper wrapper); 26 | 27 | AboutusVO selectVO(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Wrapper wrapper); 30 | 31 | AboutusView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | PageUtils queryPage(Map params,Wrapper wrapper); 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /src/main/java/com/service/AddressService.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.AddressEntity; 7 | import java.util.List; 8 | import java.util.Map; 9 | import com.entity.vo.AddressVO; 10 | import org.apache.ibatis.annotations.Param; 11 | import com.entity.view.AddressView; 12 | 13 | 14 | /** 15 | * 地址 16 | * 17 | * @author 18 | * @email 19 | * @date 2023-03-09 17:28:21 20 | */ 21 | public interface AddressService extends IService { 22 | 23 | PageUtils queryPage(Map params); 24 | 25 | List selectListVO(Wrapper wrapper); 26 | 27 | AddressVO selectVO(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Wrapper wrapper); 30 | 31 | AddressView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | PageUtils queryPage(Map params,Wrapper wrapper); 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /src/main/java/com/service/CartService.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.CartEntity; 7 | import java.util.List; 8 | import java.util.Map; 9 | import com.entity.vo.CartVO; 10 | import org.apache.ibatis.annotations.Param; 11 | import com.entity.view.CartView; 12 | 13 | 14 | /** 15 | * 购物车表 16 | * 17 | * @author 18 | * @email 19 | * @date 2023-03-09 17:28:21 20 | */ 21 | public interface CartService extends IService { 22 | 23 | PageUtils queryPage(Map params); 24 | 25 | List selectListVO(Wrapper wrapper); 26 | 27 | CartVO selectVO(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Wrapper wrapper); 30 | 31 | CartView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | PageUtils queryPage(Map params,Wrapper wrapper); 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /src/main/java/com/service/ChatService.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.ChatEntity; 7 | import java.util.List; 8 | import java.util.Map; 9 | import com.entity.vo.ChatVO; 10 | import org.apache.ibatis.annotations.Param; 11 | import com.entity.view.ChatView; 12 | 13 | 14 | /** 15 | * 官方客服 16 | * 17 | * @author 18 | * @email 19 | * @date 2023-03-09 17:28:21 20 | */ 21 | public interface ChatService extends IService { 22 | 23 | PageUtils queryPage(Map params); 24 | 25 | List selectListVO(Wrapper wrapper); 26 | 27 | ChatVO selectVO(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Wrapper wrapper); 30 | 31 | ChatView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | PageUtils queryPage(Map params,Wrapper wrapper); 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /src/main/java/com/service/CommonService.java: -------------------------------------------------------------------------------- 1 | package com.service; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | public interface CommonService { 7 | List getOption(Map params); 8 | 9 | Map getFollowByOption(Map params); 10 | 11 | void sh(Map params); 12 | 13 | int remindCount(Map params); 14 | 15 | Map selectCal(Map params); 16 | 17 | List> selectGroup(Map params); 18 | 19 | List> selectValue(Map params); 20 | 21 | List> selectTimeStatValue(Map params); 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/com/service/ConfigService.java: -------------------------------------------------------------------------------- 1 | 2 | package com.service; 3 | 4 | import java.util.Map; 5 | 6 | import com.baomidou.mybatisplus.mapper.Wrapper; 7 | import com.baomidou.mybatisplus.service.IService; 8 | import com.entity.ConfigEntity; 9 | import com.utils.PageUtils; 10 | 11 | 12 | /** 13 | * 系统用户 14 | */ 15 | public interface ConfigService extends IService { 16 | PageUtils queryPage(Map params,Wrapper wrapper); 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/service/DiscussshangchengshangpinService.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.DiscussshangchengshangpinEntity; 7 | import java.util.List; 8 | import java.util.Map; 9 | import com.entity.vo.DiscussshangchengshangpinVO; 10 | import org.apache.ibatis.annotations.Param; 11 | import com.entity.view.DiscussshangchengshangpinView; 12 | 13 | 14 | /** 15 | * 商城商品评论表 16 | * 17 | * @author 18 | * @email 19 | * @date 2023-03-09 17:28:21 20 | */ 21 | public interface DiscussshangchengshangpinService extends IService { 22 | 23 | PageUtils queryPage(Map params); 24 | 25 | List selectListVO(Wrapper wrapper); 26 | 27 | DiscussshangchengshangpinVO selectVO(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Wrapper wrapper); 30 | 31 | DiscussshangchengshangpinView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | PageUtils queryPage(Map params,Wrapper wrapper); 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /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 2023-03-09 17:28:21 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/OrdersService.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.OrdersEntity; 7 | import java.util.List; 8 | import java.util.Map; 9 | import com.entity.vo.OrdersVO; 10 | import org.apache.ibatis.annotations.Param; 11 | import com.entity.view.OrdersView; 12 | 13 | 14 | /** 15 | * 订单 16 | * 17 | * @author 18 | * @email 19 | * @date 2023-03-09 17:28:21 20 | */ 21 | public interface OrdersService extends IService { 22 | 23 | PageUtils queryPage(Map params); 24 | 25 | List selectListVO(Wrapper wrapper); 26 | 27 | OrdersVO selectVO(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Wrapper wrapper); 30 | 31 | OrdersView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | PageUtils queryPage(Map params,Wrapper wrapper); 34 | 35 | 36 | List> selectValue(Map params,Wrapper wrapper); 37 | 38 | List> selectTimeStatValue(Map params,Wrapper wrapper); 39 | 40 | List> selectGroup(Map params,Wrapper wrapper); 41 | 42 | 43 | 44 | } 45 | 46 | -------------------------------------------------------------------------------- /src/main/java/com/service/ShangchengshangpinService.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.ShangchengshangpinEntity; 7 | import java.util.List; 8 | import java.util.Map; 9 | import com.entity.vo.ShangchengshangpinVO; 10 | import org.apache.ibatis.annotations.Param; 11 | import com.entity.view.ShangchengshangpinView; 12 | 13 | 14 | /** 15 | * 商城商品 16 | * 17 | * @author 18 | * @email 19 | * @date 2023-03-09 17:28:21 20 | */ 21 | public interface ShangchengshangpinService extends IService { 22 | 23 | PageUtils queryPage(Map params); 24 | 25 | List selectListVO(Wrapper wrapper); 26 | 27 | ShangchengshangpinVO selectVO(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Wrapper wrapper); 30 | 31 | ShangchengshangpinView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | PageUtils queryPage(Map params,Wrapper wrapper); 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /src/main/java/com/service/ShangjiaService.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.ShangjiaEntity; 7 | import java.util.List; 8 | import java.util.Map; 9 | import com.entity.vo.ShangjiaVO; 10 | import org.apache.ibatis.annotations.Param; 11 | import com.entity.view.ShangjiaView; 12 | 13 | 14 | /** 15 | * 商家 16 | * 17 | * @author 18 | * @email 19 | * @date 2023-03-09 17:28:21 20 | */ 21 | public interface ShangjiaService extends IService { 22 | 23 | PageUtils queryPage(Map params); 24 | 25 | List selectListVO(Wrapper wrapper); 26 | 27 | ShangjiaVO selectVO(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Wrapper wrapper); 30 | 31 | ShangjiaView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | PageUtils queryPage(Map params,Wrapper wrapper); 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /src/main/java/com/service/ShangpinzhongleiService.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.ShangpinzhongleiEntity; 7 | import java.util.List; 8 | import java.util.Map; 9 | import com.entity.vo.ShangpinzhongleiVO; 10 | import org.apache.ibatis.annotations.Param; 11 | import com.entity.view.ShangpinzhongleiView; 12 | 13 | 14 | /** 15 | * 商品种类 16 | * 17 | * @author 18 | * @email 19 | * @date 2023-03-09 17:28:21 20 | */ 21 | public interface ShangpinzhongleiService extends IService { 22 | 23 | PageUtils queryPage(Map params); 24 | 25 | List selectListVO(Wrapper wrapper); 26 | 27 | ShangpinzhongleiVO selectVO(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Wrapper wrapper); 30 | 31 | ShangpinzhongleiView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | PageUtils queryPage(Map params,Wrapper wrapper); 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /src/main/java/com/service/StoreupService.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.StoreupEntity; 7 | import java.util.List; 8 | import java.util.Map; 9 | import com.entity.vo.StoreupVO; 10 | import org.apache.ibatis.annotations.Param; 11 | import com.entity.view.StoreupView; 12 | 13 | 14 | /** 15 | * 收藏表 16 | * 17 | * @author 18 | * @email 19 | * @date 2023-03-09 17:28:21 20 | */ 21 | public interface StoreupService extends IService { 22 | 23 | PageUtils queryPage(Map params); 24 | 25 | List selectListVO(Wrapper wrapper); 26 | 27 | StoreupVO selectVO(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Wrapper wrapper); 30 | 31 | StoreupView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | PageUtils queryPage(Map params,Wrapper wrapper); 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /src/main/java/com/service/SystemintroService.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.SystemintroEntity; 7 | import java.util.List; 8 | import java.util.Map; 9 | import com.entity.vo.SystemintroVO; 10 | import org.apache.ibatis.annotations.Param; 11 | import com.entity.view.SystemintroView; 12 | 13 | 14 | /** 15 | * 关于我们 16 | * 17 | * @author 18 | * @email 19 | * @date 2023-03-09 17:28:21 20 | */ 21 | public interface SystemintroService extends IService { 22 | 23 | PageUtils queryPage(Map params); 24 | 25 | List selectListVO(Wrapper wrapper); 26 | 27 | SystemintroVO selectVO(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Wrapper wrapper); 30 | 31 | SystemintroView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | PageUtils queryPage(Map params,Wrapper wrapper); 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /src/main/java/com/service/TokenService.java: -------------------------------------------------------------------------------- 1 | 2 | package com.service; 3 | 4 | import java.util.List; 5 | import java.util.Map; 6 | 7 | import com.baomidou.mybatisplus.mapper.Wrapper; 8 | import com.baomidou.mybatisplus.service.IService; 9 | import com.entity.TokenEntity; 10 | import com.utils.PageUtils; 11 | 12 | 13 | /** 14 | * token 15 | */ 16 | public interface TokenService extends IService { 17 | PageUtils queryPage(Map params); 18 | 19 | List selectListView(Wrapper wrapper); 20 | 21 | PageUtils queryPage(Map params,Wrapper wrapper); 22 | 23 | String generateToken(Long userid,String username,String tableName, String role); 24 | 25 | TokenEntity getTokenEntity(String token); 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/service/UsersService.java: -------------------------------------------------------------------------------- 1 | 2 | package com.service; 3 | 4 | import java.util.List; 5 | import java.util.Map; 6 | 7 | import org.apache.ibatis.annotations.Param; 8 | 9 | import com.baomidou.mybatisplus.mapper.Wrapper; 10 | import com.baomidou.mybatisplus.service.IService; 11 | import com.entity.UsersEntity; 12 | import com.utils.PageUtils; 13 | 14 | 15 | /** 16 | * 系统用户 17 | */ 18 | public interface UsersService extends IService { 19 | PageUtils queryPage(Map params); 20 | 21 | List selectListView(Wrapper wrapper); 22 | 23 | PageUtils queryPage(Map params,Wrapper wrapper); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/service/YonghuService.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.YonghuEntity; 7 | import java.util.List; 8 | import java.util.Map; 9 | import com.entity.vo.YonghuVO; 10 | import org.apache.ibatis.annotations.Param; 11 | import com.entity.view.YonghuView; 12 | 13 | 14 | /** 15 | * 用户 16 | * 17 | * @author 18 | * @email 19 | * @date 2023-03-09 17:28:21 20 | */ 21 | public interface YonghuService extends IService { 22 | 23 | PageUtils queryPage(Map params); 24 | 25 | List selectListVO(Wrapper wrapper); 26 | 27 | YonghuVO selectVO(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Wrapper wrapper); 30 | 31 | YonghuView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | PageUtils queryPage(Map params,Wrapper wrapper); 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /src/main/java/com/service/impl/AboutusServiceImpl.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.AboutusDao; 16 | import com.entity.AboutusEntity; 17 | import com.service.AboutusService; 18 | import com.entity.vo.AboutusVO; 19 | import com.entity.view.AboutusView; 20 | 21 | @Service("aboutusService") 22 | public class AboutusServiceImpl extends ServiceImpl implements AboutusService { 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 AboutusVO 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 AboutusView selectView(Wrapper wrapper) { 59 | return baseMapper.selectView(wrapper); 60 | } 61 | 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/com/service/impl/AddressServiceImpl.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.AddressDao; 16 | import com.entity.AddressEntity; 17 | import com.service.AddressService; 18 | import com.entity.vo.AddressVO; 19 | import com.entity.view.AddressView; 20 | 21 | @Service("addressService") 22 | public class AddressServiceImpl extends ServiceImpl implements AddressService { 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 AddressVO 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 AddressView selectView(Wrapper wrapper) { 59 | return baseMapper.selectView(wrapper); 60 | } 61 | 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/com/service/impl/CartServiceImpl.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.CartDao; 16 | import com.entity.CartEntity; 17 | import com.service.CartService; 18 | import com.entity.vo.CartVO; 19 | import com.entity.view.CartView; 20 | 21 | @Service("cartService") 22 | public class CartServiceImpl extends ServiceImpl implements CartService { 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 CartVO 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 CartView selectView(Wrapper wrapper) { 59 | return baseMapper.selectView(wrapper); 60 | } 61 | 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/com/service/impl/ChatServiceImpl.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.ChatDao; 16 | import com.entity.ChatEntity; 17 | import com.service.ChatService; 18 | import com.entity.vo.ChatVO; 19 | import com.entity.view.ChatView; 20 | 21 | @Service("chatService") 22 | public class ChatServiceImpl extends ServiceImpl implements ChatService { 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 ChatVO 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 ChatView selectView(Wrapper wrapper) { 59 | return baseMapper.selectView(wrapper); 60 | } 61 | 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/com/service/impl/CommonServiceImpl.java: -------------------------------------------------------------------------------- 1 | 2 | package com.service.impl; 3 | 4 | 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.stereotype.Service; 10 | 11 | import com.dao.CommonDao; 12 | import com.service.CommonService; 13 | 14 | 15 | /** 16 | * 系统用户 17 | */ 18 | @Service("commonService") 19 | public class CommonServiceImpl implements CommonService { 20 | 21 | @Autowired 22 | private CommonDao commonDao; 23 | 24 | @Override 25 | public List getOption(Map params) { 26 | return commonDao.getOption(params); 27 | } 28 | 29 | @Override 30 | public Map getFollowByOption(Map params) { 31 | return commonDao.getFollowByOption(params); 32 | } 33 | 34 | @Override 35 | public void sh(Map params) { 36 | commonDao.sh(params); 37 | } 38 | 39 | @Override 40 | public int remindCount(Map params) { 41 | return commonDao.remindCount(params); 42 | } 43 | 44 | @Override 45 | public Map selectCal(Map params) { 46 | return commonDao.selectCal(params); 47 | } 48 | 49 | @Override 50 | public List> selectGroup(Map params) { 51 | return commonDao.selectGroup(params); 52 | } 53 | 54 | @Override 55 | public List> selectValue(Map params) { 56 | return commonDao.selectValue(params); 57 | } 58 | 59 | @Override 60 | public List> selectTimeStatValue(Map params) { 61 | return commonDao.selectTimeStatValue(params); 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /src/main/java/com/service/impl/ConfigServiceImpl.java: -------------------------------------------------------------------------------- 1 | 2 | package com.service.impl; 3 | 4 | 5 | import java.util.Map; 6 | 7 | import org.springframework.stereotype.Service; 8 | 9 | import com.baomidou.mybatisplus.mapper.EntityWrapper; 10 | import com.baomidou.mybatisplus.mapper.Wrapper; 11 | import com.baomidou.mybatisplus.plugins.Page; 12 | import com.baomidou.mybatisplus.service.impl.ServiceImpl; 13 | import com.dao.ConfigDao; 14 | import com.entity.ConfigEntity; 15 | import com.service.ConfigService; 16 | import com.utils.PageUtils; 17 | import com.utils.Query; 18 | 19 | 20 | /** 21 | * 系统用户 22 | */ 23 | @Service("configService") 24 | public class ConfigServiceImpl extends ServiceImpl implements ConfigService { 25 | @Override 26 | public PageUtils queryPage(Map params, Wrapper wrapper) { 27 | Page page = this.selectPage( 28 | new Query(params).getPage(), 29 | wrapper 30 | ); 31 | return new PageUtils(page); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/service/impl/DiscussshangchengshangpinServiceImpl.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.DiscussshangchengshangpinDao; 16 | import com.entity.DiscussshangchengshangpinEntity; 17 | import com.service.DiscussshangchengshangpinService; 18 | import com.entity.vo.DiscussshangchengshangpinVO; 19 | import com.entity.view.DiscussshangchengshangpinView; 20 | 21 | @Service("discussshangchengshangpinService") 22 | public class DiscussshangchengshangpinServiceImpl extends ServiceImpl implements DiscussshangchengshangpinService { 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 DiscussshangchengshangpinVO 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 DiscussshangchengshangpinView selectView(Wrapper wrapper) { 59 | return baseMapper.selectView(wrapper); 60 | } 61 | 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/com/service/impl/NewsServiceImpl.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.NewsDao; 16 | import com.entity.NewsEntity; 17 | import com.service.NewsService; 18 | import com.entity.vo.NewsVO; 19 | import com.entity.view.NewsView; 20 | 21 | @Service("newsService") 22 | public class NewsServiceImpl extends ServiceImpl implements NewsService { 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 NewsVO 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 NewsView selectView(Wrapper wrapper) { 59 | return baseMapper.selectView(wrapper); 60 | } 61 | 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/com/service/impl/OrdersServiceImpl.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.OrdersDao; 16 | import com.entity.OrdersEntity; 17 | import com.service.OrdersService; 18 | import com.entity.vo.OrdersVO; 19 | import com.entity.view.OrdersView; 20 | 21 | @Service("ordersService") 22 | public class OrdersServiceImpl extends ServiceImpl implements OrdersService { 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 OrdersVO 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 OrdersView selectView(Wrapper wrapper) { 59 | return baseMapper.selectView(wrapper); 60 | } 61 | 62 | @Override 63 | public List> selectValue(Map params, Wrapper wrapper) { 64 | return baseMapper.selectValue(params, wrapper); 65 | } 66 | 67 | @Override 68 | public List> selectTimeStatValue(Map params, Wrapper wrapper) { 69 | return baseMapper.selectTimeStatValue(params, wrapper); 70 | } 71 | 72 | @Override 73 | public List> selectGroup(Map params, Wrapper wrapper) { 74 | return baseMapper.selectGroup(params, wrapper); 75 | } 76 | 77 | 78 | 79 | 80 | } 81 | -------------------------------------------------------------------------------- /src/main/java/com/service/impl/ShangchengshangpinServiceImpl.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.ShangchengshangpinDao; 16 | import com.entity.ShangchengshangpinEntity; 17 | import com.service.ShangchengshangpinService; 18 | import com.entity.vo.ShangchengshangpinVO; 19 | import com.entity.view.ShangchengshangpinView; 20 | 21 | @Service("shangchengshangpinService") 22 | public class ShangchengshangpinServiceImpl extends ServiceImpl implements ShangchengshangpinService { 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 ShangchengshangpinVO 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 ShangchengshangpinView selectView(Wrapper wrapper) { 59 | return baseMapper.selectView(wrapper); 60 | } 61 | 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/com/service/impl/ShangjiaServiceImpl.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.ShangjiaDao; 16 | import com.entity.ShangjiaEntity; 17 | import com.service.ShangjiaService; 18 | import com.entity.vo.ShangjiaVO; 19 | import com.entity.view.ShangjiaView; 20 | 21 | @Service("shangjiaService") 22 | public class ShangjiaServiceImpl extends ServiceImpl implements ShangjiaService { 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 ShangjiaVO 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 ShangjiaView selectView(Wrapper wrapper) { 59 | return baseMapper.selectView(wrapper); 60 | } 61 | 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/com/service/impl/ShangpinzhongleiServiceImpl.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.ShangpinzhongleiDao; 16 | import com.entity.ShangpinzhongleiEntity; 17 | import com.service.ShangpinzhongleiService; 18 | import com.entity.vo.ShangpinzhongleiVO; 19 | import com.entity.view.ShangpinzhongleiView; 20 | 21 | @Service("shangpinzhongleiService") 22 | public class ShangpinzhongleiServiceImpl extends ServiceImpl implements ShangpinzhongleiService { 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 ShangpinzhongleiVO 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 ShangpinzhongleiView selectView(Wrapper wrapper) { 59 | return baseMapper.selectView(wrapper); 60 | } 61 | 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/com/service/impl/StoreupServiceImpl.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.StoreupDao; 16 | import com.entity.StoreupEntity; 17 | import com.service.StoreupService; 18 | import com.entity.vo.StoreupVO; 19 | import com.entity.view.StoreupView; 20 | 21 | @Service("storeupService") 22 | public class StoreupServiceImpl extends ServiceImpl implements StoreupService { 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 StoreupVO 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 StoreupView selectView(Wrapper wrapper) { 59 | return baseMapper.selectView(wrapper); 60 | } 61 | 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/com/service/impl/SystemintroServiceImpl.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.SystemintroDao; 16 | import com.entity.SystemintroEntity; 17 | import com.service.SystemintroService; 18 | import com.entity.vo.SystemintroVO; 19 | import com.entity.view.SystemintroView; 20 | 21 | @Service("systemintroService") 22 | public class SystemintroServiceImpl extends ServiceImpl implements SystemintroService { 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 SystemintroVO 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 SystemintroView selectView(Wrapper wrapper) { 59 | return baseMapper.selectView(wrapper); 60 | } 61 | 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/com/service/impl/TokenServiceImpl.java: -------------------------------------------------------------------------------- 1 | 2 | package com.service.impl; 3 | 4 | 5 | import java.util.Calendar; 6 | import java.util.Date; 7 | import java.util.List; 8 | import java.util.Map; 9 | 10 | import org.springframework.stereotype.Service; 11 | 12 | import com.baomidou.mybatisplus.mapper.EntityWrapper; 13 | import com.baomidou.mybatisplus.mapper.Wrapper; 14 | import com.baomidou.mybatisplus.plugins.Page; 15 | import com.baomidou.mybatisplus.service.impl.ServiceImpl; 16 | import com.dao.TokenDao; 17 | import com.entity.TokenEntity; 18 | import com.entity.TokenEntity; 19 | import com.service.TokenService; 20 | import com.utils.CommonUtil; 21 | import com.utils.PageUtils; 22 | import com.utils.Query; 23 | 24 | 25 | /** 26 | * token 27 | */ 28 | @Service("tokenService") 29 | public class TokenServiceImpl extends ServiceImpl implements TokenService { 30 | 31 | @Override 32 | public PageUtils queryPage(Map params) { 33 | Page page = this.selectPage( 34 | new Query(params).getPage(), 35 | new EntityWrapper() 36 | ); 37 | return new PageUtils(page); 38 | } 39 | 40 | @Override 41 | public List selectListView(Wrapper wrapper) { 42 | return baseMapper.selectListView(wrapper); 43 | } 44 | 45 | @Override 46 | public PageUtils queryPage(Map params, 47 | Wrapper wrapper) { 48 | Page page =new Query(params).getPage(); 49 | page.setRecords(baseMapper.selectListView(page,wrapper)); 50 | PageUtils pageUtil = new PageUtils(page); 51 | return pageUtil; 52 | } 53 | 54 | @Override 55 | public String generateToken(Long userid,String username, String tableName, String role) { 56 | TokenEntity tokenEntity = this.selectOne(new EntityWrapper().eq("userid", userid).eq("role", role)); 57 | String token = CommonUtil.getRandomString(32); 58 | Calendar cal = Calendar.getInstance(); 59 | cal.setTime(new Date()); 60 | cal.add(Calendar.HOUR_OF_DAY, 1); 61 | if(tokenEntity!=null) { 62 | tokenEntity.setToken(token); 63 | tokenEntity.setExpiratedtime(cal.getTime()); 64 | this.updateById(tokenEntity); 65 | } else { 66 | this.insert(new TokenEntity(userid,username, tableName, role, token, cal.getTime())); 67 | } 68 | return token; 69 | } 70 | 71 | @Override 72 | public TokenEntity getTokenEntity(String token) { 73 | TokenEntity tokenEntity = this.selectOne(new EntityWrapper().eq("token", token)); 74 | if(tokenEntity == null || tokenEntity.getExpiratedtime().getTime() implements UsersService { 26 | 27 | @Override 28 | public PageUtils queryPage(Map params) { 29 | Page page = this.selectPage( 30 | new Query(params).getPage(), 31 | new EntityWrapper() 32 | ); 33 | return new PageUtils(page); 34 | } 35 | 36 | @Override 37 | public List selectListView(Wrapper wrapper) { 38 | return baseMapper.selectListView(wrapper); 39 | } 40 | 41 | @Override 42 | public PageUtils queryPage(Map params, 43 | Wrapper wrapper) { 44 | Page page =new Query(params).getPage(); 45 | page.setRecords(baseMapper.selectListView(page,wrapper)); 46 | PageUtils pageUtil = new PageUtils(page); 47 | return pageUtil; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/com/service/impl/YonghuServiceImpl.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.YonghuDao; 16 | import com.entity.YonghuEntity; 17 | import com.service.YonghuService; 18 | import com.entity.vo.YonghuVO; 19 | import com.entity.view.YonghuView; 20 | 21 | @Service("yonghuService") 22 | public class YonghuServiceImpl extends ServiceImpl implements YonghuService { 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 YonghuVO 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 YonghuView selectView(Wrapper wrapper) { 59 | return baseMapper.selectView(wrapper); 60 | } 61 | 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/com/utils/FileUtil.java: -------------------------------------------------------------------------------- 1 | package com.utils; 2 | 3 | import java.io.ByteArrayOutputStream; 4 | import java.io.File; 5 | import java.io.FileInputStream; 6 | import java.io.IOException; 7 | import java.io.InputStream; 8 | 9 | /** 10 | * 类说明 : 11 | */ 12 | 13 | public class FileUtil { 14 | public static byte[] FileToByte(File file) throws IOException { 15 | // 将数据转为流 16 | @SuppressWarnings("resource") 17 | InputStream content = new FileInputStream(file); 18 | ByteArrayOutputStream swapStream = new ByteArrayOutputStream(); 19 | byte[] buff = new byte[100]; 20 | int rc = 0; 21 | while ((rc = content.read(buff, 0, 100)) > 0) { 22 | swapStream.write(buff, 0, rc); 23 | } 24 | // 获得二进制数组 25 | return swapStream.toByteArray(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/utils/HttpClientUtils.java: -------------------------------------------------------------------------------- 1 | package com.utils; 2 | 3 | import java.io.BufferedReader; 4 | import java.io.InputStreamReader; 5 | import java.net.HttpURLConnection; 6 | import java.net.URL; 7 | 8 | 9 | /** 10 | * HttpClient工具类 11 | */ 12 | public class HttpClientUtils { 13 | 14 | /** 15 | * @param uri 16 | * @return String 17 | * @description get请求方式 18 | * @author: long.he01 19 | */ 20 | public static String doGet(String uri) { 21 | 22 | StringBuilder result = new StringBuilder(); 23 | try { 24 | String res = ""; 25 | URL url = new URL(uri); 26 | HttpURLConnection conn = (HttpURLConnection) url.openConnection(); 27 | BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream(), "UTF-8")); 28 | String line; 29 | while ((line = in.readLine()) != null) { 30 | res += line+"\n"; 31 | } 32 | in.close(); 33 | return res; 34 | }catch (Exception e) { 35 | e.printStackTrace(); 36 | return null; 37 | } 38 | 39 | } 40 | 41 | } 42 | 43 | -------------------------------------------------------------------------------- /src/main/java/com/utils/JQPageInfo.java: -------------------------------------------------------------------------------- 1 | package com.utils; 2 | 3 | public class JQPageInfo{ 4 | private Integer page; 5 | 6 | private Integer limit; 7 | 8 | private String sidx; 9 | 10 | private String order; 11 | 12 | private Integer offset; 13 | 14 | public Integer getPage() { 15 | return page; 16 | } 17 | 18 | public void setPage(Integer page) { 19 | this.page = page; 20 | } 21 | 22 | public Integer getLimit() { 23 | return limit; 24 | } 25 | 26 | public void setLimit(Integer limit) { 27 | this.limit = limit; 28 | } 29 | 30 | public String getSidx() { 31 | return sidx; 32 | } 33 | 34 | public void setSidx(String sidx) { 35 | this.sidx = sidx; 36 | } 37 | 38 | public String getOrder() { 39 | return order; 40 | } 41 | 42 | public void setOrder(String order) { 43 | this.order = order; 44 | } 45 | 46 | public Integer getOffset() { 47 | return offset; 48 | } 49 | 50 | public void setOffset(Integer offset) { 51 | this.offset = offset; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/com/utils/MD5Util.java: -------------------------------------------------------------------------------- 1 | package com.utils; 2 | 3 | import cn.hutool.crypto.digest.DigestUtil; 4 | 5 | public class MD5Util { 6 | 7 | /** 8 | * @param text明文 9 | * @param key密钥 10 | * @return 密文 11 | */ 12 | // 带秘钥加密 13 | public static String md5(String text) { 14 | // 加密后的字符串 15 | String md5str = DigestUtil.md5Hex(text); 16 | return md5str; 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/utils/PageUtils.java: -------------------------------------------------------------------------------- 1 | 2 | package com.utils; 3 | 4 | import java.io.Serializable; 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | import com.baomidou.mybatisplus.plugins.Page; 9 | 10 | /** 11 | * 分页工具类 12 | */ 13 | public class PageUtils implements Serializable { 14 | private static final long serialVersionUID = 1L; 15 | //总记录数 16 | private long total; 17 | //每页记录数 18 | private int pageSize; 19 | //总页数 20 | private long totalPage; 21 | //当前页数 22 | private int currPage; 23 | //列表数据 24 | private List list; 25 | 26 | /** 27 | * 分页 28 | * @param list 列表数据 29 | * @param totalCount 总记录数 30 | * @param pageSize 每页记录数 31 | * @param currPage 当前页数 32 | */ 33 | public PageUtils(List list, int totalCount, int pageSize, int currPage) { 34 | this.list = list; 35 | this.total = totalCount; 36 | this.pageSize = pageSize; 37 | this.currPage = currPage; 38 | this.totalPage = (int)Math.ceil((double)totalCount/pageSize); 39 | } 40 | 41 | /** 42 | * 分页 43 | */ 44 | public PageUtils(Page page) { 45 | this.list = page.getRecords(); 46 | this.total = page.getTotal(); 47 | this.pageSize = page.getSize(); 48 | this.currPage = page.getCurrent(); 49 | this.totalPage = page.getPages(); 50 | } 51 | 52 | /* 53 | * 空数据的分页 54 | */ 55 | public PageUtils(Map params) { 56 | Page page =new Query(params).getPage(); 57 | new PageUtils(page); 58 | } 59 | 60 | 61 | public int getPageSize() { 62 | return pageSize; 63 | } 64 | 65 | public void setPageSize(int pageSize) { 66 | this.pageSize = pageSize; 67 | } 68 | 69 | public int getCurrPage() { 70 | return currPage; 71 | } 72 | 73 | public void setCurrPage(int currPage) { 74 | this.currPage = currPage; 75 | } 76 | 77 | public List getList() { 78 | return list; 79 | } 80 | 81 | public void setList(List list) { 82 | this.list = list; 83 | } 84 | 85 | public long getTotalPage() { 86 | return totalPage; 87 | } 88 | 89 | public void setTotalPage(long totalPage) { 90 | this.totalPage = totalPage; 91 | } 92 | 93 | public long getTotal() { 94 | return total; 95 | } 96 | 97 | public void setTotal(long total) { 98 | this.total = total; 99 | } 100 | 101 | } 102 | -------------------------------------------------------------------------------- /src/main/java/com/utils/Query.java: -------------------------------------------------------------------------------- 1 | 2 | package com.utils; 3 | 4 | import java.util.LinkedHashMap; 5 | import java.util.Map; 6 | 7 | import org.apache.commons.lang3.StringUtils; 8 | 9 | import com.baomidou.mybatisplus.plugins.Page; 10 | 11 | /** 12 | * 查询参数 13 | */ 14 | public class Query extends LinkedHashMap { 15 | private static final long serialVersionUID = 1L; 16 | /** 17 | * mybatis-plus分页参数 18 | */ 19 | private Page page; 20 | /** 21 | * 当前页码 22 | */ 23 | private int currPage = 1; 24 | /** 25 | * 每页条数 26 | */ 27 | private int limit = 10; 28 | 29 | public Query(JQPageInfo pageInfo) { 30 | //分页参数 31 | if(pageInfo.getPage()!= null){ 32 | currPage = pageInfo.getPage(); 33 | } 34 | if(pageInfo.getLimit()!= null){ 35 | limit = pageInfo.getLimit(); 36 | } 37 | 38 | 39 | //防止SQL注入(因为sidx、order是通过拼接SQL实现排序的,会有SQL注入风险) 40 | String sidx = SQLFilter.sqlInject(pageInfo.getSidx()); 41 | String order = SQLFilter.sqlInject(pageInfo.getOrder()); 42 | 43 | 44 | //mybatis-plus分页 45 | this.page = new Page<>(currPage, limit); 46 | 47 | //排序 48 | if(StringUtils.isNotBlank(sidx) && StringUtils.isNotBlank(order)){ 49 | this.page.setOrderByField(sidx); 50 | this.page.setAsc("ASC".equalsIgnoreCase(order)); 51 | } 52 | } 53 | 54 | 55 | public Query(Map params){ 56 | this.putAll(params); 57 | 58 | //分页参数 59 | if(params.get("page") != null){ 60 | currPage = Integer.parseInt((String)params.get("page")); 61 | } 62 | if(params.get("limit") != null){ 63 | limit = Integer.parseInt((String)params.get("limit")); 64 | } 65 | 66 | this.put("offset", (currPage - 1) * limit); 67 | this.put("page", currPage); 68 | this.put("limit", limit); 69 | 70 | //防止SQL注入(因为sidx、order是通过拼接SQL实现排序的,会有SQL注入风险) 71 | String sidx = SQLFilter.sqlInject((String)params.get("sidx")); 72 | String order = SQLFilter.sqlInject((String)params.get("order")); 73 | this.put("sidx", sidx); 74 | this.put("order", order); 75 | 76 | //mybatis-plus分页 77 | this.page = new Page<>(currPage, limit); 78 | 79 | //排序 80 | if(StringUtils.isNotBlank(sidx) && StringUtils.isNotBlank(order)){ 81 | this.page.setOrderByField(sidx); 82 | this.page.setAsc("ASC".equalsIgnoreCase(order)); 83 | } 84 | 85 | } 86 | 87 | public Page getPage() { 88 | return page; 89 | } 90 | 91 | public int getCurrPage() { 92 | return currPage; 93 | } 94 | 95 | public int getLimit() { 96 | return limit; 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /src/main/java/com/utils/R.java: -------------------------------------------------------------------------------- 1 | package com.utils; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | /** 7 | * 返回数据 8 | */ 9 | public class R extends HashMap { 10 | private static final long serialVersionUID = 1L; 11 | 12 | public R() { 13 | put("code", 0); 14 | } 15 | 16 | public static R error() { 17 | return error(500, "未知异常,请联系管理员"); 18 | } 19 | 20 | public static R error(String msg) { 21 | return error(500, msg); 22 | } 23 | 24 | public static R error(int code, String msg) { 25 | R r = new R(); 26 | r.put("code", code); 27 | r.put("msg", msg); 28 | return r; 29 | } 30 | 31 | public static R ok(String msg) { 32 | R r = new R(); 33 | r.put("msg", msg); 34 | return r; 35 | } 36 | 37 | public static R ok(Map map) { 38 | R r = new R(); 39 | r.putAll(map); 40 | return r; 41 | } 42 | 43 | public static R ok() { 44 | return new R(); 45 | } 46 | 47 | public R put(String key, Object value) { 48 | super.put(key, value); 49 | return this; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/com/utils/SQLFilter.java: -------------------------------------------------------------------------------- 1 | 2 | package com.utils; 3 | 4 | import org.apache.commons.lang3.StringUtils; 5 | 6 | import com.entity.EIException; 7 | 8 | /** 9 | * SQL过滤 10 | */ 11 | public class SQLFilter { 12 | 13 | /** 14 | * SQL注入过滤 15 | * @param str 待验证的字符串 16 | */ 17 | public static String sqlInject(String str){ 18 | if(StringUtils.isBlank(str)){ 19 | return null; 20 | } 21 | //去掉'|"|;|\字符 22 | str = StringUtils.replace(str, "'", ""); 23 | str = StringUtils.replace(str, "\"", ""); 24 | str = StringUtils.replace(str, ";", ""); 25 | str = StringUtils.replace(str, "\\", ""); 26 | 27 | //转换成小写 28 | str = str.toLowerCase(); 29 | 30 | //非法字符 31 | String[] keywords = {"master", "truncate", "insert", "select", "delete", "update", "declare", "alter", "drop"}; 32 | 33 | //判断是否包含非法字符 34 | for(String keyword : keywords){ 35 | if(str.indexOf(keyword) != -1){ 36 | throw new EIException("包含非法字符"); 37 | } 38 | } 39 | 40 | return str; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/utils/SpringContextUtils.java: -------------------------------------------------------------------------------- 1 | 2 | package com.utils; 3 | 4 | import org.springframework.beans.BeansException; 5 | import org.springframework.context.ApplicationContext; 6 | import org.springframework.context.ApplicationContextAware; 7 | import org.springframework.stereotype.Component; 8 | 9 | 10 | /** 11 | * Spring Context 工具类 12 | */ 13 | @Component 14 | public class SpringContextUtils implements ApplicationContextAware { 15 | public static ApplicationContext applicationContext; 16 | 17 | @Override 18 | public void setApplicationContext(ApplicationContext applicationContext) 19 | throws BeansException { 20 | SpringContextUtils.applicationContext = applicationContext; 21 | } 22 | 23 | public static Object getBean(String name) { 24 | return applicationContext.getBean(name); 25 | } 26 | 27 | public static T getBean(String name, Class requiredType) { 28 | return applicationContext.getBean(name, requiredType); 29 | } 30 | 31 | public static boolean containsBean(String name) { 32 | return applicationContext.containsBean(name); 33 | } 34 | 35 | public static boolean isSingleton(String name) { 36 | return applicationContext.isSingleton(name); 37 | } 38 | 39 | public static Class getType(String name) { 40 | return applicationContext.getType(name); 41 | } 42 | 43 | } -------------------------------------------------------------------------------- /src/main/java/com/utils/ValidatorUtils.java: -------------------------------------------------------------------------------- 1 | 2 | package com.utils; 3 | 4 | 5 | import java.util.Set; 6 | 7 | import javax.validation.ConstraintViolation; 8 | import javax.validation.Validation; 9 | import javax.validation.Validator; 10 | 11 | import com.entity.EIException; 12 | 13 | /** 14 | * hibernate-validator校验工具类 15 | */ 16 | public class ValidatorUtils { 17 | private static Validator validator; 18 | 19 | static { 20 | validator = Validation.buildDefaultValidatorFactory().getValidator(); 21 | } 22 | 23 | /** 24 | * 校验对象 25 | * @param object 待校验对象 26 | * @param groups 待校验的组 27 | * @throws EIException 校验不通过,则报EIException异常 28 | */ 29 | public static void validateEntity(Object object, Class... groups) 30 | throws EIException { 31 | Set> constraintViolations = validator.validate(object, groups); 32 | if (!constraintViolations.isEmpty()) { 33 | ConstraintViolation constraint = (ConstraintViolation)constraintViolations.iterator().next(); 34 | throw new EIException(constraint.getMessage()); 35 | } 36 | } 37 | 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | # Tomcat 2 | server: 3 | tomcat: 4 | uri-encoding: UTF-8 5 | port: 8080 6 | servlet: 7 | context-path: /springbootkebgy 8 | 9 | 10 | spring: 11 | datasource: 12 | driverClassName: com.mysql.cj.jdbc.Driver 13 | url: jdbc:mysql://127.0.0.1:3306/springbootkebgy?useUnicode=true&characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8 14 | username: root 15 | password: 123456 16 | 17 | # driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver 18 | # url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=springbootkebgy 19 | # username: sa 20 | # password: 123456 21 | 22 | servlet: 23 | multipart: 24 | max-file-size: 300MB 25 | max-request-size: 300MB 26 | resources: 27 | static-locations: classpath:static/,file:static/ 28 | 29 | #mybatis 30 | mybatis-plus: 31 | mapper-locations: classpath*:mapper/*.xml 32 | #实体扫描,多个package用逗号或者分号分隔 33 | typeAliasesPackage: com.entity 34 | global-config: 35 | #主键类型 0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID"; 36 | id-type: 1 37 | #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断" 38 | field-strategy: 1 39 | #驼峰下划线转换 40 | db-column-underline: true 41 | #刷新mapper 调试神器 42 | refresh-mapper: true 43 | #逻辑删除配置 44 | logic-delete-value: -1 45 | logic-not-delete-value: 0 46 | #自定义SQL注入器 47 | sql-injector: com.baomidou.mybatisplus.mapper.LogicSqlInjector 48 | configuration: 49 | map-underscore-to-camel-case: true 50 | cache-enabled: false 51 | call-setters-on-nulls: true 52 | #springboot 项目mybatis plus 设置 jdbcTypeForNull (oracle数据库需配置JdbcType.NULL, 默认是Other) 53 | jdbc-type-for-null: 'null' 54 | -------------------------------------------------------------------------------- /src/main/resources/mapper/AboutusDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 21 | 22 | 27 | 28 | 34 | 35 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /src/main/resources/mapper/AddressDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 20 | 21 | 26 | 27 | 33 | 34 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /src/main/resources/mapper/CartDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 25 | 26 | 31 | 32 | 38 | 39 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /src/main/resources/mapper/ChatDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 20 | 21 | 26 | 27 | 33 | 34 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /src/main/resources/mapper/CommonDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 18 | 19 | 22 | 23 | 24 | UPDATE ${table} set sfsh=#{sfsh} where id=#{id} 25 | 26 | 27 | 47 | 48 | 51 | 52 | 55 | 56 | 59 | 60 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /src/main/resources/mapper/ConfigDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/main/resources/mapper/DiscussshangchengshangpinDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 21 | 22 | 27 | 28 | 34 | 35 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /src/main/resources/mapper/NewsDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 19 | 20 | 25 | 26 | 32 | 33 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /src/main/resources/mapper/OrdersDao.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 | 25 | 26 | 27 | 28 | 29 | 30 | 35 | 36 | 41 | 42 | 48 | 49 | 53 | 54 | 55 | 61 | 62 | 79 | 80 | 86 | 87 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /src/main/resources/mapper/ShangchengshangpinDao.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 | 25 | 30 | 31 | 36 | 37 | 43 | 44 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /src/main/resources/mapper/ShangjiaDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 24 | 25 | 30 | 31 | 37 | 38 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/main/resources/mapper/ShangpinzhongleiDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 16 | 17 | 22 | 23 | 29 | 30 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/main/resources/mapper/StoreupDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 23 | 24 | 29 | 30 | 36 | 37 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/main/resources/mapper/SystemintroDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 21 | 22 | 27 | 28 | 34 | 35 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /src/main/resources/mapper/TokenDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/resources/mapper/UsersDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/main/resources/mapper/YonghuDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 23 | 24 | 29 | 30 | 36 | 37 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/test/java/com/SpringbootSchemaApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringbootSchemaApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | --------------------------------------------------------------------------------