From 22e8e3ace5fd982bb973ef0c5ddc3eb7c5a393e2 Mon Sep 17 00:00:00 2001 From: bunny <1319900154@qq.com> Date: Tue, 12 Dec 2023 23:48:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 38 ++++++ .idea/.gitignore | 8 ++ .idea/dataSources.xml | 15 +++ .idea/encodings.xml | 24 ++++ .idea/misc.xml | 18 +++ .idea/uiDesigner.xml | 124 ++++++++++++++++++ pom.xml | 66 ++++++++++ spzx-common/common-service/pom.xml | 49 +++++++ .../src/main/java/cn/bunny/Main.java | 7 + .../java/cn/bunny/config/Knife4jConfig.java | 25 ++++ spzx-common/common-util/pom.xml | 45 +++++++ .../src/main/java/cn/bunny/Main.java | 7 + spzx-common/pom.xml | 32 +++++ spzx-manager/pom.xml | 64 +++++++++ .../main/java/cn/bunny/MangerApplication.java | 13 ++ .../cn/bunny/controller/IndexController.java | 30 +++++ .../java/cn/bunny/mapper/SysUserMapper.java | 10 ++ .../java/cn/bunny/service/SysUserService.java | 9 ++ .../service/impl/SysUserServiceImpl.java | 57 ++++++++ .../src/main/resources/application-dev.yml | 18 +++ .../src/main/resources/application.yml | 5 + .../src/main/resources/logback-spring.xml | 56 ++++++++ .../resources/mapper/user/SysUserMapper.xml | 16 +++ .../src/main/resources/mybatis-config.xml | 16 +++ spzx-model/pom.xml | 45 +++++++ spzx-model/src/main/java/cn/bunny/Main.java | 7 + .../bunny/spzx/model/dto/h5/OrderInfoDto.java | 23 ++++ .../spzx/model/dto/h5/ProductSkuDto.java | 28 ++++ .../bunny/spzx/model/dto/h5/UserLoginDto.java | 15 +++ .../spzx/model/dto/h5/UserRegisterDto.java | 22 ++++ .../model/dto/order/OrderStatisticsDto.java | 16 +++ .../model/dto/product/CategoryBrandDto.java | 16 +++ .../spzx/model/dto/product/ProductDto.java | 23 ++++ .../spzx/model/dto/product/SkuSaleDto.java | 12 ++ .../spzx/model/dto/system/AssginMenuDto.java | 19 +++ .../spzx/model/dto/system/AssginRoleDto.java | 18 +++ .../bunny/spzx/model/dto/system/LoginDto.java | 22 ++++ .../spzx/model/dto/system/SysOperLogDto.java | 22 ++++ .../spzx/model/dto/system/SysRoleDto.java | 13 ++ .../spzx/model/dto/system/SysUserDto.java | 21 +++ .../spzx/model/entity/base/BaseEntity.java | 27 ++++ .../spzx/model/entity/base/ProductUnit.java | 13 ++ .../bunny/spzx/model/entity/base/Region.java | 22 ++++ .../bunny/spzx/model/entity/h5/CartInfo.java | 36 +++++ .../spzx/model/entity/order/OrderInfo.java | 89 +++++++++++++ .../spzx/model/entity/order/OrderItem.java | 33 +++++ .../spzx/model/entity/order/OrderLog.java | 25 ++++ .../model/entity/order/OrderStatistics.java | 16 +++ .../spzx/model/entity/pay/PaymentInfo.java | 43 ++++++ .../spzx/model/entity/product/Brand.java | 17 +++ .../spzx/model/entity/product/Category.java | 34 +++++ .../model/entity/product/CategoryBrand.java | 26 ++++ .../spzx/model/entity/product/Product.java | 65 +++++++++ .../model/entity/product/ProductDetails.java | 12 ++ .../spzx/model/entity/product/ProductSku.java | 53 ++++++++ .../model/entity/product/ProductSpec.java | 17 +++ .../spzx/model/entity/system/SysMenu.java | 32 +++++ .../spzx/model/entity/system/SysOperLog.java | 48 +++++++ .../spzx/model/entity/system/SysRole.java | 22 ++++ .../spzx/model/entity/system/SysRoleUser.java | 12 ++ .../spzx/model/entity/system/SysUser.java | 32 +++++ .../spzx/model/entity/user/UserAddress.java | 43 ++++++ .../spzx/model/entity/user/UserInfo.java | 51 +++++++ .../cn/bunny/spzx/model/vo/common/Result.java | 39 ++++++ .../spzx/model/vo/common/ResultCodeEnum.java | 30 +++++ .../cn/bunny/spzx/model/vo/h5/IndexVo.java | 15 +++ .../bunny/spzx/model/vo/h5/ProductItemVo.java | 34 +++++ .../cn/bunny/spzx/model/vo/h5/TradeVo.java | 20 +++ .../cn/bunny/spzx/model/vo/h5/UserInfoVo.java | 16 +++ .../model/vo/order/OrderStatisticsVo.java | 19 +++ .../model/vo/product/CategoryExcelVo.java | 31 +++++ .../bunny/spzx/model/vo/system/LoginVo.java | 16 +++ .../bunny/spzx/model/vo/system/SysMenuVo.java | 21 +++ .../spzx/model/vo/system/ValidateCodeVo.java | 16 +++ 74 files changed, 2099 insertions(+) create mode 100644 .gitignore create mode 100644 .idea/.gitignore create mode 100644 .idea/dataSources.xml create mode 100644 .idea/encodings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/uiDesigner.xml create mode 100644 pom.xml create mode 100644 spzx-common/common-service/pom.xml create mode 100644 spzx-common/common-service/src/main/java/cn/bunny/Main.java create mode 100644 spzx-common/common-service/src/main/java/cn/bunny/config/Knife4jConfig.java create mode 100644 spzx-common/common-util/pom.xml create mode 100644 spzx-common/common-util/src/main/java/cn/bunny/Main.java create mode 100644 spzx-common/pom.xml create mode 100644 spzx-manager/pom.xml create mode 100644 spzx-manager/src/main/java/cn/bunny/MangerApplication.java create mode 100644 spzx-manager/src/main/java/cn/bunny/controller/IndexController.java create mode 100644 spzx-manager/src/main/java/cn/bunny/mapper/SysUserMapper.java create mode 100644 spzx-manager/src/main/java/cn/bunny/service/SysUserService.java create mode 100644 spzx-manager/src/main/java/cn/bunny/service/impl/SysUserServiceImpl.java create mode 100644 spzx-manager/src/main/resources/application-dev.yml create mode 100644 spzx-manager/src/main/resources/application.yml create mode 100644 spzx-manager/src/main/resources/logback-spring.xml create mode 100644 spzx-manager/src/main/resources/mapper/user/SysUserMapper.xml create mode 100644 spzx-manager/src/main/resources/mybatis-config.xml create mode 100644 spzx-model/pom.xml create mode 100644 spzx-model/src/main/java/cn/bunny/Main.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/dto/h5/OrderInfoDto.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/dto/h5/ProductSkuDto.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/dto/h5/UserLoginDto.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/dto/h5/UserRegisterDto.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/dto/order/OrderStatisticsDto.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/dto/product/CategoryBrandDto.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/dto/product/ProductDto.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/dto/product/SkuSaleDto.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/dto/system/AssginMenuDto.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/dto/system/AssginRoleDto.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/dto/system/LoginDto.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/dto/system/SysOperLogDto.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/dto/system/SysRoleDto.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/dto/system/SysUserDto.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/entity/base/BaseEntity.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/entity/base/ProductUnit.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/entity/base/Region.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/entity/h5/CartInfo.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/entity/order/OrderInfo.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/entity/order/OrderItem.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/entity/order/OrderLog.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/entity/order/OrderStatistics.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/entity/pay/PaymentInfo.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/entity/product/Brand.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/entity/product/Category.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/entity/product/CategoryBrand.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/entity/product/Product.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/entity/product/ProductDetails.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/entity/product/ProductSku.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/entity/product/ProductSpec.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/entity/system/SysMenu.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/entity/system/SysOperLog.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/entity/system/SysRole.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/entity/system/SysRoleUser.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/entity/system/SysUser.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/entity/user/UserAddress.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/entity/user/UserInfo.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/vo/common/Result.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/vo/common/ResultCodeEnum.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/vo/h5/IndexVo.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/vo/h5/ProductItemVo.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/vo/h5/TradeVo.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/vo/h5/UserInfoVo.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/vo/order/OrderStatisticsVo.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/vo/product/CategoryExcelVo.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/vo/system/LoginVo.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/vo/system/SysMenuVo.java create mode 100644 spzx-model/src/main/java/cn/bunny/spzx/model/vo/system/ValidateCodeVo.java diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5ff6309 --- /dev/null +++ b/.gitignore @@ -0,0 +1,38 @@ +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### IntelliJ IDEA ### +.idea/modules.xml +.idea/jarRepositories.xml +.idea/compiler.xml +.idea/libraries/ +*.iws +*.iml +*.ipr + +### Eclipse ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ + +### Mac OS ### +.DS_Store \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/dataSources.xml b/.idea/dataSources.xml new file mode 100644 index 0000000..5050234 --- /dev/null +++ b/.idea/dataSources.xml @@ -0,0 +1,15 @@ + + + + + mysql.8 + true + com.mysql.cj.jdbc.Driver + jdbc:mysql://60.204.230.80:3306/db_spzx + + + + $ProjectFileDir$ + + + \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..958e4cc --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..44de3ab --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,18 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml new file mode 100644 index 0000000..2b63946 --- /dev/null +++ b/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..ae6388b --- /dev/null +++ b/pom.xml @@ -0,0 +1,66 @@ + + + 4.0.0 + + cn.bunny + spzx-parent + 1.0-SNAPSHOT + pom + + spzx-common + spzx-model + spzx-manager + + + + + org.springframework.boot + spring-boot-starter-parent + 3.0.5 + + + + 21 + 21 + UTF-8 + 8.0.30 + 2.0.21 + 1.18.20 + 3.0.1 + + + + + + + + org.mybatis.spring.boot + mybatis-spring-boot-starter + ${mybatis.version} + + + + + mysql + mysql-connector-java + ${mysql.version} + + + + + com.alibaba + fastjson + ${fastjson.version} + + + + + org.projectlombok + lombok + ${lombok.version} + + + + \ No newline at end of file diff --git a/spzx-common/common-service/pom.xml b/spzx-common/common-service/pom.xml new file mode 100644 index 0000000..671effc --- /dev/null +++ b/spzx-common/common-service/pom.xml @@ -0,0 +1,49 @@ + + + 4.0.0 + + cn.bunny + spzx-common + 1.0-SNAPSHOT + + + common-service + + + 21 + 21 + UTF-8 + + + + + + + cn.bunny + common-util + 1.0-SNAPSHOT + + + + + cn.bunny + spzx-model + 1.0-SNAPSHOT + + + + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.boot + spring-boot-starter-data-redis + provided + + + + \ No newline at end of file diff --git a/spzx-common/common-service/src/main/java/cn/bunny/Main.java b/spzx-common/common-service/src/main/java/cn/bunny/Main.java new file mode 100644 index 0000000..e2d961b --- /dev/null +++ b/spzx-common/common-service/src/main/java/cn/bunny/Main.java @@ -0,0 +1,7 @@ +package cn.bunny; + +public class Main { + public static void main(String[] args) { + System.out.println("Hello world!"); + } +} \ No newline at end of file diff --git a/spzx-common/common-service/src/main/java/cn/bunny/config/Knife4jConfig.java b/spzx-common/common-service/src/main/java/cn/bunny/config/Knife4jConfig.java new file mode 100644 index 0000000..79b5068 --- /dev/null +++ b/spzx-common/common-service/src/main/java/cn/bunny/config/Knife4jConfig.java @@ -0,0 +1,25 @@ +package cn.bunny.config; + + +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.info.Contact; +import io.swagger.v3.oas.models.info.Info; +import org.springdoc.core.models.GroupedOpenApi; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +@Configuration +public class Knife4jConfig { + @Bean + public GroupedOpenApi adminApi() {// 创建API分组 + return GroupedOpenApi.builder() + .group("admin-api") + .pathsToMatch("/admin/**") + .build(); + } + + @Bean + public OpenAPI customerOpenApi() { + return new OpenAPI().info(new Info().title("接口文档").version("1.0").contact(new Contact() + .name("bunny"))); + }} diff --git a/spzx-common/common-util/pom.xml b/spzx-common/common-util/pom.xml new file mode 100644 index 0000000..d62427c --- /dev/null +++ b/spzx-common/common-util/pom.xml @@ -0,0 +1,45 @@ + + + 4.0.0 + + cn.bunny + spzx-common + 1.0-SNAPSHOT + + + common-util + + + 21 + 21 + UTF-8 + + + + + + com.alibaba + fastjson + + + + cn.bunny + spzx-model + 1.0-SNAPSHOT + + + + io.minio + minio + 8.5.2 + + + + org.springframework.boot + spring-boot-starter-web + provided + + + \ No newline at end of file diff --git a/spzx-common/common-util/src/main/java/cn/bunny/Main.java b/spzx-common/common-util/src/main/java/cn/bunny/Main.java new file mode 100644 index 0000000..e2d961b --- /dev/null +++ b/spzx-common/common-util/src/main/java/cn/bunny/Main.java @@ -0,0 +1,7 @@ +package cn.bunny; + +public class Main { + public static void main(String[] args) { + System.out.println("Hello world!"); + } +} \ No newline at end of file diff --git a/spzx-common/pom.xml b/spzx-common/pom.xml new file mode 100644 index 0000000..72d8d83 --- /dev/null +++ b/spzx-common/pom.xml @@ -0,0 +1,32 @@ + + + 4.0.0 + + cn.bunny + spzx-parent + 1.0-SNAPSHOT + + + spzx-common + pom + + common-util + common-service + + + + 21 + 21 + UTF-8 + + + + + cn.hutool + hutool-all + 5.5.2 + + + \ No newline at end of file diff --git a/spzx-manager/pom.xml b/spzx-manager/pom.xml new file mode 100644 index 0000000..31a4cd1 --- /dev/null +++ b/spzx-manager/pom.xml @@ -0,0 +1,64 @@ + + + 4.0.0 + + cn.bunny + spzx-parent + 1.0-SNAPSHOT + + + spzx-manager + + + 21 + 21 + UTF-8 + + + + + + + org.springframework.boot + spring-boot-starter-web + + + + + org.springframework.boot + spring-boot-starter-data-redis + + + + + org.mybatis.spring.boot + mybatis-spring-boot-starter + + + + + mysql + mysql-connector-java + + + + + cn.bunny + common-service + 1.0-SNAPSHOT + + + + org.springframework.boot + spring-boot-starter-test + + + + com.github.pagehelper + pagehelper-spring-boot-starter + 1.4.3 + + + \ No newline at end of file diff --git a/spzx-manager/src/main/java/cn/bunny/MangerApplication.java b/spzx-manager/src/main/java/cn/bunny/MangerApplication.java new file mode 100644 index 0000000..afa0cbe --- /dev/null +++ b/spzx-manager/src/main/java/cn/bunny/MangerApplication.java @@ -0,0 +1,13 @@ +package cn.bunny; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.ComponentScan; + +@SpringBootApplication +@ComponentScan(basePackages = "cn.bunny") +public class MangerApplication { + public static void main(String[] args) { + SpringApplication.run(MangerApplication.class, args); + } +} \ No newline at end of file diff --git a/spzx-manager/src/main/java/cn/bunny/controller/IndexController.java b/spzx-manager/src/main/java/cn/bunny/controller/IndexController.java new file mode 100644 index 0000000..b212504 --- /dev/null +++ b/spzx-manager/src/main/java/cn/bunny/controller/IndexController.java @@ -0,0 +1,30 @@ +package cn.bunny.controller; + +import cn.bunny.service.SysUserService; +import cn.bunny.spzx.model.dto.system.LoginDto; +import cn.bunny.spzx.model.vo.common.Result; +import cn.bunny.spzx.model.vo.common.ResultCodeEnum; +import cn.bunny.spzx.model.vo.system.LoginVo; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@Tag(name = "用户接口") +@RestController +@RequestMapping("/admin/system/index") +public class IndexController { + @Autowired + private SysUserService sysUserService; + + // 用户登录 + @Operation(summary = "用户登录") + @PostMapping("login") + public Result login(@RequestBody LoginDto loginDto) { + LoginVo loginVo = sysUserService.login(loginDto); + return Result.build(loginVo, ResultCodeEnum.SUCCESS); + } +} diff --git a/spzx-manager/src/main/java/cn/bunny/mapper/SysUserMapper.java b/spzx-manager/src/main/java/cn/bunny/mapper/SysUserMapper.java new file mode 100644 index 0000000..7bfdf63 --- /dev/null +++ b/spzx-manager/src/main/java/cn/bunny/mapper/SysUserMapper.java @@ -0,0 +1,10 @@ +package cn.bunny.mapper; + + +import cn.bunny.spzx.model.entity.system.SysUser; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface SysUserMapper { + SysUser selectUserInfoByUserName(String userName); +} diff --git a/spzx-manager/src/main/java/cn/bunny/service/SysUserService.java b/spzx-manager/src/main/java/cn/bunny/service/SysUserService.java new file mode 100644 index 0000000..b99e6a1 --- /dev/null +++ b/spzx-manager/src/main/java/cn/bunny/service/SysUserService.java @@ -0,0 +1,9 @@ +package cn.bunny.service; + +import cn.bunny.spzx.model.dto.system.LoginDto; +import cn.bunny.spzx.model.vo.system.LoginVo; + +public interface SysUserService { + // 用户登录 + LoginVo login(LoginDto loginDto); +} diff --git a/spzx-manager/src/main/java/cn/bunny/service/impl/SysUserServiceImpl.java b/spzx-manager/src/main/java/cn/bunny/service/impl/SysUserServiceImpl.java new file mode 100644 index 0000000..08086b0 --- /dev/null +++ b/spzx-manager/src/main/java/cn/bunny/service/impl/SysUserServiceImpl.java @@ -0,0 +1,57 @@ +package cn.bunny.service.impl; + + +import cn.bunny.mapper.SysUserMapper; +import cn.bunny.service.SysUserService; +import cn.bunny.spzx.model.dto.system.LoginDto; +import cn.bunny.spzx.model.entity.system.SysUser; +import cn.bunny.spzx.model.vo.system.LoginVo; +import com.alibaba.fastjson.JSON; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.stereotype.Service; +import org.springframework.util.DigestUtils; + +import java.util.UUID; +import java.util.concurrent.TimeUnit; + +@Service +public class SysUserServiceImpl implements SysUserService { + @Autowired + private SysUserMapper sysUserMapper; + + @Autowired + private RedisTemplate redisTemplate; + + + @Override + public LoginVo login(LoginDto loginDto) { + // 获取用户提交用户名,LoginDto获取到 + String userName = loginDto.getUserName(); + + // 根据用户名查询数据表 sys_user + SysUser sysUser = sysUserMapper.selectUserInfoByUserName(userName); + + // 如果用户名查询不到对应信息,用户不存在,返回错误信息 + if (sysUser == null) { + throw new RuntimeException("用户名不存在"); + } + + // 获取输入密码,比较输入密码和数据库密码是否一致 + String databases_password = sysUser.getPassword(); + String input_password = DigestUtils.md5DigestAsHex(loginDto.getPassword().getBytes()); + + if (!input_password.equals(databases_password)) { + throw new RuntimeException("密码不正确"); + } + + String token = UUID.randomUUID().toString().replaceAll("-", ""); + + redisTemplate.opsForValue().set("user:login" + token, JSON.toJSONString(sysUser), 7, TimeUnit.DAYS); + + LoginVo loginVo = new LoginVo(); + loginVo.setToken(token); + + return loginVo; + } +} diff --git a/spzx-manager/src/main/resources/application-dev.yml b/spzx-manager/src/main/resources/application-dev.yml new file mode 100644 index 0000000..1b713c5 --- /dev/null +++ b/spzx-manager/src/main/resources/application-dev.yml @@ -0,0 +1,18 @@ +server: + port: 8501 + +spring: + datasource: + type: com.zaxxer.hikari.HikariDataSource + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://60.204.230.80:3306/db_spzx?characterEncoding=utf-8&useSSL=false&allowPublicKeyRetrieval=true + username: root + password: "02120212" + data: + redis: + host: 60.204.230.80 + port: 6379 + +mybatis: + mapper-locations: classpath:/mapper/*/*.xml + config-location: classpath:/mybatis-config.xml \ No newline at end of file diff --git a/spzx-manager/src/main/resources/application.yml b/spzx-manager/src/main/resources/application.yml new file mode 100644 index 0000000..988acd0 --- /dev/null +++ b/spzx-manager/src/main/resources/application.yml @@ -0,0 +1,5 @@ +spring: + application: + name: server-manager + profiles: + active: dev diff --git a/spzx-manager/src/main/resources/logback-spring.xml b/spzx-manager/src/main/resources/logback-spring.xml new file mode 100644 index 0000000..eb59d34 --- /dev/null +++ b/spzx-manager/src/main/resources/logback-spring.xml @@ -0,0 +1,56 @@ + + + + logback + + + + + + + + + + + + + + + + + + + + + + + INFO + + + ${CONSOLE_LOG_PATTERN} + ${ENCODING} + + + + + + ${log.path}//log.log + true + + %date{yyyy-MM-dd HH:mm:ss} %msg%n + ${ENCODING} + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/spzx-manager/src/main/resources/mapper/user/SysUserMapper.xml b/spzx-manager/src/main/resources/mapper/user/SysUserMapper.xml new file mode 100644 index 0000000..76e7a82 --- /dev/null +++ b/spzx-manager/src/main/resources/mapper/user/SysUserMapper.xml @@ -0,0 +1,16 @@ + + + + + + + id,username userName ,password,name,phone,avatar,description,status,create_time,update_time,is_deleted + + + + + \ No newline at end of file diff --git a/spzx-manager/src/main/resources/mybatis-config.xml b/spzx-manager/src/main/resources/mybatis-config.xml new file mode 100644 index 0000000..89898c2 --- /dev/null +++ b/spzx-manager/src/main/resources/mybatis-config.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/spzx-model/pom.xml b/spzx-model/pom.xml new file mode 100644 index 0000000..3c4cb7a --- /dev/null +++ b/spzx-model/pom.xml @@ -0,0 +1,45 @@ + + + 4.0.0 + + cn.bunny + spzx-parent + 1.0-SNAPSHOT + + + spzx-model + + + 21 + 21 + UTF-8 + + + + + + + org.projectlombok + lombok + + + + com.github.xiaoymin + knife4j-openapi3-jakarta-spring-boot-starter + 4.1.0 + + + + com.alibaba + easyexcel + 3.1.0 + + + + com.alibaba + fastjson + + + \ No newline at end of file diff --git a/spzx-model/src/main/java/cn/bunny/Main.java b/spzx-model/src/main/java/cn/bunny/Main.java new file mode 100644 index 0000000..e2d961b --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/Main.java @@ -0,0 +1,7 @@ +package cn.bunny; + +public class Main { + public static void main(String[] args) { + System.out.println("Hello world!"); + } +} \ No newline at end of file diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/dto/h5/OrderInfoDto.java b/spzx-model/src/main/java/cn/bunny/spzx/model/dto/h5/OrderInfoDto.java new file mode 100644 index 0000000..c036f7d --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/dto/h5/OrderInfoDto.java @@ -0,0 +1,23 @@ +package cn.bunny.spzx.model.dto.h5; + +import cn.bunny.spzx.model.entity.order.OrderItem; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +@Data +public class OrderInfoDto { + + //送货地址id + private Long userAddressId; + + //运费 + private BigDecimal feightFee; + + //备注 + private String remark; + + //订单明细 + private List orderItemList; +} \ No newline at end of file diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/dto/h5/ProductSkuDto.java b/spzx-model/src/main/java/cn/bunny/spzx/model/dto/h5/ProductSkuDto.java new file mode 100644 index 0000000..4dac8b9 --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/dto/h5/ProductSkuDto.java @@ -0,0 +1,28 @@ +package cn.bunny.spzx.model.dto.h5; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Data +@Schema(description = "商品列表搜索条件实体类") +public class ProductSkuDto { + + @Schema(description = "关键字") + private String keyword; + + @Schema(description = "品牌id") + private Long brandId; + + @Schema(description = "一级分类id") + private Long category1Id; + + @Schema(description = "二级分类id") + private Long category2Id; + + @Schema(description = "三级分类id") + private Long category3Id; + + @Schema(description = "排序(综合排序:1 价格升序:2 价格降序:3)") + private Integer order = 1; + +} \ No newline at end of file diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/dto/h5/UserLoginDto.java b/spzx-model/src/main/java/cn/bunny/spzx/model/dto/h5/UserLoginDto.java new file mode 100644 index 0000000..01cea0e --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/dto/h5/UserLoginDto.java @@ -0,0 +1,15 @@ +package cn.bunny.spzx.model.dto.h5; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Data +@Schema(description = "用户登录请求参数") +public class UserLoginDto { + + @Schema(description = "用户名") + private String username ; + + @Schema(description = "密码") + private String password ; +} \ No newline at end of file diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/dto/h5/UserRegisterDto.java b/spzx-model/src/main/java/cn/bunny/spzx/model/dto/h5/UserRegisterDto.java new file mode 100644 index 0000000..88589d5 --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/dto/h5/UserRegisterDto.java @@ -0,0 +1,22 @@ +package cn.bunny.spzx.model.dto.h5; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Data +@Schema(description="注册对象") +public class UserRegisterDto { + + @Schema(description = "用户名") + private String username; + + @Schema(description = "密码") + private String password; + + @Schema(description = "昵称") + private String nickName; + + @Schema(description = "手机验证码") + private String code ; + +} \ No newline at end of file diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/dto/order/OrderStatisticsDto.java b/spzx-model/src/main/java/cn/bunny/spzx/model/dto/order/OrderStatisticsDto.java new file mode 100644 index 0000000..313348a --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/dto/order/OrderStatisticsDto.java @@ -0,0 +1,16 @@ +package cn.bunny.spzx.model.dto.order; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Data +@Schema(description = "搜索条件实体类") +public class OrderStatisticsDto { + + @Schema(description = "开始时间") + private String createTimeBegin; + + @Schema(description = "结束时间") + private String createTimeEnd; + +} diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/dto/product/CategoryBrandDto.java b/spzx-model/src/main/java/cn/bunny/spzx/model/dto/product/CategoryBrandDto.java new file mode 100644 index 0000000..4cc0adb --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/dto/product/CategoryBrandDto.java @@ -0,0 +1,16 @@ +package cn.bunny.spzx.model.dto.product; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Data +@Schema(description = "搜索条件实体类") +public class CategoryBrandDto { + + @Schema(description = "品牌id") + private Long brandId; + + @Schema(description = "分类id") + private Long categoryId; + +} \ No newline at end of file diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/dto/product/ProductDto.java b/spzx-model/src/main/java/cn/bunny/spzx/model/dto/product/ProductDto.java new file mode 100644 index 0000000..51b2d96 --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/dto/product/ProductDto.java @@ -0,0 +1,23 @@ +package cn.bunny.spzx.model.dto.product; + +import cn.bunny.spzx.model.entity.base.BaseEntity; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Data +@Schema(description = "商品搜索条件实体类") +public class ProductDto extends BaseEntity { + + @Schema(description = "品牌id") + private Long brandId; + + @Schema(description = "一级分类id") + private Long category1Id; + + @Schema(description = "二级分类id") + private Long category2Id; + + @Schema(description = "三级分类id") + private Long category3Id; + +} diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/dto/product/SkuSaleDto.java b/spzx-model/src/main/java/cn/bunny/spzx/model/dto/product/SkuSaleDto.java new file mode 100644 index 0000000..79e9621 --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/dto/product/SkuSaleDto.java @@ -0,0 +1,12 @@ +package cn.bunny.spzx.model.dto.product; + +import lombok.Data; + +@Data +public class SkuSaleDto { + + private Long skuId; + private Integer num; + +} + diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/dto/system/AssginMenuDto.java b/spzx-model/src/main/java/cn/bunny/spzx/model/dto/system/AssginMenuDto.java new file mode 100644 index 0000000..ee1da7a --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/dto/system/AssginMenuDto.java @@ -0,0 +1,19 @@ +package cn.bunny.spzx.model.dto.system; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.util.List; +import java.util.Map; + +@Data +@Schema(description = "请求参数实体类") +public class AssginMenuDto { + + @Schema(description = "角色id") + private Long roleId; // 角色id + + @Schema(description = "选中的菜单id的集合") + private List> menuIdList; // 选中的菜单id的集合; Map的键表示菜单的id,值表示是否为半开; 0否,1是 + +} \ No newline at end of file diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/dto/system/AssginRoleDto.java b/spzx-model/src/main/java/cn/bunny/spzx/model/dto/system/AssginRoleDto.java new file mode 100644 index 0000000..dd0181f --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/dto/system/AssginRoleDto.java @@ -0,0 +1,18 @@ +package cn.bunny.spzx.model.dto.system; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.util.List; + +@Data +@Schema(description = "请求参数实体类") +public class AssginRoleDto { + + @Schema(description = "用户id") + private Long userId; + + @Schema(description = "角色id的List集合") + private List roleIdList; + +} diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/dto/system/LoginDto.java b/spzx-model/src/main/java/cn/bunny/spzx/model/dto/system/LoginDto.java new file mode 100644 index 0000000..83061e6 --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/dto/system/LoginDto.java @@ -0,0 +1,22 @@ +package cn.bunny.spzx.model.dto.system; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Data +@Schema(description = "用户登录请求参数") +public class LoginDto { + + @Schema(description = "用户名") + private String userName ; + + @Schema(description = "密码") + private String password ; + + @Schema(description = "提交验证码") + private String captcha ; + + @Schema(description = "验证码key") + private String codeKey ; + +} diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/dto/system/SysOperLogDto.java b/spzx-model/src/main/java/cn/bunny/spzx/model/dto/system/SysOperLogDto.java new file mode 100644 index 0000000..6a72cd8 --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/dto/system/SysOperLogDto.java @@ -0,0 +1,22 @@ +package cn.bunny.spzx.model.dto.system; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Data +@Schema(description = "请求参数实体类") +public class SysOperLogDto { + + @Schema(description = "模块名称") + private String title; + + @Schema(description = "操作用户名") + private String operName; + + @Schema(description = "开始时间") + private String createTimeBegin; + + @Schema(description = "结束时间") + private String createTimeEnd; + +} diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/dto/system/SysRoleDto.java b/spzx-model/src/main/java/cn/bunny/spzx/model/dto/system/SysRoleDto.java new file mode 100644 index 0000000..235840e --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/dto/system/SysRoleDto.java @@ -0,0 +1,13 @@ +package cn.bunny.spzx.model.dto.system; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Data +@Schema(description = "请求参数实体类") +public class SysRoleDto { + + @Schema(description = "角色名称") + private String roleName ; + +} diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/dto/system/SysUserDto.java b/spzx-model/src/main/java/cn/bunny/spzx/model/dto/system/SysUserDto.java new file mode 100644 index 0000000..71f4a28 --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/dto/system/SysUserDto.java @@ -0,0 +1,21 @@ +package cn.bunny.spzx.model.dto.system; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.io.Serializable; + +@Data +@Schema(description = "请求参数实体类") +public class SysUserDto { + + @Schema(description = "搜索关键字") + private String keyword ; + + @Schema(description = "开始时间") + private String createTimeBegin ; + + @Schema(description = "结束时间") + private String createTimeEnd; + +} diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/entity/base/BaseEntity.java b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/base/BaseEntity.java new file mode 100644 index 0000000..b9881da --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/base/BaseEntity.java @@ -0,0 +1,27 @@ +package cn.bunny.spzx.model.entity.base; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +@Data +public class BaseEntity implements Serializable { + + @Schema(description = "唯一标识") + private Long id; + + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Schema(description = "创建时间") + private Date createTime; + + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Schema(description = "修改时间") + private Date updateTime; + + @Schema(description = "是否删除") + private Integer isDeleted; + +} \ No newline at end of file diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/entity/base/ProductUnit.java b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/base/ProductUnit.java new file mode 100644 index 0000000..108713c --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/base/ProductUnit.java @@ -0,0 +1,13 @@ +package cn.bunny.spzx.model.entity.base; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Data +@Schema(description = "产品单元实体类") +public class ProductUnit extends BaseEntity { + + @Schema(description = "名称") + private String name; + +} \ No newline at end of file diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/entity/base/Region.java b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/base/Region.java new file mode 100644 index 0000000..653b3a4 --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/base/Region.java @@ -0,0 +1,22 @@ +package cn.bunny.spzx.model.entity.base; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Data +@Schema(description = "区域实体类") +public class Region extends BaseEntity { + + @Schema(description = "区域编码") + private String code; + + @Schema(description = "父区域编码") + private Long parentCode; + + @Schema(description = "父区名称") + private String name; + + @Schema(description = "地区级别:1-省、自治区、直辖市 2-地级市、地区、自治州、盟 3-市辖区、县级市、县") + private Integer level; + +} \ No newline at end of file diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/entity/h5/CartInfo.java b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/h5/CartInfo.java new file mode 100644 index 0000000..6d861c1 --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/h5/CartInfo.java @@ -0,0 +1,36 @@ +package cn.bunny.spzx.model.entity.h5; + +import cn.bunny.spzx.model.entity.base.BaseEntity; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.math.BigDecimal; + +@Data +@Schema(description = "购物车实体类") +public class CartInfo extends BaseEntity { + + private static final long serialVersionUID = 1L; + + @Schema(description = "用户id") + private Long userId; + + @Schema(description = "skuid") + private Long skuId; + + @Schema(description = "放入购物车时价格") + private BigDecimal cartPrice; + + @Schema(description = "数量") + private Integer skuNum; + + @Schema(description = "图片文件") + private String imgUrl; + + @Schema(description = "sku名称 (冗余)") + private String skuName; + + @Schema(description = "isChecked") + private Integer isChecked; + +} \ No newline at end of file diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/entity/order/OrderInfo.java b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/order/OrderInfo.java new file mode 100644 index 0000000..ba3c38a --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/order/OrderInfo.java @@ -0,0 +1,89 @@ +package cn.bunny.spzx.model.entity.order; + +import cn.bunny.spzx.model.entity.base.BaseEntity; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; + +@Data +@Schema(description = "OrderInfo") +public class OrderInfo extends BaseEntity { + + private static final long serialVersionUID = 1L; + + @Schema(description = "会员_id") + private Long userId; + + @Schema(description = "昵称") + private String nickName; + + @Schema(description = "订单号") + private String orderNo; + + @Schema(description = "使用的优惠券") + private Long couponId; + + @Schema(description = "订单总额") + private BigDecimal totalAmount; + + @Schema(description = "优惠券") + private BigDecimal couponAmount; + + @Schema(description = "原价金额") + private BigDecimal originalTotalAmount; + + @Schema(description = "运费") + private BigDecimal feightFee; + + @Schema(description = "支付方式【1->微信】") + private Integer payType; + + @Schema(description = "订单状态【0->待付款;1->待发货;2->已发货;3->待用户收货,已完成;-1->已取消】") + private Integer orderStatus; + + @Schema(description = "收货人姓名") + private String receiverName; + + @Schema(description = "收货人电话") + private String receiverPhone; + + @Schema(description = "收货人地址标签") + private String receiverTagName; + + @Schema(description = "省份/直辖市") + private String receiverProvince; + + @Schema(description = "城市") + private String receiverCity; + + @Schema(description = "区") + private String receiverDistrict; + + @Schema(description = "详细地址") + private String receiverAddress; + + @Schema(description = "支付时间") + private Date paymentTime; + + @Schema(description = "发货时间") + private Date deliveryTime; + + @Schema(description = "确认收货时间") + private Date receiveTime; + + @Schema(description = "订单备注") + private String remark; + + @Schema(description = "取消订单时间") + private Date cancelTime; + + @Schema(description = "取消订单原因") + private String cancelReason; + + @Schema(description = "订单项列表") + private List orderItemList; + +} \ No newline at end of file diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/entity/order/OrderItem.java b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/order/OrderItem.java new file mode 100644 index 0000000..023586c --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/order/OrderItem.java @@ -0,0 +1,33 @@ +package cn.bunny.spzx.model.entity.order; + +import cn.bunny.spzx.model.entity.base.BaseEntity; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.math.BigDecimal; + +@Data +@Schema(description = "订单项实体类") +public class OrderItem extends BaseEntity { + + private static final long serialVersionUID = 1L; + + @Schema(description = "订单id") + private Long orderId; + + @Schema(description = "商品sku编号") + private Long skuId; + + @Schema(description = "商品sku名字") + private String skuName; + + @Schema(description = "商品sku图片") + private String thumbImg; + + @Schema(description = "商品sku价格") + private BigDecimal skuPrice; + + @Schema(description = "商品购买的数量") + private Integer skuNum; + +} \ No newline at end of file diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/entity/order/OrderLog.java b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/order/OrderLog.java new file mode 100644 index 0000000..2dad892 --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/order/OrderLog.java @@ -0,0 +1,25 @@ +package cn.bunny.spzx.model.entity.order; + +import cn.bunny.spzx.model.entity.base.BaseEntity; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Data +@Schema(description = "订单日志实体对象") +public class OrderLog extends BaseEntity { + + private static final long serialVersionUID = 1L; + + @Schema(description = "订单id") + private Long orderId; + + @Schema(description = "操作人:用户;系统;后台管理员") + private String operateUser; + + @Schema(description = "订单状态") + private Integer processStatus; + + @Schema(description = "备注") + private String note; + +} \ No newline at end of file diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/entity/order/OrderStatistics.java b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/order/OrderStatistics.java new file mode 100644 index 0000000..e9bf47a --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/order/OrderStatistics.java @@ -0,0 +1,16 @@ +package cn.bunny.spzx.model.entity.order; + +import cn.bunny.spzx.model.entity.base.BaseEntity; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +@Data +public class OrderStatistics extends BaseEntity { + + private Date orderDate; + private BigDecimal totalAmount; + private Integer totalNum; + +} \ No newline at end of file diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/entity/pay/PaymentInfo.java b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/pay/PaymentInfo.java new file mode 100644 index 0000000..1c06f16 --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/pay/PaymentInfo.java @@ -0,0 +1,43 @@ +package cn.bunny.spzx.model.entity.pay; + +import cn.bunny.spzx.model.entity.base.BaseEntity; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +@Data +@Schema(description = "支付信息实体类") +public class PaymentInfo extends BaseEntity { + + private static final long serialVersionUID = 1L; + + @Schema(description = "用户id") + private Long userId; + + @Schema(description = "订单号") + private String orderNo; + + @Schema(description = "付款方式:1-微信 2-支付宝") + private Integer payType; + + @Schema(description = "交易编号(微信或支付)") + private String outTradeNo; + + @Schema(description = "支付金额") + private BigDecimal amount; + + @Schema(description = "交易内容") + private String content; + + @Schema(description = "支付状态:0-未支付 1-已支付") + private Integer paymentStatus; + + @Schema(description = "回调时间") + private Date callbackTime; + + @Schema(description = "回调信息") + private String callbackContent; + +} \ No newline at end of file diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/entity/product/Brand.java b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/product/Brand.java new file mode 100644 index 0000000..9a5b6bd --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/product/Brand.java @@ -0,0 +1,17 @@ +package cn.bunny.spzx.model.entity.product; + +import cn.bunny.spzx.model.entity.base.BaseEntity; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Data +@Schema(description = "品牌实体类") +public class Brand extends BaseEntity { + + @Schema(description = "品牌名称") + private String name; + + @Schema(description = "品牌logo") + private String logo; + +} \ No newline at end of file diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/entity/product/Category.java b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/product/Category.java new file mode 100644 index 0000000..3941001 --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/product/Category.java @@ -0,0 +1,34 @@ +package cn.bunny.spzx.model.entity.product; + +import cn.bunny.spzx.model.entity.base.BaseEntity; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.util.List; + +@Data +@Schema(description = "分类实体类") +public class Category extends BaseEntity { + + @Schema(description = "分类名称") + private String name; + + @Schema(description = "分类图片url") + private String imageUrl; + + @Schema(description = "父节点id") + private Long parentId; + + @Schema(description = "分类状态: 是否显示[0-不显示,1显示]") + private Integer status; + + @Schema(description = "排序字段") + private Integer orderNum; + + @Schema(description = "是否存在子节点") + private Boolean hasChildren; + + @Schema(description = "子节点List集合") + private List children; + +} \ No newline at end of file diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/entity/product/CategoryBrand.java b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/product/CategoryBrand.java new file mode 100644 index 0000000..595141b --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/product/CategoryBrand.java @@ -0,0 +1,26 @@ +package cn.bunny.spzx.model.entity.product; + +import cn.bunny.spzx.model.entity.base.BaseEntity; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Data +@Schema(description = "分类品牌实体类") +public class CategoryBrand extends BaseEntity { + + @Schema(description = "品牌id") + private Long brandId; + + @Schema(description = "分类id") + private Long categoryId; + + @Schema(description = "分类名称" , required = false) + private String categoryName; + + @Schema(description = "品牌名称" , required = false) + private String brandName; + + @Schema(description = "品牌logo" , required = false) + private String logo; + +} \ No newline at end of file diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/entity/product/Product.java b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/product/Product.java new file mode 100644 index 0000000..f0a2378 --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/product/Product.java @@ -0,0 +1,65 @@ +package cn.bunny.spzx.model.entity.product; + +import cn.bunny.spzx.model.entity.base.BaseEntity; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.util.List; + +@Data +@Schema(description = "商品实体类") +public class Product extends BaseEntity { + + @Schema(description = "商品名称") + private String name; // 商品名称 + + @Schema(description = "品牌id") + private Long brandId; // 品牌ID + + @Schema(description = "一级分类id") + private Long category1Id; // 一级分类id + + @Schema(description = "二级分类id") + private Long category2Id; // 二级分类id + + @Schema(description = "三级分类id") + private Long category3Id; // 三级分类id + + @Schema(description = "计量单位") + private String unitName; // 计量单位 + + @Schema(description = "轮播图url") + private String sliderUrls; // 轮播图 + + @Schema(description = "商品规格值json串") + private String specValue; // 商品规格值json串 + + @Schema(description = "线上状态:0-初始值,1-上架,-1-自主下架") + private Integer status; // 线上状态:0-初始值,1-上架,-1-自主下架 + + @Schema(description = "审核状态") + private Integer auditStatus; // 审核状态 + + @Schema(description = "审核信息") + private String auditMessage; // 审核信息 + + // 扩展的属性,用来封装响应的数据 + @Schema(description = "品牌名称") + private String brandName; // 品牌 + + @Schema(description = "一级分类名称") + private String category1Name; // 一级分类 + + @Schema(description = "二级分类名称") + private String category2Name; // 二级分类 + + @Schema(description = "三级分类名称") + private String category3Name; // 三级分类 + + @Schema(description = "sku列表集合") + private List productSkuList; // sku列表集合 + + @Schema(description = "图片详情列表") + private String detailsImageUrls; // 图片详情列表 + +} \ No newline at end of file diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/entity/product/ProductDetails.java b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/product/ProductDetails.java new file mode 100644 index 0000000..79798cf --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/product/ProductDetails.java @@ -0,0 +1,12 @@ +package cn.bunny.spzx.model.entity.product; + +import cn.bunny.spzx.model.entity.base.BaseEntity; +import lombok.Data; + +@Data +public class ProductDetails extends BaseEntity { + + private Long productId; + private String imageUrls; + +} \ No newline at end of file diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/entity/product/ProductSku.java b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/product/ProductSku.java new file mode 100644 index 0000000..51cb280 --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/product/ProductSku.java @@ -0,0 +1,53 @@ +package cn.bunny.spzx.model.entity.product; + +import cn.bunny.spzx.model.entity.base.BaseEntity; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +@Data +@Schema(description = "ProductSku") +public class ProductSku extends BaseEntity { + + @Schema(description = "商品编号") + private String skuCode; + + @Schema(description = "skuName") + private String skuName; + + @Schema(description = "商品ID") + private Long productId; + + @Schema(description = "缩略图路径") + private String thumbImg; + + @Schema(description = "售价") + private BigDecimal salePrice; + + @Schema(description = "市场价") + private BigDecimal marketPrice; + + @Schema(description = "成本价") + private BigDecimal costPrice; + + @Schema(description = "库存数") + private Integer stockNum; + + @Schema(description = "销量") + private Integer saleNum; + + @Schema(description = "sku规格信息json") + private String skuSpec; + + @Schema(description = "重量") + private String weight; + + @Schema(description = "体积") + private String volume; + + @Schema(description = "线上状态:0-初始值,1-上架,-1-自主下架") + private Integer status; + +} \ No newline at end of file diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/entity/product/ProductSpec.java b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/product/ProductSpec.java new file mode 100644 index 0000000..d536a43 --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/product/ProductSpec.java @@ -0,0 +1,17 @@ +package cn.bunny.spzx.model.entity.product; + +import cn.bunny.spzx.model.entity.base.BaseEntity; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Data +@Schema(description = "商品规格实体类") +public class ProductSpec extends BaseEntity { + + @Schema(description = "规格名称") + private String specName; // 规格名称 + + @Schema(description = "规格值") + private String specValue; // 规格值 + +} \ No newline at end of file diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/entity/system/SysMenu.java b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/system/SysMenu.java new file mode 100644 index 0000000..3d714b0 --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/system/SysMenu.java @@ -0,0 +1,32 @@ +package cn.bunny.spzx.model.entity.system; + +import cn.bunny.spzx.model.entity.base.BaseEntity; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.util.List; + +@Schema(description = "系统菜单实体类") +@Data +public class SysMenu extends BaseEntity { + + @Schema(description = "父节点id") + private Long parentId; + + @Schema(description = "节点标题") + private String title; + + @Schema(description = "组件名称") + private String component; + + @Schema(description = "排序值") + private Integer sortValue; + + @Schema(description = "状态(0:禁止,1:正常)") + private Integer status; + + // 下级列表 + @Schema(description = "子节点") + private List children; + +} \ No newline at end of file diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/entity/system/SysOperLog.java b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/system/SysOperLog.java new file mode 100644 index 0000000..399115c --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/system/SysOperLog.java @@ -0,0 +1,48 @@ +package cn.bunny.spzx.model.entity.system; + +import cn.bunny.spzx.model.entity.base.BaseEntity; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Data +@Schema(description = "SysOperLog") +public class SysOperLog extends BaseEntity { + + private static final long serialVersionUID = 1L; + + @Schema(description = "模块标题") + private String title; + + @Schema(description = "方法名称") + private String method; + + @Schema(description = "请求方式") + private String requestMethod; + + private Integer businessType ; // 业务类型(0其它 1新增 2修改 3删除) + + @Schema(description = "操作类别(0其它 1后台用户 2手机端用户)") + private String operatorType; + + @Schema(description = "操作人员") + private String operName; + + @Schema(description = "请求URL") + private String operUrl; + + @Schema(description = "主机地址") + private String operIp; + + @Schema(description = "请求参数") + private String operParam; + + @Schema(description = "返回参数") + private String jsonResult; + + @Schema(description = "操作状态(0正常 1异常)") + private Integer status; + + @Schema(description = "错误消息") + private String errorMsg; + +} \ No newline at end of file diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/entity/system/SysRole.java b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/system/SysRole.java new file mode 100644 index 0000000..e35ff8c --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/system/SysRole.java @@ -0,0 +1,22 @@ +package cn.bunny.spzx.model.entity.system; + +import cn.bunny.spzx.model.entity.base.BaseEntity; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Data +@Schema(description = "角色实体类") +public class SysRole extends BaseEntity { + + private static final long serialVersionUID = 1L; + + @Schema(description = "角色名称") + private String roleName; + + @Schema(description = "角色编码") + private String roleCode; + + @Schema(description = "描述") + private String description; + +} diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/entity/system/SysRoleUser.java b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/system/SysRoleUser.java new file mode 100644 index 0000000..8222223 --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/system/SysRoleUser.java @@ -0,0 +1,12 @@ +package cn.bunny.spzx.model.entity.system; + +import cn.bunny.spzx.model.entity.base.BaseEntity; +import lombok.Data; + +@Data +public class SysRoleUser extends BaseEntity { + + private Long roleId; // 角色id + private Long userId; // 用户id + +} diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/entity/system/SysUser.java b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/system/SysUser.java new file mode 100644 index 0000000..755c07b --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/system/SysUser.java @@ -0,0 +1,32 @@ +package cn.bunny.spzx.model.entity.system; + +import cn.bunny.spzx.model.entity.base.BaseEntity; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Data +@Schema(description = "系统用户实体类") +public class SysUser extends BaseEntity { + + @Schema(description = "用户名") + private String userName; + + @Schema(description = "密码") + private String password; + + @Schema(description = "昵称") + private String name; + + @Schema(description = "手机号码") + private String phone; + + @Schema(description = "图像") + private String avatar; + + @Schema(description = "描述") + private String description; + + @Schema(description = "状态(1:正常 0:停用)") + private Integer status; + +} \ No newline at end of file diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/entity/user/UserAddress.java b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/user/UserAddress.java new file mode 100644 index 0000000..c547247 --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/user/UserAddress.java @@ -0,0 +1,43 @@ +package cn.bunny.spzx.model.entity.user; + +import cn.bunny.spzx.model.entity.base.BaseEntity; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Data +@Schema(description = "用户地址实体类") +public class UserAddress extends BaseEntity { + + private static final long serialVersionUID = 1L; + + @Schema(description = "用户ID") + private Long userId; + + @Schema(description = "name") + private String name; + + @Schema(description = "电话") + private String phone; + + @Schema(description = "标签名称") + private String tagName; + + @Schema(description = "provinceCode") + private String provinceCode; + + @Schema(description = "cityCode") + private String cityCode; + + @Schema(description = "districtCode") + private String districtCode; + + @Schema(description = "详细地址") + private String address; + + @Schema(description = "完整地址") + private String fullAddress; + + @Schema(description = "是否默认地址(0:否 1:是)") + private Integer isDefault; + +} \ No newline at end of file diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/entity/user/UserInfo.java b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/user/UserInfo.java new file mode 100644 index 0000000..ece3acb --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/entity/user/UserInfo.java @@ -0,0 +1,51 @@ +package cn.bunny.spzx.model.entity.user; + +import cn.bunny.spzx.model.entity.base.BaseEntity; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.util.Date; + +@Data +@Schema(description = "用户实体类") +public class UserInfo extends BaseEntity { + + private static final long serialVersionUID = 1L; + + @Schema(description = "用户名") + private String username; + + @Schema(description = "密码") + private String password; + + @Schema(description = "昵称") + private String nickName; + + @Schema(description = "头像") + private String avatar; + + @Schema(description = "性别") + private Integer sex; + + @Schema(description = "电话号码") + private String phone; + + @Schema(description = "备注") + private String memo; + + @Schema(description = "微信open id") + private String openId; + + @Schema(description = "微信开放平台unionID") + private String unionId; + + @Schema(description = "最后一次登录ip") + private String lastLoginIp; + + @Schema(description = "最后一次登录时间") + private Date lastLoginTime; + + @Schema(description = "状态:1为正常,0为禁止") + private Integer status; + +} \ No newline at end of file diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/vo/common/Result.java b/spzx-model/src/main/java/cn/bunny/spzx/model/vo/common/Result.java new file mode 100644 index 0000000..e062dfa --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/vo/common/Result.java @@ -0,0 +1,39 @@ +package cn.bunny.spzx.model.vo.common; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Data +@Schema(description = "响应结果实体类") +public class Result { + + //返回码 + @Schema(description = "业务状态码") + private Integer code; + + //返回消息 + @Schema(description = "响应消息") + private String message; + + //返回数据 + @Schema(description = "业务数据") + private T data; + + // 私有化构造 + private Result() {} + + // 返回数据 + public static Result build(T body, Integer code, String message) { + Result result = new Result<>(); + result.setData(body); + result.setCode(code); + result.setMessage(message); + return result; + } + + // 通过枚举构造Result对象 + public static Result build(T body , ResultCodeEnum resultCodeEnum) { + return build(body , resultCodeEnum.getCode() , resultCodeEnum.getMessage()) ; + } + +} diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/vo/common/ResultCodeEnum.java b/spzx-model/src/main/java/cn/bunny/spzx/model/vo/common/ResultCodeEnum.java new file mode 100644 index 0000000..82cb060 --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/vo/common/ResultCodeEnum.java @@ -0,0 +1,30 @@ +package cn.bunny.spzx.model.vo.common; + +import lombok.Getter; + +@Getter // 提供获取属性值的getter方法 +public enum ResultCodeEnum { + + SUCCESS(200 , "操作成功") , + LOGIN_ERROR(201 , "用户名或者密码错误"), + VALIDATECODE_ERROR(202 , "验证码错误") , + LOGIN_AUTH(208 , "用户未登录"), + USER_NAME_IS_EXISTS(209 , "用户名已经存在"), + SYSTEM_ERROR(9999 , "您的网络有问题请稍后重试"), + NODE_ERROR( 217, "该节点下有子节点,不可以删除"), + DATA_ERROR(204, "数据异常"), + ACCOUNT_STOP( 216, "账号已停用"), + + STOCK_LESS( 219, "库存不足"), + + ; + + private Integer code ; // 业务状态码 + private String message ; // 响应消息 + + private ResultCodeEnum(Integer code , String message) { + this.code = code ; + this.message = message ; + } + +} diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/vo/h5/IndexVo.java b/spzx-model/src/main/java/cn/bunny/spzx/model/vo/h5/IndexVo.java new file mode 100644 index 0000000..5932ece --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/vo/h5/IndexVo.java @@ -0,0 +1,15 @@ +package cn.bunny.spzx.model.vo.h5; + +import cn.bunny.spzx.model.entity.product.Category; +import cn.bunny.spzx.model.entity.product.ProductSku; +import lombok.Data; + +import java.util.List; + +@Data +public class IndexVo { + + private List categoryList ; // 一级分类的类别数据 + private List productSkuList ; // 畅销商品列表数据 + +} \ No newline at end of file diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/vo/h5/ProductItemVo.java b/spzx-model/src/main/java/cn/bunny/spzx/model/vo/h5/ProductItemVo.java new file mode 100644 index 0000000..b888a19 --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/vo/h5/ProductItemVo.java @@ -0,0 +1,34 @@ +package cn.bunny.spzx.model.vo.h5; + +import com.alibaba.fastjson.JSONArray; +import cn.bunny.spzx.model.entity.product.Product; +import cn.bunny.spzx.model.entity.product.ProductSku; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.util.List; +import java.util.Map; + +@Data +@Schema(description = "商品详情对象") +public class ProductItemVo { + + @Schema(description = "商品sku信息") + private ProductSku productSku; + + @Schema(description = "商品信息") + private Product product; + + @Schema(description = "商品轮播图列表") + private List sliderUrlList; + + @Schema(description = "商品详情图片列表") + private List detailsImageUrlList; + + @Schema(description = "商品规格信息") + private JSONArray specValueList; + + @Schema(description = "商品规格对应商品skuId信息") + private Map skuSpecValueMap; + +} \ No newline at end of file diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/vo/h5/TradeVo.java b/spzx-model/src/main/java/cn/bunny/spzx/model/vo/h5/TradeVo.java new file mode 100644 index 0000000..8889ff4 --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/vo/h5/TradeVo.java @@ -0,0 +1,20 @@ +package cn.bunny.spzx.model.vo.h5; + +import cn.bunny.spzx.model.entity.order.OrderItem; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +@Data +@Schema(description = "结算实体类") +public class TradeVo { + + @Schema(description = "结算总金额") + private BigDecimal totalAmount; + + @Schema(description = "结算商品列表") + private List orderItemList; + +} \ No newline at end of file diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/vo/h5/UserInfoVo.java b/spzx-model/src/main/java/cn/bunny/spzx/model/vo/h5/UserInfoVo.java new file mode 100644 index 0000000..4f89306 --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/vo/h5/UserInfoVo.java @@ -0,0 +1,16 @@ +package cn.bunny.spzx.model.vo.h5; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Data +@Schema(description = "用户类") +public class UserInfoVo { + + @Schema(description = "昵称") + private String nickName; + + @Schema(description = "头像") + private String avatar; + +} \ No newline at end of file diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/vo/order/OrderStatisticsVo.java b/spzx-model/src/main/java/cn/bunny/spzx/model/vo/order/OrderStatisticsVo.java new file mode 100644 index 0000000..2ffa86f --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/vo/order/OrderStatisticsVo.java @@ -0,0 +1,19 @@ +package cn.bunny.spzx.model.vo.order; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; + +@Data +@Schema(description = "统计结果实体类") +public class OrderStatisticsVo { + + @Schema(description = "日期数据集合") + private List dateList ; + + @Schema(description = "总金额数据集合") + private List amountList ; +} diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/vo/product/CategoryExcelVo.java b/spzx-model/src/main/java/cn/bunny/spzx/model/vo/product/CategoryExcelVo.java new file mode 100644 index 0000000..9fdab11 --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/vo/product/CategoryExcelVo.java @@ -0,0 +1,31 @@ +package cn.bunny.spzx.model.vo.product; + +import com.alibaba.excel.annotation.ExcelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@AllArgsConstructor +@NoArgsConstructor +public class CategoryExcelVo { + + @ExcelProperty(value = "id" ,index = 0) + private Long id; + + @ExcelProperty(value = "名称" ,index = 1) + private String name; + + @ExcelProperty(value = "图片url" ,index = 2) + private String imageUrl ; + + @ExcelProperty(value = "上级id" ,index = 3) + private Long parentId; + + @ExcelProperty(value = "状态" ,index = 4) + private Integer status; + + @ExcelProperty(value = "排序" ,index = 5) + private Integer orderNum; + +} \ No newline at end of file diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/vo/system/LoginVo.java b/spzx-model/src/main/java/cn/bunny/spzx/model/vo/system/LoginVo.java new file mode 100644 index 0000000..c31c663 --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/vo/system/LoginVo.java @@ -0,0 +1,16 @@ +package cn.bunny.spzx.model.vo.system; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Data +@Schema(description = "登录成功响应结果实体类") +public class LoginVo { + + @Schema(description = "令牌") + private String token ; + + @Schema(description = "刷新令牌,可以为空") + private String refresh_token ; + +} diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/vo/system/SysMenuVo.java b/spzx-model/src/main/java/cn/bunny/spzx/model/vo/system/SysMenuVo.java new file mode 100644 index 0000000..440508c --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/vo/system/SysMenuVo.java @@ -0,0 +1,21 @@ +package cn.bunny.spzx.model.vo.system; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.util.List; + +@Data +@Schema(description = "系统菜单响应结果实体类") +public class SysMenuVo { + + @Schema(description = "系统菜单标题") + private String title; + + @Schema(description = "系统菜单名称") + private String name; + + @Schema(description = "系统菜单子菜单列表") + private List children; + +} \ No newline at end of file diff --git a/spzx-model/src/main/java/cn/bunny/spzx/model/vo/system/ValidateCodeVo.java b/spzx-model/src/main/java/cn/bunny/spzx/model/vo/system/ValidateCodeVo.java new file mode 100644 index 0000000..a5aad20 --- /dev/null +++ b/spzx-model/src/main/java/cn/bunny/spzx/model/vo/system/ValidateCodeVo.java @@ -0,0 +1,16 @@ +package cn.bunny.spzx.model.vo.system; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Data +@Schema(description = "验证码响应结果实体类") +public class ValidateCodeVo { + + @Schema(description = "验证码key") + private String codeKey ; // 验证码的key + + @Schema(description = "验证码value") + private String codeValue ; // 图片验证码对应的字符串数据 + +} \ No newline at end of file