diff --git a/README.md b/README.md index 1d636c7..7e1f79f 100644 --- a/README.md +++ b/README.md @@ -14,13 +14,13 @@ > 1. **快速体验项目**:[在线访问地址](https://www.macrozheng.com/admin/index.html) 。 > 2. **全套学习教程**:[《mall学习教程》](https://www.macrozheng.com) 。 -> 3. **视频教程(2023最新版)**:[《mall视频教程》](https://www.macrozheng.com/mall/catalog/mall_video.html) 。 +> 3. **视频教程**:[《mall视频教程》](https://www.macrozheng.com/mall/catalog/mall_video.html) 。 > 4. **Spring Cloud全套教程**:[《SpringCloud学习教程》](https://github.com/macrozheng/springcloud-learning) 。 -> 5. **分支说明**:`master`分支基于Spring Cloud 2021+Spring Boot 2.7,`dev-v3`分支基于Spring Cloud 2023+Spring Boot 3.2。 +> 5. **分支说明**:`master`分支基于Spring Cloud 2023+Spring Boot 3.2,`dev-v2`分支基于Spring Cloud 2021+Spring Boot 2.7。 ## 项目简介 -`mall-swarm`是一套微服务商城系统,采用了 Spring Cloud 2021 & Alibaba、Spring Boot 2.7、Oauth2、MyBatis、Elasticsearch、Docker、Kubernetes等核心技术,同时提供了基于Vue的管理后台方便快速搭建系统。`mall-swarm`在电商业务的基础集成了注册中心、配置中心、监控中心、网关等系统功能。文档齐全,附带全套Spring Cloud教程。 +`mall-swarm`是一套微服务商城系统,采用了 Spring Cloud 2023 & Alibaba、Spring Boot 3.2、Sa-Token、MyBatis、Elasticsearch、Docker、Kubernetes等核心技术,同时提供了基于Vue的管理后台方便快速搭建系统。`mall-swarm`在电商业务的基础集成了注册中心、配置中心、监控中心、网关等系统功能。文档齐全,附带全套Spring Cloud教程。 ## 项目演示 @@ -75,7 +75,7 @@ mall | Spring Cloud | 微服务框架 | https://spring.io/projects/spring-cloud | | Spring Cloud Alibaba | 微服务框架 | https://github.com/alibaba/spring-cloud-alibaba | | Spring Boot | 容器+MVC框架 | https://spring.io/projects/spring-boot | -| Spring Security Oauth2 | 认证和授权框架 | https://spring.io/projects/spring-security-oauth | +| Sa-Token | 认证和授权框架 | https://github.com/dromara/Sa-Token | | MyBatis | ORM框架 | http://www.mybatis.org/mybatis-3/zh/index.html | | MyBatisGenerator | 数据层代码生成 | http://www.mybatis.org/generator/index.html | | PageHelper | MyBatis物理分页插件 | http://git.oschina.net/free/Mybatis_PageHelper | @@ -88,7 +88,6 @@ mall | Druid | 数据库连接池 | https://github.com/alibaba/druid | | OSS | 对象存储 | https://github.com/aliyun/aliyun-oss-java-sdk | | MinIO | 对象存储 | https://github.com/minio/minio | -| JWT | JWT登录支持 | https://github.com/jwtk/jjwt | | LogStash | 日志收集 | https://github.com/logstash/logstash-logback-encoder | | Lombok | 简化对象封装工具 | https://github.com/rzwitserloot/lombok | | Seata | 全局事务管理框架 | https://github.com/seata/seata | @@ -123,7 +122,7 @@ mall | 工具 | 版本号 | 下载 | | ------------- | ------ | ------------------------------------------------------------ | -| JDK | 1.8 | https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html | +| JDK | 17 | https://www.oracle.com/cn/java/technologies/downloads/#java17 | | Mysql | 5.7 | https://www.mysql.com/ | | Redis | 7.0 | https://redis.io/download | | Elasticsearch | 7.17.3 | https://www.elastic.co/cn/downloads/elasticsearch | @@ -160,21 +159,21 @@ mall - 查看注册中心注册服务信息,访问地址:http://192.168.3.101:8848/nacos/ -![](./document/resource/mall_swarm_run_new_01.png) +![](./document/resource/re_mall_swarm_run_01.png) - 监控中心应用信息,访问地址:http://192.168.3.101:8101 -![](./document/resource/mall_swarm_run_new_02.png) +![](./document/resource/re_mall_swarm_run_02.png) -![](./document/resource/mall_swarm_run_new_04.png) +![](./document/resource/re_mall_swarm_run_03.png) - API文档信息,访问地址:http://192.168.3.101:8201 -![](./document/resource/mall_swarm_run_05.png) +![](./document/resource/re_mall_swarm_run_04.png) - 日志收集系统信息,访问地址:http://192.168.3.101:5601 -![](./document/resource/mall_swarm_run_new_06.png) +![](./document/resource/re_mall_swarm_run_05.png) - 可视化容器管理,访问地址:http://192.168.3.101:9000 diff --git a/config/admin/mall-admin-dev.yaml b/config/admin/mall-admin-dev.yaml index 07ae4a7..65d6433 100644 --- a/config/admin/mall-admin-dev.yaml +++ b/config/admin/mall-admin-dev.yaml @@ -15,12 +15,13 @@ spring: url: jdbc:mysql://localhost:3306/mall?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useSSL=false username: root password: root - redis: - host: localhost # Redis服务器地址 - database: 0 # Redis数据库索引(默认为0) - port: 6379 # Redis服务器连接端口 - password: # Redis服务器连接密码(默认为空) - timeout: 3000ms # 连接超时时间(毫秒) + data: + redis: + host: localhost # Redis服务器地址 + database: 0 # Redis数据库索引(默认为0) + port: 6379 # Redis服务器连接端口 + password: # Redis服务器连接密码(默认为空) + timeout: 3000ms # 连接超时时间(毫秒) minio: endpoint: http://localhost:9000 #MinIO服务所在地址 bucketName: mall #存储桶名称 diff --git a/config/admin/mall-admin-prod.yaml b/config/admin/mall-admin-prod.yaml index d8af486..4969763 100644 --- a/config/admin/mall-admin-prod.yaml +++ b/config/admin/mall-admin-prod.yaml @@ -15,11 +15,12 @@ spring: url: jdbc:mysql://db:3306/mall?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useSSL=false username: reader password: 123456 - redis: - host: redis # Redis服务器地址 - database: 0 # Redis数据库索引(默认为0) - port: 6379 # Redis服务器连接端口 - password: #不设置密码 + data: + redis: + host: redis # Redis服务器地址 + database: 0 # Redis数据库索引(默认为0) + port: 6379 # Redis服务器连接端口 + password: #不设置密码 minio: endpoint: http://192.168.3.101:9090 #MinIO服务所在地址 bucketName: mall #存储桶名称 diff --git a/config/gateway/mall-gateway-dev.yaml b/config/gateway/mall-gateway-dev.yaml index 38661e4..f3e3467 100644 --- a/config/gateway/mall-gateway-dev.yaml +++ b/config/gateway/mall-gateway-dev.yaml @@ -1,15 +1,11 @@ spring: - redis: - host: localhost # Redis服务器地址 - database: 0 # Redis数据库索引(默认为0) - port: 6379 # Redis服务器连接端口 - password: # Redis服务器连接密码(默认为空) - timeout: 3000ms # 连接超时时间(毫秒) - security: - oauth2: - resourceserver: - jwt: - jwk-set-uri: 'http://localhost:8201/mall-auth/rsa/publicKey' + data: + redis: + host: localhost # Redis服务器地址 + database: 0 # Redis数据库索引(默认为0) + port: 6379 # Redis服务器连接端口 + password: # Redis服务器连接密码(默认为空) + timeout: 3000ms # 连接超时时间(毫秒) logging: level: root: info diff --git a/config/gateway/mall-gateway-prod.yaml b/config/gateway/mall-gateway-prod.yaml index 6a12eea..7222f89 100644 --- a/config/gateway/mall-gateway-prod.yaml +++ b/config/gateway/mall-gateway-prod.yaml @@ -1,14 +1,10 @@ spring: - redis: - host: redis # Redis服务器地址 - database: 0 # Redis数据库索引(默认为0) - port: 6379 # Redis服务器连接端口 - password: #不设置密码 - security: - oauth2: - resourceserver: - jwt: - jwk-set-uri: 'http://192.168.3.101:8201/mall-auth/rsa/publicKey' + data: + redis: + host: redis # Redis服务器地址 + database: 0 # Redis数据库索引(默认为0) + port: 6379 # Redis服务器连接端口 + password: #不设置密码 logging: file: path: /var/logs diff --git a/config/portal/mall-portal-dev.yaml b/config/portal/mall-portal-dev.yaml index b2b8e4f..1089f96 100644 --- a/config/portal/mall-portal-dev.yaml +++ b/config/portal/mall-portal-dev.yaml @@ -8,11 +8,11 @@ spring: host: localhost port: 27017 database: mall-port - redis: - host: localhost # Redis服务器地址 - database: 0 # Redis数据库索引(默认为0) - port: 6379 # Redis服务器连接端口 - password: # Redis服务器连接密码(默认为空) + redis: + host: localhost # Redis服务器地址 + database: 0 # Redis数据库索引(默认为0) + port: 6379 # Redis服务器连接端口 + password: # Redis服务器连接密码(默认为空) rabbitmq: host: localhost port: 5672 diff --git a/config/portal/mall-portal-prod.yaml b/config/portal/mall-portal-prod.yaml index ab2a370..0ab6788 100644 --- a/config/portal/mall-portal-prod.yaml +++ b/config/portal/mall-portal-prod.yaml @@ -8,11 +8,11 @@ spring: host: mongo port: 27017 database: mall-port - redis: - host: redis # Redis服务器地址 - database: 0 # Redis数据库索引(默认为0) - port: 6379 # Redis服务器连接端口 - password: #不设置密码 + redis: + host: redis # Redis服务器地址 + database: 0 # Redis数据库索引(默认为0) + port: 6379 # Redis服务器连接端口 + password: #不设置密码 rabbitmq: host: rabbit port: 5672 diff --git a/document/elk/logstash.conf b/document/elk/logstash.conf index 953d054..e1b23f4 100644 --- a/document/elk/logstash.conf +++ b/document/elk/logstash.conf @@ -43,7 +43,7 @@ filter{ } output { elasticsearch { - hosts => "es:9200" + hosts => "localhost:9200" index => "mall-%{type}-%{+YYYY.MM.dd}" } } \ No newline at end of file diff --git a/document/k8s/mall-admin-deployment.yaml b/document/k8s/mall-admin-deployment.yaml index 78f459a..c4a5f47 100644 --- a/document/k8s/mall-admin-deployment.yaml +++ b/document/k8s/mall-admin-deployment.yaml @@ -17,8 +17,7 @@ spec: spec: containers: - name: mall-admin - # 指定Docker Hub中的镜像地址 - image: macrodocker/mall-admin:1.0-SNAPSHOT + image: mall/mall-admin:1.0-SNAPSHOT ports: - containerPort: 8080 env: diff --git a/document/k8s/mall-auth-deployment.yaml b/document/k8s/mall-auth-deployment.yaml index b8e07a5..8844fff 100644 --- a/document/k8s/mall-auth-deployment.yaml +++ b/document/k8s/mall-auth-deployment.yaml @@ -17,8 +17,7 @@ spec: spec: containers: - name: mall-auth - # 指定Docker Hub中的镜像地址 - image: macrodocker/mall-auth:1.0-SNAPSHOT + image: mall/mall-auth:1.0-SNAPSHOT ports: - containerPort: 8401 env: diff --git a/document/k8s/mall-gateway-deployment.yaml b/document/k8s/mall-gateway-deployment.yaml index f3adc55..10120da 100644 --- a/document/k8s/mall-gateway-deployment.yaml +++ b/document/k8s/mall-gateway-deployment.yaml @@ -17,8 +17,7 @@ spec: spec: containers: - name: mall-gateway - # 指定Docker Hub中的镜像地址 - image: macrodocker/mall-gateway:1.0-SNAPSHOT + image: mall/mall-gateway:1.0-SNAPSHOT ports: - containerPort: 8201 env: diff --git a/document/k8s/mall-monitor-deployment.yaml b/document/k8s/mall-monitor-deployment.yaml index 0b1bb3a..610c870 100644 --- a/document/k8s/mall-monitor-deployment.yaml +++ b/document/k8s/mall-monitor-deployment.yaml @@ -17,8 +17,7 @@ spec: spec: containers: - name: mall-monitor - # 指定Docker Hub中的镜像地址 - image: macrodocker/mall-monitor:1.0-SNAPSHOT + image: mall/mall-monitor:1.0-SNAPSHOT ports: - containerPort: 8101 env: diff --git a/document/k8s/mall-monitor-service.yaml b/document/k8s/mall-monitor-service.yaml index 73d7ce0..f670b81 100644 --- a/document/k8s/mall-monitor-service.yaml +++ b/document/k8s/mall-monitor-service.yaml @@ -4,11 +4,12 @@ metadata: name: mall-monitor-service namespace: default spec: - type: ClusterIP + type: NodePort selector: app: mall-monitor ports: - name: http protocol: TCP port: 8101 - targetPort: 8101 \ No newline at end of file + targetPort: 8101 + nodePort: 30101 \ No newline at end of file diff --git a/document/k8s/mall-portal-deployment.yaml b/document/k8s/mall-portal-deployment.yaml index 1b26f7c..0a0b9e2 100644 --- a/document/k8s/mall-portal-deployment.yaml +++ b/document/k8s/mall-portal-deployment.yaml @@ -17,8 +17,7 @@ spec: spec: containers: - name: mall-portal - # 指定Docker Hub中的镜像地址 - image: macrodocker/mall-portal:1.0-SNAPSHOT + image: mall/mall-portal:1.0-SNAPSHOT ports: - containerPort: 8085 env: diff --git a/document/k8s/mall-search-deployment.yaml b/document/k8s/mall-search-deployment.yaml index 6ace3b3..6f6b8ca 100644 --- a/document/k8s/mall-search-deployment.yaml +++ b/document/k8s/mall-search-deployment.yaml @@ -17,8 +17,7 @@ spec: spec: containers: - name: mall-search - # 指定Docker Hub中的镜像地址 - image: macrodocker/mall-search:1.0-SNAPSHOT + image: mall/mall-search:1.0-SNAPSHOT ports: - containerPort: 8081 env: diff --git a/document/resource/re_mall_swarm_run_01.png b/document/resource/re_mall_swarm_run_01.png new file mode 100644 index 0000000..716bbc5 Binary files /dev/null and b/document/resource/re_mall_swarm_run_01.png differ diff --git a/document/resource/re_mall_swarm_run_02.png b/document/resource/re_mall_swarm_run_02.png new file mode 100644 index 0000000..8bc6884 Binary files /dev/null and b/document/resource/re_mall_swarm_run_02.png differ diff --git a/document/resource/re_mall_swarm_run_03.png b/document/resource/re_mall_swarm_run_03.png new file mode 100644 index 0000000..d4f7083 Binary files /dev/null and b/document/resource/re_mall_swarm_run_03.png differ diff --git a/document/resource/re_mall_swarm_run_04.png b/document/resource/re_mall_swarm_run_04.png new file mode 100644 index 0000000..0dcbf3b Binary files /dev/null and b/document/resource/re_mall_swarm_run_04.png differ diff --git a/document/resource/re_mall_swarm_run_05.png b/document/resource/re_mall_swarm_run_05.png new file mode 100644 index 0000000..4af1e76 Binary files /dev/null and b/document/resource/re_mall_swarm_run_05.png differ diff --git a/mall-admin/pom.xml b/mall-admin/pom.xml index 12e2dfb..6e6b736 100644 --- a/mall-admin/pom.xml +++ b/mall-admin/pom.xml @@ -46,8 +46,24 @@ spring-cloud-starter-openfeign - io.github.openfeign - feign-okhttp + cn.dev33 + sa-token-spring-boot3-starter + + + cn.dev33 + sa-token-redis-jackson + + + org.apache.commons + commons-pool2 + + + cn.dev33 + sa-token-jwt + + + de.codecentric + spring-boot-admin-starter-client diff --git a/mall-admin/src/main/java/com/macro/mall/component/ResourceRoleRulesHolder.java b/mall-admin/src/main/java/com/macro/mall/component/PathResourceRulesHolder.java similarity index 61% rename from mall-admin/src/main/java/com/macro/mall/component/ResourceRoleRulesHolder.java rename to mall-admin/src/main/java/com/macro/mall/component/PathResourceRulesHolder.java index 721094c..3b1876c 100644 --- a/mall-admin/src/main/java/com/macro/mall/component/ResourceRoleRulesHolder.java +++ b/mall-admin/src/main/java/com/macro/mall/component/PathResourceRulesHolder.java @@ -4,20 +4,20 @@ import com.macro.mall.service.UmsResourceService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; -import javax.annotation.PostConstruct; +import jakarta.annotation.PostConstruct; /** - * 资源与角色访问对应关系操作组件 + * 路径与资源访问对应关系操作组件 * Created by macro on 2020/7/17. */ @Component -public class ResourceRoleRulesHolder { +public class PathResourceRulesHolder { @Autowired private UmsResourceService resourceService; @PostConstruct - public void initResourceRolesMap(){ - resourceService.initResourceRolesMap(); + public void initPathResourceMap(){ + resourceService.initPathResourceMap(); } } diff --git a/mall-admin/src/main/java/com/macro/mall/config/SaTokenConfigure.java b/mall-admin/src/main/java/com/macro/mall/config/SaTokenConfigure.java new file mode 100644 index 0000000..020d059 --- /dev/null +++ b/mall-admin/src/main/java/com/macro/mall/config/SaTokenConfigure.java @@ -0,0 +1,22 @@ +package com.macro.mall.config; + +import cn.dev33.satoken.jwt.StpLogicJwtForSimple; +import cn.dev33.satoken.stp.StpLogic; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * @auther macrozheng + * @description Sa-Token相关配置 + * @date 2023/11/28 + * @github https://github.com/macrozheng + */ +@Configuration +public class SaTokenConfigure { + // Sa-Token 整合 jwt (Simple 简单模式) + @Bean + public StpLogic getStpLogicJwt() { + return new StpLogicJwtForSimple(); + } +} + diff --git a/mall-admin/src/main/java/com/macro/mall/config/SpringDocConfig.java b/mall-admin/src/main/java/com/macro/mall/config/SpringDocConfig.java new file mode 100644 index 0000000..190aea5 --- /dev/null +++ b/mall-admin/src/main/java/com/macro/mall/config/SpringDocConfig.java @@ -0,0 +1,68 @@ +package com.macro.mall.config; + +import io.swagger.v3.oas.models.Components; +import io.swagger.v3.oas.models.ExternalDocumentation; +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.info.Info; +import io.swagger.v3.oas.models.info.License; +import io.swagger.v3.oas.models.security.SecurityRequirement; +import io.swagger.v3.oas.models.security.SecurityScheme; +import org.springdoc.core.customizers.GlobalOpenApiCustomizer; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +/** + * SpringDoc相关配置 + * Created by macro on 2024/3/5. + */ +@Configuration +public class SpringDocConfig implements WebMvcConfigurer { + + private static final String SECURITY_SCHEME_NAME = "Authorization"; + + @Bean + public OpenAPI mallAdminOpenAPI() { + return new OpenAPI() + .info(new Info().title("mall后台系统") + .description("mall后台相关接口文档") + .version("v1.0.0") + .license(new License().name("Apache 2.0") + .url("https://github.com/macrozheng/mall-learning"))) + .externalDocs(new ExternalDocumentation() + .description("SpringBoot实战电商项目mall(60K+Star)全套文档") + .url("http://www.macrozheng.com")) + .addSecurityItem(new SecurityRequirement().addList(SECURITY_SCHEME_NAME)) + .components(new Components() + .addSecuritySchemes(SECURITY_SCHEME_NAME, + new SecurityScheme() + .name(SECURITY_SCHEME_NAME) + .type(SecurityScheme.Type.HTTP) + .scheme("bearer") + .bearerFormat("JWT"))); + } + + @Override + public void addViewControllers(ViewControllerRegistry registry) { + //配置访问`/swagger-ui/`路径时可以直接跳转到`/swagger-ui/index.html` + registry.addViewController("/swagger-ui/").setViewName("redirect:/swagger-ui/index.html"); + } + + @Bean + public GlobalOpenApiCustomizer orderGlobalOpenApiCustomizer() { + //解决Knife4j配置认证后无法自动添加认证头的问题 + return openApi -> { + //全局添加鉴权参数 + if (openApi.getPaths() != null) { + openApi.getPaths().forEach((s, pathItem) -> { + pathItem.readOperations().forEach(operation -> { + operation.addSecurityItem(new SecurityRequirement().addList(SECURITY_SCHEME_NAME)); + }); + }); + } + }; + } + +} + diff --git a/mall-admin/src/main/java/com/macro/mall/config/SwaggerConfig.java b/mall-admin/src/main/java/com/macro/mall/config/SwaggerConfig.java deleted file mode 100644 index c06fa89..0000000 --- a/mall-admin/src/main/java/com/macro/mall/config/SwaggerConfig.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.macro.mall.config; - -import com.macro.mall.common.config.BaseSwaggerConfig; -import com.macro.mall.common.domain.SwaggerProperties; -import org.springframework.beans.factory.config.BeanPostProcessor; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import springfox.documentation.swagger2.annotations.EnableSwagger2; - -/** - * Swagger API文档相关配置 - * Created by macro on 2018/4/26. - */ -@Configuration -@EnableSwagger2 -public class SwaggerConfig extends BaseSwaggerConfig { - - @Override - public SwaggerProperties swaggerProperties() { - return SwaggerProperties.builder() - .apiBasePackage("com.macro.mall.controller") - .title("mall后台系统") - .description("mall后台相关接口文档") - .contactName("macro") - .version("1.0") - .enableSecurity(true) - .build(); - } - - @Bean - public BeanPostProcessor springfoxHandlerProviderBeanPostProcessor() { - return generateBeanPostProcessor(); - } -} diff --git a/mall-admin/src/main/java/com/macro/mall/controller/CmsPrefrenceAreaController.java b/mall-admin/src/main/java/com/macro/mall/controller/CmsPrefrenceAreaController.java index 832f8d2..5dfb965 100644 --- a/mall-admin/src/main/java/com/macro/mall/controller/CmsPrefrenceAreaController.java +++ b/mall-admin/src/main/java/com/macro/mall/controller/CmsPrefrenceAreaController.java @@ -3,8 +3,8 @@ package com.macro.mall.controller; import com.macro.mall.common.api.CommonResult; import com.macro.mall.model.CmsPrefrenceArea; import com.macro.mall.service.CmsPrefrenceAreaService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; +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.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @@ -18,13 +18,13 @@ import java.util.List; * Created by macro on 2018/6/1. */ @Controller -@Api(tags = "CmsPrefrenceAreaController", description = "商品优选管理") +@Tag(name = "CmsPrefrenceAreaController", description = "商品优选管理") @RequestMapping("/prefrenceArea") public class CmsPrefrenceAreaController { @Autowired private CmsPrefrenceAreaService prefrenceAreaService; - @ApiOperation("获取所有商品优选") + @Operation(summary = "获取所有商品优选") @RequestMapping(value = "/listAll", method = RequestMethod.GET) @ResponseBody public CommonResult> listAll() { diff --git a/mall-admin/src/main/java/com/macro/mall/controller/CmsSubjectController.java b/mall-admin/src/main/java/com/macro/mall/controller/CmsSubjectController.java index d36e694..b037c98 100644 --- a/mall-admin/src/main/java/com/macro/mall/controller/CmsSubjectController.java +++ b/mall-admin/src/main/java/com/macro/mall/controller/CmsSubjectController.java @@ -4,8 +4,9 @@ import com.macro.mall.common.api.CommonPage; import com.macro.mall.common.api.CommonResult; import com.macro.mall.model.CmsSubject; import com.macro.mall.service.CmsSubjectService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; + +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.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @@ -20,13 +21,13 @@ import java.util.List; * Created by macro on 2018/6/1. */ @Controller -@Api(tags = "CmsSubjectController", description = "商品专题管理") +@Tag(name = "CmsSubjectController", description = "商品专题管理") @RequestMapping("/subject") public class CmsSubjectController { @Autowired private CmsSubjectService subjectService; - @ApiOperation("获取全部商品专题") + @Operation(summary = "获取全部商品专题") @RequestMapping(value = "/listAll", method = RequestMethod.GET) @ResponseBody public CommonResult> listAll() { @@ -34,7 +35,7 @@ public class CmsSubjectController { return CommonResult.success(subjectList); } - @ApiOperation(value = "根据专题名称分页获取专题") + @Operation(summary = "根据专题名称分页获取专题") @RequestMapping(value = "/list", method = RequestMethod.GET) @ResponseBody public CommonResult> getList(@RequestParam(value = "keyword", required = false) String keyword, diff --git a/mall-admin/src/main/java/com/macro/mall/controller/MinioController.java b/mall-admin/src/main/java/com/macro/mall/controller/MinioController.java index 859bcd7..3432c3c 100644 --- a/mall-admin/src/main/java/com/macro/mall/controller/MinioController.java +++ b/mall-admin/src/main/java/com/macro/mall/controller/MinioController.java @@ -6,8 +6,9 @@ import com.macro.mall.common.api.CommonResult; import com.macro.mall.dto.BucketPolicyConfigDto; import com.macro.mall.dto.MinioUploadDto; import io.minio.*; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Value; @@ -22,7 +23,7 @@ import java.util.Date; * MinIO对象存储管理 * Created by macro on 2019/12/25. */ -@Api(tags = "MinioController", description = "MinIO对象存储管理") +@Tag(name = "MinioController", description = "MinIO对象存储管理") @Controller @RequestMapping("/minio") public class MinioController { @@ -37,7 +38,7 @@ public class MinioController { @Value("${minio.secretKey}") private String SECRET_KEY; - @ApiOperation("文件上传") + @Operation(summary = "文件上传") @RequestMapping(value = "/upload", method = RequestMethod.POST) @ResponseBody public CommonResult upload(@RequestPart("file") MultipartFile file) { @@ -95,7 +96,7 @@ public class MinioController { .build(); } - @ApiOperation("文件删除") + @Operation(summary = "文件删除") @RequestMapping(value = "/delete", method = RequestMethod.POST) @ResponseBody public CommonResult delete(@RequestParam("objectName") String objectName) { diff --git a/mall-admin/src/main/java/com/macro/mall/controller/OmsCompanyAddressController.java b/mall-admin/src/main/java/com/macro/mall/controller/OmsCompanyAddressController.java index 3369091..c0149b9 100644 --- a/mall-admin/src/main/java/com/macro/mall/controller/OmsCompanyAddressController.java +++ b/mall-admin/src/main/java/com/macro/mall/controller/OmsCompanyAddressController.java @@ -3,8 +3,9 @@ package com.macro.mall.controller; import com.macro.mall.common.api.CommonResult; import com.macro.mall.model.OmsCompanyAddress; import com.macro.mall.service.OmsCompanyAddressService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; + +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.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @@ -18,13 +19,13 @@ import java.util.List; * Created by macro on 2018/10/18. */ @Controller -@Api(tags = "OmsCompanyAddressController", description = "收货地址管理") +@Tag(name = "OmsCompanyAddressController", description = "收货地址管理") @RequestMapping("/companyAddress") public class OmsCompanyAddressController { @Autowired private OmsCompanyAddressService companyAddressService; - @ApiOperation("获取所有收货地址") + @Operation(summary = "获取所有收货地址") @RequestMapping(value = "/list", method = RequestMethod.GET) @ResponseBody public CommonResult> list() { diff --git a/mall-admin/src/main/java/com/macro/mall/controller/OmsOrderController.java b/mall-admin/src/main/java/com/macro/mall/controller/OmsOrderController.java index 091de60..b2cb42a 100644 --- a/mall-admin/src/main/java/com/macro/mall/controller/OmsOrderController.java +++ b/mall-admin/src/main/java/com/macro/mall/controller/OmsOrderController.java @@ -5,8 +5,9 @@ import com.macro.mall.common.api.CommonResult; import com.macro.mall.dto.*; import com.macro.mall.model.OmsOrder; import com.macro.mall.service.OmsOrderService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; + +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.stereotype.Controller; import org.springframework.web.bind.annotation.*; @@ -18,13 +19,13 @@ import java.util.List; * Created by macro on 2018/10/11. */ @Controller -@Api(tags = "OmsOrderController", description = "订单管理") +@Tag(name = "OmsOrderController", description = "订单管理") @RequestMapping("/order") public class OmsOrderController { @Autowired private OmsOrderService orderService; - @ApiOperation("查询订单") + @Operation(summary = "查询订单") @RequestMapping(value = "/list", method = RequestMethod.GET) @ResponseBody public CommonResult> list(OmsOrderQueryParam queryParam, @@ -34,7 +35,7 @@ public class OmsOrderController { return CommonResult.success(CommonPage.restPage(orderList)); } - @ApiOperation("批量发货") + @Operation(summary = "批量发货") @RequestMapping(value = "/update/delivery", method = RequestMethod.POST) @ResponseBody public CommonResult delivery(@RequestBody List deliveryParamList) { @@ -45,7 +46,7 @@ public class OmsOrderController { return CommonResult.failed(); } - @ApiOperation("批量关闭订单") + @Operation(summary = "批量关闭订单") @RequestMapping(value = "/update/close", method = RequestMethod.POST) @ResponseBody public CommonResult close(@RequestParam("ids") List ids, @RequestParam String note) { @@ -56,7 +57,7 @@ public class OmsOrderController { return CommonResult.failed(); } - @ApiOperation("批量删除订单") + @Operation(summary = "批量删除订单") @RequestMapping(value = "/delete", method = RequestMethod.POST) @ResponseBody public CommonResult delete(@RequestParam("ids") List ids) { @@ -67,7 +68,7 @@ public class OmsOrderController { return CommonResult.failed(); } - @ApiOperation("获取订单详情:订单信息、商品信息、操作记录") + @Operation(summary = "获取订单详情:订单信息、商品信息、操作记录") @RequestMapping(value = "/{id}", method = RequestMethod.GET) @ResponseBody public CommonResult detail(@PathVariable Long id) { @@ -75,7 +76,7 @@ public class OmsOrderController { return CommonResult.success(orderDetailResult); } - @ApiOperation("修改收货人信息") + @Operation(summary = "修改收货人信息") @RequestMapping(value = "/update/receiverInfo", method = RequestMethod.POST) @ResponseBody public CommonResult updateReceiverInfo(@RequestBody OmsReceiverInfoParam receiverInfoParam) { @@ -86,7 +87,7 @@ public class OmsOrderController { return CommonResult.failed(); } - @ApiOperation("修改订单费用信息") + @Operation(summary = "修改订单费用信息") @RequestMapping(value = "/update/moneyInfo", method = RequestMethod.POST) @ResponseBody public CommonResult updateReceiverInfo(@RequestBody OmsMoneyInfoParam moneyInfoParam) { @@ -97,7 +98,7 @@ public class OmsOrderController { return CommonResult.failed(); } - @ApiOperation("备注订单") + @Operation(summary = "备注订单") @RequestMapping(value = "/update/note", method = RequestMethod.POST) @ResponseBody public CommonResult updateNote(@RequestParam("id") Long id, diff --git a/mall-admin/src/main/java/com/macro/mall/controller/OmsOrderReturnApplyController.java b/mall-admin/src/main/java/com/macro/mall/controller/OmsOrderReturnApplyController.java index 91fafee..e2b89af 100644 --- a/mall-admin/src/main/java/com/macro/mall/controller/OmsOrderReturnApplyController.java +++ b/mall-admin/src/main/java/com/macro/mall/controller/OmsOrderReturnApplyController.java @@ -7,8 +7,9 @@ import com.macro.mall.dto.OmsReturnApplyQueryParam; import com.macro.mall.dto.OmsUpdateStatusParam; import com.macro.mall.model.OmsOrderReturnApply; import com.macro.mall.service.OmsOrderReturnApplyService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; + +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.stereotype.Controller; import org.springframework.web.bind.annotation.*; @@ -20,13 +21,13 @@ import java.util.List; * Created by macro on 2018/10/18. */ @Controller -@Api(tags = "OmsOrderReturnApplyController", description = "订单退货申请管理") +@Tag(name = "OmsOrderReturnApplyController", description = "订单退货申请管理") @RequestMapping("/returnApply") public class OmsOrderReturnApplyController { @Autowired private OmsOrderReturnApplyService returnApplyService; - @ApiOperation("分页查询退货申请") + @Operation(summary = "分页查询退货申请") @RequestMapping(value = "/list", method = RequestMethod.GET) @ResponseBody public CommonResult> list(OmsReturnApplyQueryParam queryParam, @@ -36,7 +37,7 @@ public class OmsOrderReturnApplyController { return CommonResult.success(CommonPage.restPage(returnApplyList)); } - @ApiOperation("批量删除申请") + @Operation(summary = "批量删除申请") @RequestMapping(value = "/delete", method = RequestMethod.POST) @ResponseBody public CommonResult delete(@RequestParam("ids") List ids) { @@ -47,7 +48,7 @@ public class OmsOrderReturnApplyController { return CommonResult.failed(); } - @ApiOperation("获取退货申请详情") + @Operation(summary = "获取退货申请详情") @RequestMapping(value = "/{id}", method = RequestMethod.GET) @ResponseBody public CommonResult getItem(@PathVariable Long id) { @@ -55,7 +56,7 @@ public class OmsOrderReturnApplyController { return CommonResult.success(result); } - @ApiOperation("修改申请状态") + @Operation(summary = "修改申请状态") @RequestMapping(value = "/update/status/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult updateStatus(@PathVariable Long id, @RequestBody OmsUpdateStatusParam statusParam) { diff --git a/mall-admin/src/main/java/com/macro/mall/controller/OmsOrderReturnReasonController.java b/mall-admin/src/main/java/com/macro/mall/controller/OmsOrderReturnReasonController.java index 6173910..119387f 100644 --- a/mall-admin/src/main/java/com/macro/mall/controller/OmsOrderReturnReasonController.java +++ b/mall-admin/src/main/java/com/macro/mall/controller/OmsOrderReturnReasonController.java @@ -4,8 +4,9 @@ import com.macro.mall.common.api.CommonPage; import com.macro.mall.common.api.CommonResult; import com.macro.mall.model.OmsOrderReturnReason; import com.macro.mall.service.OmsOrderReturnReasonService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; + +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.stereotype.Controller; import org.springframework.web.bind.annotation.*; @@ -17,13 +18,13 @@ import java.util.List; * Created by macro on 2018/10/17. */ @Controller -@Api(tags = "OmsOrderReturnReasonController", description = "退货原因管理") +@Tag(name = "OmsOrderReturnReasonController", description = "退货原因管理") @RequestMapping("/returnReason") public class OmsOrderReturnReasonController { @Autowired private OmsOrderReturnReasonService orderReturnReasonService; - @ApiOperation("添加退货原因") + @Operation(summary = "添加退货原因") @RequestMapping(value = "/create", method = RequestMethod.POST) @ResponseBody public CommonResult create(@RequestBody OmsOrderReturnReason returnReason) { @@ -34,7 +35,7 @@ public class OmsOrderReturnReasonController { return CommonResult.failed(); } - @ApiOperation("修改退货原因") + @Operation(summary = "修改退货原因") @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult update(@PathVariable Long id, @RequestBody OmsOrderReturnReason returnReason) { @@ -45,7 +46,7 @@ public class OmsOrderReturnReasonController { return CommonResult.failed(); } - @ApiOperation("批量删除退货原因") + @Operation(summary = "批量删除退货原因") @RequestMapping(value = "/delete", method = RequestMethod.POST) @ResponseBody public CommonResult delete(@RequestParam("ids") List ids) { @@ -56,7 +57,7 @@ public class OmsOrderReturnReasonController { return CommonResult.failed(); } - @ApiOperation("分页查询全部退货原因") + @Operation(summary = "分页查询全部退货原因") @RequestMapping(value = "/list", method = RequestMethod.GET) @ResponseBody public CommonResult> list(@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize, @@ -65,7 +66,7 @@ public class OmsOrderReturnReasonController { return CommonResult.success(CommonPage.restPage(reasonList)); } - @ApiOperation("获取单个退货原因详情信息") + @Operation(summary = "获取单个退货原因详情信息") @RequestMapping(value = "/{id}", method = RequestMethod.GET) @ResponseBody public CommonResult getItem(@PathVariable Long id) { @@ -73,7 +74,7 @@ public class OmsOrderReturnReasonController { return CommonResult.success(reason); } - @ApiOperation("修改退货原因启用状态") + @Operation(summary = "修改退货原因启用状态") @RequestMapping(value = "/update/status", method = RequestMethod.POST) @ResponseBody public CommonResult updateStatus(@RequestParam(value = "status") Integer status, diff --git a/mall-admin/src/main/java/com/macro/mall/controller/OmsOrderSettingController.java b/mall-admin/src/main/java/com/macro/mall/controller/OmsOrderSettingController.java index 8c9131e..be2de56 100644 --- a/mall-admin/src/main/java/com/macro/mall/controller/OmsOrderSettingController.java +++ b/mall-admin/src/main/java/com/macro/mall/controller/OmsOrderSettingController.java @@ -3,8 +3,9 @@ package com.macro.mall.controller; import com.macro.mall.common.api.CommonResult; import com.macro.mall.model.OmsOrderSetting; import com.macro.mall.service.OmsOrderSettingService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; + +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.stereotype.Controller; import org.springframework.web.bind.annotation.*; @@ -14,13 +15,13 @@ import org.springframework.web.bind.annotation.*; * Created by macro on 2018/10/16. */ @Controller -@Api(tags = "OmsOrderSettingController", description = "订单设置管理") +@Tag(name = "OmsOrderSettingController", description = "订单设置管理") @RequestMapping("/orderSetting") public class OmsOrderSettingController { @Autowired private OmsOrderSettingService orderSettingService; - @ApiOperation("获取指定订单设置") + @Operation(summary = "获取指定订单设置") @RequestMapping(value = "/{id}", method = RequestMethod.GET) @ResponseBody public CommonResult getItem(@PathVariable Long id) { @@ -28,7 +29,7 @@ public class OmsOrderSettingController { return CommonResult.success(orderSetting); } - @ApiOperation("修改指定订单设置") + @Operation(summary = "修改指定订单设置") @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult update(@PathVariable Long id, @RequestBody OmsOrderSetting orderSetting) { diff --git a/mall-admin/src/main/java/com/macro/mall/controller/OssController.java b/mall-admin/src/main/java/com/macro/mall/controller/OssController.java index 83c227f..90ae900 100644 --- a/mall-admin/src/main/java/com/macro/mall/controller/OssController.java +++ b/mall-admin/src/main/java/com/macro/mall/controller/OssController.java @@ -5,26 +5,26 @@ import com.macro.mall.common.api.CommonResult; import com.macro.mall.dto.OssCallbackResult; import com.macro.mall.dto.OssPolicyResult; import com.macro.mall.service.impl.OssServiceImpl; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; +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.stereotype.Controller; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Oss相关操作接口 * Created by macro on 2018/4/26. */ @Controller -@Api(tags = "OssController", description = "Oss管理") +@Tag(name = "OssController", description = "Oss管理") @RequestMapping("/aliyun/oss") public class OssController { @Autowired private OssServiceImpl ossService; - @ApiOperation(value = "oss上传签名生成") + @Operation(summary = "oss上传签名生成") @RequestMapping(value = "/policy", method = RequestMethod.GET) @ResponseBody public CommonResult policy() { @@ -32,7 +32,7 @@ public class OssController { return CommonResult.success(result); } - @ApiOperation(value = "oss上传成功回调") + @Operation(summary = "oss上传成功回调") @RequestMapping(value = "callback", method = RequestMethod.POST) @ResponseBody public CommonResult callback(HttpServletRequest request) { diff --git a/mall-admin/src/main/java/com/macro/mall/controller/PmsBrandController.java b/mall-admin/src/main/java/com/macro/mall/controller/PmsBrandController.java index b5d89de..c9e60cf 100644 --- a/mall-admin/src/main/java/com/macro/mall/controller/PmsBrandController.java +++ b/mall-admin/src/main/java/com/macro/mall/controller/PmsBrandController.java @@ -5,8 +5,9 @@ import com.macro.mall.common.api.CommonResult; import com.macro.mall.dto.PmsBrandParam; import com.macro.mall.model.PmsBrand; import com.macro.mall.service.PmsBrandService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; + +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.stereotype.Controller; import org.springframework.validation.annotation.Validated; @@ -19,20 +20,20 @@ import java.util.List; * Created by macro on 2018/4/26. */ @Controller -@Api(tags = "PmsBrandController", description = "商品品牌管理") +@Tag(name = "PmsBrandController", description = "商品品牌管理") @RequestMapping("/brand") public class PmsBrandController { @Autowired private PmsBrandService brandService; - @ApiOperation(value = "获取全部品牌列表") + @Operation(summary = "获取全部品牌列表") @RequestMapping(value = "/listAll", method = RequestMethod.GET) @ResponseBody public CommonResult> getList() { return CommonResult.success(brandService.listAllBrand()); } - @ApiOperation(value = "添加品牌") + @Operation(summary = "添加品牌") @RequestMapping(value = "/create", method = RequestMethod.POST) @ResponseBody public CommonResult create(@Validated @RequestBody PmsBrandParam pmsBrand) { @@ -46,7 +47,7 @@ public class PmsBrandController { return commonResult; } - @ApiOperation(value = "更新品牌") + @Operation(summary = "更新品牌") @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult update(@PathVariable("id") Long id, @@ -61,7 +62,7 @@ public class PmsBrandController { return commonResult; } - @ApiOperation(value = "删除品牌") + @Operation(summary = "删除品牌") @RequestMapping(value = "/delete/{id}", method = RequestMethod.GET) @ResponseBody public CommonResult delete(@PathVariable("id") Long id) { @@ -73,7 +74,7 @@ public class PmsBrandController { } } - @ApiOperation(value = "根据品牌名称分页获取品牌列表") + @Operation(summary = "根据品牌名称分页获取品牌列表") @RequestMapping(value = "/list", method = RequestMethod.GET) @ResponseBody public CommonResult> getList(@RequestParam(value = "keyword", required = false) String keyword, @@ -83,14 +84,14 @@ public class PmsBrandController { return CommonResult.success(CommonPage.restPage(brandList)); } - @ApiOperation(value = "根据编号查询品牌信息") + @Operation(summary = "根据编号查询品牌信息") @RequestMapping(value = "/{id}", method = RequestMethod.GET) @ResponseBody public CommonResult getItem(@PathVariable("id") Long id) { return CommonResult.success(brandService.getBrand(id)); } - @ApiOperation(value = "批量删除品牌") + @Operation(summary = "批量删除品牌") @RequestMapping(value = "/delete/batch", method = RequestMethod.POST) @ResponseBody public CommonResult deleteBatch(@RequestParam("ids") List ids) { @@ -102,7 +103,7 @@ public class PmsBrandController { } } - @ApiOperation(value = "批量更新显示状态") + @Operation(summary = "批量更新显示状态") @RequestMapping(value = "/update/showStatus", method = RequestMethod.POST) @ResponseBody public CommonResult updateShowStatus(@RequestParam("ids") List ids, @@ -115,7 +116,7 @@ public class PmsBrandController { } } - @ApiOperation(value = "批量更新厂家制造商状态") + @Operation(summary = "批量更新厂家制造商状态") @RequestMapping(value = "/update/factoryStatus", method = RequestMethod.POST) @ResponseBody public CommonResult updateFactoryStatus(@RequestParam("ids") List ids, diff --git a/mall-admin/src/main/java/com/macro/mall/controller/PmsProductAttributeCategoryController.java b/mall-admin/src/main/java/com/macro/mall/controller/PmsProductAttributeCategoryController.java index 6b6891d..72a23ba 100644 --- a/mall-admin/src/main/java/com/macro/mall/controller/PmsProductAttributeCategoryController.java +++ b/mall-admin/src/main/java/com/macro/mall/controller/PmsProductAttributeCategoryController.java @@ -5,8 +5,9 @@ import com.macro.mall.common.api.CommonResult; import com.macro.mall.dto.PmsProductAttributeCategoryItem; import com.macro.mall.model.PmsProductAttributeCategory; import com.macro.mall.service.PmsProductAttributeCategoryService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; + +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.stereotype.Controller; import org.springframework.web.bind.annotation.*; @@ -18,13 +19,13 @@ import java.util.List; * Created by macro on 2018/4/26. */ @Controller -@Api(tags = "PmsProductAttributeCategoryController", description = "商品属性分类管理") +@Tag(name = "PmsProductAttributeCategoryController", description = "商品属性分类管理") @RequestMapping("/productAttribute/category") public class PmsProductAttributeCategoryController { @Autowired private PmsProductAttributeCategoryService productAttributeCategoryService; - @ApiOperation("添加商品属性分类") + @Operation(summary = "添加商品属性分类") @RequestMapping(value = "/create", method = RequestMethod.POST) @ResponseBody public CommonResult create(@RequestParam String name) { @@ -36,7 +37,7 @@ public class PmsProductAttributeCategoryController { } } - @ApiOperation("修改商品属性分类") + @Operation(summary = "修改商品属性分类") @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult update(@PathVariable Long id, @RequestParam String name) { @@ -48,7 +49,7 @@ public class PmsProductAttributeCategoryController { } } - @ApiOperation("删除单个商品属性分类") + @Operation(summary = "删除单个商品属性分类") @RequestMapping(value = "/delete/{id}", method = RequestMethod.GET) @ResponseBody public CommonResult delete(@PathVariable Long id) { @@ -60,7 +61,7 @@ public class PmsProductAttributeCategoryController { } } - @ApiOperation("获取单个商品属性分类信息") + @Operation(summary = "获取单个商品属性分类信息") @RequestMapping(value = "/{id}", method = RequestMethod.GET) @ResponseBody public CommonResult getItem(@PathVariable Long id) { @@ -68,7 +69,7 @@ public class PmsProductAttributeCategoryController { return CommonResult.success(productAttributeCategory); } - @ApiOperation("分页获取所有商品属性分类") + @Operation(summary = "分页获取所有商品属性分类") @RequestMapping(value = "/list", method = RequestMethod.GET) @ResponseBody public CommonResult> getList(@RequestParam(defaultValue = "5") Integer pageSize, @RequestParam(defaultValue = "1") Integer pageNum) { @@ -76,7 +77,7 @@ public class PmsProductAttributeCategoryController { return CommonResult.success(CommonPage.restPage(productAttributeCategoryList)); } - @ApiOperation("获取所有商品属性分类及其下属性") + @Operation(summary = "获取所有商品属性分类及其下属性") @RequestMapping(value = "/list/withAttr", method = RequestMethod.GET) @ResponseBody public CommonResult> getListWithAttr() { diff --git a/mall-admin/src/main/java/com/macro/mall/controller/PmsProductAttributeController.java b/mall-admin/src/main/java/com/macro/mall/controller/PmsProductAttributeController.java index ed82bcf..8ae3a42 100644 --- a/mall-admin/src/main/java/com/macro/mall/controller/PmsProductAttributeController.java +++ b/mall-admin/src/main/java/com/macro/mall/controller/PmsProductAttributeController.java @@ -6,10 +6,12 @@ import com.macro.mall.dto.PmsProductAttributeParam; import com.macro.mall.dto.ProductAttrInfo; import com.macro.mall.model.PmsProductAttribute; import com.macro.mall.service.PmsProductAttributeService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiImplicitParams; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; @@ -21,14 +23,14 @@ import java.util.List; * Created by macro on 2018/4/26. */ @Controller -@Api(tags = "PmsProductAttributeController", description = "商品属性管理") +@Tag(name = "PmsProductAttributeController", description = "商品属性管理") @RequestMapping("/productAttribute") public class PmsProductAttributeController { @Autowired private PmsProductAttributeService productAttributeService; - @ApiOperation("根据分类查询属性列表或参数列表") - @ApiImplicitParams({@ApiImplicitParam(name = "type", value = "0表示属性,1表示参数", required = true, paramType = "query", dataType = "integer")}) + @Operation(summary = "根据分类查询属性列表或参数列表") + @Parameters({@Parameter(name = "type", description = "0表示属性,1表示参数", required = true,in = ParameterIn.QUERY, schema = @Schema(type = "integer"))}) @RequestMapping(value = "/list/{cid}", method = RequestMethod.GET) @ResponseBody public CommonResult> getList(@PathVariable Long cid, @@ -39,7 +41,7 @@ public class PmsProductAttributeController { return CommonResult.success(CommonPage.restPage(productAttributeList)); } - @ApiOperation("添加商品属性信息") + @Operation(summary = "添加商品属性信息") @RequestMapping(value = "/create", method = RequestMethod.POST) @ResponseBody public CommonResult create(@RequestBody PmsProductAttributeParam productAttributeParam) { @@ -51,7 +53,7 @@ public class PmsProductAttributeController { } } - @ApiOperation("修改商品属性信息") + @Operation(summary = "修改商品属性信息") @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult update(@PathVariable Long id, @RequestBody PmsProductAttributeParam productAttributeParam) { @@ -63,7 +65,7 @@ public class PmsProductAttributeController { } } - @ApiOperation("查询单个商品属性") + @Operation(summary = "查询单个商品属性") @RequestMapping(value = "/{id}", method = RequestMethod.GET) @ResponseBody public CommonResult getItem(@PathVariable Long id) { @@ -71,7 +73,7 @@ public class PmsProductAttributeController { return CommonResult.success(productAttribute); } - @ApiOperation("批量删除商品属性") + @Operation(summary = "批量删除商品属性") @RequestMapping(value = "/delete", method = RequestMethod.POST) @ResponseBody public CommonResult delete(@RequestParam("ids") List ids) { @@ -83,7 +85,7 @@ public class PmsProductAttributeController { } } - @ApiOperation("根据商品分类的id获取商品属性及属性分类") + @Operation(summary = "根据商品分类的id获取商品属性及属性分类") @RequestMapping(value = "/attrInfo/{productCategoryId}", method = RequestMethod.GET) @ResponseBody public CommonResult> getAttrInfo(@PathVariable Long productCategoryId) { diff --git a/mall-admin/src/main/java/com/macro/mall/controller/PmsProductCategoryController.java b/mall-admin/src/main/java/com/macro/mall/controller/PmsProductCategoryController.java index 50a616a..65a0919 100644 --- a/mall-admin/src/main/java/com/macro/mall/controller/PmsProductCategoryController.java +++ b/mall-admin/src/main/java/com/macro/mall/controller/PmsProductCategoryController.java @@ -6,8 +6,9 @@ import com.macro.mall.dto.PmsProductCategoryParam; import com.macro.mall.dto.PmsProductCategoryWithChildrenItem; import com.macro.mall.model.PmsProductCategory; import com.macro.mall.service.PmsProductCategoryService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; + +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.stereotype.Controller; import org.springframework.validation.annotation.Validated; @@ -20,13 +21,13 @@ import java.util.List; * Created by macro on 2018/4/26. */ @Controller -@Api(tags = "PmsProductCategoryController", description = "商品分类管理") +@Tag(name = "PmsProductCategoryController", description = "商品分类管理") @RequestMapping("/productCategory") public class PmsProductCategoryController { @Autowired private PmsProductCategoryService productCategoryService; - @ApiOperation("添加产品分类") + @Operation(summary = "添加产品分类") @RequestMapping(value = "/create", method = RequestMethod.POST) @ResponseBody public CommonResult create(@Validated @RequestBody PmsProductCategoryParam productCategoryParam) { @@ -38,7 +39,7 @@ public class PmsProductCategoryController { } } - @ApiOperation("修改商品分类") + @Operation(summary = "修改商品分类") @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult update(@PathVariable Long id, @@ -52,7 +53,7 @@ public class PmsProductCategoryController { } } - @ApiOperation("分页查询商品分类") + @Operation(summary = "分页查询商品分类") @RequestMapping(value = "/list/{parentId}", method = RequestMethod.GET) @ResponseBody public CommonResult> getList(@PathVariable Long parentId, @@ -62,7 +63,7 @@ public class PmsProductCategoryController { return CommonResult.success(CommonPage.restPage(productCategoryList)); } - @ApiOperation("根据id获取商品分类") + @Operation(summary = "根据id获取商品分类") @RequestMapping(value = "/{id}", method = RequestMethod.GET) @ResponseBody public CommonResult getItem(@PathVariable Long id) { @@ -70,7 +71,7 @@ public class PmsProductCategoryController { return CommonResult.success(productCategory); } - @ApiOperation("删除商品分类") + @Operation(summary = "删除商品分类") @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult delete(@PathVariable Long id) { @@ -82,7 +83,7 @@ public class PmsProductCategoryController { } } - @ApiOperation("修改导航栏显示状态") + @Operation(summary = "修改导航栏显示状态") @RequestMapping(value = "/update/navStatus", method = RequestMethod.POST) @ResponseBody public CommonResult updateNavStatus(@RequestParam("ids") List ids, @RequestParam("navStatus") Integer navStatus) { @@ -94,7 +95,7 @@ public class PmsProductCategoryController { } } - @ApiOperation("修改显示状态") + @Operation(summary = "修改显示状态") @RequestMapping(value = "/update/showStatus", method = RequestMethod.POST) @ResponseBody public CommonResult updateShowStatus(@RequestParam("ids") List ids, @RequestParam("showStatus") Integer showStatus) { @@ -106,7 +107,7 @@ public class PmsProductCategoryController { } } - @ApiOperation("查询所有一级分类及子分类") + @Operation(summary = "查询所有一级分类及子分类") @RequestMapping(value = "/list/withChildren", method = RequestMethod.GET) @ResponseBody public CommonResult> listWithChildren() { diff --git a/mall-admin/src/main/java/com/macro/mall/controller/PmsProductController.java b/mall-admin/src/main/java/com/macro/mall/controller/PmsProductController.java index 27afe82..114a269 100644 --- a/mall-admin/src/main/java/com/macro/mall/controller/PmsProductController.java +++ b/mall-admin/src/main/java/com/macro/mall/controller/PmsProductController.java @@ -7,8 +7,9 @@ import com.macro.mall.dto.PmsProductQueryParam; import com.macro.mall.dto.PmsProductResult; import com.macro.mall.model.PmsProduct; import com.macro.mall.service.PmsProductService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; + +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.stereotype.Controller; import org.springframework.web.bind.annotation.*; @@ -20,13 +21,13 @@ import java.util.List; * Created by macro on 2018/4/26. */ @Controller -@Api(tags = "PmsProductController", description = "商品管理") +@Tag(name = "PmsProductController", description = "商品管理") @RequestMapping("/product") public class PmsProductController { @Autowired private PmsProductService productService; - @ApiOperation("创建商品") + @Operation(summary = "创建商品") @RequestMapping(value = "/create", method = RequestMethod.POST) @ResponseBody public CommonResult create(@RequestBody PmsProductParam productParam) { @@ -38,7 +39,7 @@ public class PmsProductController { } } - @ApiOperation("根据商品id获取商品编辑信息") + @Operation(summary = "根据商品id获取商品编辑信息") @RequestMapping(value = "/updateInfo/{id}", method = RequestMethod.GET) @ResponseBody public CommonResult getUpdateInfo(@PathVariable Long id) { @@ -46,7 +47,7 @@ public class PmsProductController { return CommonResult.success(productResult); } - @ApiOperation("更新商品") + @Operation(summary = "更新商品") @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult update(@PathVariable Long id, @RequestBody PmsProductParam productParam) { @@ -58,7 +59,7 @@ public class PmsProductController { } } - @ApiOperation("查询商品") + @Operation(summary = "查询商品") @RequestMapping(value = "/list", method = RequestMethod.GET) @ResponseBody public CommonResult> getList(PmsProductQueryParam productQueryParam, @@ -68,7 +69,7 @@ public class PmsProductController { return CommonResult.success(CommonPage.restPage(productList)); } - @ApiOperation("根据商品名称或货号模糊查询") + @Operation(summary = "根据商品名称或货号模糊查询") @RequestMapping(value = "/simpleList", method = RequestMethod.GET) @ResponseBody public CommonResult> getList(String keyword) { @@ -76,7 +77,7 @@ public class PmsProductController { return CommonResult.success(productList); } - @ApiOperation("批量修改审核状态") + @Operation(summary = "批量修改审核状态") @RequestMapping(value = "/update/verifyStatus", method = RequestMethod.POST) @ResponseBody public CommonResult updateVerifyStatus(@RequestParam("ids") List ids, @@ -90,7 +91,7 @@ public class PmsProductController { } } - @ApiOperation("批量上下架") + @Operation(summary = "批量上下架") @RequestMapping(value = "/update/publishStatus", method = RequestMethod.POST) @ResponseBody public CommonResult updatePublishStatus(@RequestParam("ids") List ids, @@ -103,7 +104,7 @@ public class PmsProductController { } } - @ApiOperation("批量推荐商品") + @Operation(summary = "批量推荐商品") @RequestMapping(value = "/update/recommendStatus", method = RequestMethod.POST) @ResponseBody public CommonResult updateRecommendStatus(@RequestParam("ids") List ids, @@ -116,7 +117,7 @@ public class PmsProductController { } } - @ApiOperation("批量设为新品") + @Operation(summary = "批量设为新品") @RequestMapping(value = "/update/newStatus", method = RequestMethod.POST) @ResponseBody public CommonResult updateNewStatus(@RequestParam("ids") List ids, @@ -129,7 +130,7 @@ public class PmsProductController { } } - @ApiOperation("批量修改删除状态") + @Operation(summary = "批量修改删除状态") @RequestMapping(value = "/update/deleteStatus", method = RequestMethod.POST) @ResponseBody public CommonResult updateDeleteStatus(@RequestParam("ids") List ids, diff --git a/mall-admin/src/main/java/com/macro/mall/controller/PmsSkuStockController.java b/mall-admin/src/main/java/com/macro/mall/controller/PmsSkuStockController.java index b60273f..44c0adf 100644 --- a/mall-admin/src/main/java/com/macro/mall/controller/PmsSkuStockController.java +++ b/mall-admin/src/main/java/com/macro/mall/controller/PmsSkuStockController.java @@ -3,8 +3,9 @@ package com.macro.mall.controller; import com.macro.mall.common.api.CommonResult; import com.macro.mall.model.PmsSkuStock; import com.macro.mall.service.PmsSkuStockService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; + +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.stereotype.Controller; import org.springframework.web.bind.annotation.*; @@ -16,20 +17,20 @@ import java.util.List; * Created by macro on 2018/4/27. */ @Controller -@Api(tags = "PmsSkuStockController", description = "sku商品库存管理") +@Tag(name = "PmsSkuStockController", description = "sku商品库存管理") @RequestMapping("/sku") public class PmsSkuStockController { @Autowired private PmsSkuStockService skuStockService; - @ApiOperation("根据商品编号及编号模糊搜索sku库存") + @Operation(summary = "根据商品编号及编号模糊搜索sku库存") @RequestMapping(value = "/{pid}", method = RequestMethod.GET) @ResponseBody public CommonResult> getList(@PathVariable Long pid, @RequestParam(value = "keyword",required = false) String keyword) { List skuStockList = skuStockService.getList(pid, keyword); return CommonResult.success(skuStockList); } - @ApiOperation("批量更新库存信息") + @Operation(summary = "批量更新库存信息") @RequestMapping(value ="/update/{pid}",method = RequestMethod.POST) @ResponseBody public CommonResult update(@PathVariable Long pid,@RequestBody List skuStockList){ diff --git a/mall-admin/src/main/java/com/macro/mall/controller/SmsCouponController.java b/mall-admin/src/main/java/com/macro/mall/controller/SmsCouponController.java index 11b2603..044a328 100644 --- a/mall-admin/src/main/java/com/macro/mall/controller/SmsCouponController.java +++ b/mall-admin/src/main/java/com/macro/mall/controller/SmsCouponController.java @@ -5,8 +5,9 @@ import com.macro.mall.common.api.CommonResult; import com.macro.mall.dto.SmsCouponParam; import com.macro.mall.model.SmsCoupon; import com.macro.mall.service.SmsCouponService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; + +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.stereotype.Controller; import org.springframework.web.bind.annotation.*; @@ -18,12 +19,12 @@ import java.util.List; * Created by macro on 2018/8/28. */ @Controller -@Api(tags = "SmsCouponController", description = "优惠券管理") +@Tag(name = "SmsCouponController", description = "优惠券管理") @RequestMapping("/coupon") public class SmsCouponController { @Autowired private SmsCouponService couponService; - @ApiOperation("添加优惠券") + @Operation(summary = "添加优惠券") @RequestMapping(value = "/create", method = RequestMethod.POST) @ResponseBody public CommonResult add(@RequestBody SmsCouponParam couponParam) { @@ -34,7 +35,7 @@ public class SmsCouponController { return CommonResult.failed(); } - @ApiOperation("删除优惠券") + @Operation(summary = "删除优惠券") @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult delete(@PathVariable Long id) { @@ -45,7 +46,7 @@ public class SmsCouponController { return CommonResult.failed(); } - @ApiOperation("修改优惠券") + @Operation(summary = "修改优惠券") @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult update(@PathVariable Long id,@RequestBody SmsCouponParam couponParam) { @@ -56,7 +57,7 @@ public class SmsCouponController { return CommonResult.failed(); } - @ApiOperation("根据优惠券名称和类型分页获取优惠券列表") + @Operation(summary = "根据优惠券名称和类型分页获取优惠券列表") @RequestMapping(value = "/list", method = RequestMethod.GET) @ResponseBody public CommonResult> list( @@ -68,7 +69,7 @@ public class SmsCouponController { return CommonResult.success(CommonPage.restPage(couponList)); } - @ApiOperation("获取单个优惠券的详细信息") + @Operation(summary = "获取单个优惠券的详细信息") @RequestMapping(value = "/{id}", method = RequestMethod.GET) @ResponseBody public CommonResult getItem(@PathVariable Long id) { diff --git a/mall-admin/src/main/java/com/macro/mall/controller/SmsCouponHistoryController.java b/mall-admin/src/main/java/com/macro/mall/controller/SmsCouponHistoryController.java index 6c0ed02..324d1cb 100644 --- a/mall-admin/src/main/java/com/macro/mall/controller/SmsCouponHistoryController.java +++ b/mall-admin/src/main/java/com/macro/mall/controller/SmsCouponHistoryController.java @@ -4,8 +4,9 @@ import com.macro.mall.common.api.CommonPage; import com.macro.mall.common.api.CommonResult; import com.macro.mall.model.SmsCouponHistory; import com.macro.mall.service.SmsCouponHistoryService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; + +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.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @@ -20,13 +21,13 @@ import java.util.List; * Created by macro on 2018/11/6. */ @Controller -@Api(tags = "SmsCouponHistoryController", description = "优惠券领取记录管理") +@Tag(name = "SmsCouponHistoryController", description = "优惠券领取记录管理") @RequestMapping("/couponHistory") public class SmsCouponHistoryController { @Autowired private SmsCouponHistoryService historyService; - @ApiOperation("根据优惠券id,使用状态,订单编号分页获取领取记录") + @Operation(summary = "根据优惠券id,使用状态,订单编号分页获取领取记录") @RequestMapping(value = "/list", method = RequestMethod.GET) @ResponseBody public CommonResult> list(@RequestParam(value = "couponId", required = false) Long couponId, diff --git a/mall-admin/src/main/java/com/macro/mall/controller/SmsFlashPromotionController.java b/mall-admin/src/main/java/com/macro/mall/controller/SmsFlashPromotionController.java index 5bf63fd..6e0068e 100644 --- a/mall-admin/src/main/java/com/macro/mall/controller/SmsFlashPromotionController.java +++ b/mall-admin/src/main/java/com/macro/mall/controller/SmsFlashPromotionController.java @@ -4,8 +4,8 @@ import com.macro.mall.common.api.CommonPage; import com.macro.mall.common.api.CommonResult; import com.macro.mall.model.SmsFlashPromotion; import com.macro.mall.service.SmsFlashPromotionService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; +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.stereotype.Controller; import org.springframework.web.bind.annotation.*; @@ -17,13 +17,13 @@ import java.util.List; * Created by macro on 2018/11/16. */ @Controller -@Api(tags = "SmsFlashPromotionController", description = "限时购活动管理") +@Tag(name = "SmsFlashPromotionController", description = "限时购活动管理") @RequestMapping("/flash") public class SmsFlashPromotionController { @Autowired private SmsFlashPromotionService flashPromotionService; - @ApiOperation("添加活动") + @Operation(summary = "添加活动") @RequestMapping(value = "/create", method = RequestMethod.POST) @ResponseBody public CommonResult create(@RequestBody SmsFlashPromotion flashPromotion) { @@ -34,7 +34,7 @@ public class SmsFlashPromotionController { return CommonResult.failed(); } - @ApiOperation("编辑活动信息") + @Operation(summary = "编辑活动信息") @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) @ResponseBody public Object update(@PathVariable Long id, @RequestBody SmsFlashPromotion flashPromotion) { @@ -45,7 +45,7 @@ public class SmsFlashPromotionController { return CommonResult.failed(); } - @ApiOperation("删除活动信息") + @Operation(summary = "删除活动信息") @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST) @ResponseBody public Object delete(@PathVariable Long id) { @@ -56,7 +56,7 @@ public class SmsFlashPromotionController { return CommonResult.failed(); } - @ApiOperation("修改上下线状态") + @Operation(summary = "修改上下线状态") @RequestMapping(value = "/update/status/{id}", method = RequestMethod.POST) @ResponseBody public Object update(@PathVariable Long id, Integer status) { @@ -67,7 +67,7 @@ public class SmsFlashPromotionController { return CommonResult.failed(); } - @ApiOperation("获取活动详情") + @Operation(summary = "获取活动详情") @RequestMapping(value = "/{id}", method = RequestMethod.GET) @ResponseBody public Object getItem(@PathVariable Long id) { @@ -75,7 +75,7 @@ public class SmsFlashPromotionController { return CommonResult.success(flashPromotion); } - @ApiOperation("根据活动名称分页查询") + @Operation(summary = "根据活动名称分页查询") @RequestMapping(value = "/list", method = RequestMethod.GET) @ResponseBody public Object getItem(@RequestParam(value = "keyword", required = false) String keyword, diff --git a/mall-admin/src/main/java/com/macro/mall/controller/SmsFlashPromotionProductRelationController.java b/mall-admin/src/main/java/com/macro/mall/controller/SmsFlashPromotionProductRelationController.java index a7421c5..7f86e41 100644 --- a/mall-admin/src/main/java/com/macro/mall/controller/SmsFlashPromotionProductRelationController.java +++ b/mall-admin/src/main/java/com/macro/mall/controller/SmsFlashPromotionProductRelationController.java @@ -5,8 +5,9 @@ import com.macro.mall.common.api.CommonResult; import com.macro.mall.dto.SmsFlashPromotionProduct; import com.macro.mall.model.SmsFlashPromotionProductRelation; import com.macro.mall.service.SmsFlashPromotionProductRelationService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; + +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.stereotype.Controller; import org.springframework.web.bind.annotation.*; @@ -18,13 +19,13 @@ import java.util.List; * Created by macro on 2018/11/16. */ @Controller -@Api(tags = "SmsFlashPromotionProductRelationController", description = "限时购和商品关系管理") +@Tag(name = "SmsFlashPromotionProductRelationController", description = "限时购和商品关系管理") @RequestMapping("/flashProductRelation") public class SmsFlashPromotionProductRelationController { @Autowired private SmsFlashPromotionProductRelationService relationService; - @ApiOperation("批量选择商品添加关联") + @Operation(summary = "批量选择商品添加关联") @RequestMapping(value = "/create", method = RequestMethod.POST) @ResponseBody public CommonResult create(@RequestBody List relationList) { @@ -35,7 +36,7 @@ public class SmsFlashPromotionProductRelationController { return CommonResult.failed(); } - @ApiOperation("修改关联相关信息") + @Operation(summary = "修改关联相关信息") @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult update(@PathVariable Long id, @RequestBody SmsFlashPromotionProductRelation relation) { @@ -46,7 +47,7 @@ public class SmsFlashPromotionProductRelationController { return CommonResult.failed(); } - @ApiOperation("删除关联") + @Operation(summary = "删除关联") @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult delete(@PathVariable Long id) { @@ -57,7 +58,7 @@ public class SmsFlashPromotionProductRelationController { return CommonResult.failed(); } - @ApiOperation("获取管理商品促销信息") + @Operation(summary = "获取管理商品促销信息") @RequestMapping(value = "/{id}", method = RequestMethod.GET) @ResponseBody public CommonResult getItem(@PathVariable Long id) { @@ -65,7 +66,7 @@ public class SmsFlashPromotionProductRelationController { return CommonResult.success(relation); } - @ApiOperation("分页查询不同场次关联及商品信息") + @Operation(summary = "分页查询不同场次关联及商品信息") @RequestMapping(value = "/list", method = RequestMethod.GET) @ResponseBody public CommonResult> list(@RequestParam(value = "flashPromotionId") Long flashPromotionId, diff --git a/mall-admin/src/main/java/com/macro/mall/controller/SmsFlashPromotionSessionController.java b/mall-admin/src/main/java/com/macro/mall/controller/SmsFlashPromotionSessionController.java index adbdc87..d6384da 100644 --- a/mall-admin/src/main/java/com/macro/mall/controller/SmsFlashPromotionSessionController.java +++ b/mall-admin/src/main/java/com/macro/mall/controller/SmsFlashPromotionSessionController.java @@ -4,8 +4,9 @@ import com.macro.mall.common.api.CommonResult; import com.macro.mall.dto.SmsFlashPromotionSessionDetail; import com.macro.mall.model.SmsFlashPromotionSession; import com.macro.mall.service.SmsFlashPromotionSessionService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; + +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.stereotype.Controller; import org.springframework.web.bind.annotation.*; @@ -17,13 +18,13 @@ import java.util.List; * Created by macro on 2018/11/16. */ @Controller -@Api(tags = "SmsFlashPromotionSessionController", description = "限时购场次管理") +@Tag(name = "SmsFlashPromotionSessionController", description = "限时购场次管理") @RequestMapping("/flashSession") public class SmsFlashPromotionSessionController { @Autowired private SmsFlashPromotionSessionService flashPromotionSessionService; - @ApiOperation("添加场次") + @Operation(summary = "添加场次") @RequestMapping(value = "/create", method = RequestMethod.POST) @ResponseBody public CommonResult create(@RequestBody SmsFlashPromotionSession promotionSession) { @@ -34,7 +35,7 @@ public class SmsFlashPromotionSessionController { return CommonResult.failed(); } - @ApiOperation("修改场次") + @Operation(summary = "修改场次") @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult update(@PathVariable Long id, @RequestBody SmsFlashPromotionSession promotionSession) { @@ -45,7 +46,7 @@ public class SmsFlashPromotionSessionController { return CommonResult.failed(); } - @ApiOperation("修改启用状态") + @Operation(summary = "修改启用状态") @RequestMapping(value = "/update/status/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult updateStatus(@PathVariable Long id, Integer status) { @@ -56,7 +57,7 @@ public class SmsFlashPromotionSessionController { return CommonResult.failed(); } - @ApiOperation("删除场次") + @Operation(summary = "删除场次") @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult delete(@PathVariable Long id) { @@ -67,7 +68,7 @@ public class SmsFlashPromotionSessionController { return CommonResult.failed(); } - @ApiOperation("获取场次详情") + @Operation(summary = "获取场次详情") @RequestMapping(value = "/{id}", method = RequestMethod.GET) @ResponseBody public CommonResult getItem(@PathVariable Long id) { @@ -75,7 +76,7 @@ public class SmsFlashPromotionSessionController { return CommonResult.success(promotionSession); } - @ApiOperation("获取全部场次") + @Operation(summary = "获取全部场次") @RequestMapping(value = "/list", method = RequestMethod.GET) @ResponseBody public CommonResult> list() { @@ -83,7 +84,7 @@ public class SmsFlashPromotionSessionController { return CommonResult.success(promotionSessionList); } - @ApiOperation("获取全部可选场次及其数量") + @Operation(summary = "获取全部可选场次及其数量") @RequestMapping(value = "/selectList", method = RequestMethod.GET) @ResponseBody public CommonResult> selectList(Long flashPromotionId) { diff --git a/mall-admin/src/main/java/com/macro/mall/controller/SmsHomeAdvertiseController.java b/mall-admin/src/main/java/com/macro/mall/controller/SmsHomeAdvertiseController.java index 324ed2f..e019b63 100644 --- a/mall-admin/src/main/java/com/macro/mall/controller/SmsHomeAdvertiseController.java +++ b/mall-admin/src/main/java/com/macro/mall/controller/SmsHomeAdvertiseController.java @@ -4,8 +4,9 @@ import com.macro.mall.common.api.CommonPage; import com.macro.mall.common.api.CommonResult; import com.macro.mall.model.SmsHomeAdvertise; import com.macro.mall.service.SmsHomeAdvertiseService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; + +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.stereotype.Controller; import org.springframework.web.bind.annotation.*; @@ -17,13 +18,13 @@ import java.util.List; * Created by macro on 2018/11/7. */ @Controller -@Api(tags = "SmsHomeAdvertiseController", description = "首页轮播广告管理") +@Tag(name = "SmsHomeAdvertiseController", description = "首页轮播广告管理") @RequestMapping("/home/advertise") public class SmsHomeAdvertiseController { @Autowired private SmsHomeAdvertiseService advertiseService; - @ApiOperation("添加广告") + @Operation(summary = "添加广告") @RequestMapping(value = "/create", method = RequestMethod.POST) @ResponseBody public CommonResult create(@RequestBody SmsHomeAdvertise advertise) { @@ -33,7 +34,7 @@ public class SmsHomeAdvertiseController { return CommonResult.failed(); } - @ApiOperation("删除广告") + @Operation(summary = "删除广告") @RequestMapping(value = "/delete", method = RequestMethod.POST) @ResponseBody public CommonResult delete(@RequestParam("ids") List ids) { @@ -43,7 +44,7 @@ public class SmsHomeAdvertiseController { return CommonResult.failed(); } - @ApiOperation("修改上下线状态") + @Operation(summary = "修改上下线状态") @RequestMapping(value = "/update/status/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult updateStatus(@PathVariable Long id, Integer status) { @@ -53,7 +54,7 @@ public class SmsHomeAdvertiseController { return CommonResult.failed(); } - @ApiOperation("获取广告详情") + @Operation(summary = "获取广告详情") @RequestMapping(value = "/{id}", method = RequestMethod.GET) @ResponseBody public CommonResult getItem(@PathVariable Long id) { @@ -61,7 +62,7 @@ public class SmsHomeAdvertiseController { return CommonResult.success(advertise); } - @ApiOperation("修改广告") + @Operation(summary = "修改广告") @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult update(@PathVariable Long id, @RequestBody SmsHomeAdvertise advertise) { @@ -71,7 +72,7 @@ public class SmsHomeAdvertiseController { return CommonResult.failed(); } - @ApiOperation("分页查询广告") + @Operation(summary = "分页查询广告") @RequestMapping(value = "/list", method = RequestMethod.GET) @ResponseBody public CommonResult> list(@RequestParam(value = "name", required = false) String name, diff --git a/mall-admin/src/main/java/com/macro/mall/controller/SmsHomeBrandController.java b/mall-admin/src/main/java/com/macro/mall/controller/SmsHomeBrandController.java index d37a03f..8e20caa 100644 --- a/mall-admin/src/main/java/com/macro/mall/controller/SmsHomeBrandController.java +++ b/mall-admin/src/main/java/com/macro/mall/controller/SmsHomeBrandController.java @@ -4,8 +4,9 @@ import com.macro.mall.common.api.CommonPage; import com.macro.mall.common.api.CommonResult; import com.macro.mall.model.SmsHomeBrand; import com.macro.mall.service.SmsHomeBrandService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; + +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.stereotype.Controller; import org.springframework.web.bind.annotation.*; @@ -17,13 +18,13 @@ import java.util.List; * Created by macro on 2018/11/6. */ @Controller -@Api(tags = "SmsHomeBrandController", description = "首页品牌管理") +@Tag(name = "SmsHomeBrandController", description = "首页品牌管理") @RequestMapping("/home/brand") public class SmsHomeBrandController { @Autowired private SmsHomeBrandService homeBrandService; - @ApiOperation("添加首页推荐品牌") + @Operation(summary = "添加首页推荐品牌") @RequestMapping(value = "/create", method = RequestMethod.POST) @ResponseBody public CommonResult create(@RequestBody List homeBrandList) { @@ -34,7 +35,7 @@ public class SmsHomeBrandController { return CommonResult.failed(); } - @ApiOperation("修改品牌排序") + @Operation(summary = "修改品牌排序") @RequestMapping(value = "/update/sort/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult updateSort(@PathVariable Long id, Integer sort) { @@ -45,7 +46,7 @@ public class SmsHomeBrandController { return CommonResult.failed(); } - @ApiOperation("批量删除推荐品牌") + @Operation(summary = "批量删除推荐品牌") @RequestMapping(value = "/delete", method = RequestMethod.POST) @ResponseBody public CommonResult delete(@RequestParam("ids") List ids) { @@ -56,7 +57,7 @@ public class SmsHomeBrandController { return CommonResult.failed(); } - @ApiOperation("批量修改推荐状态") + @Operation(summary = "批量修改推荐状态") @RequestMapping(value = "/update/recommendStatus", method = RequestMethod.POST) @ResponseBody public CommonResult updateRecommendStatus(@RequestParam("ids") List ids, @RequestParam Integer recommendStatus) { @@ -67,7 +68,7 @@ public class SmsHomeBrandController { return CommonResult.failed(); } - @ApiOperation("分页查询推荐品牌") + @Operation(summary = "分页查询推荐品牌") @RequestMapping(value = "/list", method = RequestMethod.GET) @ResponseBody public CommonResult> list(@RequestParam(value = "brandName", required = false) String brandName, diff --git a/mall-admin/src/main/java/com/macro/mall/controller/SmsHomeNewProductController.java b/mall-admin/src/main/java/com/macro/mall/controller/SmsHomeNewProductController.java index 7f4118b..2369160 100644 --- a/mall-admin/src/main/java/com/macro/mall/controller/SmsHomeNewProductController.java +++ b/mall-admin/src/main/java/com/macro/mall/controller/SmsHomeNewProductController.java @@ -4,8 +4,9 @@ import com.macro.mall.common.api.CommonPage; import com.macro.mall.common.api.CommonResult; import com.macro.mall.model.SmsHomeNewProduct; import com.macro.mall.service.SmsHomeNewProductService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; + +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.stereotype.Controller; import org.springframework.web.bind.annotation.*; @@ -17,13 +18,13 @@ import java.util.List; * Created by macro on 2018/11/6. */ @Controller -@Api(tags = "SmsHomeNewProductController", description = "首页新品管理") +@Tag(name = "SmsHomeNewProductController", description = "首页新品管理") @RequestMapping("/home/newProduct") public class SmsHomeNewProductController { @Autowired private SmsHomeNewProductService homeNewProductService; - @ApiOperation("添加首页推荐品牌") + @Operation(summary = "添加首页推荐品牌") @RequestMapping(value = "/create", method = RequestMethod.POST) @ResponseBody public CommonResult create(@RequestBody List homeBrandList) { @@ -34,7 +35,7 @@ public class SmsHomeNewProductController { return CommonResult.failed(); } - @ApiOperation("修改推荐排序") + @Operation(summary = "修改推荐排序") @RequestMapping(value = "/update/sort/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult updateSort(@PathVariable Long id, Integer sort) { @@ -45,7 +46,7 @@ public class SmsHomeNewProductController { return CommonResult.failed(); } - @ApiOperation("批量删除推荐") + @Operation(summary = "批量删除推荐") @RequestMapping(value = "/delete", method = RequestMethod.POST) @ResponseBody public CommonResult delete(@RequestParam("ids") List ids) { @@ -56,7 +57,7 @@ public class SmsHomeNewProductController { return CommonResult.failed(); } - @ApiOperation("批量修改推荐状态") + @Operation(summary = "批量修改推荐状态") @RequestMapping(value = "/update/recommendStatus", method = RequestMethod.POST) @ResponseBody public CommonResult updateRecommendStatus(@RequestParam("ids") List ids, @RequestParam Integer recommendStatus) { @@ -67,7 +68,7 @@ public class SmsHomeNewProductController { return CommonResult.failed(); } - @ApiOperation("分页查询推荐") + @Operation(summary = "分页查询推荐") @RequestMapping(value = "/list", method = RequestMethod.GET) @ResponseBody public CommonResult> list(@RequestParam(value = "productName", required = false) String productName, diff --git a/mall-admin/src/main/java/com/macro/mall/controller/SmsHomeRecommendProductController.java b/mall-admin/src/main/java/com/macro/mall/controller/SmsHomeRecommendProductController.java index 0cbe5d4..1127570 100644 --- a/mall-admin/src/main/java/com/macro/mall/controller/SmsHomeRecommendProductController.java +++ b/mall-admin/src/main/java/com/macro/mall/controller/SmsHomeRecommendProductController.java @@ -4,8 +4,9 @@ import com.macro.mall.common.api.CommonPage; import com.macro.mall.common.api.CommonResult; import com.macro.mall.model.SmsHomeRecommendProduct; import com.macro.mall.service.SmsHomeRecommendProductService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; + +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.stereotype.Controller; import org.springframework.web.bind.annotation.*; @@ -17,13 +18,13 @@ import java.util.List; * Created by macro on 2018/11/6. */ @Controller -@Api(tags = "SmsHomeRecommendProductController", description = "首页人气推荐管理") +@Tag(name = "SmsHomeRecommendProductController", description = "首页人气推荐管理") @RequestMapping("/home/recommendProduct") public class SmsHomeRecommendProductController { @Autowired private SmsHomeRecommendProductService recommendProductService; - @ApiOperation("添加首页推荐") + @Operation(summary = "添加首页推荐") @RequestMapping(value = "/create", method = RequestMethod.POST) @ResponseBody public CommonResult create(@RequestBody List homeBrandList) { @@ -34,7 +35,7 @@ public class SmsHomeRecommendProductController { return CommonResult.failed(); } - @ApiOperation("修改推荐排序") + @Operation(summary = "修改推荐排序") @RequestMapping(value = "/update/sort/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult updateSort(@PathVariable Long id, Integer sort) { @@ -45,7 +46,7 @@ public class SmsHomeRecommendProductController { return CommonResult.failed(); } - @ApiOperation("批量删除推荐") + @Operation(summary = "批量删除推荐") @RequestMapping(value = "/delete", method = RequestMethod.POST) @ResponseBody public CommonResult delete(@RequestParam("ids") List ids) { @@ -56,7 +57,7 @@ public class SmsHomeRecommendProductController { return CommonResult.failed(); } - @ApiOperation("批量修改推荐状态") + @Operation(summary = "批量修改推荐状态") @RequestMapping(value = "/update/recommendStatus", method = RequestMethod.POST) @ResponseBody public CommonResult updateRecommendStatus(@RequestParam("ids") List ids, @RequestParam Integer recommendStatus) { @@ -67,7 +68,7 @@ public class SmsHomeRecommendProductController { return CommonResult.failed(); } - @ApiOperation("分页查询推荐") + @Operation(summary = "分页查询推荐") @RequestMapping(value = "/list", method = RequestMethod.GET) @ResponseBody public CommonResult> list(@RequestParam(value = "productName", required = false) String productName, diff --git a/mall-admin/src/main/java/com/macro/mall/controller/SmsHomeRecommendSubjectController.java b/mall-admin/src/main/java/com/macro/mall/controller/SmsHomeRecommendSubjectController.java index 001e996..ca3b489 100644 --- a/mall-admin/src/main/java/com/macro/mall/controller/SmsHomeRecommendSubjectController.java +++ b/mall-admin/src/main/java/com/macro/mall/controller/SmsHomeRecommendSubjectController.java @@ -4,8 +4,9 @@ import com.macro.mall.common.api.CommonPage; import com.macro.mall.common.api.CommonResult; import com.macro.mall.model.SmsHomeRecommendSubject; import com.macro.mall.service.SmsHomeRecommendSubjectService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; + +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.stereotype.Controller; import org.springframework.web.bind.annotation.*; @@ -17,13 +18,13 @@ import java.util.List; * Created by macro on 2018/11/6. */ @Controller -@Api(tags = "SmsHomeRecommendSubjectController", description = "首页专题推荐管理") +@Tag(name = "SmsHomeRecommendSubjectController", description = "首页专题推荐管理") @RequestMapping("/home/recommendSubject") public class SmsHomeRecommendSubjectController { @Autowired private SmsHomeRecommendSubjectService recommendSubjectService; - @ApiOperation("添加首页推荐专题") + @Operation(summary = "添加首页推荐专题") @RequestMapping(value = "/create", method = RequestMethod.POST) @ResponseBody public CommonResult create(@RequestBody List homeBrandList) { @@ -34,7 +35,7 @@ public class SmsHomeRecommendSubjectController { return CommonResult.failed(); } - @ApiOperation("修改推荐排序") + @Operation(summary = "修改推荐排序") @RequestMapping(value = "/update/sort/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult updateSort(@PathVariable Long id, Integer sort) { @@ -45,7 +46,7 @@ public class SmsHomeRecommendSubjectController { return CommonResult.failed(); } - @ApiOperation("批量删除推荐") + @Operation(summary = "批量删除推荐") @RequestMapping(value = "/delete", method = RequestMethod.POST) @ResponseBody public CommonResult delete(@RequestParam("ids") List ids) { @@ -56,7 +57,7 @@ public class SmsHomeRecommendSubjectController { return CommonResult.failed(); } - @ApiOperation("批量修改推荐状态") + @Operation(summary = "批量修改推荐状态") @RequestMapping(value = "/update/recommendStatus", method = RequestMethod.POST) @ResponseBody public CommonResult updateRecommendStatus(@RequestParam("ids") List ids, @RequestParam Integer recommendStatus) { @@ -67,7 +68,7 @@ public class SmsHomeRecommendSubjectController { return CommonResult.failed(); } - @ApiOperation("分页查询推荐") + @Operation(summary = "分页查询推荐") @RequestMapping(value = "/list", method = RequestMethod.GET) @ResponseBody public CommonResult> list(@RequestParam(value = "subjectName", required = false) String subjectName, diff --git a/mall-admin/src/main/java/com/macro/mall/controller/UmsAdminController.java b/mall-admin/src/main/java/com/macro/mall/controller/UmsAdminController.java index 4bdb046..4d400d3 100644 --- a/mall-admin/src/main/java/com/macro/mall/controller/UmsAdminController.java +++ b/mall-admin/src/main/java/com/macro/mall/controller/UmsAdminController.java @@ -1,20 +1,21 @@ package com.macro.mall.controller; +import cn.dev33.satoken.stp.SaTokenInfo; import cn.hutool.core.collection.CollUtil; import com.macro.mall.common.api.CommonPage; import com.macro.mall.common.api.CommonResult; -import com.macro.mall.common.domain.UserDto; import com.macro.mall.dto.UmsAdminLoginParam; import com.macro.mall.dto.UmsAdminParam; import com.macro.mall.dto.UpdateAdminPasswordParam; import com.macro.mall.model.UmsAdmin; -import com.macro.mall.model.UmsPermission; import com.macro.mall.model.UmsRole; import com.macro.mall.service.UmsAdminService; import com.macro.mall.service.UmsRoleService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; + +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.beans.factory.annotation.Value; import org.springframework.stereotype.Controller; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -29,15 +30,17 @@ import java.util.stream.Collectors; * Created by macro on 2018/4/26. */ @Controller -@Api(tags = "UmsAdminController", description = "后台用户管理") +@Tag(name = "UmsAdminController", description = "后台用户管理") @RequestMapping("/admin") public class UmsAdminController { @Autowired private UmsAdminService adminService; @Autowired private UmsRoleService roleService; + @Value("${sa-token.token-prefix}") + private String tokenHead; - @ApiOperation(value = "用户注册") + @Operation(summary = "用户注册") @RequestMapping(value = "/register", method = RequestMethod.POST) @ResponseBody public CommonResult register(@Validated @RequestBody UmsAdminParam umsAdminParam) { @@ -48,14 +51,21 @@ public class UmsAdminController { return CommonResult.success(umsAdmin); } - @ApiOperation(value = "登录以后返回token") + @Operation(summary = "登录以后返回token") @RequestMapping(value = "/login", method = RequestMethod.POST) @ResponseBody public CommonResult login(@Validated @RequestBody UmsAdminLoginParam umsAdminLoginParam) { - return adminService.login(umsAdminLoginParam.getUsername(),umsAdminLoginParam.getPassword()); + SaTokenInfo saTokenInfo = adminService.login(umsAdminLoginParam.getUsername(), umsAdminLoginParam.getPassword()); + if (saTokenInfo == null) { + return CommonResult.validateFailed("用户名或密码错误"); + } + Map tokenMap = new HashMap<>(); + tokenMap.put("token", saTokenInfo.getTokenValue() ); + tokenMap.put("tokenHead", tokenHead+" "); + return CommonResult.success(tokenMap); } - @ApiOperation(value = "获取当前登录用户信息") + @Operation(summary = "获取当前登录用户信息") @RequestMapping(value = "/info", method = RequestMethod.GET) @ResponseBody public CommonResult getAdminInfo() { @@ -72,14 +82,15 @@ public class UmsAdminController { return CommonResult.success(data); } - @ApiOperation(value = "登出功能") + @Operation(summary = "登出功能") @RequestMapping(value = "/logout", method = RequestMethod.POST) @ResponseBody public CommonResult logout() { + adminService.logout(); return CommonResult.success(null); } - @ApiOperation("根据用户名或姓名分页获取用户列表") + @Operation(summary = "根据用户名或姓名分页获取用户列表") @RequestMapping(value = "/list", method = RequestMethod.GET) @ResponseBody public CommonResult> list(@RequestParam(value = "keyword", required = false) String keyword, @@ -89,7 +100,7 @@ public class UmsAdminController { return CommonResult.success(CommonPage.restPage(adminList)); } - @ApiOperation("获取指定用户信息") + @Operation(summary = "获取指定用户信息") @RequestMapping(value = "/{id}", method = RequestMethod.GET) @ResponseBody public CommonResult getItem(@PathVariable Long id) { @@ -97,7 +108,7 @@ public class UmsAdminController { return CommonResult.success(admin); } - @ApiOperation("修改指定用户信息") + @Operation(summary = "修改指定用户信息") @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult update(@PathVariable Long id, @RequestBody UmsAdmin admin) { @@ -108,7 +119,7 @@ public class UmsAdminController { return CommonResult.failed(); } - @ApiOperation("修改指定用户密码") + @Operation(summary = "修改指定用户密码") @RequestMapping(value = "/updatePassword", method = RequestMethod.POST) @ResponseBody public CommonResult updatePassword(@RequestBody UpdateAdminPasswordParam updatePasswordParam) { @@ -126,7 +137,7 @@ public class UmsAdminController { } } - @ApiOperation("删除指定用户信息") + @Operation(summary = "删除指定用户信息") @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult delete(@PathVariable Long id) { @@ -137,7 +148,7 @@ public class UmsAdminController { return CommonResult.failed(); } - @ApiOperation("修改帐号状态") + @Operation(summary = "修改帐号状态") @RequestMapping(value = "/updateStatus/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult updateStatus(@PathVariable Long id,@RequestParam(value = "status") Integer status) { @@ -150,7 +161,7 @@ public class UmsAdminController { return CommonResult.failed(); } - @ApiOperation("给用户分配角色") + @Operation(summary = "给用户分配角色") @RequestMapping(value = "/role/update", method = RequestMethod.POST) @ResponseBody public CommonResult updateRole(@RequestParam("adminId") Long adminId, @@ -162,19 +173,11 @@ public class UmsAdminController { return CommonResult.failed(); } - @ApiOperation("获取指定用户的角色") + @Operation(summary = "获取指定用户的角色") @RequestMapping(value = "/role/{adminId}", method = RequestMethod.GET) @ResponseBody public CommonResult> getRoleList(@PathVariable Long adminId) { List roleList = adminService.getRoleList(adminId); return CommonResult.success(roleList); } - - @ApiOperation("根据用户名获取通用用户信息") - @RequestMapping(value = "/loadByUsername", method = RequestMethod.GET) - @ResponseBody - public UserDto loadUserByUsername(@RequestParam String username) { - UserDto userDTO = adminService.loadUserByUsername(username); - return userDTO; - } } diff --git a/mall-admin/src/main/java/com/macro/mall/controller/UmsMemberLevelController.java b/mall-admin/src/main/java/com/macro/mall/controller/UmsMemberLevelController.java index 0949ff3..c23a498 100644 --- a/mall-admin/src/main/java/com/macro/mall/controller/UmsMemberLevelController.java +++ b/mall-admin/src/main/java/com/macro/mall/controller/UmsMemberLevelController.java @@ -3,8 +3,9 @@ package com.macro.mall.controller; import com.macro.mall.common.api.CommonResult; import com.macro.mall.model.UmsMemberLevel; import com.macro.mall.service.UmsMemberLevelService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; + +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.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @@ -19,14 +20,14 @@ import java.util.List; * Created by macro on 2018/4/26. */ @Controller -@Api(tags = "UmsMemberLevelController", description = "会员等级管理") +@Tag(name = "UmsMemberLevelController", description = "会员等级管理") @RequestMapping("/memberLevel") public class UmsMemberLevelController { @Autowired private UmsMemberLevelService memberLevelService; @RequestMapping(value = "/list", method = RequestMethod.GET) - @ApiOperation("查询所有会员等级") + @Operation(summary = "查询所有会员等级") @ResponseBody public CommonResult> list(@RequestParam("defaultStatus") Integer defaultStatus) { List memberLevelList = memberLevelService.list(defaultStatus); diff --git a/mall-admin/src/main/java/com/macro/mall/controller/UmsMenuController.java b/mall-admin/src/main/java/com/macro/mall/controller/UmsMenuController.java index dec3d50..fde5039 100644 --- a/mall-admin/src/main/java/com/macro/mall/controller/UmsMenuController.java +++ b/mall-admin/src/main/java/com/macro/mall/controller/UmsMenuController.java @@ -5,8 +5,9 @@ import com.macro.mall.common.api.CommonResult; import com.macro.mall.dto.UmsMenuNode; import com.macro.mall.model.UmsMenu; import com.macro.mall.service.UmsMenuService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; + +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.stereotype.Controller; import org.springframework.web.bind.annotation.*; @@ -18,14 +19,14 @@ import java.util.List; * Created by macro on 2020/2/4. */ @Controller -@Api(tags = "UmsMenuController", description = "后台菜单管理") +@Tag(name = "UmsMenuController", description = "后台菜单管理") @RequestMapping("/menu") public class UmsMenuController { @Autowired private UmsMenuService menuService; - @ApiOperation("添加后台菜单") + @Operation(summary = "添加后台菜单") @RequestMapping(value = "/create", method = RequestMethod.POST) @ResponseBody public CommonResult create(@RequestBody UmsMenu umsMenu) { @@ -37,7 +38,7 @@ public class UmsMenuController { } } - @ApiOperation("修改后台菜单") + @Operation(summary = "修改后台菜单") @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult update(@PathVariable Long id, @@ -50,7 +51,7 @@ public class UmsMenuController { } } - @ApiOperation("根据ID获取菜单详情") + @Operation(summary = "根据ID获取菜单详情") @RequestMapping(value = "/{id}", method = RequestMethod.GET) @ResponseBody public CommonResult getItem(@PathVariable Long id) { @@ -58,7 +59,7 @@ public class UmsMenuController { return CommonResult.success(umsMenu); } - @ApiOperation("根据ID删除后台菜单") + @Operation(summary = "根据ID删除后台菜单") @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult delete(@PathVariable Long id) { @@ -70,7 +71,7 @@ public class UmsMenuController { } } - @ApiOperation("分页查询后台菜单") + @Operation(summary = "分页查询后台菜单") @RequestMapping(value = "/list/{parentId}", method = RequestMethod.GET) @ResponseBody public CommonResult> list(@PathVariable Long parentId, @@ -80,7 +81,7 @@ public class UmsMenuController { return CommonResult.success(CommonPage.restPage(menuList)); } - @ApiOperation("树形结构返回所有菜单列表") + @Operation(summary = "树形结构返回所有菜单列表") @RequestMapping(value = "/treeList", method = RequestMethod.GET) @ResponseBody public CommonResult> treeList() { @@ -88,7 +89,7 @@ public class UmsMenuController { return CommonResult.success(list); } - @ApiOperation("修改菜单显示状态") + @Operation(summary = "修改菜单显示状态") @RequestMapping(value = "/updateHidden/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult updateHidden(@PathVariable Long id, @RequestParam("hidden") Integer hidden) { diff --git a/mall-admin/src/main/java/com/macro/mall/controller/UmsResourceCategoryController.java b/mall-admin/src/main/java/com/macro/mall/controller/UmsResourceCategoryController.java index b3e427f..3c35c4d 100644 --- a/mall-admin/src/main/java/com/macro/mall/controller/UmsResourceCategoryController.java +++ b/mall-admin/src/main/java/com/macro/mall/controller/UmsResourceCategoryController.java @@ -3,8 +3,9 @@ package com.macro.mall.controller; import com.macro.mall.common.api.CommonResult; import com.macro.mall.model.UmsResourceCategory; import com.macro.mall.service.UmsResourceCategoryService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; + +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.stereotype.Controller; import org.springframework.web.bind.annotation.*; @@ -16,13 +17,13 @@ import java.util.List; * Created by macro on 2020/2/5. */ @Controller -@Api(tags = "UmsResourceCategoryController", description = "后台资源分类管理") +@Tag(name = "UmsResourceCategoryController", description = "后台资源分类管理") @RequestMapping("/resourceCategory") public class UmsResourceCategoryController { @Autowired private UmsResourceCategoryService resourceCategoryService; - @ApiOperation("查询所有后台资源分类") + @Operation(summary = "查询所有后台资源分类") @RequestMapping(value = "/listAll", method = RequestMethod.GET) @ResponseBody public CommonResult> listAll() { @@ -30,7 +31,7 @@ public class UmsResourceCategoryController { return CommonResult.success(resourceList); } - @ApiOperation("添加后台资源分类") + @Operation(summary = "添加后台资源分类") @RequestMapping(value = "/create", method = RequestMethod.POST) @ResponseBody public CommonResult create(@RequestBody UmsResourceCategory umsResourceCategory) { @@ -42,7 +43,7 @@ public class UmsResourceCategoryController { } } - @ApiOperation("修改后台资源分类") + @Operation(summary = "修改后台资源分类") @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult update(@PathVariable Long id, @@ -55,7 +56,7 @@ public class UmsResourceCategoryController { } } - @ApiOperation("根据ID删除后台资源") + @Operation(summary = "根据ID删除后台资源") @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult delete(@PathVariable Long id) { diff --git a/mall-admin/src/main/java/com/macro/mall/controller/UmsResourceController.java b/mall-admin/src/main/java/com/macro/mall/controller/UmsResourceController.java index 5261007..e0f3665 100644 --- a/mall-admin/src/main/java/com/macro/mall/controller/UmsResourceController.java +++ b/mall-admin/src/main/java/com/macro/mall/controller/UmsResourceController.java @@ -4,8 +4,9 @@ import com.macro.mall.common.api.CommonPage; import com.macro.mall.common.api.CommonResult; import com.macro.mall.model.UmsResource; import com.macro.mall.service.UmsResourceService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; + +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.stereotype.Controller; import org.springframework.web.bind.annotation.*; @@ -18,14 +19,14 @@ import java.util.Map; * Created by macro on 2020/2/4. */ @Controller -@Api(tags = "UmsResourceController", description = "后台资源管理") +@Tag(name = "UmsResourceController", description = "后台资源管理") @RequestMapping("/resource") public class UmsResourceController { @Autowired private UmsResourceService resourceService; - @ApiOperation("添加后台资源") + @Operation(summary = "添加后台资源") @RequestMapping(value = "/create", method = RequestMethod.POST) @ResponseBody public CommonResult create(@RequestBody UmsResource umsResource) { @@ -37,7 +38,7 @@ public class UmsResourceController { } } - @ApiOperation("修改后台资源") + @Operation(summary = "修改后台资源") @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult update(@PathVariable Long id, @@ -50,7 +51,7 @@ public class UmsResourceController { } } - @ApiOperation("根据ID获取资源详情") + @Operation(summary = "根据ID获取资源详情") @RequestMapping(value = "/{id}", method = RequestMethod.GET) @ResponseBody public CommonResult getItem(@PathVariable Long id) { @@ -58,7 +59,7 @@ public class UmsResourceController { return CommonResult.success(umsResource); } - @ApiOperation("根据ID删除后台资源") + @Operation(summary = "根据ID删除后台资源") @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult delete(@PathVariable Long id) { @@ -70,7 +71,7 @@ public class UmsResourceController { } } - @ApiOperation("分页模糊查询后台资源") + @Operation(summary = "分页模糊查询后台资源") @RequestMapping(value = "/list", method = RequestMethod.GET) @ResponseBody public CommonResult> list(@RequestParam(required = false) Long categoryId, @@ -82,7 +83,7 @@ public class UmsResourceController { return CommonResult.success(CommonPage.restPage(resourceList)); } - @ApiOperation("查询所有后台资源") + @Operation(summary = "查询所有后台资源") @RequestMapping(value = "/listAll", method = RequestMethod.GET) @ResponseBody public CommonResult> listAll() { @@ -90,11 +91,11 @@ public class UmsResourceController { return CommonResult.success(resourceList); } - @ApiOperation("初始化资源角色关联数据") - @RequestMapping(value = "/initResourceRolesMap", method = RequestMethod.GET) + @Operation(summary = "初始化路径和资源的关联数据") + @RequestMapping(value = "/initPathResourceMap", method = RequestMethod.GET) @ResponseBody - public CommonResult initResourceRolesMap() { - Map> resourceRolesMap = resourceService.initResourceRolesMap(); - return CommonResult.success(resourceRolesMap); + public CommonResult initPathResourceMap() { + Map pathResourceMap = resourceService.initPathResourceMap(); + return CommonResult.success(pathResourceMap); } } diff --git a/mall-admin/src/main/java/com/macro/mall/controller/UmsRoleController.java b/mall-admin/src/main/java/com/macro/mall/controller/UmsRoleController.java index 1df0b30..f061b51 100644 --- a/mall-admin/src/main/java/com/macro/mall/controller/UmsRoleController.java +++ b/mall-admin/src/main/java/com/macro/mall/controller/UmsRoleController.java @@ -4,8 +4,9 @@ import com.macro.mall.common.api.CommonPage; import com.macro.mall.common.api.CommonResult; import com.macro.mall.model.*; import com.macro.mall.service.UmsRoleService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; + +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.stereotype.Controller; import org.springframework.web.bind.annotation.*; @@ -17,13 +18,13 @@ import java.util.List; * Created by macro on 2018/9/30. */ @Controller -@Api(tags = "UmsRoleController", description = "后台用户角色管理") +@Tag(name = "UmsRoleController", description = "后台用户角色管理") @RequestMapping("/role") public class UmsRoleController { @Autowired private UmsRoleService roleService; - @ApiOperation("添加角色") + @Operation(summary = "添加角色") @RequestMapping(value = "/create", method = RequestMethod.POST) @ResponseBody public CommonResult create(@RequestBody UmsRole role) { @@ -34,7 +35,7 @@ public class UmsRoleController { return CommonResult.failed(); } - @ApiOperation("修改角色") + @Operation(summary = "修改角色") @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult update(@PathVariable Long id, @RequestBody UmsRole role) { @@ -45,7 +46,7 @@ public class UmsRoleController { return CommonResult.failed(); } - @ApiOperation("批量删除角色") + @Operation(summary = "批量删除角色") @RequestMapping(value = "/delete", method = RequestMethod.POST) @ResponseBody public CommonResult delete(@RequestParam("ids") List ids) { @@ -56,7 +57,7 @@ public class UmsRoleController { return CommonResult.failed(); } - @ApiOperation("获取所有角色") + @Operation(summary = "获取所有角色") @RequestMapping(value = "/listAll", method = RequestMethod.GET) @ResponseBody public CommonResult> listAll() { @@ -64,7 +65,7 @@ public class UmsRoleController { return CommonResult.success(roleList); } - @ApiOperation("根据角色名称分页获取角色列表") + @Operation(summary = "根据角色名称分页获取角色列表") @RequestMapping(value = "/list", method = RequestMethod.GET) @ResponseBody public CommonResult> list(@RequestParam(value = "keyword", required = false) String keyword, @@ -74,7 +75,7 @@ public class UmsRoleController { return CommonResult.success(CommonPage.restPage(roleList)); } - @ApiOperation("修改角色状态") + @Operation(summary = "修改角色状态") @RequestMapping(value = "/updateStatus/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult updateStatus(@PathVariable Long id, @RequestParam(value = "status") Integer status) { @@ -87,7 +88,7 @@ public class UmsRoleController { return CommonResult.failed(); } - @ApiOperation("获取角色相关菜单") + @Operation(summary = "获取角色相关菜单") @RequestMapping(value = "/listMenu/{roleId}", method = RequestMethod.GET) @ResponseBody public CommonResult> listMenu(@PathVariable Long roleId) { @@ -95,7 +96,7 @@ public class UmsRoleController { return CommonResult.success(roleList); } - @ApiOperation("获取角色相关资源") + @Operation(summary = "获取角色相关资源") @RequestMapping(value = "/listResource/{roleId}", method = RequestMethod.GET) @ResponseBody public CommonResult> listResource(@PathVariable Long roleId) { @@ -103,7 +104,7 @@ public class UmsRoleController { return CommonResult.success(roleList); } - @ApiOperation("给角色分配菜单") + @Operation(summary = "给角色分配菜单") @RequestMapping(value = "/allocMenu", method = RequestMethod.POST) @ResponseBody public CommonResult allocMenu(@RequestParam Long roleId, @RequestParam List menuIds) { @@ -111,7 +112,7 @@ public class UmsRoleController { return CommonResult.success(count); } - @ApiOperation("给角色分配资源") + @Operation(summary = "给角色分配资源") @RequestMapping(value = "/allocResource", method = RequestMethod.POST) @ResponseBody public CommonResult allocResource(@RequestParam Long roleId, @RequestParam List resourceIds) { diff --git a/mall-admin/src/main/java/com/macro/mall/dto/MinioUploadDto.java b/mall-admin/src/main/java/com/macro/mall/dto/MinioUploadDto.java index a2769c9..5df3979 100644 --- a/mall-admin/src/main/java/com/macro/mall/dto/MinioUploadDto.java +++ b/mall-admin/src/main/java/com/macro/mall/dto/MinioUploadDto.java @@ -1,6 +1,6 @@ package com.macro.mall.dto; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; @@ -11,8 +11,8 @@ import lombok.EqualsAndHashCode; @Data @EqualsAndHashCode(callSuper = false) public class MinioUploadDto { - @ApiModelProperty("文件访问URL") + @Schema(title = "文件访问URL") private String url; - @ApiModelProperty("文件名称") + @Schema(title = "文件名称") private String name; } diff --git a/mall-admin/src/main/java/com/macro/mall/dto/OmsMoneyInfoParam.java b/mall-admin/src/main/java/com/macro/mall/dto/OmsMoneyInfoParam.java index 71ba001..c48e3d3 100644 --- a/mall-admin/src/main/java/com/macro/mall/dto/OmsMoneyInfoParam.java +++ b/mall-admin/src/main/java/com/macro/mall/dto/OmsMoneyInfoParam.java @@ -1,6 +1,6 @@ package com.macro.mall.dto; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Getter; import lombok.Setter; @@ -13,12 +13,12 @@ import java.math.BigDecimal; @Getter @Setter public class OmsMoneyInfoParam { - @ApiModelProperty("订单ID") + @Schema(title = "订单ID") private Long orderId; - @ApiModelProperty("运费金额") + @Schema(title = "运费金额") private BigDecimal freightAmount; - @ApiModelProperty("管理员后台调整订单使用的折扣金额") + @Schema(title = "管理员后台调整订单使用的折扣金额") private BigDecimal discountAmount; - @ApiModelProperty("订单状态:0->待付款;1->待发货;2->已发货;3->已完成;4->已关闭;5->无效订单") + @Schema(title = "订单状态:0->待付款;1->待发货;2->已发货;3->已完成;4->已关闭;5->无效订单") private Integer status; } diff --git a/mall-admin/src/main/java/com/macro/mall/dto/OmsOrderDeliveryParam.java b/mall-admin/src/main/java/com/macro/mall/dto/OmsOrderDeliveryParam.java index 1698247..9929bbf 100644 --- a/mall-admin/src/main/java/com/macro/mall/dto/OmsOrderDeliveryParam.java +++ b/mall-admin/src/main/java/com/macro/mall/dto/OmsOrderDeliveryParam.java @@ -1,6 +1,6 @@ package com.macro.mall.dto; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Getter; import lombok.Setter; @@ -11,10 +11,10 @@ import lombok.Setter; @Getter @Setter public class OmsOrderDeliveryParam { - @ApiModelProperty("订单id") + @Schema(title = "订单id") private Long orderId; - @ApiModelProperty("物流公司") + @Schema(title = "物流公司") private String deliveryCompany; - @ApiModelProperty("物流单号") + @Schema(title = "物流单号") private String deliverySn; } diff --git a/mall-admin/src/main/java/com/macro/mall/dto/OmsOrderDetail.java b/mall-admin/src/main/java/com/macro/mall/dto/OmsOrderDetail.java index 129c0f2..323d79c 100644 --- a/mall-admin/src/main/java/com/macro/mall/dto/OmsOrderDetail.java +++ b/mall-admin/src/main/java/com/macro/mall/dto/OmsOrderDetail.java @@ -3,7 +3,7 @@ package com.macro.mall.dto; import com.macro.mall.model.OmsOrder; import com.macro.mall.model.OmsOrderItem; import com.macro.mall.model.OmsOrderOperateHistory; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Getter; import lombok.Setter; @@ -16,10 +16,10 @@ import java.util.List; public class OmsOrderDetail extends OmsOrder { @Getter @Setter - @ApiModelProperty("订单商品列表") + @Schema(title = "订单商品列表") private List orderItemList; @Getter @Setter - @ApiModelProperty("订单操作记录列表") + @Schema(title = "订单操作记录列表") private List historyList; } diff --git a/mall-admin/src/main/java/com/macro/mall/dto/OmsOrderQueryParam.java b/mall-admin/src/main/java/com/macro/mall/dto/OmsOrderQueryParam.java index a02fc2d..ef9ec60 100644 --- a/mall-admin/src/main/java/com/macro/mall/dto/OmsOrderQueryParam.java +++ b/mall-admin/src/main/java/com/macro/mall/dto/OmsOrderQueryParam.java @@ -1,6 +1,6 @@ package com.macro.mall.dto; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Getter; import lombok.Setter; @@ -11,16 +11,16 @@ import lombok.Setter; @Getter @Setter public class OmsOrderQueryParam { - @ApiModelProperty(value = "订单编号") + @Schema(title = "订单编号") private String orderSn; - @ApiModelProperty(value = "收货人姓名/号码") + @Schema(title = "收货人姓名/号码") private String receiverKeyword; - @ApiModelProperty(value = "订单状态:0->待付款;1->待发货;2->已发货;3->已完成;4->已关闭;5->无效订单") + @Schema(title = "订单状态:0->待付款;1->待发货;2->已发货;3->已完成;4->已关闭;5->无效订单") private Integer status; - @ApiModelProperty(value = "订单类型:0->正常订单;1->秒杀订单") + @Schema(title = "订单类型:0->正常订单;1->秒杀订单") private Integer orderType; - @ApiModelProperty(value = "订单来源:0->PC订单;1->app订单") + @Schema(title = "订单来源:0->PC订单;1->app订单") private Integer sourceType; - @ApiModelProperty(value = "订单提交时间") + @Schema(title = "订单提交时间") private String createTime; } diff --git a/mall-admin/src/main/java/com/macro/mall/dto/OmsOrderReturnApplyResult.java b/mall-admin/src/main/java/com/macro/mall/dto/OmsOrderReturnApplyResult.java index 8e43953..47012a6 100644 --- a/mall-admin/src/main/java/com/macro/mall/dto/OmsOrderReturnApplyResult.java +++ b/mall-admin/src/main/java/com/macro/mall/dto/OmsOrderReturnApplyResult.java @@ -2,7 +2,7 @@ package com.macro.mall.dto; import com.macro.mall.model.OmsCompanyAddress; import com.macro.mall.model.OmsOrderReturnApply; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Getter; import lombok.Setter; @@ -13,6 +13,6 @@ import lombok.Setter; public class OmsOrderReturnApplyResult extends OmsOrderReturnApply { @Getter @Setter - @ApiModelProperty(value = "公司收货地址") + @Schema(title = "公司收货地址") private OmsCompanyAddress companyAddress; } diff --git a/mall-admin/src/main/java/com/macro/mall/dto/OmsReceiverInfoParam.java b/mall-admin/src/main/java/com/macro/mall/dto/OmsReceiverInfoParam.java index 5bd0351..a69c438 100644 --- a/mall-admin/src/main/java/com/macro/mall/dto/OmsReceiverInfoParam.java +++ b/mall-admin/src/main/java/com/macro/mall/dto/OmsReceiverInfoParam.java @@ -1,6 +1,6 @@ package com.macro.mall.dto; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Getter; import lombok.Setter; @@ -11,22 +11,22 @@ import lombok.Setter; @Getter @Setter public class OmsReceiverInfoParam { - @ApiModelProperty(value = "订单ID") + @Schema(title = "订单ID") private Long orderId; - @ApiModelProperty(value = "收货人姓名") + @Schema(title = "收货人姓名") private String receiverName; - @ApiModelProperty(value = "收货人电话") + @Schema(title = "收货人电话") private String receiverPhone; - @ApiModelProperty(value = "收货人邮编") + @Schema(title = "收货人邮编") private String receiverPostCode; - @ApiModelProperty(value = "详细地址") + @Schema(title = "详细地址") private String receiverDetailAddress; - @ApiModelProperty(value = "省份/直辖市") + @Schema(title = "省份/直辖市") private String receiverProvince; - @ApiModelProperty(value = "城市") + @Schema(title = "城市") private String receiverCity; - @ApiModelProperty(value = "区") + @Schema(title = "区") private String receiverRegion; - @ApiModelProperty(value = "订单状态:0->待付款;1->待发货;2->已发货;3->已完成;4->已关闭;5->无效订单") + @Schema(title = "订单状态:0->待付款;1->待发货;2->已发货;3->已完成;4->已关闭;5->无效订单") private Integer status; } diff --git a/mall-admin/src/main/java/com/macro/mall/dto/OmsReturnApplyQueryParam.java b/mall-admin/src/main/java/com/macro/mall/dto/OmsReturnApplyQueryParam.java index 022cb46..b77f023 100644 --- a/mall-admin/src/main/java/com/macro/mall/dto/OmsReturnApplyQueryParam.java +++ b/mall-admin/src/main/java/com/macro/mall/dto/OmsReturnApplyQueryParam.java @@ -1,6 +1,6 @@ package com.macro.mall.dto; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Getter; import lombok.Setter; @@ -11,16 +11,16 @@ import lombok.Setter; @Getter @Setter public class OmsReturnApplyQueryParam { - @ApiModelProperty("服务单号") + @Schema(title = "服务单号") private Long id; - @ApiModelProperty(value = "收货人姓名/号码") + @Schema(title = "收货人姓名/号码") private String receiverKeyword; - @ApiModelProperty(value = "申请状态:0->待处理;1->退货中;2->已完成;3->已拒绝") + @Schema(title = "申请状态:0->待处理;1->退货中;2->已完成;3->已拒绝") private Integer status; - @ApiModelProperty(value = "申请时间") + @Schema(title = "申请时间") private String createTime; - @ApiModelProperty(value = "处理人员") + @Schema(title = "处理人员") private String handleMan; - @ApiModelProperty(value = "处理时间") + @Schema(title = "处理时间") private String handleTime; } diff --git a/mall-admin/src/main/java/com/macro/mall/dto/OmsUpdateStatusParam.java b/mall-admin/src/main/java/com/macro/mall/dto/OmsUpdateStatusParam.java index 597408a..f12c70d 100644 --- a/mall-admin/src/main/java/com/macro/mall/dto/OmsUpdateStatusParam.java +++ b/mall-admin/src/main/java/com/macro/mall/dto/OmsUpdateStatusParam.java @@ -1,6 +1,6 @@ package com.macro.mall.dto; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Getter; import lombok.Setter; @@ -13,20 +13,20 @@ import java.math.BigDecimal; @Getter @Setter public class OmsUpdateStatusParam { - @ApiModelProperty("服务单号") + @Schema(title = "服务单号") private Long id; - @ApiModelProperty("收货地址关联id") + @Schema(title = "收货地址关联id") private Long companyAddressId; - @ApiModelProperty("确认退款金额") + @Schema(title = "确认退款金额") private BigDecimal returnAmount; - @ApiModelProperty("处理备注") + @Schema(title = "处理备注") private String handleNote; - @ApiModelProperty("处理人") + @Schema(title = "处理人") private String handleMan; - @ApiModelProperty("收货备注") + @Schema(title = "收货备注") private String receiveNote; - @ApiModelProperty("收货人") + @Schema(title = "收货人") private String receiveMan; - @ApiModelProperty("申请状态:1->退货中;2->已完成;3->已拒绝") + @Schema(title = "申请状态:1->退货中;2->已完成;3->已拒绝") private Integer status; } diff --git a/mall-admin/src/main/java/com/macro/mall/dto/OssCallbackParam.java b/mall-admin/src/main/java/com/macro/mall/dto/OssCallbackParam.java index 26134b8..d376a25 100644 --- a/mall-admin/src/main/java/com/macro/mall/dto/OssCallbackParam.java +++ b/mall-admin/src/main/java/com/macro/mall/dto/OssCallbackParam.java @@ -1,6 +1,6 @@ package com.macro.mall.dto; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; @@ -11,10 +11,10 @@ import lombok.EqualsAndHashCode; @Data @EqualsAndHashCode(callSuper = false) public class OssCallbackParam { - @ApiModelProperty("请求的回调地址") + @Schema(title = "请求的回调地址") private String callbackUrl; - @ApiModelProperty("回调是传入request中的参数") + @Schema(title = "回调是传入request中的参数") private String callbackBody; - @ApiModelProperty("回调时传入参数的格式,比如表单提交形式") + @Schema(title = "回调时传入参数的格式,比如表单提交形式") private String callbackBodyType; } diff --git a/mall-admin/src/main/java/com/macro/mall/dto/OssCallbackResult.java b/mall-admin/src/main/java/com/macro/mall/dto/OssCallbackResult.java index 6cf67d4..992ad68 100644 --- a/mall-admin/src/main/java/com/macro/mall/dto/OssCallbackResult.java +++ b/mall-admin/src/main/java/com/macro/mall/dto/OssCallbackResult.java @@ -1,6 +1,6 @@ package com.macro.mall.dto; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; @@ -11,14 +11,14 @@ import lombok.EqualsAndHashCode; @Data @EqualsAndHashCode(callSuper = false) public class OssCallbackResult { - @ApiModelProperty("文件名称") + @Schema(title = "文件名称") private String filename; - @ApiModelProperty("文件大小") + @Schema(title = "文件大小") private String size; - @ApiModelProperty("文件的mimeType") + @Schema(title = "文件的mimeType") private String mimeType; - @ApiModelProperty("图片文件的宽") + @Schema(title = "图片文件的宽") private String width; - @ApiModelProperty("图片文件的高") + @Schema(title = "图片文件的高") private String height; } diff --git a/mall-admin/src/main/java/com/macro/mall/dto/OssPolicyResult.java b/mall-admin/src/main/java/com/macro/mall/dto/OssPolicyResult.java index c24f780..407a90d 100644 --- a/mall-admin/src/main/java/com/macro/mall/dto/OssPolicyResult.java +++ b/mall-admin/src/main/java/com/macro/mall/dto/OssPolicyResult.java @@ -1,6 +1,6 @@ package com.macro.mall.dto; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; @@ -11,16 +11,16 @@ import lombok.EqualsAndHashCode; @Data @EqualsAndHashCode(callSuper = false) public class OssPolicyResult { - @ApiModelProperty("访问身份验证中用到用户标识") + @Schema(title = "访问身份验证中用到用户标识") private String accessKeyId; - @ApiModelProperty("用户表单上传的策略,经过base64编码过的字符串") + @Schema(title = "用户表单上传的策略,经过base64编码过的字符串") private String policy; - @ApiModelProperty("对policy签名后的字符串") + @Schema(title = "对policy签名后的字符串") private String signature; - @ApiModelProperty("上传文件夹路径前缀") + @Schema(title = "上传文件夹路径前缀") private String dir; - @ApiModelProperty("oss对外服务的访问域名") + @Schema(title = "oss对外服务的访问域名") private String host; - @ApiModelProperty("上传成功后的回调设置") + @Schema(title = "上传成功后的回调设置") private String callback; } diff --git a/mall-admin/src/main/java/com/macro/mall/dto/PmsBrandParam.java b/mall-admin/src/main/java/com/macro/mall/dto/PmsBrandParam.java index aac7b29..92237db 100644 --- a/mall-admin/src/main/java/com/macro/mall/dto/PmsBrandParam.java +++ b/mall-admin/src/main/java/com/macro/mall/dto/PmsBrandParam.java @@ -1,12 +1,12 @@ package com.macro.mall.dto; import com.macro.mall.validator.FlagValidator; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; -import javax.validation.constraints.Min; -import javax.validation.constraints.NotEmpty; +import jakarta.validation.constraints.Min; +import jakarta.validation.constraints.NotEmpty; /** * 品牌传递参数 @@ -16,24 +16,24 @@ import javax.validation.constraints.NotEmpty; @EqualsAndHashCode(callSuper = false) public class PmsBrandParam { @NotEmpty - @ApiModelProperty(value = "品牌名称",required = true) + @Schema(title = "品牌名称",required = true) private String name; - @ApiModelProperty(value = "品牌首字母") + @Schema(title = "品牌首字母") private String firstLetter; @Min(value = 0) - @ApiModelProperty(value = "排序字段") + @Schema(title = "排序字段") private Integer sort; @FlagValidator(value = {"0","1"}, message = "厂家状态不正确") - @ApiModelProperty(value = "是否为厂家制造商") + @Schema(title = "是否为厂家制造商") private Integer factoryStatus; @FlagValidator(value = {"0","1"}, message = "显示状态不正确") - @ApiModelProperty(value = "是否进行显示") + @Schema(title = "是否进行显示") private Integer showStatus; @NotEmpty - @ApiModelProperty(value = "品牌logo",required = true) + @Schema(title = "品牌logo",required = true) private String logo; - @ApiModelProperty(value = "品牌大图") + @Schema(title = "品牌大图") private String bigPic; - @ApiModelProperty(value = "品牌故事") + @Schema(title = "品牌故事") private String brandStory; } diff --git a/mall-admin/src/main/java/com/macro/mall/dto/PmsProductAttributeCategoryItem.java b/mall-admin/src/main/java/com/macro/mall/dto/PmsProductAttributeCategoryItem.java index 550596c..b33ba03 100644 --- a/mall-admin/src/main/java/com/macro/mall/dto/PmsProductAttributeCategoryItem.java +++ b/mall-admin/src/main/java/com/macro/mall/dto/PmsProductAttributeCategoryItem.java @@ -2,7 +2,7 @@ package com.macro.mall.dto; import com.macro.mall.model.PmsProductAttribute; import com.macro.mall.model.PmsProductAttributeCategory; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.Getter; import lombok.Setter; @@ -16,6 +16,6 @@ import java.util.List; public class PmsProductAttributeCategoryItem extends PmsProductAttributeCategory { @Getter @Setter - @ApiModelProperty(value = "商品属性列表") + @Schema(title = "商品属性列表") private List productAttributeList; } diff --git a/mall-admin/src/main/java/com/macro/mall/dto/PmsProductAttributeParam.java b/mall-admin/src/main/java/com/macro/mall/dto/PmsProductAttributeParam.java index 9a8c131..71e4df8 100644 --- a/mall-admin/src/main/java/com/macro/mall/dto/PmsProductAttributeParam.java +++ b/mall-admin/src/main/java/com/macro/mall/dto/PmsProductAttributeParam.java @@ -1,11 +1,11 @@ package com.macro.mall.dto; import com.macro.mall.validator.FlagValidator; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; -import javax.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotEmpty; /** * 商品属性参数 @@ -15,34 +15,34 @@ import javax.validation.constraints.NotEmpty; @EqualsAndHashCode(callSuper = false) public class PmsProductAttributeParam { @NotEmpty - @ApiModelProperty("属性分类ID") + @Schema(title = "属性分类ID") private Long productAttributeCategoryId; @NotEmpty - @ApiModelProperty("属性名称") + @Schema(title = "属性名称") private String name; @FlagValidator({"0","1","2"}) - @ApiModelProperty("属性选择类型:0->唯一;1->单选;2->多选") + @Schema(title = "属性选择类型:0->唯一;1->单选;2->多选") private Integer selectType; @FlagValidator({"0","1"}) - @ApiModelProperty("属性录入方式:0->手工录入;1->从列表中选取") + @Schema(title = "属性录入方式:0->手工录入;1->从列表中选取") private Integer inputType; - @ApiModelProperty("可选值列表,以逗号隔开") + @Schema(title = "可选值列表,以逗号隔开") private String inputList; private Integer sort; @FlagValidator({"0","1"}) - @ApiModelProperty("分类筛选样式:0->普通;1->颜色") + @Schema(title = "分类筛选样式:0->普通;1->颜色") private Integer filterType; @FlagValidator({"0","1","2"}) - @ApiModelProperty("检索类型;0->不需要进行检索;1->关键字检索;2->范围检索") + @Schema(title = "检索类型;0->不需要进行检索;1->关键字检索;2->范围检索") private Integer searchType; @FlagValidator({"0","1"}) - @ApiModelProperty("相同属性产品是否关联;0->不关联;1->关联") + @Schema(title = "相同属性产品是否关联;0->不关联;1->关联") private Integer relatedStatus; @FlagValidator({"0","1"}) - @ApiModelProperty("是否支持手动新增;0->不支持;1->支持") + @Schema(title = "是否支持手动新增;0->不支持;1->支持") private Integer handAddStatus; @FlagValidator({"0","1"}) - @ApiModelProperty("属性的类型;0->规格;1->参数") + @Schema(title = "属性的类型;0->规格;1->参数") private Integer type; } diff --git a/mall-admin/src/main/java/com/macro/mall/dto/PmsProductCategoryParam.java b/mall-admin/src/main/java/com/macro/mall/dto/PmsProductCategoryParam.java index a3d83f5..59ea12b 100644 --- a/mall-admin/src/main/java/com/macro/mall/dto/PmsProductCategoryParam.java +++ b/mall-admin/src/main/java/com/macro/mall/dto/PmsProductCategoryParam.java @@ -1,12 +1,12 @@ package com.macro.mall.dto; import com.macro.mall.validator.FlagValidator; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; -import javax.validation.constraints.Min; -import javax.validation.constraints.NotEmpty; +import jakarta.validation.constraints.Min; +import jakarta.validation.constraints.NotEmpty; import java.util.List; /** @@ -16,28 +16,28 @@ import java.util.List; @Data @EqualsAndHashCode(callSuper = false) public class PmsProductCategoryParam { - @ApiModelProperty("父分类的编号") + @Schema(title = "父分类的编号") private Long parentId; @NotEmpty - @ApiModelProperty(value = "商品分类名称",required = true) + @Schema(title = "商品分类名称",required = true) private String name; - @ApiModelProperty("分类单位") + @Schema(title = "分类单位") private String productUnit; @FlagValidator(value = {"0","1"},message = "状态只能为0或1") - @ApiModelProperty("是否在导航栏显示") + @Schema(title = "是否在导航栏显示") private Integer navStatus; @FlagValidator(value = {"0","1"},message = "状态只能为0或1") - @ApiModelProperty("是否进行显示") + @Schema(title = "是否进行显示") private Integer showStatus; @Min(value = 0) - @ApiModelProperty("排序") + @Schema(title = "排序") private Integer sort; - @ApiModelProperty("图标") + @Schema(title = "图标") private String icon; - @ApiModelProperty("关键字") + @Schema(title = "关键字") private String keywords; - @ApiModelProperty("描述") + @Schema(title = "描述") private String description; - @ApiModelProperty("产品相关筛选属性集合") + @Schema(title = "产品相关筛选属性集合") private List productAttributeIdList; } diff --git a/mall-admin/src/main/java/com/macro/mall/dto/PmsProductCategoryWithChildrenItem.java b/mall-admin/src/main/java/com/macro/mall/dto/PmsProductCategoryWithChildrenItem.java index f69f4b4..aa9414e 100644 --- a/mall-admin/src/main/java/com/macro/mall/dto/PmsProductCategoryWithChildrenItem.java +++ b/mall-admin/src/main/java/com/macro/mall/dto/PmsProductCategoryWithChildrenItem.java @@ -1,7 +1,7 @@ package com.macro.mall.dto; import com.macro.mall.model.PmsProductCategory; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Getter; import lombok.Setter; @@ -13,6 +13,6 @@ import java.util.List; public class PmsProductCategoryWithChildrenItem extends PmsProductCategory { @Getter @Setter - @ApiModelProperty("子级分类") + @Schema(title = "子级分类") private List children; } diff --git a/mall-admin/src/main/java/com/macro/mall/dto/PmsProductParam.java b/mall-admin/src/main/java/com/macro/mall/dto/PmsProductParam.java index 1f29d1e..4fd40d7 100644 --- a/mall-admin/src/main/java/com/macro/mall/dto/PmsProductParam.java +++ b/mall-admin/src/main/java/com/macro/mall/dto/PmsProductParam.java @@ -1,7 +1,7 @@ package com.macro.mall.dto; import com.macro.mall.model.*; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; @@ -14,18 +14,18 @@ import java.util.List; @Data @EqualsAndHashCode(callSuper = false) public class PmsProductParam extends PmsProduct{ - @ApiModelProperty("商品阶梯价格设置") + @Schema(title = "商品阶梯价格设置") private List productLadderList; - @ApiModelProperty("商品满减价格设置") + @Schema(title = "商品满减价格设置") private List productFullReductionList; - @ApiModelProperty("商品会员价格设置") + @Schema(title = "商品会员价格设置") private List memberPriceList; - @ApiModelProperty("商品的sku库存信息") + @Schema(title = "商品的sku库存信息") private List skuStockList; - @ApiModelProperty("商品参数及自定义规格属性") + @Schema(title = "商品参数及自定义规格属性") private List productAttributeValueList; - @ApiModelProperty("专题和商品关系") + @Schema(title = "专题和商品关系") private List subjectProductRelationList; - @ApiModelProperty("优选专区和商品的关系") + @Schema(title = "优选专区和商品的关系") private List prefrenceAreaProductRelationList; } diff --git a/mall-admin/src/main/java/com/macro/mall/dto/PmsProductQueryParam.java b/mall-admin/src/main/java/com/macro/mall/dto/PmsProductQueryParam.java index ccba855..9a64129 100644 --- a/mall-admin/src/main/java/com/macro/mall/dto/PmsProductQueryParam.java +++ b/mall-admin/src/main/java/com/macro/mall/dto/PmsProductQueryParam.java @@ -1,6 +1,6 @@ package com.macro.mall.dto; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; @@ -11,16 +11,16 @@ import lombok.EqualsAndHashCode; @Data @EqualsAndHashCode(callSuper = false) public class PmsProductQueryParam { - @ApiModelProperty("上架状态") + @Schema(title = "上架状态") private Integer publishStatus; - @ApiModelProperty("审核状态") + @Schema(title = "审核状态") private Integer verifyStatus; - @ApiModelProperty("商品名称模糊关键字") + @Schema(title = "商品名称模糊关键字") private String keyword; - @ApiModelProperty("商品货号") + @Schema(title = "商品货号") private String productSn; - @ApiModelProperty("商品分类编号") + @Schema(title = "商品分类编号") private Long productCategoryId; - @ApiModelProperty("商品品牌编号") + @Schema(title = "商品品牌编号") private Long brandId; } diff --git a/mall-admin/src/main/java/com/macro/mall/dto/PmsProductResult.java b/mall-admin/src/main/java/com/macro/mall/dto/PmsProductResult.java index 7ddeecc..f60c601 100644 --- a/mall-admin/src/main/java/com/macro/mall/dto/PmsProductResult.java +++ b/mall-admin/src/main/java/com/macro/mall/dto/PmsProductResult.java @@ -1,6 +1,6 @@ package com.macro.mall.dto; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Getter; import lombok.Setter; @@ -11,6 +11,6 @@ import lombok.Setter; public class PmsProductResult extends PmsProductParam { @Getter @Setter - @ApiModelProperty("商品所选分类的父id") + @Schema(title = "商品所选分类的父id") private Long cateParentId; } diff --git a/mall-admin/src/main/java/com/macro/mall/dto/ProductAttrInfo.java b/mall-admin/src/main/java/com/macro/mall/dto/ProductAttrInfo.java index 3d6218a..7546326 100644 --- a/mall-admin/src/main/java/com/macro/mall/dto/ProductAttrInfo.java +++ b/mall-admin/src/main/java/com/macro/mall/dto/ProductAttrInfo.java @@ -1,7 +1,7 @@ package com.macro.mall.dto; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; @@ -12,8 +12,8 @@ import lombok.EqualsAndHashCode; @Data @EqualsAndHashCode(callSuper = false) public class ProductAttrInfo { - @ApiModelProperty("商品属性ID") + @Schema(title = "商品属性ID") private Long attributeId; - @ApiModelProperty("商品属性分类ID") + @Schema(title = "商品属性分类ID") private Long attributeCategoryId; } diff --git a/mall-admin/src/main/java/com/macro/mall/dto/SmsCouponParam.java b/mall-admin/src/main/java/com/macro/mall/dto/SmsCouponParam.java index bc974d9..12530e0 100644 --- a/mall-admin/src/main/java/com/macro/mall/dto/SmsCouponParam.java +++ b/mall-admin/src/main/java/com/macro/mall/dto/SmsCouponParam.java @@ -3,7 +3,7 @@ package com.macro.mall.dto; import com.macro.mall.model.SmsCoupon; import com.macro.mall.model.SmsCouponProductCategoryRelation; import com.macro.mall.model.SmsCouponProductRelation; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Getter; import lombok.Setter; @@ -16,10 +16,10 @@ import java.util.List; public class SmsCouponParam extends SmsCoupon { @Getter @Setter - @ApiModelProperty("优惠券绑定的商品") + @Schema(title = "优惠券绑定的商品") private List productRelationList; @Getter @Setter - @ApiModelProperty("优惠券绑定的商品分类") + @Schema(title = "优惠券绑定的商品分类") private List productCategoryRelationList; } diff --git a/mall-admin/src/main/java/com/macro/mall/dto/SmsFlashPromotionProduct.java b/mall-admin/src/main/java/com/macro/mall/dto/SmsFlashPromotionProduct.java index d9b5e7f..117df3b 100644 --- a/mall-admin/src/main/java/com/macro/mall/dto/SmsFlashPromotionProduct.java +++ b/mall-admin/src/main/java/com/macro/mall/dto/SmsFlashPromotionProduct.java @@ -2,7 +2,7 @@ package com.macro.mall.dto; import com.macro.mall.model.PmsProduct; import com.macro.mall.model.SmsFlashPromotionProductRelation; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Getter; import lombok.Setter; @@ -13,6 +13,6 @@ import lombok.Setter; public class SmsFlashPromotionProduct extends SmsFlashPromotionProductRelation{ @Getter @Setter - @ApiModelProperty("关联商品") + @Schema(title = "关联商品") private PmsProduct product; } diff --git a/mall-admin/src/main/java/com/macro/mall/dto/SmsFlashPromotionSessionDetail.java b/mall-admin/src/main/java/com/macro/mall/dto/SmsFlashPromotionSessionDetail.java index d441f6c..906628b 100644 --- a/mall-admin/src/main/java/com/macro/mall/dto/SmsFlashPromotionSessionDetail.java +++ b/mall-admin/src/main/java/com/macro/mall/dto/SmsFlashPromotionSessionDetail.java @@ -1,7 +1,7 @@ package com.macro.mall.dto; import com.macro.mall.model.SmsFlashPromotionSession; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Getter; import lombok.Setter; @@ -12,6 +12,6 @@ import lombok.Setter; public class SmsFlashPromotionSessionDetail extends SmsFlashPromotionSession { @Setter @Getter - @ApiModelProperty("商品数量") + @Schema(title = "商品数量") private Long productCount; } diff --git a/mall-admin/src/main/java/com/macro/mall/dto/UmsAdminLoginParam.java b/mall-admin/src/main/java/com/macro/mall/dto/UmsAdminLoginParam.java index 8689893..af680f4 100644 --- a/mall-admin/src/main/java/com/macro/mall/dto/UmsAdminLoginParam.java +++ b/mall-admin/src/main/java/com/macro/mall/dto/UmsAdminLoginParam.java @@ -1,10 +1,10 @@ package com.macro.mall.dto; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; -import javax.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotEmpty; /** * 用户登录参数 @@ -14,9 +14,9 @@ import javax.validation.constraints.NotEmpty; @EqualsAndHashCode(callSuper = false) public class UmsAdminLoginParam { @NotEmpty - @ApiModelProperty(value = "用户名", required = true) + @Schema(title = "用户名", required = true) private String username; @NotEmpty - @ApiModelProperty(value = "密码", required = true) + @Schema(title = "密码", required = true) private String password; } diff --git a/mall-admin/src/main/java/com/macro/mall/dto/UmsAdminParam.java b/mall-admin/src/main/java/com/macro/mall/dto/UmsAdminParam.java index a54efca..94e93e4 100644 --- a/mall-admin/src/main/java/com/macro/mall/dto/UmsAdminParam.java +++ b/mall-admin/src/main/java/com/macro/mall/dto/UmsAdminParam.java @@ -1,11 +1,11 @@ package com.macro.mall.dto; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Getter; import lombok.Setter; -import javax.validation.constraints.Email; -import javax.validation.constraints.NotEmpty; +import jakarta.validation.constraints.Email; +import jakarta.validation.constraints.NotEmpty; /** * 用户登录参数 @@ -14,19 +14,19 @@ import javax.validation.constraints.NotEmpty; @Getter @Setter public class UmsAdminParam { - @ApiModelProperty(value = "用户名", required = true) + @Schema(title = "用户名", required = true) @NotEmpty private String username; - @ApiModelProperty(value = "密码", required = true) + @Schema(title = "密码", required = true) @NotEmpty private String password; - @ApiModelProperty(value = "用户头像") + @Schema(title = "用户头像") private String icon; - @ApiModelProperty(value = "邮箱") + @Schema(title = "邮箱") @Email private String email; - @ApiModelProperty(value = "用户昵称") + @Schema(title = "用户昵称") private String nickName; - @ApiModelProperty(value = "备注") + @Schema(title = "备注") private String note; } diff --git a/mall-admin/src/main/java/com/macro/mall/dto/UmsMenuNode.java b/mall-admin/src/main/java/com/macro/mall/dto/UmsMenuNode.java index ec36ada..4c8d5b3 100644 --- a/mall-admin/src/main/java/com/macro/mall/dto/UmsMenuNode.java +++ b/mall-admin/src/main/java/com/macro/mall/dto/UmsMenuNode.java @@ -1,7 +1,7 @@ package com.macro.mall.dto; import com.macro.mall.model.UmsMenu; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Getter; import lombok.Setter; @@ -14,6 +14,6 @@ import java.util.List; @Getter @Setter public class UmsMenuNode extends UmsMenu { - @ApiModelProperty(value = "子级菜单") + @Schema(title = "子级菜单") private List children; } diff --git a/mall-admin/src/main/java/com/macro/mall/dto/UpdateAdminPasswordParam.java b/mall-admin/src/main/java/com/macro/mall/dto/UpdateAdminPasswordParam.java index 6b6af54..ae96275 100644 --- a/mall-admin/src/main/java/com/macro/mall/dto/UpdateAdminPasswordParam.java +++ b/mall-admin/src/main/java/com/macro/mall/dto/UpdateAdminPasswordParam.java @@ -1,10 +1,10 @@ package com.macro.mall.dto; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Getter; import lombok.Setter; -import javax.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotEmpty; /** * 修改用户名密码参数 @@ -14,12 +14,12 @@ import javax.validation.constraints.NotEmpty; @Setter public class UpdateAdminPasswordParam { @NotEmpty - @ApiModelProperty(value = "用户名", required = true) + @Schema(title = "用户名", required = true) private String username; @NotEmpty - @ApiModelProperty(value = "旧密码", required = true) + @Schema(title = "旧密码", required = true) private String oldPassword; @NotEmpty - @ApiModelProperty(value = "新密码", required = true) + @Schema(title = "新密码", required = true) private String newPassword; } diff --git a/mall-admin/src/main/java/com/macro/mall/service/AuthService.java b/mall-admin/src/main/java/com/macro/mall/service/AuthService.java deleted file mode 100644 index 4900ff3..0000000 --- a/mall-admin/src/main/java/com/macro/mall/service/AuthService.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.macro.mall.service; - -import com.macro.mall.common.api.CommonResult; -import org.springframework.cloud.openfeign.FeignClient; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestParam; - -import java.util.Map; - -/** - * 认证服务远程调用Service - * Created by macro on 2020/7/19. - */ -@FeignClient("mall-auth") -public interface AuthService { - - @PostMapping(value = "/oauth/token") - CommonResult getAccessToken(@RequestParam Map parameters); - -} diff --git a/mall-admin/src/main/java/com/macro/mall/service/OssService.java b/mall-admin/src/main/java/com/macro/mall/service/OssService.java index 1282757..36ebf4d 100644 --- a/mall-admin/src/main/java/com/macro/mall/service/OssService.java +++ b/mall-admin/src/main/java/com/macro/mall/service/OssService.java @@ -3,7 +3,7 @@ package com.macro.mall.service; import com.macro.mall.dto.OssCallbackResult; import com.macro.mall.dto.OssPolicyResult; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * oss上传管理Service diff --git a/mall-admin/src/main/java/com/macro/mall/service/UmsAdminService.java b/mall-admin/src/main/java/com/macro/mall/service/UmsAdminService.java index 2c668b9..79d6b2f 100644 --- a/mall-admin/src/main/java/com/macro/mall/service/UmsAdminService.java +++ b/mall-admin/src/main/java/com/macro/mall/service/UmsAdminService.java @@ -1,7 +1,6 @@ package com.macro.mall.service; -import com.macro.mall.common.api.CommonResult; -import com.macro.mall.common.domain.UserDto; +import cn.dev33.satoken.stp.SaTokenInfo; import com.macro.mall.dto.UmsAdminParam; import com.macro.mall.dto.UpdateAdminPasswordParam; import com.macro.mall.model.*; @@ -28,9 +27,8 @@ public interface UmsAdminService { * 登录功能 * @param username 用户名 * @param password 密码 - * @return 调用认证中心返回结果 */ - CommonResult login(String username, String password); + SaTokenInfo login(String username, String password); /** * 根据用户id获取用户 @@ -73,18 +71,13 @@ public interface UmsAdminService { */ int updatePassword(UpdateAdminPasswordParam updatePasswordParam); - /** - * 获取用户信息 - */ - UserDto loadUserByUsername(String username); - /** * 获取当前登录后台用户 */ UmsAdmin getCurrentAdmin(); /** - * 获取缓存服务 + * 登出操作 */ - UmsAdminCacheService getCacheService(); + void logout(); } diff --git a/mall-admin/src/main/java/com/macro/mall/service/UmsResourceService.java b/mall-admin/src/main/java/com/macro/mall/service/UmsResourceService.java index 33a1dc4..ed2e2f5 100644 --- a/mall-admin/src/main/java/com/macro/mall/service/UmsResourceService.java +++ b/mall-admin/src/main/java/com/macro/mall/service/UmsResourceService.java @@ -41,7 +41,7 @@ public interface UmsResourceService { List listAll(); /** - * 初始化资源角色规则 + * 初始化路径与资源访问规则 */ - Map> initResourceRolesMap(); + Map initPathResourceMap(); } diff --git a/mall-admin/src/main/java/com/macro/mall/service/impl/OssServiceImpl.java b/mall-admin/src/main/java/com/macro/mall/service/impl/OssServiceImpl.java index 208ec20..8d9ee7c 100644 --- a/mall-admin/src/main/java/com/macro/mall/service/impl/OssServiceImpl.java +++ b/mall-admin/src/main/java/com/macro/mall/service/impl/OssServiceImpl.java @@ -15,7 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.text.SimpleDateFormat; import java.util.Date; diff --git a/mall-admin/src/main/java/com/macro/mall/service/impl/UmsAdminCacheServiceImpl.java b/mall-admin/src/main/java/com/macro/mall/service/impl/UmsAdminCacheServiceImpl.java index 16b45ad..8843b53 100644 --- a/mall-admin/src/main/java/com/macro/mall/service/impl/UmsAdminCacheServiceImpl.java +++ b/mall-admin/src/main/java/com/macro/mall/service/impl/UmsAdminCacheServiceImpl.java @@ -14,8 +14,6 @@ import org.springframework.stereotype.Service; */ @Service public class UmsAdminCacheServiceImpl implements UmsAdminCacheService { - @Autowired - private UmsAdminService adminService; @Autowired private RedisService redisService; @Value("${redis.database}") diff --git a/mall-admin/src/main/java/com/macro/mall/service/impl/UmsAdminServiceImpl.java b/mall-admin/src/main/java/com/macro/mall/service/impl/UmsAdminServiceImpl.java index 633589c..4657af6 100644 --- a/mall-admin/src/main/java/com/macro/mall/service/impl/UmsAdminServiceImpl.java +++ b/mall-admin/src/main/java/com/macro/mall/service/impl/UmsAdminServiceImpl.java @@ -1,5 +1,7 @@ package com.macro.mall.service.impl; +import cn.dev33.satoken.stp.SaTokenInfo; +import cn.dev33.satoken.stp.StpUtil; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.StrUtil; import cn.hutool.crypto.digest.BCrypt; @@ -9,7 +11,7 @@ import com.github.pagehelper.PageHelper; import com.macro.mall.common.api.CommonResult; import com.macro.mall.common.api.ResultCode; import com.macro.mall.common.constant.AuthConstant; -import com.macro.mall.common.domain.UserDto; +import com.macro.mall.common.dto.UserDto; import com.macro.mall.common.exception.Asserts; import com.macro.mall.dao.UmsAdminRoleRelationDao; import com.macro.mall.dto.UmsAdminParam; @@ -18,9 +20,9 @@ import com.macro.mall.mapper.UmsAdminLoginLogMapper; import com.macro.mall.mapper.UmsAdminMapper; import com.macro.mall.mapper.UmsAdminRoleRelationMapper; import com.macro.mall.model.*; -import com.macro.mall.service.AuthService; import com.macro.mall.service.UmsAdminCacheService; import com.macro.mall.service.UmsAdminService; +import jakarta.servlet.http.HttpServletRequest; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.BeanUtils; @@ -31,7 +33,6 @@ import org.springframework.util.StringUtils; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; -import javax.servlet.http.HttpServletRequest; import java.util.*; import java.util.stream.Collectors; @@ -51,9 +52,7 @@ public class UmsAdminServiceImpl implements UmsAdminService { @Autowired private UmsAdminLoginLogMapper loginLogMapper; @Autowired - private AuthService authService; - @Autowired - private HttpServletRequest request; + private UmsAdminCacheService adminCacheService; @Override public UmsAdmin getAdminByUsername(String username) { @@ -87,30 +86,42 @@ public class UmsAdminServiceImpl implements UmsAdminService { } @Override - public CommonResult login(String username, String password) { + public SaTokenInfo login(String username, String password) { if(StrUtil.isEmpty(username)||StrUtil.isEmpty(password)){ Asserts.fail("用户名或密码不能为空!"); } - Map params = new HashMap<>(); - params.put("client_id", AuthConstant.ADMIN_CLIENT_ID); - params.put("client_secret","123456"); - params.put("grant_type","password"); - params.put("username",username); - params.put("password",password); - CommonResult restResult = authService.getAccessToken(params); - if(ResultCode.SUCCESS.getCode()==restResult.getCode()&&restResult.getData()!=null){ -// updateLoginTimeByUsername(username); - insertLoginLog(username); + UmsAdmin admin = getAdminByUsername(username); + if(admin==null){ + Asserts.fail("找不到该用户!"); } - return restResult; + if (!BCrypt.checkpw(password, admin.getPassword())) { + Asserts.fail("密码不正确!"); + } + if(admin.getStatus()!=1){ + Asserts.fail("该账号已被禁用!"); + } + // 登录校验成功后,一行代码实现登录 + StpUtil.login(admin.getId()); + UserDto userDto = new UserDto(); + userDto.setId(admin.getId()); + userDto.setUsername(admin.getUsername()); + userDto.setClientId(AuthConstant.ADMIN_CLIENT_ID); + List resourceList = getResourceList(admin.getId()); + List permissionList = resourceList.stream().map(item -> item.getId() + ":" + item.getName()).toList(); + userDto.setPermissionList(permissionList); + // 将用户信息存储到Session中 + StpUtil.getSession().set(AuthConstant.STP_ADMIN_INFO,userDto); + // 获取当前登录用户Token信息 + SaTokenInfo saTokenInfo = StpUtil.getTokenInfo(); +// updateLoginTimeByUsername(username); + insertLoginLog(admin); + return saTokenInfo; } /** * 添加登录记录 - * @param username 用户名 */ - private void insertLoginLog(String username) { - UmsAdmin admin = getAdminByUsername(username); + private void insertLoginLog(UmsAdmin admin) { if(admin==null) return; UmsAdminLoginLog loginLog = new UmsAdminLoginLog(); loginLog.setAdminId(admin.getId()); @@ -165,14 +176,14 @@ public class UmsAdminServiceImpl implements UmsAdminService { } } int count = adminMapper.updateByPrimaryKeySelective(admin); - getCacheService().delAdmin(id); + adminCacheService.delAdmin(id); return count; } @Override public int delete(Long id) { int count = adminMapper.deleteByPrimaryKey(id); - getCacheService().delAdmin(id); + adminCacheService.delAdmin(id); return count; } @@ -226,46 +237,26 @@ public class UmsAdminServiceImpl implements UmsAdminService { } umsAdmin.setPassword(BCrypt.hashpw(param.getNewPassword())); adminMapper.updateByPrimaryKey(umsAdmin); - getCacheService().delAdmin(umsAdmin.getId()); + adminCacheService.delAdmin(umsAdmin.getId()); return 1; } - @Override - public UserDto loadUserByUsername(String username){ - //获取用户信息 - UmsAdmin admin = getAdminByUsername(username); - if (admin != null) { - List roleList = getRoleList(admin.getId()); - UserDto userDTO = new UserDto(); - BeanUtils.copyProperties(admin,userDTO); - if(CollUtil.isNotEmpty(roleList)){ - List roleStrList = roleList.stream().map(item -> item.getId() + "_" + item.getName()).collect(Collectors.toList()); - userDTO.setRoles(roleStrList); - } - return userDTO; - } - return null; - } - @Override public UmsAdmin getCurrentAdmin() { - String userStr = request.getHeader(AuthConstant.USER_TOKEN_HEADER); - if(StrUtil.isEmpty(userStr)){ - Asserts.fail(ResultCode.UNAUTHORIZED); - } - UserDto userDto = JSONUtil.toBean(userStr, UserDto.class); - UmsAdmin admin = getCacheService().getAdmin(userDto.getId()); - if(admin!=null){ - return admin; - }else{ + UserDto userDto = (UserDto) StpUtil.getSession().get(AuthConstant.STP_ADMIN_INFO); + UmsAdmin admin = adminCacheService.getAdmin(userDto.getId()); + if (admin == null) { admin = adminMapper.selectByPrimaryKey(userDto.getId()); - getCacheService().setAdmin(admin); - return admin; + adminCacheService.setAdmin(admin); } + return admin; } - @Override - public UmsAdminCacheService getCacheService() { - return SpringUtil.getBean(UmsAdminCacheService.class); + public void logout() { + //先清空缓存 + UserDto userDto = (UserDto) StpUtil.getSession().get(AuthConstant.STP_ADMIN_INFO); + adminCacheService.delAdmin(userDto.getId()); + //再调用sa-token的登出方法 + StpUtil.logout(); } } diff --git a/mall-admin/src/main/java/com/macro/mall/service/impl/UmsResourceServiceImpl.java b/mall-admin/src/main/java/com/macro/mall/service/impl/UmsResourceServiceImpl.java index 44f517f..3ee85bd 100644 --- a/mall-admin/src/main/java/com/macro/mall/service/impl/UmsResourceServiceImpl.java +++ b/mall-admin/src/main/java/com/macro/mall/service/impl/UmsResourceServiceImpl.java @@ -5,17 +5,13 @@ import com.github.pagehelper.PageHelper; import com.macro.mall.common.constant.AuthConstant; import com.macro.mall.common.service.RedisService; import com.macro.mall.mapper.UmsResourceMapper; -import com.macro.mall.mapper.UmsRoleMapper; -import com.macro.mall.mapper.UmsRoleResourceRelationMapper; import com.macro.mall.model.*; -import com.macro.mall.service.UmsAdminCacheService; import com.macro.mall.service.UmsResourceService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import java.util.*; -import java.util.stream.Collectors; /** * 后台资源管理Service实现类 @@ -26,10 +22,6 @@ public class UmsResourceServiceImpl implements UmsResourceService { @Autowired private UmsResourceMapper resourceMapper; @Autowired - private UmsRoleMapper roleMapper; - @Autowired - private UmsRoleResourceRelationMapper roleResourceRelationMapper; - @Autowired private RedisService redisService; @Value("${spring.application.name}") private String applicationName; @@ -37,7 +29,7 @@ public class UmsResourceServiceImpl implements UmsResourceService { public int create(UmsResource umsResource) { umsResource.setCreateTime(new Date()); int count = resourceMapper.insert(umsResource); - initResourceRolesMap(); + initPathResourceMap(); return count; } @@ -45,7 +37,7 @@ public class UmsResourceServiceImpl implements UmsResourceService { public int update(Long id, UmsResource umsResource) { umsResource.setId(id); int count = resourceMapper.updateByPrimaryKeySelective(umsResource); - initResourceRolesMap(); + initPathResourceMap(); return count; } @@ -57,7 +49,7 @@ public class UmsResourceServiceImpl implements UmsResourceService { @Override public int delete(Long id) { int count = resourceMapper.deleteByPrimaryKey(id); - initResourceRolesMap(); + initPathResourceMap(); return count; } @@ -84,19 +76,15 @@ public class UmsResourceServiceImpl implements UmsResourceService { } @Override - public Map> initResourceRolesMap() { - Map> resourceRoleMap = new TreeMap<>(); + public Map initPathResourceMap() { + Map pathResourceMap = new TreeMap<>(); List resourceList = resourceMapper.selectByExample(new UmsResourceExample()); - List roleList = roleMapper.selectByExample(new UmsRoleExample()); - List relationList = roleResourceRelationMapper.selectByExample(new UmsRoleResourceRelationExample()); for (UmsResource resource : resourceList) { - Set roleIds = relationList.stream().filter(item -> item.getResourceId().equals(resource.getId())).map(UmsRoleResourceRelation::getRoleId).collect(Collectors.toSet()); - List roleNames = roleList.stream().filter(item -> roleIds.contains(item.getId())).map(item -> item.getId() + "_" + item.getName()).collect(Collectors.toList()); - resourceRoleMap.put("/"+applicationName+resource.getUrl(),roleNames); + pathResourceMap.put("/"+applicationName+resource.getUrl(),resource.getId()+":"+resource.getName()); } - redisService.del(AuthConstant.RESOURCE_ROLES_MAP_KEY); - redisService.hSetAll(AuthConstant.RESOURCE_ROLES_MAP_KEY, resourceRoleMap); - return resourceRoleMap; + redisService.del(AuthConstant.PATH_RESOURCE_MAP); + redisService.hSetAll(AuthConstant.PATH_RESOURCE_MAP, pathResourceMap); + return pathResourceMap; } } diff --git a/mall-admin/src/main/java/com/macro/mall/service/impl/UmsRoleServiceImpl.java b/mall-admin/src/main/java/com/macro/mall/service/impl/UmsRoleServiceImpl.java index 0f3327e..401941f 100644 --- a/mall-admin/src/main/java/com/macro/mall/service/impl/UmsRoleServiceImpl.java +++ b/mall-admin/src/main/java/com/macro/mall/service/impl/UmsRoleServiceImpl.java @@ -50,7 +50,7 @@ public class UmsRoleServiceImpl implements UmsRoleService { UmsRoleExample example = new UmsRoleExample(); example.createCriteria().andIdIn(ids); int count = roleMapper.deleteByExample(example); - resourceService.initResourceRolesMap(); + resourceService.initPathResourceMap(); return count; } @@ -113,7 +113,7 @@ public class UmsRoleServiceImpl implements UmsRoleService { relation.setResourceId(resourceId); roleResourceRelationMapper.insert(relation); } - resourceService.initResourceRolesMap(); + resourceService.initPathResourceMap(); return resourceIds.size(); } } diff --git a/mall-admin/src/main/java/com/macro/mall/validator/FlagValidator.java b/mall-admin/src/main/java/com/macro/mall/validator/FlagValidator.java index bdfaf68..6d63ea5 100644 --- a/mall-admin/src/main/java/com/macro/mall/validator/FlagValidator.java +++ b/mall-admin/src/main/java/com/macro/mall/validator/FlagValidator.java @@ -1,7 +1,7 @@ package com.macro.mall.validator; -import javax.validation.Constraint; -import javax.validation.Payload; +import jakarta.validation.Constraint; +import jakarta.validation.Payload; import java.lang.annotation.*; /** diff --git a/mall-admin/src/main/java/com/macro/mall/validator/FlagValidatorClass.java b/mall-admin/src/main/java/com/macro/mall/validator/FlagValidatorClass.java index a9d9155..b8aa6f8 100644 --- a/mall-admin/src/main/java/com/macro/mall/validator/FlagValidatorClass.java +++ b/mall-admin/src/main/java/com/macro/mall/validator/FlagValidatorClass.java @@ -1,7 +1,7 @@ package com.macro.mall.validator; -import javax.validation.ConstraintValidator; -import javax.validation.ConstraintValidatorContext; +import jakarta.validation.ConstraintValidator; +import jakarta.validation.ConstraintValidatorContext; /** * 状态标记校验器 diff --git a/mall-admin/src/main/resources/application.yml b/mall-admin/src/main/resources/application.yml index 1232c09..be4799c 100644 --- a/mall-admin/src/main/resources/application.yml +++ b/mall-admin/src/main/resources/application.yml @@ -17,17 +17,13 @@ spring: stat-view-servlet: #访问监控网页的登录用户名和密码 login-username: druid login-password: druid - redis: - host: localhost # Redis服务器地址 - database: 0 # Redis数据库索引(默认为0) - port: 6379 # Redis服务器连接端口 - password: # Redis服务器连接密码(默认为空) - timeout: 3000ms # 连接超时时间(毫秒) - rabbitmq: #rabbitmq相关配置 - host: localhost - port: 5672 - username: guest - password: guest + data: + redis: + host: localhost # Redis服务器地址 + database: 0 # Redis数据库索引(默认为0) + port: 6379 # Redis服务器连接端口 + password: # Redis服务器连接密码(默认为空) + timeout: 3000ms # 连接超时时间(毫秒) servlet: multipart: enabled: true #开启文件上传 @@ -36,16 +32,22 @@ mybatis: mapper-locations: - classpath:dao/*.xml - classpath*:com/**/mapper/*.xml -management: #开启SpringBoot Admin的监控 +management: endpoints: web: exposure: - include: '*' + include: '*' #暴露Actuator的监控端点 endpoint: health: - show-details: always + show-details: always #显示健康的详细信息 + env: + show-values: always #默认Actuator的环境变量会以****显示,这里开启显示 + configprops: + show-values: always #默认Actuator的配置属性会以****显示,这里开启显示 + info: + enabled: true redis: - database: mall + database: mall-swarm key: admin: 'ums:admin' expire: @@ -67,12 +69,45 @@ minio: bucketName: mall #存储桶名称 accessKey: minioadmin #访问的key secretKey: minioadmin #访问的秘钥 -feign: - okhttp: +springdoc: + swagger-ui: + # 修改Swagger UI路径 + path: /swagger-ui.html + # 开启Swagger UI界面 enabled: true - client: - config: - default: - connectTimeout: 5000 - readTimeout: 5000 - loggerLevel: basic \ No newline at end of file + # 用于配置tag和operation的展开方式,这里配置为都不展开 + doc-expansion: 'none' + api-docs: + # 修改api-docs路径 + path: /v3/api-docs + # 开启api-docs + enabled: true + group-configs: + - group: 'default' + packages-to-scan: com.macro.mall.controller + default-flat-param-object: false +sa-token: + # token名称 (同时也是cookie名称) + token-name: Authorization + # token有效期,单位秒,-1代表永不过期 + timeout: 604800 + # token临时有效期 (指定时间内无操作就视为token过期),单位秒 + active-timeout: -1 + # 是否允许同一账号并发登录 (为false时新登录挤掉旧登录) + is-concurrent: true + # 在多人登录同一账号时,是否共用一个token (为false时每次登录新建一个token) + is-share: false + # token风格 + token-style: uuid + # 是否输出操作日志 + is-log: false + # 是否从cookie中读取token + is-read-cookie: false + # 是否从head中读取token + is-read-header: true + # token前缀 + token-prefix: Bearer + # jwt秘钥 + jwt-secret-key: sa-secret-key123 + # 是否打印banner + is-print: false \ No newline at end of file diff --git a/mall-auth/pom.xml b/mall-auth/pom.xml index b57b3bc..a4d2e3b 100644 --- a/mall-auth/pom.xml +++ b/mall-auth/pom.xml @@ -41,26 +41,13 @@ com.alibaba.cloud spring-cloud-starter-alibaba-nacos-config - - org.springframework.boot - spring-boot-starter-security - - - org.springframework.cloud - spring-cloud-starter-oauth2 - ${spring-cloud-starter-oauth2.version} - - - com.nimbusds - nimbus-jose-jwt - org.springframework.cloud spring-cloud-starter-openfeign - io.github.openfeign - feign-okhttp + de.codecentric + spring-boot-admin-starter-client diff --git a/mall-auth/src/main/java/com/macro/mall/auth/component/JwtTokenEnhancer.java b/mall-auth/src/main/java/com/macro/mall/auth/component/JwtTokenEnhancer.java deleted file mode 100644 index c6b9e80..0000000 --- a/mall-auth/src/main/java/com/macro/mall/auth/component/JwtTokenEnhancer.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.macro.mall.auth.component; - -import com.macro.mall.auth.domain.SecurityUser; -import org.springframework.security.oauth2.common.DefaultOAuth2AccessToken; -import org.springframework.security.oauth2.common.OAuth2AccessToken; -import org.springframework.security.oauth2.provider.OAuth2Authentication; -import org.springframework.security.oauth2.provider.token.TokenEnhancer; -import org.springframework.stereotype.Component; - -import java.util.HashMap; -import java.util.Map; - -/** - * JWT内容增强器 - * Created by macro on 2020/6/19. - */ -@Component -public class JwtTokenEnhancer implements TokenEnhancer { - @Override - public OAuth2AccessToken enhance(OAuth2AccessToken accessToken, OAuth2Authentication authentication) { - SecurityUser securityUser = (SecurityUser) authentication.getPrincipal(); - Map info = new HashMap<>(); - //把用户ID设置到JWT中 - info.put("id", securityUser.getId()); - info.put("client_id",securityUser.getClientId()); - ((DefaultOAuth2AccessToken) accessToken).setAdditionalInformation(info); - return accessToken; - } -} diff --git a/mall-auth/src/main/java/com/macro/mall/auth/config/Oauth2ServerConfig.java b/mall-auth/src/main/java/com/macro/mall/auth/config/Oauth2ServerConfig.java deleted file mode 100644 index d21dab9..0000000 --- a/mall-auth/src/main/java/com/macro/mall/auth/config/Oauth2ServerConfig.java +++ /dev/null @@ -1,89 +0,0 @@ -package com.macro.mall.auth.config; - -import com.macro.mall.auth.component.JwtTokenEnhancer; -import com.macro.mall.auth.service.impl.UserServiceImpl; -import lombok.AllArgsConstructor; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.core.io.ClassPathResource; -import org.springframework.security.authentication.AuthenticationManager; -import org.springframework.security.crypto.password.PasswordEncoder; -import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer; -import org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurerAdapter; -import org.springframework.security.oauth2.config.annotation.web.configuration.EnableAuthorizationServer; -import org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerEndpointsConfigurer; -import org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerSecurityConfigurer; -import org.springframework.security.oauth2.provider.token.TokenEnhancer; -import org.springframework.security.oauth2.provider.token.TokenEnhancerChain; -import org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter; -import org.springframework.security.rsa.crypto.KeyStoreKeyFactory; - -import java.security.KeyPair; -import java.util.ArrayList; -import java.util.List; - -/** - * 认证服务器配置 - * Created by macro on 2020/6/19. - */ -@AllArgsConstructor -@Configuration -@EnableAuthorizationServer -public class Oauth2ServerConfig extends AuthorizationServerConfigurerAdapter { - - private final PasswordEncoder passwordEncoder; - private final UserServiceImpl userDetailsService; - private final AuthenticationManager authenticationManager; - private final JwtTokenEnhancer jwtTokenEnhancer; - - @Override - public void configure(ClientDetailsServiceConfigurer clients) throws Exception { - clients.inMemory() - .withClient("admin-app") - .secret(passwordEncoder.encode("123456")) - .scopes("all") - .authorizedGrantTypes("password", "refresh_token") - .accessTokenValiditySeconds(3600*24) - .refreshTokenValiditySeconds(3600*24*7) - .and() - .withClient("portal-app") - .secret(passwordEncoder.encode("123456")) - .scopes("all") - .authorizedGrantTypes("password", "refresh_token") - .accessTokenValiditySeconds(3600*24) - .refreshTokenValiditySeconds(3600*24*7); - } - - @Override - public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception { - TokenEnhancerChain enhancerChain = new TokenEnhancerChain(); - List delegates = new ArrayList<>(); - delegates.add(jwtTokenEnhancer); - delegates.add(accessTokenConverter()); - enhancerChain.setTokenEnhancers(delegates); //配置JWT的内容增强器 - endpoints.authenticationManager(authenticationManager) - .userDetailsService(userDetailsService) //配置加载用户信息的服务 - .accessTokenConverter(accessTokenConverter()) - .tokenEnhancer(enhancerChain); - } - - @Override - public void configure(AuthorizationServerSecurityConfigurer security) throws Exception { - security.allowFormAuthenticationForClients(); - } - - @Bean - public JwtAccessTokenConverter accessTokenConverter() { - JwtAccessTokenConverter jwtAccessTokenConverter = new JwtAccessTokenConverter(); - jwtAccessTokenConverter.setKeyPair(keyPair()); - return jwtAccessTokenConverter; - } - - @Bean - public KeyPair keyPair() { - //从classpath下的证书中获取秘钥对 - KeyStoreKeyFactory keyStoreKeyFactory = new KeyStoreKeyFactory(new ClassPathResource("jwt.jks"), "123456".toCharArray()); - return keyStoreKeyFactory.getKeyPair("jwt", "123456".toCharArray()); - } - -} diff --git a/mall-auth/src/main/java/com/macro/mall/auth/config/SpringDocConfig.java b/mall-auth/src/main/java/com/macro/mall/auth/config/SpringDocConfig.java new file mode 100644 index 0000000..49aa567 --- /dev/null +++ b/mall-auth/src/main/java/com/macro/mall/auth/config/SpringDocConfig.java @@ -0,0 +1,52 @@ +package com.macro.mall.auth.config; + +import io.swagger.v3.oas.models.Components; +import io.swagger.v3.oas.models.ExternalDocumentation; +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.info.Info; +import io.swagger.v3.oas.models.info.License; +import io.swagger.v3.oas.models.security.SecurityRequirement; +import io.swagger.v3.oas.models.security.SecurityScheme; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +/** + * SpringDoc相关配置 + * Created by macro on 2024/3/5. + */ +@Configuration +public class SpringDocConfig implements WebMvcConfigurer { + + private static final String SECURITY_SCHEME_NAME = "Authorization"; + + @Bean + public OpenAPI mallAuthOpenAPI() { + return new OpenAPI() + .info(new Info().title("mall认证中心") + .description("mall认证中心相关接口文档") + .version("v1.0.0") + .license(new License().name("Apache 2.0") + .url("https://github.com/macrozheng/mall-learning"))) + .externalDocs(new ExternalDocumentation() + .description("SpringBoot实战电商项目mall(60K+Star)全套文档") + .url("http://www.macrozheng.com")) + .addSecurityItem(new SecurityRequirement().addList(SECURITY_SCHEME_NAME)) + .components(new Components() + .addSecuritySchemes(SECURITY_SCHEME_NAME, + new SecurityScheme() + .name(SECURITY_SCHEME_NAME) + .type(SecurityScheme.Type.HTTP) + .scheme("bearer") + .bearerFormat("JWT"))); + } + + @Override + public void addViewControllers(ViewControllerRegistry registry) { + //配置访问`/swagger-ui/`路径时可以直接跳转到`/swagger-ui/index.html` + registry.addViewController("/swagger-ui/").setViewName("redirect:/swagger-ui/index.html"); + } + +} + diff --git a/mall-auth/src/main/java/com/macro/mall/auth/config/SwaggerConfig.java b/mall-auth/src/main/java/com/macro/mall/auth/config/SwaggerConfig.java deleted file mode 100644 index 8519df7..0000000 --- a/mall-auth/src/main/java/com/macro/mall/auth/config/SwaggerConfig.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.macro.mall.auth.config; - -import com.macro.mall.common.config.BaseSwaggerConfig; -import com.macro.mall.common.domain.SwaggerProperties; -import org.springframework.beans.factory.config.BeanPostProcessor; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import springfox.documentation.swagger2.annotations.EnableSwagger2; - -/** - * Swagger相关配置 - * Created by macro on 2018/4/26. - */ -@Configuration -@EnableSwagger2 -public class SwaggerConfig extends BaseSwaggerConfig { - - @Override - public SwaggerProperties swaggerProperties() { - return SwaggerProperties.builder() - .apiBasePackage("com.macro.mall.auth.controller") - .title("mall认证中心") - .description("mall认证中心相关接口文档") - .contactName("macro") - .version("1.0") - .enableSecurity(true) - .build(); - } - - @Bean - public BeanPostProcessor springfoxHandlerProviderBeanPostProcessor() { - return generateBeanPostProcessor(); - } -} diff --git a/mall-auth/src/main/java/com/macro/mall/auth/config/WebSecurityConfig.java b/mall-auth/src/main/java/com/macro/mall/auth/config/WebSecurityConfig.java deleted file mode 100644 index 5793381..0000000 --- a/mall-auth/src/main/java/com/macro/mall/auth/config/WebSecurityConfig.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.macro.mall.auth.config; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.security.authentication.AuthenticationManager; -import org.springframework.security.config.annotation.authentication.configuration.AuthenticationConfiguration; -import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; -import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; -import org.springframework.security.crypto.password.PasswordEncoder; - -/** - * SpringSecurity相关配置 - * Created by macro on 2020/6/19. - */ -@Configuration -@EnableWebSecurity -public class WebSecurityConfig{ - - @Bean - public AuthenticationManager authenticationManager(AuthenticationConfiguration authenticationConfiguration) throws Exception { - return authenticationConfiguration.getAuthenticationManager(); - } - - @Bean - public PasswordEncoder passwordEncoder() { - return new BCryptPasswordEncoder(); - } - -} diff --git a/mall-auth/src/main/java/com/macro/mall/auth/constant/MessageConstant.java b/mall-auth/src/main/java/com/macro/mall/auth/constant/MessageConstant.java deleted file mode 100644 index d1fea47..0000000 --- a/mall-auth/src/main/java/com/macro/mall/auth/constant/MessageConstant.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.macro.mall.auth.constant; - -/** - * 消息常量定义 - * Created by macro on 2020/6/19. - */ -public class MessageConstant { - - public static final String LOGIN_SUCCESS = "登录成功!"; - - public static final String USERNAME_PASSWORD_ERROR = "用户名或密码错误!"; - - public static final String CREDENTIALS_EXPIRED = "该账户的登录凭证已过期,请重新登录!"; - - public static final String ACCOUNT_DISABLED = "该账户已被禁用,请联系管理员!"; - - public static final String ACCOUNT_LOCKED = "该账号已被锁定,请联系管理员!"; - - public static final String ACCOUNT_EXPIRED = "该账号已过期,请联系管理员!"; - - public static final String PERMISSION_DENIED = "没有访问权限,请联系管理员!"; - -} diff --git a/mall-auth/src/main/java/com/macro/mall/auth/controller/AuthController.java b/mall-auth/src/main/java/com/macro/mall/auth/controller/AuthController.java index be54082..4a180b4 100644 --- a/mall-auth/src/main/java/com/macro/mall/auth/controller/AuthController.java +++ b/mall-auth/src/main/java/com/macro/mall/auth/controller/AuthController.java @@ -1,56 +1,51 @@ package com.macro.mall.auth.controller; -import com.macro.mall.auth.domain.Oauth2TokenDto; +import com.macro.mall.auth.domain.UmsAdminLoginParam; +import com.macro.mall.auth.service.UmsAdminService; +import com.macro.mall.auth.service.UmsMemberService; import com.macro.mall.common.api.CommonResult; import com.macro.mall.common.constant.AuthConstant; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; +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.security.oauth2.common.OAuth2AccessToken; -import org.springframework.security.oauth2.provider.endpoint.TokenEndpoint; -import org.springframework.web.HttpRequestMethodNotSupportedException; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletRequest; -import java.util.HashMap; -import java.util.Map; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; /** - * 自定义Oauth2获取令牌接口 - * Created by macro on 2020/7/17. + * @auther macrozheng + * @description 统一认证授权接口 + * @date 2024/1/30 + * @github https://github.com/macrozheng */ -@RestController -@Api(tags = "AuthController", description = "认证中心登录认证") -@RequestMapping("/oauth") +@Controller +@Tag(name = "AuthController", description = "统一认证授权接口") +@RequestMapping("/auth") public class AuthController { @Autowired - private TokenEndpoint tokenEndpoint; + private UmsAdminService adminService; - @ApiOperation("Oauth2获取token") - @RequestMapping(value = "/token", method = RequestMethod.POST) - public CommonResult postAccessToken(HttpServletRequest request, - @ApiParam("授权模式") @RequestParam String grant_type, - @ApiParam("Oauth2客户端ID") @RequestParam String client_id, - @ApiParam("Oauth2客户端秘钥") @RequestParam String client_secret, - @ApiParam("刷新token") @RequestParam(required = false) String refresh_token, - @ApiParam("登录用户名") @RequestParam(required = false) String username, - @ApiParam("登录密码") @RequestParam(required = false) String password) throws HttpRequestMethodNotSupportedException { - Map parameters = new HashMap<>(); - parameters.put("grant_type",grant_type); - parameters.put("client_id",client_id); - parameters.put("client_secret",client_secret); - parameters.putIfAbsent("refresh_token",refresh_token); - parameters.putIfAbsent("username",username); - parameters.putIfAbsent("password",password); - OAuth2AccessToken oAuth2AccessToken = tokenEndpoint.postAccessToken(request.getUserPrincipal(), parameters).getBody(); - Oauth2TokenDto oauth2TokenDto = Oauth2TokenDto.builder() - .token(oAuth2AccessToken.getValue()) - .refreshToken(oAuth2AccessToken.getRefreshToken().getValue()) - .expiresIn(oAuth2AccessToken.getExpiresIn()) - .tokenHead(AuthConstant.JWT_TOKEN_PREFIX).build(); + @Autowired + private UmsMemberService memberService; - return CommonResult.success(oauth2TokenDto); + @Operation(summary = "登录以后返回token") + @RequestMapping(value = "/login", method = RequestMethod.POST) + @ResponseBody + public CommonResult login(@RequestParam String clientId, + @RequestParam String username, + @RequestParam String password) { + if(AuthConstant.ADMIN_CLIENT_ID.equals(clientId)){ + UmsAdminLoginParam loginParam = new UmsAdminLoginParam(); + loginParam.setUsername(username); + loginParam.setPassword(password); + return adminService.login(loginParam); + }else if(AuthConstant.PORTAL_CLIENT_ID.equals(clientId)){ + return memberService.login(username,password); + }else{ + return CommonResult.failed("clientId不正确"); + } } } diff --git a/mall-auth/src/main/java/com/macro/mall/auth/controller/KeyPairController.java b/mall-auth/src/main/java/com/macro/mall/auth/controller/KeyPairController.java deleted file mode 100644 index a082add..0000000 --- a/mall-auth/src/main/java/com/macro/mall/auth/controller/KeyPairController.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.macro.mall.auth.controller; - -import com.nimbusds.jose.jwk.JWKSet; -import com.nimbusds.jose.jwk.RSAKey; -import io.swagger.annotations.Api; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import java.security.KeyPair; -import java.security.interfaces.RSAPublicKey; -import java.util.Map; - -/** - * 获取RSA公钥接口 - * Created by macro on 2020/6/19. - */ -@RestController -@Api(tags = "KeyPairController", description = "获取RSA公钥接口") -@RequestMapping("/rsa") -public class KeyPairController { - - @Autowired - private KeyPair keyPair; - - @GetMapping("/publicKey") - public Map getKey() { - RSAPublicKey publicKey = (RSAPublicKey) keyPair.getPublic(); - RSAKey key = new RSAKey.Builder(publicKey).build(); - return new JWKSet(key).toJSONObject(); - } - -} diff --git a/mall-auth/src/main/java/com/macro/mall/auth/domain/Oauth2TokenDto.java b/mall-auth/src/main/java/com/macro/mall/auth/domain/Oauth2TokenDto.java deleted file mode 100644 index 8464b15..0000000 --- a/mall-auth/src/main/java/com/macro/mall/auth/domain/Oauth2TokenDto.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.macro.mall.auth.domain; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Builder; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * Oauth2获取Token返回信息封装 - * Created by macro on 2020/7/17. - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Builder -public class Oauth2TokenDto { - @ApiModelProperty("访问令牌") - private String token; - @ApiModelProperty("刷令牌") - private String refreshToken; - @ApiModelProperty("访问令牌头前缀") - private String tokenHead; - @ApiModelProperty("有效时间(秒)") - private int expiresIn; -} diff --git a/mall-auth/src/main/java/com/macro/mall/auth/domain/SecurityUser.java b/mall-auth/src/main/java/com/macro/mall/auth/domain/SecurityUser.java deleted file mode 100644 index c07017e..0000000 --- a/mall-auth/src/main/java/com/macro/mall/auth/domain/SecurityUser.java +++ /dev/null @@ -1,95 +0,0 @@ -package com.macro.mall.auth.domain; - -import com.macro.mall.common.domain.UserDto; -import lombok.Data; -import org.springframework.security.core.GrantedAuthority; -import org.springframework.security.core.authority.SimpleGrantedAuthority; -import org.springframework.security.core.userdetails.UserDetails; - -import java.util.ArrayList; -import java.util.Collection; - -/** - * 登录用户信息 - * Created by macro on 2020/6/19. - */ -@Data -public class SecurityUser implements UserDetails { - - /** - * ID - */ - private Long id; - /** - * 用户名 - */ - private String username; - /** - * 用户密码 - */ - private String password; - /** - * 用户状态 - */ - private Boolean enabled; - /** - * 登录客户端ID - */ - private String clientId; - /** - * 权限数据 - */ - private Collection authorities; - - public SecurityUser() { - - } - - public SecurityUser(UserDto userDto) { - this.setId(userDto.getId()); - this.setUsername(userDto.getUsername()); - this.setPassword(userDto.getPassword()); - this.setEnabled(userDto.getStatus() == 1); - this.setClientId(userDto.getClientId()); - if (userDto.getRoles() != null) { - authorities = new ArrayList<>(); - userDto.getRoles().forEach(item -> authorities.add(new SimpleGrantedAuthority(item))); - } - } - - @Override - public Collection getAuthorities() { - return this.authorities; - } - - @Override - public String getPassword() { - return this.password; - } - - @Override - public String getUsername() { - return this.username; - } - - @Override - public boolean isAccountNonExpired() { - return true; - } - - @Override - public boolean isAccountNonLocked() { - return true; - } - - @Override - public boolean isCredentialsNonExpired() { - return true; - } - - @Override - public boolean isEnabled() { - return this.enabled; - } - -} diff --git a/mall-auth/src/main/java/com/macro/mall/auth/domain/UmsAdminLoginParam.java b/mall-auth/src/main/java/com/macro/mall/auth/domain/UmsAdminLoginParam.java new file mode 100644 index 0000000..817349c --- /dev/null +++ b/mall-auth/src/main/java/com/macro/mall/auth/domain/UmsAdminLoginParam.java @@ -0,0 +1,21 @@ +package com.macro.mall.auth.domain; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 用户登录参数 + * Created by macro on 2018/4/26. + */ +@Data +@EqualsAndHashCode(callSuper = false) +public class UmsAdminLoginParam { + @NotEmpty + @Schema(title = "用户名", required = true) + private String username; + @NotEmpty + @Schema(title = "密码", required = true) + private String password; +} diff --git a/mall-auth/src/main/java/com/macro/mall/auth/exception/Oauth2ExceptionHandler.java b/mall-auth/src/main/java/com/macro/mall/auth/exception/Oauth2ExceptionHandler.java deleted file mode 100644 index f237a4d..0000000 --- a/mall-auth/src/main/java/com/macro/mall/auth/exception/Oauth2ExceptionHandler.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.macro.mall.auth.exception; - -import com.macro.mall.common.api.CommonResult; -import org.springframework.security.oauth2.common.exceptions.OAuth2Exception; -import org.springframework.web.bind.annotation.ControllerAdvice; -import org.springframework.web.bind.annotation.ExceptionHandler; -import org.springframework.web.bind.annotation.ResponseBody; - -/** - * 全局处理Oauth2抛出的异常 - * Created by macro on 2020/7/17. - */ -@ControllerAdvice -public class Oauth2ExceptionHandler { - @ResponseBody - @ExceptionHandler(value = OAuth2Exception.class) - public CommonResult handleOauth2(OAuth2Exception e) { - return CommonResult.failed(e.getMessage()); - } -} diff --git a/mall-auth/src/main/java/com/macro/mall/auth/service/UmsAdminService.java b/mall-auth/src/main/java/com/macro/mall/auth/service/UmsAdminService.java index 7a4d22e..39a39b7 100644 --- a/mall-auth/src/main/java/com/macro/mall/auth/service/UmsAdminService.java +++ b/mall-auth/src/main/java/com/macro/mall/auth/service/UmsAdminService.java @@ -1,17 +1,21 @@ package com.macro.mall.auth.service; -import com.macro.mall.common.domain.UserDto; +import com.macro.mall.auth.domain.UmsAdminLoginParam; +import com.macro.mall.common.api.CommonResult; import org.springframework.cloud.openfeign.FeignClient; -import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestParam; /** - * 后台用户服务远程调用Service - * Created by macro on 2019/10/18. + * @auther macrozheng + * @description 后台用户服务远程调用Service + * @date 2024/1/30 + * @github https://github.com/macrozheng */ @FeignClient("mall-admin") public interface UmsAdminService { - @GetMapping("/admin/loadByUsername") - UserDto loadUserByUsername(@RequestParam String username); + @PostMapping("/admin/login") + CommonResult login(@RequestBody UmsAdminLoginParam umsAdminLoginParam); } diff --git a/mall-auth/src/main/java/com/macro/mall/auth/service/UmsMemberService.java b/mall-auth/src/main/java/com/macro/mall/auth/service/UmsMemberService.java index 70d0bdc..61624d1 100644 --- a/mall-auth/src/main/java/com/macro/mall/auth/service/UmsMemberService.java +++ b/mall-auth/src/main/java/com/macro/mall/auth/service/UmsMemberService.java @@ -1,16 +1,18 @@ package com.macro.mall.auth.service; -import com.macro.mall.common.domain.UserDto; +import com.macro.mall.common.api.CommonResult; import org.springframework.cloud.openfeign.FeignClient; -import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestParam; /** - * 前台会员服务远程调用Service - * Created by macro on 2020/7/16. + * @auther macrozheng + * @description 前台会员服务远程调用Service + * @date 2024/1/30 + * @github https://github.com/macrozheng */ @FeignClient("mall-portal") public interface UmsMemberService { - @GetMapping("/sso/loadByUsername") - UserDto loadUserByUsername(@RequestParam String username); + @PostMapping("/sso/login") + CommonResult login(@RequestParam("username") String username, @RequestParam("password") String password); } diff --git a/mall-auth/src/main/java/com/macro/mall/auth/service/impl/UserServiceImpl.java b/mall-auth/src/main/java/com/macro/mall/auth/service/impl/UserServiceImpl.java deleted file mode 100644 index 4563988..0000000 --- a/mall-auth/src/main/java/com/macro/mall/auth/service/impl/UserServiceImpl.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.macro.mall.auth.service.impl; - -import com.macro.mall.auth.domain.SecurityUser; -import com.macro.mall.auth.constant.MessageConstant; -import com.macro.mall.auth.service.UmsAdminService; -import com.macro.mall.auth.service.UmsMemberService; -import com.macro.mall.common.constant.AuthConstant; -import com.macro.mall.common.domain.UserDto; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.authentication.AccountExpiredException; -import org.springframework.security.authentication.CredentialsExpiredException; -import org.springframework.security.authentication.DisabledException; -import org.springframework.security.authentication.LockedException; -import org.springframework.security.core.userdetails.UserDetails; -import org.springframework.security.core.userdetails.UserDetailsService; -import org.springframework.security.core.userdetails.UsernameNotFoundException; -import org.springframework.stereotype.Service; - -import javax.servlet.http.HttpServletRequest; - -/** - * 用户管理业务类 - * Created by macro on 2020/6/19. - */ -@Service -public class UserServiceImpl implements UserDetailsService { - - @Autowired - private UmsAdminService adminService; - @Autowired - private UmsMemberService memberService; - @Autowired - private HttpServletRequest request; - - @Override - public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { - String clientId = request.getParameter("client_id"); - UserDto userDto; - if(AuthConstant.ADMIN_CLIENT_ID.equals(clientId)){ - userDto = adminService.loadUserByUsername(username); - }else{ - userDto = memberService.loadUserByUsername(username); - } - if (userDto==null) { - throw new UsernameNotFoundException(MessageConstant.USERNAME_PASSWORD_ERROR); - } - userDto.setClientId(clientId); - SecurityUser securityUser = new SecurityUser(userDto); - if (!securityUser.isEnabled()) { - throw new DisabledException(MessageConstant.ACCOUNT_DISABLED); - } else if (!securityUser.isAccountNonLocked()) { - throw new LockedException(MessageConstant.ACCOUNT_LOCKED); - } else if (!securityUser.isAccountNonExpired()) { - throw new AccountExpiredException(MessageConstant.ACCOUNT_EXPIRED); - } else if (!securityUser.isCredentialsNonExpired()) { - throw new CredentialsExpiredException(MessageConstant.CREDENTIALS_EXPIRED); - } - return securityUser; - } - -} diff --git a/mall-auth/src/main/resources/application.yml b/mall-auth/src/main/resources/application.yml index 8739741..ab3ca9d 100644 --- a/mall-auth/src/main/resources/application.yml +++ b/mall-auth/src/main/resources/application.yml @@ -1,4 +1,3 @@ - server: port: 8401 spring: @@ -9,13 +8,31 @@ management: endpoints: web: exposure: - include: "*" -feign: - okhttp: + include: '*' #暴露Actuator的监控端点 + endpoint: + health: + show-details: always #显示健康的详细信息 + env: + show-values: always #默认Actuator的环境变量会以****显示,这里开启显示 + configprops: + show-values: always #默认Actuator的配置属性会以****显示,这里开启显示 + info: + enabled: true +springdoc: + swagger-ui: + # 修改Swagger UI路径 + path: /swagger-ui.html + # 开启Swagger UI界面 enabled: true - client: - config: - default: - connectTimeout: 5000 - readTimeout: 5000 - loggerLevel: basic + tags-sorter: alpha + operations-sorter: alpha + show-extensions: true + api-docs: + # 修改api-docs路径 + path: /v3/api-docs + # 开启api-docs + enabled: true + group-configs: + - group: 'default' + packages-to-scan: com.macro.mall.auth.controller + default-flat-param-object: false diff --git a/mall-auth/src/main/resources/jwt.jks b/mall-auth/src/main/resources/jwt.jks deleted file mode 100644 index af359ea..0000000 Binary files a/mall-auth/src/main/resources/jwt.jks and /dev/null differ diff --git a/mall-common/pom.xml b/mall-common/pom.xml index 8bb70e4..d2fb380 100644 --- a/mall-common/pom.xml +++ b/mall-common/pom.xml @@ -36,7 +36,7 @@ com.github.xiaoymin - knife4j-micro-spring-boot-starter + knife4j-openapi3-jakarta-spring-boot-starter net.logstash.logback diff --git a/mall-common/src/main/java/com/macro/mall/common/api/CommonResult.java b/mall-common/src/main/java/com/macro/mall/common/api/CommonResult.java index 7a7192a..a9952cd 100644 --- a/mall-common/src/main/java/com/macro/mall/common/api/CommonResult.java +++ b/mall-common/src/main/java/com/macro/mall/common/api/CommonResult.java @@ -1,5 +1,7 @@ package com.macro.mall.common.api; +import cn.hutool.json.JSONUtil; + /** * 通用返回对象 * Created by macro on 2019/4/19. @@ -121,4 +123,9 @@ public class CommonResult { public void setData(T data) { this.data = data; } + + @Override + public String toString() { + return JSONUtil.toJsonStr(this); + } } diff --git a/mall-common/src/main/java/com/macro/mall/common/config/BaseSwaggerConfig.java b/mall-common/src/main/java/com/macro/mall/common/config/BaseSwaggerConfig.java deleted file mode 100644 index 9c432da..0000000 --- a/mall-common/src/main/java/com/macro/mall/common/config/BaseSwaggerConfig.java +++ /dev/null @@ -1,122 +0,0 @@ -package com.macro.mall.common.config; - -import com.macro.mall.common.domain.SwaggerProperties; -import org.springframework.beans.BeansException; -import org.springframework.beans.factory.config.BeanPostProcessor; -import org.springframework.context.annotation.Bean; -import org.springframework.util.ReflectionUtils; -import org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping; -import springfox.documentation.builders.ApiInfoBuilder; -import springfox.documentation.builders.PathSelectors; -import springfox.documentation.builders.RequestHandlerSelectors; -import springfox.documentation.service.*; -import springfox.documentation.spi.DocumentationType; -import springfox.documentation.spi.service.contexts.SecurityContext; -import springfox.documentation.spring.web.plugins.Docket; -import springfox.documentation.spring.web.plugins.WebFluxRequestHandlerProvider; -import springfox.documentation.spring.web.plugins.WebMvcRequestHandlerProvider; - -import java.lang.reflect.Field; -import java.util.ArrayList; -import java.util.List; -import java.util.stream.Collectors; - -/** - * Swagger基础配置 - * Created by macro on 2020/7/16. - */ -public abstract class BaseSwaggerConfig { - - @Bean - public Docket createRestApi() { - SwaggerProperties swaggerProperties = swaggerProperties(); - Docket docket = new Docket(DocumentationType.SWAGGER_2) - .apiInfo(apiInfo(swaggerProperties)) - .select() - .apis(RequestHandlerSelectors.basePackage(swaggerProperties.getApiBasePackage())) - .paths(PathSelectors.any()) - .build(); - if (swaggerProperties.isEnableSecurity()) { - docket.securitySchemes(securitySchemes()).securityContexts(securityContexts()); - } - return docket; - } - - private ApiInfo apiInfo(SwaggerProperties swaggerProperties) { - return new ApiInfoBuilder() - .title(swaggerProperties.getTitle()) - .description(swaggerProperties.getDescription()) - .contact(new Contact(swaggerProperties.getContactName(), swaggerProperties.getContactUrl(), swaggerProperties.getContactEmail())) - .version(swaggerProperties.getVersion()) - .build(); - } - - private List securitySchemes() { - //设置请求头信息 - List result = new ArrayList<>(); - ApiKey apiKey = new ApiKey("Authorization", "Authorization", "header"); - result.add(apiKey); - return result; - } - - private List securityContexts() { - //设置需要登录认证的路径 - List result = new ArrayList<>(); - result.add(getContextByPath("/*/.*")); - return result; - } - - private SecurityContext getContextByPath(String pathRegex) { - return SecurityContext.builder() - .securityReferences(defaultAuth()) - .forPaths(PathSelectors.regex(pathRegex)) - .build(); - } - - private List defaultAuth() { - List result = new ArrayList<>(); - AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything"); - AuthorizationScope[] authorizationScopes = new AuthorizationScope[1]; - authorizationScopes[0] = authorizationScope; - result.add(new SecurityReference("Authorization", authorizationScopes)); - return result; - } - - public BeanPostProcessor generateBeanPostProcessor() { - return new BeanPostProcessor() { - - @Override - public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { - if (bean instanceof WebMvcRequestHandlerProvider || bean instanceof WebFluxRequestHandlerProvider) { - customizeSpringfoxHandlerMappings(getHandlerMappings(bean)); - } - return bean; - } - - private void customizeSpringfoxHandlerMappings(List mappings) { - List copy = mappings.stream() - .filter(mapping -> mapping.getPatternParser() == null) - .collect(Collectors.toList()); - mappings.clear(); - mappings.addAll(copy); - } - - @SuppressWarnings("unchecked") - private List getHandlerMappings(Object bean) { - try { - Field field = ReflectionUtils.findField(bean.getClass(), "handlerMappings"); - field.setAccessible(true); - return (List) field.get(bean); - } catch (IllegalArgumentException | IllegalAccessException e) { - throw new IllegalStateException(e); - } - } - }; - } - - /** - * 自定义Swagger配置 - */ - public abstract SwaggerProperties swaggerProperties(); - -} diff --git a/mall-common/src/main/java/com/macro/mall/common/constant/AuthConstant.java b/mall-common/src/main/java/com/macro/mall/common/constant/AuthConstant.java index 34ed033..4c9892c 100644 --- a/mall-common/src/main/java/com/macro/mall/common/constant/AuthConstant.java +++ b/mall-common/src/main/java/com/macro/mall/common/constant/AuthConstant.java @@ -32,9 +32,9 @@ public interface AuthConstant { String ADMIN_URL_PATTERN = "/mall-admin/**"; /** - * Redis缓存权限规则key + * Redis缓存权限规则(路径->资源) */ - String RESOURCE_ROLES_MAP_KEY = "auth:resourceRolesMap"; + String PATH_RESOURCE_MAP = "auth:pathResourceMap"; /** * 认证信息Http请求头 @@ -51,4 +51,14 @@ public interface AuthConstant { */ String USER_TOKEN_HEADER = "user"; + /** + * sa-token session中存储的会员信息 + */ + String STP_MEMBER_INFO = "memberInfo"; + + /** + * sa-token session中存储的后台管理员信息 + */ + String STP_ADMIN_INFO = "adminInfo"; + } diff --git a/mall-common/src/main/java/com/macro/mall/common/domain/SwaggerProperties.java b/mall-common/src/main/java/com/macro/mall/common/domain/SwaggerProperties.java deleted file mode 100644 index 4043805..0000000 --- a/mall-common/src/main/java/com/macro/mall/common/domain/SwaggerProperties.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.macro.mall.common.domain; - -import lombok.Builder; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * Swagger自定义配置 - * Created by macro on 2020/7/16. - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Builder -public class SwaggerProperties { - /** - * API文档生成基础路径 - */ - private String apiBasePackage; - /** - * 是否要启用登录认证 - */ - private boolean enableSecurity; - /** - * 文档标题 - */ - private String title; - /** - * 文档描述 - */ - private String description; - /** - * 文档版本 - */ - private String version; - /** - * 文档联系人姓名 - */ - private String contactName; - /** - * 文档联系人网址 - */ - private String contactUrl; - /** - * 文档联系人邮箱 - */ - private String contactEmail; -} diff --git a/mall-common/src/main/java/com/macro/mall/common/domain/UserDto.java b/mall-common/src/main/java/com/macro/mall/common/domain/UserDto.java deleted file mode 100644 index ce2a718..0000000 --- a/mall-common/src/main/java/com/macro/mall/common/domain/UserDto.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.macro.mall.common.domain; - -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.NoArgsConstructor; - -import java.util.List; - -/** - * 登录用户信息 - * Created by macro on 2020/6/19. - */ -@Data -@EqualsAndHashCode(callSuper = false) -@NoArgsConstructor -public class UserDto { - private Long id; - private String username; - private String password; - private Integer status; - private String clientId; - private List roles; - -} diff --git a/mall-common/src/main/java/com/macro/mall/common/dto/UserDto.java b/mall-common/src/main/java/com/macro/mall/common/dto/UserDto.java new file mode 100644 index 0000000..85bafbd --- /dev/null +++ b/mall-common/src/main/java/com/macro/mall/common/dto/UserDto.java @@ -0,0 +1,23 @@ +package com.macro.mall.common.dto; + +import lombok.*; + +import java.util.List; + +/** + * @auther macrozheng + * @description 权限框架中使用的用户信息封装类 + * @date 2024/1/30 + * @github https://github.com/macrozheng + */ +@Data +@EqualsAndHashCode(callSuper = false) +@NoArgsConstructor +@AllArgsConstructor +@Builder +public class UserDto { + private Long id; + private String username; + private String clientId; + private List permissionList; +} diff --git a/mall-common/src/main/java/com/macro/mall/common/log/WebLogAspect.java b/mall-common/src/main/java/com/macro/mall/common/log/WebLogAspect.java index fb99c70..a198e2e 100644 --- a/mall-common/src/main/java/com/macro/mall/common/log/WebLogAspect.java +++ b/mall-common/src/main/java/com/macro/mall/common/log/WebLogAspect.java @@ -4,7 +4,7 @@ import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.URLUtil; import cn.hutool.json.JSONUtil; import com.macro.mall.common.domain.WebLog; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.Operation; import net.logstash.logback.marker.Markers; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.ProceedingJoinPoint; @@ -21,7 +21,7 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.lang.reflect.Method; import java.lang.reflect.Parameter; import java.util.ArrayList; @@ -63,9 +63,9 @@ public class WebLogAspect { Signature signature = joinPoint.getSignature(); MethodSignature methodSignature = (MethodSignature) signature; Method method = methodSignature.getMethod(); - if (method.isAnnotationPresent(ApiOperation.class)) { - ApiOperation log = method.getAnnotation(ApiOperation.class); - webLog.setDescription(log.value()); + if (method.isAnnotationPresent(Operation.class)) { + Operation log = method.getAnnotation(Operation.class); + webLog.setDescription(log.summary()); } long endTime = System.currentTimeMillis(); String urlStr = request.getRequestURL().toString(); diff --git a/mall-common/src/main/resources/logback-spring.xml b/mall-common/src/main/resources/logback-spring.xml index 51ef9da..08aaa42 100644 --- a/mall-common/src/main/resources/logback-spring.xml +++ b/mall-common/src/main/resources/logback-spring.xml @@ -11,7 +11,10 @@ - + + + + @@ -64,6 +67,7 @@ DEBUG ${LOG_STASH_HOST}:4560 + ${ENABLE_INNER_LOG} @@ -86,12 +90,6 @@ - - - - 5 minutes - - @@ -102,6 +100,7 @@ DENY ${LOG_STASH_HOST}:4561 + ${ENABLE_INNER_LOG} @@ -124,17 +123,12 @@ - - - - 5 minutes - - ${LOG_STASH_HOST}:4562 + ${ENABLE_INNER_LOG} @@ -157,17 +151,12 @@ - - - - 5 minutes - - ${LOG_STASH_HOST}:4563 + ${ENABLE_INNER_LOG} @@ -187,12 +176,6 @@ - - - - 5 minutes - - diff --git a/mall-demo/pom.xml b/mall-demo/pom.xml index 5502910..fd4e009 100644 --- a/mall-demo/pom.xml +++ b/mall-demo/pom.xml @@ -29,10 +29,6 @@ org.springframework.cloud spring-cloud-starter-openfeign - - io.github.openfeign - feign-okhttp - com.alibaba.cloud spring-cloud-starter-alibaba-nacos-discovery @@ -41,6 +37,10 @@ com.alibaba.cloud spring-cloud-starter-alibaba-nacos-config + + de.codecentric + spring-boot-admin-starter-client + diff --git a/mall-demo/src/main/java/com/macro/mall/demo/component/FeignRequestInterceptor.java b/mall-demo/src/main/java/com/macro/mall/demo/component/FeignRequestInterceptor.java index c409d82..a0d6b7a 100644 --- a/mall-demo/src/main/java/com/macro/mall/demo/component/FeignRequestInterceptor.java +++ b/mall-demo/src/main/java/com/macro/mall/demo/component/FeignRequestInterceptor.java @@ -1,14 +1,11 @@ package com.macro.mall.demo.component; -import cn.hutool.core.util.StrUtil; -import cn.hutool.json.JSONObject; -import cn.hutool.json.JSONUtil; import feign.RequestInterceptor; import feign.RequestTemplate; +import jakarta.servlet.http.HttpServletRequest; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; -import javax.servlet.http.HttpServletRequest; import java.util.Enumeration; /** @@ -23,16 +20,15 @@ public class FeignRequestInterceptor implements RequestInterceptor { if (attributes != null) { HttpServletRequest request = attributes.getRequest(); Enumeration headerNames = request.getHeaderNames(); + //在调用需要认证请求的内部接口时,需要获取原认证头并设置到requestTemplate中去 if (headerNames != null) { while (headerNames.hasMoreElements()) { String name = headerNames.nextElement(); - String values = request.getHeader(name); - //请求头的值为JSON格式时有截断问题 - if("user".equals(name)&&StrUtil.isNotEmpty(values)){ - JSONObject jsonObject = JSONUtil.parseObj(values); - String id = jsonObject.getStr("id"); - values = JSONUtil.createObj().putOnce("id",id).toString(); + //传递content-length头会导致java.io.IOException: Incomplete output stream问题 + if ("content-length".equalsIgnoreCase(name)) { + continue; } + String values = request.getHeader(name); requestTemplate.header(name, values); } } diff --git a/mall-demo/src/main/java/com/macro/mall/demo/config/SpringDocConfig.java b/mall-demo/src/main/java/com/macro/mall/demo/config/SpringDocConfig.java new file mode 100644 index 0000000..346deab --- /dev/null +++ b/mall-demo/src/main/java/com/macro/mall/demo/config/SpringDocConfig.java @@ -0,0 +1,68 @@ +package com.macro.mall.demo.config; + +import io.swagger.v3.oas.models.Components; +import io.swagger.v3.oas.models.ExternalDocumentation; +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.info.Info; +import io.swagger.v3.oas.models.info.License; +import io.swagger.v3.oas.models.security.SecurityRequirement; +import io.swagger.v3.oas.models.security.SecurityScheme; +import org.springdoc.core.customizers.GlobalOpenApiCustomizer; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +/** + * SpringDoc相关配置 + * Created by macro on 2024/3/5. + */ +@Configuration +public class SpringDocConfig implements WebMvcConfigurer { + + private static final String SECURITY_SCHEME_NAME = "Authorization"; + + @Bean + public OpenAPI mallAdminOpenAPI() { + return new OpenAPI() + .info(new Info().title("mall-demo系统") + .description("SpringBoot版本中的一些示例") + .version("v1.0.0") + .license(new License().name("Apache 2.0") + .url("https://github.com/macrozheng/mall-learning"))) + .externalDocs(new ExternalDocumentation() + .description("SpringBoot实战电商项目mall(60K+Star)全套文档") + .url("http://www.macrozheng.com")) + .addSecurityItem(new SecurityRequirement().addList(SECURITY_SCHEME_NAME)) + .components(new Components() + .addSecuritySchemes(SECURITY_SCHEME_NAME, + new SecurityScheme() + .name(SECURITY_SCHEME_NAME) + .type(SecurityScheme.Type.HTTP) + .scheme("bearer") + .bearerFormat("JWT"))); + } + + @Override + public void addViewControllers(ViewControllerRegistry registry) { + //配置访问`/swagger-ui/`路径时可以直接跳转到`/swagger-ui/index.html` + registry.addViewController("/swagger-ui/").setViewName("redirect:/swagger-ui/index.html"); + } + + @Bean + public GlobalOpenApiCustomizer orderGlobalOpenApiCustomizer() { + //解决Knife4j配置认证后无法自动添加认证头的问题 + return openApi -> { + //全局添加鉴权参数 + if (openApi.getPaths() != null) { + openApi.getPaths().forEach((s, pathItem) -> { + pathItem.readOperations().forEach(operation -> { + operation.addSecurityItem(new SecurityRequirement().addList(SECURITY_SCHEME_NAME)); + }); + }); + } + }; + } + +} + diff --git a/mall-demo/src/main/java/com/macro/mall/demo/config/SwaggerConfig.java b/mall-demo/src/main/java/com/macro/mall/demo/config/SwaggerConfig.java deleted file mode 100644 index 9794969..0000000 --- a/mall-demo/src/main/java/com/macro/mall/demo/config/SwaggerConfig.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.macro.mall.demo.config; - -import com.macro.mall.common.config.BaseSwaggerConfig; -import com.macro.mall.common.domain.SwaggerProperties; -import org.springframework.beans.factory.config.BeanPostProcessor; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import springfox.documentation.swagger2.annotations.EnableSwagger2; - -/** - * Swagger API文档相关配置 - * Created by macro on 2019/4/8. - */ -@Configuration -@EnableSwagger2 -public class SwaggerConfig extends BaseSwaggerConfig { - - @Override - public SwaggerProperties swaggerProperties() { - return SwaggerProperties.builder() - .apiBasePackage("com.macro.mall.demo.controller") - .title("mall-demo系统") - .description("SpringCloud版本中的一些示例") - .contactName("macro") - .version("1.0") - .enableSecurity(true) - .build(); - } - - @Bean - public BeanPostProcessor springfoxHandlerProviderBeanPostProcessor() { - return generateBeanPostProcessor(); - } - -} diff --git a/mall-demo/src/main/java/com/macro/mall/demo/controller/DemoController.java b/mall-demo/src/main/java/com/macro/mall/demo/controller/DemoController.java index 52793d2..ea47132 100644 --- a/mall-demo/src/main/java/com/macro/mall/demo/controller/DemoController.java +++ b/mall-demo/src/main/java/com/macro/mall/demo/controller/DemoController.java @@ -5,8 +5,8 @@ import com.macro.mall.common.api.CommonResult; import com.macro.mall.demo.dto.PmsBrandDto; import com.macro.mall.demo.service.DemoService; import com.macro.mall.model.PmsBrand; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -19,7 +19,7 @@ import java.util.List; /** * 商品管理示例Controller */ -@Api(tags = "DemoController", description = "商品管理示例接口") +@Tag(name = "DemoController", description = "商品管理示例接口") @Controller public class DemoController { @Autowired @@ -27,14 +27,14 @@ public class DemoController { private static final Logger LOGGER = LoggerFactory.getLogger(DemoController.class); - @ApiOperation(value = "获取全部品牌列表") + @Operation(summary = "获取全部品牌列表") @RequestMapping(value = "/brand/listAll", method = RequestMethod.GET) @ResponseBody public CommonResult> getBrandList() { return CommonResult.success(demoService.listAllBrand()); } - @ApiOperation(value = "添加品牌") + @Operation(summary = "添加品牌") @RequestMapping(value = "/brand/create", method = RequestMethod.POST) @ResponseBody public CommonResult createBrand(@Validated @RequestBody PmsBrandDto pmsBrand) { @@ -50,7 +50,7 @@ public class DemoController { return commonResult; } - @ApiOperation(value = "更新品牌") + @Operation(summary = "更新品牌") @RequestMapping(value = "/brand/update/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult updateBrand(@PathVariable("id") Long id, @Validated @RequestBody PmsBrandDto pmsBrandDto) { @@ -66,7 +66,7 @@ public class DemoController { return commonResult; } - @ApiOperation(value = "删除品牌") + @Operation(summary = "删除品牌") @RequestMapping(value = "/brand/delete/{id}", method = RequestMethod.GET) @ResponseBody public CommonResult deleteBrand(@PathVariable("id") Long id) { @@ -80,7 +80,7 @@ public class DemoController { } } - @ApiOperation(value = "分页获取品牌列表") + @Operation(summary = "分页获取品牌列表") @RequestMapping(value = "/brand/list", method = RequestMethod.GET) @ResponseBody public CommonResult> listBrand(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, @@ -89,7 +89,7 @@ public class DemoController { return CommonResult.success(CommonPage.restPage(brandList)); } - @ApiOperation(value = "根据编号查询品牌信息") + @Operation(summary = "根据编号查询品牌信息") @RequestMapping(value = "/brand/{id}", method = RequestMethod.GET) @ResponseBody public CommonResult brand(@PathVariable("id") Long id) { diff --git a/mall-demo/src/main/java/com/macro/mall/demo/controller/FeignAdminController.java b/mall-demo/src/main/java/com/macro/mall/demo/controller/FeignAdminController.java index 90595b7..c2a3e77 100644 --- a/mall-demo/src/main/java/com/macro/mall/demo/controller/FeignAdminController.java +++ b/mall-demo/src/main/java/com/macro/mall/demo/controller/FeignAdminController.java @@ -7,25 +7,29 @@ package com.macro.mall.demo.controller; import com.macro.mall.common.api.CommonResult; import com.macro.mall.demo.dto.UmsAdminLoginParam; import com.macro.mall.demo.service.FeignAdminService; -import io.swagger.annotations.Api; + +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.*; /** * Feign调用mall-admin接口示例 */ -@Api(tags = "FeignAdminController", description = "Feign调用mall-admin接口示例") +@Tag(name = "FeignAdminController", description = "Feign调用mall-admin接口示例") @RestController @RequestMapping("/feign/admin") public class FeignAdminController { @Autowired private FeignAdminService adminService; + @Operation(summary = "后台管理员登录") @PostMapping("/login") public CommonResult login(@RequestBody UmsAdminLoginParam loginParam) { return adminService.login(loginParam); } + @Operation(summary = "获取商品列表") @GetMapping("/getBrandList") public CommonResult getBrandList(){ return adminService.getList(); diff --git a/mall-demo/src/main/java/com/macro/mall/demo/controller/FeignPortalController.java b/mall-demo/src/main/java/com/macro/mall/demo/controller/FeignPortalController.java index 783982e..a278c92 100644 --- a/mall-demo/src/main/java/com/macro/mall/demo/controller/FeignPortalController.java +++ b/mall-demo/src/main/java/com/macro/mall/demo/controller/FeignPortalController.java @@ -2,7 +2,9 @@ package com.macro.mall.demo.controller; import com.macro.mall.common.api.CommonResult; import com.macro.mall.demo.service.FeignPortalService; -import io.swagger.annotations.Api; + +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.*; @@ -10,7 +12,7 @@ import org.springframework.web.bind.annotation.*; * Feign调用mall-portal接口示例 * Created by macro on 2019/10/18. */ -@Api(tags = "FeignPortalController", description = "Feign调用mall-portal接口示例") +@Tag(name = "FeignPortalController", description = "Feign调用mall-portal接口示例") @RestController @RequestMapping("/feign/portal") public class FeignPortalController { @@ -18,11 +20,13 @@ public class FeignPortalController { @Autowired private FeignPortalService portalService; + @Operation(summary = "前台会员列表登录") @PostMapping("/login") public CommonResult login(@RequestParam String username, @RequestParam String password) { return portalService.login(username,password); } + @Operation(summary = "获取购物车列表") @GetMapping("/cartList") public CommonResult cartList() { return portalService.list(); diff --git a/mall-demo/src/main/java/com/macro/mall/demo/controller/FeignSearchController.java b/mall-demo/src/main/java/com/macro/mall/demo/controller/FeignSearchController.java index a7b9655..abf4d1d 100644 --- a/mall-demo/src/main/java/com/macro/mall/demo/controller/FeignSearchController.java +++ b/mall-demo/src/main/java/com/macro/mall/demo/controller/FeignSearchController.java @@ -2,8 +2,8 @@ package com.macro.mall.demo.controller; import com.macro.mall.common.api.CommonResult; import com.macro.mall.demo.service.FeignSearchService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; +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.*; @@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.*; * Feign调用mall-search接口示例 * Created by macro on 2019/10/22. */ -@Api(tags = "FeignSearchController", description = "Feign调用mall-search接口示例") +@Tag(name = "FeignSearchController", description = "Feign调用mall-search接口示例") @RestController @RequestMapping("/feign/search") public class FeignSearchController { @@ -19,7 +19,7 @@ public class FeignSearchController { @Autowired private FeignSearchService feignSearchService; - @ApiOperation(value = "简单商品搜索") + @Operation(summary = "简单商品搜索") @RequestMapping(value = "/justSearch", method = RequestMethod.GET) @ResponseBody public CommonResult search(@RequestParam(required = false) String keyword, diff --git a/mall-demo/src/main/java/com/macro/mall/demo/dto/PmsBrandDto.java b/mall-demo/src/main/java/com/macro/mall/demo/dto/PmsBrandDto.java index 933c2c1..2291ee6 100644 --- a/mall-demo/src/main/java/com/macro/mall/demo/dto/PmsBrandDto.java +++ b/mall-demo/src/main/java/com/macro/mall/demo/dto/PmsBrandDto.java @@ -1,37 +1,34 @@ package com.macro.mall.demo.dto; import com.macro.mall.demo.validator.FlagValidator; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; - -import javax.validation.constraints.Min; -import javax.validation.constraints.NotNull; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.Min; +import jakarta.validation.constraints.NotNull; /** * 品牌传递参数 */ -@ApiModel(value = "PmsBrandDto") public class PmsBrandDto { - @ApiModelProperty(value = "品牌名称",required = true) + @Schema(title = "品牌名称",required = true) @NotNull(message = "名称不能为空") private String name; - @ApiModelProperty(value = "品牌首字母",required = true) + @Schema(title = "品牌首字母",required = true) @NotNull(message = "首字母不能为空") private String firstLetter; - @ApiModelProperty(value = "排序字段") + @Schema(title = "排序字段") @Min(value = 0, message = "排序最小为0") private Integer sort; - @ApiModelProperty(value = "是否为厂家制造商") + @Schema(title = "是否为厂家制造商") @FlagValidator(value = {"0","1"}, message = "厂家状态不正确") private Integer factoryStatus; - @ApiModelProperty(value = "是否进行显示") + @Schema(title = "是否进行显示") @FlagValidator(value = {"0","1"}, message = "显示状态不正确") private Integer showStatus; - @ApiModelProperty(value = "品牌logo") + @Schema(title = "品牌logo") private String logo; - @ApiModelProperty(value = "品牌大图") + @Schema(title = "品牌大图") private String bigPic; - @ApiModelProperty(value = "品牌故事") + @Schema(title = "品牌故事") private String brandStory; public String getName() { diff --git a/mall-demo/src/main/java/com/macro/mall/demo/dto/UmsAdminLoginParam.java b/mall-demo/src/main/java/com/macro/mall/demo/dto/UmsAdminLoginParam.java index fbeb561..39f0092 100644 --- a/mall-demo/src/main/java/com/macro/mall/demo/dto/UmsAdminLoginParam.java +++ b/mall-demo/src/main/java/com/macro/mall/demo/dto/UmsAdminLoginParam.java @@ -1,6 +1,6 @@ package com.macro.mall.demo.dto; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Getter; import lombok.Setter; @@ -11,8 +11,8 @@ import lombok.Setter; @Getter @Setter public class UmsAdminLoginParam { - @ApiModelProperty(value = "用户名", required = true) + @Schema(title = "用户名", required = true) private String username; - @ApiModelProperty(value = "密码", required = true) + @Schema(title = "密码", required = true) private String password; } diff --git a/mall-demo/src/main/java/com/macro/mall/demo/validator/FlagValidator.java b/mall-demo/src/main/java/com/macro/mall/demo/validator/FlagValidator.java index b9bdaed..65448af 100644 --- a/mall-demo/src/main/java/com/macro/mall/demo/validator/FlagValidator.java +++ b/mall-demo/src/main/java/com/macro/mall/demo/validator/FlagValidator.java @@ -1,7 +1,7 @@ package com.macro.mall.demo.validator; -import javax.validation.Constraint; -import javax.validation.Payload; +import jakarta.validation.Constraint; +import jakarta.validation.Payload; import java.lang.annotation.*; /** diff --git a/mall-demo/src/main/java/com/macro/mall/demo/validator/FlagValidatorClass.java b/mall-demo/src/main/java/com/macro/mall/demo/validator/FlagValidatorClass.java index 885d9b1..09c4919 100644 --- a/mall-demo/src/main/java/com/macro/mall/demo/validator/FlagValidatorClass.java +++ b/mall-demo/src/main/java/com/macro/mall/demo/validator/FlagValidatorClass.java @@ -1,7 +1,7 @@ package com.macro.mall.demo.validator; -import javax.validation.ConstraintValidator; -import javax.validation.ConstraintValidatorContext; +import jakarta.validation.ConstraintValidator; +import jakarta.validation.ConstraintValidatorContext; /** * 状态标记校验器 diff --git a/mall-demo/src/main/resources/application.yml b/mall-demo/src/main/resources/application.yml index 6d23634..64b720e 100644 --- a/mall-demo/src/main/resources/application.yml +++ b/mall-demo/src/main/resources/application.yml @@ -12,14 +12,33 @@ mybatis: mapper-locations: - classpath:mapper/*.xml - classpath*:com/**/mapper/*.xml -management: #开启SpringBoot Admin的监控 +management: endpoints: web: exposure: - include: '*' + include: '*' #暴露Actuator的监控端点 endpoint: health: - show-details: always -feign: - okhttp: + show-details: always #显示健康的详细信息 + env: + show-values: always #默认Actuator的环境变量会以****显示,这里开启显示 + configprops: + show-values: always #默认Actuator的配置属性会以****显示,这里开启显示 + info: + enabled: true +springdoc: + swagger-ui: + # 修改Swagger UI路径 + path: /swagger-ui.html + # 开启Swagger UI界面 enabled: true + # 用于配置tag和operation的展开方式,这里配置为都不展开 + doc-expansion: 'none' + api-docs: + # 修改api-docs路径 + path: /v3/api-docs + # 开启api-docs + enabled: true + group-configs: + - group: 'mall-demo' + packages-to-scan: com.macro.mall.demo.controller diff --git a/mall-gateway/pom.xml b/mall-gateway/pom.xml index d51bdb5..b7be788 100644 --- a/mall-gateway/pom.xml +++ b/mall-gateway/pom.xml @@ -24,8 +24,8 @@ spring-boot-starter-web - com.github.xiaoymin - knife4j-micro-spring-boot-starter + org.springframework.boot + spring-boot-starter-data-redis @@ -43,32 +43,32 @@ com.github.xiaoymin - knife4j-spring-boot-starter - - - org.springframework.security - spring-security-config - - - org.springframework.security - spring-security-oauth2-resource-server - - - org.springframework.security - spring-security-oauth2-client - - - org.springframework.security - spring-security-oauth2-jose - - - com.nimbusds - nimbus-jose-jwt + knife4j-gateway-spring-boot-starter org.springframework.boot spring-boot-starter-data-redis + + cn.dev33 + sa-token-reactor-spring-boot3-starter + + + cn.dev33 + sa-token-redis-jackson + + + org.apache.commons + commons-pool2 + + + cn.dev33 + sa-token-jwt + + + de.codecentric + spring-boot-admin-starter-client + diff --git a/mall-gateway/src/main/java/com/macro/mall/authorization/AuthorizationManager.java b/mall-gateway/src/main/java/com/macro/mall/authorization/AuthorizationManager.java deleted file mode 100644 index 423ab49..0000000 --- a/mall-gateway/src/main/java/com/macro/mall/authorization/AuthorizationManager.java +++ /dev/null @@ -1,104 +0,0 @@ -package com.macro.mall.authorization; - -import cn.hutool.core.convert.Convert; -import cn.hutool.core.util.StrUtil; -import cn.hutool.json.JSONUtil; -import com.macro.mall.common.constant.AuthConstant; -import com.macro.mall.common.domain.UserDto; -import com.macro.mall.config.IgnoreUrlsConfig; -import com.nimbusds.jose.JWSObject; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.data.redis.core.RedisTemplate; -import org.springframework.http.HttpMethod; -import org.springframework.http.server.reactive.ServerHttpRequest; -import org.springframework.security.authorization.AuthorizationDecision; -import org.springframework.security.authorization.ReactiveAuthorizationManager; -import org.springframework.security.core.Authentication; -import org.springframework.security.core.GrantedAuthority; -import org.springframework.security.web.server.authorization.AuthorizationContext; -import org.springframework.stereotype.Component; -import org.springframework.util.AntPathMatcher; -import org.springframework.util.PathMatcher; -import reactor.core.publisher.Mono; - -import java.net.URI; -import java.text.ParseException; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; - -/** - * 鉴权管理器,用于判断是否有资源的访问权限 - * Created by macro on 2020/6/19. - */ -@Component -public class AuthorizationManager implements ReactiveAuthorizationManager { - @Autowired - private RedisTemplate redisTemplate; - @Autowired - private IgnoreUrlsConfig ignoreUrlsConfig; - - @Override - public Mono check(Mono mono, AuthorizationContext authorizationContext) { - ServerHttpRequest request = authorizationContext.getExchange().getRequest(); - URI uri = request.getURI(); - PathMatcher pathMatcher = new AntPathMatcher(); - //白名单路径直接放行 - List ignoreUrls = ignoreUrlsConfig.getUrls(); - for (String ignoreUrl : ignoreUrls) { - if (pathMatcher.match(ignoreUrl, uri.getPath())) { - return Mono.just(new AuthorizationDecision(true)); - } - } - //对应跨域的预检请求直接放行 - if(request.getMethod()==HttpMethod.OPTIONS){ - return Mono.just(new AuthorizationDecision(true)); - } - //不同用户体系登录不允许互相访问 - try { - String token = request.getHeaders().getFirst(AuthConstant.JWT_TOKEN_HEADER); - if(StrUtil.isEmpty(token)){ - return Mono.just(new AuthorizationDecision(false)); - } - String realToken = token.replace(AuthConstant.JWT_TOKEN_PREFIX, ""); - JWSObject jwsObject = JWSObject.parse(realToken); - String userStr = jwsObject.getPayload().toString(); - UserDto userDto = JSONUtil.toBean(userStr, UserDto.class); - if (AuthConstant.ADMIN_CLIENT_ID.equals(userDto.getClientId()) && !pathMatcher.match(AuthConstant.ADMIN_URL_PATTERN, uri.getPath())) { - return Mono.just(new AuthorizationDecision(false)); - } - if (AuthConstant.PORTAL_CLIENT_ID.equals(userDto.getClientId()) && pathMatcher.match(AuthConstant.ADMIN_URL_PATTERN, uri.getPath())) { - return Mono.just(new AuthorizationDecision(false)); - } - } catch (ParseException e) { - e.printStackTrace(); - return Mono.just(new AuthorizationDecision(false)); - } - //非管理端路径直接放行 - if (!pathMatcher.match(AuthConstant.ADMIN_URL_PATTERN, uri.getPath())) { - return Mono.just(new AuthorizationDecision(true)); - } - //管理端路径需校验权限 - Map resourceRolesMap = redisTemplate.opsForHash().entries(AuthConstant.RESOURCE_ROLES_MAP_KEY); - Iterator iterator = resourceRolesMap.keySet().iterator(); - List authorities = new ArrayList<>(); - while (iterator.hasNext()) { - String pattern = (String) iterator.next(); - if (pathMatcher.match(pattern, uri.getPath())) { - authorities.addAll(Convert.toList(String.class, resourceRolesMap.get(pattern))); - } - } - authorities = authorities.stream().map(i -> i = AuthConstant.AUTHORITY_PREFIX + i).collect(Collectors.toList()); - //认证通过且角色匹配的用户可访问当前路径 - return mono - .filter(Authentication::isAuthenticated) - .flatMapIterable(Authentication::getAuthorities) - .map(GrantedAuthority::getAuthority) - .any(authorities::contains) - .map(AuthorizationDecision::new) - .defaultIfEmpty(new AuthorizationDecision(false)); - } - -} diff --git a/mall-gateway/src/main/java/com/macro/mall/component/RestAuthenticationEntryPoint.java b/mall-gateway/src/main/java/com/macro/mall/component/RestAuthenticationEntryPoint.java deleted file mode 100644 index 7011db7..0000000 --- a/mall-gateway/src/main/java/com/macro/mall/component/RestAuthenticationEntryPoint.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.macro.mall.component; - -import cn.hutool.json.JSONUtil; -import com.macro.mall.common.api.CommonResult; -import org.springframework.core.io.buffer.DataBuffer; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.server.reactive.ServerHttpResponse; -import org.springframework.security.core.AuthenticationException; -import org.springframework.security.web.server.ServerAuthenticationEntryPoint; -import org.springframework.stereotype.Component; -import org.springframework.web.server.ServerWebExchange; -import reactor.core.publisher.Mono; - -import java.nio.charset.Charset; - -/** - * 自定义未登录或者token失效时的返回结果 - * Created by macro on 2020/6/18. - */ -@Component -public class RestAuthenticationEntryPoint implements ServerAuthenticationEntryPoint { - @Override - public Mono commence(ServerWebExchange exchange, AuthenticationException e) { - ServerHttpResponse response = exchange.getResponse(); - response.setStatusCode(HttpStatus.OK); - response.getHeaders().set(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE); - response.getHeaders().set("Access-Control-Allow-Origin","*"); - response.getHeaders().set("Cache-Control","no-cache"); - String body= JSONUtil.toJsonStr(CommonResult.unauthorized(e.getMessage())); - DataBuffer buffer = response.bufferFactory().wrap(body.getBytes(Charset.forName("UTF-8"))); - return response.writeWith(Mono.just(buffer)); - } -} diff --git a/mall-gateway/src/main/java/com/macro/mall/component/RestfulAccessDeniedHandler.java b/mall-gateway/src/main/java/com/macro/mall/component/RestfulAccessDeniedHandler.java deleted file mode 100644 index f91e430..0000000 --- a/mall-gateway/src/main/java/com/macro/mall/component/RestfulAccessDeniedHandler.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.macro.mall.component; - -import cn.hutool.json.JSONUtil; -import com.macro.mall.common.api.CommonResult; -import org.springframework.core.io.buffer.DataBuffer; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.server.reactive.ServerHttpResponse; -import org.springframework.security.access.AccessDeniedException; -import org.springframework.security.web.server.authorization.ServerAccessDeniedHandler; -import org.springframework.stereotype.Component; -import org.springframework.web.server.ServerWebExchange; -import reactor.core.publisher.Mono; - -import java.nio.charset.Charset; - - -/** - * 自定义无权限访问的返回结果 - * Created by macro on 2018/4/26. - */ -@Component -public class RestfulAccessDeniedHandler implements ServerAccessDeniedHandler { - @Override - public Mono handle(ServerWebExchange exchange, AccessDeniedException denied) { - ServerHttpResponse response = exchange.getResponse(); - response.setStatusCode(HttpStatus.OK); - response.getHeaders().set(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE); - response.getHeaders().set("Access-Control-Allow-Origin","*"); - response.getHeaders().set("Cache-Control","no-cache"); - String body= JSONUtil.toJsonStr(CommonResult.forbidden(denied.getMessage())); - DataBuffer buffer = response.bufferFactory().wrap(body.getBytes(Charset.forName("UTF-8"))); - return response.writeWith(Mono.just(buffer)); - } -} diff --git a/mall-gateway/src/main/java/com/macro/mall/component/StpInterfaceImpl.java b/mall-gateway/src/main/java/com/macro/mall/component/StpInterfaceImpl.java new file mode 100644 index 0000000..b7fd302 --- /dev/null +++ b/mall-gateway/src/main/java/com/macro/mall/component/StpInterfaceImpl.java @@ -0,0 +1,40 @@ +package com.macro.mall.component; + +import cn.dev33.satoken.stp.StpInterface; +import cn.dev33.satoken.stp.StpUtil; +import com.macro.mall.common.constant.AuthConstant; +import com.macro.mall.common.dto.UserDto; +import org.springframework.stereotype.Component; + +import java.util.List; + +/** + * @auther macrozheng + * @description 自定义权限验证接口扩展 + * @date 2024/1/25 + * @github https://github.com/macrozheng + */ +@Component +public class StpInterfaceImpl implements StpInterface { + + @Override + public List getPermissionList(Object loginId, String loginType) { + // 返回此loginId拥有的权限码列表 + if(StpUtil.getLoginType().equals(loginType)){ + //后台用户需返回 + UserDto userdto = (UserDto) StpUtil.getSession().get(AuthConstant.STP_ADMIN_INFO); + return userdto.getPermissionList(); + }else{ + //前台用户无需返回 + return null; + } + } + + @Override + public List getRoleList(Object loginId, String loginType) { + // 返回此 loginId 拥有的角色码列表 + return null; + } + +} + diff --git a/mall-gateway/src/main/java/com/macro/mall/config/RedisConfig.java b/mall-gateway/src/main/java/com/macro/mall/config/RedisConfig.java index 90bba12..0ef0162 100644 --- a/mall-gateway/src/main/java/com/macro/mall/config/RedisConfig.java +++ b/mall-gateway/src/main/java/com/macro/mall/config/RedisConfig.java @@ -1,13 +1,7 @@ package com.macro.mall.config; import com.macro.mall.common.config.BaseRedisConfig; -import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.data.redis.connection.RedisConnectionFactory; -import org.springframework.data.redis.core.RedisTemplate; -import org.springframework.data.redis.repository.configuration.EnableRedisRepositories; -import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer; -import org.springframework.data.redis.serializer.StringRedisSerializer; /** * Redis相关配置 diff --git a/mall-gateway/src/main/java/com/macro/mall/config/ResourceServerConfig.java b/mall-gateway/src/main/java/com/macro/mall/config/ResourceServerConfig.java deleted file mode 100644 index bba28b5..0000000 --- a/mall-gateway/src/main/java/com/macro/mall/config/ResourceServerConfig.java +++ /dev/null @@ -1,66 +0,0 @@ -package com.macro.mall.config; - -import cn.hutool.core.util.ArrayUtil; -import com.macro.mall.authorization.AuthorizationManager; -import com.macro.mall.common.constant.AuthConstant; -import com.macro.mall.component.RestAuthenticationEntryPoint; -import com.macro.mall.component.RestfulAccessDeniedHandler; -import com.macro.mall.filter.IgnoreUrlsRemoveJwtFilter; -import lombok.AllArgsConstructor; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.core.convert.converter.Converter; -import org.springframework.security.authentication.AbstractAuthenticationToken; -import org.springframework.security.config.annotation.web.reactive.EnableWebFluxSecurity; -import org.springframework.security.config.web.server.SecurityWebFiltersOrder; -import org.springframework.security.config.web.server.ServerHttpSecurity; -import org.springframework.security.oauth2.jwt.Jwt; -import org.springframework.security.oauth2.server.resource.authentication.JwtAuthenticationConverter; -import org.springframework.security.oauth2.server.resource.authentication.JwtGrantedAuthoritiesConverter; -import org.springframework.security.oauth2.server.resource.authentication.ReactiveJwtAuthenticationConverterAdapter; -import org.springframework.security.web.server.SecurityWebFilterChain; -import reactor.core.publisher.Mono; - -/** - * 资源服务器配置 - * Created by macro on 2020/6/19. - */ -@AllArgsConstructor -@Configuration -@EnableWebFluxSecurity -public class ResourceServerConfig { - private final AuthorizationManager authorizationManager; - private final IgnoreUrlsConfig ignoreUrlsConfig; - private final RestfulAccessDeniedHandler restfulAccessDeniedHandler; - private final RestAuthenticationEntryPoint restAuthenticationEntryPoint; - private final IgnoreUrlsRemoveJwtFilter ignoreUrlsRemoveJwtFilter; - - @Bean - public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { - http.oauth2ResourceServer().jwt() - .jwtAuthenticationConverter(jwtAuthenticationConverter()); - //自定义处理JWT请求头过期或签名错误的结果 - http.oauth2ResourceServer().authenticationEntryPoint(restAuthenticationEntryPoint); - //对白名单路径,直接移除JWT请求头 - http.addFilterBefore(ignoreUrlsRemoveJwtFilter,SecurityWebFiltersOrder.AUTHENTICATION); - http.authorizeExchange() - .pathMatchers(ArrayUtil.toArray(ignoreUrlsConfig.getUrls(),String.class)).permitAll()//白名单配置 - .anyExchange().access(authorizationManager)//鉴权管理器配置 - .and().exceptionHandling() - .accessDeniedHandler(restfulAccessDeniedHandler)//处理未授权 - .authenticationEntryPoint(restAuthenticationEntryPoint)//处理未认证 - .and().csrf().disable(); - return http.build(); - } - - @Bean - public Converter> jwtAuthenticationConverter() { - JwtGrantedAuthoritiesConverter jwtGrantedAuthoritiesConverter = new JwtGrantedAuthoritiesConverter(); - jwtGrantedAuthoritiesConverter.setAuthorityPrefix(AuthConstant.AUTHORITY_PREFIX); - jwtGrantedAuthoritiesConverter.setAuthoritiesClaimName(AuthConstant.AUTHORITY_CLAIM_NAME); - JwtAuthenticationConverter jwtAuthenticationConverter = new JwtAuthenticationConverter(); - jwtAuthenticationConverter.setJwtGrantedAuthoritiesConverter(jwtGrantedAuthoritiesConverter); - return new ReactiveJwtAuthenticationConverterAdapter(jwtAuthenticationConverter); - } - -} diff --git a/mall-gateway/src/main/java/com/macro/mall/config/SaTokenConfig.java b/mall-gateway/src/main/java/com/macro/mall/config/SaTokenConfig.java new file mode 100644 index 0000000..a866384 --- /dev/null +++ b/mall-gateway/src/main/java/com/macro/mall/config/SaTokenConfig.java @@ -0,0 +1,104 @@ +package com.macro.mall.config; + +import cn.dev33.satoken.context.SaHolder; +import cn.dev33.satoken.exception.NotLoginException; +import cn.dev33.satoken.exception.NotPermissionException; +import cn.dev33.satoken.reactor.context.SaReactorSyncHolder; +import cn.dev33.satoken.reactor.filter.SaReactorFilter; +import cn.dev33.satoken.router.SaHttpMethod; +import cn.dev33.satoken.router.SaRouter; +import cn.dev33.satoken.stp.StpUtil; +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.convert.Convert; +import com.macro.mall.common.api.CommonResult; +import com.macro.mall.common.constant.AuthConstant; +import com.macro.mall.util.StpMemberUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.http.HttpHeaders; +import org.springframework.http.server.reactive.ServerHttpResponse; +import org.springframework.util.AntPathMatcher; +import org.springframework.util.PathMatcher; +import org.springframework.web.server.ServerWebExchange; + +import java.util.*; + +/** + * @auther macrozheng + * @description Sa-Token相关配置 + * @date 2023/11/28 + * @github https://github.com/macrozheng + */ +@Configuration +public class SaTokenConfig { + + @Autowired + private RedisTemplate redisTemplate; + + /** + * 注册Sa-Token全局过滤器 + */ + @Bean + public SaReactorFilter getSaReactorFilter(IgnoreUrlsConfig ignoreUrlsConfig) { + return new SaReactorFilter() + // 拦截地址 + .addInclude("/**") + // 配置白名单路径 + .setExcludeList(ignoreUrlsConfig.getUrls()) + // 鉴权方法:每次访问进入 + .setAuth(obj -> { + // 对于OPTIONS预检请求直接放行 + SaRouter.match(SaHttpMethod.OPTIONS).stop(); + // 登录认证:商城前台会员认证 + SaRouter.match("/mall-portal/**", r -> StpMemberUtil.checkLogin()).stop(); + // 登录认证:管理后台用户认证 + SaRouter.match("/mall-admin/**", r -> StpUtil.checkLogin()); + // 权限认证:管理后台用户权限校验 + // 获取Redis中缓存的各个接口路径所需权限规则 + Map pathResourceMap = redisTemplate.opsForHash().entries(AuthConstant.PATH_RESOURCE_MAP); + // 获取到访问当前接口所需权限(一个路径对应多个资源时,拥有任意一个资源都可以访问该路径) + List needPermissionList = new ArrayList<>(); + // 获取当前请求路径 + String requestPath = SaHolder.getRequest().getRequestPath(); + // 创建路径匹配器 + PathMatcher pathMatcher = new AntPathMatcher(); + Set> entrySet = pathResourceMap.entrySet(); + for (Map.Entry entry : entrySet) { + String pattern = (String) entry.getKey(); + if (pathMatcher.match(pattern, requestPath)) { + needPermissionList.add((String) entry.getValue()); + } + } + // 接口需要权限时鉴权 + if(CollUtil.isNotEmpty(needPermissionList)){ + SaRouter.match(requestPath, r -> StpUtil.checkPermissionOr(Convert.toStrArray(needPermissionList))); + } + }) + // setAuth方法异常处理 + .setError(this::handleException); + } + + /** + * 自定义异常处理 + */ + private CommonResult handleException(Throwable e) { + //设置错误返回格式为JSON + ServerWebExchange exchange = SaReactorSyncHolder.getContext(); + HttpHeaders headers = exchange.getResponse().getHeaders(); + headers.set("Content-Type", "application/json; charset=utf-8"); + headers.set("Access-Control-Allow-Origin", "*"); + headers.set("Cache-Control","no-cache"); + CommonResult result = null; + if(e instanceof NotLoginException){ + result = CommonResult.unauthorized(null); + }else if(e instanceof NotPermissionException){ + result = CommonResult.forbidden(null); + }else{ + result = CommonResult.failed(e.getMessage()); + } + return result; + } +} + diff --git a/mall-gateway/src/main/java/com/macro/mall/config/SwaggerResourceConfig.java b/mall-gateway/src/main/java/com/macro/mall/config/SwaggerResourceConfig.java deleted file mode 100644 index c66ad3b..0000000 --- a/mall-gateway/src/main/java/com/macro/mall/config/SwaggerResourceConfig.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.macro.mall.config; - -import lombok.AllArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.cloud.gateway.config.GatewayProperties; -import org.springframework.cloud.gateway.route.RouteLocator; -import org.springframework.cloud.gateway.support.NameUtils; -import org.springframework.context.annotation.Primary; -import org.springframework.stereotype.Component; -import springfox.documentation.swagger.web.SwaggerResource; -import springfox.documentation.swagger.web.SwaggerResourcesProvider; - -import java.util.ArrayList; -import java.util.List; - -/** - * Swagger资源配置 - * Created by macro on 2020/7/9. - */ -@Slf4j -@Component -@Primary -@AllArgsConstructor -public class SwaggerResourceConfig implements SwaggerResourcesProvider { - - private final RouteLocator routeLocator; - private final GatewayProperties gatewayProperties; - - @Override - public List get() { - List resources = new ArrayList<>(); - List routes = new ArrayList<>(); - //获取所有路由的ID - routeLocator.getRoutes().subscribe(route -> routes.add(route.getId())); - //过滤出配置文件中定义的路由->过滤出Path Route Predicate->根据路径拼接成api-docs路径->生成SwaggerResource - gatewayProperties.getRoutes().stream().filter(routeDefinition -> routes.contains(routeDefinition.getId())).forEach(route -> { - route.getPredicates().stream() - .filter(predicateDefinition -> ("Path").equalsIgnoreCase(predicateDefinition.getName())) - .forEach(predicateDefinition -> resources.add(swaggerResource(route.getId(), - predicateDefinition.getArgs().get(NameUtils.GENERATED_NAME_PREFIX + "0") - .replace("**", "v2/api-docs")))); - }); - - return resources; - } - - private SwaggerResource swaggerResource(String name, String location) { - log.info("name:{},location:{}", name, location); - SwaggerResource swaggerResource = new SwaggerResource(); - swaggerResource.setName(name); - swaggerResource.setLocation(location); - swaggerResource.setSwaggerVersion("2.0"); - return swaggerResource; - } -} diff --git a/mall-gateway/src/main/java/com/macro/mall/filter/AuthGlobalFilter.java b/mall-gateway/src/main/java/com/macro/mall/filter/AuthGlobalFilter.java deleted file mode 100644 index 13a71f2..0000000 --- a/mall-gateway/src/main/java/com/macro/mall/filter/AuthGlobalFilter.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.macro.mall.filter; - -import cn.hutool.core.util.StrUtil; -import com.macro.mall.common.constant.AuthConstant; -import com.nimbusds.jose.JWSObject; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.cloud.gateway.filter.GatewayFilterChain; -import org.springframework.cloud.gateway.filter.GlobalFilter; -import org.springframework.core.Ordered; -import org.springframework.http.server.reactive.ServerHttpRequest; -import org.springframework.stereotype.Component; -import org.springframework.web.server.ServerWebExchange; -import reactor.core.publisher.Mono; - -import java.text.ParseException; - -/** - * 将登录用户的JWT转化成用户信息的全局过滤器 - * Created by macro on 2020/6/17. - */ -@Component -public class AuthGlobalFilter implements GlobalFilter, Ordered { - - private static Logger LOGGER = LoggerFactory.getLogger(AuthGlobalFilter.class); - - @Override - public Mono filter(ServerWebExchange exchange, GatewayFilterChain chain) { - String token = exchange.getRequest().getHeaders().getFirst(AuthConstant.JWT_TOKEN_HEADER); - if (StrUtil.isEmpty(token)) { - return chain.filter(exchange); - } - try { - //从token中解析用户信息并设置到Header中去 - String realToken = token.replace(AuthConstant.JWT_TOKEN_PREFIX, ""); - JWSObject jwsObject = JWSObject.parse(realToken); - String userStr = jwsObject.getPayload().toString(); - LOGGER.info("AuthGlobalFilter.filter() user:{}",userStr); - ServerHttpRequest request = exchange.getRequest().mutate().header(AuthConstant.USER_TOKEN_HEADER, userStr).build(); - exchange = exchange.mutate().request(request).build(); - } catch (ParseException e) { - e.printStackTrace(); - } - return chain.filter(exchange); - } - - @Override - public int getOrder() { - return 0; - } -} diff --git a/mall-gateway/src/main/java/com/macro/mall/filter/IgnoreUrlsRemoveJwtFilter.java b/mall-gateway/src/main/java/com/macro/mall/filter/IgnoreUrlsRemoveJwtFilter.java deleted file mode 100644 index b75e470..0000000 --- a/mall-gateway/src/main/java/com/macro/mall/filter/IgnoreUrlsRemoveJwtFilter.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.macro.mall.filter; - -import com.macro.mall.common.constant.AuthConstant; -import com.macro.mall.config.IgnoreUrlsConfig; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.server.reactive.ServerHttpRequest; -import org.springframework.security.web.server.authentication.AuthenticationWebFilter; -import org.springframework.stereotype.Component; -import org.springframework.util.AntPathMatcher; -import org.springframework.util.PathMatcher; -import org.springframework.web.server.ServerWebExchange; -import org.springframework.web.server.WebFilter; -import org.springframework.web.server.WebFilterChain; -import reactor.core.publisher.Mono; - -import java.net.URI; -import java.util.List; - -/** - * 白名单路径访问时移除JWT请求头的过滤器 - * Created by macro on 2020/7/24. - */ -@Component -public class IgnoreUrlsRemoveJwtFilter implements WebFilter { - @Autowired - private IgnoreUrlsConfig ignoreUrlsConfig; - @Override - public Mono filter(ServerWebExchange exchange, WebFilterChain chain) { - ServerHttpRequest request = exchange.getRequest(); - URI uri = request.getURI(); - PathMatcher pathMatcher = new AntPathMatcher(); - //白名单路径移除JWT请求头 - List ignoreUrls = ignoreUrlsConfig.getUrls(); - for (String ignoreUrl : ignoreUrls) { - if (pathMatcher.match(ignoreUrl, uri.getPath())) { - request = exchange.getRequest().mutate().header(AuthConstant.JWT_TOKEN_HEADER, "").build(); - exchange = exchange.mutate().request(request).build(); - return chain.filter(exchange); - } - } - return chain.filter(exchange); - } -} diff --git a/mall-gateway/src/main/java/com/macro/mall/handler/SwaggerHandler.java b/mall-gateway/src/main/java/com/macro/mall/handler/SwaggerHandler.java deleted file mode 100644 index 5f5a29e..0000000 --- a/mall-gateway/src/main/java/com/macro/mall/handler/SwaggerHandler.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.macro.mall.handler; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; -import reactor.core.publisher.Mono; -import springfox.documentation.swagger.web.*; - -import java.util.Optional; - -/** - * 自定义Swagger的各个配置节点 - * Created by macro on 2020/7/9. - */ -@RestController -public class SwaggerHandler { - - @Autowired(required = false) - private SecurityConfiguration securityConfiguration; - - @Autowired(required = false) - private UiConfiguration uiConfiguration; - - private final SwaggerResourcesProvider swaggerResources; - - @Autowired - public SwaggerHandler(SwaggerResourcesProvider swaggerResources) { - this.swaggerResources = swaggerResources; - } - - /** - * Swagger安全配置,支持oauth和apiKey设置 - */ - @GetMapping("/swagger-resources/configuration/security") - public Mono> securityConfiguration() { - return Mono.just(new ResponseEntity<>( - Optional.ofNullable(securityConfiguration).orElse(SecurityConfigurationBuilder.builder().build()), HttpStatus.OK)); - } - - /** - * Swagger UI配置 - */ - @GetMapping("/swagger-resources/configuration/ui") - public Mono> uiConfiguration() { - return Mono.just(new ResponseEntity<>( - Optional.ofNullable(uiConfiguration).orElse(UiConfigurationBuilder.builder().build()), HttpStatus.OK)); - } - - /** - * Swagger资源配置,微服务中这各个服务的api-docs信息 - */ - @GetMapping("/swagger-resources") - public Mono swaggerResources() { - return Mono.just((new ResponseEntity<>(swaggerResources.get(), HttpStatus.OK))); - } -} diff --git a/mall-gateway/src/main/java/com/macro/mall/util/StpMemberUtil.java b/mall-gateway/src/main/java/com/macro/mall/util/StpMemberUtil.java new file mode 100644 index 0000000..1436b8a --- /dev/null +++ b/mall-gateway/src/main/java/com/macro/mall/util/StpMemberUtil.java @@ -0,0 +1,1238 @@ +/* + * Copyright 2020-2099 sa-token.cc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.macro.mall.util; + +import cn.dev33.satoken.SaManager; +import cn.dev33.satoken.fun.SaFunction; +import cn.dev33.satoken.jwt.StpLogicJwtForSimple; +import cn.dev33.satoken.listener.SaTokenEventCenter; +import cn.dev33.satoken.session.SaSession; +import cn.dev33.satoken.session.TokenSign; +import cn.dev33.satoken.stp.SaLoginModel; +import cn.dev33.satoken.stp.SaTokenInfo; +import cn.dev33.satoken.stp.StpLogic; + +import java.util.List; + +/** + * @auther macrozheng + * @description 前台商城用户登录认证工具类 + * 拷贝于默认的StpUtil,仅改动了TYPE + * @date 2024/1/26 + * @github https://github.com/macrozheng + */ +public class StpMemberUtil { + + private StpMemberUtil() {} + + /** + * 多账号体系下的类型标识 + */ + public static final String TYPE = "memberLogin"; + + /** + * 底层使用的 StpLogic 对象 + */ + public static StpLogic stpLogic = new StpLogicJwtForSimple(TYPE); + + /** + * 获取当前 StpLogic 的账号类型 + * + * @return / + */ + public static String getLoginType(){ + return stpLogic.getLoginType(); + } + + /** + * 安全的重置 StpLogic 对象 + * + *
1、更改此账户的 StpLogic 对象 + *
2、put 到全局 StpLogic 集合中 + *
3、发送日志 + * + * @param newStpLogic / + */ + public static void setStpLogic(StpLogic newStpLogic) { + // 1、重置此账户的 StpLogic 对象 + stpLogic = newStpLogic; + + // 2、添加到全局 StpLogic 集合中 + // 以便可以通过 SaManager.getStpLogic(type) 的方式来全局获取到这个 StpLogic + SaManager.putStpLogic(newStpLogic); + + // 3、$$ 发布事件:更新了 stpLogic 对象 + SaTokenEventCenter.doSetStpLogic(stpLogic); + } + + /** + * 获取 StpLogic 对象 + * + * @return / + */ + public static StpLogic getStpLogic() { + return stpLogic; + } + + + // ------------------- 获取 token 相关 ------------------- + + /** + * 返回 token 名称,此名称在以下地方体现:Cookie 保存 token 时的名称、提交 token 时参数的名称、存储 token 时的 key 前缀 + * + * @return / + */ + public static String getTokenName() { + return stpLogic.getTokenName(); + } + + /** + * 在当前会话写入指定 token 值 + * + * @param tokenValue token 值 + */ + public static void setTokenValue(String tokenValue){ + stpLogic.setTokenValue(tokenValue); + } + + /** + * 在当前会话写入指定 token 值 + * + * @param tokenValue token 值 + * @param cookieTimeout Cookie存活时间(秒) + */ + public static void setTokenValue(String tokenValue, int cookieTimeout){ + stpLogic.setTokenValue(tokenValue, cookieTimeout); + } + + /** + * 在当前会话写入指定 token 值 + * + * @param tokenValue token 值 + * @param loginModel 登录参数 + */ + public static void setTokenValue(String tokenValue, SaLoginModel loginModel){ + stpLogic.setTokenValue(tokenValue, loginModel); + } + + /** + * 获取当前请求的 token 值 + * + * @return 当前tokenValue + */ + public static String getTokenValue() { + return stpLogic.getTokenValue(); + } + + /** + * 获取当前请求的 token 值 (不裁剪前缀) + * + * @return / + */ + public static String getTokenValueNotCut(){ + return stpLogic.getTokenValueNotCut(); + } + + /** + * 获取当前会话的 token 参数信息 + * + * @return token 参数信息 + */ + public static SaTokenInfo getTokenInfo() { + return stpLogic.getTokenInfo(); + } + + + // ------------------- 登录相关操作 ------------------- + + // --- 登录 + + /** + * 会话登录 + * + * @param id 账号id,建议的类型:(long | int | String) + */ + public static void login(Object id) { + stpLogic.login(id); + } + + /** + * 会话登录,并指定登录设备类型 + * + * @param id 账号id,建议的类型:(long | int | String) + * @param device 设备类型 + */ + public static void login(Object id, String device) { + stpLogic.login(id, device); + } + + /** + * 会话登录,并指定是否 [记住我] + * + * @param id 账号id,建议的类型:(long | int | String) + * @param isLastingCookie 是否为持久Cookie,值为 true 时记住我,值为 false 时关闭浏览器需要重新登录 + */ + public static void login(Object id, boolean isLastingCookie) { + stpLogic.login(id, isLastingCookie); + } + + /** + * 会话登录,并指定此次登录 token 的有效期, 单位:秒 + * + * @param id 账号id,建议的类型:(long | int | String) + * @param timeout 此次登录 token 的有效期, 单位:秒 + */ + public static void login(Object id, long timeout) { + stpLogic.login(id, timeout); + } + + /** + * 会话登录,并指定所有登录参数 Model + * + * @param id 账号id,建议的类型:(long | int | String) + * @param loginModel 此次登录的参数Model + */ + public static void login(Object id, SaLoginModel loginModel) { + stpLogic.login(id, loginModel); + } + + /** + * 创建指定账号 id 的登录会话数据 + * + * @param id 账号id,建议的类型:(long | int | String) + * @return 返回会话令牌 + */ + public static String createLoginSession(Object id) { + return stpLogic.createLoginSession(id); + } + + /** + * 创建指定账号 id 的登录会话数据 + * + * @param id 账号id,建议的类型:(long | int | String) + * @param loginModel 此次登录的参数Model + * @return 返回会话令牌 + */ + public static String createLoginSession(Object id, SaLoginModel loginModel) { + return stpLogic.createLoginSession(id, loginModel); + } + + // --- 注销 + + /** + * 在当前客户端会话注销 + */ + public static void logout() { + stpLogic.logout(); + } + + /** + * 会话注销,根据账号id + * + * @param loginId 账号id + */ + public static void logout(Object loginId) { + stpLogic.logout(loginId); + } + + /** + * 会话注销,根据账号id 和 设备类型 + * + * @param loginId 账号id + * @param device 设备类型 (填 null 代表注销该账号的所有设备类型) + */ + public static void logout(Object loginId, String device) { + stpLogic.logout(loginId, device); + } + + /** + * 会话注销,根据指定 Token + * + * @param tokenValue 指定 token + */ + public static void logoutByTokenValue(String tokenValue) { + stpLogic.logoutByTokenValue(tokenValue); + } + + /** + * 踢人下线,根据账号id + *

当对方再次访问系统时,会抛出 NotLoginException 异常,场景值=-5

+ * + * @param loginId 账号id + */ + public static void kickout(Object loginId) { + stpLogic.kickout(loginId); + } + + /** + * 踢人下线,根据账号id 和 设备类型 + *

当对方再次访问系统时,会抛出 NotLoginException 异常,场景值=-5

+ * + * @param loginId 账号id + * @param device 设备类型 (填 null 代表踢出该账号的所有设备类型) + */ + public static void kickout(Object loginId, String device) { + stpLogic.kickout(loginId, device); + } + + /** + * 踢人下线,根据指定 token + *

当对方再次访问系统时,会抛出 NotLoginException 异常,场景值=-5

+ * + * @param tokenValue 指定 token + */ + public static void kickoutByTokenValue(String tokenValue) { + stpLogic.kickoutByTokenValue(tokenValue); + } + + /** + * 顶人下线,根据账号id 和 设备类型 + *

当对方再次访问系统时,会抛出 NotLoginException 异常,场景值=-4

+ * + * @param loginId 账号id + * @param device 设备类型 (填 null 代表顶替该账号的所有设备类型) + */ + public static void replaced(Object loginId, String device) { + stpLogic.replaced(loginId, device); + } + + // 会话查询 + + /** + * 判断当前会话是否已经登录 + * + * @return 已登录返回 true,未登录返回 false + */ + public static boolean isLogin() { + return stpLogic.isLogin(); + } + + /** + * 判断指定账号是否已经登录 + * + * @return 已登录返回 true,未登录返回 false + */ + public static boolean isLogin(Object loginId) { + return stpLogic.isLogin(loginId); + } + + /** + * 检验当前会话是否已经登录,如未登录,则抛出异常 + */ + public static void checkLogin() { + stpLogic.checkLogin(); + } + + /** + * 获取当前会话账号id,如果未登录,则抛出异常 + * + * @return 账号id + */ + public static Object getLoginId() { + return stpLogic.getLoginId(); + } + + /** + * 获取当前会话账号id, 如果未登录,则返回默认值 + * + * @param 返回类型 + * @param defaultValue 默认值 + * @return 登录id + */ + public static T getLoginId(T defaultValue) { + return stpLogic.getLoginId(defaultValue); + } + + /** + * 获取当前会话账号id, 如果未登录,则返回null + * + * @return 账号id + */ + public static Object getLoginIdDefaultNull() { + return stpLogic.getLoginIdDefaultNull(); + } + + /** + * 获取当前会话账号id, 并转换为 String 类型 + * + * @return 账号id + */ + public static String getLoginIdAsString() { + return stpLogic.getLoginIdAsString(); + } + + /** + * 获取当前会话账号id, 并转换为 int 类型 + * + * @return 账号id + */ + public static int getLoginIdAsInt() { + return stpLogic.getLoginIdAsInt(); + } + + /** + * 获取当前会话账号id, 并转换为 long 类型 + * + * @return 账号id + */ + public static long getLoginIdAsLong() { + return stpLogic.getLoginIdAsLong(); + } + + /** + * 获取指定 token 对应的账号id,如果未登录,则返回 null + * + * @param tokenValue token + * @return 账号id + */ + public static Object getLoginIdByToken(String tokenValue) { + return stpLogic.getLoginIdByToken(tokenValue); + } + + /** + * 获取当前 Token 的扩展信息(此函数只在jwt模式下生效) + * + * @param key 键值 + * @return 对应的扩展数据 + */ + public static Object getExtra(String key) { + return stpLogic.getExtra(key); + } + + /** + * 获取指定 Token 的扩展信息(此函数只在jwt模式下生效) + * + * @param tokenValue 指定的 Token 值 + * @param key 键值 + * @return 对应的扩展数据 + */ + public static Object getExtra(String tokenValue, String key) { + return stpLogic.getExtra(tokenValue, key); + } + + + // ------------------- Account-Session 相关 ------------------- + + /** + * 获取指定账号 id 的 Account-Session, 如果该 SaSession 尚未创建,isCreate=是否新建并返回 + * + * @param loginId 账号id + * @param isCreate 是否新建 + * @return SaSession 对象 + */ + public static SaSession getSessionByLoginId(Object loginId, boolean isCreate) { + return stpLogic.getSessionByLoginId(loginId, isCreate); + } + + /** + * 获取指定 key 的 SaSession, 如果该 SaSession 尚未创建,则返回 null + * + * @param sessionId SessionId + * @return Session对象 + */ + public static SaSession getSessionBySessionId(String sessionId) { + return stpLogic.getSessionBySessionId(sessionId); + } + + /** + * 获取指定账号 id 的 Account-Session,如果该 SaSession 尚未创建,则新建并返回 + * + * @param loginId 账号id + * @return SaSession 对象 + */ + public static SaSession getSessionByLoginId(Object loginId) { + return stpLogic.getSessionByLoginId(loginId); + } + + /** + * 获取当前已登录账号的 Account-Session, 如果该 SaSession 尚未创建,isCreate=是否新建并返回 + * + * @param isCreate 是否新建 + * @return Session对象 + */ + public static SaSession getSession(boolean isCreate) { + return stpLogic.getSession(isCreate); + } + + /** + * 获取当前已登录账号的 Account-Session,如果该 SaSession 尚未创建,则新建并返回 + * + * @return Session对象 + */ + public static SaSession getSession() { + return stpLogic.getSession(); + } + + + // ------------------- Token-Session 相关 ------------------- + + /** + * 获取指定 token 的 Token-Session,如果该 SaSession 尚未创建,则新建并返回 + * + * @param tokenValue Token值 + * @return Session对象 + */ + public static SaSession getTokenSessionByToken(String tokenValue) { + return stpLogic.getTokenSessionByToken(tokenValue); + } + + /** + * 获取当前 token 的 Token-Session,如果该 SaSession 尚未创建,则新建并返回 + * + * @return Session对象 + */ + public static SaSession getTokenSession() { + return stpLogic.getTokenSession(); + } + + /** + * 获取当前匿名 Token-Session (可在未登录情况下使用的Token-Session) + * + * @return Token-Session 对象 + */ + public static SaSession getAnonTokenSession() { + return stpLogic.getAnonTokenSession(); + } + + + // ------------------- Active-Timeout token 最低活跃度 验证相关 ------------------- + + /** + * 续签当前 token:(将 [最后操作时间] 更新为当前时间戳) + *

+ * 请注意: 即使 token 已被冻结 也可续签成功, + * 如果此场景下需要提示续签失败,可在此之前调用 checkActiveTimeout() 强制检查是否冻结即可 + *

+ */ + public static void updateLastActiveToNow() { + stpLogic.updateLastActiveToNow(); + } + + /** + * 检查当前 token 是否已被冻结,如果是则抛出异常 + */ + public static void checkActiveTimeout() { + stpLogic.checkActiveTimeout(); + } + + + // ------------------- 过期时间相关 ------------------- + + /** + * 获取当前会话 token 剩余有效时间(单位: 秒,返回 -1 代表永久有效,-2 代表没有这个值) + * + * @return token剩余有效时间 + */ + public static long getTokenTimeout() { + return stpLogic.getTokenTimeout(); + } + + /** + * 获取指定 token 剩余有效时间(单位: 秒,返回 -1 代表永久有效,-2 代表没有这个值) + * + * @param token 指定token + * @return token剩余有效时间 + */ + public static long getTokenTimeout(String token) { + return stpLogic.getTokenTimeout(token); + } + + /** + * 获取当前登录账号的 Account-Session 剩余有效时间(单位: 秒,返回 -1 代表永久有效,-2 代表没有这个值) + * + * @return token剩余有效时间 + */ + public static long getSessionTimeout() { + return stpLogic.getSessionTimeout(); + } + + /** + * 获取当前 token 的 Token-Session 剩余有效时间(单位: 秒,返回 -1 代表永久有效,-2 代表没有这个值) + * + * @return token剩余有效时间 + */ + public static long getTokenSessionTimeout() { + return stpLogic.getTokenSessionTimeout(); + } + + /** + * 获取当前 token 剩余活跃有效期:当前 token 距离被冻结还剩多少时间(单位: 秒,返回 -1 代表永不冻结,-2 代表没有这个值或 token 已被冻结了) + * + * @return / + */ + public static long getTokenActiveTimeout() { + return stpLogic.getTokenActiveTimeout(); + } + + /** + * 对当前 token 的 timeout 值进行续期 + * + * @param timeout 要修改成为的有效时间 (单位: 秒) + */ + public static void renewTimeout(long timeout) { + stpLogic.renewTimeout(timeout); + } + + /** + * 对指定 token 的 timeout 值进行续期 + * + * @param tokenValue 指定 token + * @param timeout 要修改成为的有效时间 (单位: 秒,填 -1 代表要续为永久有效) + */ + public static void renewTimeout(String tokenValue, long timeout) { + stpLogic.renewTimeout(tokenValue, timeout); + } + + + // ------------------- 角色认证操作 ------------------- + + /** + * 获取:当前账号的角色集合 + * + * @return / + */ + public static List getRoleList() { + return stpLogic.getRoleList(); + } + + /** + * 获取:指定账号的角色集合 + * + * @param loginId 指定账号id + * @return / + */ + public static List getRoleList(Object loginId) { + return stpLogic.getRoleList(loginId); + } + + /** + * 判断:当前账号是否拥有指定角色, 返回 true 或 false + * + * @param role 角色 + * @return / + */ + public static boolean hasRole(String role) { + return stpLogic.hasRole(role); + } + + /** + * 判断:指定账号是否含有指定角色标识, 返回 true 或 false + * + * @param loginId 账号id + * @param role 角色标识 + * @return 是否含有指定角色标识 + */ + public static boolean hasRole(Object loginId, String role) { + return stpLogic.hasRole(loginId, role); + } + + /** + * 判断:当前账号是否含有指定角色标识 [ 指定多个,必须全部验证通过 ] + * + * @param roleArray 角色标识数组 + * @return true或false + */ + public static boolean hasRoleAnd(String... roleArray){ + return stpLogic.hasRoleAnd(roleArray); + } + + /** + * 判断:当前账号是否含有指定角色标识 [ 指定多个,只要其一验证通过即可 ] + * + * @param roleArray 角色标识数组 + * @return true或false + */ + public static boolean hasRoleOr(String... roleArray){ + return stpLogic.hasRoleOr(roleArray); + } + + /** + * 校验:当前账号是否含有指定角色标识, 如果验证未通过,则抛出异常: NotRoleException + * + * @param role 角色标识 + */ + public static void checkRole(String role) { + stpLogic.checkRole(role); + } + + /** + * 校验:当前账号是否含有指定角色标识 [ 指定多个,必须全部验证通过 ] + * + * @param roleArray 角色标识数组 + */ + public static void checkRoleAnd(String... roleArray){ + stpLogic.checkRoleAnd(roleArray); + } + + /** + * 校验:当前账号是否含有指定角色标识 [ 指定多个,只要其一验证通过即可 ] + * + * @param roleArray 角色标识数组 + */ + public static void checkRoleOr(String... roleArray){ + stpLogic.checkRoleOr(roleArray); + } + + + // ------------------- 权限认证操作 ------------------- + + /** + * 获取:当前账号的权限码集合 + * + * @return / + */ + public static List getPermissionList() { + return stpLogic.getPermissionList(); + } + + /** + * 获取:指定账号的权限码集合 + * + * @param loginId 指定账号id + * @return / + */ + public static List getPermissionList(Object loginId) { + return stpLogic.getPermissionList(loginId); + } + + /** + * 判断:当前账号是否含有指定权限, 返回 true 或 false + * + * @param permission 权限码 + * @return 是否含有指定权限 + */ + public static boolean hasPermission(String permission) { + return stpLogic.hasPermission(permission); + } + + /** + * 判断:指定账号 id 是否含有指定权限, 返回 true 或 false + * + * @param loginId 账号 id + * @param permission 权限码 + * @return 是否含有指定权限 + */ + public static boolean hasPermission(Object loginId, String permission) { + return stpLogic.hasPermission(loginId, permission); + } + + /** + * 判断:当前账号是否含有指定权限 [ 指定多个,必须全部具有 ] + * + * @param permissionArray 权限码数组 + * @return true 或 false + */ + public static boolean hasPermissionAnd(String... permissionArray){ + return stpLogic.hasPermissionAnd(permissionArray); + } + + /** + * 判断:当前账号是否含有指定权限 [ 指定多个,只要其一验证通过即可 ] + * + * @param permissionArray 权限码数组 + * @return true 或 false + */ + public static boolean hasPermissionOr(String... permissionArray){ + return stpLogic.hasPermissionOr(permissionArray); + } + + /** + * 校验:当前账号是否含有指定权限, 如果验证未通过,则抛出异常: NotPermissionException + * + * @param permission 权限码 + */ + public static void checkPermission(String permission) { + stpLogic.checkPermission(permission); + } + + /** + * 校验:当前账号是否含有指定权限 [ 指定多个,必须全部验证通过 ] + * + * @param permissionArray 权限码数组 + */ + public static void checkPermissionAnd(String... permissionArray) { + stpLogic.checkPermissionAnd(permissionArray); + } + + /** + * 校验:当前账号是否含有指定权限 [ 指定多个,只要其一验证通过即可 ] + * + * @param permissionArray 权限码数组 + */ + public static void checkPermissionOr(String... permissionArray) { + stpLogic.checkPermissionOr(permissionArray); + } + + + // ------------------- id 反查 token 相关操作 ------------------- + + /** + * 获取指定账号 id 的 token + *

+ * 在配置为允许并发登录时,此方法只会返回队列的最后一个 token, + * 如果你需要返回此账号 id 的所有 token,请调用 getTokenValueListByLoginId + *

+ * + * @param loginId 账号id + * @return token值 + */ + public static String getTokenValueByLoginId(Object loginId) { + return stpLogic.getTokenValueByLoginId(loginId); + } + + /** + * 获取指定账号 id 指定设备类型端的 token + *

+ * 在配置为允许并发登录时,此方法只会返回队列的最后一个 token, + * 如果你需要返回此账号 id 的所有 token,请调用 getTokenValueListByLoginId + *

+ * + * @param loginId 账号id + * @param device 设备类型,填 null 代表不限设备类型 + * @return token值 + */ + public static String getTokenValueByLoginId(Object loginId, String device) { + return stpLogic.getTokenValueByLoginId(loginId, device); + } + + /** + * 获取指定账号 id 的 token 集合 + * + * @param loginId 账号id + * @return 此 loginId 的所有相关 token + */ + public static List getTokenValueListByLoginId(Object loginId) { + return stpLogic.getTokenValueListByLoginId(loginId); + } + + /** + * 获取指定账号 id 指定设备类型端的 token 集合 + * + * @param loginId 账号id + * @param device 设备类型,填 null 代表不限设备类型 + * @return 此 loginId 的所有登录 token + */ + public static List getTokenValueListByLoginId(Object loginId, String device) { + return stpLogic.getTokenValueListByLoginId(loginId, device); + } + + /** + * 获取指定账号 id 指定设备类型端的 tokenSign 集合 + * + * @param loginId 账号id + * @param device 设备类型,填 null 代表不限设备类型 + * @return 此 loginId 的所有登录 tokenSign + */ + public static List getTokenSignListByLoginId(Object loginId, String device) { + return stpLogic.getTokenSignListByLoginId(loginId, device); + } + + /** + * 返回当前会话的登录设备类型 + * + * @return 当前令牌的登录设备类型 + */ + public static String getLoginDevice() { + return stpLogic.getLoginDevice(); + } + + + // ------------------- 会话管理 ------------------- + + /** + * 根据条件查询缓存中所有的 token + * + * @param keyword 关键字 + * @param start 开始处索引 + * @param size 获取数量 (-1代表一直获取到末尾) + * @param sortType 排序类型(true=正序,false=反序) + * + * @return token集合 + */ + public static List searchTokenValue(String keyword, int start, int size, boolean sortType) { + return stpLogic.searchTokenValue(keyword, start, size, sortType); + } + + /** + * 根据条件查询缓存中所有的 SessionId + * + * @param keyword 关键字 + * @param start 开始处索引 + * @param size 获取数量 (-1代表一直获取到末尾) + * @param sortType 排序类型(true=正序,false=反序) + * + * @return sessionId集合 + */ + public static List searchSessionId(String keyword, int start, int size, boolean sortType) { + return stpLogic.searchSessionId(keyword, start, size, sortType); + } + + /** + * 根据条件查询缓存中所有的 Token-Session-Id + * + * @param keyword 关键字 + * @param start 开始处索引 + * @param size 获取数量 (-1代表一直获取到末尾) + * @param sortType 排序类型(true=正序,false=反序) + * + * @return sessionId集合 + */ + public static List searchTokenSessionId(String keyword, int start, int size, boolean sortType) { + return stpLogic.searchTokenSessionId(keyword, start, size, sortType); + } + + + // ------------------- 账号封禁 ------------------- + + /** + * 封禁:指定账号 + *

此方法不会直接将此账号id踢下线,如需封禁后立即掉线,请追加调用 StpUtil.logout(id) + * + * @param loginId 指定账号id + * @param time 封禁时间, 单位: 秒 (-1=永久封禁) + */ + public static void disable(Object loginId, long time) { + stpLogic.disable(loginId, time); + } + + /** + * 判断:指定账号是否已被封禁 (true=已被封禁, false=未被封禁) + * + * @param loginId 账号id + * @return / + */ + public static boolean isDisable(Object loginId) { + return stpLogic.isDisable(loginId); + } + + /** + * 校验:指定账号是否已被封禁,如果被封禁则抛出异常 + * + * @param loginId 账号id + */ + public static void checkDisable(Object loginId) { + stpLogic.checkDisable(loginId); + } + + /** + * 获取:指定账号剩余封禁时间,单位:秒(-1=永久封禁,-2=未被封禁) + * + * @param loginId 账号id + * @return / + */ + public static long getDisableTime(Object loginId) { + return stpLogic.getDisableTime(loginId); + } + + /** + * 解封:指定账号 + * + * @param loginId 账号id + */ + public static void untieDisable(Object loginId) { + stpLogic.untieDisable(loginId); + } + + + // ------------------- 分类封禁 ------------------- + + /** + * 封禁:指定账号的指定服务 + *

此方法不会直接将此账号id踢下线,如需封禁后立即掉线,请追加调用 StpUtil.logout(id) + * + * @param loginId 指定账号id + * @param service 指定服务 + * @param time 封禁时间, 单位: 秒 (-1=永久封禁) + */ + public static void disable(Object loginId, String service, long time) { + stpLogic.disable(loginId, service, time); + } + + /** + * 判断:指定账号的指定服务 是否已被封禁(true=已被封禁, false=未被封禁) + * + * @param loginId 账号id + * @param service 指定服务 + * @return / + */ + public static boolean isDisable(Object loginId, String service) { + return stpLogic.isDisable(loginId, service); + } + + /** + * 校验:指定账号 指定服务 是否已被封禁,如果被封禁则抛出异常 + * + * @param loginId 账号id + * @param services 指定服务,可以指定多个 + */ + public static void checkDisable(Object loginId, String... services) { + stpLogic.checkDisable(loginId, services); + } + + /** + * 获取:指定账号 指定服务 剩余封禁时间,单位:秒(-1=永久封禁,-2=未被封禁) + * + * @param loginId 账号id + * @param service 指定服务 + * @return see note + */ + public static long getDisableTime(Object loginId, String service) { + return stpLogic.getDisableTime(loginId, service); + } + + /** + * 解封:指定账号、指定服务 + * + * @param loginId 账号id + * @param services 指定服务,可以指定多个 + */ + public static void untieDisable(Object loginId, String... services) { + stpLogic.untieDisable(loginId, services); + } + + + // ------------------- 阶梯封禁 ------------------- + + /** + * 封禁:指定账号,并指定封禁等级 + * + * @param loginId 指定账号id + * @param level 指定封禁等级 + * @param time 封禁时间, 单位: 秒 (-1=永久封禁) + */ + public static void disableLevel(Object loginId, int level, long time) { + stpLogic.disableLevel(loginId, level, time); + } + + /** + * 封禁:指定账号的指定服务,并指定封禁等级 + * + * @param loginId 指定账号id + * @param service 指定封禁服务 + * @param level 指定封禁等级 + * @param time 封禁时间, 单位: 秒 (-1=永久封禁) + */ + public static void disableLevel(Object loginId, String service, int level, long time) { + stpLogic.disableLevel(loginId, service, level, time); + } + + /** + * 判断:指定账号是否已被封禁到指定等级 + * + * @param loginId 指定账号id + * @param level 指定封禁等级 + * @return / + */ + public static boolean isDisableLevel(Object loginId, int level) { + return stpLogic.isDisableLevel(loginId, level); + } + + /** + * 判断:指定账号的指定服务,是否已被封禁到指定等级 + * + * @param loginId 指定账号id + * @param service 指定封禁服务 + * @param level 指定封禁等级 + * @return / + */ + public static boolean isDisableLevel(Object loginId, String service, int level) { + return stpLogic.isDisableLevel(loginId, service, level); + } + + /** + * 校验:指定账号是否已被封禁到指定等级(如果已经达到,则抛出异常) + * + * @param loginId 指定账号id + * @param level 封禁等级 (只有 封禁等级 ≥ 此值 才会抛出异常) + */ + public static void checkDisableLevel(Object loginId, int level) { + stpLogic.checkDisableLevel(loginId, level); + } + + /** + * 校验:指定账号的指定服务,是否已被封禁到指定等级(如果已经达到,则抛出异常) + * + * @param loginId 指定账号id + * @param service 指定封禁服务 + * @param level 封禁等级 (只有 封禁等级 ≥ 此值 才会抛出异常) + */ + public static void checkDisableLevel(Object loginId, String service, int level) { + stpLogic.checkDisableLevel(loginId, service, level); + } + + /** + * 获取:指定账号被封禁的等级,如果未被封禁则返回-2 + * + * @param loginId 指定账号id + * @return / + */ + public static int getDisableLevel(Object loginId) { + return stpLogic.getDisableLevel(loginId); + } + + /** + * 获取:指定账号的 指定服务 被封禁的等级,如果未被封禁则返回-2 + * + * @param loginId 指定账号id + * @param service 指定封禁服务 + * @return / + */ + public static int getDisableLevel(Object loginId, String service) { + return stpLogic.getDisableLevel(loginId, service); + } + + + // ------------------- 临时身份切换 ------------------- + + /** + * 临时切换身份为指定账号id + * + * @param loginId 指定loginId + */ + public static void switchTo(Object loginId) { + stpLogic.switchTo(loginId); + } + + /** + * 结束临时切换身份 + */ + public static void endSwitch() { + stpLogic.endSwitch(); + } + + /** + * 判断当前请求是否正处于 [ 身份临时切换 ] 中 + * + * @return / + */ + public static boolean isSwitch() { + return stpLogic.isSwitch(); + } + + /** + * 在一个 lambda 代码段里,临时切换身份为指定账号id,lambda 结束后自动恢复 + * + * @param loginId 指定账号id + * @param function 要执行的方法 + */ + public static void switchTo(Object loginId, SaFunction function) { + stpLogic.switchTo(loginId, function); + } + + + // ------------------- 二级认证 ------------------- + + /** + * 在当前会话 开启二级认证 + * + * @param safeTime 维持时间 (单位: 秒) + */ + public static void openSafe(long safeTime) { + stpLogic.openSafe(safeTime); + } + + /** + * 在当前会话 开启二级认证 + * + * @param service 业务标识 + * @param safeTime 维持时间 (单位: 秒) + */ + public static void openSafe(String service, long safeTime) { + stpLogic.openSafe(service, safeTime); + } + + /** + * 判断:当前会话是否处于二级认证时间内 + * + * @return true=二级认证已通过, false=尚未进行二级认证或认证已超时 + */ + public static boolean isSafe() { + return stpLogic.isSafe(); + } + + /** + * 判断:当前会话 是否处于指定业务的二级认证时间内 + * + * @param service 业务标识 + * @return true=二级认证已通过, false=尚未进行二级认证或认证已超时 + */ + public static boolean isSafe(String service) { + return stpLogic.isSafe(service); + } + + /** + * 判断:指定 token 是否处于二级认证时间内 + * + * @param tokenValue Token 值 + * @param service 业务标识 + * @return true=二级认证已通过, false=尚未进行二级认证或认证已超时 + */ + public static boolean isSafe(String tokenValue, String service) { + return stpLogic.isSafe(tokenValue, service); + } + + /** + * 校验:当前会话是否已通过二级认证,如未通过则抛出异常 + */ + public static void checkSafe() { + stpLogic.checkSafe(); + } + + /** + * 校验:检查当前会话是否已通过指定业务的二级认证,如未通过则抛出异常 + * + * @param service 业务标识 + */ + public static void checkSafe(String service) { + stpLogic.checkSafe(service); + } + + /** + * 获取:当前会话的二级认证剩余有效时间(单位: 秒, 返回-2代表尚未通过二级认证) + * + * @return 剩余有效时间 + */ + public static long getSafeTime() { + return stpLogic.getSafeTime(); + } + + /** + * 获取:当前会话的二级认证剩余有效时间(单位: 秒, 返回-2代表尚未通过二级认证) + * + * @param service 业务标识 + * @return 剩余有效时间 + */ + public static long getSafeTime(String service) { + return stpLogic.getSafeTime(service); + } + + /** + * 在当前会话 结束二级认证 + */ + public static void closeSafe() { + stpLogic.closeSafe(); + } + + /** + * 在当前会话 结束指定业务标识的二级认证 + * + * @param service 业务标识 + */ + public static void closeSafe(String service) { + stpLogic.closeSafe(service); + } + +} diff --git a/mall-gateway/src/main/resources/application.yml b/mall-gateway/src/main/resources/application.yml index d253736..7d3b664 100644 --- a/mall-gateway/src/main/resources/application.yml +++ b/mall-gateway/src/main/resources/application.yml @@ -41,31 +41,25 @@ spring: - Path=/mall-demo/** filters: - StripPrefix=1 - security: - oauth2: - resourceserver: - jwt: - jwk-set-uri: 'http://localhost:8201/mall-auth/rsa/publicKey' #配置RSA的公钥访问地址 - redis: - database: 0 - port: 6379 - host: localhost - password: + data: + redis: + database: 0 + port: 6379 + host: localhost + password: secure: ignore: urls: #配置白名单路径 - "/doc.html" - - "/swagger-resources/**" - - "/swagger/**" - - "/*/v2/api-docs" - - "/*/*.js" - - "/*/*.css" - - "/*/*.png" - - "/*/*.ico" + - "/v3/api-docs/swagger-config" + - "/*/v3/api-docs/default" + - "/*/v3/api-docs" + - "/*/swagger-ui/**" + - "/webjars/**" + - "/favicon.ico" - "/webjars/**" - "/actuator/**" - - "/mall-auth/oauth/token" - - "/mall-auth/rsa/publicKey" + - "/mall-auth/**" - "/mall-search/**" - "/mall-portal/sso/login" - "/mall-portal/sso/register" @@ -77,11 +71,51 @@ secure: - "/mall-admin/admin/login" - "/mall-admin/admin/register" - "/mall-admin/minio/upload" -management: #开启SpringBoot Admin的监控 +management: endpoints: web: exposure: - include: '*' + include: '*' #暴露Actuator的监控端点 endpoint: health: - show-details: always + show-details: always #显示健康的详细信息 + env: + show-values: always #默认Actuator的环境变量会以****显示,这里开启显示 + configprops: + show-values: always #默认Actuator的配置属性会以****显示,这里开启显示 + info: + enabled: true +knife4j: + gateway: + enabled: true + strategy: discover #网关文档聚合方式:服务发现(自动聚合) + discover: + version: openapi3 #配置OpenAPI3规范 + enabled: true #配置开启服务发现 + excluded-services: mall-monitor #排除监控服务 + tags-sorter: order #配置tag排序规则 + operations-sorter: order #配置operation排序规则 +sa-token: + # token名称 (同时也是cookie名称) + token-name: Authorization + # token有效期,单位秒,-1代表永不过期 + timeout: 2592000 + # token临时有效期 (指定时间内无操作就视为token过期),单位秒 + active-timeout: -1 + # 是否允许同一账号并发登录 (为false时新登录挤掉旧登录) + is-concurrent: true + # 在多人登录同一账号时,是否共用一个token (为false时每次登录新建一个token) + is-share: false + # token风格 + token-style: uuid + # 是否输出操作日志 + is-log: false + # 是否从cookie中读取token + is-read-cookie: false + # 是否从head中读取token + is-read-header: true + # token前缀 + token-prefix: Bearer + # 是否打印banner + is-print: false + diff --git a/mall-mbg/pom.xml b/mall-mbg/pom.xml index 216b043..e53f491 100644 --- a/mall-mbg/pom.xml +++ b/mall-mbg/pom.xml @@ -27,6 +27,10 @@ com.github.pagehelper pagehelper-spring-boot-starter + + org.mybatis.spring.boot + mybatis-spring-boot-starter + com.alibaba druid-spring-boot-starter diff --git a/mall-mbg/src/main/java/com/macro/mall/CommentGenerator.java b/mall-mbg/src/main/java/com/macro/mall/CommentGenerator.java index dd93ff8..9aca6e8 100644 --- a/mall-mbg/src/main/java/com/macro/mall/CommentGenerator.java +++ b/mall-mbg/src/main/java/com/macro/mall/CommentGenerator.java @@ -18,7 +18,7 @@ public class CommentGenerator extends DefaultCommentGenerator { private boolean addRemarkComments = false; private static final String EXAMPLE_SUFFIX="Example"; private static final String MAPPER_SUFFIX="Mapper"; - private static final String API_MODEL_PROPERTY_FULL_CLASS_NAME="io.swagger.annotations.ApiModelProperty"; + private static final String API_MODEL_PROPERTY_FULL_CLASS_NAME="io.swagger.v3.oas.annotations.media.Schema"; /** * 设置用户配置的参数 @@ -36,7 +36,7 @@ public class CommentGenerator extends DefaultCommentGenerator { public void addFieldComment(Field field, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn) { String remarks = introspectedColumn.getRemarks(); - //根据参数和备注信息判断是否添加备注信息 + //根据参数和备注信息判断是否添加swagger注解信息 if(addRemarkComments&&StringUtility.stringHasValue(remarks)){ // addFieldJavaDoc(field, remarks); //数据库中特殊字符需要转义 @@ -44,7 +44,7 @@ public class CommentGenerator extends DefaultCommentGenerator { remarks = remarks.replace("\"","'"); } //给model的字段添加swagger注解 - field.addJavaDocLine("@ApiModelProperty(value = \""+remarks+"\")"); + field.addJavaDocLine("@Schema(title = \""+remarks+"\")"); } } diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/CmsHelpCategoryMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/CmsHelpCategoryMapper.java index a0fb7b2..f458690 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/CmsHelpCategoryMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/CmsHelpCategoryMapper.java @@ -12,19 +12,19 @@ public interface CmsHelpCategoryMapper { int deleteByPrimaryKey(Long id); - int insert(CmsHelpCategory record); + int insert(CmsHelpCategory row); - int insertSelective(CmsHelpCategory record); + int insertSelective(CmsHelpCategory row); List selectByExample(CmsHelpCategoryExample example); CmsHelpCategory selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") CmsHelpCategory record, @Param("example") CmsHelpCategoryExample example); + int updateByExampleSelective(@Param("row") CmsHelpCategory row, @Param("example") CmsHelpCategoryExample example); - int updateByExample(@Param("record") CmsHelpCategory record, @Param("example") CmsHelpCategoryExample example); + int updateByExample(@Param("row") CmsHelpCategory row, @Param("example") CmsHelpCategoryExample example); - int updateByPrimaryKeySelective(CmsHelpCategory record); + int updateByPrimaryKeySelective(CmsHelpCategory row); - int updateByPrimaryKey(CmsHelpCategory record); + int updateByPrimaryKey(CmsHelpCategory row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/CmsHelpMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/CmsHelpMapper.java index d29aebc..3e9af18 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/CmsHelpMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/CmsHelpMapper.java @@ -12,9 +12,9 @@ public interface CmsHelpMapper { int deleteByPrimaryKey(Long id); - int insert(CmsHelp record); + int insert(CmsHelp row); - int insertSelective(CmsHelp record); + int insertSelective(CmsHelp row); List selectByExampleWithBLOBs(CmsHelpExample example); @@ -22,15 +22,15 @@ public interface CmsHelpMapper { CmsHelp selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") CmsHelp record, @Param("example") CmsHelpExample example); + int updateByExampleSelective(@Param("row") CmsHelp row, @Param("example") CmsHelpExample example); - int updateByExampleWithBLOBs(@Param("record") CmsHelp record, @Param("example") CmsHelpExample example); + int updateByExampleWithBLOBs(@Param("row") CmsHelp row, @Param("example") CmsHelpExample example); - int updateByExample(@Param("record") CmsHelp record, @Param("example") CmsHelpExample example); + int updateByExample(@Param("row") CmsHelp row, @Param("example") CmsHelpExample example); - int updateByPrimaryKeySelective(CmsHelp record); + int updateByPrimaryKeySelective(CmsHelp row); - int updateByPrimaryKeyWithBLOBs(CmsHelp record); + int updateByPrimaryKeyWithBLOBs(CmsHelp row); - int updateByPrimaryKey(CmsHelp record); + int updateByPrimaryKey(CmsHelp row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/CmsMemberReportMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/CmsMemberReportMapper.java index 48979a7..0a1569f 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/CmsMemberReportMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/CmsMemberReportMapper.java @@ -10,13 +10,13 @@ public interface CmsMemberReportMapper { int deleteByExample(CmsMemberReportExample example); - int insert(CmsMemberReport record); + int insert(CmsMemberReport row); - int insertSelective(CmsMemberReport record); + int insertSelective(CmsMemberReport row); List selectByExample(CmsMemberReportExample example); - int updateByExampleSelective(@Param("record") CmsMemberReport record, @Param("example") CmsMemberReportExample example); + int updateByExampleSelective(@Param("row") CmsMemberReport row, @Param("example") CmsMemberReportExample example); - int updateByExample(@Param("record") CmsMemberReport record, @Param("example") CmsMemberReportExample example); + int updateByExample(@Param("row") CmsMemberReport row, @Param("example") CmsMemberReportExample example); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/CmsPrefrenceAreaMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/CmsPrefrenceAreaMapper.java index 916405f..b148de9 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/CmsPrefrenceAreaMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/CmsPrefrenceAreaMapper.java @@ -12,9 +12,9 @@ public interface CmsPrefrenceAreaMapper { int deleteByPrimaryKey(Long id); - int insert(CmsPrefrenceArea record); + int insert(CmsPrefrenceArea row); - int insertSelective(CmsPrefrenceArea record); + int insertSelective(CmsPrefrenceArea row); List selectByExampleWithBLOBs(CmsPrefrenceAreaExample example); @@ -22,15 +22,15 @@ public interface CmsPrefrenceAreaMapper { CmsPrefrenceArea selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") CmsPrefrenceArea record, @Param("example") CmsPrefrenceAreaExample example); + int updateByExampleSelective(@Param("row") CmsPrefrenceArea row, @Param("example") CmsPrefrenceAreaExample example); - int updateByExampleWithBLOBs(@Param("record") CmsPrefrenceArea record, @Param("example") CmsPrefrenceAreaExample example); + int updateByExampleWithBLOBs(@Param("row") CmsPrefrenceArea row, @Param("example") CmsPrefrenceAreaExample example); - int updateByExample(@Param("record") CmsPrefrenceArea record, @Param("example") CmsPrefrenceAreaExample example); + int updateByExample(@Param("row") CmsPrefrenceArea row, @Param("example") CmsPrefrenceAreaExample example); - int updateByPrimaryKeySelective(CmsPrefrenceArea record); + int updateByPrimaryKeySelective(CmsPrefrenceArea row); - int updateByPrimaryKeyWithBLOBs(CmsPrefrenceArea record); + int updateByPrimaryKeyWithBLOBs(CmsPrefrenceArea row); - int updateByPrimaryKey(CmsPrefrenceArea record); + int updateByPrimaryKey(CmsPrefrenceArea row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/CmsPrefrenceAreaProductRelationMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/CmsPrefrenceAreaProductRelationMapper.java index 3ede77a..c31163c 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/CmsPrefrenceAreaProductRelationMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/CmsPrefrenceAreaProductRelationMapper.java @@ -12,19 +12,19 @@ public interface CmsPrefrenceAreaProductRelationMapper { int deleteByPrimaryKey(Long id); - int insert(CmsPrefrenceAreaProductRelation record); + int insert(CmsPrefrenceAreaProductRelation row); - int insertSelective(CmsPrefrenceAreaProductRelation record); + int insertSelective(CmsPrefrenceAreaProductRelation row); List selectByExample(CmsPrefrenceAreaProductRelationExample example); CmsPrefrenceAreaProductRelation selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") CmsPrefrenceAreaProductRelation record, @Param("example") CmsPrefrenceAreaProductRelationExample example); + int updateByExampleSelective(@Param("row") CmsPrefrenceAreaProductRelation row, @Param("example") CmsPrefrenceAreaProductRelationExample example); - int updateByExample(@Param("record") CmsPrefrenceAreaProductRelation record, @Param("example") CmsPrefrenceAreaProductRelationExample example); + int updateByExample(@Param("row") CmsPrefrenceAreaProductRelation row, @Param("example") CmsPrefrenceAreaProductRelationExample example); - int updateByPrimaryKeySelective(CmsPrefrenceAreaProductRelation record); + int updateByPrimaryKeySelective(CmsPrefrenceAreaProductRelation row); - int updateByPrimaryKey(CmsPrefrenceAreaProductRelation record); + int updateByPrimaryKey(CmsPrefrenceAreaProductRelation row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/CmsSubjectCategoryMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/CmsSubjectCategoryMapper.java index 08d673e..ce783d1 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/CmsSubjectCategoryMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/CmsSubjectCategoryMapper.java @@ -12,19 +12,19 @@ public interface CmsSubjectCategoryMapper { int deleteByPrimaryKey(Long id); - int insert(CmsSubjectCategory record); + int insert(CmsSubjectCategory row); - int insertSelective(CmsSubjectCategory record); + int insertSelective(CmsSubjectCategory row); List selectByExample(CmsSubjectCategoryExample example); CmsSubjectCategory selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") CmsSubjectCategory record, @Param("example") CmsSubjectCategoryExample example); + int updateByExampleSelective(@Param("row") CmsSubjectCategory row, @Param("example") CmsSubjectCategoryExample example); - int updateByExample(@Param("record") CmsSubjectCategory record, @Param("example") CmsSubjectCategoryExample example); + int updateByExample(@Param("row") CmsSubjectCategory row, @Param("example") CmsSubjectCategoryExample example); - int updateByPrimaryKeySelective(CmsSubjectCategory record); + int updateByPrimaryKeySelective(CmsSubjectCategory row); - int updateByPrimaryKey(CmsSubjectCategory record); + int updateByPrimaryKey(CmsSubjectCategory row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/CmsSubjectCommentMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/CmsSubjectCommentMapper.java index d0eeabe..932c55a 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/CmsSubjectCommentMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/CmsSubjectCommentMapper.java @@ -12,19 +12,19 @@ public interface CmsSubjectCommentMapper { int deleteByPrimaryKey(Long id); - int insert(CmsSubjectComment record); + int insert(CmsSubjectComment row); - int insertSelective(CmsSubjectComment record); + int insertSelective(CmsSubjectComment row); List selectByExample(CmsSubjectCommentExample example); CmsSubjectComment selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") CmsSubjectComment record, @Param("example") CmsSubjectCommentExample example); + int updateByExampleSelective(@Param("row") CmsSubjectComment row, @Param("example") CmsSubjectCommentExample example); - int updateByExample(@Param("record") CmsSubjectComment record, @Param("example") CmsSubjectCommentExample example); + int updateByExample(@Param("row") CmsSubjectComment row, @Param("example") CmsSubjectCommentExample example); - int updateByPrimaryKeySelective(CmsSubjectComment record); + int updateByPrimaryKeySelective(CmsSubjectComment row); - int updateByPrimaryKey(CmsSubjectComment record); + int updateByPrimaryKey(CmsSubjectComment row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/CmsSubjectMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/CmsSubjectMapper.java index eeb679c..499591f 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/CmsSubjectMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/CmsSubjectMapper.java @@ -12,9 +12,9 @@ public interface CmsSubjectMapper { int deleteByPrimaryKey(Long id); - int insert(CmsSubject record); + int insert(CmsSubject row); - int insertSelective(CmsSubject record); + int insertSelective(CmsSubject row); List selectByExampleWithBLOBs(CmsSubjectExample example); @@ -22,15 +22,15 @@ public interface CmsSubjectMapper { CmsSubject selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") CmsSubject record, @Param("example") CmsSubjectExample example); + int updateByExampleSelective(@Param("row") CmsSubject row, @Param("example") CmsSubjectExample example); - int updateByExampleWithBLOBs(@Param("record") CmsSubject record, @Param("example") CmsSubjectExample example); + int updateByExampleWithBLOBs(@Param("row") CmsSubject row, @Param("example") CmsSubjectExample example); - int updateByExample(@Param("record") CmsSubject record, @Param("example") CmsSubjectExample example); + int updateByExample(@Param("row") CmsSubject row, @Param("example") CmsSubjectExample example); - int updateByPrimaryKeySelective(CmsSubject record); + int updateByPrimaryKeySelective(CmsSubject row); - int updateByPrimaryKeyWithBLOBs(CmsSubject record); + int updateByPrimaryKeyWithBLOBs(CmsSubject row); - int updateByPrimaryKey(CmsSubject record); + int updateByPrimaryKey(CmsSubject row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/CmsSubjectProductRelationMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/CmsSubjectProductRelationMapper.java index ccff433..a627855 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/CmsSubjectProductRelationMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/CmsSubjectProductRelationMapper.java @@ -12,19 +12,19 @@ public interface CmsSubjectProductRelationMapper { int deleteByPrimaryKey(Long id); - int insert(CmsSubjectProductRelation record); + int insert(CmsSubjectProductRelation row); - int insertSelective(CmsSubjectProductRelation record); + int insertSelective(CmsSubjectProductRelation row); List selectByExample(CmsSubjectProductRelationExample example); CmsSubjectProductRelation selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") CmsSubjectProductRelation record, @Param("example") CmsSubjectProductRelationExample example); + int updateByExampleSelective(@Param("row") CmsSubjectProductRelation row, @Param("example") CmsSubjectProductRelationExample example); - int updateByExample(@Param("record") CmsSubjectProductRelation record, @Param("example") CmsSubjectProductRelationExample example); + int updateByExample(@Param("row") CmsSubjectProductRelation row, @Param("example") CmsSubjectProductRelationExample example); - int updateByPrimaryKeySelective(CmsSubjectProductRelation record); + int updateByPrimaryKeySelective(CmsSubjectProductRelation row); - int updateByPrimaryKey(CmsSubjectProductRelation record); + int updateByPrimaryKey(CmsSubjectProductRelation row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/CmsTopicCategoryMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/CmsTopicCategoryMapper.java index d6e6b1e..ada71c3 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/CmsTopicCategoryMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/CmsTopicCategoryMapper.java @@ -12,19 +12,19 @@ public interface CmsTopicCategoryMapper { int deleteByPrimaryKey(Long id); - int insert(CmsTopicCategory record); + int insert(CmsTopicCategory row); - int insertSelective(CmsTopicCategory record); + int insertSelective(CmsTopicCategory row); List selectByExample(CmsTopicCategoryExample example); CmsTopicCategory selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") CmsTopicCategory record, @Param("example") CmsTopicCategoryExample example); + int updateByExampleSelective(@Param("row") CmsTopicCategory row, @Param("example") CmsTopicCategoryExample example); - int updateByExample(@Param("record") CmsTopicCategory record, @Param("example") CmsTopicCategoryExample example); + int updateByExample(@Param("row") CmsTopicCategory row, @Param("example") CmsTopicCategoryExample example); - int updateByPrimaryKeySelective(CmsTopicCategory record); + int updateByPrimaryKeySelective(CmsTopicCategory row); - int updateByPrimaryKey(CmsTopicCategory record); + int updateByPrimaryKey(CmsTopicCategory row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/CmsTopicCommentMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/CmsTopicCommentMapper.java index 82fde9a..197bf35 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/CmsTopicCommentMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/CmsTopicCommentMapper.java @@ -12,19 +12,19 @@ public interface CmsTopicCommentMapper { int deleteByPrimaryKey(Long id); - int insert(CmsTopicComment record); + int insert(CmsTopicComment row); - int insertSelective(CmsTopicComment record); + int insertSelective(CmsTopicComment row); List selectByExample(CmsTopicCommentExample example); CmsTopicComment selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") CmsTopicComment record, @Param("example") CmsTopicCommentExample example); + int updateByExampleSelective(@Param("row") CmsTopicComment row, @Param("example") CmsTopicCommentExample example); - int updateByExample(@Param("record") CmsTopicComment record, @Param("example") CmsTopicCommentExample example); + int updateByExample(@Param("row") CmsTopicComment row, @Param("example") CmsTopicCommentExample example); - int updateByPrimaryKeySelective(CmsTopicComment record); + int updateByPrimaryKeySelective(CmsTopicComment row); - int updateByPrimaryKey(CmsTopicComment record); + int updateByPrimaryKey(CmsTopicComment row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/CmsTopicMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/CmsTopicMapper.java index 7411b0c..fdbd1aa 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/CmsTopicMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/CmsTopicMapper.java @@ -12,9 +12,9 @@ public interface CmsTopicMapper { int deleteByPrimaryKey(Long id); - int insert(CmsTopic record); + int insert(CmsTopic row); - int insertSelective(CmsTopic record); + int insertSelective(CmsTopic row); List selectByExampleWithBLOBs(CmsTopicExample example); @@ -22,15 +22,15 @@ public interface CmsTopicMapper { CmsTopic selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") CmsTopic record, @Param("example") CmsTopicExample example); + int updateByExampleSelective(@Param("row") CmsTopic row, @Param("example") CmsTopicExample example); - int updateByExampleWithBLOBs(@Param("record") CmsTopic record, @Param("example") CmsTopicExample example); + int updateByExampleWithBLOBs(@Param("row") CmsTopic row, @Param("example") CmsTopicExample example); - int updateByExample(@Param("record") CmsTopic record, @Param("example") CmsTopicExample example); + int updateByExample(@Param("row") CmsTopic row, @Param("example") CmsTopicExample example); - int updateByPrimaryKeySelective(CmsTopic record); + int updateByPrimaryKeySelective(CmsTopic row); - int updateByPrimaryKeyWithBLOBs(CmsTopic record); + int updateByPrimaryKeyWithBLOBs(CmsTopic row); - int updateByPrimaryKey(CmsTopic record); + int updateByPrimaryKey(CmsTopic row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/OmsCartItemMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/OmsCartItemMapper.java index 7d6d6f1..c305630 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/OmsCartItemMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/OmsCartItemMapper.java @@ -12,19 +12,19 @@ public interface OmsCartItemMapper { int deleteByPrimaryKey(Long id); - int insert(OmsCartItem record); + int insert(OmsCartItem row); - int insertSelective(OmsCartItem record); + int insertSelective(OmsCartItem row); List selectByExample(OmsCartItemExample example); OmsCartItem selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") OmsCartItem record, @Param("example") OmsCartItemExample example); + int updateByExampleSelective(@Param("row") OmsCartItem row, @Param("example") OmsCartItemExample example); - int updateByExample(@Param("record") OmsCartItem record, @Param("example") OmsCartItemExample example); + int updateByExample(@Param("row") OmsCartItem row, @Param("example") OmsCartItemExample example); - int updateByPrimaryKeySelective(OmsCartItem record); + int updateByPrimaryKeySelective(OmsCartItem row); - int updateByPrimaryKey(OmsCartItem record); + int updateByPrimaryKey(OmsCartItem row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/OmsCompanyAddressMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/OmsCompanyAddressMapper.java index b2345b8..e3d6d63 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/OmsCompanyAddressMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/OmsCompanyAddressMapper.java @@ -12,19 +12,19 @@ public interface OmsCompanyAddressMapper { int deleteByPrimaryKey(Long id); - int insert(OmsCompanyAddress record); + int insert(OmsCompanyAddress row); - int insertSelective(OmsCompanyAddress record); + int insertSelective(OmsCompanyAddress row); List selectByExample(OmsCompanyAddressExample example); OmsCompanyAddress selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") OmsCompanyAddress record, @Param("example") OmsCompanyAddressExample example); + int updateByExampleSelective(@Param("row") OmsCompanyAddress row, @Param("example") OmsCompanyAddressExample example); - int updateByExample(@Param("record") OmsCompanyAddress record, @Param("example") OmsCompanyAddressExample example); + int updateByExample(@Param("row") OmsCompanyAddress row, @Param("example") OmsCompanyAddressExample example); - int updateByPrimaryKeySelective(OmsCompanyAddress record); + int updateByPrimaryKeySelective(OmsCompanyAddress row); - int updateByPrimaryKey(OmsCompanyAddress record); + int updateByPrimaryKey(OmsCompanyAddress row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/OmsOrderItemMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/OmsOrderItemMapper.java index 026e13e..78c8034 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/OmsOrderItemMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/OmsOrderItemMapper.java @@ -12,19 +12,19 @@ public interface OmsOrderItemMapper { int deleteByPrimaryKey(Long id); - int insert(OmsOrderItem record); + int insert(OmsOrderItem row); - int insertSelective(OmsOrderItem record); + int insertSelective(OmsOrderItem row); List selectByExample(OmsOrderItemExample example); OmsOrderItem selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") OmsOrderItem record, @Param("example") OmsOrderItemExample example); + int updateByExampleSelective(@Param("row") OmsOrderItem row, @Param("example") OmsOrderItemExample example); - int updateByExample(@Param("record") OmsOrderItem record, @Param("example") OmsOrderItemExample example); + int updateByExample(@Param("row") OmsOrderItem row, @Param("example") OmsOrderItemExample example); - int updateByPrimaryKeySelective(OmsOrderItem record); + int updateByPrimaryKeySelective(OmsOrderItem row); - int updateByPrimaryKey(OmsOrderItem record); + int updateByPrimaryKey(OmsOrderItem row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/OmsOrderMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/OmsOrderMapper.java index 9379cf3..88433ab 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/OmsOrderMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/OmsOrderMapper.java @@ -12,19 +12,19 @@ public interface OmsOrderMapper { int deleteByPrimaryKey(Long id); - int insert(OmsOrder record); + int insert(OmsOrder row); - int insertSelective(OmsOrder record); + int insertSelective(OmsOrder row); List selectByExample(OmsOrderExample example); OmsOrder selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") OmsOrder record, @Param("example") OmsOrderExample example); + int updateByExampleSelective(@Param("row") OmsOrder row, @Param("example") OmsOrderExample example); - int updateByExample(@Param("record") OmsOrder record, @Param("example") OmsOrderExample example); + int updateByExample(@Param("row") OmsOrder row, @Param("example") OmsOrderExample example); - int updateByPrimaryKeySelective(OmsOrder record); + int updateByPrimaryKeySelective(OmsOrder row); - int updateByPrimaryKey(OmsOrder record); + int updateByPrimaryKey(OmsOrder row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/OmsOrderOperateHistoryMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/OmsOrderOperateHistoryMapper.java index 20e445a..4a98317 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/OmsOrderOperateHistoryMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/OmsOrderOperateHistoryMapper.java @@ -12,19 +12,19 @@ public interface OmsOrderOperateHistoryMapper { int deleteByPrimaryKey(Long id); - int insert(OmsOrderOperateHistory record); + int insert(OmsOrderOperateHistory row); - int insertSelective(OmsOrderOperateHistory record); + int insertSelective(OmsOrderOperateHistory row); List selectByExample(OmsOrderOperateHistoryExample example); OmsOrderOperateHistory selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") OmsOrderOperateHistory record, @Param("example") OmsOrderOperateHistoryExample example); + int updateByExampleSelective(@Param("row") OmsOrderOperateHistory row, @Param("example") OmsOrderOperateHistoryExample example); - int updateByExample(@Param("record") OmsOrderOperateHistory record, @Param("example") OmsOrderOperateHistoryExample example); + int updateByExample(@Param("row") OmsOrderOperateHistory row, @Param("example") OmsOrderOperateHistoryExample example); - int updateByPrimaryKeySelective(OmsOrderOperateHistory record); + int updateByPrimaryKeySelective(OmsOrderOperateHistory row); - int updateByPrimaryKey(OmsOrderOperateHistory record); + int updateByPrimaryKey(OmsOrderOperateHistory row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/OmsOrderReturnApplyMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/OmsOrderReturnApplyMapper.java index 660c747..c24faeb 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/OmsOrderReturnApplyMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/OmsOrderReturnApplyMapper.java @@ -12,19 +12,19 @@ public interface OmsOrderReturnApplyMapper { int deleteByPrimaryKey(Long id); - int insert(OmsOrderReturnApply record); + int insert(OmsOrderReturnApply row); - int insertSelective(OmsOrderReturnApply record); + int insertSelective(OmsOrderReturnApply row); List selectByExample(OmsOrderReturnApplyExample example); OmsOrderReturnApply selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") OmsOrderReturnApply record, @Param("example") OmsOrderReturnApplyExample example); + int updateByExampleSelective(@Param("row") OmsOrderReturnApply row, @Param("example") OmsOrderReturnApplyExample example); - int updateByExample(@Param("record") OmsOrderReturnApply record, @Param("example") OmsOrderReturnApplyExample example); + int updateByExample(@Param("row") OmsOrderReturnApply row, @Param("example") OmsOrderReturnApplyExample example); - int updateByPrimaryKeySelective(OmsOrderReturnApply record); + int updateByPrimaryKeySelective(OmsOrderReturnApply row); - int updateByPrimaryKey(OmsOrderReturnApply record); + int updateByPrimaryKey(OmsOrderReturnApply row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/OmsOrderReturnReasonMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/OmsOrderReturnReasonMapper.java index d980d42..d2c42ef 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/OmsOrderReturnReasonMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/OmsOrderReturnReasonMapper.java @@ -12,19 +12,19 @@ public interface OmsOrderReturnReasonMapper { int deleteByPrimaryKey(Long id); - int insert(OmsOrderReturnReason record); + int insert(OmsOrderReturnReason row); - int insertSelective(OmsOrderReturnReason record); + int insertSelective(OmsOrderReturnReason row); List selectByExample(OmsOrderReturnReasonExample example); OmsOrderReturnReason selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") OmsOrderReturnReason record, @Param("example") OmsOrderReturnReasonExample example); + int updateByExampleSelective(@Param("row") OmsOrderReturnReason row, @Param("example") OmsOrderReturnReasonExample example); - int updateByExample(@Param("record") OmsOrderReturnReason record, @Param("example") OmsOrderReturnReasonExample example); + int updateByExample(@Param("row") OmsOrderReturnReason row, @Param("example") OmsOrderReturnReasonExample example); - int updateByPrimaryKeySelective(OmsOrderReturnReason record); + int updateByPrimaryKeySelective(OmsOrderReturnReason row); - int updateByPrimaryKey(OmsOrderReturnReason record); + int updateByPrimaryKey(OmsOrderReturnReason row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/OmsOrderSettingMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/OmsOrderSettingMapper.java index e555cb8..c2fc854 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/OmsOrderSettingMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/OmsOrderSettingMapper.java @@ -12,19 +12,19 @@ public interface OmsOrderSettingMapper { int deleteByPrimaryKey(Long id); - int insert(OmsOrderSetting record); + int insert(OmsOrderSetting row); - int insertSelective(OmsOrderSetting record); + int insertSelective(OmsOrderSetting row); List selectByExample(OmsOrderSettingExample example); OmsOrderSetting selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") OmsOrderSetting record, @Param("example") OmsOrderSettingExample example); + int updateByExampleSelective(@Param("row") OmsOrderSetting row, @Param("example") OmsOrderSettingExample example); - int updateByExample(@Param("record") OmsOrderSetting record, @Param("example") OmsOrderSettingExample example); + int updateByExample(@Param("row") OmsOrderSetting row, @Param("example") OmsOrderSettingExample example); - int updateByPrimaryKeySelective(OmsOrderSetting record); + int updateByPrimaryKeySelective(OmsOrderSetting row); - int updateByPrimaryKey(OmsOrderSetting record); + int updateByPrimaryKey(OmsOrderSetting row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/PmsAlbumMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/PmsAlbumMapper.java index d8172ab..1d842be 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/PmsAlbumMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/PmsAlbumMapper.java @@ -12,19 +12,19 @@ public interface PmsAlbumMapper { int deleteByPrimaryKey(Long id); - int insert(PmsAlbum record); + int insert(PmsAlbum row); - int insertSelective(PmsAlbum record); + int insertSelective(PmsAlbum row); List selectByExample(PmsAlbumExample example); PmsAlbum selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") PmsAlbum record, @Param("example") PmsAlbumExample example); + int updateByExampleSelective(@Param("row") PmsAlbum row, @Param("example") PmsAlbumExample example); - int updateByExample(@Param("record") PmsAlbum record, @Param("example") PmsAlbumExample example); + int updateByExample(@Param("row") PmsAlbum row, @Param("example") PmsAlbumExample example); - int updateByPrimaryKeySelective(PmsAlbum record); + int updateByPrimaryKeySelective(PmsAlbum row); - int updateByPrimaryKey(PmsAlbum record); + int updateByPrimaryKey(PmsAlbum row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/PmsAlbumPicMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/PmsAlbumPicMapper.java index 0d04ecf..93ba7fa 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/PmsAlbumPicMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/PmsAlbumPicMapper.java @@ -12,19 +12,19 @@ public interface PmsAlbumPicMapper { int deleteByPrimaryKey(Long id); - int insert(PmsAlbumPic record); + int insert(PmsAlbumPic row); - int insertSelective(PmsAlbumPic record); + int insertSelective(PmsAlbumPic row); List selectByExample(PmsAlbumPicExample example); PmsAlbumPic selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") PmsAlbumPic record, @Param("example") PmsAlbumPicExample example); + int updateByExampleSelective(@Param("row") PmsAlbumPic row, @Param("example") PmsAlbumPicExample example); - int updateByExample(@Param("record") PmsAlbumPic record, @Param("example") PmsAlbumPicExample example); + int updateByExample(@Param("row") PmsAlbumPic row, @Param("example") PmsAlbumPicExample example); - int updateByPrimaryKeySelective(PmsAlbumPic record); + int updateByPrimaryKeySelective(PmsAlbumPic row); - int updateByPrimaryKey(PmsAlbumPic record); + int updateByPrimaryKey(PmsAlbumPic row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/PmsBrandMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/PmsBrandMapper.java index e00c2ad..948d139 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/PmsBrandMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/PmsBrandMapper.java @@ -12,9 +12,9 @@ public interface PmsBrandMapper { int deleteByPrimaryKey(Long id); - int insert(PmsBrand record); + int insert(PmsBrand row); - int insertSelective(PmsBrand record); + int insertSelective(PmsBrand row); List selectByExampleWithBLOBs(PmsBrandExample example); @@ -22,15 +22,15 @@ public interface PmsBrandMapper { PmsBrand selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") PmsBrand record, @Param("example") PmsBrandExample example); + int updateByExampleSelective(@Param("row") PmsBrand row, @Param("example") PmsBrandExample example); - int updateByExampleWithBLOBs(@Param("record") PmsBrand record, @Param("example") PmsBrandExample example); + int updateByExampleWithBLOBs(@Param("row") PmsBrand row, @Param("example") PmsBrandExample example); - int updateByExample(@Param("record") PmsBrand record, @Param("example") PmsBrandExample example); + int updateByExample(@Param("row") PmsBrand row, @Param("example") PmsBrandExample example); - int updateByPrimaryKeySelective(PmsBrand record); + int updateByPrimaryKeySelective(PmsBrand row); - int updateByPrimaryKeyWithBLOBs(PmsBrand record); + int updateByPrimaryKeyWithBLOBs(PmsBrand row); - int updateByPrimaryKey(PmsBrand record); + int updateByPrimaryKey(PmsBrand row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/PmsCommentMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/PmsCommentMapper.java index fe1f7e8..934c698 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/PmsCommentMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/PmsCommentMapper.java @@ -12,9 +12,9 @@ public interface PmsCommentMapper { int deleteByPrimaryKey(Long id); - int insert(PmsComment record); + int insert(PmsComment row); - int insertSelective(PmsComment record); + int insertSelective(PmsComment row); List selectByExampleWithBLOBs(PmsCommentExample example); @@ -22,15 +22,15 @@ public interface PmsCommentMapper { PmsComment selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") PmsComment record, @Param("example") PmsCommentExample example); + int updateByExampleSelective(@Param("row") PmsComment row, @Param("example") PmsCommentExample example); - int updateByExampleWithBLOBs(@Param("record") PmsComment record, @Param("example") PmsCommentExample example); + int updateByExampleWithBLOBs(@Param("row") PmsComment row, @Param("example") PmsCommentExample example); - int updateByExample(@Param("record") PmsComment record, @Param("example") PmsCommentExample example); + int updateByExample(@Param("row") PmsComment row, @Param("example") PmsCommentExample example); - int updateByPrimaryKeySelective(PmsComment record); + int updateByPrimaryKeySelective(PmsComment row); - int updateByPrimaryKeyWithBLOBs(PmsComment record); + int updateByPrimaryKeyWithBLOBs(PmsComment row); - int updateByPrimaryKey(PmsComment record); + int updateByPrimaryKey(PmsComment row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/PmsCommentReplayMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/PmsCommentReplayMapper.java index 2dfbf8e..a159051 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/PmsCommentReplayMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/PmsCommentReplayMapper.java @@ -12,19 +12,19 @@ public interface PmsCommentReplayMapper { int deleteByPrimaryKey(Long id); - int insert(PmsCommentReplay record); + int insert(PmsCommentReplay row); - int insertSelective(PmsCommentReplay record); + int insertSelective(PmsCommentReplay row); List selectByExample(PmsCommentReplayExample example); PmsCommentReplay selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") PmsCommentReplay record, @Param("example") PmsCommentReplayExample example); + int updateByExampleSelective(@Param("row") PmsCommentReplay row, @Param("example") PmsCommentReplayExample example); - int updateByExample(@Param("record") PmsCommentReplay record, @Param("example") PmsCommentReplayExample example); + int updateByExample(@Param("row") PmsCommentReplay row, @Param("example") PmsCommentReplayExample example); - int updateByPrimaryKeySelective(PmsCommentReplay record); + int updateByPrimaryKeySelective(PmsCommentReplay row); - int updateByPrimaryKey(PmsCommentReplay record); + int updateByPrimaryKey(PmsCommentReplay row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/PmsFeightTemplateMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/PmsFeightTemplateMapper.java index 241b18e..15e7f12 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/PmsFeightTemplateMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/PmsFeightTemplateMapper.java @@ -12,19 +12,19 @@ public interface PmsFeightTemplateMapper { int deleteByPrimaryKey(Long id); - int insert(PmsFeightTemplate record); + int insert(PmsFeightTemplate row); - int insertSelective(PmsFeightTemplate record); + int insertSelective(PmsFeightTemplate row); List selectByExample(PmsFeightTemplateExample example); PmsFeightTemplate selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") PmsFeightTemplate record, @Param("example") PmsFeightTemplateExample example); + int updateByExampleSelective(@Param("row") PmsFeightTemplate row, @Param("example") PmsFeightTemplateExample example); - int updateByExample(@Param("record") PmsFeightTemplate record, @Param("example") PmsFeightTemplateExample example); + int updateByExample(@Param("row") PmsFeightTemplate row, @Param("example") PmsFeightTemplateExample example); - int updateByPrimaryKeySelective(PmsFeightTemplate record); + int updateByPrimaryKeySelective(PmsFeightTemplate row); - int updateByPrimaryKey(PmsFeightTemplate record); + int updateByPrimaryKey(PmsFeightTemplate row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/PmsMemberPriceMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/PmsMemberPriceMapper.java index d96607d..8394a17 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/PmsMemberPriceMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/PmsMemberPriceMapper.java @@ -12,19 +12,19 @@ public interface PmsMemberPriceMapper { int deleteByPrimaryKey(Long id); - int insert(PmsMemberPrice record); + int insert(PmsMemberPrice row); - int insertSelective(PmsMemberPrice record); + int insertSelective(PmsMemberPrice row); List selectByExample(PmsMemberPriceExample example); PmsMemberPrice selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") PmsMemberPrice record, @Param("example") PmsMemberPriceExample example); + int updateByExampleSelective(@Param("row") PmsMemberPrice row, @Param("example") PmsMemberPriceExample example); - int updateByExample(@Param("record") PmsMemberPrice record, @Param("example") PmsMemberPriceExample example); + int updateByExample(@Param("row") PmsMemberPrice row, @Param("example") PmsMemberPriceExample example); - int updateByPrimaryKeySelective(PmsMemberPrice record); + int updateByPrimaryKeySelective(PmsMemberPrice row); - int updateByPrimaryKey(PmsMemberPrice record); + int updateByPrimaryKey(PmsMemberPrice row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductAttributeCategoryMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductAttributeCategoryMapper.java index 606f8a2..10624c5 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductAttributeCategoryMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductAttributeCategoryMapper.java @@ -12,19 +12,19 @@ public interface PmsProductAttributeCategoryMapper { int deleteByPrimaryKey(Long id); - int insert(PmsProductAttributeCategory record); + int insert(PmsProductAttributeCategory row); - int insertSelective(PmsProductAttributeCategory record); + int insertSelective(PmsProductAttributeCategory row); List selectByExample(PmsProductAttributeCategoryExample example); PmsProductAttributeCategory selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") PmsProductAttributeCategory record, @Param("example") PmsProductAttributeCategoryExample example); + int updateByExampleSelective(@Param("row") PmsProductAttributeCategory row, @Param("example") PmsProductAttributeCategoryExample example); - int updateByExample(@Param("record") PmsProductAttributeCategory record, @Param("example") PmsProductAttributeCategoryExample example); + int updateByExample(@Param("row") PmsProductAttributeCategory row, @Param("example") PmsProductAttributeCategoryExample example); - int updateByPrimaryKeySelective(PmsProductAttributeCategory record); + int updateByPrimaryKeySelective(PmsProductAttributeCategory row); - int updateByPrimaryKey(PmsProductAttributeCategory record); + int updateByPrimaryKey(PmsProductAttributeCategory row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductAttributeMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductAttributeMapper.java index 157b854..503751d 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductAttributeMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductAttributeMapper.java @@ -12,19 +12,19 @@ public interface PmsProductAttributeMapper { int deleteByPrimaryKey(Long id); - int insert(PmsProductAttribute record); + int insert(PmsProductAttribute row); - int insertSelective(PmsProductAttribute record); + int insertSelective(PmsProductAttribute row); List selectByExample(PmsProductAttributeExample example); PmsProductAttribute selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") PmsProductAttribute record, @Param("example") PmsProductAttributeExample example); + int updateByExampleSelective(@Param("row") PmsProductAttribute row, @Param("example") PmsProductAttributeExample example); - int updateByExample(@Param("record") PmsProductAttribute record, @Param("example") PmsProductAttributeExample example); + int updateByExample(@Param("row") PmsProductAttribute row, @Param("example") PmsProductAttributeExample example); - int updateByPrimaryKeySelective(PmsProductAttribute record); + int updateByPrimaryKeySelective(PmsProductAttribute row); - int updateByPrimaryKey(PmsProductAttribute record); + int updateByPrimaryKey(PmsProductAttribute row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductAttributeValueMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductAttributeValueMapper.java index eee5c07..bd2406c 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductAttributeValueMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductAttributeValueMapper.java @@ -12,19 +12,19 @@ public interface PmsProductAttributeValueMapper { int deleteByPrimaryKey(Long id); - int insert(PmsProductAttributeValue record); + int insert(PmsProductAttributeValue row); - int insertSelective(PmsProductAttributeValue record); + int insertSelective(PmsProductAttributeValue row); List selectByExample(PmsProductAttributeValueExample example); PmsProductAttributeValue selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") PmsProductAttributeValue record, @Param("example") PmsProductAttributeValueExample example); + int updateByExampleSelective(@Param("row") PmsProductAttributeValue row, @Param("example") PmsProductAttributeValueExample example); - int updateByExample(@Param("record") PmsProductAttributeValue record, @Param("example") PmsProductAttributeValueExample example); + int updateByExample(@Param("row") PmsProductAttributeValue row, @Param("example") PmsProductAttributeValueExample example); - int updateByPrimaryKeySelective(PmsProductAttributeValue record); + int updateByPrimaryKeySelective(PmsProductAttributeValue row); - int updateByPrimaryKey(PmsProductAttributeValue record); + int updateByPrimaryKey(PmsProductAttributeValue row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductCategoryAttributeRelationMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductCategoryAttributeRelationMapper.java index 6311f7c..7d604af 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductCategoryAttributeRelationMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductCategoryAttributeRelationMapper.java @@ -12,19 +12,19 @@ public interface PmsProductCategoryAttributeRelationMapper { int deleteByPrimaryKey(Long id); - int insert(PmsProductCategoryAttributeRelation record); + int insert(PmsProductCategoryAttributeRelation row); - int insertSelective(PmsProductCategoryAttributeRelation record); + int insertSelective(PmsProductCategoryAttributeRelation row); List selectByExample(PmsProductCategoryAttributeRelationExample example); PmsProductCategoryAttributeRelation selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") PmsProductCategoryAttributeRelation record, @Param("example") PmsProductCategoryAttributeRelationExample example); + int updateByExampleSelective(@Param("row") PmsProductCategoryAttributeRelation row, @Param("example") PmsProductCategoryAttributeRelationExample example); - int updateByExample(@Param("record") PmsProductCategoryAttributeRelation record, @Param("example") PmsProductCategoryAttributeRelationExample example); + int updateByExample(@Param("row") PmsProductCategoryAttributeRelation row, @Param("example") PmsProductCategoryAttributeRelationExample example); - int updateByPrimaryKeySelective(PmsProductCategoryAttributeRelation record); + int updateByPrimaryKeySelective(PmsProductCategoryAttributeRelation row); - int updateByPrimaryKey(PmsProductCategoryAttributeRelation record); + int updateByPrimaryKey(PmsProductCategoryAttributeRelation row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductCategoryMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductCategoryMapper.java index 3e35c2a..f933406 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductCategoryMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductCategoryMapper.java @@ -12,9 +12,9 @@ public interface PmsProductCategoryMapper { int deleteByPrimaryKey(Long id); - int insert(PmsProductCategory record); + int insert(PmsProductCategory row); - int insertSelective(PmsProductCategory record); + int insertSelective(PmsProductCategory row); List selectByExampleWithBLOBs(PmsProductCategoryExample example); @@ -22,15 +22,15 @@ public interface PmsProductCategoryMapper { PmsProductCategory selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") PmsProductCategory record, @Param("example") PmsProductCategoryExample example); + int updateByExampleSelective(@Param("row") PmsProductCategory row, @Param("example") PmsProductCategoryExample example); - int updateByExampleWithBLOBs(@Param("record") PmsProductCategory record, @Param("example") PmsProductCategoryExample example); + int updateByExampleWithBLOBs(@Param("row") PmsProductCategory row, @Param("example") PmsProductCategoryExample example); - int updateByExample(@Param("record") PmsProductCategory record, @Param("example") PmsProductCategoryExample example); + int updateByExample(@Param("row") PmsProductCategory row, @Param("example") PmsProductCategoryExample example); - int updateByPrimaryKeySelective(PmsProductCategory record); + int updateByPrimaryKeySelective(PmsProductCategory row); - int updateByPrimaryKeyWithBLOBs(PmsProductCategory record); + int updateByPrimaryKeyWithBLOBs(PmsProductCategory row); - int updateByPrimaryKey(PmsProductCategory record); + int updateByPrimaryKey(PmsProductCategory row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductFullReductionMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductFullReductionMapper.java index 193aab3..3303567 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductFullReductionMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductFullReductionMapper.java @@ -12,19 +12,19 @@ public interface PmsProductFullReductionMapper { int deleteByPrimaryKey(Long id); - int insert(PmsProductFullReduction record); + int insert(PmsProductFullReduction row); - int insertSelective(PmsProductFullReduction record); + int insertSelective(PmsProductFullReduction row); List selectByExample(PmsProductFullReductionExample example); PmsProductFullReduction selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") PmsProductFullReduction record, @Param("example") PmsProductFullReductionExample example); + int updateByExampleSelective(@Param("row") PmsProductFullReduction row, @Param("example") PmsProductFullReductionExample example); - int updateByExample(@Param("record") PmsProductFullReduction record, @Param("example") PmsProductFullReductionExample example); + int updateByExample(@Param("row") PmsProductFullReduction row, @Param("example") PmsProductFullReductionExample example); - int updateByPrimaryKeySelective(PmsProductFullReduction record); + int updateByPrimaryKeySelective(PmsProductFullReduction row); - int updateByPrimaryKey(PmsProductFullReduction record); + int updateByPrimaryKey(PmsProductFullReduction row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductLadderMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductLadderMapper.java index e2167aa..9738f3d 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductLadderMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductLadderMapper.java @@ -12,19 +12,19 @@ public interface PmsProductLadderMapper { int deleteByPrimaryKey(Long id); - int insert(PmsProductLadder record); + int insert(PmsProductLadder row); - int insertSelective(PmsProductLadder record); + int insertSelective(PmsProductLadder row); List selectByExample(PmsProductLadderExample example); PmsProductLadder selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") PmsProductLadder record, @Param("example") PmsProductLadderExample example); + int updateByExampleSelective(@Param("row") PmsProductLadder row, @Param("example") PmsProductLadderExample example); - int updateByExample(@Param("record") PmsProductLadder record, @Param("example") PmsProductLadderExample example); + int updateByExample(@Param("row") PmsProductLadder row, @Param("example") PmsProductLadderExample example); - int updateByPrimaryKeySelective(PmsProductLadder record); + int updateByPrimaryKeySelective(PmsProductLadder row); - int updateByPrimaryKey(PmsProductLadder record); + int updateByPrimaryKey(PmsProductLadder row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductMapper.java index 4b619b7..8fd9f9e 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductMapper.java @@ -12,9 +12,9 @@ public interface PmsProductMapper { int deleteByPrimaryKey(Long id); - int insert(PmsProduct record); + int insert(PmsProduct row); - int insertSelective(PmsProduct record); + int insertSelective(PmsProduct row); List selectByExampleWithBLOBs(PmsProductExample example); @@ -22,15 +22,15 @@ public interface PmsProductMapper { PmsProduct selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") PmsProduct record, @Param("example") PmsProductExample example); + int updateByExampleSelective(@Param("row") PmsProduct row, @Param("example") PmsProductExample example); - int updateByExampleWithBLOBs(@Param("record") PmsProduct record, @Param("example") PmsProductExample example); + int updateByExampleWithBLOBs(@Param("row") PmsProduct row, @Param("example") PmsProductExample example); - int updateByExample(@Param("record") PmsProduct record, @Param("example") PmsProductExample example); + int updateByExample(@Param("row") PmsProduct row, @Param("example") PmsProductExample example); - int updateByPrimaryKeySelective(PmsProduct record); + int updateByPrimaryKeySelective(PmsProduct row); - int updateByPrimaryKeyWithBLOBs(PmsProduct record); + int updateByPrimaryKeyWithBLOBs(PmsProduct row); - int updateByPrimaryKey(PmsProduct record); + int updateByPrimaryKey(PmsProduct row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductOperateLogMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductOperateLogMapper.java index 9b1474e..3d9049b 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductOperateLogMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductOperateLogMapper.java @@ -12,19 +12,19 @@ public interface PmsProductOperateLogMapper { int deleteByPrimaryKey(Long id); - int insert(PmsProductOperateLog record); + int insert(PmsProductOperateLog row); - int insertSelective(PmsProductOperateLog record); + int insertSelective(PmsProductOperateLog row); List selectByExample(PmsProductOperateLogExample example); PmsProductOperateLog selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") PmsProductOperateLog record, @Param("example") PmsProductOperateLogExample example); + int updateByExampleSelective(@Param("row") PmsProductOperateLog row, @Param("example") PmsProductOperateLogExample example); - int updateByExample(@Param("record") PmsProductOperateLog record, @Param("example") PmsProductOperateLogExample example); + int updateByExample(@Param("row") PmsProductOperateLog row, @Param("example") PmsProductOperateLogExample example); - int updateByPrimaryKeySelective(PmsProductOperateLog record); + int updateByPrimaryKeySelective(PmsProductOperateLog row); - int updateByPrimaryKey(PmsProductOperateLog record); + int updateByPrimaryKey(PmsProductOperateLog row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductVertifyRecordMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductVertifyRecordMapper.java index f8e048d..1246a7d 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductVertifyRecordMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/PmsProductVertifyRecordMapper.java @@ -12,19 +12,19 @@ public interface PmsProductVertifyRecordMapper { int deleteByPrimaryKey(Long id); - int insert(PmsProductVertifyRecord record); + int insert(PmsProductVertifyRecord row); - int insertSelective(PmsProductVertifyRecord record); + int insertSelective(PmsProductVertifyRecord row); List selectByExample(PmsProductVertifyRecordExample example); PmsProductVertifyRecord selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") PmsProductVertifyRecord record, @Param("example") PmsProductVertifyRecordExample example); + int updateByExampleSelective(@Param("row") PmsProductVertifyRecord row, @Param("example") PmsProductVertifyRecordExample example); - int updateByExample(@Param("record") PmsProductVertifyRecord record, @Param("example") PmsProductVertifyRecordExample example); + int updateByExample(@Param("row") PmsProductVertifyRecord row, @Param("example") PmsProductVertifyRecordExample example); - int updateByPrimaryKeySelective(PmsProductVertifyRecord record); + int updateByPrimaryKeySelective(PmsProductVertifyRecord row); - int updateByPrimaryKey(PmsProductVertifyRecord record); + int updateByPrimaryKey(PmsProductVertifyRecord row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/PmsSkuStockMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/PmsSkuStockMapper.java index 668115d..dc3d470 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/PmsSkuStockMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/PmsSkuStockMapper.java @@ -12,19 +12,19 @@ public interface PmsSkuStockMapper { int deleteByPrimaryKey(Long id); - int insert(PmsSkuStock record); + int insert(PmsSkuStock row); - int insertSelective(PmsSkuStock record); + int insertSelective(PmsSkuStock row); List selectByExample(PmsSkuStockExample example); PmsSkuStock selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") PmsSkuStock record, @Param("example") PmsSkuStockExample example); + int updateByExampleSelective(@Param("row") PmsSkuStock row, @Param("example") PmsSkuStockExample example); - int updateByExample(@Param("record") PmsSkuStock record, @Param("example") PmsSkuStockExample example); + int updateByExample(@Param("row") PmsSkuStock row, @Param("example") PmsSkuStockExample example); - int updateByPrimaryKeySelective(PmsSkuStock record); + int updateByPrimaryKeySelective(PmsSkuStock row); - int updateByPrimaryKey(PmsSkuStock record); + int updateByPrimaryKey(PmsSkuStock row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/SmsCouponHistoryMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/SmsCouponHistoryMapper.java index 672604d..6dabeae 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/SmsCouponHistoryMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/SmsCouponHistoryMapper.java @@ -12,19 +12,19 @@ public interface SmsCouponHistoryMapper { int deleteByPrimaryKey(Long id); - int insert(SmsCouponHistory record); + int insert(SmsCouponHistory row); - int insertSelective(SmsCouponHistory record); + int insertSelective(SmsCouponHistory row); List selectByExample(SmsCouponHistoryExample example); SmsCouponHistory selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") SmsCouponHistory record, @Param("example") SmsCouponHistoryExample example); + int updateByExampleSelective(@Param("row") SmsCouponHistory row, @Param("example") SmsCouponHistoryExample example); - int updateByExample(@Param("record") SmsCouponHistory record, @Param("example") SmsCouponHistoryExample example); + int updateByExample(@Param("row") SmsCouponHistory row, @Param("example") SmsCouponHistoryExample example); - int updateByPrimaryKeySelective(SmsCouponHistory record); + int updateByPrimaryKeySelective(SmsCouponHistory row); - int updateByPrimaryKey(SmsCouponHistory record); + int updateByPrimaryKey(SmsCouponHistory row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/SmsCouponMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/SmsCouponMapper.java index a6781a5..dda3535 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/SmsCouponMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/SmsCouponMapper.java @@ -12,19 +12,19 @@ public interface SmsCouponMapper { int deleteByPrimaryKey(Long id); - int insert(SmsCoupon record); + int insert(SmsCoupon row); - int insertSelective(SmsCoupon record); + int insertSelective(SmsCoupon row); List selectByExample(SmsCouponExample example); SmsCoupon selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") SmsCoupon record, @Param("example") SmsCouponExample example); + int updateByExampleSelective(@Param("row") SmsCoupon row, @Param("example") SmsCouponExample example); - int updateByExample(@Param("record") SmsCoupon record, @Param("example") SmsCouponExample example); + int updateByExample(@Param("row") SmsCoupon row, @Param("example") SmsCouponExample example); - int updateByPrimaryKeySelective(SmsCoupon record); + int updateByPrimaryKeySelective(SmsCoupon row); - int updateByPrimaryKey(SmsCoupon record); + int updateByPrimaryKey(SmsCoupon row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/SmsCouponProductCategoryRelationMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/SmsCouponProductCategoryRelationMapper.java index 419c28e..1d3d99e 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/SmsCouponProductCategoryRelationMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/SmsCouponProductCategoryRelationMapper.java @@ -12,19 +12,19 @@ public interface SmsCouponProductCategoryRelationMapper { int deleteByPrimaryKey(Long id); - int insert(SmsCouponProductCategoryRelation record); + int insert(SmsCouponProductCategoryRelation row); - int insertSelective(SmsCouponProductCategoryRelation record); + int insertSelective(SmsCouponProductCategoryRelation row); List selectByExample(SmsCouponProductCategoryRelationExample example); SmsCouponProductCategoryRelation selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") SmsCouponProductCategoryRelation record, @Param("example") SmsCouponProductCategoryRelationExample example); + int updateByExampleSelective(@Param("row") SmsCouponProductCategoryRelation row, @Param("example") SmsCouponProductCategoryRelationExample example); - int updateByExample(@Param("record") SmsCouponProductCategoryRelation record, @Param("example") SmsCouponProductCategoryRelationExample example); + int updateByExample(@Param("row") SmsCouponProductCategoryRelation row, @Param("example") SmsCouponProductCategoryRelationExample example); - int updateByPrimaryKeySelective(SmsCouponProductCategoryRelation record); + int updateByPrimaryKeySelective(SmsCouponProductCategoryRelation row); - int updateByPrimaryKey(SmsCouponProductCategoryRelation record); + int updateByPrimaryKey(SmsCouponProductCategoryRelation row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/SmsCouponProductRelationMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/SmsCouponProductRelationMapper.java index 0e77c32..967ed03 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/SmsCouponProductRelationMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/SmsCouponProductRelationMapper.java @@ -12,19 +12,19 @@ public interface SmsCouponProductRelationMapper { int deleteByPrimaryKey(Long id); - int insert(SmsCouponProductRelation record); + int insert(SmsCouponProductRelation row); - int insertSelective(SmsCouponProductRelation record); + int insertSelective(SmsCouponProductRelation row); List selectByExample(SmsCouponProductRelationExample example); SmsCouponProductRelation selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") SmsCouponProductRelation record, @Param("example") SmsCouponProductRelationExample example); + int updateByExampleSelective(@Param("row") SmsCouponProductRelation row, @Param("example") SmsCouponProductRelationExample example); - int updateByExample(@Param("record") SmsCouponProductRelation record, @Param("example") SmsCouponProductRelationExample example); + int updateByExample(@Param("row") SmsCouponProductRelation row, @Param("example") SmsCouponProductRelationExample example); - int updateByPrimaryKeySelective(SmsCouponProductRelation record); + int updateByPrimaryKeySelective(SmsCouponProductRelation row); - int updateByPrimaryKey(SmsCouponProductRelation record); + int updateByPrimaryKey(SmsCouponProductRelation row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/SmsFlashPromotionLogMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/SmsFlashPromotionLogMapper.java index da5b5f3..7139560 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/SmsFlashPromotionLogMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/SmsFlashPromotionLogMapper.java @@ -12,19 +12,19 @@ public interface SmsFlashPromotionLogMapper { int deleteByPrimaryKey(Integer id); - int insert(SmsFlashPromotionLog record); + int insert(SmsFlashPromotionLog row); - int insertSelective(SmsFlashPromotionLog record); + int insertSelective(SmsFlashPromotionLog row); List selectByExample(SmsFlashPromotionLogExample example); SmsFlashPromotionLog selectByPrimaryKey(Integer id); - int updateByExampleSelective(@Param("record") SmsFlashPromotionLog record, @Param("example") SmsFlashPromotionLogExample example); + int updateByExampleSelective(@Param("row") SmsFlashPromotionLog row, @Param("example") SmsFlashPromotionLogExample example); - int updateByExample(@Param("record") SmsFlashPromotionLog record, @Param("example") SmsFlashPromotionLogExample example); + int updateByExample(@Param("row") SmsFlashPromotionLog row, @Param("example") SmsFlashPromotionLogExample example); - int updateByPrimaryKeySelective(SmsFlashPromotionLog record); + int updateByPrimaryKeySelective(SmsFlashPromotionLog row); - int updateByPrimaryKey(SmsFlashPromotionLog record); + int updateByPrimaryKey(SmsFlashPromotionLog row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/SmsFlashPromotionMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/SmsFlashPromotionMapper.java index 648b5dc..2501232 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/SmsFlashPromotionMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/SmsFlashPromotionMapper.java @@ -12,19 +12,19 @@ public interface SmsFlashPromotionMapper { int deleteByPrimaryKey(Long id); - int insert(SmsFlashPromotion record); + int insert(SmsFlashPromotion row); - int insertSelective(SmsFlashPromotion record); + int insertSelective(SmsFlashPromotion row); List selectByExample(SmsFlashPromotionExample example); SmsFlashPromotion selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") SmsFlashPromotion record, @Param("example") SmsFlashPromotionExample example); + int updateByExampleSelective(@Param("row") SmsFlashPromotion row, @Param("example") SmsFlashPromotionExample example); - int updateByExample(@Param("record") SmsFlashPromotion record, @Param("example") SmsFlashPromotionExample example); + int updateByExample(@Param("row") SmsFlashPromotion row, @Param("example") SmsFlashPromotionExample example); - int updateByPrimaryKeySelective(SmsFlashPromotion record); + int updateByPrimaryKeySelective(SmsFlashPromotion row); - int updateByPrimaryKey(SmsFlashPromotion record); + int updateByPrimaryKey(SmsFlashPromotion row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/SmsFlashPromotionProductRelationMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/SmsFlashPromotionProductRelationMapper.java index e0dbbbb..78fc8f9 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/SmsFlashPromotionProductRelationMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/SmsFlashPromotionProductRelationMapper.java @@ -12,19 +12,19 @@ public interface SmsFlashPromotionProductRelationMapper { int deleteByPrimaryKey(Long id); - int insert(SmsFlashPromotionProductRelation record); + int insert(SmsFlashPromotionProductRelation row); - int insertSelective(SmsFlashPromotionProductRelation record); + int insertSelective(SmsFlashPromotionProductRelation row); List selectByExample(SmsFlashPromotionProductRelationExample example); SmsFlashPromotionProductRelation selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") SmsFlashPromotionProductRelation record, @Param("example") SmsFlashPromotionProductRelationExample example); + int updateByExampleSelective(@Param("row") SmsFlashPromotionProductRelation row, @Param("example") SmsFlashPromotionProductRelationExample example); - int updateByExample(@Param("record") SmsFlashPromotionProductRelation record, @Param("example") SmsFlashPromotionProductRelationExample example); + int updateByExample(@Param("row") SmsFlashPromotionProductRelation row, @Param("example") SmsFlashPromotionProductRelationExample example); - int updateByPrimaryKeySelective(SmsFlashPromotionProductRelation record); + int updateByPrimaryKeySelective(SmsFlashPromotionProductRelation row); - int updateByPrimaryKey(SmsFlashPromotionProductRelation record); + int updateByPrimaryKey(SmsFlashPromotionProductRelation row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/SmsFlashPromotionSessionMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/SmsFlashPromotionSessionMapper.java index e85bca5..a939a31 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/SmsFlashPromotionSessionMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/SmsFlashPromotionSessionMapper.java @@ -12,19 +12,19 @@ public interface SmsFlashPromotionSessionMapper { int deleteByPrimaryKey(Long id); - int insert(SmsFlashPromotionSession record); + int insert(SmsFlashPromotionSession row); - int insertSelective(SmsFlashPromotionSession record); + int insertSelective(SmsFlashPromotionSession row); List selectByExample(SmsFlashPromotionSessionExample example); SmsFlashPromotionSession selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") SmsFlashPromotionSession record, @Param("example") SmsFlashPromotionSessionExample example); + int updateByExampleSelective(@Param("row") SmsFlashPromotionSession row, @Param("example") SmsFlashPromotionSessionExample example); - int updateByExample(@Param("record") SmsFlashPromotionSession record, @Param("example") SmsFlashPromotionSessionExample example); + int updateByExample(@Param("row") SmsFlashPromotionSession row, @Param("example") SmsFlashPromotionSessionExample example); - int updateByPrimaryKeySelective(SmsFlashPromotionSession record); + int updateByPrimaryKeySelective(SmsFlashPromotionSession row); - int updateByPrimaryKey(SmsFlashPromotionSession record); + int updateByPrimaryKey(SmsFlashPromotionSession row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/SmsHomeAdvertiseMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/SmsHomeAdvertiseMapper.java index 2f96542..97a54f7 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/SmsHomeAdvertiseMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/SmsHomeAdvertiseMapper.java @@ -12,19 +12,19 @@ public interface SmsHomeAdvertiseMapper { int deleteByPrimaryKey(Long id); - int insert(SmsHomeAdvertise record); + int insert(SmsHomeAdvertise row); - int insertSelective(SmsHomeAdvertise record); + int insertSelective(SmsHomeAdvertise row); List selectByExample(SmsHomeAdvertiseExample example); SmsHomeAdvertise selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") SmsHomeAdvertise record, @Param("example") SmsHomeAdvertiseExample example); + int updateByExampleSelective(@Param("row") SmsHomeAdvertise row, @Param("example") SmsHomeAdvertiseExample example); - int updateByExample(@Param("record") SmsHomeAdvertise record, @Param("example") SmsHomeAdvertiseExample example); + int updateByExample(@Param("row") SmsHomeAdvertise row, @Param("example") SmsHomeAdvertiseExample example); - int updateByPrimaryKeySelective(SmsHomeAdvertise record); + int updateByPrimaryKeySelective(SmsHomeAdvertise row); - int updateByPrimaryKey(SmsHomeAdvertise record); + int updateByPrimaryKey(SmsHomeAdvertise row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/SmsHomeBrandMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/SmsHomeBrandMapper.java index d6e5959..fcaa6ee 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/SmsHomeBrandMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/SmsHomeBrandMapper.java @@ -12,19 +12,19 @@ public interface SmsHomeBrandMapper { int deleteByPrimaryKey(Long id); - int insert(SmsHomeBrand record); + int insert(SmsHomeBrand row); - int insertSelective(SmsHomeBrand record); + int insertSelective(SmsHomeBrand row); List selectByExample(SmsHomeBrandExample example); SmsHomeBrand selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") SmsHomeBrand record, @Param("example") SmsHomeBrandExample example); + int updateByExampleSelective(@Param("row") SmsHomeBrand row, @Param("example") SmsHomeBrandExample example); - int updateByExample(@Param("record") SmsHomeBrand record, @Param("example") SmsHomeBrandExample example); + int updateByExample(@Param("row") SmsHomeBrand row, @Param("example") SmsHomeBrandExample example); - int updateByPrimaryKeySelective(SmsHomeBrand record); + int updateByPrimaryKeySelective(SmsHomeBrand row); - int updateByPrimaryKey(SmsHomeBrand record); + int updateByPrimaryKey(SmsHomeBrand row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/SmsHomeNewProductMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/SmsHomeNewProductMapper.java index c3ba126..19fad8d 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/SmsHomeNewProductMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/SmsHomeNewProductMapper.java @@ -12,19 +12,19 @@ public interface SmsHomeNewProductMapper { int deleteByPrimaryKey(Long id); - int insert(SmsHomeNewProduct record); + int insert(SmsHomeNewProduct row); - int insertSelective(SmsHomeNewProduct record); + int insertSelective(SmsHomeNewProduct row); List selectByExample(SmsHomeNewProductExample example); SmsHomeNewProduct selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") SmsHomeNewProduct record, @Param("example") SmsHomeNewProductExample example); + int updateByExampleSelective(@Param("row") SmsHomeNewProduct row, @Param("example") SmsHomeNewProductExample example); - int updateByExample(@Param("record") SmsHomeNewProduct record, @Param("example") SmsHomeNewProductExample example); + int updateByExample(@Param("row") SmsHomeNewProduct row, @Param("example") SmsHomeNewProductExample example); - int updateByPrimaryKeySelective(SmsHomeNewProduct record); + int updateByPrimaryKeySelective(SmsHomeNewProduct row); - int updateByPrimaryKey(SmsHomeNewProduct record); + int updateByPrimaryKey(SmsHomeNewProduct row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/SmsHomeRecommendProductMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/SmsHomeRecommendProductMapper.java index bc30400..b4360d8 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/SmsHomeRecommendProductMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/SmsHomeRecommendProductMapper.java @@ -12,19 +12,19 @@ public interface SmsHomeRecommendProductMapper { int deleteByPrimaryKey(Long id); - int insert(SmsHomeRecommendProduct record); + int insert(SmsHomeRecommendProduct row); - int insertSelective(SmsHomeRecommendProduct record); + int insertSelective(SmsHomeRecommendProduct row); List selectByExample(SmsHomeRecommendProductExample example); SmsHomeRecommendProduct selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") SmsHomeRecommendProduct record, @Param("example") SmsHomeRecommendProductExample example); + int updateByExampleSelective(@Param("row") SmsHomeRecommendProduct row, @Param("example") SmsHomeRecommendProductExample example); - int updateByExample(@Param("record") SmsHomeRecommendProduct record, @Param("example") SmsHomeRecommendProductExample example); + int updateByExample(@Param("row") SmsHomeRecommendProduct row, @Param("example") SmsHomeRecommendProductExample example); - int updateByPrimaryKeySelective(SmsHomeRecommendProduct record); + int updateByPrimaryKeySelective(SmsHomeRecommendProduct row); - int updateByPrimaryKey(SmsHomeRecommendProduct record); + int updateByPrimaryKey(SmsHomeRecommendProduct row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/SmsHomeRecommendSubjectMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/SmsHomeRecommendSubjectMapper.java index e9d6b11..a910136 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/SmsHomeRecommendSubjectMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/SmsHomeRecommendSubjectMapper.java @@ -12,19 +12,19 @@ public interface SmsHomeRecommendSubjectMapper { int deleteByPrimaryKey(Long id); - int insert(SmsHomeRecommendSubject record); + int insert(SmsHomeRecommendSubject row); - int insertSelective(SmsHomeRecommendSubject record); + int insertSelective(SmsHomeRecommendSubject row); List selectByExample(SmsHomeRecommendSubjectExample example); SmsHomeRecommendSubject selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") SmsHomeRecommendSubject record, @Param("example") SmsHomeRecommendSubjectExample example); + int updateByExampleSelective(@Param("row") SmsHomeRecommendSubject row, @Param("example") SmsHomeRecommendSubjectExample example); - int updateByExample(@Param("record") SmsHomeRecommendSubject record, @Param("example") SmsHomeRecommendSubjectExample example); + int updateByExample(@Param("row") SmsHomeRecommendSubject row, @Param("example") SmsHomeRecommendSubjectExample example); - int updateByPrimaryKeySelective(SmsHomeRecommendSubject record); + int updateByPrimaryKeySelective(SmsHomeRecommendSubject row); - int updateByPrimaryKey(SmsHomeRecommendSubject record); + int updateByPrimaryKey(SmsHomeRecommendSubject row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsAdminLoginLogMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsAdminLoginLogMapper.java index 84b396c..d8dfd50 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsAdminLoginLogMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsAdminLoginLogMapper.java @@ -12,19 +12,19 @@ public interface UmsAdminLoginLogMapper { int deleteByPrimaryKey(Long id); - int insert(UmsAdminLoginLog record); + int insert(UmsAdminLoginLog row); - int insertSelective(UmsAdminLoginLog record); + int insertSelective(UmsAdminLoginLog row); List selectByExample(UmsAdminLoginLogExample example); UmsAdminLoginLog selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") UmsAdminLoginLog record, @Param("example") UmsAdminLoginLogExample example); + int updateByExampleSelective(@Param("row") UmsAdminLoginLog row, @Param("example") UmsAdminLoginLogExample example); - int updateByExample(@Param("record") UmsAdminLoginLog record, @Param("example") UmsAdminLoginLogExample example); + int updateByExample(@Param("row") UmsAdminLoginLog row, @Param("example") UmsAdminLoginLogExample example); - int updateByPrimaryKeySelective(UmsAdminLoginLog record); + int updateByPrimaryKeySelective(UmsAdminLoginLog row); - int updateByPrimaryKey(UmsAdminLoginLog record); + int updateByPrimaryKey(UmsAdminLoginLog row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsAdminMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsAdminMapper.java index 36b59a8..cb1c8f1 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsAdminMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsAdminMapper.java @@ -12,19 +12,19 @@ public interface UmsAdminMapper { int deleteByPrimaryKey(Long id); - int insert(UmsAdmin record); + int insert(UmsAdmin row); - int insertSelective(UmsAdmin record); + int insertSelective(UmsAdmin row); List selectByExample(UmsAdminExample example); UmsAdmin selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") UmsAdmin record, @Param("example") UmsAdminExample example); + int updateByExampleSelective(@Param("row") UmsAdmin row, @Param("example") UmsAdminExample example); - int updateByExample(@Param("record") UmsAdmin record, @Param("example") UmsAdminExample example); + int updateByExample(@Param("row") UmsAdmin row, @Param("example") UmsAdminExample example); - int updateByPrimaryKeySelective(UmsAdmin record); + int updateByPrimaryKeySelective(UmsAdmin row); - int updateByPrimaryKey(UmsAdmin record); + int updateByPrimaryKey(UmsAdmin row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsAdminPermissionRelationMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsAdminPermissionRelationMapper.java index b8e1b80..640be74 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsAdminPermissionRelationMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsAdminPermissionRelationMapper.java @@ -12,19 +12,19 @@ public interface UmsAdminPermissionRelationMapper { int deleteByPrimaryKey(Long id); - int insert(UmsAdminPermissionRelation record); + int insert(UmsAdminPermissionRelation row); - int insertSelective(UmsAdminPermissionRelation record); + int insertSelective(UmsAdminPermissionRelation row); List selectByExample(UmsAdminPermissionRelationExample example); UmsAdminPermissionRelation selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") UmsAdminPermissionRelation record, @Param("example") UmsAdminPermissionRelationExample example); + int updateByExampleSelective(@Param("row") UmsAdminPermissionRelation row, @Param("example") UmsAdminPermissionRelationExample example); - int updateByExample(@Param("record") UmsAdminPermissionRelation record, @Param("example") UmsAdminPermissionRelationExample example); + int updateByExample(@Param("row") UmsAdminPermissionRelation row, @Param("example") UmsAdminPermissionRelationExample example); - int updateByPrimaryKeySelective(UmsAdminPermissionRelation record); + int updateByPrimaryKeySelective(UmsAdminPermissionRelation row); - int updateByPrimaryKey(UmsAdminPermissionRelation record); + int updateByPrimaryKey(UmsAdminPermissionRelation row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsAdminRoleRelationMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsAdminRoleRelationMapper.java index 6198769..846de60 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsAdminRoleRelationMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsAdminRoleRelationMapper.java @@ -12,19 +12,19 @@ public interface UmsAdminRoleRelationMapper { int deleteByPrimaryKey(Long id); - int insert(UmsAdminRoleRelation record); + int insert(UmsAdminRoleRelation row); - int insertSelective(UmsAdminRoleRelation record); + int insertSelective(UmsAdminRoleRelation row); List selectByExample(UmsAdminRoleRelationExample example); UmsAdminRoleRelation selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") UmsAdminRoleRelation record, @Param("example") UmsAdminRoleRelationExample example); + int updateByExampleSelective(@Param("row") UmsAdminRoleRelation row, @Param("example") UmsAdminRoleRelationExample example); - int updateByExample(@Param("record") UmsAdminRoleRelation record, @Param("example") UmsAdminRoleRelationExample example); + int updateByExample(@Param("row") UmsAdminRoleRelation row, @Param("example") UmsAdminRoleRelationExample example); - int updateByPrimaryKeySelective(UmsAdminRoleRelation record); + int updateByPrimaryKeySelective(UmsAdminRoleRelation row); - int updateByPrimaryKey(UmsAdminRoleRelation record); + int updateByPrimaryKey(UmsAdminRoleRelation row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsGrowthChangeHistoryMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsGrowthChangeHistoryMapper.java index d9b9ad6..9a3de70 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsGrowthChangeHistoryMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsGrowthChangeHistoryMapper.java @@ -12,19 +12,19 @@ public interface UmsGrowthChangeHistoryMapper { int deleteByPrimaryKey(Long id); - int insert(UmsGrowthChangeHistory record); + int insert(UmsGrowthChangeHistory row); - int insertSelective(UmsGrowthChangeHistory record); + int insertSelective(UmsGrowthChangeHistory row); List selectByExample(UmsGrowthChangeHistoryExample example); UmsGrowthChangeHistory selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") UmsGrowthChangeHistory record, @Param("example") UmsGrowthChangeHistoryExample example); + int updateByExampleSelective(@Param("row") UmsGrowthChangeHistory row, @Param("example") UmsGrowthChangeHistoryExample example); - int updateByExample(@Param("record") UmsGrowthChangeHistory record, @Param("example") UmsGrowthChangeHistoryExample example); + int updateByExample(@Param("row") UmsGrowthChangeHistory row, @Param("example") UmsGrowthChangeHistoryExample example); - int updateByPrimaryKeySelective(UmsGrowthChangeHistory record); + int updateByPrimaryKeySelective(UmsGrowthChangeHistory row); - int updateByPrimaryKey(UmsGrowthChangeHistory record); + int updateByPrimaryKey(UmsGrowthChangeHistory row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsIntegrationChangeHistoryMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsIntegrationChangeHistoryMapper.java index 04dc1be..e126a99 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsIntegrationChangeHistoryMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsIntegrationChangeHistoryMapper.java @@ -12,19 +12,19 @@ public interface UmsIntegrationChangeHistoryMapper { int deleteByPrimaryKey(Long id); - int insert(UmsIntegrationChangeHistory record); + int insert(UmsIntegrationChangeHistory row); - int insertSelective(UmsIntegrationChangeHistory record); + int insertSelective(UmsIntegrationChangeHistory row); List selectByExample(UmsIntegrationChangeHistoryExample example); UmsIntegrationChangeHistory selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") UmsIntegrationChangeHistory record, @Param("example") UmsIntegrationChangeHistoryExample example); + int updateByExampleSelective(@Param("row") UmsIntegrationChangeHistory row, @Param("example") UmsIntegrationChangeHistoryExample example); - int updateByExample(@Param("record") UmsIntegrationChangeHistory record, @Param("example") UmsIntegrationChangeHistoryExample example); + int updateByExample(@Param("row") UmsIntegrationChangeHistory row, @Param("example") UmsIntegrationChangeHistoryExample example); - int updateByPrimaryKeySelective(UmsIntegrationChangeHistory record); + int updateByPrimaryKeySelective(UmsIntegrationChangeHistory row); - int updateByPrimaryKey(UmsIntegrationChangeHistory record); + int updateByPrimaryKey(UmsIntegrationChangeHistory row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsIntegrationConsumeSettingMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsIntegrationConsumeSettingMapper.java index f079365..6c7c5fc 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsIntegrationConsumeSettingMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsIntegrationConsumeSettingMapper.java @@ -12,19 +12,19 @@ public interface UmsIntegrationConsumeSettingMapper { int deleteByPrimaryKey(Long id); - int insert(UmsIntegrationConsumeSetting record); + int insert(UmsIntegrationConsumeSetting row); - int insertSelective(UmsIntegrationConsumeSetting record); + int insertSelective(UmsIntegrationConsumeSetting row); List selectByExample(UmsIntegrationConsumeSettingExample example); UmsIntegrationConsumeSetting selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") UmsIntegrationConsumeSetting record, @Param("example") UmsIntegrationConsumeSettingExample example); + int updateByExampleSelective(@Param("row") UmsIntegrationConsumeSetting row, @Param("example") UmsIntegrationConsumeSettingExample example); - int updateByExample(@Param("record") UmsIntegrationConsumeSetting record, @Param("example") UmsIntegrationConsumeSettingExample example); + int updateByExample(@Param("row") UmsIntegrationConsumeSetting row, @Param("example") UmsIntegrationConsumeSettingExample example); - int updateByPrimaryKeySelective(UmsIntegrationConsumeSetting record); + int updateByPrimaryKeySelective(UmsIntegrationConsumeSetting row); - int updateByPrimaryKey(UmsIntegrationConsumeSetting record); + int updateByPrimaryKey(UmsIntegrationConsumeSetting row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberLevelMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberLevelMapper.java index 71a64ed..21a0bce 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberLevelMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberLevelMapper.java @@ -12,19 +12,19 @@ public interface UmsMemberLevelMapper { int deleteByPrimaryKey(Long id); - int insert(UmsMemberLevel record); + int insert(UmsMemberLevel row); - int insertSelective(UmsMemberLevel record); + int insertSelective(UmsMemberLevel row); List selectByExample(UmsMemberLevelExample example); UmsMemberLevel selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") UmsMemberLevel record, @Param("example") UmsMemberLevelExample example); + int updateByExampleSelective(@Param("row") UmsMemberLevel row, @Param("example") UmsMemberLevelExample example); - int updateByExample(@Param("record") UmsMemberLevel record, @Param("example") UmsMemberLevelExample example); + int updateByExample(@Param("row") UmsMemberLevel row, @Param("example") UmsMemberLevelExample example); - int updateByPrimaryKeySelective(UmsMemberLevel record); + int updateByPrimaryKeySelective(UmsMemberLevel row); - int updateByPrimaryKey(UmsMemberLevel record); + int updateByPrimaryKey(UmsMemberLevel row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberLoginLogMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberLoginLogMapper.java index 3fb0f48..22a81db 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberLoginLogMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberLoginLogMapper.java @@ -12,19 +12,19 @@ public interface UmsMemberLoginLogMapper { int deleteByPrimaryKey(Long id); - int insert(UmsMemberLoginLog record); + int insert(UmsMemberLoginLog row); - int insertSelective(UmsMemberLoginLog record); + int insertSelective(UmsMemberLoginLog row); List selectByExample(UmsMemberLoginLogExample example); UmsMemberLoginLog selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") UmsMemberLoginLog record, @Param("example") UmsMemberLoginLogExample example); + int updateByExampleSelective(@Param("row") UmsMemberLoginLog row, @Param("example") UmsMemberLoginLogExample example); - int updateByExample(@Param("record") UmsMemberLoginLog record, @Param("example") UmsMemberLoginLogExample example); + int updateByExample(@Param("row") UmsMemberLoginLog row, @Param("example") UmsMemberLoginLogExample example); - int updateByPrimaryKeySelective(UmsMemberLoginLog record); + int updateByPrimaryKeySelective(UmsMemberLoginLog row); - int updateByPrimaryKey(UmsMemberLoginLog record); + int updateByPrimaryKey(UmsMemberLoginLog row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberMapper.java index 5360bcf..c950488 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberMapper.java @@ -12,19 +12,19 @@ public interface UmsMemberMapper { int deleteByPrimaryKey(Long id); - int insert(UmsMember record); + int insert(UmsMember row); - int insertSelective(UmsMember record); + int insertSelective(UmsMember row); List selectByExample(UmsMemberExample example); UmsMember selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") UmsMember record, @Param("example") UmsMemberExample example); + int updateByExampleSelective(@Param("row") UmsMember row, @Param("example") UmsMemberExample example); - int updateByExample(@Param("record") UmsMember record, @Param("example") UmsMemberExample example); + int updateByExample(@Param("row") UmsMember row, @Param("example") UmsMemberExample example); - int updateByPrimaryKeySelective(UmsMember record); + int updateByPrimaryKeySelective(UmsMember row); - int updateByPrimaryKey(UmsMember record); + int updateByPrimaryKey(UmsMember row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberMemberTagRelationMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberMemberTagRelationMapper.java index d76df3d..d2acf9c 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberMemberTagRelationMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberMemberTagRelationMapper.java @@ -12,19 +12,19 @@ public interface UmsMemberMemberTagRelationMapper { int deleteByPrimaryKey(Long id); - int insert(UmsMemberMemberTagRelation record); + int insert(UmsMemberMemberTagRelation row); - int insertSelective(UmsMemberMemberTagRelation record); + int insertSelective(UmsMemberMemberTagRelation row); List selectByExample(UmsMemberMemberTagRelationExample example); UmsMemberMemberTagRelation selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") UmsMemberMemberTagRelation record, @Param("example") UmsMemberMemberTagRelationExample example); + int updateByExampleSelective(@Param("row") UmsMemberMemberTagRelation row, @Param("example") UmsMemberMemberTagRelationExample example); - int updateByExample(@Param("record") UmsMemberMemberTagRelation record, @Param("example") UmsMemberMemberTagRelationExample example); + int updateByExample(@Param("row") UmsMemberMemberTagRelation row, @Param("example") UmsMemberMemberTagRelationExample example); - int updateByPrimaryKeySelective(UmsMemberMemberTagRelation record); + int updateByPrimaryKeySelective(UmsMemberMemberTagRelation row); - int updateByPrimaryKey(UmsMemberMemberTagRelation record); + int updateByPrimaryKey(UmsMemberMemberTagRelation row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberProductCategoryRelationMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberProductCategoryRelationMapper.java index b522a60..692fd78 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberProductCategoryRelationMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberProductCategoryRelationMapper.java @@ -12,19 +12,19 @@ public interface UmsMemberProductCategoryRelationMapper { int deleteByPrimaryKey(Long id); - int insert(UmsMemberProductCategoryRelation record); + int insert(UmsMemberProductCategoryRelation row); - int insertSelective(UmsMemberProductCategoryRelation record); + int insertSelective(UmsMemberProductCategoryRelation row); List selectByExample(UmsMemberProductCategoryRelationExample example); UmsMemberProductCategoryRelation selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") UmsMemberProductCategoryRelation record, @Param("example") UmsMemberProductCategoryRelationExample example); + int updateByExampleSelective(@Param("row") UmsMemberProductCategoryRelation row, @Param("example") UmsMemberProductCategoryRelationExample example); - int updateByExample(@Param("record") UmsMemberProductCategoryRelation record, @Param("example") UmsMemberProductCategoryRelationExample example); + int updateByExample(@Param("row") UmsMemberProductCategoryRelation row, @Param("example") UmsMemberProductCategoryRelationExample example); - int updateByPrimaryKeySelective(UmsMemberProductCategoryRelation record); + int updateByPrimaryKeySelective(UmsMemberProductCategoryRelation row); - int updateByPrimaryKey(UmsMemberProductCategoryRelation record); + int updateByPrimaryKey(UmsMemberProductCategoryRelation row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberReceiveAddressMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberReceiveAddressMapper.java index 5a7b5f7..1b29e5f 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberReceiveAddressMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberReceiveAddressMapper.java @@ -12,19 +12,19 @@ public interface UmsMemberReceiveAddressMapper { int deleteByPrimaryKey(Long id); - int insert(UmsMemberReceiveAddress record); + int insert(UmsMemberReceiveAddress row); - int insertSelective(UmsMemberReceiveAddress record); + int insertSelective(UmsMemberReceiveAddress row); List selectByExample(UmsMemberReceiveAddressExample example); UmsMemberReceiveAddress selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") UmsMemberReceiveAddress record, @Param("example") UmsMemberReceiveAddressExample example); + int updateByExampleSelective(@Param("row") UmsMemberReceiveAddress row, @Param("example") UmsMemberReceiveAddressExample example); - int updateByExample(@Param("record") UmsMemberReceiveAddress record, @Param("example") UmsMemberReceiveAddressExample example); + int updateByExample(@Param("row") UmsMemberReceiveAddress row, @Param("example") UmsMemberReceiveAddressExample example); - int updateByPrimaryKeySelective(UmsMemberReceiveAddress record); + int updateByPrimaryKeySelective(UmsMemberReceiveAddress row); - int updateByPrimaryKey(UmsMemberReceiveAddress record); + int updateByPrimaryKey(UmsMemberReceiveAddress row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberRuleSettingMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberRuleSettingMapper.java index 1fc5b92..951b6d4 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberRuleSettingMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberRuleSettingMapper.java @@ -12,19 +12,19 @@ public interface UmsMemberRuleSettingMapper { int deleteByPrimaryKey(Long id); - int insert(UmsMemberRuleSetting record); + int insert(UmsMemberRuleSetting row); - int insertSelective(UmsMemberRuleSetting record); + int insertSelective(UmsMemberRuleSetting row); List selectByExample(UmsMemberRuleSettingExample example); UmsMemberRuleSetting selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") UmsMemberRuleSetting record, @Param("example") UmsMemberRuleSettingExample example); + int updateByExampleSelective(@Param("row") UmsMemberRuleSetting row, @Param("example") UmsMemberRuleSettingExample example); - int updateByExample(@Param("record") UmsMemberRuleSetting record, @Param("example") UmsMemberRuleSettingExample example); + int updateByExample(@Param("row") UmsMemberRuleSetting row, @Param("example") UmsMemberRuleSettingExample example); - int updateByPrimaryKeySelective(UmsMemberRuleSetting record); + int updateByPrimaryKeySelective(UmsMemberRuleSetting row); - int updateByPrimaryKey(UmsMemberRuleSetting record); + int updateByPrimaryKey(UmsMemberRuleSetting row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberStatisticsInfoMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberStatisticsInfoMapper.java index 8601071..b70d51e 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberStatisticsInfoMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberStatisticsInfoMapper.java @@ -12,19 +12,19 @@ public interface UmsMemberStatisticsInfoMapper { int deleteByPrimaryKey(Long id); - int insert(UmsMemberStatisticsInfo record); + int insert(UmsMemberStatisticsInfo row); - int insertSelective(UmsMemberStatisticsInfo record); + int insertSelective(UmsMemberStatisticsInfo row); List selectByExample(UmsMemberStatisticsInfoExample example); UmsMemberStatisticsInfo selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") UmsMemberStatisticsInfo record, @Param("example") UmsMemberStatisticsInfoExample example); + int updateByExampleSelective(@Param("row") UmsMemberStatisticsInfo row, @Param("example") UmsMemberStatisticsInfoExample example); - int updateByExample(@Param("record") UmsMemberStatisticsInfo record, @Param("example") UmsMemberStatisticsInfoExample example); + int updateByExample(@Param("row") UmsMemberStatisticsInfo row, @Param("example") UmsMemberStatisticsInfoExample example); - int updateByPrimaryKeySelective(UmsMemberStatisticsInfo record); + int updateByPrimaryKeySelective(UmsMemberStatisticsInfo row); - int updateByPrimaryKey(UmsMemberStatisticsInfo record); + int updateByPrimaryKey(UmsMemberStatisticsInfo row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberTagMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberTagMapper.java index 995c6a7..6ea43c8 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberTagMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberTagMapper.java @@ -12,19 +12,19 @@ public interface UmsMemberTagMapper { int deleteByPrimaryKey(Long id); - int insert(UmsMemberTag record); + int insert(UmsMemberTag row); - int insertSelective(UmsMemberTag record); + int insertSelective(UmsMemberTag row); List selectByExample(UmsMemberTagExample example); UmsMemberTag selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") UmsMemberTag record, @Param("example") UmsMemberTagExample example); + int updateByExampleSelective(@Param("row") UmsMemberTag row, @Param("example") UmsMemberTagExample example); - int updateByExample(@Param("record") UmsMemberTag record, @Param("example") UmsMemberTagExample example); + int updateByExample(@Param("row") UmsMemberTag row, @Param("example") UmsMemberTagExample example); - int updateByPrimaryKeySelective(UmsMemberTag record); + int updateByPrimaryKeySelective(UmsMemberTag row); - int updateByPrimaryKey(UmsMemberTag record); + int updateByPrimaryKey(UmsMemberTag row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberTaskMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberTaskMapper.java index 9a11eba..abfb4a3 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberTaskMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMemberTaskMapper.java @@ -12,19 +12,19 @@ public interface UmsMemberTaskMapper { int deleteByPrimaryKey(Long id); - int insert(UmsMemberTask record); + int insert(UmsMemberTask row); - int insertSelective(UmsMemberTask record); + int insertSelective(UmsMemberTask row); List selectByExample(UmsMemberTaskExample example); UmsMemberTask selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") UmsMemberTask record, @Param("example") UmsMemberTaskExample example); + int updateByExampleSelective(@Param("row") UmsMemberTask row, @Param("example") UmsMemberTaskExample example); - int updateByExample(@Param("record") UmsMemberTask record, @Param("example") UmsMemberTaskExample example); + int updateByExample(@Param("row") UmsMemberTask row, @Param("example") UmsMemberTaskExample example); - int updateByPrimaryKeySelective(UmsMemberTask record); + int updateByPrimaryKeySelective(UmsMemberTask row); - int updateByPrimaryKey(UmsMemberTask record); + int updateByPrimaryKey(UmsMemberTask row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMenuMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMenuMapper.java index c26b471..389c983 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMenuMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsMenuMapper.java @@ -12,19 +12,19 @@ public interface UmsMenuMapper { int deleteByPrimaryKey(Long id); - int insert(UmsMenu record); + int insert(UmsMenu row); - int insertSelective(UmsMenu record); + int insertSelective(UmsMenu row); List selectByExample(UmsMenuExample example); UmsMenu selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") UmsMenu record, @Param("example") UmsMenuExample example); + int updateByExampleSelective(@Param("row") UmsMenu row, @Param("example") UmsMenuExample example); - int updateByExample(@Param("record") UmsMenu record, @Param("example") UmsMenuExample example); + int updateByExample(@Param("row") UmsMenu row, @Param("example") UmsMenuExample example); - int updateByPrimaryKeySelective(UmsMenu record); + int updateByPrimaryKeySelective(UmsMenu row); - int updateByPrimaryKey(UmsMenu record); + int updateByPrimaryKey(UmsMenu row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsPermissionMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsPermissionMapper.java index 466f6c1..d443ea8 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsPermissionMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsPermissionMapper.java @@ -12,19 +12,19 @@ public interface UmsPermissionMapper { int deleteByPrimaryKey(Long id); - int insert(UmsPermission record); + int insert(UmsPermission row); - int insertSelective(UmsPermission record); + int insertSelective(UmsPermission row); List selectByExample(UmsPermissionExample example); UmsPermission selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") UmsPermission record, @Param("example") UmsPermissionExample example); + int updateByExampleSelective(@Param("row") UmsPermission row, @Param("example") UmsPermissionExample example); - int updateByExample(@Param("record") UmsPermission record, @Param("example") UmsPermissionExample example); + int updateByExample(@Param("row") UmsPermission row, @Param("example") UmsPermissionExample example); - int updateByPrimaryKeySelective(UmsPermission record); + int updateByPrimaryKeySelective(UmsPermission row); - int updateByPrimaryKey(UmsPermission record); + int updateByPrimaryKey(UmsPermission row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsResourceCategoryMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsResourceCategoryMapper.java index 7cc19ab..0bdc51d 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsResourceCategoryMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsResourceCategoryMapper.java @@ -12,19 +12,19 @@ public interface UmsResourceCategoryMapper { int deleteByPrimaryKey(Long id); - int insert(UmsResourceCategory record); + int insert(UmsResourceCategory row); - int insertSelective(UmsResourceCategory record); + int insertSelective(UmsResourceCategory row); List selectByExample(UmsResourceCategoryExample example); UmsResourceCategory selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") UmsResourceCategory record, @Param("example") UmsResourceCategoryExample example); + int updateByExampleSelective(@Param("row") UmsResourceCategory row, @Param("example") UmsResourceCategoryExample example); - int updateByExample(@Param("record") UmsResourceCategory record, @Param("example") UmsResourceCategoryExample example); + int updateByExample(@Param("row") UmsResourceCategory row, @Param("example") UmsResourceCategoryExample example); - int updateByPrimaryKeySelective(UmsResourceCategory record); + int updateByPrimaryKeySelective(UmsResourceCategory row); - int updateByPrimaryKey(UmsResourceCategory record); + int updateByPrimaryKey(UmsResourceCategory row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsResourceMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsResourceMapper.java index fccbdf3..c9f5858 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsResourceMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsResourceMapper.java @@ -12,19 +12,19 @@ public interface UmsResourceMapper { int deleteByPrimaryKey(Long id); - int insert(UmsResource record); + int insert(UmsResource row); - int insertSelective(UmsResource record); + int insertSelective(UmsResource row); List selectByExample(UmsResourceExample example); UmsResource selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") UmsResource record, @Param("example") UmsResourceExample example); + int updateByExampleSelective(@Param("row") UmsResource row, @Param("example") UmsResourceExample example); - int updateByExample(@Param("record") UmsResource record, @Param("example") UmsResourceExample example); + int updateByExample(@Param("row") UmsResource row, @Param("example") UmsResourceExample example); - int updateByPrimaryKeySelective(UmsResource record); + int updateByPrimaryKeySelective(UmsResource row); - int updateByPrimaryKey(UmsResource record); + int updateByPrimaryKey(UmsResource row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsRoleMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsRoleMapper.java index 8b4986d..7ce2ff9 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsRoleMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsRoleMapper.java @@ -12,19 +12,19 @@ public interface UmsRoleMapper { int deleteByPrimaryKey(Long id); - int insert(UmsRole record); + int insert(UmsRole row); - int insertSelective(UmsRole record); + int insertSelective(UmsRole row); List selectByExample(UmsRoleExample example); UmsRole selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") UmsRole record, @Param("example") UmsRoleExample example); + int updateByExampleSelective(@Param("row") UmsRole row, @Param("example") UmsRoleExample example); - int updateByExample(@Param("record") UmsRole record, @Param("example") UmsRoleExample example); + int updateByExample(@Param("row") UmsRole row, @Param("example") UmsRoleExample example); - int updateByPrimaryKeySelective(UmsRole record); + int updateByPrimaryKeySelective(UmsRole row); - int updateByPrimaryKey(UmsRole record); + int updateByPrimaryKey(UmsRole row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsRoleMenuRelationMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsRoleMenuRelationMapper.java index 92e971b..af4b979 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsRoleMenuRelationMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsRoleMenuRelationMapper.java @@ -12,19 +12,19 @@ public interface UmsRoleMenuRelationMapper { int deleteByPrimaryKey(Long id); - int insert(UmsRoleMenuRelation record); + int insert(UmsRoleMenuRelation row); - int insertSelective(UmsRoleMenuRelation record); + int insertSelective(UmsRoleMenuRelation row); List selectByExample(UmsRoleMenuRelationExample example); UmsRoleMenuRelation selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") UmsRoleMenuRelation record, @Param("example") UmsRoleMenuRelationExample example); + int updateByExampleSelective(@Param("row") UmsRoleMenuRelation row, @Param("example") UmsRoleMenuRelationExample example); - int updateByExample(@Param("record") UmsRoleMenuRelation record, @Param("example") UmsRoleMenuRelationExample example); + int updateByExample(@Param("row") UmsRoleMenuRelation row, @Param("example") UmsRoleMenuRelationExample example); - int updateByPrimaryKeySelective(UmsRoleMenuRelation record); + int updateByPrimaryKeySelective(UmsRoleMenuRelation row); - int updateByPrimaryKey(UmsRoleMenuRelation record); + int updateByPrimaryKey(UmsRoleMenuRelation row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsRolePermissionRelationMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsRolePermissionRelationMapper.java index 39a40a0..a4ca9a7 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsRolePermissionRelationMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsRolePermissionRelationMapper.java @@ -12,19 +12,19 @@ public interface UmsRolePermissionRelationMapper { int deleteByPrimaryKey(Long id); - int insert(UmsRolePermissionRelation record); + int insert(UmsRolePermissionRelation row); - int insertSelective(UmsRolePermissionRelation record); + int insertSelective(UmsRolePermissionRelation row); List selectByExample(UmsRolePermissionRelationExample example); UmsRolePermissionRelation selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") UmsRolePermissionRelation record, @Param("example") UmsRolePermissionRelationExample example); + int updateByExampleSelective(@Param("row") UmsRolePermissionRelation row, @Param("example") UmsRolePermissionRelationExample example); - int updateByExample(@Param("record") UmsRolePermissionRelation record, @Param("example") UmsRolePermissionRelationExample example); + int updateByExample(@Param("row") UmsRolePermissionRelation row, @Param("example") UmsRolePermissionRelationExample example); - int updateByPrimaryKeySelective(UmsRolePermissionRelation record); + int updateByPrimaryKeySelective(UmsRolePermissionRelation row); - int updateByPrimaryKey(UmsRolePermissionRelation record); + int updateByPrimaryKey(UmsRolePermissionRelation row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsRoleResourceRelationMapper.java b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsRoleResourceRelationMapper.java index 4a83061..6b22700 100644 --- a/mall-mbg/src/main/java/com/macro/mall/mapper/UmsRoleResourceRelationMapper.java +++ b/mall-mbg/src/main/java/com/macro/mall/mapper/UmsRoleResourceRelationMapper.java @@ -12,19 +12,19 @@ public interface UmsRoleResourceRelationMapper { int deleteByPrimaryKey(Long id); - int insert(UmsRoleResourceRelation record); + int insert(UmsRoleResourceRelation row); - int insertSelective(UmsRoleResourceRelation record); + int insertSelective(UmsRoleResourceRelation row); List selectByExample(UmsRoleResourceRelationExample example); UmsRoleResourceRelation selectByPrimaryKey(Long id); - int updateByExampleSelective(@Param("record") UmsRoleResourceRelation record, @Param("example") UmsRoleResourceRelationExample example); + int updateByExampleSelective(@Param("row") UmsRoleResourceRelation row, @Param("example") UmsRoleResourceRelationExample example); - int updateByExample(@Param("record") UmsRoleResourceRelation record, @Param("example") UmsRoleResourceRelationExample example); + int updateByExample(@Param("row") UmsRoleResourceRelation row, @Param("example") UmsRoleResourceRelationExample example); - int updateByPrimaryKeySelective(UmsRoleResourceRelation record); + int updateByPrimaryKeySelective(UmsRoleResourceRelation row); - int updateByPrimaryKey(UmsRoleResourceRelation record); + int updateByPrimaryKey(UmsRoleResourceRelation row); } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/model/CmsHelp.java b/mall-mbg/src/main/java/com/macro/mall/model/CmsHelp.java index 6612cc0..b7f375a 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/CmsHelp.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/CmsHelp.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.util.Date; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/CmsHelpCategory.java b/mall-mbg/src/main/java/com/macro/mall/model/CmsHelpCategory.java index 45c8105..0a74ca4 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/CmsHelpCategory.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/CmsHelpCategory.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; public class CmsHelpCategory implements Serializable { @@ -8,10 +8,10 @@ public class CmsHelpCategory implements Serializable { private String name; - @ApiModelProperty(value = "分类图标") + @Schema(title = "分类图标") private String icon; - @ApiModelProperty(value = "专题数量") + @Schema(title = "专题数量") private Integer helpCount; private Integer showStatus; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/CmsMemberReport.java b/mall-mbg/src/main/java/com/macro/mall/model/CmsMemberReport.java index 546a615..f96a17f 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/CmsMemberReport.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/CmsMemberReport.java @@ -1,26 +1,26 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.util.Date; public class CmsMemberReport implements Serializable { private Long id; - @ApiModelProperty(value = "举报类型:0->商品评价;1->话题内容;2->用户评论") + @Schema(title = "举报类型:0->商品评价;1->话题内容;2->用户评论") private Integer reportType; - @ApiModelProperty(value = "举报人") + @Schema(title = "举报人") private String reportMemberName; private Date createTime; private String reportObject; - @ApiModelProperty(value = "举报状态:0->未处理;1->已处理") + @Schema(title = "举报状态:0->未处理;1->已处理") private Integer reportStatus; - @ApiModelProperty(value = "处理结果:0->无效;1->有效;2->恶意") + @Schema(title = "处理结果:0->无效;1->有效;2->恶意") private Integer handleStatus; private String note; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/CmsPrefrenceArea.java b/mall-mbg/src/main/java/com/macro/mall/model/CmsPrefrenceArea.java index 424d073..3448a2a 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/CmsPrefrenceArea.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/CmsPrefrenceArea.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; public class CmsPrefrenceArea implements Serializable { @@ -14,7 +14,7 @@ public class CmsPrefrenceArea implements Serializable { private Integer showStatus; - @ApiModelProperty(value = "展示图片") + @Schema(title = "展示图片") private byte[] pic; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/CmsPrefrenceAreaProductRelation.java b/mall-mbg/src/main/java/com/macro/mall/model/CmsPrefrenceAreaProductRelation.java index c063165..bf37d79 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/CmsPrefrenceAreaProductRelation.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/CmsPrefrenceAreaProductRelation.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; public class CmsPrefrenceAreaProductRelation implements Serializable { diff --git a/mall-mbg/src/main/java/com/macro/mall/model/CmsSubject.java b/mall-mbg/src/main/java/com/macro/mall/model/CmsSubject.java index 399d784..4f9d623 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/CmsSubject.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/CmsSubject.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.util.Date; @@ -11,10 +11,10 @@ public class CmsSubject implements Serializable { private String title; - @ApiModelProperty(value = "专题主图") + @Schema(title = "专题主图") private String pic; - @ApiModelProperty(value = "关联产品数量") + @Schema(title = "关联产品数量") private Integer productCount; private Integer recommendStatus; @@ -27,18 +27,18 @@ public class CmsSubject implements Serializable { private Integer commentCount; - @ApiModelProperty(value = "画册图片用逗号分割") + @Schema(title = "画册图片用逗号分割") private String albumPics; private String description; - @ApiModelProperty(value = "显示状态:0->不显示;1->显示") + @Schema(title = "显示状态:0->不显示;1->显示") private Integer showStatus; - @ApiModelProperty(value = "转发数") + @Schema(title = "转发数") private Integer forwardCount; - @ApiModelProperty(value = "专题分类名称") + @Schema(title = "专题分类名称") private String categoryName; private String content; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/CmsSubjectCategory.java b/mall-mbg/src/main/java/com/macro/mall/model/CmsSubjectCategory.java index ccd9f63..916484d 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/CmsSubjectCategory.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/CmsSubjectCategory.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; public class CmsSubjectCategory implements Serializable { @@ -8,10 +8,10 @@ public class CmsSubjectCategory implements Serializable { private String name; - @ApiModelProperty(value = "分类图标") + @Schema(title = "分类图标") private String icon; - @ApiModelProperty(value = "专题数量") + @Schema(title = "专题数量") private Integer subjectCount; private Integer showStatus; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/CmsSubjectComment.java b/mall-mbg/src/main/java/com/macro/mall/model/CmsSubjectComment.java index 846e645..d7ea0df 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/CmsSubjectComment.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/CmsSubjectComment.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.util.Date; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/CmsSubjectProductRelation.java b/mall-mbg/src/main/java/com/macro/mall/model/CmsSubjectProductRelation.java index c1c8ee7..88ac2c3 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/CmsSubjectProductRelation.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/CmsSubjectProductRelation.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; public class CmsSubjectProductRelation implements Serializable { diff --git a/mall-mbg/src/main/java/com/macro/mall/model/CmsTopic.java b/mall-mbg/src/main/java/com/macro/mall/model/CmsTopic.java index 6a10ddc..b27a177 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/CmsTopic.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/CmsTopic.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.util.Date; @@ -17,21 +17,21 @@ public class CmsTopic implements Serializable { private Date endTime; - @ApiModelProperty(value = "参与人数") + @Schema(title = "参与人数") private Integer attendCount; - @ApiModelProperty(value = "关注人数") + @Schema(title = "关注人数") private Integer attentionCount; private Integer readCount; - @ApiModelProperty(value = "奖品名称") + @Schema(title = "奖品名称") private String awardName; - @ApiModelProperty(value = "参与方式") + @Schema(title = "参与方式") private String attendType; - @ApiModelProperty(value = "话题内容") + @Schema(title = "话题内容") private String content; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/CmsTopicCategory.java b/mall-mbg/src/main/java/com/macro/mall/model/CmsTopicCategory.java index 0b69465..a332439 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/CmsTopicCategory.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/CmsTopicCategory.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; public class CmsTopicCategory implements Serializable { @@ -8,10 +8,10 @@ public class CmsTopicCategory implements Serializable { private String name; - @ApiModelProperty(value = "分类图标") + @Schema(title = "分类图标") private String icon; - @ApiModelProperty(value = "专题数量") + @Schema(title = "专题数量") private Integer subjectCount; private Integer showStatus; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/CmsTopicComment.java b/mall-mbg/src/main/java/com/macro/mall/model/CmsTopicComment.java index 358d19f..648da7e 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/CmsTopicComment.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/CmsTopicComment.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.util.Date; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/OmsCartItem.java b/mall-mbg/src/main/java/com/macro/mall/model/OmsCartItem.java index 3bb6cb6..a4f6e54 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/OmsCartItem.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/OmsCartItem.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; @@ -14,44 +14,44 @@ public class OmsCartItem implements Serializable { private Long memberId; - @ApiModelProperty(value = "购买数量") + @Schema(title = "购买数量") private Integer quantity; - @ApiModelProperty(value = "添加到购物车的价格") + @Schema(title = "添加到购物车的价格") private BigDecimal price; - @ApiModelProperty(value = "商品主图") + @Schema(title = "商品主图") private String productPic; - @ApiModelProperty(value = "商品名称") + @Schema(title = "商品名称") private String productName; - @ApiModelProperty(value = "商品副标题(卖点)") + @Schema(title = "商品副标题(卖点)") private String productSubTitle; - @ApiModelProperty(value = "商品sku条码") + @Schema(title = "商品sku条码") private String productSkuCode; - @ApiModelProperty(value = "会员昵称") + @Schema(title = "会员昵称") private String memberNickname; - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private Date createDate; - @ApiModelProperty(value = "修改时间") + @Schema(title = "修改时间") private Date modifyDate; - @ApiModelProperty(value = "是否删除") + @Schema(title = "是否删除") private Integer deleteStatus; - @ApiModelProperty(value = "商品分类") + @Schema(title = "商品分类") private Long productCategoryId; private String productBrand; private String productSn; - @ApiModelProperty(value = "商品销售属性:[{'key':'颜色','value':'颜色'},{'key':'容量','value':'4G'}]") + @Schema(title = "商品销售属性:[{'key':'颜色','value':'颜色'},{'key':'容量','value':'4G'}]") private String productAttr; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/OmsCompanyAddress.java b/mall-mbg/src/main/java/com/macro/mall/model/OmsCompanyAddress.java index 11040a4..0ee50c2 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/OmsCompanyAddress.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/OmsCompanyAddress.java @@ -1,36 +1,36 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; public class OmsCompanyAddress implements Serializable { private Long id; - @ApiModelProperty(value = "地址名称") + @Schema(title = "地址名称") private String addressName; - @ApiModelProperty(value = "默认发货地址:0->否;1->是") + @Schema(title = "默认发货地址:0->否;1->是") private Integer sendStatus; - @ApiModelProperty(value = "是否默认收货地址:0->否;1->是") + @Schema(title = "是否默认收货地址:0->否;1->是") private Integer receiveStatus; - @ApiModelProperty(value = "收发货人姓名") + @Schema(title = "收发货人姓名") private String name; - @ApiModelProperty(value = "收货人电话") + @Schema(title = "收货人电话") private String phone; - @ApiModelProperty(value = "省/直辖市") + @Schema(title = "省/直辖市") private String province; - @ApiModelProperty(value = "市") + @Schema(title = "市") private String city; - @ApiModelProperty(value = "区") + @Schema(title = "区") private String region; - @ApiModelProperty(value = "详细地址") + @Schema(title = "详细地址") private String detailAddress; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/OmsOrder.java b/mall-mbg/src/main/java/com/macro/mall/model/OmsOrder.java index e224b77..709c5c9 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/OmsOrder.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/OmsOrder.java @@ -1,139 +1,139 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; public class OmsOrder implements Serializable { - @ApiModelProperty(value = "订单id") + @Schema(title = "订单id") private Long id; private Long memberId; private Long couponId; - @ApiModelProperty(value = "订单编号") + @Schema(title = "订单编号") private String orderSn; - @ApiModelProperty(value = "提交时间") + @Schema(title = "提交时间") private Date createTime; - @ApiModelProperty(value = "用户帐号") + @Schema(title = "用户帐号") private String memberUsername; - @ApiModelProperty(value = "订单总金额") + @Schema(title = "订单总金额") private BigDecimal totalAmount; - @ApiModelProperty(value = "应付金额(实际支付金额)") + @Schema(title = "应付金额(实际支付金额)") private BigDecimal payAmount; - @ApiModelProperty(value = "运费金额") + @Schema(title = "运费金额") private BigDecimal freightAmount; - @ApiModelProperty(value = "促销优化金额(促销价、满减、阶梯价)") + @Schema(title = "促销优化金额(促销价、满减、阶梯价)") private BigDecimal promotionAmount; - @ApiModelProperty(value = "积分抵扣金额") + @Schema(title = "积分抵扣金额") private BigDecimal integrationAmount; - @ApiModelProperty(value = "优惠券抵扣金额") + @Schema(title = "优惠券抵扣金额") private BigDecimal couponAmount; - @ApiModelProperty(value = "管理员后台调整订单使用的折扣金额") + @Schema(title = "管理员后台调整订单使用的折扣金额") private BigDecimal discountAmount; - @ApiModelProperty(value = "支付方式:0->未支付;1->支付宝;2->微信") + @Schema(title = "支付方式:0->未支付;1->支付宝;2->微信") private Integer payType; - @ApiModelProperty(value = "订单来源:0->PC订单;1->app订单") + @Schema(title = "订单来源:0->PC订单;1->app订单") private Integer sourceType; - @ApiModelProperty(value = "订单状态:0->待付款;1->待发货;2->已发货;3->已完成;4->已关闭;5->无效订单") + @Schema(title = "订单状态:0->待付款;1->待发货;2->已发货;3->已完成;4->已关闭;5->无效订单") private Integer status; - @ApiModelProperty(value = "订单类型:0->正常订单;1->秒杀订单") + @Schema(title = "订单类型:0->正常订单;1->秒杀订单") private Integer orderType; - @ApiModelProperty(value = "物流公司(配送方式)") + @Schema(title = "物流公司(配送方式)") private String deliveryCompany; - @ApiModelProperty(value = "物流单号") + @Schema(title = "物流单号") private String deliverySn; - @ApiModelProperty(value = "自动确认时间(天)") + @Schema(title = "自动确认时间(天)") private Integer autoConfirmDay; - @ApiModelProperty(value = "可以获得的积分") + @Schema(title = "可以获得的积分") private Integer integration; - @ApiModelProperty(value = "可以活动的成长值") + @Schema(title = "可以活动的成长值") private Integer growth; - @ApiModelProperty(value = "活动信息") + @Schema(title = "活动信息") private String promotionInfo; - @ApiModelProperty(value = "发票类型:0->不开发票;1->电子发票;2->纸质发票") + @Schema(title = "发票类型:0->不开发票;1->电子发票;2->纸质发票") private Integer billType; - @ApiModelProperty(value = "发票抬头") + @Schema(title = "发票抬头") private String billHeader; - @ApiModelProperty(value = "发票内容") + @Schema(title = "发票内容") private String billContent; - @ApiModelProperty(value = "收票人电话") + @Schema(title = "收票人电话") private String billReceiverPhone; - @ApiModelProperty(value = "收票人邮箱") + @Schema(title = "收票人邮箱") private String billReceiverEmail; - @ApiModelProperty(value = "收货人姓名") + @Schema(title = "收货人姓名") private String receiverName; - @ApiModelProperty(value = "收货人电话") + @Schema(title = "收货人电话") private String receiverPhone; - @ApiModelProperty(value = "收货人邮编") + @Schema(title = "收货人邮编") private String receiverPostCode; - @ApiModelProperty(value = "省份/直辖市") + @Schema(title = "省份/直辖市") private String receiverProvince; - @ApiModelProperty(value = "城市") + @Schema(title = "城市") private String receiverCity; - @ApiModelProperty(value = "区") + @Schema(title = "区") private String receiverRegion; - @ApiModelProperty(value = "详细地址") + @Schema(title = "详细地址") private String receiverDetailAddress; - @ApiModelProperty(value = "订单备注") + @Schema(title = "订单备注") private String note; - @ApiModelProperty(value = "确认收货状态:0->未确认;1->已确认") + @Schema(title = "确认收货状态:0->未确认;1->已确认") private Integer confirmStatus; - @ApiModelProperty(value = "删除状态:0->未删除;1->已删除") + @Schema(title = "删除状态:0->未删除;1->已删除") private Integer deleteStatus; - @ApiModelProperty(value = "下单时使用的积分") + @Schema(title = "下单时使用的积分") private Integer useIntegration; - @ApiModelProperty(value = "支付时间") + @Schema(title = "支付时间") private Date paymentTime; - @ApiModelProperty(value = "发货时间") + @Schema(title = "发货时间") private Date deliveryTime; - @ApiModelProperty(value = "确认收货时间") + @Schema(title = "确认收货时间") private Date receiveTime; - @ApiModelProperty(value = "评价时间") + @Schema(title = "评价时间") private Date commentTime; - @ApiModelProperty(value = "修改时间") + @Schema(title = "修改时间") private Date modifyTime; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/OmsOrderItem.java b/mall-mbg/src/main/java/com/macro/mall/model/OmsOrderItem.java index af25fde..d904f31 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/OmsOrderItem.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/OmsOrderItem.java @@ -1,16 +1,16 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.math.BigDecimal; public class OmsOrderItem implements Serializable { private Long id; - @ApiModelProperty(value = "订单id") + @Schema(title = "订单id") private Long orderId; - @ApiModelProperty(value = "订单编号") + @Schema(title = "订单编号") private String orderSn; private Long productId; @@ -23,41 +23,41 @@ public class OmsOrderItem implements Serializable { private String productSn; - @ApiModelProperty(value = "销售价格") + @Schema(title = "销售价格") private BigDecimal productPrice; - @ApiModelProperty(value = "购买数量") + @Schema(title = "购买数量") private Integer productQuantity; - @ApiModelProperty(value = "商品sku编号") + @Schema(title = "商品sku编号") private Long productSkuId; - @ApiModelProperty(value = "商品sku条码") + @Schema(title = "商品sku条码") private String productSkuCode; - @ApiModelProperty(value = "商品分类id") + @Schema(title = "商品分类id") private Long productCategoryId; - @ApiModelProperty(value = "商品促销名称") + @Schema(title = "商品促销名称") private String promotionName; - @ApiModelProperty(value = "商品促销分解金额") + @Schema(title = "商品促销分解金额") private BigDecimal promotionAmount; - @ApiModelProperty(value = "优惠券优惠分解金额") + @Schema(title = "优惠券优惠分解金额") private BigDecimal couponAmount; - @ApiModelProperty(value = "积分优惠分解金额") + @Schema(title = "积分优惠分解金额") private BigDecimal integrationAmount; - @ApiModelProperty(value = "该商品经过优惠后的分解金额") + @Schema(title = "该商品经过优惠后的分解金额") private BigDecimal realAmount; private Integer giftIntegration; private Integer giftGrowth; - @ApiModelProperty(value = "商品销售属性:[{'key':'颜色','value':'颜色'},{'key':'容量','value':'4G'}]") + @Schema(title = "商品销售属性:[{'key':'颜色','value':'颜色'},{'key':'容量','value':'4G'}]") private String productAttr; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/OmsOrderOperateHistory.java b/mall-mbg/src/main/java/com/macro/mall/model/OmsOrderOperateHistory.java index 576352c..456f1f6 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/OmsOrderOperateHistory.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/OmsOrderOperateHistory.java @@ -1,25 +1,25 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.util.Date; public class OmsOrderOperateHistory implements Serializable { private Long id; - @ApiModelProperty(value = "订单id") + @Schema(title = "订单id") private Long orderId; - @ApiModelProperty(value = "操作人:用户;系统;后台管理员") + @Schema(title = "操作人:用户;系统;后台管理员") private String operateMan; - @ApiModelProperty(value = "操作时间") + @Schema(title = "操作时间") private Date createTime; - @ApiModelProperty(value = "订单状态:0->待付款;1->待发货;2->已发货;3->已完成;4->已关闭;5->无效订单") + @Schema(title = "订单状态:0->待付款;1->待发货;2->已发货;3->已完成;4->已关闭;5->无效订单") private Integer orderStatus; - @ApiModelProperty(value = "备注") + @Schema(title = "备注") private String note; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/OmsOrderReturnApply.java b/mall-mbg/src/main/java/com/macro/mall/model/OmsOrderReturnApply.java index 6be8019..fa755f8 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/OmsOrderReturnApply.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/OmsOrderReturnApply.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; @@ -8,82 +8,82 @@ import java.util.Date; public class OmsOrderReturnApply implements Serializable { private Long id; - @ApiModelProperty(value = "订单id") + @Schema(title = "订单id") private Long orderId; - @ApiModelProperty(value = "收货地址表id") + @Schema(title = "收货地址表id") private Long companyAddressId; - @ApiModelProperty(value = "退货商品id") + @Schema(title = "退货商品id") private Long productId; - @ApiModelProperty(value = "订单编号") + @Schema(title = "订单编号") private String orderSn; - @ApiModelProperty(value = "申请时间") + @Schema(title = "申请时间") private Date createTime; - @ApiModelProperty(value = "会员用户名") + @Schema(title = "会员用户名") private String memberUsername; - @ApiModelProperty(value = "退款金额") + @Schema(title = "退款金额") private BigDecimal returnAmount; - @ApiModelProperty(value = "退货人姓名") + @Schema(title = "退货人姓名") private String returnName; - @ApiModelProperty(value = "退货人电话") + @Schema(title = "退货人电话") private String returnPhone; - @ApiModelProperty(value = "申请状态:0->待处理;1->退货中;2->已完成;3->已拒绝") + @Schema(title = "申请状态:0->待处理;1->退货中;2->已完成;3->已拒绝") private Integer status; - @ApiModelProperty(value = "处理时间") + @Schema(title = "处理时间") private Date handleTime; - @ApiModelProperty(value = "商品图片") + @Schema(title = "商品图片") private String productPic; - @ApiModelProperty(value = "商品名称") + @Schema(title = "商品名称") private String productName; - @ApiModelProperty(value = "商品品牌") + @Schema(title = "商品品牌") private String productBrand; - @ApiModelProperty(value = "商品销售属性:颜色:红色;尺码:xl;") + @Schema(title = "商品销售属性:颜色:红色;尺码:xl;") private String productAttr; - @ApiModelProperty(value = "退货数量") + @Schema(title = "退货数量") private Integer productCount; - @ApiModelProperty(value = "商品单价") + @Schema(title = "商品单价") private BigDecimal productPrice; - @ApiModelProperty(value = "商品实际支付单价") + @Schema(title = "商品实际支付单价") private BigDecimal productRealPrice; - @ApiModelProperty(value = "原因") + @Schema(title = "原因") private String reason; - @ApiModelProperty(value = "描述") + @Schema(title = "描述") private String description; - @ApiModelProperty(value = "凭证图片,以逗号隔开") + @Schema(title = "凭证图片,以逗号隔开") private String proofPics; - @ApiModelProperty(value = "处理备注") + @Schema(title = "处理备注") private String handleNote; - @ApiModelProperty(value = "处理人员") + @Schema(title = "处理人员") private String handleMan; - @ApiModelProperty(value = "收货人") + @Schema(title = "收货人") private String receiveMan; - @ApiModelProperty(value = "收货时间") + @Schema(title = "收货时间") private Date receiveTime; - @ApiModelProperty(value = "收货备注") + @Schema(title = "收货备注") private String receiveNote; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/OmsOrderReturnReason.java b/mall-mbg/src/main/java/com/macro/mall/model/OmsOrderReturnReason.java index 8d4390b..981fcfe 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/OmsOrderReturnReason.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/OmsOrderReturnReason.java @@ -1,21 +1,21 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.util.Date; public class OmsOrderReturnReason implements Serializable { private Long id; - @ApiModelProperty(value = "退货类型") + @Schema(title = "退货类型") private String name; private Integer sort; - @ApiModelProperty(value = "状态:0->不启用;1->启用") + @Schema(title = "状态:0->不启用;1->启用") private Integer status; - @ApiModelProperty(value = "添加时间") + @Schema(title = "添加时间") private Date createTime; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/OmsOrderSetting.java b/mall-mbg/src/main/java/com/macro/mall/model/OmsOrderSetting.java index 3a7ec29..0f07154 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/OmsOrderSetting.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/OmsOrderSetting.java @@ -1,24 +1,24 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; public class OmsOrderSetting implements Serializable { private Long id; - @ApiModelProperty(value = "秒杀订单超时关闭时间(分)") + @Schema(title = "秒杀订单超时关闭时间(分)") private Integer flashOrderOvertime; - @ApiModelProperty(value = "正常订单超时时间(分)") + @Schema(title = "正常订单超时时间(分)") private Integer normalOrderOvertime; - @ApiModelProperty(value = "发货后自动确认收货时间(天)") + @Schema(title = "发货后自动确认收货时间(天)") private Integer confirmOvertime; - @ApiModelProperty(value = "自动完成交易时间,不能申请售后(天)") + @Schema(title = "自动完成交易时间,不能申请售后(天)") private Integer finishOvertime; - @ApiModelProperty(value = "订单完成后自动好评时间(天)") + @Schema(title = "订单完成后自动好评时间(天)") private Integer commentOvertime; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/PmsAlbum.java b/mall-mbg/src/main/java/com/macro/mall/model/PmsAlbum.java index 3a24ddb..ed0ae01 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/PmsAlbum.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/PmsAlbum.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; public class PmsAlbum implements Serializable { diff --git a/mall-mbg/src/main/java/com/macro/mall/model/PmsAlbumPic.java b/mall-mbg/src/main/java/com/macro/mall/model/PmsAlbumPic.java index ca4a81b..ef8fcfb 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/PmsAlbumPic.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/PmsAlbumPic.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; public class PmsAlbumPic implements Serializable { diff --git a/mall-mbg/src/main/java/com/macro/mall/model/PmsBrand.java b/mall-mbg/src/main/java/com/macro/mall/model/PmsBrand.java index 3b4efac..611fde7 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/PmsBrand.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/PmsBrand.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; public class PmsBrand implements Serializable { @@ -8,29 +8,29 @@ public class PmsBrand implements Serializable { private String name; - @ApiModelProperty(value = "首字母") + @Schema(title = "首字母") private String firstLetter; private Integer sort; - @ApiModelProperty(value = "是否为品牌制造商:0->不是;1->是") + @Schema(title = "是否为品牌制造商:0->不是;1->是") private Integer factoryStatus; private Integer showStatus; - @ApiModelProperty(value = "产品数量") + @Schema(title = "产品数量") private Integer productCount; - @ApiModelProperty(value = "产品评论数量") + @Schema(title = "产品评论数量") private Integer productCommentCount; - @ApiModelProperty(value = "品牌logo") + @Schema(title = "品牌logo") private String logo; - @ApiModelProperty(value = "专区大图") + @Schema(title = "专区大图") private String bigPic; - @ApiModelProperty(value = "品牌故事") + @Schema(title = "品牌故事") private String brandStory; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/PmsComment.java b/mall-mbg/src/main/java/com/macro/mall/model/PmsComment.java index cf1e0a7..576c22f 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/PmsComment.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/PmsComment.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.util.Date; @@ -13,27 +13,27 @@ public class PmsComment implements Serializable { private String productName; - @ApiModelProperty(value = "评价星数:0->5") + @Schema(title = "评价星数:0->5") private Integer star; - @ApiModelProperty(value = "评价的ip") + @Schema(title = "评价的ip") private String memberIp; private Date createTime; private Integer showStatus; - @ApiModelProperty(value = "购买时的商品属性") + @Schema(title = "购买时的商品属性") private String productAttribute; private Integer collectCouont; private Integer readCount; - @ApiModelProperty(value = "上传图片地址,以逗号隔开") + @Schema(title = "上传图片地址,以逗号隔开") private String pics; - @ApiModelProperty(value = "评论用户头像") + @Schema(title = "评论用户头像") private String memberIcon; private Integer replayCount; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/PmsCommentReplay.java b/mall-mbg/src/main/java/com/macro/mall/model/PmsCommentReplay.java index f5e1ff3..0c0f0fe 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/PmsCommentReplay.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/PmsCommentReplay.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.util.Date; @@ -17,7 +17,7 @@ public class PmsCommentReplay implements Serializable { private Date createTime; - @ApiModelProperty(value = "评论人员类型;0->会员;1->管理员") + @Schema(title = "评论人员类型;0->会员;1->管理员") private Integer type; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/PmsFeightTemplate.java b/mall-mbg/src/main/java/com/macro/mall/model/PmsFeightTemplate.java index 94c3147..eb8e192 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/PmsFeightTemplate.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/PmsFeightTemplate.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.math.BigDecimal; @@ -9,20 +9,20 @@ public class PmsFeightTemplate implements Serializable { private String name; - @ApiModelProperty(value = "计费类型:0->按重量;1->按件数") + @Schema(title = "计费类型:0->按重量;1->按件数") private Integer chargeType; - @ApiModelProperty(value = "首重kg") + @Schema(title = "首重kg") private BigDecimal firstWeight; - @ApiModelProperty(value = "首费(元)") + @Schema(title = "首费(元)") private BigDecimal firstFee; private BigDecimal continueWeight; private BigDecimal continmeFee; - @ApiModelProperty(value = "目的地(省、市)") + @Schema(title = "目的地(省、市)") private String dest; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/PmsMemberPrice.java b/mall-mbg/src/main/java/com/macro/mall/model/PmsMemberPrice.java index 4053be3..ab6f2ed 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/PmsMemberPrice.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/PmsMemberPrice.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.math.BigDecimal; @@ -11,7 +11,7 @@ public class PmsMemberPrice implements Serializable { private Long memberLevelId; - @ApiModelProperty(value = "会员价格") + @Schema(title = "会员价格") private BigDecimal memberPrice; private String memberLevelName; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/PmsProduct.java b/mall-mbg/src/main/java/com/macro/mall/model/PmsProduct.java index 8a01229..be1f817 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/PmsProduct.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/PmsProduct.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; @@ -20,104 +20,104 @@ public class PmsProduct implements Serializable { private String pic; - @ApiModelProperty(value = "货号") + @Schema(title = "货号") private String productSn; - @ApiModelProperty(value = "删除状态:0->未删除;1->已删除") + @Schema(title = "删除状态:0->未删除;1->已删除") private Integer deleteStatus; - @ApiModelProperty(value = "上架状态:0->下架;1->上架") + @Schema(title = "上架状态:0->下架;1->上架") private Integer publishStatus; - @ApiModelProperty(value = "新品状态:0->不是新品;1->新品") + @Schema(title = "新品状态:0->不是新品;1->新品") private Integer newStatus; - @ApiModelProperty(value = "推荐状态;0->不推荐;1->推荐") + @Schema(title = "推荐状态;0->不推荐;1->推荐") private Integer recommandStatus; - @ApiModelProperty(value = "审核状态:0->未审核;1->审核通过") + @Schema(title = "审核状态:0->未审核;1->审核通过") private Integer verifyStatus; - @ApiModelProperty(value = "排序") + @Schema(title = "排序") private Integer sort; - @ApiModelProperty(value = "销量") + @Schema(title = "销量") private Integer sale; private BigDecimal price; - @ApiModelProperty(value = "促销价格") + @Schema(title = "促销价格") private BigDecimal promotionPrice; - @ApiModelProperty(value = "赠送的成长值") + @Schema(title = "赠送的成长值") private Integer giftGrowth; - @ApiModelProperty(value = "赠送的积分") + @Schema(title = "赠送的积分") private Integer giftPoint; - @ApiModelProperty(value = "限制使用的积分数") + @Schema(title = "限制使用的积分数") private Integer usePointLimit; - @ApiModelProperty(value = "副标题") + @Schema(title = "副标题") private String subTitle; - @ApiModelProperty(value = "市场价") + @Schema(title = "市场价") private BigDecimal originalPrice; - @ApiModelProperty(value = "库存") + @Schema(title = "库存") private Integer stock; - @ApiModelProperty(value = "库存预警值") + @Schema(title = "库存预警值") private Integer lowStock; - @ApiModelProperty(value = "单位") + @Schema(title = "单位") private String unit; - @ApiModelProperty(value = "商品重量,默认为克") + @Schema(title = "商品重量,默认为克") private BigDecimal weight; - @ApiModelProperty(value = "是否为预告商品:0->不是;1->是") + @Schema(title = "是否为预告商品:0->不是;1->是") private Integer previewStatus; - @ApiModelProperty(value = "以逗号分割的产品服务:1->无忧退货;2->快速退款;3->免费包邮") + @Schema(title = "以逗号分割的产品服务:1->无忧退货;2->快速退款;3->免费包邮") private String serviceIds; private String keywords; private String note; - @ApiModelProperty(value = "画册图片,连产品图片限制为5张,以逗号分割") + @Schema(title = "画册图片,连产品图片限制为5张,以逗号分割") private String albumPics; private String detailTitle; - @ApiModelProperty(value = "促销开始时间") + @Schema(title = "促销开始时间") private Date promotionStartTime; - @ApiModelProperty(value = "促销结束时间") + @Schema(title = "促销结束时间") private Date promotionEndTime; - @ApiModelProperty(value = "活动限购数量") + @Schema(title = "活动限购数量") private Integer promotionPerLimit; - @ApiModelProperty(value = "促销类型:0->没有促销使用原价;1->使用促销价;2->使用会员价;3->使用阶梯价格;4->使用满减价格;5->限时购") + @Schema(title = "促销类型:0->没有促销使用原价;1->使用促销价;2->使用会员价;3->使用阶梯价格;4->使用满减价格;5->限时购") private Integer promotionType; - @ApiModelProperty(value = "品牌名称") + @Schema(title = "品牌名称") private String brandName; - @ApiModelProperty(value = "商品分类名称") + @Schema(title = "商品分类名称") private String productCategoryName; - @ApiModelProperty(value = "商品描述") + @Schema(title = "商品描述") private String description; private String detailDesc; - @ApiModelProperty(value = "产品详情网页内容") + @Schema(title = "产品详情网页内容") private String detailHtml; - @ApiModelProperty(value = "移动端网页详情") + @Schema(title = "移动端网页详情") private String detailMobileHtml; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/PmsProductAttribute.java b/mall-mbg/src/main/java/com/macro/mall/model/PmsProductAttribute.java index b7e95cf..eb24c38 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/PmsProductAttribute.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/PmsProductAttribute.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; public class PmsProductAttribute implements Serializable { @@ -10,31 +10,31 @@ public class PmsProductAttribute implements Serializable { private String name; - @ApiModelProperty(value = "属性选择类型:0->唯一;1->单选;2->多选") + @Schema(title = "属性选择类型:0->唯一;1->单选;2->多选") private Integer selectType; - @ApiModelProperty(value = "属性录入方式:0->手工录入;1->从列表中选取") + @Schema(title = "属性录入方式:0->手工录入;1->从列表中选取") private Integer inputType; - @ApiModelProperty(value = "可选值列表,以逗号隔开") + @Schema(title = "可选值列表,以逗号隔开") private String inputList; - @ApiModelProperty(value = "排序字段:最高的可以单独上传图片") + @Schema(title = "排序字段:最高的可以单独上传图片") private Integer sort; - @ApiModelProperty(value = "分类筛选样式:1->普通;1->颜色") + @Schema(title = "分类筛选样式:1->普通;1->颜色") private Integer filterType; - @ApiModelProperty(value = "检索类型;0->不需要进行检索;1->关键字检索;2->范围检索") + @Schema(title = "检索类型;0->不需要进行检索;1->关键字检索;2->范围检索") private Integer searchType; - @ApiModelProperty(value = "相同属性产品是否关联;0->不关联;1->关联") + @Schema(title = "相同属性产品是否关联;0->不关联;1->关联") private Integer relatedStatus; - @ApiModelProperty(value = "是否支持手动新增;0->不支持;1->支持") + @Schema(title = "是否支持手动新增;0->不支持;1->支持") private Integer handAddStatus; - @ApiModelProperty(value = "属性的类型;0->规格;1->参数") + @Schema(title = "属性的类型;0->规格;1->参数") private Integer type; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/PmsProductAttributeCategory.java b/mall-mbg/src/main/java/com/macro/mall/model/PmsProductAttributeCategory.java index 6e98632..e9b1d4d 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/PmsProductAttributeCategory.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/PmsProductAttributeCategory.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; public class PmsProductAttributeCategory implements Serializable { @@ -8,10 +8,10 @@ public class PmsProductAttributeCategory implements Serializable { private String name; - @ApiModelProperty(value = "属性数量") + @Schema(title = "属性数量") private Integer attributeCount; - @ApiModelProperty(value = "参数数量") + @Schema(title = "参数数量") private Integer paramCount; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/PmsProductAttributeValue.java b/mall-mbg/src/main/java/com/macro/mall/model/PmsProductAttributeValue.java index a8b046e..594d9c9 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/PmsProductAttributeValue.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/PmsProductAttributeValue.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; public class PmsProductAttributeValue implements Serializable { @@ -10,7 +10,7 @@ public class PmsProductAttributeValue implements Serializable { private Long productAttributeId; - @ApiModelProperty(value = "手动添加规格或参数的值,参数单值,规格有多个时以逗号隔开") + @Schema(title = "手动添加规格或参数的值,参数单值,规格有多个时以逗号隔开") private String value; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/PmsProductCategory.java b/mall-mbg/src/main/java/com/macro/mall/model/PmsProductCategory.java index 5472d54..261190b 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/PmsProductCategory.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/PmsProductCategory.java @@ -1,37 +1,37 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; public class PmsProductCategory implements Serializable { private Long id; - @ApiModelProperty(value = "上机分类的编号:0表示一级分类") + @Schema(title = "上机分类的编号:0表示一级分类") private Long parentId; private String name; - @ApiModelProperty(value = "分类级别:0->1级;1->2级") + @Schema(title = "分类级别:0->1级;1->2级") private Integer level; private Integer productCount; private String productUnit; - @ApiModelProperty(value = "是否显示在导航栏:0->不显示;1->显示") + @Schema(title = "是否显示在导航栏:0->不显示;1->显示") private Integer navStatus; - @ApiModelProperty(value = "显示状态:0->不显示;1->显示") + @Schema(title = "显示状态:0->不显示;1->显示") private Integer showStatus; private Integer sort; - @ApiModelProperty(value = "图标") + @Schema(title = "图标") private String icon; private String keywords; - @ApiModelProperty(value = "描述") + @Schema(title = "描述") private String description; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/PmsProductCategoryAttributeRelation.java b/mall-mbg/src/main/java/com/macro/mall/model/PmsProductCategoryAttributeRelation.java index f9b578a..aeaab80 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/PmsProductCategoryAttributeRelation.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/PmsProductCategoryAttributeRelation.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; public class PmsProductCategoryAttributeRelation implements Serializable { diff --git a/mall-mbg/src/main/java/com/macro/mall/model/PmsProductFullReduction.java b/mall-mbg/src/main/java/com/macro/mall/model/PmsProductFullReduction.java index ad40de0..923e20b 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/PmsProductFullReduction.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/PmsProductFullReduction.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.math.BigDecimal; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/PmsProductLadder.java b/mall-mbg/src/main/java/com/macro/mall/model/PmsProductLadder.java index 30c622e..1fff2e1 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/PmsProductLadder.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/PmsProductLadder.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.math.BigDecimal; @@ -9,13 +9,13 @@ public class PmsProductLadder implements Serializable { private Long productId; - @ApiModelProperty(value = "满足的商品数量") + @Schema(title = "满足的商品数量") private Integer count; - @ApiModelProperty(value = "折扣") + @Schema(title = "折扣") private BigDecimal discount; - @ApiModelProperty(value = "折后价格") + @Schema(title = "折后价格") private BigDecimal price; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/PmsProductOperateLog.java b/mall-mbg/src/main/java/com/macro/mall/model/PmsProductOperateLog.java index 4cc507f..55e13c5 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/PmsProductOperateLog.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/PmsProductOperateLog.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; @@ -18,7 +18,7 @@ public class PmsProductOperateLog implements Serializable { private BigDecimal salePriceNew; - @ApiModelProperty(value = "赠送的积分") + @Schema(title = "赠送的积分") private Integer giftPointOld; private Integer giftPointNew; @@ -27,7 +27,7 @@ public class PmsProductOperateLog implements Serializable { private Integer usePointLimitNew; - @ApiModelProperty(value = "操作人") + @Schema(title = "操作人") private String operateMan; private Date createTime; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/PmsProductVertifyRecord.java b/mall-mbg/src/main/java/com/macro/mall/model/PmsProductVertifyRecord.java index 3057e9b..571fb49 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/PmsProductVertifyRecord.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/PmsProductVertifyRecord.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.util.Date; @@ -11,12 +11,12 @@ public class PmsProductVertifyRecord implements Serializable { private Date createTime; - @ApiModelProperty(value = "审核人") + @Schema(title = "审核人") private String vertifyMan; private Integer status; - @ApiModelProperty(value = "反馈详情") + @Schema(title = "反馈详情") private String detail; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/PmsSkuStock.java b/mall-mbg/src/main/java/com/macro/mall/model/PmsSkuStock.java index 0653776..acc45ae 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/PmsSkuStock.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/PmsSkuStock.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.math.BigDecimal; @@ -9,30 +9,30 @@ public class PmsSkuStock implements Serializable { private Long productId; - @ApiModelProperty(value = "sku编码") + @Schema(title = "sku编码") private String skuCode; private BigDecimal price; - @ApiModelProperty(value = "库存") + @Schema(title = "库存") private Integer stock; - @ApiModelProperty(value = "预警库存") + @Schema(title = "预警库存") private Integer lowStock; - @ApiModelProperty(value = "展示图片") + @Schema(title = "展示图片") private String pic; - @ApiModelProperty(value = "销量") + @Schema(title = "销量") private Integer sale; - @ApiModelProperty(value = "单品促销价格") + @Schema(title = "单品促销价格") private BigDecimal promotionPrice; - @ApiModelProperty(value = "锁定库存") + @Schema(title = "锁定库存") private Integer lockStock; - @ApiModelProperty(value = "商品销售属性,json格式") + @Schema(title = "商品销售属性,json格式") private String spData; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/SmsCoupon.java b/mall-mbg/src/main/java/com/macro/mall/model/SmsCoupon.java index 6da1b70..8dd1e80 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/SmsCoupon.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/SmsCoupon.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; @@ -8,52 +8,52 @@ import java.util.Date; public class SmsCoupon implements Serializable { private Long id; - @ApiModelProperty(value = "优惠券类型;0->全场赠券;1->会员赠券;2->购物赠券;3->注册赠券") + @Schema(title = "优惠券类型;0->全场赠券;1->会员赠券;2->购物赠券;3->注册赠券") private Integer type; private String name; - @ApiModelProperty(value = "使用平台:0->全部;1->移动;2->PC") + @Schema(title = "使用平台:0->全部;1->移动;2->PC") private Integer platform; - @ApiModelProperty(value = "数量") + @Schema(title = "数量") private Integer count; - @ApiModelProperty(value = "金额") + @Schema(title = "金额") private BigDecimal amount; - @ApiModelProperty(value = "每人限领张数") + @Schema(title = "每人限领张数") private Integer perLimit; - @ApiModelProperty(value = "使用门槛;0表示无门槛") + @Schema(title = "使用门槛;0表示无门槛") private BigDecimal minPoint; private Date startTime; private Date endTime; - @ApiModelProperty(value = "使用类型:0->全场通用;1->指定分类;2->指定商品") + @Schema(title = "使用类型:0->全场通用;1->指定分类;2->指定商品") private Integer useType; - @ApiModelProperty(value = "备注") + @Schema(title = "备注") private String note; - @ApiModelProperty(value = "发行数量") + @Schema(title = "发行数量") private Integer publishCount; - @ApiModelProperty(value = "已使用数量") + @Schema(title = "已使用数量") private Integer useCount; - @ApiModelProperty(value = "领取数量") + @Schema(title = "领取数量") private Integer receiveCount; - @ApiModelProperty(value = "可以领取的日期") + @Schema(title = "可以领取的日期") private Date enableTime; - @ApiModelProperty(value = "优惠码") + @Schema(title = "优惠码") private String code; - @ApiModelProperty(value = "可领取的会员类型:0->无限时") + @Schema(title = "可领取的会员类型:0->无限时") private Integer memberLevel; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/SmsCouponHistory.java b/mall-mbg/src/main/java/com/macro/mall/model/SmsCouponHistory.java index db73afb..422c061 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/SmsCouponHistory.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/SmsCouponHistory.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.util.Date; @@ -13,24 +13,24 @@ public class SmsCouponHistory implements Serializable { private String couponCode; - @ApiModelProperty(value = "领取人昵称") + @Schema(title = "领取人昵称") private String memberNickname; - @ApiModelProperty(value = "获取类型:0->后台赠送;1->主动获取") + @Schema(title = "获取类型:0->后台赠送;1->主动获取") private Integer getType; private Date createTime; - @ApiModelProperty(value = "使用状态:0->未使用;1->已使用;2->已过期") + @Schema(title = "使用状态:0->未使用;1->已使用;2->已过期") private Integer useStatus; - @ApiModelProperty(value = "使用时间") + @Schema(title = "使用时间") private Date useTime; - @ApiModelProperty(value = "订单编号") + @Schema(title = "订单编号") private Long orderId; - @ApiModelProperty(value = "订单号码") + @Schema(title = "订单号码") private String orderSn; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/SmsCouponProductCategoryRelation.java b/mall-mbg/src/main/java/com/macro/mall/model/SmsCouponProductCategoryRelation.java index 496d472..55844f4 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/SmsCouponProductCategoryRelation.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/SmsCouponProductCategoryRelation.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; public class SmsCouponProductCategoryRelation implements Serializable { @@ -10,10 +10,10 @@ public class SmsCouponProductCategoryRelation implements Serializable { private Long productCategoryId; - @ApiModelProperty(value = "产品分类名称") + @Schema(title = "产品分类名称") private String productCategoryName; - @ApiModelProperty(value = "父分类名称") + @Schema(title = "父分类名称") private String parentCategoryName; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/SmsCouponProductRelation.java b/mall-mbg/src/main/java/com/macro/mall/model/SmsCouponProductRelation.java index 2b6fcae..3accac8 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/SmsCouponProductRelation.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/SmsCouponProductRelation.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; public class SmsCouponProductRelation implements Serializable { @@ -10,10 +10,10 @@ public class SmsCouponProductRelation implements Serializable { private Long productId; - @ApiModelProperty(value = "商品名称") + @Schema(title = "商品名称") private String productName; - @ApiModelProperty(value = "商品编码") + @Schema(title = "商品编码") private String productSn; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/SmsFlashPromotion.java b/mall-mbg/src/main/java/com/macro/mall/model/SmsFlashPromotion.java index 7910dcf..62840da 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/SmsFlashPromotion.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/SmsFlashPromotion.java @@ -1,24 +1,25 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.util.Date; public class SmsFlashPromotion implements Serializable { private Long id; + @Schema(title = "秒杀时间段名称") private String title; - @ApiModelProperty(value = "开始日期") + @Schema(title = "开始日期") private Date startDate; - @ApiModelProperty(value = "结束日期") + @Schema(title = "结束日期") private Date endDate; - @ApiModelProperty(value = "上下线状态") + @Schema(title = "上下线状态") private Integer status; - @ApiModelProperty(value = "秒杀时间段名称") + @Schema(title = "创建时间") private Date createTime; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/SmsFlashPromotionLog.java b/mall-mbg/src/main/java/com/macro/mall/model/SmsFlashPromotionLog.java index 1b15855..023d0c2 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/SmsFlashPromotionLog.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/SmsFlashPromotionLog.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.util.Date; @@ -15,7 +15,7 @@ public class SmsFlashPromotionLog implements Serializable { private String productName; - @ApiModelProperty(value = "会员订阅时间") + @Schema(title = "会员订阅时间") private Date subscribeTime; private Date sendTime; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/SmsFlashPromotionProductRelation.java b/mall-mbg/src/main/java/com/macro/mall/model/SmsFlashPromotionProductRelation.java index 6297a26..dfa010b 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/SmsFlashPromotionProductRelation.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/SmsFlashPromotionProductRelation.java @@ -1,30 +1,30 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.math.BigDecimal; public class SmsFlashPromotionProductRelation implements Serializable { - @ApiModelProperty(value = "编号") + @Schema(title = "编号") private Long id; private Long flashPromotionId; - @ApiModelProperty(value = "编号") + @Schema(title = "编号") private Long flashPromotionSessionId; private Long productId; - @ApiModelProperty(value = "限时购价格") + @Schema(title = "限时购价格") private BigDecimal flashPromotionPrice; - @ApiModelProperty(value = "限时购数量") + @Schema(title = "限时购数量") private Integer flashPromotionCount; - @ApiModelProperty(value = "每人限购数量") + @Schema(title = "每人限购数量") private Integer flashPromotionLimit; - @ApiModelProperty(value = "排序") + @Schema(title = "排序") private Integer sort; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/SmsFlashPromotionSession.java b/mall-mbg/src/main/java/com/macro/mall/model/SmsFlashPromotionSession.java index 1d2377b..e40d2ec 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/SmsFlashPromotionSession.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/SmsFlashPromotionSession.java @@ -1,26 +1,26 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.util.Date; public class SmsFlashPromotionSession implements Serializable { - @ApiModelProperty(value = "编号") + @Schema(title = "编号") private Long id; - @ApiModelProperty(value = "场次名称") + @Schema(title = "场次名称") private String name; - @ApiModelProperty(value = "每日开始时间") + @Schema(title = "每日开始时间") private Date startTime; - @ApiModelProperty(value = "每日结束时间") + @Schema(title = "每日结束时间") private Date endTime; - @ApiModelProperty(value = "启用状态:0->不启用;1->启用") + @Schema(title = "启用状态:0->不启用;1->启用") private Integer status; - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private Date createTime; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/SmsHomeAdvertise.java b/mall-mbg/src/main/java/com/macro/mall/model/SmsHomeAdvertise.java index 0213684..a0bb587 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/SmsHomeAdvertise.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/SmsHomeAdvertise.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.util.Date; @@ -9,7 +9,7 @@ public class SmsHomeAdvertise implements Serializable { private String name; - @ApiModelProperty(value = "轮播位置:0->PC首页轮播;1->app首页轮播") + @Schema(title = "轮播位置:0->PC首页轮播;1->app首页轮播") private Integer type; private String pic; @@ -18,22 +18,22 @@ public class SmsHomeAdvertise implements Serializable { private Date endTime; - @ApiModelProperty(value = "上下线状态:0->下线;1->上线") + @Schema(title = "上下线状态:0->下线;1->上线") private Integer status; - @ApiModelProperty(value = "点击数") + @Schema(title = "点击数") private Integer clickCount; - @ApiModelProperty(value = "下单数") + @Schema(title = "下单数") private Integer orderCount; - @ApiModelProperty(value = "链接地址") + @Schema(title = "链接地址") private String url; - @ApiModelProperty(value = "备注") + @Schema(title = "备注") private String note; - @ApiModelProperty(value = "排序") + @Schema(title = "排序") private Integer sort; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/SmsHomeBrand.java b/mall-mbg/src/main/java/com/macro/mall/model/SmsHomeBrand.java index 1b6dab3..e01ec95 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/SmsHomeBrand.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/SmsHomeBrand.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; public class SmsHomeBrand implements Serializable { diff --git a/mall-mbg/src/main/java/com/macro/mall/model/SmsHomeNewProduct.java b/mall-mbg/src/main/java/com/macro/mall/model/SmsHomeNewProduct.java index cb07d19..d75f969 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/SmsHomeNewProduct.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/SmsHomeNewProduct.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; public class SmsHomeNewProduct implements Serializable { diff --git a/mall-mbg/src/main/java/com/macro/mall/model/SmsHomeRecommendProduct.java b/mall-mbg/src/main/java/com/macro/mall/model/SmsHomeRecommendProduct.java index c09c044..181975f 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/SmsHomeRecommendProduct.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/SmsHomeRecommendProduct.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; public class SmsHomeRecommendProduct implements Serializable { diff --git a/mall-mbg/src/main/java/com/macro/mall/model/SmsHomeRecommendSubject.java b/mall-mbg/src/main/java/com/macro/mall/model/SmsHomeRecommendSubject.java index e97f869..2bfc9ad 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/SmsHomeRecommendSubject.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/SmsHomeRecommendSubject.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; public class SmsHomeRecommendSubject implements Serializable { diff --git a/mall-mbg/src/main/java/com/macro/mall/model/UmsAdmin.java b/mall-mbg/src/main/java/com/macro/mall/model/UmsAdmin.java index 3360da3..d3bc7e0 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/UmsAdmin.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/UmsAdmin.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.util.Date; @@ -11,25 +11,25 @@ public class UmsAdmin implements Serializable { private String password; - @ApiModelProperty(value = "头像") + @Schema(title = "头像") private String icon; - @ApiModelProperty(value = "邮箱") + @Schema(title = "邮箱") private String email; - @ApiModelProperty(value = "昵称") + @Schema(title = "昵称") private String nickName; - @ApiModelProperty(value = "备注信息") + @Schema(title = "备注信息") private String note; - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private Date createTime; - @ApiModelProperty(value = "最后登录时间") + @Schema(title = "最后登录时间") private Date loginTime; - @ApiModelProperty(value = "帐号启用状态:0->禁用;1->启用") + @Schema(title = "帐号启用状态:0->禁用;1->启用") private Integer status; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/UmsAdminLoginLog.java b/mall-mbg/src/main/java/com/macro/mall/model/UmsAdminLoginLog.java index 1b0b243..67786ba 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/UmsAdminLoginLog.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/UmsAdminLoginLog.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.util.Date; @@ -15,7 +15,7 @@ public class UmsAdminLoginLog implements Serializable { private String address; - @ApiModelProperty(value = "浏览器登录类型") + @Schema(title = "浏览器登录类型") private String userAgent; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/UmsAdminPermissionRelation.java b/mall-mbg/src/main/java/com/macro/mall/model/UmsAdminPermissionRelation.java index 296ab5d..f2cb196 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/UmsAdminPermissionRelation.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/UmsAdminPermissionRelation.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; public class UmsAdminPermissionRelation implements Serializable { diff --git a/mall-mbg/src/main/java/com/macro/mall/model/UmsAdminRoleRelation.java b/mall-mbg/src/main/java/com/macro/mall/model/UmsAdminRoleRelation.java index 28ce302..66a78ea 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/UmsAdminRoleRelation.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/UmsAdminRoleRelation.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; public class UmsAdminRoleRelation implements Serializable { diff --git a/mall-mbg/src/main/java/com/macro/mall/model/UmsGrowthChangeHistory.java b/mall-mbg/src/main/java/com/macro/mall/model/UmsGrowthChangeHistory.java index 6f19d1a..1230226 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/UmsGrowthChangeHistory.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/UmsGrowthChangeHistory.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.util.Date; @@ -11,19 +11,19 @@ public class UmsGrowthChangeHistory implements Serializable { private Date createTime; - @ApiModelProperty(value = "改变类型:0->增加;1->减少") + @Schema(title = "改变类型:0->增加;1->减少") private Integer changeType; - @ApiModelProperty(value = "积分改变数量") + @Schema(title = "积分改变数量") private Integer changeCount; - @ApiModelProperty(value = "操作人员") + @Schema(title = "操作人员") private String operateMan; - @ApiModelProperty(value = "操作备注") + @Schema(title = "操作备注") private String operateNote; - @ApiModelProperty(value = "积分来源:0->购物;1->管理员修改") + @Schema(title = "积分来源:0->购物;1->管理员修改") private Integer sourceType; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/UmsIntegrationChangeHistory.java b/mall-mbg/src/main/java/com/macro/mall/model/UmsIntegrationChangeHistory.java index 910f279..0aea90d 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/UmsIntegrationChangeHistory.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/UmsIntegrationChangeHistory.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.util.Date; @@ -11,19 +11,19 @@ public class UmsIntegrationChangeHistory implements Serializable { private Date createTime; - @ApiModelProperty(value = "改变类型:0->增加;1->减少") + @Schema(title = "改变类型:0->增加;1->减少") private Integer changeType; - @ApiModelProperty(value = "积分改变数量") + @Schema(title = "积分改变数量") private Integer changeCount; - @ApiModelProperty(value = "操作人员") + @Schema(title = "操作人员") private String operateMan; - @ApiModelProperty(value = "操作备注") + @Schema(title = "操作备注") private String operateNote; - @ApiModelProperty(value = "积分来源:0->购物;1->管理员修改") + @Schema(title = "积分来源:0->购物;1->管理员修改") private Integer sourceType; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/UmsIntegrationConsumeSetting.java b/mall-mbg/src/main/java/com/macro/mall/model/UmsIntegrationConsumeSetting.java index dfeceaf..8da0922 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/UmsIntegrationConsumeSetting.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/UmsIntegrationConsumeSetting.java @@ -1,21 +1,21 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; public class UmsIntegrationConsumeSetting implements Serializable { private Long id; - @ApiModelProperty(value = "每一元需要抵扣的积分数量") + @Schema(title = "每一元需要抵扣的积分数量") private Integer deductionPerAmount; - @ApiModelProperty(value = "每笔订单最高抵用百分比") + @Schema(title = "每笔订单最高抵用百分比") private Integer maxPercentPerOrder; - @ApiModelProperty(value = "每次使用积分最小单位100") + @Schema(title = "每次使用积分最小单位100") private Integer useUnit; - @ApiModelProperty(value = "是否可以和优惠券同用;0->不可以;1->可以") + @Schema(title = "是否可以和优惠券同用;0->不可以;1->可以") private Integer couponStatus; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/UmsMember.java b/mall-mbg/src/main/java/com/macro/mall/model/UmsMember.java index 6845964..50c1462 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/UmsMember.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/UmsMember.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.util.Date; @@ -9,55 +9,55 @@ public class UmsMember implements Serializable { private Long memberLevelId; - @ApiModelProperty(value = "用户名") + @Schema(title = "用户名") private String username; - @ApiModelProperty(value = "密码") + @Schema(title = "密码") private String password; - @ApiModelProperty(value = "昵称") + @Schema(title = "昵称") private String nickname; - @ApiModelProperty(value = "手机号码") + @Schema(title = "手机号码") private String phone; - @ApiModelProperty(value = "帐号启用状态:0->禁用;1->启用") + @Schema(title = "帐号启用状态:0->禁用;1->启用") private Integer status; - @ApiModelProperty(value = "注册时间") + @Schema(title = "注册时间") private Date createTime; - @ApiModelProperty(value = "头像") + @Schema(title = "头像") private String icon; - @ApiModelProperty(value = "性别:0->未知;1->男;2->女") + @Schema(title = "性别:0->未知;1->男;2->女") private Integer gender; - @ApiModelProperty(value = "生日") + @Schema(title = "生日") private Date birthday; - @ApiModelProperty(value = "所做城市") + @Schema(title = "所做城市") private String city; - @ApiModelProperty(value = "职业") + @Schema(title = "职业") private String job; - @ApiModelProperty(value = "个性签名") + @Schema(title = "个性签名") private String personalizedSignature; - @ApiModelProperty(value = "用户来源") + @Schema(title = "用户来源") private Integer sourceType; - @ApiModelProperty(value = "积分") + @Schema(title = "积分") private Integer integration; - @ApiModelProperty(value = "成长值") + @Schema(title = "成长值") private Integer growth; - @ApiModelProperty(value = "剩余抽奖次数") + @Schema(title = "剩余抽奖次数") private Integer luckeyCount; - @ApiModelProperty(value = "历史积分数量") + @Schema(title = "历史积分数量") private Integer historyIntegration; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/UmsMemberLevel.java b/mall-mbg/src/main/java/com/macro/mall/model/UmsMemberLevel.java index ad937a4..cec59ee 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/UmsMemberLevel.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/UmsMemberLevel.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.math.BigDecimal; @@ -11,31 +11,31 @@ public class UmsMemberLevel implements Serializable { private Integer growthPoint; - @ApiModelProperty(value = "是否为默认等级:0->不是;1->是") + @Schema(title = "是否为默认等级:0->不是;1->是") private Integer defaultStatus; - @ApiModelProperty(value = "免运费标准") + @Schema(title = "免运费标准") private BigDecimal freeFreightPoint; - @ApiModelProperty(value = "每次评价获取的成长值") + @Schema(title = "每次评价获取的成长值") private Integer commentGrowthPoint; - @ApiModelProperty(value = "是否有免邮特权") + @Schema(title = "是否有免邮特权") private Integer priviledgeFreeFreight; - @ApiModelProperty(value = "是否有签到特权") + @Schema(title = "是否有签到特权") private Integer priviledgeSignIn; - @ApiModelProperty(value = "是否有评论获奖励特权") + @Schema(title = "是否有评论获奖励特权") private Integer priviledgeComment; - @ApiModelProperty(value = "是否有专享活动特权") + @Schema(title = "是否有专享活动特权") private Integer priviledgePromotion; - @ApiModelProperty(value = "是否有会员价格特权") + @Schema(title = "是否有会员价格特权") private Integer priviledgeMemberPrice; - @ApiModelProperty(value = "是否有生日特权") + @Schema(title = "是否有生日特权") private Integer priviledgeBirthday; private String note; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/UmsMemberLoginLog.java b/mall-mbg/src/main/java/com/macro/mall/model/UmsMemberLoginLog.java index 9205c44..a7a8299 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/UmsMemberLoginLog.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/UmsMemberLoginLog.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.util.Date; @@ -15,7 +15,7 @@ public class UmsMemberLoginLog implements Serializable { private String city; - @ApiModelProperty(value = "登录类型:0->PC;1->android;2->ios;3->小程序") + @Schema(title = "登录类型:0->PC;1->android;2->ios;3->小程序") private Integer loginType; private String province; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/UmsMemberMemberTagRelation.java b/mall-mbg/src/main/java/com/macro/mall/model/UmsMemberMemberTagRelation.java index 94f27d3..6fa769d 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/UmsMemberMemberTagRelation.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/UmsMemberMemberTagRelation.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; public class UmsMemberMemberTagRelation implements Serializable { diff --git a/mall-mbg/src/main/java/com/macro/mall/model/UmsMemberProductCategoryRelation.java b/mall-mbg/src/main/java/com/macro/mall/model/UmsMemberProductCategoryRelation.java index 3dcc404..2f8a5ad 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/UmsMemberProductCategoryRelation.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/UmsMemberProductCategoryRelation.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; public class UmsMemberProductCategoryRelation implements Serializable { diff --git a/mall-mbg/src/main/java/com/macro/mall/model/UmsMemberReceiveAddress.java b/mall-mbg/src/main/java/com/macro/mall/model/UmsMemberReceiveAddress.java index 7557e85..8faa15e 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/UmsMemberReceiveAddress.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/UmsMemberReceiveAddress.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; public class UmsMemberReceiveAddress implements Serializable { @@ -8,27 +8,27 @@ public class UmsMemberReceiveAddress implements Serializable { private Long memberId; - @ApiModelProperty(value = "收货人名称") + @Schema(title = "收货人名称") private String name; private String phoneNumber; - @ApiModelProperty(value = "是否为默认") + @Schema(title = "是否为默认") private Integer defaultStatus; - @ApiModelProperty(value = "邮政编码") + @Schema(title = "邮政编码") private String postCode; - @ApiModelProperty(value = "省份/直辖市") + @Schema(title = "省份/直辖市") private String province; - @ApiModelProperty(value = "城市") + @Schema(title = "城市") private String city; - @ApiModelProperty(value = "区") + @Schema(title = "区") private String region; - @ApiModelProperty(value = "详细地址(街道)") + @Schema(title = "详细地址(街道)") private String detailAddress; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/UmsMemberRuleSetting.java b/mall-mbg/src/main/java/com/macro/mall/model/UmsMemberRuleSetting.java index 94fca6a..0bed670 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/UmsMemberRuleSetting.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/UmsMemberRuleSetting.java @@ -1,28 +1,28 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.math.BigDecimal; public class UmsMemberRuleSetting implements Serializable { private Long id; - @ApiModelProperty(value = "连续签到天数") + @Schema(title = "连续签到天数") private Integer continueSignDay; - @ApiModelProperty(value = "连续签到赠送数量") + @Schema(title = "连续签到赠送数量") private Integer continueSignPoint; - @ApiModelProperty(value = "每消费多少元获取1个点") + @Schema(title = "每消费多少元获取1个点") private BigDecimal consumePerPoint; - @ApiModelProperty(value = "最低获取点数的订单金额") + @Schema(title = "最低获取点数的订单金额") private BigDecimal lowOrderAmount; - @ApiModelProperty(value = "每笔订单最高获取点数") + @Schema(title = "每笔订单最高获取点数") private Integer maxPointPerOrder; - @ApiModelProperty(value = "类型:0->积分规则;1->成长值规则") + @Schema(title = "类型:0->积分规则;1->成长值规则") private Integer type; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/UmsMemberStatisticsInfo.java b/mall-mbg/src/main/java/com/macro/mall/model/UmsMemberStatisticsInfo.java index cf3af8d..a9f6900 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/UmsMemberStatisticsInfo.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/UmsMemberStatisticsInfo.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; @@ -10,28 +10,28 @@ public class UmsMemberStatisticsInfo implements Serializable { private Long memberId; - @ApiModelProperty(value = "累计消费金额") + @Schema(title = "累计消费金额") private BigDecimal consumeAmount; - @ApiModelProperty(value = "订单数量") + @Schema(title = "订单数量") private Integer orderCount; - @ApiModelProperty(value = "优惠券数量") + @Schema(title = "优惠券数量") private Integer couponCount; - @ApiModelProperty(value = "评价数") + @Schema(title = "评价数") private Integer commentCount; - @ApiModelProperty(value = "退货数量") + @Schema(title = "退货数量") private Integer returnOrderCount; - @ApiModelProperty(value = "登录次数") + @Schema(title = "登录次数") private Integer loginCount; - @ApiModelProperty(value = "关注数量") + @Schema(title = "关注数量") private Integer attendCount; - @ApiModelProperty(value = "粉丝数量") + @Schema(title = "粉丝数量") private Integer fansCount; private Integer collectProductCount; @@ -44,7 +44,7 @@ public class UmsMemberStatisticsInfo implements Serializable { private Integer inviteFriendCount; - @ApiModelProperty(value = "最后一次下订单时间") + @Schema(title = "最后一次下订单时间") private Date recentOrderTime; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/UmsMemberTag.java b/mall-mbg/src/main/java/com/macro/mall/model/UmsMemberTag.java index 0a5891f..b822627 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/UmsMemberTag.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/UmsMemberTag.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.math.BigDecimal; @@ -9,10 +9,10 @@ public class UmsMemberTag implements Serializable { private String name; - @ApiModelProperty(value = "自动打标签完成订单数量") + @Schema(title = "自动打标签完成订单数量") private Integer finishOrderCount; - @ApiModelProperty(value = "自动打标签完成订单金额") + @Schema(title = "自动打标签完成订单金额") private BigDecimal finishOrderAmount; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/UmsMemberTask.java b/mall-mbg/src/main/java/com/macro/mall/model/UmsMemberTask.java index 5b856ca..2c62204 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/UmsMemberTask.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/UmsMemberTask.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; public class UmsMemberTask implements Serializable { @@ -8,13 +8,13 @@ public class UmsMemberTask implements Serializable { private String name; - @ApiModelProperty(value = "赠送成长值") + @Schema(title = "赠送成长值") private Integer growth; - @ApiModelProperty(value = "赠送积分") + @Schema(title = "赠送积分") private Integer intergration; - @ApiModelProperty(value = "任务类型:0->新手任务;1->日常任务") + @Schema(title = "任务类型:0->新手任务;1->日常任务") private Integer type; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/UmsMenu.java b/mall-mbg/src/main/java/com/macro/mall/model/UmsMenu.java index 433cb85..fb6cc29 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/UmsMenu.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/UmsMenu.java @@ -1,34 +1,34 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.util.Date; public class UmsMenu implements Serializable { private Long id; - @ApiModelProperty(value = "父级ID") + @Schema(title = "父级ID") private Long parentId; - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private Date createTime; - @ApiModelProperty(value = "菜单名称") + @Schema(title = "菜单名称") private String title; - @ApiModelProperty(value = "菜单级数") + @Schema(title = "菜单级数") private Integer level; - @ApiModelProperty(value = "菜单排序") + @Schema(title = "菜单排序") private Integer sort; - @ApiModelProperty(value = "前端名称") + @Schema(title = "前端名称") private String name; - @ApiModelProperty(value = "前端图标") + @Schema(title = "前端图标") private String icon; - @ApiModelProperty(value = "前端隐藏") + @Schema(title = "前端隐藏") private Integer hidden; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/UmsPermission.java b/mall-mbg/src/main/java/com/macro/mall/model/UmsPermission.java index b2d4b2b..0df583a 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/UmsPermission.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/UmsPermission.java @@ -1,37 +1,37 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.util.Date; public class UmsPermission implements Serializable { private Long id; - @ApiModelProperty(value = "父级权限id") + @Schema(title = "父级权限id") private Long pid; - @ApiModelProperty(value = "名称") + @Schema(title = "名称") private String name; - @ApiModelProperty(value = "权限值") + @Schema(title = "权限值") private String value; - @ApiModelProperty(value = "图标") + @Schema(title = "图标") private String icon; - @ApiModelProperty(value = "权限类型:0->目录;1->菜单;2->按钮(接口绑定权限)") + @Schema(title = "权限类型:0->目录;1->菜单;2->按钮(接口绑定权限)") private Integer type; - @ApiModelProperty(value = "前端资源路径") + @Schema(title = "前端资源路径") private String uri; - @ApiModelProperty(value = "启用状态;0->禁用;1->启用") + @Schema(title = "启用状态;0->禁用;1->启用") private Integer status; - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private Date createTime; - @ApiModelProperty(value = "排序") + @Schema(title = "排序") private Integer sort; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/UmsResource.java b/mall-mbg/src/main/java/com/macro/mall/model/UmsResource.java index eb265da..bc0b6e2 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/UmsResource.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/UmsResource.java @@ -1,25 +1,25 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.util.Date; public class UmsResource implements Serializable { private Long id; - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private Date createTime; - @ApiModelProperty(value = "资源名称") + @Schema(title = "资源名称") private String name; - @ApiModelProperty(value = "资源URL") + @Schema(title = "资源URL") private String url; - @ApiModelProperty(value = "描述") + @Schema(title = "描述") private String description; - @ApiModelProperty(value = "资源分类ID") + @Schema(title = "资源分类ID") private Long categoryId; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/UmsResourceCategory.java b/mall-mbg/src/main/java/com/macro/mall/model/UmsResourceCategory.java index bee170b..1fe4d5c 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/UmsResourceCategory.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/UmsResourceCategory.java @@ -1,19 +1,19 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.util.Date; public class UmsResourceCategory implements Serializable { private Long id; - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private Date createTime; - @ApiModelProperty(value = "分类名称") + @Schema(title = "分类名称") private String name; - @ApiModelProperty(value = "排序") + @Schema(title = "排序") private Integer sort; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/UmsRole.java b/mall-mbg/src/main/java/com/macro/mall/model/UmsRole.java index 392c8a4..cc42f65 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/UmsRole.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/UmsRole.java @@ -1,25 +1,25 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; import java.util.Date; public class UmsRole implements Serializable { private Long id; - @ApiModelProperty(value = "名称") + @Schema(title = "名称") private String name; - @ApiModelProperty(value = "描述") + @Schema(title = "描述") private String description; - @ApiModelProperty(value = "后台用户数量") + @Schema(title = "后台用户数量") private Integer adminCount; - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private Date createTime; - @ApiModelProperty(value = "启用状态:0->禁用;1->启用") + @Schema(title = "启用状态:0->禁用;1->启用") private Integer status; private Integer sort; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/UmsRoleMenuRelation.java b/mall-mbg/src/main/java/com/macro/mall/model/UmsRoleMenuRelation.java index a76a0a7..5064df2 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/UmsRoleMenuRelation.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/UmsRoleMenuRelation.java @@ -1,15 +1,15 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; public class UmsRoleMenuRelation implements Serializable { private Long id; - @ApiModelProperty(value = "角色ID") + @Schema(title = "角色ID") private Long roleId; - @ApiModelProperty(value = "菜单ID") + @Schema(title = "菜单ID") private Long menuId; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/java/com/macro/mall/model/UmsRolePermissionRelation.java b/mall-mbg/src/main/java/com/macro/mall/model/UmsRolePermissionRelation.java index 51a58ff..423482e 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/UmsRolePermissionRelation.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/UmsRolePermissionRelation.java @@ -1,6 +1,6 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; public class UmsRolePermissionRelation implements Serializable { diff --git a/mall-mbg/src/main/java/com/macro/mall/model/UmsRoleResourceRelation.java b/mall-mbg/src/main/java/com/macro/mall/model/UmsRoleResourceRelation.java index 08dd21a..93de8ce 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/UmsRoleResourceRelation.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/UmsRoleResourceRelation.java @@ -1,15 +1,15 @@ package com.macro.mall.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; public class UmsRoleResourceRelation implements Serializable { private Long id; - @ApiModelProperty(value = "角色ID") + @Schema(title = "角色ID") private Long roleId; - @ApiModelProperty(value = "资源ID") + @Schema(title = "资源ID") private Long resourceId; private static final long serialVersionUID = 1L; diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsHelpCategoryMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsHelpCategoryMapper.xml index cc200ed..1457ce8 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsHelpCategoryMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsHelpCategoryMapper.xml @@ -158,38 +158,38 @@ update cms_help_category - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - name = #{record.name,jdbcType=VARCHAR}, + + name = #{row.name,jdbcType=VARCHAR}, - - icon = #{record.icon,jdbcType=VARCHAR}, + + icon = #{row.icon,jdbcType=VARCHAR}, - - help_count = #{record.helpCount,jdbcType=INTEGER}, + + help_count = #{row.helpCount,jdbcType=INTEGER}, - - show_status = #{record.showStatus,jdbcType=INTEGER}, + + show_status = #{row.showStatus,jdbcType=INTEGER}, - - sort = #{record.sort,jdbcType=INTEGER}, + + sort = #{row.sort,jdbcType=INTEGER}, - + update cms_help_category - set id = #{record.id,jdbcType=BIGINT}, - name = #{record.name,jdbcType=VARCHAR}, - icon = #{record.icon,jdbcType=VARCHAR}, - help_count = #{record.helpCount,jdbcType=INTEGER}, - show_status = #{record.showStatus,jdbcType=INTEGER}, - sort = #{record.sort,jdbcType=INTEGER} - + set id = #{row.id,jdbcType=BIGINT}, + name = #{row.name,jdbcType=VARCHAR}, + icon = #{row.icon,jdbcType=VARCHAR}, + help_count = #{row.helpCount,jdbcType=INTEGER}, + show_status = #{row.showStatus,jdbcType=INTEGER}, + sort = #{row.sort,jdbcType=INTEGER} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsHelpMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsHelpMapper.xml index 706679e..68658ae 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsHelpMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsHelpMapper.xml @@ -197,59 +197,59 @@ update cms_help - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - category_id = #{record.categoryId,jdbcType=BIGINT}, + + category_id = #{row.categoryId,jdbcType=BIGINT}, - - icon = #{record.icon,jdbcType=VARCHAR}, + + icon = #{row.icon,jdbcType=VARCHAR}, - - title = #{record.title,jdbcType=VARCHAR}, + + title = #{row.title,jdbcType=VARCHAR}, - - show_status = #{record.showStatus,jdbcType=INTEGER}, + + show_status = #{row.showStatus,jdbcType=INTEGER}, - - create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + create_time = #{row.createTime,jdbcType=TIMESTAMP}, - - read_count = #{record.readCount,jdbcType=INTEGER}, + + read_count = #{row.readCount,jdbcType=INTEGER}, - - content = #{record.content,jdbcType=LONGVARCHAR}, + + content = #{row.content,jdbcType=LONGVARCHAR}, - + update cms_help - set id = #{record.id,jdbcType=BIGINT}, - category_id = #{record.categoryId,jdbcType=BIGINT}, - icon = #{record.icon,jdbcType=VARCHAR}, - title = #{record.title,jdbcType=VARCHAR}, - show_status = #{record.showStatus,jdbcType=INTEGER}, - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - read_count = #{record.readCount,jdbcType=INTEGER}, - content = #{record.content,jdbcType=LONGVARCHAR} - + set id = #{row.id,jdbcType=BIGINT}, + category_id = #{row.categoryId,jdbcType=BIGINT}, + icon = #{row.icon,jdbcType=VARCHAR}, + title = #{row.title,jdbcType=VARCHAR}, + show_status = #{row.showStatus,jdbcType=INTEGER}, + create_time = #{row.createTime,jdbcType=TIMESTAMP}, + read_count = #{row.readCount,jdbcType=INTEGER}, + content = #{row.content,jdbcType=LONGVARCHAR} + update cms_help - set id = #{record.id,jdbcType=BIGINT}, - category_id = #{record.categoryId,jdbcType=BIGINT}, - icon = #{record.icon,jdbcType=VARCHAR}, - title = #{record.title,jdbcType=VARCHAR}, - show_status = #{record.showStatus,jdbcType=INTEGER}, - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - read_count = #{record.readCount,jdbcType=INTEGER} - + set id = #{row.id,jdbcType=BIGINT}, + category_id = #{row.categoryId,jdbcType=BIGINT}, + icon = #{row.icon,jdbcType=VARCHAR}, + title = #{row.title,jdbcType=VARCHAR}, + show_status = #{row.showStatus,jdbcType=INTEGER}, + create_time = #{row.createTime,jdbcType=TIMESTAMP}, + read_count = #{row.readCount,jdbcType=INTEGER} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsMemberReportMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsMemberReportMapper.xml index 6a5e9a3..29e3e6b 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsMemberReportMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsMemberReportMapper.xml @@ -165,46 +165,46 @@ update cms_member_report - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - report_type = #{record.reportType,jdbcType=INTEGER}, + + report_type = #{row.reportType,jdbcType=INTEGER}, - - report_member_name = #{record.reportMemberName,jdbcType=VARCHAR}, + + report_member_name = #{row.reportMemberName,jdbcType=VARCHAR}, - - create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + create_time = #{row.createTime,jdbcType=TIMESTAMP}, - - report_object = #{record.reportObject,jdbcType=VARCHAR}, + + report_object = #{row.reportObject,jdbcType=VARCHAR}, - - report_status = #{record.reportStatus,jdbcType=INTEGER}, + + report_status = #{row.reportStatus,jdbcType=INTEGER}, - - handle_status = #{record.handleStatus,jdbcType=INTEGER}, + + handle_status = #{row.handleStatus,jdbcType=INTEGER}, - - note = #{record.note,jdbcType=VARCHAR}, + + note = #{row.note,jdbcType=VARCHAR}, - + update cms_member_report - set id = #{record.id,jdbcType=BIGINT}, - report_type = #{record.reportType,jdbcType=INTEGER}, - report_member_name = #{record.reportMemberName,jdbcType=VARCHAR}, - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - report_object = #{record.reportObject,jdbcType=VARCHAR}, - report_status = #{record.reportStatus,jdbcType=INTEGER}, - handle_status = #{record.handleStatus,jdbcType=INTEGER}, - note = #{record.note,jdbcType=VARCHAR} - + set id = #{row.id,jdbcType=BIGINT}, + report_type = #{row.reportType,jdbcType=INTEGER}, + report_member_name = #{row.reportMemberName,jdbcType=VARCHAR}, + create_time = #{row.createTime,jdbcType=TIMESTAMP}, + report_object = #{row.reportObject,jdbcType=VARCHAR}, + report_status = #{row.reportStatus,jdbcType=INTEGER}, + handle_status = #{row.handleStatus,jdbcType=INTEGER}, + note = #{row.note,jdbcType=VARCHAR} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsPrefrenceAreaMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsPrefrenceAreaMapper.xml index 44b398e..0994a13 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsPrefrenceAreaMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsPrefrenceAreaMapper.xml @@ -181,49 +181,49 @@ update cms_prefrence_area - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - name = #{record.name,jdbcType=VARCHAR}, + + name = #{row.name,jdbcType=VARCHAR}, - - sub_title = #{record.subTitle,jdbcType=VARCHAR}, + + sub_title = #{row.subTitle,jdbcType=VARCHAR}, - - sort = #{record.sort,jdbcType=INTEGER}, + + sort = #{row.sort,jdbcType=INTEGER}, - - show_status = #{record.showStatus,jdbcType=INTEGER}, + + show_status = #{row.showStatus,jdbcType=INTEGER}, - - pic = #{record.pic,jdbcType=VARBINARY}, + + pic = #{row.pic,jdbcType=VARBINARY}, - + update cms_prefrence_area - set id = #{record.id,jdbcType=BIGINT}, - name = #{record.name,jdbcType=VARCHAR}, - sub_title = #{record.subTitle,jdbcType=VARCHAR}, - sort = #{record.sort,jdbcType=INTEGER}, - show_status = #{record.showStatus,jdbcType=INTEGER}, - pic = #{record.pic,jdbcType=VARBINARY} - + set id = #{row.id,jdbcType=BIGINT}, + name = #{row.name,jdbcType=VARCHAR}, + sub_title = #{row.subTitle,jdbcType=VARCHAR}, + sort = #{row.sort,jdbcType=INTEGER}, + show_status = #{row.showStatus,jdbcType=INTEGER}, + pic = #{row.pic,jdbcType=VARBINARY} + update cms_prefrence_area - set id = #{record.id,jdbcType=BIGINT}, - name = #{record.name,jdbcType=VARCHAR}, - sub_title = #{record.subTitle,jdbcType=VARCHAR}, - sort = #{record.sort,jdbcType=INTEGER}, - show_status = #{record.showStatus,jdbcType=INTEGER} - + set id = #{row.id,jdbcType=BIGINT}, + name = #{row.name,jdbcType=VARCHAR}, + sub_title = #{row.subTitle,jdbcType=VARCHAR}, + sort = #{row.sort,jdbcType=INTEGER}, + show_status = #{row.showStatus,jdbcType=INTEGER} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsPrefrenceAreaProductRelationMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsPrefrenceAreaProductRelationMapper.xml index bd81af4..dff97c6 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsPrefrenceAreaProductRelationMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsPrefrenceAreaProductRelationMapper.xml @@ -135,26 +135,26 @@ update cms_prefrence_area_product_relation - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - prefrence_area_id = #{record.prefrenceAreaId,jdbcType=BIGINT}, + + prefrence_area_id = #{row.prefrenceAreaId,jdbcType=BIGINT}, - - product_id = #{record.productId,jdbcType=BIGINT}, + + product_id = #{row.productId,jdbcType=BIGINT}, - + update cms_prefrence_area_product_relation - set id = #{record.id,jdbcType=BIGINT}, - prefrence_area_id = #{record.prefrenceAreaId,jdbcType=BIGINT}, - product_id = #{record.productId,jdbcType=BIGINT} - + set id = #{row.id,jdbcType=BIGINT}, + prefrence_area_id = #{row.prefrenceAreaId,jdbcType=BIGINT}, + product_id = #{row.productId,jdbcType=BIGINT} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsSubjectCategoryMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsSubjectCategoryMapper.xml index 102885f..af18a52 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsSubjectCategoryMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsSubjectCategoryMapper.xml @@ -158,38 +158,38 @@ update cms_subject_category - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - name = #{record.name,jdbcType=VARCHAR}, + + name = #{row.name,jdbcType=VARCHAR}, - - icon = #{record.icon,jdbcType=VARCHAR}, + + icon = #{row.icon,jdbcType=VARCHAR}, - - subject_count = #{record.subjectCount,jdbcType=INTEGER}, + + subject_count = #{row.subjectCount,jdbcType=INTEGER}, - - show_status = #{record.showStatus,jdbcType=INTEGER}, + + show_status = #{row.showStatus,jdbcType=INTEGER}, - - sort = #{record.sort,jdbcType=INTEGER}, + + sort = #{row.sort,jdbcType=INTEGER}, - + update cms_subject_category - set id = #{record.id,jdbcType=BIGINT}, - name = #{record.name,jdbcType=VARCHAR}, - icon = #{record.icon,jdbcType=VARCHAR}, - subject_count = #{record.subjectCount,jdbcType=INTEGER}, - show_status = #{record.showStatus,jdbcType=INTEGER}, - sort = #{record.sort,jdbcType=INTEGER} - + set id = #{row.id,jdbcType=BIGINT}, + name = #{row.name,jdbcType=VARCHAR}, + icon = #{row.icon,jdbcType=VARCHAR}, + subject_count = #{row.subjectCount,jdbcType=INTEGER}, + show_status = #{row.showStatus,jdbcType=INTEGER}, + sort = #{row.sort,jdbcType=INTEGER} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsSubjectCommentMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsSubjectCommentMapper.xml index c5b1982..3bfa00b 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsSubjectCommentMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsSubjectCommentMapper.xml @@ -167,42 +167,42 @@ update cms_subject_comment - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - subject_id = #{record.subjectId,jdbcType=BIGINT}, + + subject_id = #{row.subjectId,jdbcType=BIGINT}, - - member_nick_name = #{record.memberNickName,jdbcType=VARCHAR}, + + member_nick_name = #{row.memberNickName,jdbcType=VARCHAR}, - - member_icon = #{record.memberIcon,jdbcType=VARCHAR}, + + member_icon = #{row.memberIcon,jdbcType=VARCHAR}, - - content = #{record.content,jdbcType=VARCHAR}, + + content = #{row.content,jdbcType=VARCHAR}, - - create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + create_time = #{row.createTime,jdbcType=TIMESTAMP}, - - show_status = #{record.showStatus,jdbcType=INTEGER}, + + show_status = #{row.showStatus,jdbcType=INTEGER}, - + update cms_subject_comment - set id = #{record.id,jdbcType=BIGINT}, - subject_id = #{record.subjectId,jdbcType=BIGINT}, - member_nick_name = #{record.memberNickName,jdbcType=VARCHAR}, - member_icon = #{record.memberIcon,jdbcType=VARCHAR}, - content = #{record.content,jdbcType=VARCHAR}, - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - show_status = #{record.showStatus,jdbcType=INTEGER} - + set id = #{row.id,jdbcType=BIGINT}, + subject_id = #{row.subjectId,jdbcType=BIGINT}, + member_nick_name = #{row.memberNickName,jdbcType=VARCHAR}, + member_icon = #{row.memberIcon,jdbcType=VARCHAR}, + content = #{row.content,jdbcType=VARCHAR}, + create_time = #{row.createTime,jdbcType=TIMESTAMP}, + show_status = #{row.showStatus,jdbcType=INTEGER} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsSubjectMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsSubjectMapper.xml index 98492b4..ffabc00 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsSubjectMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsSubjectMapper.xml @@ -260,99 +260,99 @@ update cms_subject - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - category_id = #{record.categoryId,jdbcType=BIGINT}, + + category_id = #{row.categoryId,jdbcType=BIGINT}, - - title = #{record.title,jdbcType=VARCHAR}, + + title = #{row.title,jdbcType=VARCHAR}, - - pic = #{record.pic,jdbcType=VARCHAR}, + + pic = #{row.pic,jdbcType=VARCHAR}, - - product_count = #{record.productCount,jdbcType=INTEGER}, + + product_count = #{row.productCount,jdbcType=INTEGER}, - - recommend_status = #{record.recommendStatus,jdbcType=INTEGER}, + + recommend_status = #{row.recommendStatus,jdbcType=INTEGER}, - - create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + create_time = #{row.createTime,jdbcType=TIMESTAMP}, - - collect_count = #{record.collectCount,jdbcType=INTEGER}, + + collect_count = #{row.collectCount,jdbcType=INTEGER}, - - read_count = #{record.readCount,jdbcType=INTEGER}, + + read_count = #{row.readCount,jdbcType=INTEGER}, - - comment_count = #{record.commentCount,jdbcType=INTEGER}, + + comment_count = #{row.commentCount,jdbcType=INTEGER}, - - album_pics = #{record.albumPics,jdbcType=VARCHAR}, + + album_pics = #{row.albumPics,jdbcType=VARCHAR}, - - description = #{record.description,jdbcType=VARCHAR}, + + description = #{row.description,jdbcType=VARCHAR}, - - show_status = #{record.showStatus,jdbcType=INTEGER}, + + show_status = #{row.showStatus,jdbcType=INTEGER}, - - forward_count = #{record.forwardCount,jdbcType=INTEGER}, + + forward_count = #{row.forwardCount,jdbcType=INTEGER}, - - category_name = #{record.categoryName,jdbcType=VARCHAR}, + + category_name = #{row.categoryName,jdbcType=VARCHAR}, - - content = #{record.content,jdbcType=LONGVARCHAR}, + + content = #{row.content,jdbcType=LONGVARCHAR}, - + update cms_subject - set id = #{record.id,jdbcType=BIGINT}, - category_id = #{record.categoryId,jdbcType=BIGINT}, - title = #{record.title,jdbcType=VARCHAR}, - pic = #{record.pic,jdbcType=VARCHAR}, - product_count = #{record.productCount,jdbcType=INTEGER}, - recommend_status = #{record.recommendStatus,jdbcType=INTEGER}, - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - collect_count = #{record.collectCount,jdbcType=INTEGER}, - read_count = #{record.readCount,jdbcType=INTEGER}, - comment_count = #{record.commentCount,jdbcType=INTEGER}, - album_pics = #{record.albumPics,jdbcType=VARCHAR}, - description = #{record.description,jdbcType=VARCHAR}, - show_status = #{record.showStatus,jdbcType=INTEGER}, - forward_count = #{record.forwardCount,jdbcType=INTEGER}, - category_name = #{record.categoryName,jdbcType=VARCHAR}, - content = #{record.content,jdbcType=LONGVARCHAR} - + set id = #{row.id,jdbcType=BIGINT}, + category_id = #{row.categoryId,jdbcType=BIGINT}, + title = #{row.title,jdbcType=VARCHAR}, + pic = #{row.pic,jdbcType=VARCHAR}, + product_count = #{row.productCount,jdbcType=INTEGER}, + recommend_status = #{row.recommendStatus,jdbcType=INTEGER}, + create_time = #{row.createTime,jdbcType=TIMESTAMP}, + collect_count = #{row.collectCount,jdbcType=INTEGER}, + read_count = #{row.readCount,jdbcType=INTEGER}, + comment_count = #{row.commentCount,jdbcType=INTEGER}, + album_pics = #{row.albumPics,jdbcType=VARCHAR}, + description = #{row.description,jdbcType=VARCHAR}, + show_status = #{row.showStatus,jdbcType=INTEGER}, + forward_count = #{row.forwardCount,jdbcType=INTEGER}, + category_name = #{row.categoryName,jdbcType=VARCHAR}, + content = #{row.content,jdbcType=LONGVARCHAR} + update cms_subject - set id = #{record.id,jdbcType=BIGINT}, - category_id = #{record.categoryId,jdbcType=BIGINT}, - title = #{record.title,jdbcType=VARCHAR}, - pic = #{record.pic,jdbcType=VARCHAR}, - product_count = #{record.productCount,jdbcType=INTEGER}, - recommend_status = #{record.recommendStatus,jdbcType=INTEGER}, - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - collect_count = #{record.collectCount,jdbcType=INTEGER}, - read_count = #{record.readCount,jdbcType=INTEGER}, - comment_count = #{record.commentCount,jdbcType=INTEGER}, - album_pics = #{record.albumPics,jdbcType=VARCHAR}, - description = #{record.description,jdbcType=VARCHAR}, - show_status = #{record.showStatus,jdbcType=INTEGER}, - forward_count = #{record.forwardCount,jdbcType=INTEGER}, - category_name = #{record.categoryName,jdbcType=VARCHAR} - + set id = #{row.id,jdbcType=BIGINT}, + category_id = #{row.categoryId,jdbcType=BIGINT}, + title = #{row.title,jdbcType=VARCHAR}, + pic = #{row.pic,jdbcType=VARCHAR}, + product_count = #{row.productCount,jdbcType=INTEGER}, + recommend_status = #{row.recommendStatus,jdbcType=INTEGER}, + create_time = #{row.createTime,jdbcType=TIMESTAMP}, + collect_count = #{row.collectCount,jdbcType=INTEGER}, + read_count = #{row.readCount,jdbcType=INTEGER}, + comment_count = #{row.commentCount,jdbcType=INTEGER}, + album_pics = #{row.albumPics,jdbcType=VARCHAR}, + description = #{row.description,jdbcType=VARCHAR}, + show_status = #{row.showStatus,jdbcType=INTEGER}, + forward_count = #{row.forwardCount,jdbcType=INTEGER}, + category_name = #{row.categoryName,jdbcType=VARCHAR} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsSubjectProductRelationMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsSubjectProductRelationMapper.xml index 4500854..558b69f 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsSubjectProductRelationMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsSubjectProductRelationMapper.xml @@ -135,26 +135,26 @@ update cms_subject_product_relation - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - subject_id = #{record.subjectId,jdbcType=BIGINT}, + + subject_id = #{row.subjectId,jdbcType=BIGINT}, - - product_id = #{record.productId,jdbcType=BIGINT}, + + product_id = #{row.productId,jdbcType=BIGINT}, - + update cms_subject_product_relation - set id = #{record.id,jdbcType=BIGINT}, - subject_id = #{record.subjectId,jdbcType=BIGINT}, - product_id = #{record.productId,jdbcType=BIGINT} - + set id = #{row.id,jdbcType=BIGINT}, + subject_id = #{row.subjectId,jdbcType=BIGINT}, + product_id = #{row.productId,jdbcType=BIGINT} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsTopicCategoryMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsTopicCategoryMapper.xml index 0686963..a25d1bc 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsTopicCategoryMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsTopicCategoryMapper.xml @@ -158,38 +158,38 @@ update cms_topic_category - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - name = #{record.name,jdbcType=VARCHAR}, + + name = #{row.name,jdbcType=VARCHAR}, - - icon = #{record.icon,jdbcType=VARCHAR}, + + icon = #{row.icon,jdbcType=VARCHAR}, - - subject_count = #{record.subjectCount,jdbcType=INTEGER}, + + subject_count = #{row.subjectCount,jdbcType=INTEGER}, - - show_status = #{record.showStatus,jdbcType=INTEGER}, + + show_status = #{row.showStatus,jdbcType=INTEGER}, - - sort = #{record.sort,jdbcType=INTEGER}, + + sort = #{row.sort,jdbcType=INTEGER}, - + update cms_topic_category - set id = #{record.id,jdbcType=BIGINT}, - name = #{record.name,jdbcType=VARCHAR}, - icon = #{record.icon,jdbcType=VARCHAR}, - subject_count = #{record.subjectCount,jdbcType=INTEGER}, - show_status = #{record.showStatus,jdbcType=INTEGER}, - sort = #{record.sort,jdbcType=INTEGER} - + set id = #{row.id,jdbcType=BIGINT}, + name = #{row.name,jdbcType=VARCHAR}, + icon = #{row.icon,jdbcType=VARCHAR}, + subject_count = #{row.subjectCount,jdbcType=INTEGER}, + show_status = #{row.showStatus,jdbcType=INTEGER}, + sort = #{row.sort,jdbcType=INTEGER} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsTopicCommentMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsTopicCommentMapper.xml index f4d29b7..17dc668 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsTopicCommentMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsTopicCommentMapper.xml @@ -167,42 +167,42 @@ update cms_topic_comment - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - member_nick_name = #{record.memberNickName,jdbcType=VARCHAR}, + + member_nick_name = #{row.memberNickName,jdbcType=VARCHAR}, - - topic_id = #{record.topicId,jdbcType=BIGINT}, + + topic_id = #{row.topicId,jdbcType=BIGINT}, - - member_icon = #{record.memberIcon,jdbcType=VARCHAR}, + + member_icon = #{row.memberIcon,jdbcType=VARCHAR}, - - content = #{record.content,jdbcType=VARCHAR}, + + content = #{row.content,jdbcType=VARCHAR}, - - create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + create_time = #{row.createTime,jdbcType=TIMESTAMP}, - - show_status = #{record.showStatus,jdbcType=INTEGER}, + + show_status = #{row.showStatus,jdbcType=INTEGER}, - + update cms_topic_comment - set id = #{record.id,jdbcType=BIGINT}, - member_nick_name = #{record.memberNickName,jdbcType=VARCHAR}, - topic_id = #{record.topicId,jdbcType=BIGINT}, - member_icon = #{record.memberIcon,jdbcType=VARCHAR}, - content = #{record.content,jdbcType=VARCHAR}, - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - show_status = #{record.showStatus,jdbcType=INTEGER} - + set id = #{row.id,jdbcType=BIGINT}, + member_nick_name = #{row.memberNickName,jdbcType=VARCHAR}, + topic_id = #{row.topicId,jdbcType=BIGINT}, + member_icon = #{row.memberIcon,jdbcType=VARCHAR}, + content = #{row.content,jdbcType=VARCHAR}, + create_time = #{row.createTime,jdbcType=TIMESTAMP}, + show_status = #{row.showStatus,jdbcType=INTEGER} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsTopicMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsTopicMapper.xml index 0c95cce..e267b62 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsTopicMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/CmsTopicMapper.xml @@ -228,79 +228,79 @@ update cms_topic - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - category_id = #{record.categoryId,jdbcType=BIGINT}, + + category_id = #{row.categoryId,jdbcType=BIGINT}, - - name = #{record.name,jdbcType=VARCHAR}, + + name = #{row.name,jdbcType=VARCHAR}, - - create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + create_time = #{row.createTime,jdbcType=TIMESTAMP}, - - start_time = #{record.startTime,jdbcType=TIMESTAMP}, + + start_time = #{row.startTime,jdbcType=TIMESTAMP}, - - end_time = #{record.endTime,jdbcType=TIMESTAMP}, + + end_time = #{row.endTime,jdbcType=TIMESTAMP}, - - attend_count = #{record.attendCount,jdbcType=INTEGER}, + + attend_count = #{row.attendCount,jdbcType=INTEGER}, - - attention_count = #{record.attentionCount,jdbcType=INTEGER}, + + attention_count = #{row.attentionCount,jdbcType=INTEGER}, - - read_count = #{record.readCount,jdbcType=INTEGER}, + + read_count = #{row.readCount,jdbcType=INTEGER}, - - award_name = #{record.awardName,jdbcType=VARCHAR}, + + award_name = #{row.awardName,jdbcType=VARCHAR}, - - attend_type = #{record.attendType,jdbcType=VARCHAR}, + + attend_type = #{row.attendType,jdbcType=VARCHAR}, - - content = #{record.content,jdbcType=LONGVARCHAR}, + + content = #{row.content,jdbcType=LONGVARCHAR}, - + update cms_topic - set id = #{record.id,jdbcType=BIGINT}, - category_id = #{record.categoryId,jdbcType=BIGINT}, - name = #{record.name,jdbcType=VARCHAR}, - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - start_time = #{record.startTime,jdbcType=TIMESTAMP}, - end_time = #{record.endTime,jdbcType=TIMESTAMP}, - attend_count = #{record.attendCount,jdbcType=INTEGER}, - attention_count = #{record.attentionCount,jdbcType=INTEGER}, - read_count = #{record.readCount,jdbcType=INTEGER}, - award_name = #{record.awardName,jdbcType=VARCHAR}, - attend_type = #{record.attendType,jdbcType=VARCHAR}, - content = #{record.content,jdbcType=LONGVARCHAR} - + set id = #{row.id,jdbcType=BIGINT}, + category_id = #{row.categoryId,jdbcType=BIGINT}, + name = #{row.name,jdbcType=VARCHAR}, + create_time = #{row.createTime,jdbcType=TIMESTAMP}, + start_time = #{row.startTime,jdbcType=TIMESTAMP}, + end_time = #{row.endTime,jdbcType=TIMESTAMP}, + attend_count = #{row.attendCount,jdbcType=INTEGER}, + attention_count = #{row.attentionCount,jdbcType=INTEGER}, + read_count = #{row.readCount,jdbcType=INTEGER}, + award_name = #{row.awardName,jdbcType=VARCHAR}, + attend_type = #{row.attendType,jdbcType=VARCHAR}, + content = #{row.content,jdbcType=LONGVARCHAR} + update cms_topic - set id = #{record.id,jdbcType=BIGINT}, - category_id = #{record.categoryId,jdbcType=BIGINT}, - name = #{record.name,jdbcType=VARCHAR}, - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - start_time = #{record.startTime,jdbcType=TIMESTAMP}, - end_time = #{record.endTime,jdbcType=TIMESTAMP}, - attend_count = #{record.attendCount,jdbcType=INTEGER}, - attention_count = #{record.attentionCount,jdbcType=INTEGER}, - read_count = #{record.readCount,jdbcType=INTEGER}, - award_name = #{record.awardName,jdbcType=VARCHAR}, - attend_type = #{record.attendType,jdbcType=VARCHAR} - + set id = #{row.id,jdbcType=BIGINT}, + category_id = #{row.categoryId,jdbcType=BIGINT}, + name = #{row.name,jdbcType=VARCHAR}, + create_time = #{row.createTime,jdbcType=TIMESTAMP}, + start_time = #{row.startTime,jdbcType=TIMESTAMP}, + end_time = #{row.endTime,jdbcType=TIMESTAMP}, + attend_count = #{row.attendCount,jdbcType=INTEGER}, + attention_count = #{row.attentionCount,jdbcType=INTEGER}, + read_count = #{row.readCount,jdbcType=INTEGER}, + award_name = #{row.awardName,jdbcType=VARCHAR}, + attend_type = #{row.attendType,jdbcType=VARCHAR} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsCartItemMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsCartItemMapper.xml index dad3dcf..d371f48 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsCartItemMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsCartItemMapper.xml @@ -252,86 +252,86 @@ update oms_cart_item - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - product_id = #{record.productId,jdbcType=BIGINT}, + + product_id = #{row.productId,jdbcType=BIGINT}, - - product_sku_id = #{record.productSkuId,jdbcType=BIGINT}, + + product_sku_id = #{row.productSkuId,jdbcType=BIGINT}, - - member_id = #{record.memberId,jdbcType=BIGINT}, + + member_id = #{row.memberId,jdbcType=BIGINT}, - - quantity = #{record.quantity,jdbcType=INTEGER}, + + quantity = #{row.quantity,jdbcType=INTEGER}, - - price = #{record.price,jdbcType=DECIMAL}, + + price = #{row.price,jdbcType=DECIMAL}, - - product_pic = #{record.productPic,jdbcType=VARCHAR}, + + product_pic = #{row.productPic,jdbcType=VARCHAR}, - - product_name = #{record.productName,jdbcType=VARCHAR}, + + product_name = #{row.productName,jdbcType=VARCHAR}, - - product_sub_title = #{record.productSubTitle,jdbcType=VARCHAR}, + + product_sub_title = #{row.productSubTitle,jdbcType=VARCHAR}, - - product_sku_code = #{record.productSkuCode,jdbcType=VARCHAR}, + + product_sku_code = #{row.productSkuCode,jdbcType=VARCHAR}, - - member_nickname = #{record.memberNickname,jdbcType=VARCHAR}, + + member_nickname = #{row.memberNickname,jdbcType=VARCHAR}, - - create_date = #{record.createDate,jdbcType=TIMESTAMP}, + + create_date = #{row.createDate,jdbcType=TIMESTAMP}, - - modify_date = #{record.modifyDate,jdbcType=TIMESTAMP}, + + modify_date = #{row.modifyDate,jdbcType=TIMESTAMP}, - - delete_status = #{record.deleteStatus,jdbcType=INTEGER}, + + delete_status = #{row.deleteStatus,jdbcType=INTEGER}, - - product_category_id = #{record.productCategoryId,jdbcType=BIGINT}, + + product_category_id = #{row.productCategoryId,jdbcType=BIGINT}, - - product_brand = #{record.productBrand,jdbcType=VARCHAR}, + + product_brand = #{row.productBrand,jdbcType=VARCHAR}, - - product_sn = #{record.productSn,jdbcType=VARCHAR}, + + product_sn = #{row.productSn,jdbcType=VARCHAR}, - - product_attr = #{record.productAttr,jdbcType=VARCHAR}, + + product_attr = #{row.productAttr,jdbcType=VARCHAR}, - + update oms_cart_item - set id = #{record.id,jdbcType=BIGINT}, - product_id = #{record.productId,jdbcType=BIGINT}, - product_sku_id = #{record.productSkuId,jdbcType=BIGINT}, - member_id = #{record.memberId,jdbcType=BIGINT}, - quantity = #{record.quantity,jdbcType=INTEGER}, - price = #{record.price,jdbcType=DECIMAL}, - product_pic = #{record.productPic,jdbcType=VARCHAR}, - product_name = #{record.productName,jdbcType=VARCHAR}, - product_sub_title = #{record.productSubTitle,jdbcType=VARCHAR}, - product_sku_code = #{record.productSkuCode,jdbcType=VARCHAR}, - member_nickname = #{record.memberNickname,jdbcType=VARCHAR}, - create_date = #{record.createDate,jdbcType=TIMESTAMP}, - modify_date = #{record.modifyDate,jdbcType=TIMESTAMP}, - delete_status = #{record.deleteStatus,jdbcType=INTEGER}, - product_category_id = #{record.productCategoryId,jdbcType=BIGINT}, - product_brand = #{record.productBrand,jdbcType=VARCHAR}, - product_sn = #{record.productSn,jdbcType=VARCHAR}, - product_attr = #{record.productAttr,jdbcType=VARCHAR} - + set id = #{row.id,jdbcType=BIGINT}, + product_id = #{row.productId,jdbcType=BIGINT}, + product_sku_id = #{row.productSkuId,jdbcType=BIGINT}, + member_id = #{row.memberId,jdbcType=BIGINT}, + quantity = #{row.quantity,jdbcType=INTEGER}, + price = #{row.price,jdbcType=DECIMAL}, + product_pic = #{row.productPic,jdbcType=VARCHAR}, + product_name = #{row.productName,jdbcType=VARCHAR}, + product_sub_title = #{row.productSubTitle,jdbcType=VARCHAR}, + product_sku_code = #{row.productSkuCode,jdbcType=VARCHAR}, + member_nickname = #{row.memberNickname,jdbcType=VARCHAR}, + create_date = #{row.createDate,jdbcType=TIMESTAMP}, + modify_date = #{row.modifyDate,jdbcType=TIMESTAMP}, + delete_status = #{row.deleteStatus,jdbcType=INTEGER}, + product_category_id = #{row.productCategoryId,jdbcType=BIGINT}, + product_brand = #{row.productBrand,jdbcType=VARCHAR}, + product_sn = #{row.productSn,jdbcType=VARCHAR}, + product_attr = #{row.productAttr,jdbcType=VARCHAR} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsCompanyAddressMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsCompanyAddressMapper.xml index 7d9e20d..77ea365 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsCompanyAddressMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsCompanyAddressMapper.xml @@ -191,54 +191,54 @@ update oms_company_address - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - address_name = #{record.addressName,jdbcType=VARCHAR}, + + address_name = #{row.addressName,jdbcType=VARCHAR}, - - send_status = #{record.sendStatus,jdbcType=INTEGER}, + + send_status = #{row.sendStatus,jdbcType=INTEGER}, - - receive_status = #{record.receiveStatus,jdbcType=INTEGER}, + + receive_status = #{row.receiveStatus,jdbcType=INTEGER}, - - name = #{record.name,jdbcType=VARCHAR}, + + name = #{row.name,jdbcType=VARCHAR}, - - phone = #{record.phone,jdbcType=VARCHAR}, + + phone = #{row.phone,jdbcType=VARCHAR}, - - province = #{record.province,jdbcType=VARCHAR}, + + province = #{row.province,jdbcType=VARCHAR}, - - city = #{record.city,jdbcType=VARCHAR}, + + city = #{row.city,jdbcType=VARCHAR}, - - region = #{record.region,jdbcType=VARCHAR}, + + region = #{row.region,jdbcType=VARCHAR}, - - detail_address = #{record.detailAddress,jdbcType=VARCHAR}, + + detail_address = #{row.detailAddress,jdbcType=VARCHAR}, - + update oms_company_address - set id = #{record.id,jdbcType=BIGINT}, - address_name = #{record.addressName,jdbcType=VARCHAR}, - send_status = #{record.sendStatus,jdbcType=INTEGER}, - receive_status = #{record.receiveStatus,jdbcType=INTEGER}, - name = #{record.name,jdbcType=VARCHAR}, - phone = #{record.phone,jdbcType=VARCHAR}, - province = #{record.province,jdbcType=VARCHAR}, - city = #{record.city,jdbcType=VARCHAR}, - region = #{record.region,jdbcType=VARCHAR}, - detail_address = #{record.detailAddress,jdbcType=VARCHAR} - + set id = #{row.id,jdbcType=BIGINT}, + address_name = #{row.addressName,jdbcType=VARCHAR}, + send_status = #{row.sendStatus,jdbcType=INTEGER}, + receive_status = #{row.receiveStatus,jdbcType=INTEGER}, + name = #{row.name,jdbcType=VARCHAR}, + phone = #{row.phone,jdbcType=VARCHAR}, + province = #{row.province,jdbcType=VARCHAR}, + city = #{row.city,jdbcType=VARCHAR}, + region = #{row.region,jdbcType=VARCHAR}, + detail_address = #{row.detailAddress,jdbcType=VARCHAR} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsOrderItemMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsOrderItemMapper.xml index 0296c49..20d9d77 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsOrderItemMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsOrderItemMapper.xml @@ -276,98 +276,98 @@ update oms_order_item - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - order_id = #{record.orderId,jdbcType=BIGINT}, + + order_id = #{row.orderId,jdbcType=BIGINT}, - - order_sn = #{record.orderSn,jdbcType=VARCHAR}, + + order_sn = #{row.orderSn,jdbcType=VARCHAR}, - - product_id = #{record.productId,jdbcType=BIGINT}, + + product_id = #{row.productId,jdbcType=BIGINT}, - - product_pic = #{record.productPic,jdbcType=VARCHAR}, + + product_pic = #{row.productPic,jdbcType=VARCHAR}, - - product_name = #{record.productName,jdbcType=VARCHAR}, + + product_name = #{row.productName,jdbcType=VARCHAR}, - - product_brand = #{record.productBrand,jdbcType=VARCHAR}, + + product_brand = #{row.productBrand,jdbcType=VARCHAR}, - - product_sn = #{record.productSn,jdbcType=VARCHAR}, + + product_sn = #{row.productSn,jdbcType=VARCHAR}, - - product_price = #{record.productPrice,jdbcType=DECIMAL}, + + product_price = #{row.productPrice,jdbcType=DECIMAL}, - - product_quantity = #{record.productQuantity,jdbcType=INTEGER}, + + product_quantity = #{row.productQuantity,jdbcType=INTEGER}, - - product_sku_id = #{record.productSkuId,jdbcType=BIGINT}, + + product_sku_id = #{row.productSkuId,jdbcType=BIGINT}, - - product_sku_code = #{record.productSkuCode,jdbcType=VARCHAR}, + + product_sku_code = #{row.productSkuCode,jdbcType=VARCHAR}, - - product_category_id = #{record.productCategoryId,jdbcType=BIGINT}, + + product_category_id = #{row.productCategoryId,jdbcType=BIGINT}, - - promotion_name = #{record.promotionName,jdbcType=VARCHAR}, + + promotion_name = #{row.promotionName,jdbcType=VARCHAR}, - - promotion_amount = #{record.promotionAmount,jdbcType=DECIMAL}, + + promotion_amount = #{row.promotionAmount,jdbcType=DECIMAL}, - - coupon_amount = #{record.couponAmount,jdbcType=DECIMAL}, + + coupon_amount = #{row.couponAmount,jdbcType=DECIMAL}, - - integration_amount = #{record.integrationAmount,jdbcType=DECIMAL}, + + integration_amount = #{row.integrationAmount,jdbcType=DECIMAL}, - - real_amount = #{record.realAmount,jdbcType=DECIMAL}, + + real_amount = #{row.realAmount,jdbcType=DECIMAL}, - - gift_integration = #{record.giftIntegration,jdbcType=INTEGER}, + + gift_integration = #{row.giftIntegration,jdbcType=INTEGER}, - - gift_growth = #{record.giftGrowth,jdbcType=INTEGER}, + + gift_growth = #{row.giftGrowth,jdbcType=INTEGER}, - - product_attr = #{record.productAttr,jdbcType=VARCHAR}, + + product_attr = #{row.productAttr,jdbcType=VARCHAR}, - + update oms_order_item - set id = #{record.id,jdbcType=BIGINT}, - order_id = #{record.orderId,jdbcType=BIGINT}, - order_sn = #{record.orderSn,jdbcType=VARCHAR}, - product_id = #{record.productId,jdbcType=BIGINT}, - product_pic = #{record.productPic,jdbcType=VARCHAR}, - product_name = #{record.productName,jdbcType=VARCHAR}, - product_brand = #{record.productBrand,jdbcType=VARCHAR}, - product_sn = #{record.productSn,jdbcType=VARCHAR}, - product_price = #{record.productPrice,jdbcType=DECIMAL}, - product_quantity = #{record.productQuantity,jdbcType=INTEGER}, - product_sku_id = #{record.productSkuId,jdbcType=BIGINT}, - product_sku_code = #{record.productSkuCode,jdbcType=VARCHAR}, - product_category_id = #{record.productCategoryId,jdbcType=BIGINT}, - promotion_name = #{record.promotionName,jdbcType=VARCHAR}, - promotion_amount = #{record.promotionAmount,jdbcType=DECIMAL}, - coupon_amount = #{record.couponAmount,jdbcType=DECIMAL}, - integration_amount = #{record.integrationAmount,jdbcType=DECIMAL}, - real_amount = #{record.realAmount,jdbcType=DECIMAL}, - gift_integration = #{record.giftIntegration,jdbcType=INTEGER}, - gift_growth = #{record.giftGrowth,jdbcType=INTEGER}, - product_attr = #{record.productAttr,jdbcType=VARCHAR} - + set id = #{row.id,jdbcType=BIGINT}, + order_id = #{row.orderId,jdbcType=BIGINT}, + order_sn = #{row.orderSn,jdbcType=VARCHAR}, + product_id = #{row.productId,jdbcType=BIGINT}, + product_pic = #{row.productPic,jdbcType=VARCHAR}, + product_name = #{row.productName,jdbcType=VARCHAR}, + product_brand = #{row.productBrand,jdbcType=VARCHAR}, + product_sn = #{row.productSn,jdbcType=VARCHAR}, + product_price = #{row.productPrice,jdbcType=DECIMAL}, + product_quantity = #{row.productQuantity,jdbcType=INTEGER}, + product_sku_id = #{row.productSkuId,jdbcType=BIGINT}, + product_sku_code = #{row.productSkuCode,jdbcType=VARCHAR}, + product_category_id = #{row.productCategoryId,jdbcType=BIGINT}, + promotion_name = #{row.promotionName,jdbcType=VARCHAR}, + promotion_amount = #{row.promotionAmount,jdbcType=DECIMAL}, + coupon_amount = #{row.couponAmount,jdbcType=DECIMAL}, + integration_amount = #{row.integrationAmount,jdbcType=DECIMAL}, + real_amount = #{row.realAmount,jdbcType=DECIMAL}, + gift_integration = #{row.giftIntegration,jdbcType=INTEGER}, + gift_growth = #{row.giftGrowth,jdbcType=INTEGER}, + product_attr = #{row.productAttr,jdbcType=VARCHAR} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsOrderMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsOrderMapper.xml index 228df56..3ca5002 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsOrderMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsOrderMapper.xml @@ -456,190 +456,190 @@ update oms_order - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - member_id = #{record.memberId,jdbcType=BIGINT}, + + member_id = #{row.memberId,jdbcType=BIGINT}, - - coupon_id = #{record.couponId,jdbcType=BIGINT}, + + coupon_id = #{row.couponId,jdbcType=BIGINT}, - - order_sn = #{record.orderSn,jdbcType=VARCHAR}, + + order_sn = #{row.orderSn,jdbcType=VARCHAR}, - - create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + create_time = #{row.createTime,jdbcType=TIMESTAMP}, - - member_username = #{record.memberUsername,jdbcType=VARCHAR}, + + member_username = #{row.memberUsername,jdbcType=VARCHAR}, - - total_amount = #{record.totalAmount,jdbcType=DECIMAL}, + + total_amount = #{row.totalAmount,jdbcType=DECIMAL}, - - pay_amount = #{record.payAmount,jdbcType=DECIMAL}, + + pay_amount = #{row.payAmount,jdbcType=DECIMAL}, - - freight_amount = #{record.freightAmount,jdbcType=DECIMAL}, + + freight_amount = #{row.freightAmount,jdbcType=DECIMAL}, - - promotion_amount = #{record.promotionAmount,jdbcType=DECIMAL}, + + promotion_amount = #{row.promotionAmount,jdbcType=DECIMAL}, - - integration_amount = #{record.integrationAmount,jdbcType=DECIMAL}, + + integration_amount = #{row.integrationAmount,jdbcType=DECIMAL}, - - coupon_amount = #{record.couponAmount,jdbcType=DECIMAL}, + + coupon_amount = #{row.couponAmount,jdbcType=DECIMAL}, - - discount_amount = #{record.discountAmount,jdbcType=DECIMAL}, + + discount_amount = #{row.discountAmount,jdbcType=DECIMAL}, - - pay_type = #{record.payType,jdbcType=INTEGER}, + + pay_type = #{row.payType,jdbcType=INTEGER}, - - source_type = #{record.sourceType,jdbcType=INTEGER}, + + source_type = #{row.sourceType,jdbcType=INTEGER}, - - status = #{record.status,jdbcType=INTEGER}, + + status = #{row.status,jdbcType=INTEGER}, - - order_type = #{record.orderType,jdbcType=INTEGER}, + + order_type = #{row.orderType,jdbcType=INTEGER}, - - delivery_company = #{record.deliveryCompany,jdbcType=VARCHAR}, + + delivery_company = #{row.deliveryCompany,jdbcType=VARCHAR}, - - delivery_sn = #{record.deliverySn,jdbcType=VARCHAR}, + + delivery_sn = #{row.deliverySn,jdbcType=VARCHAR}, - - auto_confirm_day = #{record.autoConfirmDay,jdbcType=INTEGER}, + + auto_confirm_day = #{row.autoConfirmDay,jdbcType=INTEGER}, - - integration = #{record.integration,jdbcType=INTEGER}, + + integration = #{row.integration,jdbcType=INTEGER}, - - growth = #{record.growth,jdbcType=INTEGER}, + + growth = #{row.growth,jdbcType=INTEGER}, - - promotion_info = #{record.promotionInfo,jdbcType=VARCHAR}, + + promotion_info = #{row.promotionInfo,jdbcType=VARCHAR}, - - bill_type = #{record.billType,jdbcType=INTEGER}, + + bill_type = #{row.billType,jdbcType=INTEGER}, - - bill_header = #{record.billHeader,jdbcType=VARCHAR}, + + bill_header = #{row.billHeader,jdbcType=VARCHAR}, - - bill_content = #{record.billContent,jdbcType=VARCHAR}, + + bill_content = #{row.billContent,jdbcType=VARCHAR}, - - bill_receiver_phone = #{record.billReceiverPhone,jdbcType=VARCHAR}, + + bill_receiver_phone = #{row.billReceiverPhone,jdbcType=VARCHAR}, - - bill_receiver_email = #{record.billReceiverEmail,jdbcType=VARCHAR}, + + bill_receiver_email = #{row.billReceiverEmail,jdbcType=VARCHAR}, - - receiver_name = #{record.receiverName,jdbcType=VARCHAR}, + + receiver_name = #{row.receiverName,jdbcType=VARCHAR}, - - receiver_phone = #{record.receiverPhone,jdbcType=VARCHAR}, + + receiver_phone = #{row.receiverPhone,jdbcType=VARCHAR}, - - receiver_post_code = #{record.receiverPostCode,jdbcType=VARCHAR}, + + receiver_post_code = #{row.receiverPostCode,jdbcType=VARCHAR}, - - receiver_province = #{record.receiverProvince,jdbcType=VARCHAR}, + + receiver_province = #{row.receiverProvince,jdbcType=VARCHAR}, - - receiver_city = #{record.receiverCity,jdbcType=VARCHAR}, + + receiver_city = #{row.receiverCity,jdbcType=VARCHAR}, - - receiver_region = #{record.receiverRegion,jdbcType=VARCHAR}, + + receiver_region = #{row.receiverRegion,jdbcType=VARCHAR}, - - receiver_detail_address = #{record.receiverDetailAddress,jdbcType=VARCHAR}, + + receiver_detail_address = #{row.receiverDetailAddress,jdbcType=VARCHAR}, - - note = #{record.note,jdbcType=VARCHAR}, + + note = #{row.note,jdbcType=VARCHAR}, - - confirm_status = #{record.confirmStatus,jdbcType=INTEGER}, + + confirm_status = #{row.confirmStatus,jdbcType=INTEGER}, - - delete_status = #{record.deleteStatus,jdbcType=INTEGER}, + + delete_status = #{row.deleteStatus,jdbcType=INTEGER}, - - use_integration = #{record.useIntegration,jdbcType=INTEGER}, + + use_integration = #{row.useIntegration,jdbcType=INTEGER}, - - payment_time = #{record.paymentTime,jdbcType=TIMESTAMP}, + + payment_time = #{row.paymentTime,jdbcType=TIMESTAMP}, - - delivery_time = #{record.deliveryTime,jdbcType=TIMESTAMP}, + + delivery_time = #{row.deliveryTime,jdbcType=TIMESTAMP}, - - receive_time = #{record.receiveTime,jdbcType=TIMESTAMP}, + + receive_time = #{row.receiveTime,jdbcType=TIMESTAMP}, - - comment_time = #{record.commentTime,jdbcType=TIMESTAMP}, + + comment_time = #{row.commentTime,jdbcType=TIMESTAMP}, - - modify_time = #{record.modifyTime,jdbcType=TIMESTAMP}, + + modify_time = #{row.modifyTime,jdbcType=TIMESTAMP}, - + update oms_order - set id = #{record.id,jdbcType=BIGINT}, - member_id = #{record.memberId,jdbcType=BIGINT}, - coupon_id = #{record.couponId,jdbcType=BIGINT}, - order_sn = #{record.orderSn,jdbcType=VARCHAR}, - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - member_username = #{record.memberUsername,jdbcType=VARCHAR}, - total_amount = #{record.totalAmount,jdbcType=DECIMAL}, - pay_amount = #{record.payAmount,jdbcType=DECIMAL}, - freight_amount = #{record.freightAmount,jdbcType=DECIMAL}, - promotion_amount = #{record.promotionAmount,jdbcType=DECIMAL}, - integration_amount = #{record.integrationAmount,jdbcType=DECIMAL}, - coupon_amount = #{record.couponAmount,jdbcType=DECIMAL}, - discount_amount = #{record.discountAmount,jdbcType=DECIMAL}, - pay_type = #{record.payType,jdbcType=INTEGER}, - source_type = #{record.sourceType,jdbcType=INTEGER}, - status = #{record.status,jdbcType=INTEGER}, - order_type = #{record.orderType,jdbcType=INTEGER}, - delivery_company = #{record.deliveryCompany,jdbcType=VARCHAR}, - delivery_sn = #{record.deliverySn,jdbcType=VARCHAR}, - auto_confirm_day = #{record.autoConfirmDay,jdbcType=INTEGER}, - integration = #{record.integration,jdbcType=INTEGER}, - growth = #{record.growth,jdbcType=INTEGER}, - promotion_info = #{record.promotionInfo,jdbcType=VARCHAR}, - bill_type = #{record.billType,jdbcType=INTEGER}, - bill_header = #{record.billHeader,jdbcType=VARCHAR}, - bill_content = #{record.billContent,jdbcType=VARCHAR}, - bill_receiver_phone = #{record.billReceiverPhone,jdbcType=VARCHAR}, - bill_receiver_email = #{record.billReceiverEmail,jdbcType=VARCHAR}, - receiver_name = #{record.receiverName,jdbcType=VARCHAR}, - receiver_phone = #{record.receiverPhone,jdbcType=VARCHAR}, - receiver_post_code = #{record.receiverPostCode,jdbcType=VARCHAR}, - receiver_province = #{record.receiverProvince,jdbcType=VARCHAR}, - receiver_city = #{record.receiverCity,jdbcType=VARCHAR}, - receiver_region = #{record.receiverRegion,jdbcType=VARCHAR}, - receiver_detail_address = #{record.receiverDetailAddress,jdbcType=VARCHAR}, - note = #{record.note,jdbcType=VARCHAR}, - confirm_status = #{record.confirmStatus,jdbcType=INTEGER}, - delete_status = #{record.deleteStatus,jdbcType=INTEGER}, - use_integration = #{record.useIntegration,jdbcType=INTEGER}, - payment_time = #{record.paymentTime,jdbcType=TIMESTAMP}, - delivery_time = #{record.deliveryTime,jdbcType=TIMESTAMP}, - receive_time = #{record.receiveTime,jdbcType=TIMESTAMP}, - comment_time = #{record.commentTime,jdbcType=TIMESTAMP}, - modify_time = #{record.modifyTime,jdbcType=TIMESTAMP} - + set id = #{row.id,jdbcType=BIGINT}, + member_id = #{row.memberId,jdbcType=BIGINT}, + coupon_id = #{row.couponId,jdbcType=BIGINT}, + order_sn = #{row.orderSn,jdbcType=VARCHAR}, + create_time = #{row.createTime,jdbcType=TIMESTAMP}, + member_username = #{row.memberUsername,jdbcType=VARCHAR}, + total_amount = #{row.totalAmount,jdbcType=DECIMAL}, + pay_amount = #{row.payAmount,jdbcType=DECIMAL}, + freight_amount = #{row.freightAmount,jdbcType=DECIMAL}, + promotion_amount = #{row.promotionAmount,jdbcType=DECIMAL}, + integration_amount = #{row.integrationAmount,jdbcType=DECIMAL}, + coupon_amount = #{row.couponAmount,jdbcType=DECIMAL}, + discount_amount = #{row.discountAmount,jdbcType=DECIMAL}, + pay_type = #{row.payType,jdbcType=INTEGER}, + source_type = #{row.sourceType,jdbcType=INTEGER}, + status = #{row.status,jdbcType=INTEGER}, + order_type = #{row.orderType,jdbcType=INTEGER}, + delivery_company = #{row.deliveryCompany,jdbcType=VARCHAR}, + delivery_sn = #{row.deliverySn,jdbcType=VARCHAR}, + auto_confirm_day = #{row.autoConfirmDay,jdbcType=INTEGER}, + integration = #{row.integration,jdbcType=INTEGER}, + growth = #{row.growth,jdbcType=INTEGER}, + promotion_info = #{row.promotionInfo,jdbcType=VARCHAR}, + bill_type = #{row.billType,jdbcType=INTEGER}, + bill_header = #{row.billHeader,jdbcType=VARCHAR}, + bill_content = #{row.billContent,jdbcType=VARCHAR}, + bill_receiver_phone = #{row.billReceiverPhone,jdbcType=VARCHAR}, + bill_receiver_email = #{row.billReceiverEmail,jdbcType=VARCHAR}, + receiver_name = #{row.receiverName,jdbcType=VARCHAR}, + receiver_phone = #{row.receiverPhone,jdbcType=VARCHAR}, + receiver_post_code = #{row.receiverPostCode,jdbcType=VARCHAR}, + receiver_province = #{row.receiverProvince,jdbcType=VARCHAR}, + receiver_city = #{row.receiverCity,jdbcType=VARCHAR}, + receiver_region = #{row.receiverRegion,jdbcType=VARCHAR}, + receiver_detail_address = #{row.receiverDetailAddress,jdbcType=VARCHAR}, + note = #{row.note,jdbcType=VARCHAR}, + confirm_status = #{row.confirmStatus,jdbcType=INTEGER}, + delete_status = #{row.deleteStatus,jdbcType=INTEGER}, + use_integration = #{row.useIntegration,jdbcType=INTEGER}, + payment_time = #{row.paymentTime,jdbcType=TIMESTAMP}, + delivery_time = #{row.deliveryTime,jdbcType=TIMESTAMP}, + receive_time = #{row.receiveTime,jdbcType=TIMESTAMP}, + comment_time = #{row.commentTime,jdbcType=TIMESTAMP}, + modify_time = #{row.modifyTime,jdbcType=TIMESTAMP} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsOrderOperateHistoryMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsOrderOperateHistoryMapper.xml index ba6b81d..916b141 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsOrderOperateHistoryMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsOrderOperateHistoryMapper.xml @@ -158,38 +158,38 @@ update oms_order_operate_history - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - order_id = #{record.orderId,jdbcType=BIGINT}, + + order_id = #{row.orderId,jdbcType=BIGINT}, - - operate_man = #{record.operateMan,jdbcType=VARCHAR}, + + operate_man = #{row.operateMan,jdbcType=VARCHAR}, - - create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + create_time = #{row.createTime,jdbcType=TIMESTAMP}, - - order_status = #{record.orderStatus,jdbcType=INTEGER}, + + order_status = #{row.orderStatus,jdbcType=INTEGER}, - - note = #{record.note,jdbcType=VARCHAR}, + + note = #{row.note,jdbcType=VARCHAR}, - + update oms_order_operate_history - set id = #{record.id,jdbcType=BIGINT}, - order_id = #{record.orderId,jdbcType=BIGINT}, - operate_man = #{record.operateMan,jdbcType=VARCHAR}, - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - order_status = #{record.orderStatus,jdbcType=INTEGER}, - note = #{record.note,jdbcType=VARCHAR} - + set id = #{row.id,jdbcType=BIGINT}, + order_id = #{row.orderId,jdbcType=BIGINT}, + operate_man = #{row.operateMan,jdbcType=VARCHAR}, + create_time = #{row.createTime,jdbcType=TIMESTAMP}, + order_status = #{row.orderStatus,jdbcType=INTEGER}, + note = #{row.note,jdbcType=VARCHAR} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsOrderReturnApplyMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsOrderReturnApplyMapper.xml index 4add7ea..f035afa 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsOrderReturnApplyMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsOrderReturnApplyMapper.xml @@ -322,122 +322,122 @@ update oms_order_return_apply - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - order_id = #{record.orderId,jdbcType=BIGINT}, + + order_id = #{row.orderId,jdbcType=BIGINT}, - - company_address_id = #{record.companyAddressId,jdbcType=BIGINT}, + + company_address_id = #{row.companyAddressId,jdbcType=BIGINT}, - - product_id = #{record.productId,jdbcType=BIGINT}, + + product_id = #{row.productId,jdbcType=BIGINT}, - - order_sn = #{record.orderSn,jdbcType=VARCHAR}, + + order_sn = #{row.orderSn,jdbcType=VARCHAR}, - - create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + create_time = #{row.createTime,jdbcType=TIMESTAMP}, - - member_username = #{record.memberUsername,jdbcType=VARCHAR}, + + member_username = #{row.memberUsername,jdbcType=VARCHAR}, - - return_amount = #{record.returnAmount,jdbcType=DECIMAL}, + + return_amount = #{row.returnAmount,jdbcType=DECIMAL}, - - return_name = #{record.returnName,jdbcType=VARCHAR}, + + return_name = #{row.returnName,jdbcType=VARCHAR}, - - return_phone = #{record.returnPhone,jdbcType=VARCHAR}, + + return_phone = #{row.returnPhone,jdbcType=VARCHAR}, - - status = #{record.status,jdbcType=INTEGER}, + + status = #{row.status,jdbcType=INTEGER}, - - handle_time = #{record.handleTime,jdbcType=TIMESTAMP}, + + handle_time = #{row.handleTime,jdbcType=TIMESTAMP}, - - product_pic = #{record.productPic,jdbcType=VARCHAR}, + + product_pic = #{row.productPic,jdbcType=VARCHAR}, - - product_name = #{record.productName,jdbcType=VARCHAR}, + + product_name = #{row.productName,jdbcType=VARCHAR}, - - product_brand = #{record.productBrand,jdbcType=VARCHAR}, + + product_brand = #{row.productBrand,jdbcType=VARCHAR}, - - product_attr = #{record.productAttr,jdbcType=VARCHAR}, + + product_attr = #{row.productAttr,jdbcType=VARCHAR}, - - product_count = #{record.productCount,jdbcType=INTEGER}, + + product_count = #{row.productCount,jdbcType=INTEGER}, - - product_price = #{record.productPrice,jdbcType=DECIMAL}, + + product_price = #{row.productPrice,jdbcType=DECIMAL}, - - product_real_price = #{record.productRealPrice,jdbcType=DECIMAL}, + + product_real_price = #{row.productRealPrice,jdbcType=DECIMAL}, - - reason = #{record.reason,jdbcType=VARCHAR}, + + reason = #{row.reason,jdbcType=VARCHAR}, - - description = #{record.description,jdbcType=VARCHAR}, + + description = #{row.description,jdbcType=VARCHAR}, - - proof_pics = #{record.proofPics,jdbcType=VARCHAR}, + + proof_pics = #{row.proofPics,jdbcType=VARCHAR}, - - handle_note = #{record.handleNote,jdbcType=VARCHAR}, + + handle_note = #{row.handleNote,jdbcType=VARCHAR}, - - handle_man = #{record.handleMan,jdbcType=VARCHAR}, + + handle_man = #{row.handleMan,jdbcType=VARCHAR}, - - receive_man = #{record.receiveMan,jdbcType=VARCHAR}, + + receive_man = #{row.receiveMan,jdbcType=VARCHAR}, - - receive_time = #{record.receiveTime,jdbcType=TIMESTAMP}, + + receive_time = #{row.receiveTime,jdbcType=TIMESTAMP}, - - receive_note = #{record.receiveNote,jdbcType=VARCHAR}, + + receive_note = #{row.receiveNote,jdbcType=VARCHAR}, - + update oms_order_return_apply - set id = #{record.id,jdbcType=BIGINT}, - order_id = #{record.orderId,jdbcType=BIGINT}, - company_address_id = #{record.companyAddressId,jdbcType=BIGINT}, - product_id = #{record.productId,jdbcType=BIGINT}, - order_sn = #{record.orderSn,jdbcType=VARCHAR}, - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - member_username = #{record.memberUsername,jdbcType=VARCHAR}, - return_amount = #{record.returnAmount,jdbcType=DECIMAL}, - return_name = #{record.returnName,jdbcType=VARCHAR}, - return_phone = #{record.returnPhone,jdbcType=VARCHAR}, - status = #{record.status,jdbcType=INTEGER}, - handle_time = #{record.handleTime,jdbcType=TIMESTAMP}, - product_pic = #{record.productPic,jdbcType=VARCHAR}, - product_name = #{record.productName,jdbcType=VARCHAR}, - product_brand = #{record.productBrand,jdbcType=VARCHAR}, - product_attr = #{record.productAttr,jdbcType=VARCHAR}, - product_count = #{record.productCount,jdbcType=INTEGER}, - product_price = #{record.productPrice,jdbcType=DECIMAL}, - product_real_price = #{record.productRealPrice,jdbcType=DECIMAL}, - reason = #{record.reason,jdbcType=VARCHAR}, - description = #{record.description,jdbcType=VARCHAR}, - proof_pics = #{record.proofPics,jdbcType=VARCHAR}, - handle_note = #{record.handleNote,jdbcType=VARCHAR}, - handle_man = #{record.handleMan,jdbcType=VARCHAR}, - receive_man = #{record.receiveMan,jdbcType=VARCHAR}, - receive_time = #{record.receiveTime,jdbcType=TIMESTAMP}, - receive_note = #{record.receiveNote,jdbcType=VARCHAR} - + set id = #{row.id,jdbcType=BIGINT}, + order_id = #{row.orderId,jdbcType=BIGINT}, + company_address_id = #{row.companyAddressId,jdbcType=BIGINT}, + product_id = #{row.productId,jdbcType=BIGINT}, + order_sn = #{row.orderSn,jdbcType=VARCHAR}, + create_time = #{row.createTime,jdbcType=TIMESTAMP}, + member_username = #{row.memberUsername,jdbcType=VARCHAR}, + return_amount = #{row.returnAmount,jdbcType=DECIMAL}, + return_name = #{row.returnName,jdbcType=VARCHAR}, + return_phone = #{row.returnPhone,jdbcType=VARCHAR}, + status = #{row.status,jdbcType=INTEGER}, + handle_time = #{row.handleTime,jdbcType=TIMESTAMP}, + product_pic = #{row.productPic,jdbcType=VARCHAR}, + product_name = #{row.productName,jdbcType=VARCHAR}, + product_brand = #{row.productBrand,jdbcType=VARCHAR}, + product_attr = #{row.productAttr,jdbcType=VARCHAR}, + product_count = #{row.productCount,jdbcType=INTEGER}, + product_price = #{row.productPrice,jdbcType=DECIMAL}, + product_real_price = #{row.productRealPrice,jdbcType=DECIMAL}, + reason = #{row.reason,jdbcType=VARCHAR}, + description = #{row.description,jdbcType=VARCHAR}, + proof_pics = #{row.proofPics,jdbcType=VARCHAR}, + handle_note = #{row.handleNote,jdbcType=VARCHAR}, + handle_man = #{row.handleMan,jdbcType=VARCHAR}, + receive_man = #{row.receiveMan,jdbcType=VARCHAR}, + receive_time = #{row.receiveTime,jdbcType=TIMESTAMP}, + receive_note = #{row.receiveNote,jdbcType=VARCHAR} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsOrderReturnReasonMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsOrderReturnReasonMapper.xml index be5af30..9a512c4 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsOrderReturnReasonMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsOrderReturnReasonMapper.xml @@ -151,34 +151,34 @@ update oms_order_return_reason - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - name = #{record.name,jdbcType=VARCHAR}, + + name = #{row.name,jdbcType=VARCHAR}, - - sort = #{record.sort,jdbcType=INTEGER}, + + sort = #{row.sort,jdbcType=INTEGER}, - - status = #{record.status,jdbcType=INTEGER}, + + status = #{row.status,jdbcType=INTEGER}, - - create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + create_time = #{row.createTime,jdbcType=TIMESTAMP}, - + update oms_order_return_reason - set id = #{record.id,jdbcType=BIGINT}, - name = #{record.name,jdbcType=VARCHAR}, - sort = #{record.sort,jdbcType=INTEGER}, - status = #{record.status,jdbcType=INTEGER}, - create_time = #{record.createTime,jdbcType=TIMESTAMP} - + set id = #{row.id,jdbcType=BIGINT}, + name = #{row.name,jdbcType=VARCHAR}, + sort = #{row.sort,jdbcType=INTEGER}, + status = #{row.status,jdbcType=INTEGER}, + create_time = #{row.createTime,jdbcType=TIMESTAMP} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsOrderSettingMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsOrderSettingMapper.xml index 4d97ece..ef07266 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsOrderSettingMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsOrderSettingMapper.xml @@ -161,38 +161,38 @@ update oms_order_setting - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - flash_order_overtime = #{record.flashOrderOvertime,jdbcType=INTEGER}, + + flash_order_overtime = #{row.flashOrderOvertime,jdbcType=INTEGER}, - - normal_order_overtime = #{record.normalOrderOvertime,jdbcType=INTEGER}, + + normal_order_overtime = #{row.normalOrderOvertime,jdbcType=INTEGER}, - - confirm_overtime = #{record.confirmOvertime,jdbcType=INTEGER}, + + confirm_overtime = #{row.confirmOvertime,jdbcType=INTEGER}, - - finish_overtime = #{record.finishOvertime,jdbcType=INTEGER}, + + finish_overtime = #{row.finishOvertime,jdbcType=INTEGER}, - - comment_overtime = #{record.commentOvertime,jdbcType=INTEGER}, + + comment_overtime = #{row.commentOvertime,jdbcType=INTEGER}, - + update oms_order_setting - set id = #{record.id,jdbcType=BIGINT}, - flash_order_overtime = #{record.flashOrderOvertime,jdbcType=INTEGER}, - normal_order_overtime = #{record.normalOrderOvertime,jdbcType=INTEGER}, - confirm_overtime = #{record.confirmOvertime,jdbcType=INTEGER}, - finish_overtime = #{record.finishOvertime,jdbcType=INTEGER}, - comment_overtime = #{record.commentOvertime,jdbcType=INTEGER} - + set id = #{row.id,jdbcType=BIGINT}, + flash_order_overtime = #{row.flashOrderOvertime,jdbcType=INTEGER}, + normal_order_overtime = #{row.normalOrderOvertime,jdbcType=INTEGER}, + confirm_overtime = #{row.confirmOvertime,jdbcType=INTEGER}, + finish_overtime = #{row.finishOvertime,jdbcType=INTEGER}, + comment_overtime = #{row.commentOvertime,jdbcType=INTEGER} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsAlbumMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsAlbumMapper.xml index 63ece4e..9256b76 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsAlbumMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsAlbumMapper.xml @@ -158,38 +158,38 @@ update pms_album - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - name = #{record.name,jdbcType=VARCHAR}, + + name = #{row.name,jdbcType=VARCHAR}, - - cover_pic = #{record.coverPic,jdbcType=VARCHAR}, + + cover_pic = #{row.coverPic,jdbcType=VARCHAR}, - - pic_count = #{record.picCount,jdbcType=INTEGER}, + + pic_count = #{row.picCount,jdbcType=INTEGER}, - - sort = #{record.sort,jdbcType=INTEGER}, + + sort = #{row.sort,jdbcType=INTEGER}, - - description = #{record.description,jdbcType=VARCHAR}, + + description = #{row.description,jdbcType=VARCHAR}, - + update pms_album - set id = #{record.id,jdbcType=BIGINT}, - name = #{record.name,jdbcType=VARCHAR}, - cover_pic = #{record.coverPic,jdbcType=VARCHAR}, - pic_count = #{record.picCount,jdbcType=INTEGER}, - sort = #{record.sort,jdbcType=INTEGER}, - description = #{record.description,jdbcType=VARCHAR} - + set id = #{row.id,jdbcType=BIGINT}, + name = #{row.name,jdbcType=VARCHAR}, + cover_pic = #{row.coverPic,jdbcType=VARCHAR}, + pic_count = #{row.picCount,jdbcType=INTEGER}, + sort = #{row.sort,jdbcType=INTEGER}, + description = #{row.description,jdbcType=VARCHAR} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsAlbumPicMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsAlbumPicMapper.xml index 6a1d2bb..a7357cf 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsAlbumPicMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsAlbumPicMapper.xml @@ -135,26 +135,26 @@ update pms_album_pic - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - album_id = #{record.albumId,jdbcType=BIGINT}, + + album_id = #{row.albumId,jdbcType=BIGINT}, - - pic = #{record.pic,jdbcType=VARCHAR}, + + pic = #{row.pic,jdbcType=VARCHAR}, - + update pms_album_pic - set id = #{record.id,jdbcType=BIGINT}, - album_id = #{record.albumId,jdbcType=BIGINT}, - pic = #{record.pic,jdbcType=VARCHAR} - + set id = #{row.id,jdbcType=BIGINT}, + album_id = #{row.albumId,jdbcType=BIGINT}, + pic = #{row.pic,jdbcType=VARCHAR} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsBrandMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsBrandMapper.xml index 8a6a4ab..ddca86a 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsBrandMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsBrandMapper.xml @@ -221,74 +221,74 @@ update pms_brand - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - name = #{record.name,jdbcType=VARCHAR}, + + name = #{row.name,jdbcType=VARCHAR}, - - first_letter = #{record.firstLetter,jdbcType=VARCHAR}, + + first_letter = #{row.firstLetter,jdbcType=VARCHAR}, - - sort = #{record.sort,jdbcType=INTEGER}, + + sort = #{row.sort,jdbcType=INTEGER}, - - factory_status = #{record.factoryStatus,jdbcType=INTEGER}, + + factory_status = #{row.factoryStatus,jdbcType=INTEGER}, - - show_status = #{record.showStatus,jdbcType=INTEGER}, + + show_status = #{row.showStatus,jdbcType=INTEGER}, - - product_count = #{record.productCount,jdbcType=INTEGER}, + + product_count = #{row.productCount,jdbcType=INTEGER}, - - product_comment_count = #{record.productCommentCount,jdbcType=INTEGER}, + + product_comment_count = #{row.productCommentCount,jdbcType=INTEGER}, - - logo = #{record.logo,jdbcType=VARCHAR}, + + logo = #{row.logo,jdbcType=VARCHAR}, - - big_pic = #{record.bigPic,jdbcType=VARCHAR}, + + big_pic = #{row.bigPic,jdbcType=VARCHAR}, - - brand_story = #{record.brandStory,jdbcType=LONGVARCHAR}, + + brand_story = #{row.brandStory,jdbcType=LONGVARCHAR}, - + update pms_brand - set id = #{record.id,jdbcType=BIGINT}, - name = #{record.name,jdbcType=VARCHAR}, - first_letter = #{record.firstLetter,jdbcType=VARCHAR}, - sort = #{record.sort,jdbcType=INTEGER}, - factory_status = #{record.factoryStatus,jdbcType=INTEGER}, - show_status = #{record.showStatus,jdbcType=INTEGER}, - product_count = #{record.productCount,jdbcType=INTEGER}, - product_comment_count = #{record.productCommentCount,jdbcType=INTEGER}, - logo = #{record.logo,jdbcType=VARCHAR}, - big_pic = #{record.bigPic,jdbcType=VARCHAR}, - brand_story = #{record.brandStory,jdbcType=LONGVARCHAR} - + set id = #{row.id,jdbcType=BIGINT}, + name = #{row.name,jdbcType=VARCHAR}, + first_letter = #{row.firstLetter,jdbcType=VARCHAR}, + sort = #{row.sort,jdbcType=INTEGER}, + factory_status = #{row.factoryStatus,jdbcType=INTEGER}, + show_status = #{row.showStatus,jdbcType=INTEGER}, + product_count = #{row.productCount,jdbcType=INTEGER}, + product_comment_count = #{row.productCommentCount,jdbcType=INTEGER}, + logo = #{row.logo,jdbcType=VARCHAR}, + big_pic = #{row.bigPic,jdbcType=VARCHAR}, + brand_story = #{row.brandStory,jdbcType=LONGVARCHAR} + update pms_brand - set id = #{record.id,jdbcType=BIGINT}, - name = #{record.name,jdbcType=VARCHAR}, - first_letter = #{record.firstLetter,jdbcType=VARCHAR}, - sort = #{record.sort,jdbcType=INTEGER}, - factory_status = #{record.factoryStatus,jdbcType=INTEGER}, - show_status = #{record.showStatus,jdbcType=INTEGER}, - product_count = #{record.productCount,jdbcType=INTEGER}, - product_comment_count = #{record.productCommentCount,jdbcType=INTEGER}, - logo = #{record.logo,jdbcType=VARCHAR}, - big_pic = #{record.bigPic,jdbcType=VARCHAR} - + set id = #{row.id,jdbcType=BIGINT}, + name = #{row.name,jdbcType=VARCHAR}, + first_letter = #{row.firstLetter,jdbcType=VARCHAR}, + sort = #{row.sort,jdbcType=INTEGER}, + factory_status = #{row.factoryStatus,jdbcType=INTEGER}, + show_status = #{row.showStatus,jdbcType=INTEGER}, + product_count = #{row.productCount,jdbcType=INTEGER}, + product_comment_count = #{row.productCommentCount,jdbcType=INTEGER}, + logo = #{row.logo,jdbcType=VARCHAR}, + big_pic = #{row.bigPic,jdbcType=VARCHAR} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsCommentMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsCommentMapper.xml index db75a7c..74eb51c 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsCommentMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsCommentMapper.xml @@ -251,94 +251,94 @@ update pms_comment - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - product_id = #{record.productId,jdbcType=BIGINT}, + + product_id = #{row.productId,jdbcType=BIGINT}, - - member_nick_name = #{record.memberNickName,jdbcType=VARCHAR}, + + member_nick_name = #{row.memberNickName,jdbcType=VARCHAR}, - - product_name = #{record.productName,jdbcType=VARCHAR}, + + product_name = #{row.productName,jdbcType=VARCHAR}, - - star = #{record.star,jdbcType=INTEGER}, + + star = #{row.star,jdbcType=INTEGER}, - - member_ip = #{record.memberIp,jdbcType=VARCHAR}, + + member_ip = #{row.memberIp,jdbcType=VARCHAR}, - - create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + create_time = #{row.createTime,jdbcType=TIMESTAMP}, - - show_status = #{record.showStatus,jdbcType=INTEGER}, + + show_status = #{row.showStatus,jdbcType=INTEGER}, - - product_attribute = #{record.productAttribute,jdbcType=VARCHAR}, + + product_attribute = #{row.productAttribute,jdbcType=VARCHAR}, - - collect_couont = #{record.collectCouont,jdbcType=INTEGER}, + + collect_couont = #{row.collectCouont,jdbcType=INTEGER}, - - read_count = #{record.readCount,jdbcType=INTEGER}, + + read_count = #{row.readCount,jdbcType=INTEGER}, - - pics = #{record.pics,jdbcType=VARCHAR}, + + pics = #{row.pics,jdbcType=VARCHAR}, - - member_icon = #{record.memberIcon,jdbcType=VARCHAR}, + + member_icon = #{row.memberIcon,jdbcType=VARCHAR}, - - replay_count = #{record.replayCount,jdbcType=INTEGER}, + + replay_count = #{row.replayCount,jdbcType=INTEGER}, - - content = #{record.content,jdbcType=LONGVARCHAR}, + + content = #{row.content,jdbcType=LONGVARCHAR}, - + update pms_comment - set id = #{record.id,jdbcType=BIGINT}, - product_id = #{record.productId,jdbcType=BIGINT}, - member_nick_name = #{record.memberNickName,jdbcType=VARCHAR}, - product_name = #{record.productName,jdbcType=VARCHAR}, - star = #{record.star,jdbcType=INTEGER}, - member_ip = #{record.memberIp,jdbcType=VARCHAR}, - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - show_status = #{record.showStatus,jdbcType=INTEGER}, - product_attribute = #{record.productAttribute,jdbcType=VARCHAR}, - collect_couont = #{record.collectCouont,jdbcType=INTEGER}, - read_count = #{record.readCount,jdbcType=INTEGER}, - pics = #{record.pics,jdbcType=VARCHAR}, - member_icon = #{record.memberIcon,jdbcType=VARCHAR}, - replay_count = #{record.replayCount,jdbcType=INTEGER}, - content = #{record.content,jdbcType=LONGVARCHAR} - + set id = #{row.id,jdbcType=BIGINT}, + product_id = #{row.productId,jdbcType=BIGINT}, + member_nick_name = #{row.memberNickName,jdbcType=VARCHAR}, + product_name = #{row.productName,jdbcType=VARCHAR}, + star = #{row.star,jdbcType=INTEGER}, + member_ip = #{row.memberIp,jdbcType=VARCHAR}, + create_time = #{row.createTime,jdbcType=TIMESTAMP}, + show_status = #{row.showStatus,jdbcType=INTEGER}, + product_attribute = #{row.productAttribute,jdbcType=VARCHAR}, + collect_couont = #{row.collectCouont,jdbcType=INTEGER}, + read_count = #{row.readCount,jdbcType=INTEGER}, + pics = #{row.pics,jdbcType=VARCHAR}, + member_icon = #{row.memberIcon,jdbcType=VARCHAR}, + replay_count = #{row.replayCount,jdbcType=INTEGER}, + content = #{row.content,jdbcType=LONGVARCHAR} + update pms_comment - set id = #{record.id,jdbcType=BIGINT}, - product_id = #{record.productId,jdbcType=BIGINT}, - member_nick_name = #{record.memberNickName,jdbcType=VARCHAR}, - product_name = #{record.productName,jdbcType=VARCHAR}, - star = #{record.star,jdbcType=INTEGER}, - member_ip = #{record.memberIp,jdbcType=VARCHAR}, - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - show_status = #{record.showStatus,jdbcType=INTEGER}, - product_attribute = #{record.productAttribute,jdbcType=VARCHAR}, - collect_couont = #{record.collectCouont,jdbcType=INTEGER}, - read_count = #{record.readCount,jdbcType=INTEGER}, - pics = #{record.pics,jdbcType=VARCHAR}, - member_icon = #{record.memberIcon,jdbcType=VARCHAR}, - replay_count = #{record.replayCount,jdbcType=INTEGER} - + set id = #{row.id,jdbcType=BIGINT}, + product_id = #{row.productId,jdbcType=BIGINT}, + member_nick_name = #{row.memberNickName,jdbcType=VARCHAR}, + product_name = #{row.productName,jdbcType=VARCHAR}, + star = #{row.star,jdbcType=INTEGER}, + member_ip = #{row.memberIp,jdbcType=VARCHAR}, + create_time = #{row.createTime,jdbcType=TIMESTAMP}, + show_status = #{row.showStatus,jdbcType=INTEGER}, + product_attribute = #{row.productAttribute,jdbcType=VARCHAR}, + collect_couont = #{row.collectCouont,jdbcType=INTEGER}, + read_count = #{row.readCount,jdbcType=INTEGER}, + pics = #{row.pics,jdbcType=VARCHAR}, + member_icon = #{row.memberIcon,jdbcType=VARCHAR}, + replay_count = #{row.replayCount,jdbcType=INTEGER} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsCommentReplayMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsCommentReplayMapper.xml index 23a76fe..c922002 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsCommentReplayMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsCommentReplayMapper.xml @@ -167,42 +167,42 @@ update pms_comment_replay - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - comment_id = #{record.commentId,jdbcType=BIGINT}, + + comment_id = #{row.commentId,jdbcType=BIGINT}, - - member_nick_name = #{record.memberNickName,jdbcType=VARCHAR}, + + member_nick_name = #{row.memberNickName,jdbcType=VARCHAR}, - - member_icon = #{record.memberIcon,jdbcType=VARCHAR}, + + member_icon = #{row.memberIcon,jdbcType=VARCHAR}, - - content = #{record.content,jdbcType=VARCHAR}, + + content = #{row.content,jdbcType=VARCHAR}, - - create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + create_time = #{row.createTime,jdbcType=TIMESTAMP}, - - type = #{record.type,jdbcType=INTEGER}, + + type = #{row.type,jdbcType=INTEGER}, - + update pms_comment_replay - set id = #{record.id,jdbcType=BIGINT}, - comment_id = #{record.commentId,jdbcType=BIGINT}, - member_nick_name = #{record.memberNickName,jdbcType=VARCHAR}, - member_icon = #{record.memberIcon,jdbcType=VARCHAR}, - content = #{record.content,jdbcType=VARCHAR}, - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - type = #{record.type,jdbcType=INTEGER} - + set id = #{row.id,jdbcType=BIGINT}, + comment_id = #{row.commentId,jdbcType=BIGINT}, + member_nick_name = #{row.memberNickName,jdbcType=VARCHAR}, + member_icon = #{row.memberIcon,jdbcType=VARCHAR}, + content = #{row.content,jdbcType=VARCHAR}, + create_time = #{row.createTime,jdbcType=TIMESTAMP}, + type = #{row.type,jdbcType=INTEGER} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsFeightTemplateMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsFeightTemplateMapper.xml index 9783e56..a3ac328 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsFeightTemplateMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsFeightTemplateMapper.xml @@ -174,46 +174,46 @@ update pms_feight_template - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - name = #{record.name,jdbcType=VARCHAR}, + + name = #{row.name,jdbcType=VARCHAR}, - - charge_type = #{record.chargeType,jdbcType=INTEGER}, + + charge_type = #{row.chargeType,jdbcType=INTEGER}, - - first_weight = #{record.firstWeight,jdbcType=DECIMAL}, + + first_weight = #{row.firstWeight,jdbcType=DECIMAL}, - - first_fee = #{record.firstFee,jdbcType=DECIMAL}, + + first_fee = #{row.firstFee,jdbcType=DECIMAL}, - - continue_weight = #{record.continueWeight,jdbcType=DECIMAL}, + + continue_weight = #{row.continueWeight,jdbcType=DECIMAL}, - - continme_fee = #{record.continmeFee,jdbcType=DECIMAL}, + + continme_fee = #{row.continmeFee,jdbcType=DECIMAL}, - - dest = #{record.dest,jdbcType=VARCHAR}, + + dest = #{row.dest,jdbcType=VARCHAR}, - + update pms_feight_template - set id = #{record.id,jdbcType=BIGINT}, - name = #{record.name,jdbcType=VARCHAR}, - charge_type = #{record.chargeType,jdbcType=INTEGER}, - first_weight = #{record.firstWeight,jdbcType=DECIMAL}, - first_fee = #{record.firstFee,jdbcType=DECIMAL}, - continue_weight = #{record.continueWeight,jdbcType=DECIMAL}, - continme_fee = #{record.continmeFee,jdbcType=DECIMAL}, - dest = #{record.dest,jdbcType=VARCHAR} - + set id = #{row.id,jdbcType=BIGINT}, + name = #{row.name,jdbcType=VARCHAR}, + charge_type = #{row.chargeType,jdbcType=INTEGER}, + first_weight = #{row.firstWeight,jdbcType=DECIMAL}, + first_fee = #{row.firstFee,jdbcType=DECIMAL}, + continue_weight = #{row.continueWeight,jdbcType=DECIMAL}, + continme_fee = #{row.continmeFee,jdbcType=DECIMAL}, + dest = #{row.dest,jdbcType=VARCHAR} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsMemberPriceMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsMemberPriceMapper.xml index 81d23b8..5451bff 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsMemberPriceMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsMemberPriceMapper.xml @@ -151,34 +151,34 @@ update pms_member_price - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - product_id = #{record.productId,jdbcType=BIGINT}, + + product_id = #{row.productId,jdbcType=BIGINT}, - - member_level_id = #{record.memberLevelId,jdbcType=BIGINT}, + + member_level_id = #{row.memberLevelId,jdbcType=BIGINT}, - - member_price = #{record.memberPrice,jdbcType=DECIMAL}, + + member_price = #{row.memberPrice,jdbcType=DECIMAL}, - - member_level_name = #{record.memberLevelName,jdbcType=VARCHAR}, + + member_level_name = #{row.memberLevelName,jdbcType=VARCHAR}, - + update pms_member_price - set id = #{record.id,jdbcType=BIGINT}, - product_id = #{record.productId,jdbcType=BIGINT}, - member_level_id = #{record.memberLevelId,jdbcType=BIGINT}, - member_price = #{record.memberPrice,jdbcType=DECIMAL}, - member_level_name = #{record.memberLevelName,jdbcType=VARCHAR} - + set id = #{row.id,jdbcType=BIGINT}, + product_id = #{row.productId,jdbcType=BIGINT}, + member_level_id = #{row.memberLevelId,jdbcType=BIGINT}, + member_price = #{row.memberPrice,jdbcType=DECIMAL}, + member_level_name = #{row.memberLevelName,jdbcType=VARCHAR} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductAttributeCategoryMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductAttributeCategoryMapper.xml index 5cf0c66..370c11b 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductAttributeCategoryMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductAttributeCategoryMapper.xml @@ -144,30 +144,30 @@ update pms_product_attribute_category - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - name = #{record.name,jdbcType=VARCHAR}, + + name = #{row.name,jdbcType=VARCHAR}, - - attribute_count = #{record.attributeCount,jdbcType=INTEGER}, + + attribute_count = #{row.attributeCount,jdbcType=INTEGER}, - - param_count = #{record.paramCount,jdbcType=INTEGER}, + + param_count = #{row.paramCount,jdbcType=INTEGER}, - + update pms_product_attribute_category - set id = #{record.id,jdbcType=BIGINT}, - name = #{record.name,jdbcType=VARCHAR}, - attribute_count = #{record.attributeCount,jdbcType=INTEGER}, - param_count = #{record.paramCount,jdbcType=INTEGER} - + set id = #{row.id,jdbcType=BIGINT}, + name = #{row.name,jdbcType=VARCHAR}, + attribute_count = #{row.attributeCount,jdbcType=INTEGER}, + param_count = #{row.paramCount,jdbcType=INTEGER} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductAttributeMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductAttributeMapper.xml index a153e76..a1adaea 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductAttributeMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductAttributeMapper.xml @@ -207,62 +207,62 @@ update pms_product_attribute - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - product_attribute_category_id = #{record.productAttributeCategoryId,jdbcType=BIGINT}, + + product_attribute_category_id = #{row.productAttributeCategoryId,jdbcType=BIGINT}, - - name = #{record.name,jdbcType=VARCHAR}, + + name = #{row.name,jdbcType=VARCHAR}, - - select_type = #{record.selectType,jdbcType=INTEGER}, + + select_type = #{row.selectType,jdbcType=INTEGER}, - - input_type = #{record.inputType,jdbcType=INTEGER}, + + input_type = #{row.inputType,jdbcType=INTEGER}, - - input_list = #{record.inputList,jdbcType=VARCHAR}, + + input_list = #{row.inputList,jdbcType=VARCHAR}, - - sort = #{record.sort,jdbcType=INTEGER}, + + sort = #{row.sort,jdbcType=INTEGER}, - - filter_type = #{record.filterType,jdbcType=INTEGER}, + + filter_type = #{row.filterType,jdbcType=INTEGER}, - - search_type = #{record.searchType,jdbcType=INTEGER}, + + search_type = #{row.searchType,jdbcType=INTEGER}, - - related_status = #{record.relatedStatus,jdbcType=INTEGER}, + + related_status = #{row.relatedStatus,jdbcType=INTEGER}, - - hand_add_status = #{record.handAddStatus,jdbcType=INTEGER}, + + hand_add_status = #{row.handAddStatus,jdbcType=INTEGER}, - - type = #{record.type,jdbcType=INTEGER}, + + type = #{row.type,jdbcType=INTEGER}, - + update pms_product_attribute - set id = #{record.id,jdbcType=BIGINT}, - product_attribute_category_id = #{record.productAttributeCategoryId,jdbcType=BIGINT}, - name = #{record.name,jdbcType=VARCHAR}, - select_type = #{record.selectType,jdbcType=INTEGER}, - input_type = #{record.inputType,jdbcType=INTEGER}, - input_list = #{record.inputList,jdbcType=VARCHAR}, - sort = #{record.sort,jdbcType=INTEGER}, - filter_type = #{record.filterType,jdbcType=INTEGER}, - search_type = #{record.searchType,jdbcType=INTEGER}, - related_status = #{record.relatedStatus,jdbcType=INTEGER}, - hand_add_status = #{record.handAddStatus,jdbcType=INTEGER}, - type = #{record.type,jdbcType=INTEGER} - + set id = #{row.id,jdbcType=BIGINT}, + product_attribute_category_id = #{row.productAttributeCategoryId,jdbcType=BIGINT}, + name = #{row.name,jdbcType=VARCHAR}, + select_type = #{row.selectType,jdbcType=INTEGER}, + input_type = #{row.inputType,jdbcType=INTEGER}, + input_list = #{row.inputList,jdbcType=VARCHAR}, + sort = #{row.sort,jdbcType=INTEGER}, + filter_type = #{row.filterType,jdbcType=INTEGER}, + search_type = #{row.searchType,jdbcType=INTEGER}, + related_status = #{row.relatedStatus,jdbcType=INTEGER}, + hand_add_status = #{row.handAddStatus,jdbcType=INTEGER}, + type = #{row.type,jdbcType=INTEGER} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductAttributeValueMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductAttributeValueMapper.xml index 47e3b20..78de8a5 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductAttributeValueMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductAttributeValueMapper.xml @@ -144,30 +144,30 @@ update pms_product_attribute_value - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - product_id = #{record.productId,jdbcType=BIGINT}, + + product_id = #{row.productId,jdbcType=BIGINT}, - - product_attribute_id = #{record.productAttributeId,jdbcType=BIGINT}, + + product_attribute_id = #{row.productAttributeId,jdbcType=BIGINT}, - - value = #{record.value,jdbcType=VARCHAR}, + + value = #{row.value,jdbcType=VARCHAR}, - + update pms_product_attribute_value - set id = #{record.id,jdbcType=BIGINT}, - product_id = #{record.productId,jdbcType=BIGINT}, - product_attribute_id = #{record.productAttributeId,jdbcType=BIGINT}, - value = #{record.value,jdbcType=VARCHAR} - + set id = #{row.id,jdbcType=BIGINT}, + product_id = #{row.productId,jdbcType=BIGINT}, + product_attribute_id = #{row.productAttributeId,jdbcType=BIGINT}, + value = #{row.value,jdbcType=VARCHAR} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductCategoryAttributeRelationMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductCategoryAttributeRelationMapper.xml index 415a82c..a2a287d 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductCategoryAttributeRelationMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductCategoryAttributeRelationMapper.xml @@ -137,26 +137,26 @@ update pms_product_category_attribute_relation - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - product_category_id = #{record.productCategoryId,jdbcType=BIGINT}, + + product_category_id = #{row.productCategoryId,jdbcType=BIGINT}, - - product_attribute_id = #{record.productAttributeId,jdbcType=BIGINT}, + + product_attribute_id = #{row.productAttributeId,jdbcType=BIGINT}, - + update pms_product_category_attribute_relation - set id = #{record.id,jdbcType=BIGINT}, - product_category_id = #{record.productCategoryId,jdbcType=BIGINT}, - product_attribute_id = #{record.productAttributeId,jdbcType=BIGINT} - + set id = #{row.id,jdbcType=BIGINT}, + product_category_id = #{row.productCategoryId,jdbcType=BIGINT}, + product_attribute_id = #{row.productAttributeId,jdbcType=BIGINT} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductCategoryMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductCategoryMapper.xml index 7f9dce3..b193094 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductCategoryMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductCategoryMapper.xml @@ -228,79 +228,79 @@ update pms_product_category - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - parent_id = #{record.parentId,jdbcType=BIGINT}, + + parent_id = #{row.parentId,jdbcType=BIGINT}, - - name = #{record.name,jdbcType=VARCHAR}, + + name = #{row.name,jdbcType=VARCHAR}, - - level = #{record.level,jdbcType=INTEGER}, + + level = #{row.level,jdbcType=INTEGER}, - - product_count = #{record.productCount,jdbcType=INTEGER}, + + product_count = #{row.productCount,jdbcType=INTEGER}, - - product_unit = #{record.productUnit,jdbcType=VARCHAR}, + + product_unit = #{row.productUnit,jdbcType=VARCHAR}, - - nav_status = #{record.navStatus,jdbcType=INTEGER}, + + nav_status = #{row.navStatus,jdbcType=INTEGER}, - - show_status = #{record.showStatus,jdbcType=INTEGER}, + + show_status = #{row.showStatus,jdbcType=INTEGER}, - - sort = #{record.sort,jdbcType=INTEGER}, + + sort = #{row.sort,jdbcType=INTEGER}, - - icon = #{record.icon,jdbcType=VARCHAR}, + + icon = #{row.icon,jdbcType=VARCHAR}, - - keywords = #{record.keywords,jdbcType=VARCHAR}, + + keywords = #{row.keywords,jdbcType=VARCHAR}, - - description = #{record.description,jdbcType=LONGVARCHAR}, + + description = #{row.description,jdbcType=LONGVARCHAR}, - + update pms_product_category - set id = #{record.id,jdbcType=BIGINT}, - parent_id = #{record.parentId,jdbcType=BIGINT}, - name = #{record.name,jdbcType=VARCHAR}, - level = #{record.level,jdbcType=INTEGER}, - product_count = #{record.productCount,jdbcType=INTEGER}, - product_unit = #{record.productUnit,jdbcType=VARCHAR}, - nav_status = #{record.navStatus,jdbcType=INTEGER}, - show_status = #{record.showStatus,jdbcType=INTEGER}, - sort = #{record.sort,jdbcType=INTEGER}, - icon = #{record.icon,jdbcType=VARCHAR}, - keywords = #{record.keywords,jdbcType=VARCHAR}, - description = #{record.description,jdbcType=LONGVARCHAR} - + set id = #{row.id,jdbcType=BIGINT}, + parent_id = #{row.parentId,jdbcType=BIGINT}, + name = #{row.name,jdbcType=VARCHAR}, + level = #{row.level,jdbcType=INTEGER}, + product_count = #{row.productCount,jdbcType=INTEGER}, + product_unit = #{row.productUnit,jdbcType=VARCHAR}, + nav_status = #{row.navStatus,jdbcType=INTEGER}, + show_status = #{row.showStatus,jdbcType=INTEGER}, + sort = #{row.sort,jdbcType=INTEGER}, + icon = #{row.icon,jdbcType=VARCHAR}, + keywords = #{row.keywords,jdbcType=VARCHAR}, + description = #{row.description,jdbcType=LONGVARCHAR} + update pms_product_category - set id = #{record.id,jdbcType=BIGINT}, - parent_id = #{record.parentId,jdbcType=BIGINT}, - name = #{record.name,jdbcType=VARCHAR}, - level = #{record.level,jdbcType=INTEGER}, - product_count = #{record.productCount,jdbcType=INTEGER}, - product_unit = #{record.productUnit,jdbcType=VARCHAR}, - nav_status = #{record.navStatus,jdbcType=INTEGER}, - show_status = #{record.showStatus,jdbcType=INTEGER}, - sort = #{record.sort,jdbcType=INTEGER}, - icon = #{record.icon,jdbcType=VARCHAR}, - keywords = #{record.keywords,jdbcType=VARCHAR} - + set id = #{row.id,jdbcType=BIGINT}, + parent_id = #{row.parentId,jdbcType=BIGINT}, + name = #{row.name,jdbcType=VARCHAR}, + level = #{row.level,jdbcType=INTEGER}, + product_count = #{row.productCount,jdbcType=INTEGER}, + product_unit = #{row.productUnit,jdbcType=VARCHAR}, + nav_status = #{row.navStatus,jdbcType=INTEGER}, + show_status = #{row.showStatus,jdbcType=INTEGER}, + sort = #{row.sort,jdbcType=INTEGER}, + icon = #{row.icon,jdbcType=VARCHAR}, + keywords = #{row.keywords,jdbcType=VARCHAR} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductFullReductionMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductFullReductionMapper.xml index 85173b3..5fa83c9 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductFullReductionMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductFullReductionMapper.xml @@ -144,30 +144,30 @@ update pms_product_full_reduction - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - product_id = #{record.productId,jdbcType=BIGINT}, + + product_id = #{row.productId,jdbcType=BIGINT}, - - full_price = #{record.fullPrice,jdbcType=DECIMAL}, + + full_price = #{row.fullPrice,jdbcType=DECIMAL}, - - reduce_price = #{record.reducePrice,jdbcType=DECIMAL}, + + reduce_price = #{row.reducePrice,jdbcType=DECIMAL}, - + update pms_product_full_reduction - set id = #{record.id,jdbcType=BIGINT}, - product_id = #{record.productId,jdbcType=BIGINT}, - full_price = #{record.fullPrice,jdbcType=DECIMAL}, - reduce_price = #{record.reducePrice,jdbcType=DECIMAL} - + set id = #{row.id,jdbcType=BIGINT}, + product_id = #{row.productId,jdbcType=BIGINT}, + full_price = #{row.fullPrice,jdbcType=DECIMAL}, + reduce_price = #{row.reducePrice,jdbcType=DECIMAL} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductLadderMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductLadderMapper.xml index be638a9..37eea34 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductLadderMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductLadderMapper.xml @@ -151,34 +151,34 @@ update pms_product_ladder - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - product_id = #{record.productId,jdbcType=BIGINT}, + + product_id = #{row.productId,jdbcType=BIGINT}, - - count = #{record.count,jdbcType=INTEGER}, + + count = #{row.count,jdbcType=INTEGER}, - - discount = #{record.discount,jdbcType=DECIMAL}, + + discount = #{row.discount,jdbcType=DECIMAL}, - - price = #{record.price,jdbcType=DECIMAL}, + + price = #{row.price,jdbcType=DECIMAL}, - + update pms_product_ladder - set id = #{record.id,jdbcType=BIGINT}, - product_id = #{record.productId,jdbcType=BIGINT}, - count = #{record.count,jdbcType=INTEGER}, - discount = #{record.discount,jdbcType=DECIMAL}, - price = #{record.price,jdbcType=DECIMAL} - + set id = #{row.id,jdbcType=BIGINT}, + product_id = #{row.productId,jdbcType=BIGINT}, + count = #{row.count,jdbcType=INTEGER}, + discount = #{row.discount,jdbcType=DECIMAL}, + price = #{row.price,jdbcType=DECIMAL} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductMapper.xml index 682be18..146c509 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductMapper.xml @@ -462,226 +462,226 @@ update pms_product - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - brand_id = #{record.brandId,jdbcType=BIGINT}, + + brand_id = #{row.brandId,jdbcType=BIGINT}, - - product_category_id = #{record.productCategoryId,jdbcType=BIGINT}, + + product_category_id = #{row.productCategoryId,jdbcType=BIGINT}, - - feight_template_id = #{record.feightTemplateId,jdbcType=BIGINT}, + + feight_template_id = #{row.feightTemplateId,jdbcType=BIGINT}, - - product_attribute_category_id = #{record.productAttributeCategoryId,jdbcType=BIGINT}, + + product_attribute_category_id = #{row.productAttributeCategoryId,jdbcType=BIGINT}, - - name = #{record.name,jdbcType=VARCHAR}, + + name = #{row.name,jdbcType=VARCHAR}, - - pic = #{record.pic,jdbcType=VARCHAR}, + + pic = #{row.pic,jdbcType=VARCHAR}, - - product_sn = #{record.productSn,jdbcType=VARCHAR}, + + product_sn = #{row.productSn,jdbcType=VARCHAR}, - - delete_status = #{record.deleteStatus,jdbcType=INTEGER}, + + delete_status = #{row.deleteStatus,jdbcType=INTEGER}, - - publish_status = #{record.publishStatus,jdbcType=INTEGER}, + + publish_status = #{row.publishStatus,jdbcType=INTEGER}, - - new_status = #{record.newStatus,jdbcType=INTEGER}, + + new_status = #{row.newStatus,jdbcType=INTEGER}, - - recommand_status = #{record.recommandStatus,jdbcType=INTEGER}, + + recommand_status = #{row.recommandStatus,jdbcType=INTEGER}, - - verify_status = #{record.verifyStatus,jdbcType=INTEGER}, + + verify_status = #{row.verifyStatus,jdbcType=INTEGER}, - - sort = #{record.sort,jdbcType=INTEGER}, + + sort = #{row.sort,jdbcType=INTEGER}, - - sale = #{record.sale,jdbcType=INTEGER}, + + sale = #{row.sale,jdbcType=INTEGER}, - - price = #{record.price,jdbcType=DECIMAL}, + + price = #{row.price,jdbcType=DECIMAL}, - - promotion_price = #{record.promotionPrice,jdbcType=DECIMAL}, + + promotion_price = #{row.promotionPrice,jdbcType=DECIMAL}, - - gift_growth = #{record.giftGrowth,jdbcType=INTEGER}, + + gift_growth = #{row.giftGrowth,jdbcType=INTEGER}, - - gift_point = #{record.giftPoint,jdbcType=INTEGER}, + + gift_point = #{row.giftPoint,jdbcType=INTEGER}, - - use_point_limit = #{record.usePointLimit,jdbcType=INTEGER}, + + use_point_limit = #{row.usePointLimit,jdbcType=INTEGER}, - - sub_title = #{record.subTitle,jdbcType=VARCHAR}, + + sub_title = #{row.subTitle,jdbcType=VARCHAR}, - - original_price = #{record.originalPrice,jdbcType=DECIMAL}, + + original_price = #{row.originalPrice,jdbcType=DECIMAL}, - - stock = #{record.stock,jdbcType=INTEGER}, + + stock = #{row.stock,jdbcType=INTEGER}, - - low_stock = #{record.lowStock,jdbcType=INTEGER}, + + low_stock = #{row.lowStock,jdbcType=INTEGER}, - - unit = #{record.unit,jdbcType=VARCHAR}, + + unit = #{row.unit,jdbcType=VARCHAR}, - - weight = #{record.weight,jdbcType=DECIMAL}, + + weight = #{row.weight,jdbcType=DECIMAL}, - - preview_status = #{record.previewStatus,jdbcType=INTEGER}, + + preview_status = #{row.previewStatus,jdbcType=INTEGER}, - - service_ids = #{record.serviceIds,jdbcType=VARCHAR}, + + service_ids = #{row.serviceIds,jdbcType=VARCHAR}, - - keywords = #{record.keywords,jdbcType=VARCHAR}, + + keywords = #{row.keywords,jdbcType=VARCHAR}, - - note = #{record.note,jdbcType=VARCHAR}, + + note = #{row.note,jdbcType=VARCHAR}, - - album_pics = #{record.albumPics,jdbcType=VARCHAR}, + + album_pics = #{row.albumPics,jdbcType=VARCHAR}, - - detail_title = #{record.detailTitle,jdbcType=VARCHAR}, + + detail_title = #{row.detailTitle,jdbcType=VARCHAR}, - - promotion_start_time = #{record.promotionStartTime,jdbcType=TIMESTAMP}, + + promotion_start_time = #{row.promotionStartTime,jdbcType=TIMESTAMP}, - - promotion_end_time = #{record.promotionEndTime,jdbcType=TIMESTAMP}, + + promotion_end_time = #{row.promotionEndTime,jdbcType=TIMESTAMP}, - - promotion_per_limit = #{record.promotionPerLimit,jdbcType=INTEGER}, + + promotion_per_limit = #{row.promotionPerLimit,jdbcType=INTEGER}, - - promotion_type = #{record.promotionType,jdbcType=INTEGER}, + + promotion_type = #{row.promotionType,jdbcType=INTEGER}, - - brand_name = #{record.brandName,jdbcType=VARCHAR}, + + brand_name = #{row.brandName,jdbcType=VARCHAR}, - - product_category_name = #{record.productCategoryName,jdbcType=VARCHAR}, + + product_category_name = #{row.productCategoryName,jdbcType=VARCHAR}, - - description = #{record.description,jdbcType=LONGVARCHAR}, + + description = #{row.description,jdbcType=LONGVARCHAR}, - - detail_desc = #{record.detailDesc,jdbcType=LONGVARCHAR}, + + detail_desc = #{row.detailDesc,jdbcType=LONGVARCHAR}, - - detail_html = #{record.detailHtml,jdbcType=LONGVARCHAR}, + + detail_html = #{row.detailHtml,jdbcType=LONGVARCHAR}, - - detail_mobile_html = #{record.detailMobileHtml,jdbcType=LONGVARCHAR}, + + detail_mobile_html = #{row.detailMobileHtml,jdbcType=LONGVARCHAR}, - + update pms_product - set id = #{record.id,jdbcType=BIGINT}, - brand_id = #{record.brandId,jdbcType=BIGINT}, - product_category_id = #{record.productCategoryId,jdbcType=BIGINT}, - feight_template_id = #{record.feightTemplateId,jdbcType=BIGINT}, - product_attribute_category_id = #{record.productAttributeCategoryId,jdbcType=BIGINT}, - name = #{record.name,jdbcType=VARCHAR}, - pic = #{record.pic,jdbcType=VARCHAR}, - product_sn = #{record.productSn,jdbcType=VARCHAR}, - delete_status = #{record.deleteStatus,jdbcType=INTEGER}, - publish_status = #{record.publishStatus,jdbcType=INTEGER}, - new_status = #{record.newStatus,jdbcType=INTEGER}, - recommand_status = #{record.recommandStatus,jdbcType=INTEGER}, - verify_status = #{record.verifyStatus,jdbcType=INTEGER}, - sort = #{record.sort,jdbcType=INTEGER}, - sale = #{record.sale,jdbcType=INTEGER}, - price = #{record.price,jdbcType=DECIMAL}, - promotion_price = #{record.promotionPrice,jdbcType=DECIMAL}, - gift_growth = #{record.giftGrowth,jdbcType=INTEGER}, - gift_point = #{record.giftPoint,jdbcType=INTEGER}, - use_point_limit = #{record.usePointLimit,jdbcType=INTEGER}, - sub_title = #{record.subTitle,jdbcType=VARCHAR}, - original_price = #{record.originalPrice,jdbcType=DECIMAL}, - stock = #{record.stock,jdbcType=INTEGER}, - low_stock = #{record.lowStock,jdbcType=INTEGER}, - unit = #{record.unit,jdbcType=VARCHAR}, - weight = #{record.weight,jdbcType=DECIMAL}, - preview_status = #{record.previewStatus,jdbcType=INTEGER}, - service_ids = #{record.serviceIds,jdbcType=VARCHAR}, - keywords = #{record.keywords,jdbcType=VARCHAR}, - note = #{record.note,jdbcType=VARCHAR}, - album_pics = #{record.albumPics,jdbcType=VARCHAR}, - detail_title = #{record.detailTitle,jdbcType=VARCHAR}, - promotion_start_time = #{record.promotionStartTime,jdbcType=TIMESTAMP}, - promotion_end_time = #{record.promotionEndTime,jdbcType=TIMESTAMP}, - promotion_per_limit = #{record.promotionPerLimit,jdbcType=INTEGER}, - promotion_type = #{record.promotionType,jdbcType=INTEGER}, - brand_name = #{record.brandName,jdbcType=VARCHAR}, - product_category_name = #{record.productCategoryName,jdbcType=VARCHAR}, - description = #{record.description,jdbcType=LONGVARCHAR}, - detail_desc = #{record.detailDesc,jdbcType=LONGVARCHAR}, - detail_html = #{record.detailHtml,jdbcType=LONGVARCHAR}, - detail_mobile_html = #{record.detailMobileHtml,jdbcType=LONGVARCHAR} - + set id = #{row.id,jdbcType=BIGINT}, + brand_id = #{row.brandId,jdbcType=BIGINT}, + product_category_id = #{row.productCategoryId,jdbcType=BIGINT}, + feight_template_id = #{row.feightTemplateId,jdbcType=BIGINT}, + product_attribute_category_id = #{row.productAttributeCategoryId,jdbcType=BIGINT}, + name = #{row.name,jdbcType=VARCHAR}, + pic = #{row.pic,jdbcType=VARCHAR}, + product_sn = #{row.productSn,jdbcType=VARCHAR}, + delete_status = #{row.deleteStatus,jdbcType=INTEGER}, + publish_status = #{row.publishStatus,jdbcType=INTEGER}, + new_status = #{row.newStatus,jdbcType=INTEGER}, + recommand_status = #{row.recommandStatus,jdbcType=INTEGER}, + verify_status = #{row.verifyStatus,jdbcType=INTEGER}, + sort = #{row.sort,jdbcType=INTEGER}, + sale = #{row.sale,jdbcType=INTEGER}, + price = #{row.price,jdbcType=DECIMAL}, + promotion_price = #{row.promotionPrice,jdbcType=DECIMAL}, + gift_growth = #{row.giftGrowth,jdbcType=INTEGER}, + gift_point = #{row.giftPoint,jdbcType=INTEGER}, + use_point_limit = #{row.usePointLimit,jdbcType=INTEGER}, + sub_title = #{row.subTitle,jdbcType=VARCHAR}, + original_price = #{row.originalPrice,jdbcType=DECIMAL}, + stock = #{row.stock,jdbcType=INTEGER}, + low_stock = #{row.lowStock,jdbcType=INTEGER}, + unit = #{row.unit,jdbcType=VARCHAR}, + weight = #{row.weight,jdbcType=DECIMAL}, + preview_status = #{row.previewStatus,jdbcType=INTEGER}, + service_ids = #{row.serviceIds,jdbcType=VARCHAR}, + keywords = #{row.keywords,jdbcType=VARCHAR}, + note = #{row.note,jdbcType=VARCHAR}, + album_pics = #{row.albumPics,jdbcType=VARCHAR}, + detail_title = #{row.detailTitle,jdbcType=VARCHAR}, + promotion_start_time = #{row.promotionStartTime,jdbcType=TIMESTAMP}, + promotion_end_time = #{row.promotionEndTime,jdbcType=TIMESTAMP}, + promotion_per_limit = #{row.promotionPerLimit,jdbcType=INTEGER}, + promotion_type = #{row.promotionType,jdbcType=INTEGER}, + brand_name = #{row.brandName,jdbcType=VARCHAR}, + product_category_name = #{row.productCategoryName,jdbcType=VARCHAR}, + description = #{row.description,jdbcType=LONGVARCHAR}, + detail_desc = #{row.detailDesc,jdbcType=LONGVARCHAR}, + detail_html = #{row.detailHtml,jdbcType=LONGVARCHAR}, + detail_mobile_html = #{row.detailMobileHtml,jdbcType=LONGVARCHAR} + update pms_product - set id = #{record.id,jdbcType=BIGINT}, - brand_id = #{record.brandId,jdbcType=BIGINT}, - product_category_id = #{record.productCategoryId,jdbcType=BIGINT}, - feight_template_id = #{record.feightTemplateId,jdbcType=BIGINT}, - product_attribute_category_id = #{record.productAttributeCategoryId,jdbcType=BIGINT}, - name = #{record.name,jdbcType=VARCHAR}, - pic = #{record.pic,jdbcType=VARCHAR}, - product_sn = #{record.productSn,jdbcType=VARCHAR}, - delete_status = #{record.deleteStatus,jdbcType=INTEGER}, - publish_status = #{record.publishStatus,jdbcType=INTEGER}, - new_status = #{record.newStatus,jdbcType=INTEGER}, - recommand_status = #{record.recommandStatus,jdbcType=INTEGER}, - verify_status = #{record.verifyStatus,jdbcType=INTEGER}, - sort = #{record.sort,jdbcType=INTEGER}, - sale = #{record.sale,jdbcType=INTEGER}, - price = #{record.price,jdbcType=DECIMAL}, - promotion_price = #{record.promotionPrice,jdbcType=DECIMAL}, - gift_growth = #{record.giftGrowth,jdbcType=INTEGER}, - gift_point = #{record.giftPoint,jdbcType=INTEGER}, - use_point_limit = #{record.usePointLimit,jdbcType=INTEGER}, - sub_title = #{record.subTitle,jdbcType=VARCHAR}, - original_price = #{record.originalPrice,jdbcType=DECIMAL}, - stock = #{record.stock,jdbcType=INTEGER}, - low_stock = #{record.lowStock,jdbcType=INTEGER}, - unit = #{record.unit,jdbcType=VARCHAR}, - weight = #{record.weight,jdbcType=DECIMAL}, - preview_status = #{record.previewStatus,jdbcType=INTEGER}, - service_ids = #{record.serviceIds,jdbcType=VARCHAR}, - keywords = #{record.keywords,jdbcType=VARCHAR}, - note = #{record.note,jdbcType=VARCHAR}, - album_pics = #{record.albumPics,jdbcType=VARCHAR}, - detail_title = #{record.detailTitle,jdbcType=VARCHAR}, - promotion_start_time = #{record.promotionStartTime,jdbcType=TIMESTAMP}, - promotion_end_time = #{record.promotionEndTime,jdbcType=TIMESTAMP}, - promotion_per_limit = #{record.promotionPerLimit,jdbcType=INTEGER}, - promotion_type = #{record.promotionType,jdbcType=INTEGER}, - brand_name = #{record.brandName,jdbcType=VARCHAR}, - product_category_name = #{record.productCategoryName,jdbcType=VARCHAR} - + set id = #{row.id,jdbcType=BIGINT}, + brand_id = #{row.brandId,jdbcType=BIGINT}, + product_category_id = #{row.productCategoryId,jdbcType=BIGINT}, + feight_template_id = #{row.feightTemplateId,jdbcType=BIGINT}, + product_attribute_category_id = #{row.productAttributeCategoryId,jdbcType=BIGINT}, + name = #{row.name,jdbcType=VARCHAR}, + pic = #{row.pic,jdbcType=VARCHAR}, + product_sn = #{row.productSn,jdbcType=VARCHAR}, + delete_status = #{row.deleteStatus,jdbcType=INTEGER}, + publish_status = #{row.publishStatus,jdbcType=INTEGER}, + new_status = #{row.newStatus,jdbcType=INTEGER}, + recommand_status = #{row.recommandStatus,jdbcType=INTEGER}, + verify_status = #{row.verifyStatus,jdbcType=INTEGER}, + sort = #{row.sort,jdbcType=INTEGER}, + sale = #{row.sale,jdbcType=INTEGER}, + price = #{row.price,jdbcType=DECIMAL}, + promotion_price = #{row.promotionPrice,jdbcType=DECIMAL}, + gift_growth = #{row.giftGrowth,jdbcType=INTEGER}, + gift_point = #{row.giftPoint,jdbcType=INTEGER}, + use_point_limit = #{row.usePointLimit,jdbcType=INTEGER}, + sub_title = #{row.subTitle,jdbcType=VARCHAR}, + original_price = #{row.originalPrice,jdbcType=DECIMAL}, + stock = #{row.stock,jdbcType=INTEGER}, + low_stock = #{row.lowStock,jdbcType=INTEGER}, + unit = #{row.unit,jdbcType=VARCHAR}, + weight = #{row.weight,jdbcType=DECIMAL}, + preview_status = #{row.previewStatus,jdbcType=INTEGER}, + service_ids = #{row.serviceIds,jdbcType=VARCHAR}, + keywords = #{row.keywords,jdbcType=VARCHAR}, + note = #{row.note,jdbcType=VARCHAR}, + album_pics = #{row.albumPics,jdbcType=VARCHAR}, + detail_title = #{row.detailTitle,jdbcType=VARCHAR}, + promotion_start_time = #{row.promotionStartTime,jdbcType=TIMESTAMP}, + promotion_end_time = #{row.promotionEndTime,jdbcType=TIMESTAMP}, + promotion_per_limit = #{row.promotionPerLimit,jdbcType=INTEGER}, + promotion_type = #{row.promotionType,jdbcType=INTEGER}, + brand_name = #{row.brandName,jdbcType=VARCHAR}, + product_category_name = #{row.productCategoryName,jdbcType=VARCHAR} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductOperateLogMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductOperateLogMapper.xml index 6a04096..104e4cf 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductOperateLogMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductOperateLogMapper.xml @@ -205,62 +205,62 @@ update pms_product_operate_log - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - product_id = #{record.productId,jdbcType=BIGINT}, + + product_id = #{row.productId,jdbcType=BIGINT}, - - price_old = #{record.priceOld,jdbcType=DECIMAL}, + + price_old = #{row.priceOld,jdbcType=DECIMAL}, - - price_new = #{record.priceNew,jdbcType=DECIMAL}, + + price_new = #{row.priceNew,jdbcType=DECIMAL}, - - sale_price_old = #{record.salePriceOld,jdbcType=DECIMAL}, + + sale_price_old = #{row.salePriceOld,jdbcType=DECIMAL}, - - sale_price_new = #{record.salePriceNew,jdbcType=DECIMAL}, + + sale_price_new = #{row.salePriceNew,jdbcType=DECIMAL}, - - gift_point_old = #{record.giftPointOld,jdbcType=INTEGER}, + + gift_point_old = #{row.giftPointOld,jdbcType=INTEGER}, - - gift_point_new = #{record.giftPointNew,jdbcType=INTEGER}, + + gift_point_new = #{row.giftPointNew,jdbcType=INTEGER}, - - use_point_limit_old = #{record.usePointLimitOld,jdbcType=INTEGER}, + + use_point_limit_old = #{row.usePointLimitOld,jdbcType=INTEGER}, - - use_point_limit_new = #{record.usePointLimitNew,jdbcType=INTEGER}, + + use_point_limit_new = #{row.usePointLimitNew,jdbcType=INTEGER}, - - operate_man = #{record.operateMan,jdbcType=VARCHAR}, + + operate_man = #{row.operateMan,jdbcType=VARCHAR}, - - create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + create_time = #{row.createTime,jdbcType=TIMESTAMP}, - + update pms_product_operate_log - set id = #{record.id,jdbcType=BIGINT}, - product_id = #{record.productId,jdbcType=BIGINT}, - price_old = #{record.priceOld,jdbcType=DECIMAL}, - price_new = #{record.priceNew,jdbcType=DECIMAL}, - sale_price_old = #{record.salePriceOld,jdbcType=DECIMAL}, - sale_price_new = #{record.salePriceNew,jdbcType=DECIMAL}, - gift_point_old = #{record.giftPointOld,jdbcType=INTEGER}, - gift_point_new = #{record.giftPointNew,jdbcType=INTEGER}, - use_point_limit_old = #{record.usePointLimitOld,jdbcType=INTEGER}, - use_point_limit_new = #{record.usePointLimitNew,jdbcType=INTEGER}, - operate_man = #{record.operateMan,jdbcType=VARCHAR}, - create_time = #{record.createTime,jdbcType=TIMESTAMP} - + set id = #{row.id,jdbcType=BIGINT}, + product_id = #{row.productId,jdbcType=BIGINT}, + price_old = #{row.priceOld,jdbcType=DECIMAL}, + price_new = #{row.priceNew,jdbcType=DECIMAL}, + sale_price_old = #{row.salePriceOld,jdbcType=DECIMAL}, + sale_price_new = #{row.salePriceNew,jdbcType=DECIMAL}, + gift_point_old = #{row.giftPointOld,jdbcType=INTEGER}, + gift_point_new = #{row.giftPointNew,jdbcType=INTEGER}, + use_point_limit_old = #{row.usePointLimitOld,jdbcType=INTEGER}, + use_point_limit_new = #{row.usePointLimitNew,jdbcType=INTEGER}, + operate_man = #{row.operateMan,jdbcType=VARCHAR}, + create_time = #{row.createTime,jdbcType=TIMESTAMP} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductVertifyRecordMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductVertifyRecordMapper.xml index efbd9bd..baf481d 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductVertifyRecordMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductVertifyRecordMapper.xml @@ -158,38 +158,38 @@ update pms_product_vertify_record - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - product_id = #{record.productId,jdbcType=BIGINT}, + + product_id = #{row.productId,jdbcType=BIGINT}, - - create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + create_time = #{row.createTime,jdbcType=TIMESTAMP}, - - vertify_man = #{record.vertifyMan,jdbcType=VARCHAR}, + + vertify_man = #{row.vertifyMan,jdbcType=VARCHAR}, - - status = #{record.status,jdbcType=INTEGER}, + + status = #{row.status,jdbcType=INTEGER}, - - detail = #{record.detail,jdbcType=VARCHAR}, + + detail = #{row.detail,jdbcType=VARCHAR}, - + update pms_product_vertify_record - set id = #{record.id,jdbcType=BIGINT}, - product_id = #{record.productId,jdbcType=BIGINT}, - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - vertify_man = #{record.vertifyMan,jdbcType=VARCHAR}, - status = #{record.status,jdbcType=INTEGER}, - detail = #{record.detail,jdbcType=VARCHAR} - + set id = #{row.id,jdbcType=BIGINT}, + product_id = #{row.productId,jdbcType=BIGINT}, + create_time = #{row.createTime,jdbcType=TIMESTAMP}, + vertify_man = #{row.vertifyMan,jdbcType=VARCHAR}, + status = #{row.status,jdbcType=INTEGER}, + detail = #{row.detail,jdbcType=VARCHAR} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsSkuStockMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsSkuStockMapper.xml index 870bd3c..87b8225 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsSkuStockMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/PmsSkuStockMapper.xml @@ -198,58 +198,58 @@ update pms_sku_stock - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - product_id = #{record.productId,jdbcType=BIGINT}, + + product_id = #{row.productId,jdbcType=BIGINT}, - - sku_code = #{record.skuCode,jdbcType=VARCHAR}, + + sku_code = #{row.skuCode,jdbcType=VARCHAR}, - - price = #{record.price,jdbcType=DECIMAL}, + + price = #{row.price,jdbcType=DECIMAL}, - - stock = #{record.stock,jdbcType=INTEGER}, + + stock = #{row.stock,jdbcType=INTEGER}, - - low_stock = #{record.lowStock,jdbcType=INTEGER}, + + low_stock = #{row.lowStock,jdbcType=INTEGER}, - - pic = #{record.pic,jdbcType=VARCHAR}, + + pic = #{row.pic,jdbcType=VARCHAR}, - - sale = #{record.sale,jdbcType=INTEGER}, + + sale = #{row.sale,jdbcType=INTEGER}, - - promotion_price = #{record.promotionPrice,jdbcType=DECIMAL}, + + promotion_price = #{row.promotionPrice,jdbcType=DECIMAL}, - - lock_stock = #{record.lockStock,jdbcType=INTEGER}, + + lock_stock = #{row.lockStock,jdbcType=INTEGER}, - - sp_data = #{record.spData,jdbcType=VARCHAR}, + + sp_data = #{row.spData,jdbcType=VARCHAR}, - + update pms_sku_stock - set id = #{record.id,jdbcType=BIGINT}, - product_id = #{record.productId,jdbcType=BIGINT}, - sku_code = #{record.skuCode,jdbcType=VARCHAR}, - price = #{record.price,jdbcType=DECIMAL}, - stock = #{record.stock,jdbcType=INTEGER}, - low_stock = #{record.lowStock,jdbcType=INTEGER}, - pic = #{record.pic,jdbcType=VARCHAR}, - sale = #{record.sale,jdbcType=INTEGER}, - promotion_price = #{record.promotionPrice,jdbcType=DECIMAL}, - lock_stock = #{record.lockStock,jdbcType=INTEGER}, - sp_data = #{record.spData,jdbcType=VARCHAR} - + set id = #{row.id,jdbcType=BIGINT}, + product_id = #{row.productId,jdbcType=BIGINT}, + sku_code = #{row.skuCode,jdbcType=VARCHAR}, + price = #{row.price,jdbcType=DECIMAL}, + stock = #{row.stock,jdbcType=INTEGER}, + low_stock = #{row.lowStock,jdbcType=INTEGER}, + pic = #{row.pic,jdbcType=VARCHAR}, + sale = #{row.sale,jdbcType=INTEGER}, + promotion_price = #{row.promotionPrice,jdbcType=DECIMAL}, + lock_stock = #{row.lockStock,jdbcType=INTEGER}, + sp_data = #{row.spData,jdbcType=VARCHAR} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsCouponHistoryMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsCouponHistoryMapper.xml index 3767a44..771d525 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsCouponHistoryMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsCouponHistoryMapper.xml @@ -198,58 +198,58 @@ update sms_coupon_history - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - coupon_id = #{record.couponId,jdbcType=BIGINT}, + + coupon_id = #{row.couponId,jdbcType=BIGINT}, - - member_id = #{record.memberId,jdbcType=BIGINT}, + + member_id = #{row.memberId,jdbcType=BIGINT}, - - coupon_code = #{record.couponCode,jdbcType=VARCHAR}, + + coupon_code = #{row.couponCode,jdbcType=VARCHAR}, - - member_nickname = #{record.memberNickname,jdbcType=VARCHAR}, + + member_nickname = #{row.memberNickname,jdbcType=VARCHAR}, - - get_type = #{record.getType,jdbcType=INTEGER}, + + get_type = #{row.getType,jdbcType=INTEGER}, - - create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + create_time = #{row.createTime,jdbcType=TIMESTAMP}, - - use_status = #{record.useStatus,jdbcType=INTEGER}, + + use_status = #{row.useStatus,jdbcType=INTEGER}, - - use_time = #{record.useTime,jdbcType=TIMESTAMP}, + + use_time = #{row.useTime,jdbcType=TIMESTAMP}, - - order_id = #{record.orderId,jdbcType=BIGINT}, + + order_id = #{row.orderId,jdbcType=BIGINT}, - - order_sn = #{record.orderSn,jdbcType=VARCHAR}, + + order_sn = #{row.orderSn,jdbcType=VARCHAR}, - + update sms_coupon_history - set id = #{record.id,jdbcType=BIGINT}, - coupon_id = #{record.couponId,jdbcType=BIGINT}, - member_id = #{record.memberId,jdbcType=BIGINT}, - coupon_code = #{record.couponCode,jdbcType=VARCHAR}, - member_nickname = #{record.memberNickname,jdbcType=VARCHAR}, - get_type = #{record.getType,jdbcType=INTEGER}, - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - use_status = #{record.useStatus,jdbcType=INTEGER}, - use_time = #{record.useTime,jdbcType=TIMESTAMP}, - order_id = #{record.orderId,jdbcType=BIGINT}, - order_sn = #{record.orderSn,jdbcType=VARCHAR} - + set id = #{row.id,jdbcType=BIGINT}, + coupon_id = #{row.couponId,jdbcType=BIGINT}, + member_id = #{row.memberId,jdbcType=BIGINT}, + coupon_code = #{row.couponCode,jdbcType=VARCHAR}, + member_nickname = #{row.memberNickname,jdbcType=VARCHAR}, + get_type = #{row.getType,jdbcType=INTEGER}, + create_time = #{row.createTime,jdbcType=TIMESTAMP}, + use_status = #{row.useStatus,jdbcType=INTEGER}, + use_time = #{row.useTime,jdbcType=TIMESTAMP}, + order_id = #{row.orderId,jdbcType=BIGINT}, + order_sn = #{row.orderSn,jdbcType=VARCHAR} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsCouponMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsCouponMapper.xml index 1a101be..812df20 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsCouponMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsCouponMapper.xml @@ -251,86 +251,86 @@ update sms_coupon - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - type = #{record.type,jdbcType=INTEGER}, + + type = #{row.type,jdbcType=INTEGER}, - - name = #{record.name,jdbcType=VARCHAR}, + + name = #{row.name,jdbcType=VARCHAR}, - - platform = #{record.platform,jdbcType=INTEGER}, + + platform = #{row.platform,jdbcType=INTEGER}, - - count = #{record.count,jdbcType=INTEGER}, + + count = #{row.count,jdbcType=INTEGER}, - - amount = #{record.amount,jdbcType=DECIMAL}, + + amount = #{row.amount,jdbcType=DECIMAL}, - - per_limit = #{record.perLimit,jdbcType=INTEGER}, + + per_limit = #{row.perLimit,jdbcType=INTEGER}, - - min_point = #{record.minPoint,jdbcType=DECIMAL}, + + min_point = #{row.minPoint,jdbcType=DECIMAL}, - - start_time = #{record.startTime,jdbcType=TIMESTAMP}, + + start_time = #{row.startTime,jdbcType=TIMESTAMP}, - - end_time = #{record.endTime,jdbcType=TIMESTAMP}, + + end_time = #{row.endTime,jdbcType=TIMESTAMP}, - - use_type = #{record.useType,jdbcType=INTEGER}, + + use_type = #{row.useType,jdbcType=INTEGER}, - - note = #{record.note,jdbcType=VARCHAR}, + + note = #{row.note,jdbcType=VARCHAR}, - - publish_count = #{record.publishCount,jdbcType=INTEGER}, + + publish_count = #{row.publishCount,jdbcType=INTEGER}, - - use_count = #{record.useCount,jdbcType=INTEGER}, + + use_count = #{row.useCount,jdbcType=INTEGER}, - - receive_count = #{record.receiveCount,jdbcType=INTEGER}, + + receive_count = #{row.receiveCount,jdbcType=INTEGER}, - - enable_time = #{record.enableTime,jdbcType=TIMESTAMP}, + + enable_time = #{row.enableTime,jdbcType=TIMESTAMP}, - - code = #{record.code,jdbcType=VARCHAR}, + + code = #{row.code,jdbcType=VARCHAR}, - - member_level = #{record.memberLevel,jdbcType=INTEGER}, + + member_level = #{row.memberLevel,jdbcType=INTEGER}, - + update sms_coupon - set id = #{record.id,jdbcType=BIGINT}, - type = #{record.type,jdbcType=INTEGER}, - name = #{record.name,jdbcType=VARCHAR}, - platform = #{record.platform,jdbcType=INTEGER}, - count = #{record.count,jdbcType=INTEGER}, - amount = #{record.amount,jdbcType=DECIMAL}, - per_limit = #{record.perLimit,jdbcType=INTEGER}, - min_point = #{record.minPoint,jdbcType=DECIMAL}, - start_time = #{record.startTime,jdbcType=TIMESTAMP}, - end_time = #{record.endTime,jdbcType=TIMESTAMP}, - use_type = #{record.useType,jdbcType=INTEGER}, - note = #{record.note,jdbcType=VARCHAR}, - publish_count = #{record.publishCount,jdbcType=INTEGER}, - use_count = #{record.useCount,jdbcType=INTEGER}, - receive_count = #{record.receiveCount,jdbcType=INTEGER}, - enable_time = #{record.enableTime,jdbcType=TIMESTAMP}, - code = #{record.code,jdbcType=VARCHAR}, - member_level = #{record.memberLevel,jdbcType=INTEGER} - + set id = #{row.id,jdbcType=BIGINT}, + type = #{row.type,jdbcType=INTEGER}, + name = #{row.name,jdbcType=VARCHAR}, + platform = #{row.platform,jdbcType=INTEGER}, + count = #{row.count,jdbcType=INTEGER}, + amount = #{row.amount,jdbcType=DECIMAL}, + per_limit = #{row.perLimit,jdbcType=INTEGER}, + min_point = #{row.minPoint,jdbcType=DECIMAL}, + start_time = #{row.startTime,jdbcType=TIMESTAMP}, + end_time = #{row.endTime,jdbcType=TIMESTAMP}, + use_type = #{row.useType,jdbcType=INTEGER}, + note = #{row.note,jdbcType=VARCHAR}, + publish_count = #{row.publishCount,jdbcType=INTEGER}, + use_count = #{row.useCount,jdbcType=INTEGER}, + receive_count = #{row.receiveCount,jdbcType=INTEGER}, + enable_time = #{row.enableTime,jdbcType=TIMESTAMP}, + code = #{row.code,jdbcType=VARCHAR}, + member_level = #{row.memberLevel,jdbcType=INTEGER} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsCouponProductCategoryRelationMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsCouponProductCategoryRelationMapper.xml index 5eccbeb..a9fc769 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsCouponProductCategoryRelationMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsCouponProductCategoryRelationMapper.xml @@ -151,34 +151,34 @@ update sms_coupon_product_category_relation - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - coupon_id = #{record.couponId,jdbcType=BIGINT}, + + coupon_id = #{row.couponId,jdbcType=BIGINT}, - - product_category_id = #{record.productCategoryId,jdbcType=BIGINT}, + + product_category_id = #{row.productCategoryId,jdbcType=BIGINT}, - - product_category_name = #{record.productCategoryName,jdbcType=VARCHAR}, + + product_category_name = #{row.productCategoryName,jdbcType=VARCHAR}, - - parent_category_name = #{record.parentCategoryName,jdbcType=VARCHAR}, + + parent_category_name = #{row.parentCategoryName,jdbcType=VARCHAR}, - + update sms_coupon_product_category_relation - set id = #{record.id,jdbcType=BIGINT}, - coupon_id = #{record.couponId,jdbcType=BIGINT}, - product_category_id = #{record.productCategoryId,jdbcType=BIGINT}, - product_category_name = #{record.productCategoryName,jdbcType=VARCHAR}, - parent_category_name = #{record.parentCategoryName,jdbcType=VARCHAR} - + set id = #{row.id,jdbcType=BIGINT}, + coupon_id = #{row.couponId,jdbcType=BIGINT}, + product_category_id = #{row.productCategoryId,jdbcType=BIGINT}, + product_category_name = #{row.productCategoryName,jdbcType=VARCHAR}, + parent_category_name = #{row.parentCategoryName,jdbcType=VARCHAR} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsCouponProductRelationMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsCouponProductRelationMapper.xml index 132001d..0423786 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsCouponProductRelationMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsCouponProductRelationMapper.xml @@ -151,34 +151,34 @@ update sms_coupon_product_relation - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - coupon_id = #{record.couponId,jdbcType=BIGINT}, + + coupon_id = #{row.couponId,jdbcType=BIGINT}, - - product_id = #{record.productId,jdbcType=BIGINT}, + + product_id = #{row.productId,jdbcType=BIGINT}, - - product_name = #{record.productName,jdbcType=VARCHAR}, + + product_name = #{row.productName,jdbcType=VARCHAR}, - - product_sn = #{record.productSn,jdbcType=VARCHAR}, + + product_sn = #{row.productSn,jdbcType=VARCHAR}, - + update sms_coupon_product_relation - set id = #{record.id,jdbcType=BIGINT}, - coupon_id = #{record.couponId,jdbcType=BIGINT}, - product_id = #{record.productId,jdbcType=BIGINT}, - product_name = #{record.productName,jdbcType=VARCHAR}, - product_sn = #{record.productSn,jdbcType=VARCHAR} - + set id = #{row.id,jdbcType=BIGINT}, + coupon_id = #{row.couponId,jdbcType=BIGINT}, + product_id = #{row.productId,jdbcType=BIGINT}, + product_name = #{row.productName,jdbcType=VARCHAR}, + product_sn = #{row.productSn,jdbcType=VARCHAR} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsFlashPromotionLogMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsFlashPromotionLogMapper.xml index 7c9c89a..55d279d 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsFlashPromotionLogMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsFlashPromotionLogMapper.xml @@ -167,42 +167,42 @@ update sms_flash_promotion_log - - id = #{record.id,jdbcType=INTEGER}, + + id = #{row.id,jdbcType=INTEGER}, - - member_id = #{record.memberId,jdbcType=INTEGER}, + + member_id = #{row.memberId,jdbcType=INTEGER}, - - product_id = #{record.productId,jdbcType=BIGINT}, + + product_id = #{row.productId,jdbcType=BIGINT}, - - member_phone = #{record.memberPhone,jdbcType=VARCHAR}, + + member_phone = #{row.memberPhone,jdbcType=VARCHAR}, - - product_name = #{record.productName,jdbcType=VARCHAR}, + + product_name = #{row.productName,jdbcType=VARCHAR}, - - subscribe_time = #{record.subscribeTime,jdbcType=TIMESTAMP}, + + subscribe_time = #{row.subscribeTime,jdbcType=TIMESTAMP}, - - send_time = #{record.sendTime,jdbcType=TIMESTAMP}, + + send_time = #{row.sendTime,jdbcType=TIMESTAMP}, - + update sms_flash_promotion_log - set id = #{record.id,jdbcType=INTEGER}, - member_id = #{record.memberId,jdbcType=INTEGER}, - product_id = #{record.productId,jdbcType=BIGINT}, - member_phone = #{record.memberPhone,jdbcType=VARCHAR}, - product_name = #{record.productName,jdbcType=VARCHAR}, - subscribe_time = #{record.subscribeTime,jdbcType=TIMESTAMP}, - send_time = #{record.sendTime,jdbcType=TIMESTAMP} - + set id = #{row.id,jdbcType=INTEGER}, + member_id = #{row.memberId,jdbcType=INTEGER}, + product_id = #{row.productId,jdbcType=BIGINT}, + member_phone = #{row.memberPhone,jdbcType=VARCHAR}, + product_name = #{row.productName,jdbcType=VARCHAR}, + subscribe_time = #{row.subscribeTime,jdbcType=TIMESTAMP}, + send_time = #{row.sendTime,jdbcType=TIMESTAMP} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsFlashPromotionMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsFlashPromotionMapper.xml index 971e765..3d3c1ee 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsFlashPromotionMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsFlashPromotionMapper.xml @@ -158,38 +158,38 @@ update sms_flash_promotion - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - title = #{record.title,jdbcType=VARCHAR}, + + title = #{row.title,jdbcType=VARCHAR}, - - start_date = #{record.startDate,jdbcType=DATE}, + + start_date = #{row.startDate,jdbcType=DATE}, - - end_date = #{record.endDate,jdbcType=DATE}, + + end_date = #{row.endDate,jdbcType=DATE}, - - status = #{record.status,jdbcType=INTEGER}, + + status = #{row.status,jdbcType=INTEGER}, - - create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + create_time = #{row.createTime,jdbcType=TIMESTAMP}, - + update sms_flash_promotion - set id = #{record.id,jdbcType=BIGINT}, - title = #{record.title,jdbcType=VARCHAR}, - start_date = #{record.startDate,jdbcType=DATE}, - end_date = #{record.endDate,jdbcType=DATE}, - status = #{record.status,jdbcType=INTEGER}, - create_time = #{record.createTime,jdbcType=TIMESTAMP} - + set id = #{row.id,jdbcType=BIGINT}, + title = #{row.title,jdbcType=VARCHAR}, + start_date = #{row.startDate,jdbcType=DATE}, + end_date = #{row.endDate,jdbcType=DATE}, + status = #{row.status,jdbcType=INTEGER}, + create_time = #{row.createTime,jdbcType=TIMESTAMP} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsFlashPromotionProductRelationMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsFlashPromotionProductRelationMapper.xml index 58e8be8..925de8e 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsFlashPromotionProductRelationMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsFlashPromotionProductRelationMapper.xml @@ -175,46 +175,46 @@ update sms_flash_promotion_product_relation - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - flash_promotion_id = #{record.flashPromotionId,jdbcType=BIGINT}, + + flash_promotion_id = #{row.flashPromotionId,jdbcType=BIGINT}, - - flash_promotion_session_id = #{record.flashPromotionSessionId,jdbcType=BIGINT}, + + flash_promotion_session_id = #{row.flashPromotionSessionId,jdbcType=BIGINT}, - - product_id = #{record.productId,jdbcType=BIGINT}, + + product_id = #{row.productId,jdbcType=BIGINT}, - - flash_promotion_price = #{record.flashPromotionPrice,jdbcType=DECIMAL}, + + flash_promotion_price = #{row.flashPromotionPrice,jdbcType=DECIMAL}, - - flash_promotion_count = #{record.flashPromotionCount,jdbcType=INTEGER}, + + flash_promotion_count = #{row.flashPromotionCount,jdbcType=INTEGER}, - - flash_promotion_limit = #{record.flashPromotionLimit,jdbcType=INTEGER}, + + flash_promotion_limit = #{row.flashPromotionLimit,jdbcType=INTEGER}, - - sort = #{record.sort,jdbcType=INTEGER}, + + sort = #{row.sort,jdbcType=INTEGER}, - + update sms_flash_promotion_product_relation - set id = #{record.id,jdbcType=BIGINT}, - flash_promotion_id = #{record.flashPromotionId,jdbcType=BIGINT}, - flash_promotion_session_id = #{record.flashPromotionSessionId,jdbcType=BIGINT}, - product_id = #{record.productId,jdbcType=BIGINT}, - flash_promotion_price = #{record.flashPromotionPrice,jdbcType=DECIMAL}, - flash_promotion_count = #{record.flashPromotionCount,jdbcType=INTEGER}, - flash_promotion_limit = #{record.flashPromotionLimit,jdbcType=INTEGER}, - sort = #{record.sort,jdbcType=INTEGER} - + set id = #{row.id,jdbcType=BIGINT}, + flash_promotion_id = #{row.flashPromotionId,jdbcType=BIGINT}, + flash_promotion_session_id = #{row.flashPromotionSessionId,jdbcType=BIGINT}, + product_id = #{row.productId,jdbcType=BIGINT}, + flash_promotion_price = #{row.flashPromotionPrice,jdbcType=DECIMAL}, + flash_promotion_count = #{row.flashPromotionCount,jdbcType=INTEGER}, + flash_promotion_limit = #{row.flashPromotionLimit,jdbcType=INTEGER}, + sort = #{row.sort,jdbcType=INTEGER} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsFlashPromotionSessionMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsFlashPromotionSessionMapper.xml index a7f45f6..2dd29f4 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsFlashPromotionSessionMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsFlashPromotionSessionMapper.xml @@ -158,38 +158,38 @@ update sms_flash_promotion_session - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - name = #{record.name,jdbcType=VARCHAR}, + + name = #{row.name,jdbcType=VARCHAR}, - - start_time = #{record.startTime,jdbcType=TIME}, + + start_time = #{row.startTime,jdbcType=TIME}, - - end_time = #{record.endTime,jdbcType=TIME}, + + end_time = #{row.endTime,jdbcType=TIME}, - - status = #{record.status,jdbcType=INTEGER}, + + status = #{row.status,jdbcType=INTEGER}, - - create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + create_time = #{row.createTime,jdbcType=TIMESTAMP}, - + update sms_flash_promotion_session - set id = #{record.id,jdbcType=BIGINT}, - name = #{record.name,jdbcType=VARCHAR}, - start_time = #{record.startTime,jdbcType=TIME}, - end_time = #{record.endTime,jdbcType=TIME}, - status = #{record.status,jdbcType=INTEGER}, - create_time = #{record.createTime,jdbcType=TIMESTAMP} - + set id = #{row.id,jdbcType=BIGINT}, + name = #{row.name,jdbcType=VARCHAR}, + start_time = #{row.startTime,jdbcType=TIME}, + end_time = #{row.endTime,jdbcType=TIME}, + status = #{row.status,jdbcType=INTEGER}, + create_time = #{row.createTime,jdbcType=TIMESTAMP} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsHomeAdvertiseMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsHomeAdvertiseMapper.xml index c4f91fa..2c35d93 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsHomeAdvertiseMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsHomeAdvertiseMapper.xml @@ -205,62 +205,62 @@ update sms_home_advertise - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - name = #{record.name,jdbcType=VARCHAR}, + + name = #{row.name,jdbcType=VARCHAR}, - - type = #{record.type,jdbcType=INTEGER}, + + type = #{row.type,jdbcType=INTEGER}, - - pic = #{record.pic,jdbcType=VARCHAR}, + + pic = #{row.pic,jdbcType=VARCHAR}, - - start_time = #{record.startTime,jdbcType=TIMESTAMP}, + + start_time = #{row.startTime,jdbcType=TIMESTAMP}, - - end_time = #{record.endTime,jdbcType=TIMESTAMP}, + + end_time = #{row.endTime,jdbcType=TIMESTAMP}, - - status = #{record.status,jdbcType=INTEGER}, + + status = #{row.status,jdbcType=INTEGER}, - - click_count = #{record.clickCount,jdbcType=INTEGER}, + + click_count = #{row.clickCount,jdbcType=INTEGER}, - - order_count = #{record.orderCount,jdbcType=INTEGER}, + + order_count = #{row.orderCount,jdbcType=INTEGER}, - - url = #{record.url,jdbcType=VARCHAR}, + + url = #{row.url,jdbcType=VARCHAR}, - - note = #{record.note,jdbcType=VARCHAR}, + + note = #{row.note,jdbcType=VARCHAR}, - - sort = #{record.sort,jdbcType=INTEGER}, + + sort = #{row.sort,jdbcType=INTEGER}, - + update sms_home_advertise - set id = #{record.id,jdbcType=BIGINT}, - name = #{record.name,jdbcType=VARCHAR}, - type = #{record.type,jdbcType=INTEGER}, - pic = #{record.pic,jdbcType=VARCHAR}, - start_time = #{record.startTime,jdbcType=TIMESTAMP}, - end_time = #{record.endTime,jdbcType=TIMESTAMP}, - status = #{record.status,jdbcType=INTEGER}, - click_count = #{record.clickCount,jdbcType=INTEGER}, - order_count = #{record.orderCount,jdbcType=INTEGER}, - url = #{record.url,jdbcType=VARCHAR}, - note = #{record.note,jdbcType=VARCHAR}, - sort = #{record.sort,jdbcType=INTEGER} - + set id = #{row.id,jdbcType=BIGINT}, + name = #{row.name,jdbcType=VARCHAR}, + type = #{row.type,jdbcType=INTEGER}, + pic = #{row.pic,jdbcType=VARCHAR}, + start_time = #{row.startTime,jdbcType=TIMESTAMP}, + end_time = #{row.endTime,jdbcType=TIMESTAMP}, + status = #{row.status,jdbcType=INTEGER}, + click_count = #{row.clickCount,jdbcType=INTEGER}, + order_count = #{row.orderCount,jdbcType=INTEGER}, + url = #{row.url,jdbcType=VARCHAR}, + note = #{row.note,jdbcType=VARCHAR}, + sort = #{row.sort,jdbcType=INTEGER} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsHomeBrandMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsHomeBrandMapper.xml index 20cb520..92da7d0 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsHomeBrandMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsHomeBrandMapper.xml @@ -151,34 +151,34 @@ update sms_home_brand - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - brand_id = #{record.brandId,jdbcType=BIGINT}, + + brand_id = #{row.brandId,jdbcType=BIGINT}, - - brand_name = #{record.brandName,jdbcType=VARCHAR}, + + brand_name = #{row.brandName,jdbcType=VARCHAR}, - - recommend_status = #{record.recommendStatus,jdbcType=INTEGER}, + + recommend_status = #{row.recommendStatus,jdbcType=INTEGER}, - - sort = #{record.sort,jdbcType=INTEGER}, + + sort = #{row.sort,jdbcType=INTEGER}, - + update sms_home_brand - set id = #{record.id,jdbcType=BIGINT}, - brand_id = #{record.brandId,jdbcType=BIGINT}, - brand_name = #{record.brandName,jdbcType=VARCHAR}, - recommend_status = #{record.recommendStatus,jdbcType=INTEGER}, - sort = #{record.sort,jdbcType=INTEGER} - + set id = #{row.id,jdbcType=BIGINT}, + brand_id = #{row.brandId,jdbcType=BIGINT}, + brand_name = #{row.brandName,jdbcType=VARCHAR}, + recommend_status = #{row.recommendStatus,jdbcType=INTEGER}, + sort = #{row.sort,jdbcType=INTEGER} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsHomeNewProductMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsHomeNewProductMapper.xml index 1a67e33..3f797f0 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsHomeNewProductMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsHomeNewProductMapper.xml @@ -151,34 +151,34 @@ update sms_home_new_product - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - product_id = #{record.productId,jdbcType=BIGINT}, + + product_id = #{row.productId,jdbcType=BIGINT}, - - product_name = #{record.productName,jdbcType=VARCHAR}, + + product_name = #{row.productName,jdbcType=VARCHAR}, - - recommend_status = #{record.recommendStatus,jdbcType=INTEGER}, + + recommend_status = #{row.recommendStatus,jdbcType=INTEGER}, - - sort = #{record.sort,jdbcType=INTEGER}, + + sort = #{row.sort,jdbcType=INTEGER}, - + update sms_home_new_product - set id = #{record.id,jdbcType=BIGINT}, - product_id = #{record.productId,jdbcType=BIGINT}, - product_name = #{record.productName,jdbcType=VARCHAR}, - recommend_status = #{record.recommendStatus,jdbcType=INTEGER}, - sort = #{record.sort,jdbcType=INTEGER} - + set id = #{row.id,jdbcType=BIGINT}, + product_id = #{row.productId,jdbcType=BIGINT}, + product_name = #{row.productName,jdbcType=VARCHAR}, + recommend_status = #{row.recommendStatus,jdbcType=INTEGER}, + sort = #{row.sort,jdbcType=INTEGER} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsHomeRecommendProductMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsHomeRecommendProductMapper.xml index 97cc08d..485e981 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsHomeRecommendProductMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsHomeRecommendProductMapper.xml @@ -151,34 +151,34 @@ update sms_home_recommend_product - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - product_id = #{record.productId,jdbcType=BIGINT}, + + product_id = #{row.productId,jdbcType=BIGINT}, - - product_name = #{record.productName,jdbcType=VARCHAR}, + + product_name = #{row.productName,jdbcType=VARCHAR}, - - recommend_status = #{record.recommendStatus,jdbcType=INTEGER}, + + recommend_status = #{row.recommendStatus,jdbcType=INTEGER}, - - sort = #{record.sort,jdbcType=INTEGER}, + + sort = #{row.sort,jdbcType=INTEGER}, - + update sms_home_recommend_product - set id = #{record.id,jdbcType=BIGINT}, - product_id = #{record.productId,jdbcType=BIGINT}, - product_name = #{record.productName,jdbcType=VARCHAR}, - recommend_status = #{record.recommendStatus,jdbcType=INTEGER}, - sort = #{record.sort,jdbcType=INTEGER} - + set id = #{row.id,jdbcType=BIGINT}, + product_id = #{row.productId,jdbcType=BIGINT}, + product_name = #{row.productName,jdbcType=VARCHAR}, + recommend_status = #{row.recommendStatus,jdbcType=INTEGER}, + sort = #{row.sort,jdbcType=INTEGER} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsHomeRecommendSubjectMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsHomeRecommendSubjectMapper.xml index d64b123..44b1374 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsHomeRecommendSubjectMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/SmsHomeRecommendSubjectMapper.xml @@ -151,34 +151,34 @@ update sms_home_recommend_subject - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - subject_id = #{record.subjectId,jdbcType=BIGINT}, + + subject_id = #{row.subjectId,jdbcType=BIGINT}, - - subject_name = #{record.subjectName,jdbcType=VARCHAR}, + + subject_name = #{row.subjectName,jdbcType=VARCHAR}, - - recommend_status = #{record.recommendStatus,jdbcType=INTEGER}, + + recommend_status = #{row.recommendStatus,jdbcType=INTEGER}, - - sort = #{record.sort,jdbcType=INTEGER}, + + sort = #{row.sort,jdbcType=INTEGER}, - + update sms_home_recommend_subject - set id = #{record.id,jdbcType=BIGINT}, - subject_id = #{record.subjectId,jdbcType=BIGINT}, - subject_name = #{record.subjectName,jdbcType=VARCHAR}, - recommend_status = #{record.recommendStatus,jdbcType=INTEGER}, - sort = #{record.sort,jdbcType=INTEGER} - + set id = #{row.id,jdbcType=BIGINT}, + subject_id = #{row.subjectId,jdbcType=BIGINT}, + subject_name = #{row.subjectName,jdbcType=VARCHAR}, + recommend_status = #{row.recommendStatus,jdbcType=INTEGER}, + sort = #{row.sort,jdbcType=INTEGER} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsAdminLoginLogMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsAdminLoginLogMapper.xml index 33ec6ae..4127b17 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsAdminLoginLogMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsAdminLoginLogMapper.xml @@ -158,38 +158,38 @@ update ums_admin_login_log - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - admin_id = #{record.adminId,jdbcType=BIGINT}, + + admin_id = #{row.adminId,jdbcType=BIGINT}, - - create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + create_time = #{row.createTime,jdbcType=TIMESTAMP}, - - ip = #{record.ip,jdbcType=VARCHAR}, + + ip = #{row.ip,jdbcType=VARCHAR}, - - address = #{record.address,jdbcType=VARCHAR}, + + address = #{row.address,jdbcType=VARCHAR}, - - user_agent = #{record.userAgent,jdbcType=VARCHAR}, + + user_agent = #{row.userAgent,jdbcType=VARCHAR}, - + update ums_admin_login_log - set id = #{record.id,jdbcType=BIGINT}, - admin_id = #{record.adminId,jdbcType=BIGINT}, - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - ip = #{record.ip,jdbcType=VARCHAR}, - address = #{record.address,jdbcType=VARCHAR}, - user_agent = #{record.userAgent,jdbcType=VARCHAR} - + set id = #{row.id,jdbcType=BIGINT}, + admin_id = #{row.adminId,jdbcType=BIGINT}, + create_time = #{row.createTime,jdbcType=TIMESTAMP}, + ip = #{row.ip,jdbcType=VARCHAR}, + address = #{row.address,jdbcType=VARCHAR}, + user_agent = #{row.userAgent,jdbcType=VARCHAR} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsAdminMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsAdminMapper.xml index 54ea3d4..e4b5051 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsAdminMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsAdminMapper.xml @@ -190,54 +190,54 @@ update ums_admin - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - username = #{record.username,jdbcType=VARCHAR}, + + username = #{row.username,jdbcType=VARCHAR}, - - password = #{record.password,jdbcType=VARCHAR}, + + password = #{row.password,jdbcType=VARCHAR}, - - icon = #{record.icon,jdbcType=VARCHAR}, + + icon = #{row.icon,jdbcType=VARCHAR}, - - email = #{record.email,jdbcType=VARCHAR}, + + email = #{row.email,jdbcType=VARCHAR}, - - nick_name = #{record.nickName,jdbcType=VARCHAR}, + + nick_name = #{row.nickName,jdbcType=VARCHAR}, - - note = #{record.note,jdbcType=VARCHAR}, + + note = #{row.note,jdbcType=VARCHAR}, - - create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + create_time = #{row.createTime,jdbcType=TIMESTAMP}, - - login_time = #{record.loginTime,jdbcType=TIMESTAMP}, + + login_time = #{row.loginTime,jdbcType=TIMESTAMP}, - - status = #{record.status,jdbcType=INTEGER}, + + status = #{row.status,jdbcType=INTEGER}, - + update ums_admin - set id = #{record.id,jdbcType=BIGINT}, - username = #{record.username,jdbcType=VARCHAR}, - password = #{record.password,jdbcType=VARCHAR}, - icon = #{record.icon,jdbcType=VARCHAR}, - email = #{record.email,jdbcType=VARCHAR}, - nick_name = #{record.nickName,jdbcType=VARCHAR}, - note = #{record.note,jdbcType=VARCHAR}, - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - login_time = #{record.loginTime,jdbcType=TIMESTAMP}, - status = #{record.status,jdbcType=INTEGER} - + set id = #{row.id,jdbcType=BIGINT}, + username = #{row.username,jdbcType=VARCHAR}, + password = #{row.password,jdbcType=VARCHAR}, + icon = #{row.icon,jdbcType=VARCHAR}, + email = #{row.email,jdbcType=VARCHAR}, + nick_name = #{row.nickName,jdbcType=VARCHAR}, + note = #{row.note,jdbcType=VARCHAR}, + create_time = #{row.createTime,jdbcType=TIMESTAMP}, + login_time = #{row.loginTime,jdbcType=TIMESTAMP}, + status = #{row.status,jdbcType=INTEGER} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsAdminPermissionRelationMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsAdminPermissionRelationMapper.xml index bb33129..4903bc6 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsAdminPermissionRelationMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsAdminPermissionRelationMapper.xml @@ -144,30 +144,30 @@ update ums_admin_permission_relation - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - admin_id = #{record.adminId,jdbcType=BIGINT}, + + admin_id = #{row.adminId,jdbcType=BIGINT}, - - permission_id = #{record.permissionId,jdbcType=BIGINT}, + + permission_id = #{row.permissionId,jdbcType=BIGINT}, - - type = #{record.type,jdbcType=INTEGER}, + + type = #{row.type,jdbcType=INTEGER}, - + update ums_admin_permission_relation - set id = #{record.id,jdbcType=BIGINT}, - admin_id = #{record.adminId,jdbcType=BIGINT}, - permission_id = #{record.permissionId,jdbcType=BIGINT}, - type = #{record.type,jdbcType=INTEGER} - + set id = #{row.id,jdbcType=BIGINT}, + admin_id = #{row.adminId,jdbcType=BIGINT}, + permission_id = #{row.permissionId,jdbcType=BIGINT}, + type = #{row.type,jdbcType=INTEGER} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsAdminRoleRelationMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsAdminRoleRelationMapper.xml index 0da5857..5042d14 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsAdminRoleRelationMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsAdminRoleRelationMapper.xml @@ -135,26 +135,26 @@ update ums_admin_role_relation - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - admin_id = #{record.adminId,jdbcType=BIGINT}, + + admin_id = #{row.adminId,jdbcType=BIGINT}, - - role_id = #{record.roleId,jdbcType=BIGINT}, + + role_id = #{row.roleId,jdbcType=BIGINT}, - + update ums_admin_role_relation - set id = #{record.id,jdbcType=BIGINT}, - admin_id = #{record.adminId,jdbcType=BIGINT}, - role_id = #{record.roleId,jdbcType=BIGINT} - + set id = #{row.id,jdbcType=BIGINT}, + admin_id = #{row.adminId,jdbcType=BIGINT}, + role_id = #{row.roleId,jdbcType=BIGINT} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsGrowthChangeHistoryMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsGrowthChangeHistoryMapper.xml index 8e6942b..91966d8 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsGrowthChangeHistoryMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsGrowthChangeHistoryMapper.xml @@ -175,46 +175,46 @@ update ums_growth_change_history - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - member_id = #{record.memberId,jdbcType=BIGINT}, + + member_id = #{row.memberId,jdbcType=BIGINT}, - - create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + create_time = #{row.createTime,jdbcType=TIMESTAMP}, - - change_type = #{record.changeType,jdbcType=INTEGER}, + + change_type = #{row.changeType,jdbcType=INTEGER}, - - change_count = #{record.changeCount,jdbcType=INTEGER}, + + change_count = #{row.changeCount,jdbcType=INTEGER}, - - operate_man = #{record.operateMan,jdbcType=VARCHAR}, + + operate_man = #{row.operateMan,jdbcType=VARCHAR}, - - operate_note = #{record.operateNote,jdbcType=VARCHAR}, + + operate_note = #{row.operateNote,jdbcType=VARCHAR}, - - source_type = #{record.sourceType,jdbcType=INTEGER}, + + source_type = #{row.sourceType,jdbcType=INTEGER}, - + update ums_growth_change_history - set id = #{record.id,jdbcType=BIGINT}, - member_id = #{record.memberId,jdbcType=BIGINT}, - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - change_type = #{record.changeType,jdbcType=INTEGER}, - change_count = #{record.changeCount,jdbcType=INTEGER}, - operate_man = #{record.operateMan,jdbcType=VARCHAR}, - operate_note = #{record.operateNote,jdbcType=VARCHAR}, - source_type = #{record.sourceType,jdbcType=INTEGER} - + set id = #{row.id,jdbcType=BIGINT}, + member_id = #{row.memberId,jdbcType=BIGINT}, + create_time = #{row.createTime,jdbcType=TIMESTAMP}, + change_type = #{row.changeType,jdbcType=INTEGER}, + change_count = #{row.changeCount,jdbcType=INTEGER}, + operate_man = #{row.operateMan,jdbcType=VARCHAR}, + operate_note = #{row.operateNote,jdbcType=VARCHAR}, + source_type = #{row.sourceType,jdbcType=INTEGER} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsIntegrationChangeHistoryMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsIntegrationChangeHistoryMapper.xml index d0c5bff..8ef9498 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsIntegrationChangeHistoryMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsIntegrationChangeHistoryMapper.xml @@ -175,46 +175,46 @@ update ums_integration_change_history - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - member_id = #{record.memberId,jdbcType=BIGINT}, + + member_id = #{row.memberId,jdbcType=BIGINT}, - - create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + create_time = #{row.createTime,jdbcType=TIMESTAMP}, - - change_type = #{record.changeType,jdbcType=INTEGER}, + + change_type = #{row.changeType,jdbcType=INTEGER}, - - change_count = #{record.changeCount,jdbcType=INTEGER}, + + change_count = #{row.changeCount,jdbcType=INTEGER}, - - operate_man = #{record.operateMan,jdbcType=VARCHAR}, + + operate_man = #{row.operateMan,jdbcType=VARCHAR}, - - operate_note = #{record.operateNote,jdbcType=VARCHAR}, + + operate_note = #{row.operateNote,jdbcType=VARCHAR}, - - source_type = #{record.sourceType,jdbcType=INTEGER}, + + source_type = #{row.sourceType,jdbcType=INTEGER}, - + update ums_integration_change_history - set id = #{record.id,jdbcType=BIGINT}, - member_id = #{record.memberId,jdbcType=BIGINT}, - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - change_type = #{record.changeType,jdbcType=INTEGER}, - change_count = #{record.changeCount,jdbcType=INTEGER}, - operate_man = #{record.operateMan,jdbcType=VARCHAR}, - operate_note = #{record.operateNote,jdbcType=VARCHAR}, - source_type = #{record.sourceType,jdbcType=INTEGER} - + set id = #{row.id,jdbcType=BIGINT}, + member_id = #{row.memberId,jdbcType=BIGINT}, + create_time = #{row.createTime,jdbcType=TIMESTAMP}, + change_type = #{row.changeType,jdbcType=INTEGER}, + change_count = #{row.changeCount,jdbcType=INTEGER}, + operate_man = #{row.operateMan,jdbcType=VARCHAR}, + operate_note = #{row.operateNote,jdbcType=VARCHAR}, + source_type = #{row.sourceType,jdbcType=INTEGER} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsIntegrationConsumeSettingMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsIntegrationConsumeSettingMapper.xml index b6ccb5a..751b19f 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsIntegrationConsumeSettingMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsIntegrationConsumeSettingMapper.xml @@ -151,34 +151,34 @@ update ums_integration_consume_setting - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - deduction_per_amount = #{record.deductionPerAmount,jdbcType=INTEGER}, + + deduction_per_amount = #{row.deductionPerAmount,jdbcType=INTEGER}, - - max_percent_per_order = #{record.maxPercentPerOrder,jdbcType=INTEGER}, + + max_percent_per_order = #{row.maxPercentPerOrder,jdbcType=INTEGER}, - - use_unit = #{record.useUnit,jdbcType=INTEGER}, + + use_unit = #{row.useUnit,jdbcType=INTEGER}, - - coupon_status = #{record.couponStatus,jdbcType=INTEGER}, + + coupon_status = #{row.couponStatus,jdbcType=INTEGER}, - + update ums_integration_consume_setting - set id = #{record.id,jdbcType=BIGINT}, - deduction_per_amount = #{record.deductionPerAmount,jdbcType=INTEGER}, - max_percent_per_order = #{record.maxPercentPerOrder,jdbcType=INTEGER}, - use_unit = #{record.useUnit,jdbcType=INTEGER}, - coupon_status = #{record.couponStatus,jdbcType=INTEGER} - + set id = #{row.id,jdbcType=BIGINT}, + deduction_per_amount = #{row.deductionPerAmount,jdbcType=INTEGER}, + max_percent_per_order = #{row.maxPercentPerOrder,jdbcType=INTEGER}, + use_unit = #{row.useUnit,jdbcType=INTEGER}, + coupon_status = #{row.couponStatus,jdbcType=INTEGER} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberLevelMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberLevelMapper.xml index 8e1933b..0edf8a5 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberLevelMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberLevelMapper.xml @@ -215,66 +215,66 @@ update ums_member_level - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - name = #{record.name,jdbcType=VARCHAR}, + + name = #{row.name,jdbcType=VARCHAR}, - - growth_point = #{record.growthPoint,jdbcType=INTEGER}, + + growth_point = #{row.growthPoint,jdbcType=INTEGER}, - - default_status = #{record.defaultStatus,jdbcType=INTEGER}, + + default_status = #{row.defaultStatus,jdbcType=INTEGER}, - - free_freight_point = #{record.freeFreightPoint,jdbcType=DECIMAL}, + + free_freight_point = #{row.freeFreightPoint,jdbcType=DECIMAL}, - - comment_growth_point = #{record.commentGrowthPoint,jdbcType=INTEGER}, + + comment_growth_point = #{row.commentGrowthPoint,jdbcType=INTEGER}, - - priviledge_free_freight = #{record.priviledgeFreeFreight,jdbcType=INTEGER}, + + priviledge_free_freight = #{row.priviledgeFreeFreight,jdbcType=INTEGER}, - - priviledge_sign_in = #{record.priviledgeSignIn,jdbcType=INTEGER}, + + priviledge_sign_in = #{row.priviledgeSignIn,jdbcType=INTEGER}, - - priviledge_comment = #{record.priviledgeComment,jdbcType=INTEGER}, + + priviledge_comment = #{row.priviledgeComment,jdbcType=INTEGER}, - - priviledge_promotion = #{record.priviledgePromotion,jdbcType=INTEGER}, + + priviledge_promotion = #{row.priviledgePromotion,jdbcType=INTEGER}, - - priviledge_member_price = #{record.priviledgeMemberPrice,jdbcType=INTEGER}, + + priviledge_member_price = #{row.priviledgeMemberPrice,jdbcType=INTEGER}, - - priviledge_birthday = #{record.priviledgeBirthday,jdbcType=INTEGER}, + + priviledge_birthday = #{row.priviledgeBirthday,jdbcType=INTEGER}, - - note = #{record.note,jdbcType=VARCHAR}, + + note = #{row.note,jdbcType=VARCHAR}, - + update ums_member_level - set id = #{record.id,jdbcType=BIGINT}, - name = #{record.name,jdbcType=VARCHAR}, - growth_point = #{record.growthPoint,jdbcType=INTEGER}, - default_status = #{record.defaultStatus,jdbcType=INTEGER}, - free_freight_point = #{record.freeFreightPoint,jdbcType=DECIMAL}, - comment_growth_point = #{record.commentGrowthPoint,jdbcType=INTEGER}, - priviledge_free_freight = #{record.priviledgeFreeFreight,jdbcType=INTEGER}, - priviledge_sign_in = #{record.priviledgeSignIn,jdbcType=INTEGER}, - priviledge_comment = #{record.priviledgeComment,jdbcType=INTEGER}, - priviledge_promotion = #{record.priviledgePromotion,jdbcType=INTEGER}, - priviledge_member_price = #{record.priviledgeMemberPrice,jdbcType=INTEGER}, - priviledge_birthday = #{record.priviledgeBirthday,jdbcType=INTEGER}, - note = #{record.note,jdbcType=VARCHAR} - + set id = #{row.id,jdbcType=BIGINT}, + name = #{row.name,jdbcType=VARCHAR}, + growth_point = #{row.growthPoint,jdbcType=INTEGER}, + default_status = #{row.defaultStatus,jdbcType=INTEGER}, + free_freight_point = #{row.freeFreightPoint,jdbcType=DECIMAL}, + comment_growth_point = #{row.commentGrowthPoint,jdbcType=INTEGER}, + priviledge_free_freight = #{row.priviledgeFreeFreight,jdbcType=INTEGER}, + priviledge_sign_in = #{row.priviledgeSignIn,jdbcType=INTEGER}, + priviledge_comment = #{row.priviledgeComment,jdbcType=INTEGER}, + priviledge_promotion = #{row.priviledgePromotion,jdbcType=INTEGER}, + priviledge_member_price = #{row.priviledgeMemberPrice,jdbcType=INTEGER}, + priviledge_birthday = #{row.priviledgeBirthday,jdbcType=INTEGER}, + note = #{row.note,jdbcType=VARCHAR} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberLoginLogMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberLoginLogMapper.xml index dd47812..730b6ec 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberLoginLogMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberLoginLogMapper.xml @@ -167,42 +167,42 @@ update ums_member_login_log - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - member_id = #{record.memberId,jdbcType=BIGINT}, + + member_id = #{row.memberId,jdbcType=BIGINT}, - - create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + create_time = #{row.createTime,jdbcType=TIMESTAMP}, - - ip = #{record.ip,jdbcType=VARCHAR}, + + ip = #{row.ip,jdbcType=VARCHAR}, - - city = #{record.city,jdbcType=VARCHAR}, + + city = #{row.city,jdbcType=VARCHAR}, - - login_type = #{record.loginType,jdbcType=INTEGER}, + + login_type = #{row.loginType,jdbcType=INTEGER}, - - province = #{record.province,jdbcType=VARCHAR}, + + province = #{row.province,jdbcType=VARCHAR}, - + update ums_member_login_log - set id = #{record.id,jdbcType=BIGINT}, - member_id = #{record.memberId,jdbcType=BIGINT}, - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - ip = #{record.ip,jdbcType=VARCHAR}, - city = #{record.city,jdbcType=VARCHAR}, - login_type = #{record.loginType,jdbcType=INTEGER}, - province = #{record.province,jdbcType=VARCHAR} - + set id = #{row.id,jdbcType=BIGINT}, + member_id = #{row.memberId,jdbcType=BIGINT}, + create_time = #{row.createTime,jdbcType=TIMESTAMP}, + ip = #{row.ip,jdbcType=VARCHAR}, + city = #{row.city,jdbcType=VARCHAR}, + login_type = #{row.loginType,jdbcType=INTEGER}, + province = #{row.province,jdbcType=VARCHAR} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberMapper.xml index 72d5c12..69483c1 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberMapper.xml @@ -259,90 +259,90 @@ update ums_member - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - member_level_id = #{record.memberLevelId,jdbcType=BIGINT}, + + member_level_id = #{row.memberLevelId,jdbcType=BIGINT}, - - username = #{record.username,jdbcType=VARCHAR}, + + username = #{row.username,jdbcType=VARCHAR}, - - password = #{record.password,jdbcType=VARCHAR}, + + password = #{row.password,jdbcType=VARCHAR}, - - nickname = #{record.nickname,jdbcType=VARCHAR}, + + nickname = #{row.nickname,jdbcType=VARCHAR}, - - phone = #{record.phone,jdbcType=VARCHAR}, + + phone = #{row.phone,jdbcType=VARCHAR}, - - status = #{record.status,jdbcType=INTEGER}, + + status = #{row.status,jdbcType=INTEGER}, - - create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + create_time = #{row.createTime,jdbcType=TIMESTAMP}, - - icon = #{record.icon,jdbcType=VARCHAR}, + + icon = #{row.icon,jdbcType=VARCHAR}, - - gender = #{record.gender,jdbcType=INTEGER}, + + gender = #{row.gender,jdbcType=INTEGER}, - - birthday = #{record.birthday,jdbcType=DATE}, + + birthday = #{row.birthday,jdbcType=DATE}, - - city = #{record.city,jdbcType=VARCHAR}, + + city = #{row.city,jdbcType=VARCHAR}, - - job = #{record.job,jdbcType=VARCHAR}, + + job = #{row.job,jdbcType=VARCHAR}, - - personalized_signature = #{record.personalizedSignature,jdbcType=VARCHAR}, + + personalized_signature = #{row.personalizedSignature,jdbcType=VARCHAR}, - - source_type = #{record.sourceType,jdbcType=INTEGER}, + + source_type = #{row.sourceType,jdbcType=INTEGER}, - - integration = #{record.integration,jdbcType=INTEGER}, + + integration = #{row.integration,jdbcType=INTEGER}, - - growth = #{record.growth,jdbcType=INTEGER}, + + growth = #{row.growth,jdbcType=INTEGER}, - - luckey_count = #{record.luckeyCount,jdbcType=INTEGER}, + + luckey_count = #{row.luckeyCount,jdbcType=INTEGER}, - - history_integration = #{record.historyIntegration,jdbcType=INTEGER}, + + history_integration = #{row.historyIntegration,jdbcType=INTEGER}, - + update ums_member - set id = #{record.id,jdbcType=BIGINT}, - member_level_id = #{record.memberLevelId,jdbcType=BIGINT}, - username = #{record.username,jdbcType=VARCHAR}, - password = #{record.password,jdbcType=VARCHAR}, - nickname = #{record.nickname,jdbcType=VARCHAR}, - phone = #{record.phone,jdbcType=VARCHAR}, - status = #{record.status,jdbcType=INTEGER}, - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - icon = #{record.icon,jdbcType=VARCHAR}, - gender = #{record.gender,jdbcType=INTEGER}, - birthday = #{record.birthday,jdbcType=DATE}, - city = #{record.city,jdbcType=VARCHAR}, - job = #{record.job,jdbcType=VARCHAR}, - personalized_signature = #{record.personalizedSignature,jdbcType=VARCHAR}, - source_type = #{record.sourceType,jdbcType=INTEGER}, - integration = #{record.integration,jdbcType=INTEGER}, - growth = #{record.growth,jdbcType=INTEGER}, - luckey_count = #{record.luckeyCount,jdbcType=INTEGER}, - history_integration = #{record.historyIntegration,jdbcType=INTEGER} - + set id = #{row.id,jdbcType=BIGINT}, + member_level_id = #{row.memberLevelId,jdbcType=BIGINT}, + username = #{row.username,jdbcType=VARCHAR}, + password = #{row.password,jdbcType=VARCHAR}, + nickname = #{row.nickname,jdbcType=VARCHAR}, + phone = #{row.phone,jdbcType=VARCHAR}, + status = #{row.status,jdbcType=INTEGER}, + create_time = #{row.createTime,jdbcType=TIMESTAMP}, + icon = #{row.icon,jdbcType=VARCHAR}, + gender = #{row.gender,jdbcType=INTEGER}, + birthday = #{row.birthday,jdbcType=DATE}, + city = #{row.city,jdbcType=VARCHAR}, + job = #{row.job,jdbcType=VARCHAR}, + personalized_signature = #{row.personalizedSignature,jdbcType=VARCHAR}, + source_type = #{row.sourceType,jdbcType=INTEGER}, + integration = #{row.integration,jdbcType=INTEGER}, + growth = #{row.growth,jdbcType=INTEGER}, + luckey_count = #{row.luckeyCount,jdbcType=INTEGER}, + history_integration = #{row.historyIntegration,jdbcType=INTEGER} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberMemberTagRelationMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberMemberTagRelationMapper.xml index c125f4c..0a40cda 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberMemberTagRelationMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberMemberTagRelationMapper.xml @@ -135,26 +135,26 @@ update ums_member_member_tag_relation - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - member_id = #{record.memberId,jdbcType=BIGINT}, + + member_id = #{row.memberId,jdbcType=BIGINT}, - - tag_id = #{record.tagId,jdbcType=BIGINT}, + + tag_id = #{row.tagId,jdbcType=BIGINT}, - + update ums_member_member_tag_relation - set id = #{record.id,jdbcType=BIGINT}, - member_id = #{record.memberId,jdbcType=BIGINT}, - tag_id = #{record.tagId,jdbcType=BIGINT} - + set id = #{row.id,jdbcType=BIGINT}, + member_id = #{row.memberId,jdbcType=BIGINT}, + tag_id = #{row.tagId,jdbcType=BIGINT} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberProductCategoryRelationMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberProductCategoryRelationMapper.xml index 6aba472..31cf001 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberProductCategoryRelationMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberProductCategoryRelationMapper.xml @@ -135,26 +135,26 @@ update ums_member_product_category_relation - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - member_id = #{record.memberId,jdbcType=BIGINT}, + + member_id = #{row.memberId,jdbcType=BIGINT}, - - product_category_id = #{record.productCategoryId,jdbcType=BIGINT}, + + product_category_id = #{row.productCategoryId,jdbcType=BIGINT}, - + update ums_member_product_category_relation - set id = #{record.id,jdbcType=BIGINT}, - member_id = #{record.memberId,jdbcType=BIGINT}, - product_category_id = #{record.productCategoryId,jdbcType=BIGINT} - + set id = #{row.id,jdbcType=BIGINT}, + member_id = #{row.memberId,jdbcType=BIGINT}, + product_category_id = #{row.productCategoryId,jdbcType=BIGINT} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberReceiveAddressMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberReceiveAddressMapper.xml index 09d23c2..96ab4d7 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberReceiveAddressMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberReceiveAddressMapper.xml @@ -191,54 +191,54 @@ update ums_member_receive_address - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - member_id = #{record.memberId,jdbcType=BIGINT}, + + member_id = #{row.memberId,jdbcType=BIGINT}, - - name = #{record.name,jdbcType=VARCHAR}, + + name = #{row.name,jdbcType=VARCHAR}, - - phone_number = #{record.phoneNumber,jdbcType=VARCHAR}, + + phone_number = #{row.phoneNumber,jdbcType=VARCHAR}, - - default_status = #{record.defaultStatus,jdbcType=INTEGER}, + + default_status = #{row.defaultStatus,jdbcType=INTEGER}, - - post_code = #{record.postCode,jdbcType=VARCHAR}, + + post_code = #{row.postCode,jdbcType=VARCHAR}, - - province = #{record.province,jdbcType=VARCHAR}, + + province = #{row.province,jdbcType=VARCHAR}, - - city = #{record.city,jdbcType=VARCHAR}, + + city = #{row.city,jdbcType=VARCHAR}, - - region = #{record.region,jdbcType=VARCHAR}, + + region = #{row.region,jdbcType=VARCHAR}, - - detail_address = #{record.detailAddress,jdbcType=VARCHAR}, + + detail_address = #{row.detailAddress,jdbcType=VARCHAR}, - + update ums_member_receive_address - set id = #{record.id,jdbcType=BIGINT}, - member_id = #{record.memberId,jdbcType=BIGINT}, - name = #{record.name,jdbcType=VARCHAR}, - phone_number = #{record.phoneNumber,jdbcType=VARCHAR}, - default_status = #{record.defaultStatus,jdbcType=INTEGER}, - post_code = #{record.postCode,jdbcType=VARCHAR}, - province = #{record.province,jdbcType=VARCHAR}, - city = #{record.city,jdbcType=VARCHAR}, - region = #{record.region,jdbcType=VARCHAR}, - detail_address = #{record.detailAddress,jdbcType=VARCHAR} - + set id = #{row.id,jdbcType=BIGINT}, + member_id = #{row.memberId,jdbcType=BIGINT}, + name = #{row.name,jdbcType=VARCHAR}, + phone_number = #{row.phoneNumber,jdbcType=VARCHAR}, + default_status = #{row.defaultStatus,jdbcType=INTEGER}, + post_code = #{row.postCode,jdbcType=VARCHAR}, + province = #{row.province,jdbcType=VARCHAR}, + city = #{row.city,jdbcType=VARCHAR}, + region = #{row.region,jdbcType=VARCHAR}, + detail_address = #{row.detailAddress,jdbcType=VARCHAR} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberRuleSettingMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberRuleSettingMapper.xml index cd185b5..5620350 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberRuleSettingMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberRuleSettingMapper.xml @@ -168,42 +168,42 @@ update ums_member_rule_setting - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - continue_sign_day = #{record.continueSignDay,jdbcType=INTEGER}, + + continue_sign_day = #{row.continueSignDay,jdbcType=INTEGER}, - - continue_sign_point = #{record.continueSignPoint,jdbcType=INTEGER}, + + continue_sign_point = #{row.continueSignPoint,jdbcType=INTEGER}, - - consume_per_point = #{record.consumePerPoint,jdbcType=DECIMAL}, + + consume_per_point = #{row.consumePerPoint,jdbcType=DECIMAL}, - - low_order_amount = #{record.lowOrderAmount,jdbcType=DECIMAL}, + + low_order_amount = #{row.lowOrderAmount,jdbcType=DECIMAL}, - - max_point_per_order = #{record.maxPointPerOrder,jdbcType=INTEGER}, + + max_point_per_order = #{row.maxPointPerOrder,jdbcType=INTEGER}, - - type = #{record.type,jdbcType=INTEGER}, + + type = #{row.type,jdbcType=INTEGER}, - + update ums_member_rule_setting - set id = #{record.id,jdbcType=BIGINT}, - continue_sign_day = #{record.continueSignDay,jdbcType=INTEGER}, - continue_sign_point = #{record.continueSignPoint,jdbcType=INTEGER}, - consume_per_point = #{record.consumePerPoint,jdbcType=DECIMAL}, - low_order_amount = #{record.lowOrderAmount,jdbcType=DECIMAL}, - max_point_per_order = #{record.maxPointPerOrder,jdbcType=INTEGER}, - type = #{record.type,jdbcType=INTEGER} - + set id = #{row.id,jdbcType=BIGINT}, + continue_sign_day = #{row.continueSignDay,jdbcType=INTEGER}, + continue_sign_point = #{row.continueSignPoint,jdbcType=INTEGER}, + consume_per_point = #{row.consumePerPoint,jdbcType=DECIMAL}, + low_order_amount = #{row.lowOrderAmount,jdbcType=DECIMAL}, + max_point_per_order = #{row.maxPointPerOrder,jdbcType=INTEGER}, + type = #{row.type,jdbcType=INTEGER} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberStatisticsInfoMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberStatisticsInfoMapper.xml index a5733a4..2bff02e 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberStatisticsInfoMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberStatisticsInfoMapper.xml @@ -238,78 +238,78 @@ update ums_member_statistics_info - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - member_id = #{record.memberId,jdbcType=BIGINT}, + + member_id = #{row.memberId,jdbcType=BIGINT}, - - consume_amount = #{record.consumeAmount,jdbcType=DECIMAL}, + + consume_amount = #{row.consumeAmount,jdbcType=DECIMAL}, - - order_count = #{record.orderCount,jdbcType=INTEGER}, + + order_count = #{row.orderCount,jdbcType=INTEGER}, - - coupon_count = #{record.couponCount,jdbcType=INTEGER}, + + coupon_count = #{row.couponCount,jdbcType=INTEGER}, - - comment_count = #{record.commentCount,jdbcType=INTEGER}, + + comment_count = #{row.commentCount,jdbcType=INTEGER}, - - return_order_count = #{record.returnOrderCount,jdbcType=INTEGER}, + + return_order_count = #{row.returnOrderCount,jdbcType=INTEGER}, - - login_count = #{record.loginCount,jdbcType=INTEGER}, + + login_count = #{row.loginCount,jdbcType=INTEGER}, - - attend_count = #{record.attendCount,jdbcType=INTEGER}, + + attend_count = #{row.attendCount,jdbcType=INTEGER}, - - fans_count = #{record.fansCount,jdbcType=INTEGER}, + + fans_count = #{row.fansCount,jdbcType=INTEGER}, - - collect_product_count = #{record.collectProductCount,jdbcType=INTEGER}, + + collect_product_count = #{row.collectProductCount,jdbcType=INTEGER}, - - collect_subject_count = #{record.collectSubjectCount,jdbcType=INTEGER}, + + collect_subject_count = #{row.collectSubjectCount,jdbcType=INTEGER}, - - collect_topic_count = #{record.collectTopicCount,jdbcType=INTEGER}, + + collect_topic_count = #{row.collectTopicCount,jdbcType=INTEGER}, - - collect_comment_count = #{record.collectCommentCount,jdbcType=INTEGER}, + + collect_comment_count = #{row.collectCommentCount,jdbcType=INTEGER}, - - invite_friend_count = #{record.inviteFriendCount,jdbcType=INTEGER}, + + invite_friend_count = #{row.inviteFriendCount,jdbcType=INTEGER}, - - recent_order_time = #{record.recentOrderTime,jdbcType=TIMESTAMP}, + + recent_order_time = #{row.recentOrderTime,jdbcType=TIMESTAMP}, - + update ums_member_statistics_info - set id = #{record.id,jdbcType=BIGINT}, - member_id = #{record.memberId,jdbcType=BIGINT}, - consume_amount = #{record.consumeAmount,jdbcType=DECIMAL}, - order_count = #{record.orderCount,jdbcType=INTEGER}, - coupon_count = #{record.couponCount,jdbcType=INTEGER}, - comment_count = #{record.commentCount,jdbcType=INTEGER}, - return_order_count = #{record.returnOrderCount,jdbcType=INTEGER}, - login_count = #{record.loginCount,jdbcType=INTEGER}, - attend_count = #{record.attendCount,jdbcType=INTEGER}, - fans_count = #{record.fansCount,jdbcType=INTEGER}, - collect_product_count = #{record.collectProductCount,jdbcType=INTEGER}, - collect_subject_count = #{record.collectSubjectCount,jdbcType=INTEGER}, - collect_topic_count = #{record.collectTopicCount,jdbcType=INTEGER}, - collect_comment_count = #{record.collectCommentCount,jdbcType=INTEGER}, - invite_friend_count = #{record.inviteFriendCount,jdbcType=INTEGER}, - recent_order_time = #{record.recentOrderTime,jdbcType=TIMESTAMP} - + set id = #{row.id,jdbcType=BIGINT}, + member_id = #{row.memberId,jdbcType=BIGINT}, + consume_amount = #{row.consumeAmount,jdbcType=DECIMAL}, + order_count = #{row.orderCount,jdbcType=INTEGER}, + coupon_count = #{row.couponCount,jdbcType=INTEGER}, + comment_count = #{row.commentCount,jdbcType=INTEGER}, + return_order_count = #{row.returnOrderCount,jdbcType=INTEGER}, + login_count = #{row.loginCount,jdbcType=INTEGER}, + attend_count = #{row.attendCount,jdbcType=INTEGER}, + fans_count = #{row.fansCount,jdbcType=INTEGER}, + collect_product_count = #{row.collectProductCount,jdbcType=INTEGER}, + collect_subject_count = #{row.collectSubjectCount,jdbcType=INTEGER}, + collect_topic_count = #{row.collectTopicCount,jdbcType=INTEGER}, + collect_comment_count = #{row.collectCommentCount,jdbcType=INTEGER}, + invite_friend_count = #{row.inviteFriendCount,jdbcType=INTEGER}, + recent_order_time = #{row.recentOrderTime,jdbcType=TIMESTAMP} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberTagMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberTagMapper.xml index 085675b..03a112c 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberTagMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberTagMapper.xml @@ -144,30 +144,30 @@ update ums_member_tag - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - name = #{record.name,jdbcType=VARCHAR}, + + name = #{row.name,jdbcType=VARCHAR}, - - finish_order_count = #{record.finishOrderCount,jdbcType=INTEGER}, + + finish_order_count = #{row.finishOrderCount,jdbcType=INTEGER}, - - finish_order_amount = #{record.finishOrderAmount,jdbcType=DECIMAL}, + + finish_order_amount = #{row.finishOrderAmount,jdbcType=DECIMAL}, - + update ums_member_tag - set id = #{record.id,jdbcType=BIGINT}, - name = #{record.name,jdbcType=VARCHAR}, - finish_order_count = #{record.finishOrderCount,jdbcType=INTEGER}, - finish_order_amount = #{record.finishOrderAmount,jdbcType=DECIMAL} - + set id = #{row.id,jdbcType=BIGINT}, + name = #{row.name,jdbcType=VARCHAR}, + finish_order_count = #{row.finishOrderCount,jdbcType=INTEGER}, + finish_order_amount = #{row.finishOrderAmount,jdbcType=DECIMAL} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberTaskMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberTaskMapper.xml index 2e661a9..58e1fb2 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberTaskMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberTaskMapper.xml @@ -151,34 +151,34 @@ update ums_member_task - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - name = #{record.name,jdbcType=VARCHAR}, + + name = #{row.name,jdbcType=VARCHAR}, - - growth = #{record.growth,jdbcType=INTEGER}, + + growth = #{row.growth,jdbcType=INTEGER}, - - intergration = #{record.intergration,jdbcType=INTEGER}, + + intergration = #{row.intergration,jdbcType=INTEGER}, - - type = #{record.type,jdbcType=INTEGER}, + + type = #{row.type,jdbcType=INTEGER}, - + update ums_member_task - set id = #{record.id,jdbcType=BIGINT}, - name = #{record.name,jdbcType=VARCHAR}, - growth = #{record.growth,jdbcType=INTEGER}, - intergration = #{record.intergration,jdbcType=INTEGER}, - type = #{record.type,jdbcType=INTEGER} - + set id = #{row.id,jdbcType=BIGINT}, + name = #{row.name,jdbcType=VARCHAR}, + growth = #{row.growth,jdbcType=INTEGER}, + intergration = #{row.intergration,jdbcType=INTEGER}, + type = #{row.type,jdbcType=INTEGER} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMenuMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMenuMapper.xml index 7828f7f..449fe37 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMenuMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMenuMapper.xml @@ -181,50 +181,50 @@ update ums_menu - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - parent_id = #{record.parentId,jdbcType=BIGINT}, + + parent_id = #{row.parentId,jdbcType=BIGINT}, - - create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + create_time = #{row.createTime,jdbcType=TIMESTAMP}, - - title = #{record.title,jdbcType=VARCHAR}, + + title = #{row.title,jdbcType=VARCHAR}, - - level = #{record.level,jdbcType=INTEGER}, + + level = #{row.level,jdbcType=INTEGER}, - - sort = #{record.sort,jdbcType=INTEGER}, + + sort = #{row.sort,jdbcType=INTEGER}, - - name = #{record.name,jdbcType=VARCHAR}, + + name = #{row.name,jdbcType=VARCHAR}, - - icon = #{record.icon,jdbcType=VARCHAR}, + + icon = #{row.icon,jdbcType=VARCHAR}, - - hidden = #{record.hidden,jdbcType=INTEGER}, + + hidden = #{row.hidden,jdbcType=INTEGER}, - + update ums_menu - set id = #{record.id,jdbcType=BIGINT}, - parent_id = #{record.parentId,jdbcType=BIGINT}, - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - title = #{record.title,jdbcType=VARCHAR}, - level = #{record.level,jdbcType=INTEGER}, - sort = #{record.sort,jdbcType=INTEGER}, - name = #{record.name,jdbcType=VARCHAR}, - icon = #{record.icon,jdbcType=VARCHAR}, - hidden = #{record.hidden,jdbcType=INTEGER} - + set id = #{row.id,jdbcType=BIGINT}, + parent_id = #{row.parentId,jdbcType=BIGINT}, + create_time = #{row.createTime,jdbcType=TIMESTAMP}, + title = #{row.title,jdbcType=VARCHAR}, + level = #{row.level,jdbcType=INTEGER}, + sort = #{row.sort,jdbcType=INTEGER}, + name = #{row.name,jdbcType=VARCHAR}, + icon = #{row.icon,jdbcType=VARCHAR}, + hidden = #{row.hidden,jdbcType=INTEGER} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsPermissionMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsPermissionMapper.xml index 7f3c41a..f459906 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsPermissionMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsPermissionMapper.xml @@ -188,54 +188,54 @@ update ums_permission - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - pid = #{record.pid,jdbcType=BIGINT}, + + pid = #{row.pid,jdbcType=BIGINT}, - - name = #{record.name,jdbcType=VARCHAR}, + + name = #{row.name,jdbcType=VARCHAR}, - - value = #{record.value,jdbcType=VARCHAR}, + + value = #{row.value,jdbcType=VARCHAR}, - - icon = #{record.icon,jdbcType=VARCHAR}, + + icon = #{row.icon,jdbcType=VARCHAR}, - - type = #{record.type,jdbcType=INTEGER}, + + type = #{row.type,jdbcType=INTEGER}, - - uri = #{record.uri,jdbcType=VARCHAR}, + + uri = #{row.uri,jdbcType=VARCHAR}, - - status = #{record.status,jdbcType=INTEGER}, + + status = #{row.status,jdbcType=INTEGER}, - - create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + create_time = #{row.createTime,jdbcType=TIMESTAMP}, - - sort = #{record.sort,jdbcType=INTEGER}, + + sort = #{row.sort,jdbcType=INTEGER}, - + update ums_permission - set id = #{record.id,jdbcType=BIGINT}, - pid = #{record.pid,jdbcType=BIGINT}, - name = #{record.name,jdbcType=VARCHAR}, - value = #{record.value,jdbcType=VARCHAR}, - icon = #{record.icon,jdbcType=VARCHAR}, - type = #{record.type,jdbcType=INTEGER}, - uri = #{record.uri,jdbcType=VARCHAR}, - status = #{record.status,jdbcType=INTEGER}, - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - sort = #{record.sort,jdbcType=INTEGER} - + set id = #{row.id,jdbcType=BIGINT}, + pid = #{row.pid,jdbcType=BIGINT}, + name = #{row.name,jdbcType=VARCHAR}, + value = #{row.value,jdbcType=VARCHAR}, + icon = #{row.icon,jdbcType=VARCHAR}, + type = #{row.type,jdbcType=INTEGER}, + uri = #{row.uri,jdbcType=VARCHAR}, + status = #{row.status,jdbcType=INTEGER}, + create_time = #{row.createTime,jdbcType=TIMESTAMP}, + sort = #{row.sort,jdbcType=INTEGER} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsResourceCategoryMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsResourceCategoryMapper.xml index 58cb392..35fa23b 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsResourceCategoryMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsResourceCategoryMapper.xml @@ -144,30 +144,30 @@ update ums_resource_category - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + create_time = #{row.createTime,jdbcType=TIMESTAMP}, - - name = #{record.name,jdbcType=VARCHAR}, + + name = #{row.name,jdbcType=VARCHAR}, - - sort = #{record.sort,jdbcType=INTEGER}, + + sort = #{row.sort,jdbcType=INTEGER}, - + update ums_resource_category - set id = #{record.id,jdbcType=BIGINT}, - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - name = #{record.name,jdbcType=VARCHAR}, - sort = #{record.sort,jdbcType=INTEGER} - + set id = #{row.id,jdbcType=BIGINT}, + create_time = #{row.createTime,jdbcType=TIMESTAMP}, + name = #{row.name,jdbcType=VARCHAR}, + sort = #{row.sort,jdbcType=INTEGER} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsResourceMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsResourceMapper.xml index 9035288..ef8fee6 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsResourceMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsResourceMapper.xml @@ -158,38 +158,38 @@ update ums_resource - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + create_time = #{row.createTime,jdbcType=TIMESTAMP}, - - name = #{record.name,jdbcType=VARCHAR}, + + name = #{row.name,jdbcType=VARCHAR}, - - url = #{record.url,jdbcType=VARCHAR}, + + url = #{row.url,jdbcType=VARCHAR}, - - description = #{record.description,jdbcType=VARCHAR}, + + description = #{row.description,jdbcType=VARCHAR}, - - category_id = #{record.categoryId,jdbcType=BIGINT}, + + category_id = #{row.categoryId,jdbcType=BIGINT}, - + update ums_resource - set id = #{record.id,jdbcType=BIGINT}, - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - name = #{record.name,jdbcType=VARCHAR}, - url = #{record.url,jdbcType=VARCHAR}, - description = #{record.description,jdbcType=VARCHAR}, - category_id = #{record.categoryId,jdbcType=BIGINT} - + set id = #{row.id,jdbcType=BIGINT}, + create_time = #{row.createTime,jdbcType=TIMESTAMP}, + name = #{row.name,jdbcType=VARCHAR}, + url = #{row.url,jdbcType=VARCHAR}, + description = #{row.description,jdbcType=VARCHAR}, + category_id = #{row.categoryId,jdbcType=BIGINT} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsRoleMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsRoleMapper.xml index dffd168..62a0714 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsRoleMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsRoleMapper.xml @@ -167,42 +167,42 @@ update ums_role - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - name = #{record.name,jdbcType=VARCHAR}, + + name = #{row.name,jdbcType=VARCHAR}, - - description = #{record.description,jdbcType=VARCHAR}, + + description = #{row.description,jdbcType=VARCHAR}, - - admin_count = #{record.adminCount,jdbcType=INTEGER}, + + admin_count = #{row.adminCount,jdbcType=INTEGER}, - - create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + create_time = #{row.createTime,jdbcType=TIMESTAMP}, - - status = #{record.status,jdbcType=INTEGER}, + + status = #{row.status,jdbcType=INTEGER}, - - sort = #{record.sort,jdbcType=INTEGER}, + + sort = #{row.sort,jdbcType=INTEGER}, - + update ums_role - set id = #{record.id,jdbcType=BIGINT}, - name = #{record.name,jdbcType=VARCHAR}, - description = #{record.description,jdbcType=VARCHAR}, - admin_count = #{record.adminCount,jdbcType=INTEGER}, - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - status = #{record.status,jdbcType=INTEGER}, - sort = #{record.sort,jdbcType=INTEGER} - + set id = #{row.id,jdbcType=BIGINT}, + name = #{row.name,jdbcType=VARCHAR}, + description = #{row.description,jdbcType=VARCHAR}, + admin_count = #{row.adminCount,jdbcType=INTEGER}, + create_time = #{row.createTime,jdbcType=TIMESTAMP}, + status = #{row.status,jdbcType=INTEGER}, + sort = #{row.sort,jdbcType=INTEGER} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsRoleMenuRelationMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsRoleMenuRelationMapper.xml index 06e2d5c..7b3619a 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsRoleMenuRelationMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsRoleMenuRelationMapper.xml @@ -135,26 +135,26 @@ update ums_role_menu_relation - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - role_id = #{record.roleId,jdbcType=BIGINT}, + + role_id = #{row.roleId,jdbcType=BIGINT}, - - menu_id = #{record.menuId,jdbcType=BIGINT}, + + menu_id = #{row.menuId,jdbcType=BIGINT}, - + update ums_role_menu_relation - set id = #{record.id,jdbcType=BIGINT}, - role_id = #{record.roleId,jdbcType=BIGINT}, - menu_id = #{record.menuId,jdbcType=BIGINT} - + set id = #{row.id,jdbcType=BIGINT}, + role_id = #{row.roleId,jdbcType=BIGINT}, + menu_id = #{row.menuId,jdbcType=BIGINT} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsRolePermissionRelationMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsRolePermissionRelationMapper.xml index 72a4eb9..bae6714 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsRolePermissionRelationMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsRolePermissionRelationMapper.xml @@ -135,26 +135,26 @@ update ums_role_permission_relation - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - role_id = #{record.roleId,jdbcType=BIGINT}, + + role_id = #{row.roleId,jdbcType=BIGINT}, - - permission_id = #{record.permissionId,jdbcType=BIGINT}, + + permission_id = #{row.permissionId,jdbcType=BIGINT}, - + update ums_role_permission_relation - set id = #{record.id,jdbcType=BIGINT}, - role_id = #{record.roleId,jdbcType=BIGINT}, - permission_id = #{record.permissionId,jdbcType=BIGINT} - + set id = #{row.id,jdbcType=BIGINT}, + role_id = #{row.roleId,jdbcType=BIGINT}, + permission_id = #{row.permissionId,jdbcType=BIGINT} + diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsRoleResourceRelationMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsRoleResourceRelationMapper.xml index 4a6b30a..3f05637 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsRoleResourceRelationMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/UmsRoleResourceRelationMapper.xml @@ -135,26 +135,26 @@ update ums_role_resource_relation - - id = #{record.id,jdbcType=BIGINT}, + + id = #{row.id,jdbcType=BIGINT}, - - role_id = #{record.roleId,jdbcType=BIGINT}, + + role_id = #{row.roleId,jdbcType=BIGINT}, - - resource_id = #{record.resourceId,jdbcType=BIGINT}, + + resource_id = #{row.resourceId,jdbcType=BIGINT}, - + update ums_role_resource_relation - set id = #{record.id,jdbcType=BIGINT}, - role_id = #{record.roleId,jdbcType=BIGINT}, - resource_id = #{record.resourceId,jdbcType=BIGINT} - + set id = #{row.id,jdbcType=BIGINT}, + role_id = #{row.roleId,jdbcType=BIGINT}, + resource_id = #{row.resourceId,jdbcType=BIGINT} + diff --git a/mall-monitor/src/main/java/com/macro/mall/config/SecuritySecureConfig.java b/mall-monitor/src/main/java/com/macro/mall/config/SecuritySecureConfig.java index c8f1ac3..5295704 100644 --- a/mall-monitor/src/main/java/com/macro/mall/config/SecuritySecureConfig.java +++ b/mall-monitor/src/main/java/com/macro/mall/config/SecuritySecureConfig.java @@ -1,48 +1,91 @@ package com.macro.mall.config; +import com.macro.mall.filter.CustomCsrfFilter; import de.codecentric.boot.admin.server.config.AdminServerProperties; +import jakarta.servlet.DispatcherType; +import org.springframework.boot.autoconfigure.security.SecurityProperties; +import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; -import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; +import org.springframework.security.core.userdetails.User; +import org.springframework.security.core.userdetails.UserDetails; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import org.springframework.security.crypto.password.PasswordEncoder; +import org.springframework.security.provisioning.InMemoryUserDetailsManager; +import org.springframework.security.web.SecurityFilterChain; import org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler; +import org.springframework.security.web.authentication.www.BasicAuthenticationFilter; import org.springframework.security.web.csrf.CookieCsrfTokenRepository; +import org.springframework.security.web.csrf.CsrfTokenRequestAttributeHandler; +import org.springframework.security.web.util.matcher.AntPathRequestMatcher; + +import java.util.UUID; /** - * SpringSecurity相关配置 - * Created by macro on 2019/9/30. + * @auther macrozheng + * @description Spring Boot Admin的Security相关配置 + * @date 2024/1/16 + * @github https://github.com/macrozheng */ -@Configuration -public class SecuritySecureConfig extends WebSecurityConfigurerAdapter { - private final String adminContextPath; +@Configuration(proxyBeanMethods = false) +public class SecuritySecureConfig { - public SecuritySecureConfig(AdminServerProperties adminServerProperties) { - this.adminContextPath = adminServerProperties.getContextPath(); + private final AdminServerProperties adminServer; + + private final SecurityProperties security; + + public SecuritySecureConfig(AdminServerProperties adminServer, SecurityProperties security) { + this.adminServer = adminServer; + this.security = security; } - @Override - protected void configure(HttpSecurity http) throws Exception { + @Bean + protected SecurityFilterChain filterChain(HttpSecurity http) throws Exception { SavedRequestAwareAuthenticationSuccessHandler successHandler = new SavedRequestAwareAuthenticationSuccessHandler(); successHandler.setTargetUrlParameter("redirectTo"); - successHandler.setDefaultTargetUrl(adminContextPath + "/"); - - http.authorizeRequests() - //1.配置所有静态资源和登录页可以公开访问 - .antMatchers(adminContextPath + "/assets/**").permitAll() - .antMatchers(adminContextPath + "/login").permitAll() - .anyRequest().authenticated() - .and() - //2.配置登录和登出路径 - .formLogin().loginPage(adminContextPath + "/login").successHandler(successHandler).and() - .logout().logoutUrl(adminContextPath + "/logout").and() - //3.开启http basic支持,admin-client注册时需要使用 - .httpBasic().and() - .csrf() - //4.开启基于cookie的csrf保护 - .csrfTokenRepository(CookieCsrfTokenRepository.withHttpOnlyFalse()) - //5.忽略这些路径的csrf保护以便admin-client注册 - .ignoringAntMatchers( - adminContextPath + "/instances", - adminContextPath + "/actuator/**" - ); + successHandler.setDefaultTargetUrl(this.adminServer.path("/")); + http.authorizeHttpRequests((authorizeRequests) -> authorizeRequests // + .requestMatchers(new AntPathRequestMatcher(this.adminServer.path("/assets/**"))) + .permitAll() + .requestMatchers(new AntPathRequestMatcher(this.adminServer.path("/actuator/info"))) + .permitAll() + .requestMatchers(new AntPathRequestMatcher(adminServer.path("/actuator/health"))) + .permitAll() + .requestMatchers(new AntPathRequestMatcher(this.adminServer.path("/login"))) + .permitAll() + .dispatcherTypeMatchers(DispatcherType.ASYNC) + .permitAll() + .anyRequest() + .authenticated()) + .formLogin( + (formLogin) -> formLogin.loginPage(this.adminServer.path("/login")).successHandler(successHandler)) + .logout((logout) -> logout.logoutUrl(this.adminServer.path("/logout"))) + .httpBasic(Customizer.withDefaults()); + http.addFilterAfter(new CustomCsrfFilter(), BasicAuthenticationFilter.class) + .csrf((csrf) -> csrf.csrfTokenRepository(CookieCsrfTokenRepository.withHttpOnlyFalse()) + .csrfTokenRequestHandler(new CsrfTokenRequestAttributeHandler()) + .ignoringRequestMatchers( + new AntPathRequestMatcher(this.adminServer.path("/instances"), "POST"), + new AntPathRequestMatcher(this.adminServer.path("/instances/*"), "DELETE"), + new AntPathRequestMatcher(this.adminServer.path("/actuator/**")) + )); + http.rememberMe((rememberMe) -> rememberMe.key(UUID.randomUUID().toString()).tokenValiditySeconds(1209600)); + return http.build(); } + + @Bean + public InMemoryUserDetailsManager userDetailsService(PasswordEncoder passwordEncoder) { + UserDetails user = User.withUsername("macro") + .password(passwordEncoder.encode("123456")) + .roles("USER") + .build(); + return new InMemoryUserDetailsManager(user); + } + + @Bean + public PasswordEncoder passwordEncoder() { + return new BCryptPasswordEncoder(); + } + } diff --git a/mall-monitor/src/main/java/com/macro/mall/filter/CustomCsrfFilter.java b/mall-monitor/src/main/java/com/macro/mall/filter/CustomCsrfFilter.java new file mode 100644 index 0000000..bda4bfd --- /dev/null +++ b/mall-monitor/src/main/java/com/macro/mall/filter/CustomCsrfFilter.java @@ -0,0 +1,57 @@ +package com.macro.mall.filter; + +/* + * Copyright 2014-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +import jakarta.servlet.FilterChain; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.Cookie; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import org.springframework.security.web.csrf.CsrfToken; +import org.springframework.web.filter.OncePerRequestFilter; +import org.springframework.web.util.WebUtils; + +import java.io.IOException; + +/** + * @auther macrozheng + * @description 自定义CSRF过滤器 + * @date 2024/1/16 + * @github https://github.com/macrozheng + */ +public class CustomCsrfFilter extends OncePerRequestFilter { + + public static final String CSRF_COOKIE_NAME = "XSRF-TOKEN"; + + @Override + protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) + throws ServletException, IOException { + CsrfToken csrf = (CsrfToken) request.getAttribute(CsrfToken.class.getName()); + if (csrf != null) { + Cookie cookie = WebUtils.getCookie(request, CSRF_COOKIE_NAME); + String token = csrf.getToken(); + if (cookie == null || token != null && !token.equals(cookie.getValue())) { + cookie = new Cookie(CSRF_COOKIE_NAME, token); + cookie.setPath("/"); + response.addCookie(cookie); + } + } + filterChain.doFilter(request, response); + } + +} diff --git a/mall-portal/pom.xml b/mall-portal/pom.xml index e147309..cd7d382 100644 --- a/mall-portal/pom.xml +++ b/mall-portal/pom.xml @@ -22,17 +22,14 @@ com.macro.mall mall-mbg - org.springframework.boot spring-boot-starter-data-mongodb - org.springframework.boot spring-boot-starter-data-redis - org.springframework.boot spring-boot-starter-amqp @@ -49,15 +46,29 @@ org.springframework.cloud spring-cloud-starter-openfeign - - io.github.openfeign - feign-okhttp - - com.alipay.sdk alipay-sdk-java - ${alipay-sdk.version} + + + cn.dev33 + sa-token-spring-boot3-starter + + + cn.dev33 + sa-token-redis-jackson + + + org.apache.commons + commons-pool2 + + + cn.dev33 + sa-token-jwt + + + de.codecentric + spring-boot-admin-starter-client diff --git a/mall-portal/src/main/java/com/macro/mall/portal/config/SpringDocConfig.java b/mall-portal/src/main/java/com/macro/mall/portal/config/SpringDocConfig.java new file mode 100644 index 0000000..7907ea4 --- /dev/null +++ b/mall-portal/src/main/java/com/macro/mall/portal/config/SpringDocConfig.java @@ -0,0 +1,68 @@ +package com.macro.mall.portal.config; + +import io.swagger.v3.oas.models.Components; +import io.swagger.v3.oas.models.ExternalDocumentation; +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.info.Info; +import io.swagger.v3.oas.models.info.License; +import io.swagger.v3.oas.models.security.SecurityRequirement; +import io.swagger.v3.oas.models.security.SecurityScheme; +import org.springdoc.core.customizers.GlobalOpenApiCustomizer; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +/** + * SpringDoc相关配置 + * Created by macro on 2024/3/5. + */ +@Configuration +public class SpringDocConfig implements WebMvcConfigurer { + + private static final String SECURITY_SCHEME_NAME = "Authorization"; + + @Bean + public OpenAPI mallPortalOpenAPI() { + return new OpenAPI() + .info(new Info().title("mall前台系统") + .description("mall前台相关接口文档") + .version("v1.0.0") + .license(new License().name("Apache 2.0") + .url("https://github.com/macrozheng/mall-learning"))) + .externalDocs(new ExternalDocumentation() + .description("SpringBoot实战电商项目mall(60K+Star)全套文档") + .url("http://www.macrozheng.com")) + .addSecurityItem(new SecurityRequirement().addList(SECURITY_SCHEME_NAME)) + .components(new Components() + .addSecuritySchemes(SECURITY_SCHEME_NAME, + new SecurityScheme() + .name(SECURITY_SCHEME_NAME) + .type(SecurityScheme.Type.HTTP) + .scheme("bearer") + .bearerFormat("JWT"))); + } + + @Override + public void addViewControllers(ViewControllerRegistry registry) { + //配置访问`/swagger-ui/`路径时可以直接跳转到`/swagger-ui/index.html` + registry.addViewController("/swagger-ui/").setViewName("redirect:/swagger-ui/index.html"); + } + + @Bean + public GlobalOpenApiCustomizer orderGlobalOpenApiCustomizer() { + //解决Knife4j配置认证后无法自动添加认证头的问题 + return openApi -> { + //全局添加鉴权参数 + if (openApi.getPaths() != null) { + openApi.getPaths().forEach((s, pathItem) -> { + pathItem.readOperations().forEach(operation -> { + operation.addSecurityItem(new SecurityRequirement().addList(SECURITY_SCHEME_NAME)); + }); + }); + } + }; + } + +} + diff --git a/mall-portal/src/main/java/com/macro/mall/portal/config/SwaggerConfig.java b/mall-portal/src/main/java/com/macro/mall/portal/config/SwaggerConfig.java deleted file mode 100644 index d14e6bf..0000000 --- a/mall-portal/src/main/java/com/macro/mall/portal/config/SwaggerConfig.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.macro.mall.portal.config; - -import com.macro.mall.common.config.BaseSwaggerConfig; -import com.macro.mall.common.domain.SwaggerProperties; -import org.springframework.beans.factory.config.BeanPostProcessor; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import springfox.documentation.swagger2.annotations.EnableSwagger2; - -/** - * Swagger API文档相关配置 - * Created by macro on 2018/4/26. - */ -@Configuration -@EnableSwagger2 -public class SwaggerConfig extends BaseSwaggerConfig { - - @Override - public SwaggerProperties swaggerProperties() { - return SwaggerProperties.builder() - .apiBasePackage("com.macro.mall.portal.controller") - .title("mall前台系统") - .description("mall前台相关接口文档") - .contactName("macro") - .version("1.0") - .enableSecurity(true) - .build(); - } - - @Bean - public BeanPostProcessor springfoxHandlerProviderBeanPostProcessor() { - return generateBeanPostProcessor(); - } -} diff --git a/mall-portal/src/main/java/com/macro/mall/portal/controller/AlipayController.java b/mall-portal/src/main/java/com/macro/mall/portal/controller/AlipayController.java index eb446e9..14e554f 100644 --- a/mall-portal/src/main/java/com/macro/mall/portal/controller/AlipayController.java +++ b/mall-portal/src/main/java/com/macro/mall/portal/controller/AlipayController.java @@ -4,8 +4,8 @@ import com.macro.mall.common.api.CommonResult; import com.macro.mall.portal.config.AlipayConfig; import com.macro.mall.portal.domain.AliPayParam; import com.macro.mall.portal.service.AlipayService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; + +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.stereotype.Controller; @@ -13,8 +13,8 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.HashMap; import java.util.Map; @@ -26,7 +26,6 @@ import java.util.Map; * @github https://github.com/macrozheng */ @Controller -@Api(tags = "AlipayController") @Tag(name = "AlipayController", description = "支付宝支付相关接口") @RequestMapping("/alipay") public class AlipayController { @@ -36,7 +35,7 @@ public class AlipayController { @Autowired private AlipayService alipayService; - @ApiOperation("支付宝电脑网站支付") + @Operation(summary = "支付宝电脑网站支付") @RequestMapping(value = "/pay", method = RequestMethod.GET) public void pay(AliPayParam aliPayParam, HttpServletResponse response) throws IOException { response.setContentType("text/html;charset=" + alipayConfig.getCharset()); @@ -45,7 +44,7 @@ public class AlipayController { response.getWriter().close(); } - @ApiOperation("支付宝手机网站支付") + @Operation(summary = "支付宝手机网站支付") @RequestMapping(value = "/webPay", method = RequestMethod.GET) public void webPay(AliPayParam aliPayParam, HttpServletResponse response) throws IOException { response.setContentType("text/html;charset=" + alipayConfig.getCharset()); @@ -54,7 +53,7 @@ public class AlipayController { response.getWriter().close(); } - @ApiOperation(value = "支付宝异步回调",notes = "必须为POST请求,执行成功返回success,执行失败返回failure") + @Operation(summary = "支付宝异步回调",description = "必须为POST请求,执行成功返回success,执行失败返回failure") @RequestMapping(value = "/notify", method = RequestMethod.POST) public String notify(HttpServletRequest request){ Map params = new HashMap<>(); @@ -65,7 +64,7 @@ public class AlipayController { return alipayService.notify(params); } - @ApiOperation(value = "支付宝统一收单线下交易查询",notes = "订单支付成功返回交易状态:TRADE_SUCCESS") + @Operation(summary = "支付宝统一收单线下交易查询",description = "订单支付成功返回交易状态:TRADE_SUCCESS") @RequestMapping(value = "/query", method = RequestMethod.GET) @ResponseBody public CommonResult query(String outTradeNo, String tradeNo){ diff --git a/mall-portal/src/main/java/com/macro/mall/portal/controller/HomeController.java b/mall-portal/src/main/java/com/macro/mall/portal/controller/HomeController.java index f78c16d..4364b44 100644 --- a/mall-portal/src/main/java/com/macro/mall/portal/controller/HomeController.java +++ b/mall-portal/src/main/java/com/macro/mall/portal/controller/HomeController.java @@ -6,8 +6,9 @@ import com.macro.mall.model.PmsProduct; import com.macro.mall.model.PmsProductCategory; import com.macro.mall.portal.domain.HomeContentResult; import com.macro.mall.portal.service.HomeService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; + +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.stereotype.Controller; import org.springframework.web.bind.annotation.*; @@ -19,13 +20,13 @@ import java.util.List; * Created by macro on 2019/1/28. */ @Controller -@Api(tags = "HomeController", description = "首页内容管理") +@Tag(name = "HomeController", description = "首页内容管理") @RequestMapping("/home") public class HomeController { @Autowired private HomeService homeService; - @ApiOperation("首页内容页信息展示") + @Operation(summary = "首页内容页信息展示") @RequestMapping(value = "/content", method = RequestMethod.GET) @ResponseBody public CommonResult content() { @@ -33,7 +34,7 @@ public class HomeController { return CommonResult.success(contentResult); } - @ApiOperation("分页获取推荐商品") + @Operation(summary = "分页获取推荐商品") @RequestMapping(value = "/recommendProductList", method = RequestMethod.GET) @ResponseBody public CommonResult> recommendProductList(@RequestParam(value = "pageSize", defaultValue = "4") Integer pageSize, @@ -42,7 +43,7 @@ public class HomeController { return CommonResult.success(productList); } - @ApiOperation("获取首页商品分类") + @Operation(summary = "获取首页商品分类") @RequestMapping(value = "/productCateList/{parentId}", method = RequestMethod.GET) @ResponseBody public CommonResult> getProductCateList(@PathVariable Long parentId) { @@ -50,7 +51,7 @@ public class HomeController { return CommonResult.success(productCategoryList); } - @ApiOperation("根据分类获取专题") + @Operation(summary = "根据分类获取专题") @RequestMapping(value = "/subjectList", method = RequestMethod.GET) @ResponseBody public CommonResult> getSubjectList(@RequestParam(required = false) Long cateId, @@ -60,7 +61,7 @@ public class HomeController { return CommonResult.success(subjectList); } - @ApiOperation("分页获取人气推荐商品") + @Operation(summary = "分页获取人气推荐商品") @RequestMapping(value = "/hotProductList", method = RequestMethod.GET) @ResponseBody public CommonResult> hotProductList(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, @@ -69,7 +70,7 @@ public class HomeController { return CommonResult.success(productList); } - @ApiOperation("分页获取新品推荐商品") + @Operation(summary = "分页获取新品推荐商品") @RequestMapping(value = "/newProductList", method = RequestMethod.GET) @ResponseBody public CommonResult> newProductList(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, diff --git a/mall-portal/src/main/java/com/macro/mall/portal/controller/MemberAttentionController.java b/mall-portal/src/main/java/com/macro/mall/portal/controller/MemberAttentionController.java index 80ea510..5891000 100644 --- a/mall-portal/src/main/java/com/macro/mall/portal/controller/MemberAttentionController.java +++ b/mall-portal/src/main/java/com/macro/mall/portal/controller/MemberAttentionController.java @@ -5,8 +5,9 @@ import com.macro.mall.common.api.CommonResult; import com.macro.mall.portal.domain.MemberBrandAttention; import com.macro.mall.portal.domain.MemberProductCollection; import com.macro.mall.portal.service.MemberAttentionService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; + +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.data.domain.Page; import org.springframework.stereotype.Controller; @@ -19,12 +20,12 @@ import java.util.List; * Created by macro on 2018/8/2. */ @Controller -@Api(tags = "MemberAttentionController", description = "会员关注品牌管理") +@Tag(name = "MemberAttentionController", description = "会员关注品牌管理") @RequestMapping("/member/attention") public class MemberAttentionController { @Autowired private MemberAttentionService memberAttentionService; - @ApiOperation("添加品牌关注") + @Operation(summary = "添加品牌关注") @RequestMapping(value = "/add", method = RequestMethod.POST) @ResponseBody public CommonResult add(@RequestBody MemberBrandAttention memberBrandAttention) { @@ -36,7 +37,7 @@ public class MemberAttentionController { } } - @ApiOperation("取消关注") + @Operation(summary = "取消关注") @RequestMapping(value = "/delete", method = RequestMethod.POST) @ResponseBody public CommonResult delete(Long brandId) { @@ -48,7 +49,7 @@ public class MemberAttentionController { } } - @ApiOperation("显示关注列表") + @Operation(summary = "显示关注列表") @RequestMapping(value = "/list", method = RequestMethod.GET) @ResponseBody public CommonResult> list(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, @@ -57,7 +58,7 @@ public class MemberAttentionController { return CommonResult.success(CommonPage.restPage(page)); } - @ApiOperation("显示关注品牌详情") + @Operation(summary = "显示关注品牌详情") @RequestMapping(value = "/detail", method = RequestMethod.GET) @ResponseBody public CommonResult detail(@RequestParam Long brandId) { @@ -65,7 +66,7 @@ public class MemberAttentionController { return CommonResult.success(memberBrandAttention); } - @ApiOperation("清空关注列表") + @Operation(summary = "清空关注列表") @RequestMapping(value = "/clear", method = RequestMethod.POST) @ResponseBody public CommonResult clear() { diff --git a/mall-portal/src/main/java/com/macro/mall/portal/controller/MemberProductCollectionController.java b/mall-portal/src/main/java/com/macro/mall/portal/controller/MemberProductCollectionController.java index 1c78787..45f981d 100644 --- a/mall-portal/src/main/java/com/macro/mall/portal/controller/MemberProductCollectionController.java +++ b/mall-portal/src/main/java/com/macro/mall/portal/controller/MemberProductCollectionController.java @@ -4,8 +4,9 @@ import com.macro.mall.common.api.CommonPage; import com.macro.mall.common.api.CommonResult; import com.macro.mall.portal.domain.MemberProductCollection; import com.macro.mall.portal.service.MemberCollectionService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; + +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.data.domain.Page; import org.springframework.stereotype.Controller; @@ -18,13 +19,13 @@ import java.util.List; * Created by macro on 2018/8/2. */ @Controller -@Api(tags = "MemberCollectionController", description = "会员收藏管理") +@Tag(name = "MemberCollectionController", description = "会员收藏管理") @RequestMapping("/member/productCollection") public class MemberProductCollectionController { @Autowired private MemberCollectionService memberCollectionService; - @ApiOperation("添加商品收藏") + @Operation(summary = "添加商品收藏") @RequestMapping(value = "/add", method = RequestMethod.POST) @ResponseBody public CommonResult add(@RequestBody MemberProductCollection productCollection) { @@ -36,7 +37,7 @@ public class MemberProductCollectionController { } } - @ApiOperation("删除收藏商品") + @Operation(summary = "删除收藏商品") @RequestMapping(value = "/delete", method = RequestMethod.POST) @ResponseBody public CommonResult delete(Long productId) { @@ -48,7 +49,7 @@ public class MemberProductCollectionController { } } - @ApiOperation("显示收藏列表") + @Operation(summary = "显示收藏列表") @RequestMapping(value = "/list", method = RequestMethod.GET) @ResponseBody public CommonResult> list(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, @@ -57,7 +58,7 @@ public class MemberProductCollectionController { return CommonResult.success(CommonPage.restPage(page)); } - @ApiOperation("显示收藏商品详情") + @Operation(summary = "显示收藏商品详情") @RequestMapping(value = "/detail", method = RequestMethod.GET) @ResponseBody public CommonResult detail(@RequestParam Long productId) { @@ -65,7 +66,7 @@ public class MemberProductCollectionController { return CommonResult.success(memberProductCollection); } - @ApiOperation("清空收藏列表") + @Operation(summary = "清空收藏列表") @RequestMapping(value = "/clear", method = RequestMethod.POST) @ResponseBody public CommonResult clear() { diff --git a/mall-portal/src/main/java/com/macro/mall/portal/controller/MemberReadHistoryController.java b/mall-portal/src/main/java/com/macro/mall/portal/controller/MemberReadHistoryController.java index 949897f..d4e3630 100644 --- a/mall-portal/src/main/java/com/macro/mall/portal/controller/MemberReadHistoryController.java +++ b/mall-portal/src/main/java/com/macro/mall/portal/controller/MemberReadHistoryController.java @@ -4,8 +4,9 @@ import com.macro.mall.common.api.CommonPage; import com.macro.mall.common.api.CommonResult; import com.macro.mall.portal.domain.MemberReadHistory; import com.macro.mall.portal.service.MemberReadHistoryService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; + +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.data.domain.Page; import org.springframework.stereotype.Controller; @@ -18,13 +19,13 @@ import java.util.List; * Created by macro on 2018/8/3. */ @Controller -@Api(tags = "MemberReadHistoryController", description = "会员商品浏览记录管理") +@Tag(name = "MemberReadHistoryController", description = "会员商品浏览记录管理") @RequestMapping("/member/readHistory") public class MemberReadHistoryController { @Autowired private MemberReadHistoryService memberReadHistoryService; - @ApiOperation("创建浏览记录") + @Operation(summary = "创建浏览记录") @RequestMapping(value = "/create", method = RequestMethod.POST) @ResponseBody public CommonResult create(@RequestBody MemberReadHistory memberReadHistory) { @@ -36,7 +37,7 @@ public class MemberReadHistoryController { } } - @ApiOperation("删除浏览记录") + @Operation(summary = "删除浏览记录") @RequestMapping(value = "/delete", method = RequestMethod.POST) @ResponseBody public CommonResult delete(@RequestParam("ids") List ids) { @@ -48,7 +49,7 @@ public class MemberReadHistoryController { } } - @ApiOperation("清空除浏览记录") + @Operation(summary = "清空除浏览记录") @RequestMapping(value = "/clear", method = RequestMethod.POST) @ResponseBody public CommonResult clear() { @@ -56,7 +57,7 @@ public class MemberReadHistoryController { return CommonResult.success(null); } - @ApiOperation("分页获取用户浏览记录") + @Operation(summary = "分页获取用户浏览记录") @RequestMapping(value = "/list", method = RequestMethod.GET) @ResponseBody public CommonResult> list(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, diff --git a/mall-portal/src/main/java/com/macro/mall/portal/controller/OmsCartItemController.java b/mall-portal/src/main/java/com/macro/mall/portal/controller/OmsCartItemController.java index 944e8a2..22e7570 100644 --- a/mall-portal/src/main/java/com/macro/mall/portal/controller/OmsCartItemController.java +++ b/mall-portal/src/main/java/com/macro/mall/portal/controller/OmsCartItemController.java @@ -6,8 +6,9 @@ import com.macro.mall.portal.domain.CartProduct; import com.macro.mall.portal.domain.CartPromotionItem; import com.macro.mall.portal.service.OmsCartItemService; import com.macro.mall.portal.service.UmsMemberService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; + +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.stereotype.Controller; import org.springframework.web.bind.annotation.*; @@ -19,7 +20,7 @@ import java.util.List; * Created by macro on 2018/8/2. */ @Controller -@Api(tags = "OmsCartItemController", description = "购物车管理") +@Tag(name = "OmsCartItemController", description = "购物车管理") @RequestMapping("/cart") public class OmsCartItemController { @Autowired @@ -27,7 +28,7 @@ public class OmsCartItemController { @Autowired private UmsMemberService memberService; - @ApiOperation("添加商品到购物车") + @Operation(summary = "添加商品到购物车") @RequestMapping(value = "/add", method = RequestMethod.POST) @ResponseBody public CommonResult add(@RequestBody OmsCartItem cartItem) { @@ -38,7 +39,7 @@ public class OmsCartItemController { return CommonResult.failed(); } - @ApiOperation("获取某个会员的购物车列表") + @Operation(summary = "获取某个会员的购物车列表") @RequestMapping(value = "/list", method = RequestMethod.GET) @ResponseBody public CommonResult> list() { @@ -46,7 +47,7 @@ public class OmsCartItemController { return CommonResult.success(cartItemList); } - @ApiOperation("获取某个会员的购物车列表,包括促销信息") + @Operation(summary = "获取某个会员的购物车列表,包括促销信息") @RequestMapping(value = "/list/promotion", method = RequestMethod.GET) @ResponseBody public CommonResult> listPromotion(@RequestParam(required = false) List cartIds) { @@ -54,7 +55,7 @@ public class OmsCartItemController { return CommonResult.success(cartPromotionItemList); } - @ApiOperation("修改购物车中某个商品的数量") + @Operation(summary = "修改购物车中某个商品的数量") @RequestMapping(value = "/update/quantity", method = RequestMethod.GET) @ResponseBody public CommonResult updateQuantity(@RequestParam Long id, @@ -66,7 +67,7 @@ public class OmsCartItemController { return CommonResult.failed(); } - @ApiOperation("获取购物车中某个商品的规格,用于重选规格") + @Operation(summary = "获取购物车中某个商品的规格,用于重选规格") @RequestMapping(value = "/getProduct/{productId}", method = RequestMethod.GET) @ResponseBody public CommonResult getCartProduct(@PathVariable Long productId) { @@ -74,7 +75,7 @@ public class OmsCartItemController { return CommonResult.success(cartProduct); } - @ApiOperation("修改购物车中商品的规格") + @Operation(summary = "修改购物车中商品的规格") @RequestMapping(value = "/update/attr", method = RequestMethod.POST) @ResponseBody public CommonResult updateAttr(@RequestBody OmsCartItem cartItem) { @@ -85,7 +86,7 @@ public class OmsCartItemController { return CommonResult.failed(); } - @ApiOperation("删除购物车中的某个商品") + @Operation(summary = "删除购物车中的某个商品") @RequestMapping(value = "/delete", method = RequestMethod.POST) @ResponseBody public CommonResult delete(@RequestParam("ids") List ids) { @@ -96,7 +97,7 @@ public class OmsCartItemController { return CommonResult.failed(); } - @ApiOperation("清空购物车") + @Operation(summary = "清空购物车") @RequestMapping(value = "/clear", method = RequestMethod.POST) @ResponseBody public CommonResult clear() { diff --git a/mall-portal/src/main/java/com/macro/mall/portal/controller/OmsPortalOrderController.java b/mall-portal/src/main/java/com/macro/mall/portal/controller/OmsPortalOrderController.java index 80ab3f7..09273e7 100644 --- a/mall-portal/src/main/java/com/macro/mall/portal/controller/OmsPortalOrderController.java +++ b/mall-portal/src/main/java/com/macro/mall/portal/controller/OmsPortalOrderController.java @@ -6,9 +6,11 @@ import com.macro.mall.portal.domain.ConfirmOrderResult; import com.macro.mall.portal.domain.OmsOrderDetail; import com.macro.mall.portal.domain.OrderParam; import com.macro.mall.portal.service.OmsPortalOrderService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; @@ -21,13 +23,13 @@ import java.util.Map; * Created by macro on 2018/8/30. */ @Controller -@Api(tags = "OmsPortalOrderController", description = "订单管理") +@Tag(name = "OmsPortalOrderController", description = "订单管理") @RequestMapping("/order") public class OmsPortalOrderController { @Autowired private OmsPortalOrderService portalOrderService; - @ApiOperation("根据购物车信息生成确认单信息") + @Operation(summary = "根据购物车信息生成确认单信息") @RequestMapping(value = "/generateConfirmOrder", method = RequestMethod.POST) @ResponseBody public CommonResult generateConfirmOrder(@RequestBody List cartIds) { @@ -35,7 +37,7 @@ public class OmsPortalOrderController { return CommonResult.success(confirmOrderResult); } - @ApiOperation("根据购物车信息生成订单") + @Operation(summary = "根据购物车信息生成订单") @RequestMapping(value = "/generateOrder", method = RequestMethod.POST) @ResponseBody public CommonResult generateOrder(@RequestBody OrderParam orderParam) { @@ -43,7 +45,7 @@ public class OmsPortalOrderController { return CommonResult.success(result, "下单成功"); } - @ApiOperation("用户支付成功的回调") + @Operation(summary = "用户支付成功的回调") @RequestMapping(value = "/paySuccess", method = RequestMethod.POST) @ResponseBody public CommonResult paySuccess(@RequestParam Long orderId,@RequestParam Integer payType) { @@ -51,7 +53,7 @@ public class OmsPortalOrderController { return CommonResult.success(count, "支付成功"); } - @ApiOperation("自动取消超时订单") + @Operation(summary = "自动取消超时订单") @RequestMapping(value = "/cancelTimeOutOrder", method = RequestMethod.POST) @ResponseBody public CommonResult cancelTimeOutOrder() { @@ -59,7 +61,7 @@ public class OmsPortalOrderController { return CommonResult.success(null); } - @ApiOperation("取消单个超时订单") + @Operation(summary = "取消单个超时订单") @RequestMapping(value = "/cancelOrder", method = RequestMethod.POST) @ResponseBody public CommonResult cancelOrder(Long orderId) { @@ -67,9 +69,9 @@ public class OmsPortalOrderController { return CommonResult.success(null); } - @ApiOperation("按状态分页获取用户订单列表") - @ApiImplicitParam(name = "status", value = "订单状态:-1->全部;0->待付款;1->待发货;2->已发货;3->已完成;4->已关闭", - defaultValue = "-1", allowableValues = "-1,0,1,2,3,4", paramType = "query", dataType = "int") + @Operation(summary = "按状态分页获取用户订单列表") + @Parameter(name = "status", description = "订单状态:-1->全部;0->待付款;1->待发货;2->已发货;3->已完成;4->已关闭", + in = ParameterIn.QUERY, schema = @Schema(type = "integer",defaultValue = "-1",allowableValues = {"-1","0","1","2","3","4"})) @RequestMapping(value = "/list", method = RequestMethod.GET) @ResponseBody public CommonResult> list(@RequestParam Integer status, @@ -79,7 +81,7 @@ public class OmsPortalOrderController { return CommonResult.success(orderPage); } - @ApiOperation("根据ID获取订单详情") + @Operation(summary = "根据ID获取订单详情") @RequestMapping(value = "/detail/{orderId}", method = RequestMethod.GET) @ResponseBody public CommonResult detail(@PathVariable Long orderId) { @@ -87,7 +89,7 @@ public class OmsPortalOrderController { return CommonResult.success(orderDetail); } - @ApiOperation("用户取消订单") + @Operation(summary = "用户取消订单") @RequestMapping(value = "/cancelUserOrder", method = RequestMethod.POST) @ResponseBody public CommonResult cancelUserOrder(Long orderId) { @@ -95,7 +97,7 @@ public class OmsPortalOrderController { return CommonResult.success(null); } - @ApiOperation("用户确认收货") + @Operation(summary = "用户确认收货") @RequestMapping(value = "/confirmReceiveOrder", method = RequestMethod.POST) @ResponseBody public CommonResult confirmReceiveOrder(Long orderId) { @@ -103,7 +105,7 @@ public class OmsPortalOrderController { return CommonResult.success(null); } - @ApiOperation("用户删除订单") + @Operation(summary = "用户删除订单") @RequestMapping(value = "/deleteOrder", method = RequestMethod.POST) @ResponseBody public CommonResult deleteOrder(Long orderId) { diff --git a/mall-portal/src/main/java/com/macro/mall/portal/controller/OmsPortalOrderReturnApplyController.java b/mall-portal/src/main/java/com/macro/mall/portal/controller/OmsPortalOrderReturnApplyController.java index ba832cc..98eb227 100644 --- a/mall-portal/src/main/java/com/macro/mall/portal/controller/OmsPortalOrderReturnApplyController.java +++ b/mall-portal/src/main/java/com/macro/mall/portal/controller/OmsPortalOrderReturnApplyController.java @@ -3,8 +3,9 @@ package com.macro.mall.portal.controller; import com.macro.mall.common.api.CommonResult; import com.macro.mall.portal.domain.OmsOrderReturnApplyParam; import com.macro.mall.portal.service.OmsPortalOrderReturnApplyService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; + +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.stereotype.Controller; import org.springframework.web.bind.annotation.RequestBody; @@ -17,13 +18,13 @@ import org.springframework.web.bind.annotation.ResponseBody; * Created by macro on 2018/10/17. */ @Controller -@Api(tags = "OmsPortalOrderReturnApplyController", description = "申请退货管理") +@Tag(name = "OmsPortalOrderReturnApplyController", description = "申请退货管理") @RequestMapping("/returnApply") public class OmsPortalOrderReturnApplyController { @Autowired private OmsPortalOrderReturnApplyService returnApplyService; - @ApiOperation("申请退货") + @Operation(summary = "申请退货") @RequestMapping(value = "/create", method = RequestMethod.POST) @ResponseBody public CommonResult create(@RequestBody OmsOrderReturnApplyParam returnApply) { diff --git a/mall-portal/src/main/java/com/macro/mall/portal/controller/PmsPortalProductController.java b/mall-portal/src/main/java/com/macro/mall/portal/controller/PmsPortalProductController.java index 0d173a8..c4bdf26 100644 --- a/mall-portal/src/main/java/com/macro/mall/portal/controller/PmsPortalProductController.java +++ b/mall-portal/src/main/java/com/macro/mall/portal/controller/PmsPortalProductController.java @@ -6,9 +6,11 @@ import com.macro.mall.model.PmsProduct; import com.macro.mall.portal.domain.PmsPortalProductDetail; import com.macro.mall.portal.domain.PmsProductCategoryNode; import com.macro.mall.portal.service.PmsPortalProductService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; @@ -20,16 +22,16 @@ import java.util.List; * Created by macro on 2020/4/6. */ @Controller -@Api(tags = "PmsPortalProductController", description = "前台商品管理") +@Tag(name = "PmsPortalProductController", description = "前台商品管理") @RequestMapping("/product") public class PmsPortalProductController { @Autowired private PmsPortalProductService portalProductService; - @ApiOperation(value = "综合搜索、筛选、排序") - @ApiImplicitParam(name = "sort", value = "排序字段:0->按相关度;1->按新品;2->按销量;3->价格从低到高;4->价格从高到低", - defaultValue = "0", allowableValues = "0,1,2,3,4", paramType = "query", dataType = "integer") + @Operation(summary = "综合搜索、筛选、排序") + @Parameter(name = "sort", description = "排序字段:0->按相关度;1->按新品;2->按销量;3->价格从低到高;4->价格从高到低", + in= ParameterIn.QUERY,schema = @Schema(type = "integer",defaultValue = "0",allowableValues = {"0","1","2","3","4"})) @RequestMapping(value = "/search", method = RequestMethod.GET) @ResponseBody public CommonResult> search(@RequestParam(required = false) String keyword, @@ -42,7 +44,7 @@ public class PmsPortalProductController { return CommonResult.success(CommonPage.restPage(productList)); } - @ApiOperation("以树形结构获取所有商品分类") + @Operation(summary = "以树形结构获取所有商品分类") @RequestMapping(value = "/categoryTreeList", method = RequestMethod.GET) @ResponseBody public CommonResult> categoryTreeList() { @@ -50,7 +52,7 @@ public class PmsPortalProductController { return CommonResult.success(list); } - @ApiOperation("获取前台商品详情") + @Operation(summary = "获取前台商品详情") @RequestMapping(value = "/detail/{id}", method = RequestMethod.GET) @ResponseBody public CommonResult detail(@PathVariable Long id) { diff --git a/mall-portal/src/main/java/com/macro/mall/portal/controller/PortalBrandController.java b/mall-portal/src/main/java/com/macro/mall/portal/controller/PortalBrandController.java index 5f976ce..2fa8ac3 100644 --- a/mall-portal/src/main/java/com/macro/mall/portal/controller/PortalBrandController.java +++ b/mall-portal/src/main/java/com/macro/mall/portal/controller/PortalBrandController.java @@ -5,8 +5,9 @@ import com.macro.mall.common.api.CommonResult; import com.macro.mall.model.PmsBrand; import com.macro.mall.model.PmsProduct; import com.macro.mall.portal.service.PortalBrandService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; + +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.stereotype.Controller; import org.springframework.web.bind.annotation.*; @@ -18,14 +19,14 @@ import java.util.List; * Created by macro on 2020/5/15. */ @Controller -@Api(tags = "PortalBrandController", description = "前台品牌管理") +@Tag(name = "PortalBrandController", description = "前台品牌管理") @RequestMapping("/brand") public class PortalBrandController { @Autowired private PortalBrandService homeBrandService; - @ApiOperation("分页获取推荐品牌") + @Operation(summary = "分页获取推荐品牌") @RequestMapping(value = "/recommendList", method = RequestMethod.GET) @ResponseBody public CommonResult> recommendList(@RequestParam(value = "pageSize", defaultValue = "6") Integer pageSize, @@ -34,7 +35,7 @@ public class PortalBrandController { return CommonResult.success(brandList); } - @ApiOperation("获取品牌详情") + @Operation(summary = "获取品牌详情") @RequestMapping(value = "/detail/{brandId}", method = RequestMethod.GET) @ResponseBody public CommonResult detail(@PathVariable Long brandId) { @@ -42,7 +43,7 @@ public class PortalBrandController { return CommonResult.success(brand); } - @ApiOperation("分页获取品牌相关商品") + @Operation(summary = "分页获取品牌相关商品") @RequestMapping(value = "/productList", method = RequestMethod.GET) @ResponseBody public CommonResult> productList(@RequestParam Long brandId, diff --git a/mall-portal/src/main/java/com/macro/mall/portal/controller/UmsMemberController.java b/mall-portal/src/main/java/com/macro/mall/portal/controller/UmsMemberController.java index 661bd67..7008943 100644 --- a/mall-portal/src/main/java/com/macro/mall/portal/controller/UmsMemberController.java +++ b/mall-portal/src/main/java/com/macro/mall/portal/controller/UmsMemberController.java @@ -1,30 +1,37 @@ package com.macro.mall.portal.controller; +import cn.dev33.satoken.stp.SaTokenInfo; import com.macro.mall.common.api.CommonResult; -import com.macro.mall.common.domain.UserDto; import com.macro.mall.model.UmsMember; import com.macro.mall.portal.service.UmsMemberService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; + +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.beans.factory.annotation.Value; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; +import java.util.HashMap; +import java.util.Map; + /** * 会员登录注册管理Controller * Created by macro on 2018/8/3. */ @Controller -@Api(tags = "UmsMemberController", description = "会员登录注册管理") +@Tag(name = "UmsMemberController", description = "会员登录注册管理") @RequestMapping("/sso") public class UmsMemberController { @Autowired private UmsMemberService memberService; + @Value("${sa-token.token-prefix}") + private String tokenHead; - @ApiOperation("会员注册") + @Operation(summary = "会员注册") @RequestMapping(value = "/register", method = RequestMethod.POST) @ResponseBody public CommonResult register(@RequestParam String username, @@ -35,15 +42,22 @@ public class UmsMemberController { return CommonResult.success(null,"注册成功"); } - @ApiOperation("会员登录") + @Operation(summary = "会员登录") @RequestMapping(value = "/login", method = RequestMethod.POST) @ResponseBody public CommonResult login(@RequestParam String username, @RequestParam String password) { - return memberService.login(username, password); + SaTokenInfo saTokenInfo = memberService.login(username, password); + if (saTokenInfo == null) { + return CommonResult.validateFailed("用户名或密码错误"); + } + Map tokenMap = new HashMap<>(); + tokenMap.put("token", saTokenInfo.getTokenValue() ); + tokenMap.put("tokenHead", tokenHead+" "); + return CommonResult.success(tokenMap); } - @ApiOperation("获取会员信息") + @Operation(summary = "获取会员信息") @RequestMapping(value = "/info", method = RequestMethod.GET) @ResponseBody public CommonResult info() { @@ -51,7 +65,15 @@ public class UmsMemberController { return CommonResult.success(member); } - @ApiOperation("获取验证码") + @Operation(summary = "登出功能") + @RequestMapping(value = "/logout", method = RequestMethod.POST) + @ResponseBody + public CommonResult logout() { + memberService.logout(); + return CommonResult.success(null); + } + + @Operation(summary = "获取验证码") @RequestMapping(value = "/getAuthCode", method = RequestMethod.GET) @ResponseBody public CommonResult getAuthCode(@RequestParam String telephone) { @@ -59,7 +81,7 @@ public class UmsMemberController { return CommonResult.success(authCode,"获取验证码成功"); } - @ApiOperation("修改密码") + @Operation(summary = "修改密码") @RequestMapping(value = "/updatePassword", method = RequestMethod.POST) @ResponseBody public CommonResult updatePassword(@RequestParam String telephone, @@ -68,11 +90,4 @@ public class UmsMemberController { memberService.updatePassword(telephone,password,authCode); return CommonResult.success(null,"密码修改成功"); } - - @ApiOperation("根据用户名获取通用用户信息") - @RequestMapping(value = "/loadByUsername", method = RequestMethod.GET) - @ResponseBody - public UserDto loadUserByUsername(@RequestParam String username) { - return memberService.loadUserByUsername(username); - } } diff --git a/mall-portal/src/main/java/com/macro/mall/portal/controller/UmsMemberCouponController.java b/mall-portal/src/main/java/com/macro/mall/portal/controller/UmsMemberCouponController.java index f28c7d7..154b546 100644 --- a/mall-portal/src/main/java/com/macro/mall/portal/controller/UmsMemberCouponController.java +++ b/mall-portal/src/main/java/com/macro/mall/portal/controller/UmsMemberCouponController.java @@ -8,9 +8,11 @@ import com.macro.mall.portal.domain.SmsCouponHistoryDetail; import com.macro.mall.portal.service.OmsCartItemService; import com.macro.mall.portal.service.UmsMemberCouponService; import com.macro.mall.portal.service.UmsMemberService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; @@ -18,11 +20,11 @@ import org.springframework.web.bind.annotation.*; import java.util.List; /** - * 用户优惠券管理Controller + * 会员优惠券管理Controller * Created by macro on 2018/8/29. */ @Controller -@Api(tags = "UmsMemberCouponController", description = "用户优惠券管理") +@Tag(name = "UmsMemberCouponController", description = "用户优惠券管理") @RequestMapping("/member/coupon") public class UmsMemberCouponController { @Autowired @@ -32,7 +34,7 @@ public class UmsMemberCouponController { @Autowired private UmsMemberService memberService; - @ApiOperation("领取指定优惠券") + @Operation(summary = "领取指定优惠券") @RequestMapping(value = "/add/{couponId}", method = RequestMethod.POST) @ResponseBody public CommonResult add(@PathVariable Long couponId) { @@ -40,9 +42,9 @@ public class UmsMemberCouponController { return CommonResult.success(null,"领取成功"); } - @ApiOperation("获取用户优惠券历史列表") - @ApiImplicitParam(name = "useStatus", value = "优惠券筛选类型:0->未使用;1->已使用;2->已过期", - allowableValues = "0,1,2", paramType = "query", dataType = "integer") + @Operation(summary = "获取会员优惠券历史列表") + @Parameter(name = "useStatus", description = "优惠券筛选类型:0->未使用;1->已使用;2->已过期", + in = ParameterIn.QUERY,schema = @Schema(type = "integer",allowableValues = {"0","1","2"})) @RequestMapping(value = "/listHistory", method = RequestMethod.GET) @ResponseBody public CommonResult> listHistory(@RequestParam(value = "useStatus", required = false) Integer useStatus) { @@ -50,9 +52,9 @@ public class UmsMemberCouponController { return CommonResult.success(couponHistoryList); } - @ApiOperation("获取用户优惠券列表") - @ApiImplicitParam(name = "useStatus", value = "优惠券筛选类型:0->未使用;1->已使用;2->已过期", - allowableValues = "0,1,2", paramType = "query", dataType = "integer") + @Operation(summary = "获取会员优惠券列表") + @Parameter(name = "useStatus", description = "优惠券筛选类型:0->未使用;1->已使用;2->已过期", + in = ParameterIn.QUERY,schema = @Schema(type = "integer",allowableValues = {"0","1","2"})) @RequestMapping(value = "/list", method = RequestMethod.GET) @ResponseBody public CommonResult> list(@RequestParam(value = "useStatus", required = false) Integer useStatus) { @@ -60,9 +62,9 @@ public class UmsMemberCouponController { return CommonResult.success(couponList); } - @ApiOperation("获取登录会员购物车的相关优惠券") - @ApiImplicitParam(name = "type", value = "使用可用:0->不可用;1->可用", - defaultValue = "1", allowableValues = "0,1", paramType = "query", dataType = "integer") + @Operation(summary = "获取登录会员购物车的相关优惠券") + @Parameter(name = "type", description = "使用可用:0->不可用;1->可用", + in = ParameterIn.PATH,schema = @Schema(type = "integer",defaultValue = "1",allowableValues = {"0","1"})) @RequestMapping(value = "/list/cart/{type}", method = RequestMethod.GET) @ResponseBody public CommonResult> listCart(@PathVariable Integer type) { @@ -71,7 +73,7 @@ public class UmsMemberCouponController { return CommonResult.success(couponHistoryList); } - @ApiOperation("获取当前商品相关优惠券") + @Operation(summary = "获取当前商品相关优惠券") @RequestMapping(value = "/listByProduct/{productId}", method = RequestMethod.GET) @ResponseBody public CommonResult> listByProduct(@PathVariable Long productId) { diff --git a/mall-portal/src/main/java/com/macro/mall/portal/controller/UmsMemberReceiveAddressController.java b/mall-portal/src/main/java/com/macro/mall/portal/controller/UmsMemberReceiveAddressController.java index 27470be..6264753 100644 --- a/mall-portal/src/main/java/com/macro/mall/portal/controller/UmsMemberReceiveAddressController.java +++ b/mall-portal/src/main/java/com/macro/mall/portal/controller/UmsMemberReceiveAddressController.java @@ -3,8 +3,9 @@ package com.macro.mall.portal.controller; import com.macro.mall.common.api.CommonResult; import com.macro.mall.model.UmsMemberReceiveAddress; import com.macro.mall.portal.service.UmsMemberReceiveAddressService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; + +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.stereotype.Controller; import org.springframework.web.bind.annotation.*; @@ -16,13 +17,13 @@ import java.util.List; * Created by macro on 2018/8/28. */ @Controller -@Api(tags = "UmsMemberReceiveAddressController", description = "会员收货地址管理") +@Tag(name = "UmsMemberReceiveAddressController", description = "会员收货地址管理") @RequestMapping("/member/address") public class UmsMemberReceiveAddressController { @Autowired private UmsMemberReceiveAddressService memberReceiveAddressService; - @ApiOperation("添加收货地址") + @Operation(summary = "添加收货地址") @RequestMapping(value = "/add", method = RequestMethod.POST) @ResponseBody public CommonResult add(@RequestBody UmsMemberReceiveAddress address) { @@ -33,7 +34,7 @@ public class UmsMemberReceiveAddressController { return CommonResult.failed(); } - @ApiOperation("删除收货地址") + @Operation(summary = "删除收货地址") @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult delete(@PathVariable Long id) { @@ -44,7 +45,7 @@ public class UmsMemberReceiveAddressController { return CommonResult.failed(); } - @ApiOperation("修改收货地址") + @Operation(summary = "修改收货地址") @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult update(@PathVariable Long id, @RequestBody UmsMemberReceiveAddress address) { @@ -55,7 +56,7 @@ public class UmsMemberReceiveAddressController { return CommonResult.failed(); } - @ApiOperation("显示所有收货地址") + @Operation(summary = "显示所有收货地址") @RequestMapping(value = "/list", method = RequestMethod.GET) @ResponseBody public CommonResult> list() { @@ -63,7 +64,7 @@ public class UmsMemberReceiveAddressController { return CommonResult.success(addressList); } - @ApiOperation("获取收货地址详情") + @Operation(summary = "获取收货地址详情") @RequestMapping(value = "/{id}", method = RequestMethod.GET) @ResponseBody public CommonResult getItem(@PathVariable Long id) { diff --git a/mall-portal/src/main/java/com/macro/mall/portal/dao/SmsCouponHistoryDao.java b/mall-portal/src/main/java/com/macro/mall/portal/dao/SmsCouponHistoryDao.java index 238010e..0d85e4c 100644 --- a/mall-portal/src/main/java/com/macro/mall/portal/dao/SmsCouponHistoryDao.java +++ b/mall-portal/src/main/java/com/macro/mall/portal/dao/SmsCouponHistoryDao.java @@ -2,7 +2,6 @@ package com.macro.mall.portal.dao; import com.macro.mall.model.SmsCoupon; import com.macro.mall.portal.domain.SmsCouponHistoryDetail; -import io.swagger.models.auth.In; import org.apache.ibatis.annotations.Param; import java.util.List; diff --git a/mall-portal/src/main/java/com/macro/mall/portal/domain/MemberDetails.java b/mall-portal/src/main/java/com/macro/mall/portal/domain/MemberDetails.java deleted file mode 100644 index 2d6f663..0000000 --- a/mall-portal/src/main/java/com/macro/mall/portal/domain/MemberDetails.java +++ /dev/null @@ -1,61 +0,0 @@ -//package com.macro.mall.portal.domain; -// -//import com.macro.mall.model.UmsMember; -//import org.springframework.security.core.GrantedAuthority; -//import org.springframework.security.core.authority.SimpleGrantedAuthority; -//import org.springframework.security.core.userdetails.UserDetails; -// -//import java.util.Arrays; -//import java.util.Collection; -// -///** -// * 会员详情封装 -// * Created by macro on 2018/8/3. -// */ -//public class MemberDetails implements UserDetails { -// private UmsMember umsMember; -// -// public MemberDetails(UmsMember umsMember) { -// this.umsMember = umsMember; -// } -// -// @Override -// public Collection getAuthorities() { -// //返回当前用户的权限 -// return Arrays.asList(new SimpleGrantedAuthority("TEST")); -// } -// -// @Override -// public String getPassword() { -// return umsMember.getPassword(); -// } -// -// @Override -// public String getUsername() { -// return umsMember.getUsername(); -// } -// -// @Override -// public boolean isAccountNonExpired() { -// return true; -// } -// -// @Override -// public boolean isAccountNonLocked() { -// return true; -// } -// -// @Override -// public boolean isCredentialsNonExpired() { -// return true; -// } -// -// @Override -// public boolean isEnabled() { -// return umsMember.getStatus()==1; -// } -// -// public UmsMember getUmsMember() { -// return umsMember; -// } -//} diff --git a/mall-portal/src/main/java/com/macro/mall/portal/domain/OmsOrderReturnApplyParam.java b/mall-portal/src/main/java/com/macro/mall/portal/domain/OmsOrderReturnApplyParam.java index f2f82ba..faab80b 100644 --- a/mall-portal/src/main/java/com/macro/mall/portal/domain/OmsOrderReturnApplyParam.java +++ b/mall-portal/src/main/java/com/macro/mall/portal/domain/OmsOrderReturnApplyParam.java @@ -1,6 +1,6 @@ package com.macro.mall.portal.domain; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Getter; import lombok.Setter; @@ -13,37 +13,37 @@ import java.math.BigDecimal; @Getter @Setter public class OmsOrderReturnApplyParam { - @ApiModelProperty("订单id") + @Schema(title = "订单id") private Long orderId; - @ApiModelProperty("退货商品id") + @Schema(title = "退货商品id") private Long productId; - @ApiModelProperty("订单编号") + @Schema(title = "订单编号") private String orderSn; - @ApiModelProperty("会员用户名") + @Schema(title = "会员用户名") private String memberUsername; - @ApiModelProperty("退货人姓名") + @Schema(title = "退货人姓名") private String returnName; - @ApiModelProperty("退货人电话") + @Schema(title = "退货人电话") private String returnPhone; - @ApiModelProperty("商品图片") + @Schema(title = "商品图片") private String productPic; - @ApiModelProperty("商品名称") + @Schema(title = "商品名称") private String productName; - @ApiModelProperty("商品品牌") + @Schema(title = "商品品牌") private String productBrand; - @ApiModelProperty("商品销售属性:颜色:红色;尺码:xl;") + @Schema(title = "商品销售属性:颜色:红色;尺码:xl;") private String productAttr; - @ApiModelProperty("退货数量") + @Schema(title = "退货数量") private Integer productCount; - @ApiModelProperty("商品单价") + @Schema(title = "商品单价") private BigDecimal productPrice; - @ApiModelProperty("商品实际支付单价") + @Schema(title = "商品实际支付单价") private BigDecimal productRealPrice; - @ApiModelProperty("原因") + @Schema(title = "原因") private String reason; - @ApiModelProperty("描述") + @Schema(title = "描述") private String description; - @ApiModelProperty("凭证图片,以逗号隔开") + @Schema(title = "凭证图片,以逗号隔开") private String proofPics; } diff --git a/mall-portal/src/main/java/com/macro/mall/portal/domain/OrderParam.java b/mall-portal/src/main/java/com/macro/mall/portal/domain/OrderParam.java index 9ffdab0..6cbc22d 100644 --- a/mall-portal/src/main/java/com/macro/mall/portal/domain/OrderParam.java +++ b/mall-portal/src/main/java/com/macro/mall/portal/domain/OrderParam.java @@ -1,6 +1,6 @@ package com.macro.mall.portal.domain; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; @@ -13,14 +13,14 @@ import java.util.List; @Data @EqualsAndHashCode(callSuper = false) public class OrderParam { - @ApiModelProperty("收货地址ID") + @Schema(title = "收货地址ID") private Long memberReceiveAddressId; - @ApiModelProperty("优惠券ID") + @Schema(title = "优惠券ID") private Long couponId; - @ApiModelProperty("使用的积分数") + @Schema(title = "使用的积分数") private Integer useIntegration; - @ApiModelProperty("支付方式") + @Schema(title = "支付方式") private Integer payType; - @ApiModelProperty("被选中的购物车商品ID") + @Schema(title = "被选中的购物车商品ID") private List cartIds; } diff --git a/mall-portal/src/main/java/com/macro/mall/portal/domain/PmsPortalProductDetail.java b/mall-portal/src/main/java/com/macro/mall/portal/domain/PmsPortalProductDetail.java index 10eeb20..b7d881d 100644 --- a/mall-portal/src/main/java/com/macro/mall/portal/domain/PmsPortalProductDetail.java +++ b/mall-portal/src/main/java/com/macro/mall/portal/domain/PmsPortalProductDetail.java @@ -1,7 +1,7 @@ package com.macro.mall.portal.domain; import com.macro.mall.model.*; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Getter; import lombok.Setter; @@ -14,20 +14,20 @@ import java.util.List; @Getter @Setter public class PmsPortalProductDetail{ - @ApiModelProperty("商品信息") + @Schema(title = "商品信息") private PmsProduct product; - @ApiModelProperty("商品品牌") + @Schema(title = "商品品牌") private PmsBrand brand; - @ApiModelProperty("商品属性与参数") + @Schema(title = "商品属性与参数") private List productAttributeList; - @ApiModelProperty("手动录入的商品属性与参数值") + @Schema(title = "手动录入的商品属性与参数值") private List productAttributeValueList; - @ApiModelProperty("商品的sku库存信息") + @Schema(title = "商品的sku库存信息") private List skuStockList; - @ApiModelProperty("商品阶梯价格设置") + @Schema(title = "商品阶梯价格设置") private List productLadderList; - @ApiModelProperty("商品满减价格设置") + @Schema(title = "商品满减价格设置") private List productFullReductionList; - @ApiModelProperty("商品可用优惠券") + @Schema(title = "商品可用优惠券") private List couponList; } diff --git a/mall-portal/src/main/java/com/macro/mall/portal/service/AuthService.java b/mall-portal/src/main/java/com/macro/mall/portal/service/AuthService.java deleted file mode 100644 index a382e68..0000000 --- a/mall-portal/src/main/java/com/macro/mall/portal/service/AuthService.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.macro.mall.portal.service; - -import com.macro.mall.common.api.CommonResult; -import org.springframework.cloud.openfeign.FeignClient; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestParam; - -import java.util.Map; - -/** - * 认证服务远程调用 - * Created by macro on 2020/7/19. - */ -@FeignClient("mall-auth") -public interface AuthService { - - @PostMapping(value = "/oauth/token") - CommonResult getAccessToken(@RequestParam Map parameters); - -} diff --git a/mall-portal/src/main/java/com/macro/mall/portal/service/UmsMemberService.java b/mall-portal/src/main/java/com/macro/mall/portal/service/UmsMemberService.java index 42199f4..c8085bd 100644 --- a/mall-portal/src/main/java/com/macro/mall/portal/service/UmsMemberService.java +++ b/mall-portal/src/main/java/com/macro/mall/portal/service/UmsMemberService.java @@ -1,7 +1,6 @@ package com.macro.mall.portal.service; -import com.macro.mall.common.api.CommonResult; -import com.macro.mall.common.domain.UserDto; +import cn.dev33.satoken.stp.SaTokenInfo; import com.macro.mall.model.UmsMember; import org.springframework.transaction.annotation.Transactional; @@ -47,14 +46,13 @@ public interface UmsMemberService { */ void updateIntegration(Long id,Integer integration); - - /** - * 获取用户信息 - */ - UserDto loadUserByUsername(String username); - /** * 登录后获取token */ - CommonResult login(String username, String password); + SaTokenInfo login(String username, String password); + + /** + * 登出功能 + */ + void logout(); } diff --git a/mall-portal/src/main/java/com/macro/mall/portal/service/impl/UmsMemberServiceImpl.java b/mall-portal/src/main/java/com/macro/mall/portal/service/impl/UmsMemberServiceImpl.java index bb67824..800292c 100644 --- a/mall-portal/src/main/java/com/macro/mall/portal/service/impl/UmsMemberServiceImpl.java +++ b/mall-portal/src/main/java/com/macro/mall/portal/service/impl/UmsMemberServiceImpl.java @@ -1,14 +1,11 @@ package com.macro.mall.portal.service.impl; -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.collection.CollUtil; +import cn.dev33.satoken.stp.SaTokenInfo; +import cn.dev33.satoken.stp.StpUtil; import cn.hutool.core.util.StrUtil; import cn.hutool.crypto.digest.BCrypt; -import cn.hutool.json.JSONUtil; -import com.macro.mall.common.api.CommonResult; -import com.macro.mall.common.api.ResultCode; import com.macro.mall.common.constant.AuthConstant; -import com.macro.mall.common.domain.UserDto; +import com.macro.mall.common.dto.UserDto; import com.macro.mall.common.exception.Asserts; import com.macro.mall.mapper.UmsMemberLevelMapper; import com.macro.mall.mapper.UmsMemberMapper; @@ -16,10 +13,9 @@ import com.macro.mall.model.UmsMember; import com.macro.mall.model.UmsMemberExample; import com.macro.mall.model.UmsMemberLevel; import com.macro.mall.model.UmsMemberLevelExample; -import com.macro.mall.portal.service.AuthService; import com.macro.mall.portal.service.UmsMemberCacheService; import com.macro.mall.portal.service.UmsMemberService; -import org.apache.catalina.User; +import com.macro.mall.portal.util.StpMemberUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -28,8 +24,9 @@ import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; import org.springframework.util.StringUtils; -import javax.servlet.http.HttpServletRequest; -import java.util.*; +import java.util.Date; +import java.util.List; +import java.util.Random; /** * 会员管理Service实现类 @@ -48,10 +45,6 @@ public class UmsMemberServiceImpl implements UmsMemberService { private String REDIS_KEY_PREFIX_AUTH_CODE; @Value("${redis.expire.authCode}") private Long AUTH_CODE_EXPIRE_SECONDS; - @Autowired - private AuthService authService; - @Autowired - private HttpServletRequest request; @Override public UmsMember getByUsername(String username) { @@ -132,11 +125,7 @@ public class UmsMemberServiceImpl implements UmsMemberService { @Override public UmsMember getCurrentMember() { - String userStr = request.getHeader(AuthConstant.USER_TOKEN_HEADER); - if(StrUtil.isEmpty(userStr)){ - Asserts.fail(ResultCode.UNAUTHORIZED); - } - UserDto userDto = JSONUtil.toBean(userStr, UserDto.class); + UserDto userDto = (UserDto) StpMemberUtil.getSession().get(AuthConstant.STP_MEMBER_INFO); UmsMember member = memberCacheService.getMember(userDto.getId()); if(member!=null){ return member; @@ -157,29 +146,39 @@ public class UmsMemberServiceImpl implements UmsMemberService { } @Override - public UserDto loadUserByUsername(String username) { - UmsMember member = getByUsername(username); - if(member!=null){ - UserDto userDto = new UserDto(); - BeanUtil.copyProperties(member,userDto); - userDto.setRoles(CollUtil.toList("前台会员")); - return userDto; - } - return null; - } - - @Override - public CommonResult login(String username, String password) { + public SaTokenInfo login(String username, String password) { if(StrUtil.isEmpty(username)||StrUtil.isEmpty(password)){ Asserts.fail("用户名或密码不能为空!"); } - Map params = new HashMap<>(); - params.put("client_id", AuthConstant.PORTAL_CLIENT_ID); - params.put("client_secret","123456"); - params.put("grant_type","password"); - params.put("username",username); - params.put("password",password); - return authService.getAccessToken(params); + UmsMember member = getByUsername(username); + if(member==null){ + Asserts.fail("找不到该用户!"); + } + if (!BCrypt.checkpw(password, member.getPassword())) { + Asserts.fail("密码不正确!"); + } + if(member.getStatus()!=1){ + Asserts.fail("该账号已被禁用!"); + } + // 登录校验成功后,一行代码实现登录 + StpMemberUtil.login(member.getId()); + UserDto userDto = new UserDto(); + userDto.setId(member.getId()); + userDto.setUsername(member.getUsername()); + userDto.setClientId(AuthConstant.PORTAL_CLIENT_ID); + // 将用户信息存储到Session中 + StpMemberUtil.getSession().set(AuthConstant.STP_MEMBER_INFO,userDto); + // 获取当前登录用户Token信息 + return StpUtil.getTokenInfo(); + } + + @Override + public void logout() { + //先清空缓存 + UserDto userDto = (UserDto) StpMemberUtil.getSession().get(AuthConstant.STP_MEMBER_INFO); + memberCacheService.delMember(userDto.getId()); + //再调用sa-token的登出方法 + StpMemberUtil.logout(); } //对输入的验证码进行校验 diff --git a/mall-portal/src/main/java/com/macro/mall/portal/util/StpMemberUtil.java b/mall-portal/src/main/java/com/macro/mall/portal/util/StpMemberUtil.java new file mode 100644 index 0000000..88b99ab --- /dev/null +++ b/mall-portal/src/main/java/com/macro/mall/portal/util/StpMemberUtil.java @@ -0,0 +1,1238 @@ +/* + * Copyright 2020-2099 sa-token.cc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.macro.mall.portal.util; + +import cn.dev33.satoken.SaManager; +import cn.dev33.satoken.fun.SaFunction; +import cn.dev33.satoken.jwt.StpLogicJwtForSimple; +import cn.dev33.satoken.listener.SaTokenEventCenter; +import cn.dev33.satoken.session.SaSession; +import cn.dev33.satoken.session.TokenSign; +import cn.dev33.satoken.stp.SaLoginModel; +import cn.dev33.satoken.stp.SaTokenInfo; +import cn.dev33.satoken.stp.StpLogic; + +import java.util.List; + +/** + * @auther macrozheng + * @description 前台商城用户登录认证工具类 + * 拷贝于默认的StpUtil,仅改动了TYPE和stpLogic对象 + * @date 2024/1/26 + * @github https://github.com/macrozheng + */ +public class StpMemberUtil { + + private StpMemberUtil() {} + + /** + * 多账号体系下的类型标识 + */ + public static final String TYPE = "memberLogin"; + + /** + * 底层使用的 StpLogic 对象 + */ + public static StpLogic stpLogic = new StpLogicJwtForSimple(TYPE); + + /** + * 获取当前 StpLogic 的账号类型 + * + * @return / + */ + public static String getLoginType(){ + return stpLogic.getLoginType(); + } + + /** + * 安全的重置 StpLogic 对象 + * + *
1、更改此账户的 StpLogic 对象 + *
2、put 到全局 StpLogic 集合中 + *
3、发送日志 + * + * @param newStpLogic / + */ + public static void setStpLogic(StpLogic newStpLogic) { + // 1、重置此账户的 StpLogic 对象 + stpLogic = newStpLogic; + + // 2、添加到全局 StpLogic 集合中 + // 以便可以通过 SaManager.getStpLogic(type) 的方式来全局获取到这个 StpLogic + SaManager.putStpLogic(newStpLogic); + + // 3、$$ 发布事件:更新了 stpLogic 对象 + SaTokenEventCenter.doSetStpLogic(stpLogic); + } + + /** + * 获取 StpLogic 对象 + * + * @return / + */ + public static StpLogic getStpLogic() { + return stpLogic; + } + + + // ------------------- 获取 token 相关 ------------------- + + /** + * 返回 token 名称,此名称在以下地方体现:Cookie 保存 token 时的名称、提交 token 时参数的名称、存储 token 时的 key 前缀 + * + * @return / + */ + public static String getTokenName() { + return stpLogic.getTokenName(); + } + + /** + * 在当前会话写入指定 token 值 + * + * @param tokenValue token 值 + */ + public static void setTokenValue(String tokenValue){ + stpLogic.setTokenValue(tokenValue); + } + + /** + * 在当前会话写入指定 token 值 + * + * @param tokenValue token 值 + * @param cookieTimeout Cookie存活时间(秒) + */ + public static void setTokenValue(String tokenValue, int cookieTimeout){ + stpLogic.setTokenValue(tokenValue, cookieTimeout); + } + + /** + * 在当前会话写入指定 token 值 + * + * @param tokenValue token 值 + * @param loginModel 登录参数 + */ + public static void setTokenValue(String tokenValue, SaLoginModel loginModel){ + stpLogic.setTokenValue(tokenValue, loginModel); + } + + /** + * 获取当前请求的 token 值 + * + * @return 当前tokenValue + */ + public static String getTokenValue() { + return stpLogic.getTokenValue(); + } + + /** + * 获取当前请求的 token 值 (不裁剪前缀) + * + * @return / + */ + public static String getTokenValueNotCut(){ + return stpLogic.getTokenValueNotCut(); + } + + /** + * 获取当前会话的 token 参数信息 + * + * @return token 参数信息 + */ + public static SaTokenInfo getTokenInfo() { + return stpLogic.getTokenInfo(); + } + + + // ------------------- 登录相关操作 ------------------- + + // --- 登录 + + /** + * 会话登录 + * + * @param id 账号id,建议的类型:(long | int | String) + */ + public static void login(Object id) { + stpLogic.login(id); + } + + /** + * 会话登录,并指定登录设备类型 + * + * @param id 账号id,建议的类型:(long | int | String) + * @param device 设备类型 + */ + public static void login(Object id, String device) { + stpLogic.login(id, device); + } + + /** + * 会话登录,并指定是否 [记住我] + * + * @param id 账号id,建议的类型:(long | int | String) + * @param isLastingCookie 是否为持久Cookie,值为 true 时记住我,值为 false 时关闭浏览器需要重新登录 + */ + public static void login(Object id, boolean isLastingCookie) { + stpLogic.login(id, isLastingCookie); + } + + /** + * 会话登录,并指定此次登录 token 的有效期, 单位:秒 + * + * @param id 账号id,建议的类型:(long | int | String) + * @param timeout 此次登录 token 的有效期, 单位:秒 + */ + public static void login(Object id, long timeout) { + stpLogic.login(id, timeout); + } + + /** + * 会话登录,并指定所有登录参数 Model + * + * @param id 账号id,建议的类型:(long | int | String) + * @param loginModel 此次登录的参数Model + */ + public static void login(Object id, SaLoginModel loginModel) { + stpLogic.login(id, loginModel); + } + + /** + * 创建指定账号 id 的登录会话数据 + * + * @param id 账号id,建议的类型:(long | int | String) + * @return 返回会话令牌 + */ + public static String createLoginSession(Object id) { + return stpLogic.createLoginSession(id); + } + + /** + * 创建指定账号 id 的登录会话数据 + * + * @param id 账号id,建议的类型:(long | int | String) + * @param loginModel 此次登录的参数Model + * @return 返回会话令牌 + */ + public static String createLoginSession(Object id, SaLoginModel loginModel) { + return stpLogic.createLoginSession(id, loginModel); + } + + // --- 注销 + + /** + * 在当前客户端会话注销 + */ + public static void logout() { + stpLogic.logout(); + } + + /** + * 会话注销,根据账号id + * + * @param loginId 账号id + */ + public static void logout(Object loginId) { + stpLogic.logout(loginId); + } + + /** + * 会话注销,根据账号id 和 设备类型 + * + * @param loginId 账号id + * @param device 设备类型 (填 null 代表注销该账号的所有设备类型) + */ + public static void logout(Object loginId, String device) { + stpLogic.logout(loginId, device); + } + + /** + * 会话注销,根据指定 Token + * + * @param tokenValue 指定 token + */ + public static void logoutByTokenValue(String tokenValue) { + stpLogic.logoutByTokenValue(tokenValue); + } + + /** + * 踢人下线,根据账号id + *

当对方再次访问系统时,会抛出 NotLoginException 异常,场景值=-5

+ * + * @param loginId 账号id + */ + public static void kickout(Object loginId) { + stpLogic.kickout(loginId); + } + + /** + * 踢人下线,根据账号id 和 设备类型 + *

当对方再次访问系统时,会抛出 NotLoginException 异常,场景值=-5

+ * + * @param loginId 账号id + * @param device 设备类型 (填 null 代表踢出该账号的所有设备类型) + */ + public static void kickout(Object loginId, String device) { + stpLogic.kickout(loginId, device); + } + + /** + * 踢人下线,根据指定 token + *

当对方再次访问系统时,会抛出 NotLoginException 异常,场景值=-5

+ * + * @param tokenValue 指定 token + */ + public static void kickoutByTokenValue(String tokenValue) { + stpLogic.kickoutByTokenValue(tokenValue); + } + + /** + * 顶人下线,根据账号id 和 设备类型 + *

当对方再次访问系统时,会抛出 NotLoginException 异常,场景值=-4

+ * + * @param loginId 账号id + * @param device 设备类型 (填 null 代表顶替该账号的所有设备类型) + */ + public static void replaced(Object loginId, String device) { + stpLogic.replaced(loginId, device); + } + + // 会话查询 + + /** + * 判断当前会话是否已经登录 + * + * @return 已登录返回 true,未登录返回 false + */ + public static boolean isLogin() { + return stpLogic.isLogin(); + } + + /** + * 判断指定账号是否已经登录 + * + * @return 已登录返回 true,未登录返回 false + */ + public static boolean isLogin(Object loginId) { + return stpLogic.isLogin(loginId); + } + + /** + * 检验当前会话是否已经登录,如未登录,则抛出异常 + */ + public static void checkLogin() { + stpLogic.checkLogin(); + } + + /** + * 获取当前会话账号id,如果未登录,则抛出异常 + * + * @return 账号id + */ + public static Object getLoginId() { + return stpLogic.getLoginId(); + } + + /** + * 获取当前会话账号id, 如果未登录,则返回默认值 + * + * @param 返回类型 + * @param defaultValue 默认值 + * @return 登录id + */ + public static T getLoginId(T defaultValue) { + return stpLogic.getLoginId(defaultValue); + } + + /** + * 获取当前会话账号id, 如果未登录,则返回null + * + * @return 账号id + */ + public static Object getLoginIdDefaultNull() { + return stpLogic.getLoginIdDefaultNull(); + } + + /** + * 获取当前会话账号id, 并转换为 String 类型 + * + * @return 账号id + */ + public static String getLoginIdAsString() { + return stpLogic.getLoginIdAsString(); + } + + /** + * 获取当前会话账号id, 并转换为 int 类型 + * + * @return 账号id + */ + public static int getLoginIdAsInt() { + return stpLogic.getLoginIdAsInt(); + } + + /** + * 获取当前会话账号id, 并转换为 long 类型 + * + * @return 账号id + */ + public static long getLoginIdAsLong() { + return stpLogic.getLoginIdAsLong(); + } + + /** + * 获取指定 token 对应的账号id,如果未登录,则返回 null + * + * @param tokenValue token + * @return 账号id + */ + public static Object getLoginIdByToken(String tokenValue) { + return stpLogic.getLoginIdByToken(tokenValue); + } + + /** + * 获取当前 Token 的扩展信息(此函数只在jwt模式下生效) + * + * @param key 键值 + * @return 对应的扩展数据 + */ + public static Object getExtra(String key) { + return stpLogic.getExtra(key); + } + + /** + * 获取指定 Token 的扩展信息(此函数只在jwt模式下生效) + * + * @param tokenValue 指定的 Token 值 + * @param key 键值 + * @return 对应的扩展数据 + */ + public static Object getExtra(String tokenValue, String key) { + return stpLogic.getExtra(tokenValue, key); + } + + + // ------------------- Account-Session 相关 ------------------- + + /** + * 获取指定账号 id 的 Account-Session, 如果该 SaSession 尚未创建,isCreate=是否新建并返回 + * + * @param loginId 账号id + * @param isCreate 是否新建 + * @return SaSession 对象 + */ + public static SaSession getSessionByLoginId(Object loginId, boolean isCreate) { + return stpLogic.getSessionByLoginId(loginId, isCreate); + } + + /** + * 获取指定 key 的 SaSession, 如果该 SaSession 尚未创建,则返回 null + * + * @param sessionId SessionId + * @return Session对象 + */ + public static SaSession getSessionBySessionId(String sessionId) { + return stpLogic.getSessionBySessionId(sessionId); + } + + /** + * 获取指定账号 id 的 Account-Session,如果该 SaSession 尚未创建,则新建并返回 + * + * @param loginId 账号id + * @return SaSession 对象 + */ + public static SaSession getSessionByLoginId(Object loginId) { + return stpLogic.getSessionByLoginId(loginId); + } + + /** + * 获取当前已登录账号的 Account-Session, 如果该 SaSession 尚未创建,isCreate=是否新建并返回 + * + * @param isCreate 是否新建 + * @return Session对象 + */ + public static SaSession getSession(boolean isCreate) { + return stpLogic.getSession(isCreate); + } + + /** + * 获取当前已登录账号的 Account-Session,如果该 SaSession 尚未创建,则新建并返回 + * + * @return Session对象 + */ + public static SaSession getSession() { + return stpLogic.getSession(); + } + + + // ------------------- Token-Session 相关 ------------------- + + /** + * 获取指定 token 的 Token-Session,如果该 SaSession 尚未创建,则新建并返回 + * + * @param tokenValue Token值 + * @return Session对象 + */ + public static SaSession getTokenSessionByToken(String tokenValue) { + return stpLogic.getTokenSessionByToken(tokenValue); + } + + /** + * 获取当前 token 的 Token-Session,如果该 SaSession 尚未创建,则新建并返回 + * + * @return Session对象 + */ + public static SaSession getTokenSession() { + return stpLogic.getTokenSession(); + } + + /** + * 获取当前匿名 Token-Session (可在未登录情况下使用的Token-Session) + * + * @return Token-Session 对象 + */ + public static SaSession getAnonTokenSession() { + return stpLogic.getAnonTokenSession(); + } + + + // ------------------- Active-Timeout token 最低活跃度 验证相关 ------------------- + + /** + * 续签当前 token:(将 [最后操作时间] 更新为当前时间戳) + *

+ * 请注意: 即使 token 已被冻结 也可续签成功, + * 如果此场景下需要提示续签失败,可在此之前调用 checkActiveTimeout() 强制检查是否冻结即可 + *

+ */ + public static void updateLastActiveToNow() { + stpLogic.updateLastActiveToNow(); + } + + /** + * 检查当前 token 是否已被冻结,如果是则抛出异常 + */ + public static void checkActiveTimeout() { + stpLogic.checkActiveTimeout(); + } + + + // ------------------- 过期时间相关 ------------------- + + /** + * 获取当前会话 token 剩余有效时间(单位: 秒,返回 -1 代表永久有效,-2 代表没有这个值) + * + * @return token剩余有效时间 + */ + public static long getTokenTimeout() { + return stpLogic.getTokenTimeout(); + } + + /** + * 获取指定 token 剩余有效时间(单位: 秒,返回 -1 代表永久有效,-2 代表没有这个值) + * + * @param token 指定token + * @return token剩余有效时间 + */ + public static long getTokenTimeout(String token) { + return stpLogic.getTokenTimeout(token); + } + + /** + * 获取当前登录账号的 Account-Session 剩余有效时间(单位: 秒,返回 -1 代表永久有效,-2 代表没有这个值) + * + * @return token剩余有效时间 + */ + public static long getSessionTimeout() { + return stpLogic.getSessionTimeout(); + } + + /** + * 获取当前 token 的 Token-Session 剩余有效时间(单位: 秒,返回 -1 代表永久有效,-2 代表没有这个值) + * + * @return token剩余有效时间 + */ + public static long getTokenSessionTimeout() { + return stpLogic.getTokenSessionTimeout(); + } + + /** + * 获取当前 token 剩余活跃有效期:当前 token 距离被冻结还剩多少时间(单位: 秒,返回 -1 代表永不冻结,-2 代表没有这个值或 token 已被冻结了) + * + * @return / + */ + public static long getTokenActiveTimeout() { + return stpLogic.getTokenActiveTimeout(); + } + + /** + * 对当前 token 的 timeout 值进行续期 + * + * @param timeout 要修改成为的有效时间 (单位: 秒) + */ + public static void renewTimeout(long timeout) { + stpLogic.renewTimeout(timeout); + } + + /** + * 对指定 token 的 timeout 值进行续期 + * + * @param tokenValue 指定 token + * @param timeout 要修改成为的有效时间 (单位: 秒,填 -1 代表要续为永久有效) + */ + public static void renewTimeout(String tokenValue, long timeout) { + stpLogic.renewTimeout(tokenValue, timeout); + } + + + // ------------------- 角色认证操作 ------------------- + + /** + * 获取:当前账号的角色集合 + * + * @return / + */ + public static List getRoleList() { + return stpLogic.getRoleList(); + } + + /** + * 获取:指定账号的角色集合 + * + * @param loginId 指定账号id + * @return / + */ + public static List getRoleList(Object loginId) { + return stpLogic.getRoleList(loginId); + } + + /** + * 判断:当前账号是否拥有指定角色, 返回 true 或 false + * + * @param role 角色 + * @return / + */ + public static boolean hasRole(String role) { + return stpLogic.hasRole(role); + } + + /** + * 判断:指定账号是否含有指定角色标识, 返回 true 或 false + * + * @param loginId 账号id + * @param role 角色标识 + * @return 是否含有指定角色标识 + */ + public static boolean hasRole(Object loginId, String role) { + return stpLogic.hasRole(loginId, role); + } + + /** + * 判断:当前账号是否含有指定角色标识 [ 指定多个,必须全部验证通过 ] + * + * @param roleArray 角色标识数组 + * @return true或false + */ + public static boolean hasRoleAnd(String... roleArray){ + return stpLogic.hasRoleAnd(roleArray); + } + + /** + * 判断:当前账号是否含有指定角色标识 [ 指定多个,只要其一验证通过即可 ] + * + * @param roleArray 角色标识数组 + * @return true或false + */ + public static boolean hasRoleOr(String... roleArray){ + return stpLogic.hasRoleOr(roleArray); + } + + /** + * 校验:当前账号是否含有指定角色标识, 如果验证未通过,则抛出异常: NotRoleException + * + * @param role 角色标识 + */ + public static void checkRole(String role) { + stpLogic.checkRole(role); + } + + /** + * 校验:当前账号是否含有指定角色标识 [ 指定多个,必须全部验证通过 ] + * + * @param roleArray 角色标识数组 + */ + public static void checkRoleAnd(String... roleArray){ + stpLogic.checkRoleAnd(roleArray); + } + + /** + * 校验:当前账号是否含有指定角色标识 [ 指定多个,只要其一验证通过即可 ] + * + * @param roleArray 角色标识数组 + */ + public static void checkRoleOr(String... roleArray){ + stpLogic.checkRoleOr(roleArray); + } + + + // ------------------- 权限认证操作 ------------------- + + /** + * 获取:当前账号的权限码集合 + * + * @return / + */ + public static List getPermissionList() { + return stpLogic.getPermissionList(); + } + + /** + * 获取:指定账号的权限码集合 + * + * @param loginId 指定账号id + * @return / + */ + public static List getPermissionList(Object loginId) { + return stpLogic.getPermissionList(loginId); + } + + /** + * 判断:当前账号是否含有指定权限, 返回 true 或 false + * + * @param permission 权限码 + * @return 是否含有指定权限 + */ + public static boolean hasPermission(String permission) { + return stpLogic.hasPermission(permission); + } + + /** + * 判断:指定账号 id 是否含有指定权限, 返回 true 或 false + * + * @param loginId 账号 id + * @param permission 权限码 + * @return 是否含有指定权限 + */ + public static boolean hasPermission(Object loginId, String permission) { + return stpLogic.hasPermission(loginId, permission); + } + + /** + * 判断:当前账号是否含有指定权限 [ 指定多个,必须全部具有 ] + * + * @param permissionArray 权限码数组 + * @return true 或 false + */ + public static boolean hasPermissionAnd(String... permissionArray){ + return stpLogic.hasPermissionAnd(permissionArray); + } + + /** + * 判断:当前账号是否含有指定权限 [ 指定多个,只要其一验证通过即可 ] + * + * @param permissionArray 权限码数组 + * @return true 或 false + */ + public static boolean hasPermissionOr(String... permissionArray){ + return stpLogic.hasPermissionOr(permissionArray); + } + + /** + * 校验:当前账号是否含有指定权限, 如果验证未通过,则抛出异常: NotPermissionException + * + * @param permission 权限码 + */ + public static void checkPermission(String permission) { + stpLogic.checkPermission(permission); + } + + /** + * 校验:当前账号是否含有指定权限 [ 指定多个,必须全部验证通过 ] + * + * @param permissionArray 权限码数组 + */ + public static void checkPermissionAnd(String... permissionArray) { + stpLogic.checkPermissionAnd(permissionArray); + } + + /** + * 校验:当前账号是否含有指定权限 [ 指定多个,只要其一验证通过即可 ] + * + * @param permissionArray 权限码数组 + */ + public static void checkPermissionOr(String... permissionArray) { + stpLogic.checkPermissionOr(permissionArray); + } + + + // ------------------- id 反查 token 相关操作 ------------------- + + /** + * 获取指定账号 id 的 token + *

+ * 在配置为允许并发登录时,此方法只会返回队列的最后一个 token, + * 如果你需要返回此账号 id 的所有 token,请调用 getTokenValueListByLoginId + *

+ * + * @param loginId 账号id + * @return token值 + */ + public static String getTokenValueByLoginId(Object loginId) { + return stpLogic.getTokenValueByLoginId(loginId); + } + + /** + * 获取指定账号 id 指定设备类型端的 token + *

+ * 在配置为允许并发登录时,此方法只会返回队列的最后一个 token, + * 如果你需要返回此账号 id 的所有 token,请调用 getTokenValueListByLoginId + *

+ * + * @param loginId 账号id + * @param device 设备类型,填 null 代表不限设备类型 + * @return token值 + */ + public static String getTokenValueByLoginId(Object loginId, String device) { + return stpLogic.getTokenValueByLoginId(loginId, device); + } + + /** + * 获取指定账号 id 的 token 集合 + * + * @param loginId 账号id + * @return 此 loginId 的所有相关 token + */ + public static List getTokenValueListByLoginId(Object loginId) { + return stpLogic.getTokenValueListByLoginId(loginId); + } + + /** + * 获取指定账号 id 指定设备类型端的 token 集合 + * + * @param loginId 账号id + * @param device 设备类型,填 null 代表不限设备类型 + * @return 此 loginId 的所有登录 token + */ + public static List getTokenValueListByLoginId(Object loginId, String device) { + return stpLogic.getTokenValueListByLoginId(loginId, device); + } + + /** + * 获取指定账号 id 指定设备类型端的 tokenSign 集合 + * + * @param loginId 账号id + * @param device 设备类型,填 null 代表不限设备类型 + * @return 此 loginId 的所有登录 tokenSign + */ + public static List getTokenSignListByLoginId(Object loginId, String device) { + return stpLogic.getTokenSignListByLoginId(loginId, device); + } + + /** + * 返回当前会话的登录设备类型 + * + * @return 当前令牌的登录设备类型 + */ + public static String getLoginDevice() { + return stpLogic.getLoginDevice(); + } + + + // ------------------- 会话管理 ------------------- + + /** + * 根据条件查询缓存中所有的 token + * + * @param keyword 关键字 + * @param start 开始处索引 + * @param size 获取数量 (-1代表一直获取到末尾) + * @param sortType 排序类型(true=正序,false=反序) + * + * @return token集合 + */ + public static List searchTokenValue(String keyword, int start, int size, boolean sortType) { + return stpLogic.searchTokenValue(keyword, start, size, sortType); + } + + /** + * 根据条件查询缓存中所有的 SessionId + * + * @param keyword 关键字 + * @param start 开始处索引 + * @param size 获取数量 (-1代表一直获取到末尾) + * @param sortType 排序类型(true=正序,false=反序) + * + * @return sessionId集合 + */ + public static List searchSessionId(String keyword, int start, int size, boolean sortType) { + return stpLogic.searchSessionId(keyword, start, size, sortType); + } + + /** + * 根据条件查询缓存中所有的 Token-Session-Id + * + * @param keyword 关键字 + * @param start 开始处索引 + * @param size 获取数量 (-1代表一直获取到末尾) + * @param sortType 排序类型(true=正序,false=反序) + * + * @return sessionId集合 + */ + public static List searchTokenSessionId(String keyword, int start, int size, boolean sortType) { + return stpLogic.searchTokenSessionId(keyword, start, size, sortType); + } + + + // ------------------- 账号封禁 ------------------- + + /** + * 封禁:指定账号 + *

此方法不会直接将此账号id踢下线,如需封禁后立即掉线,请追加调用 StpUtil.logout(id) + * + * @param loginId 指定账号id + * @param time 封禁时间, 单位: 秒 (-1=永久封禁) + */ + public static void disable(Object loginId, long time) { + stpLogic.disable(loginId, time); + } + + /** + * 判断:指定账号是否已被封禁 (true=已被封禁, false=未被封禁) + * + * @param loginId 账号id + * @return / + */ + public static boolean isDisable(Object loginId) { + return stpLogic.isDisable(loginId); + } + + /** + * 校验:指定账号是否已被封禁,如果被封禁则抛出异常 + * + * @param loginId 账号id + */ + public static void checkDisable(Object loginId) { + stpLogic.checkDisable(loginId); + } + + /** + * 获取:指定账号剩余封禁时间,单位:秒(-1=永久封禁,-2=未被封禁) + * + * @param loginId 账号id + * @return / + */ + public static long getDisableTime(Object loginId) { + return stpLogic.getDisableTime(loginId); + } + + /** + * 解封:指定账号 + * + * @param loginId 账号id + */ + public static void untieDisable(Object loginId) { + stpLogic.untieDisable(loginId); + } + + + // ------------------- 分类封禁 ------------------- + + /** + * 封禁:指定账号的指定服务 + *

此方法不会直接将此账号id踢下线,如需封禁后立即掉线,请追加调用 StpUtil.logout(id) + * + * @param loginId 指定账号id + * @param service 指定服务 + * @param time 封禁时间, 单位: 秒 (-1=永久封禁) + */ + public static void disable(Object loginId, String service, long time) { + stpLogic.disable(loginId, service, time); + } + + /** + * 判断:指定账号的指定服务 是否已被封禁(true=已被封禁, false=未被封禁) + * + * @param loginId 账号id + * @param service 指定服务 + * @return / + */ + public static boolean isDisable(Object loginId, String service) { + return stpLogic.isDisable(loginId, service); + } + + /** + * 校验:指定账号 指定服务 是否已被封禁,如果被封禁则抛出异常 + * + * @param loginId 账号id + * @param services 指定服务,可以指定多个 + */ + public static void checkDisable(Object loginId, String... services) { + stpLogic.checkDisable(loginId, services); + } + + /** + * 获取:指定账号 指定服务 剩余封禁时间,单位:秒(-1=永久封禁,-2=未被封禁) + * + * @param loginId 账号id + * @param service 指定服务 + * @return see note + */ + public static long getDisableTime(Object loginId, String service) { + return stpLogic.getDisableTime(loginId, service); + } + + /** + * 解封:指定账号、指定服务 + * + * @param loginId 账号id + * @param services 指定服务,可以指定多个 + */ + public static void untieDisable(Object loginId, String... services) { + stpLogic.untieDisable(loginId, services); + } + + + // ------------------- 阶梯封禁 ------------------- + + /** + * 封禁:指定账号,并指定封禁等级 + * + * @param loginId 指定账号id + * @param level 指定封禁等级 + * @param time 封禁时间, 单位: 秒 (-1=永久封禁) + */ + public static void disableLevel(Object loginId, int level, long time) { + stpLogic.disableLevel(loginId, level, time); + } + + /** + * 封禁:指定账号的指定服务,并指定封禁等级 + * + * @param loginId 指定账号id + * @param service 指定封禁服务 + * @param level 指定封禁等级 + * @param time 封禁时间, 单位: 秒 (-1=永久封禁) + */ + public static void disableLevel(Object loginId, String service, int level, long time) { + stpLogic.disableLevel(loginId, service, level, time); + } + + /** + * 判断:指定账号是否已被封禁到指定等级 + * + * @param loginId 指定账号id + * @param level 指定封禁等级 + * @return / + */ + public static boolean isDisableLevel(Object loginId, int level) { + return stpLogic.isDisableLevel(loginId, level); + } + + /** + * 判断:指定账号的指定服务,是否已被封禁到指定等级 + * + * @param loginId 指定账号id + * @param service 指定封禁服务 + * @param level 指定封禁等级 + * @return / + */ + public static boolean isDisableLevel(Object loginId, String service, int level) { + return stpLogic.isDisableLevel(loginId, service, level); + } + + /** + * 校验:指定账号是否已被封禁到指定等级(如果已经达到,则抛出异常) + * + * @param loginId 指定账号id + * @param level 封禁等级 (只有 封禁等级 ≥ 此值 才会抛出异常) + */ + public static void checkDisableLevel(Object loginId, int level) { + stpLogic.checkDisableLevel(loginId, level); + } + + /** + * 校验:指定账号的指定服务,是否已被封禁到指定等级(如果已经达到,则抛出异常) + * + * @param loginId 指定账号id + * @param service 指定封禁服务 + * @param level 封禁等级 (只有 封禁等级 ≥ 此值 才会抛出异常) + */ + public static void checkDisableLevel(Object loginId, String service, int level) { + stpLogic.checkDisableLevel(loginId, service, level); + } + + /** + * 获取:指定账号被封禁的等级,如果未被封禁则返回-2 + * + * @param loginId 指定账号id + * @return / + */ + public static int getDisableLevel(Object loginId) { + return stpLogic.getDisableLevel(loginId); + } + + /** + * 获取:指定账号的 指定服务 被封禁的等级,如果未被封禁则返回-2 + * + * @param loginId 指定账号id + * @param service 指定封禁服务 + * @return / + */ + public static int getDisableLevel(Object loginId, String service) { + return stpLogic.getDisableLevel(loginId, service); + } + + + // ------------------- 临时身份切换 ------------------- + + /** + * 临时切换身份为指定账号id + * + * @param loginId 指定loginId + */ + public static void switchTo(Object loginId) { + stpLogic.switchTo(loginId); + } + + /** + * 结束临时切换身份 + */ + public static void endSwitch() { + stpLogic.endSwitch(); + } + + /** + * 判断当前请求是否正处于 [ 身份临时切换 ] 中 + * + * @return / + */ + public static boolean isSwitch() { + return stpLogic.isSwitch(); + } + + /** + * 在一个 lambda 代码段里,临时切换身份为指定账号id,lambda 结束后自动恢复 + * + * @param loginId 指定账号id + * @param function 要执行的方法 + */ + public static void switchTo(Object loginId, SaFunction function) { + stpLogic.switchTo(loginId, function); + } + + + // ------------------- 二级认证 ------------------- + + /** + * 在当前会话 开启二级认证 + * + * @param safeTime 维持时间 (单位: 秒) + */ + public static void openSafe(long safeTime) { + stpLogic.openSafe(safeTime); + } + + /** + * 在当前会话 开启二级认证 + * + * @param service 业务标识 + * @param safeTime 维持时间 (单位: 秒) + */ + public static void openSafe(String service, long safeTime) { + stpLogic.openSafe(service, safeTime); + } + + /** + * 判断:当前会话是否处于二级认证时间内 + * + * @return true=二级认证已通过, false=尚未进行二级认证或认证已超时 + */ + public static boolean isSafe() { + return stpLogic.isSafe(); + } + + /** + * 判断:当前会话 是否处于指定业务的二级认证时间内 + * + * @param service 业务标识 + * @return true=二级认证已通过, false=尚未进行二级认证或认证已超时 + */ + public static boolean isSafe(String service) { + return stpLogic.isSafe(service); + } + + /** + * 判断:指定 token 是否处于二级认证时间内 + * + * @param tokenValue Token 值 + * @param service 业务标识 + * @return true=二级认证已通过, false=尚未进行二级认证或认证已超时 + */ + public static boolean isSafe(String tokenValue, String service) { + return stpLogic.isSafe(tokenValue, service); + } + + /** + * 校验:当前会话是否已通过二级认证,如未通过则抛出异常 + */ + public static void checkSafe() { + stpLogic.checkSafe(); + } + + /** + * 校验:检查当前会话是否已通过指定业务的二级认证,如未通过则抛出异常 + * + * @param service 业务标识 + */ + public static void checkSafe(String service) { + stpLogic.checkSafe(service); + } + + /** + * 获取:当前会话的二级认证剩余有效时间(单位: 秒, 返回-2代表尚未通过二级认证) + * + * @return 剩余有效时间 + */ + public static long getSafeTime() { + return stpLogic.getSafeTime(); + } + + /** + * 获取:当前会话的二级认证剩余有效时间(单位: 秒, 返回-2代表尚未通过二级认证) + * + * @param service 业务标识 + * @return 剩余有效时间 + */ + public static long getSafeTime(String service) { + return stpLogic.getSafeTime(service); + } + + /** + * 在当前会话 结束二级认证 + */ + public static void closeSafe() { + stpLogic.closeSafe(); + } + + /** + * 在当前会话 结束指定业务标识的二级认证 + * + * @param service 业务标识 + */ + public static void closeSafe(String service) { + stpLogic.closeSafe(service); + } + +} diff --git a/mall-portal/src/main/resources/application.yml b/mall-portal/src/main/resources/application.yml index 349b335..25d25b9 100644 --- a/mall-portal/src/main/resources/application.yml +++ b/mall-portal/src/main/resources/application.yml @@ -22,12 +22,12 @@ spring: host: localhost port: 27017 database: mall-port - redis: - host: localhost # Redis服务器地址 - database: 0 # Redis数据库索引(默认为0) - port: 6379 # Redis服务器连接端口 - password: # Redis服务器连接密码(默认为空) - timeout: 3000ms # 连接超时时间(毫秒) + redis: + host: localhost # Redis服务器地址 + database: 0 # Redis数据库索引(默认为0) + port: 6379 # Redis服务器连接端口 + password: # Redis服务器连接密码(默认为空) + timeout: 3000ms # 连接超时时间(毫秒) rabbitmq: host: localhost port: 5672 @@ -38,18 +38,22 @@ mybatis: mapper-locations: - classpath:dao/*.xml - classpath*:com/**/mapper/*.xml -management: #开启SpringBoot Admin的监控 +management: endpoints: web: exposure: - include: '*' + include: '*' #暴露Actuator的监控端点 endpoint: health: - show-details: always - -# 自定义redis key + show-details: always #显示健康的详细信息 + env: + show-values: always #默认Actuator的环境变量会以****显示,这里开启显示 + configprops: + show-values: always #默认Actuator的配置属性会以****显示,这里开启显示 + info: + enabled: true redis: - database: mall + database: mall-swarm key: authCode: 'ums:authCode' orderId: 'oms:orderId' @@ -57,18 +61,48 @@ redis: expire: authCode: 90 # 验证码超期时间 common: 86400 # 24小时 - -# 消息队列定义 rabbitmq: queue: name: cancelOrder: cancelOrderQueue -feign: - okhttp: +springdoc: + swagger-ui: + # 修改Swagger UI路径 + path: /swagger-ui.html + # 开启Swagger UI界面 enabled: true - client: - config: - default: - connectTimeout: 5000 - readTimeout: 5000 - loggerLevel: basic + # 用于配置tag和operation的展开方式,这里配置为都不展开 + doc-expansion: 'none' + api-docs: + # 修改api-docs路径 + path: /v3/api-docs + # 开启api-docs + enabled: true + group-configs: + - group: 'mall-portal' + packages-to-scan: com.macro.mall.portal.controller +sa-token: + # token名称 (同时也是cookie名称) + token-name: Authorization + # token有效期,单位秒,-1代表永不过期 + timeout: 604800 + # token临时有效期 (指定时间内无操作就视为token过期),单位秒 + active-timeout: -1 + # 是否允许同一账号并发登录 (为false时新登录挤掉旧登录) + is-concurrent: true + # 在多人登录同一账号时,是否共用一个token (为false时每次登录新建一个token) + is-share: false + # token风格 + token-style: uuid + # 是否输出操作日志 + is-log: false + # 是否从cookie中读取token + is-read-cookie: false + # 是否从head中读取token + is-read-header: true + # token前缀 + token-prefix: Bearer + # jwt秘钥 + jwt-secret-key: sa-secret-key123 + # 是否打印banner + is-print: false diff --git a/mall-search/pom.xml b/mall-search/pom.xml index 625275a..ca000d6 100644 --- a/mall-search/pom.xml +++ b/mall-search/pom.xml @@ -44,6 +44,10 @@ com.alibaba.cloud spring-cloud-starter-alibaba-nacos-config + + de.codecentric + spring-boot-admin-starter-client + diff --git a/mall-search/src/main/java/com/macro/mall/search/config/SpringDocConfig.java b/mall-search/src/main/java/com/macro/mall/search/config/SpringDocConfig.java new file mode 100644 index 0000000..4aac470 --- /dev/null +++ b/mall-search/src/main/java/com/macro/mall/search/config/SpringDocConfig.java @@ -0,0 +1,39 @@ +package com.macro.mall.search.config; + +import io.swagger.v3.oas.models.ExternalDocumentation; +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.info.Info; +import io.swagger.v3.oas.models.info.License; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +/** + * SpringDoc相关配置 + * Created by macro on 2024/3/5. + */ +@Configuration +public class SpringDocConfig implements WebMvcConfigurer { + + @Bean + public OpenAPI mallSearchOpenAPI() { + return new OpenAPI() + .info(new Info().title("mall搜索系统") + .description("mall搜索相关接口文档") + .version("v1.0.0") + .license(new License().name("Apache 2.0") + .url("https://github.com/macrozheng/mall-learning"))) + .externalDocs(new ExternalDocumentation() + .description("SpringBoot实战电商项目mall(60K+Star)全套文档") + .url("http://www.macrozheng.com")); + } + + @Override + public void addViewControllers(ViewControllerRegistry registry) { + //配置访问`/swagger-ui/`路径时可以直接跳转到`/swagger-ui/index.html` + registry.addViewController("/swagger-ui/").setViewName("redirect:/swagger-ui/index.html"); + } + +} + diff --git a/mall-search/src/main/java/com/macro/mall/search/config/SwaggerConfig.java b/mall-search/src/main/java/com/macro/mall/search/config/SwaggerConfig.java deleted file mode 100644 index 23edcd3..0000000 --- a/mall-search/src/main/java/com/macro/mall/search/config/SwaggerConfig.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.macro.mall.search.config; - -import com.macro.mall.common.config.BaseSwaggerConfig; -import com.macro.mall.common.domain.SwaggerProperties; -import org.springframework.beans.factory.config.BeanPostProcessor; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import springfox.documentation.swagger2.annotations.EnableSwagger2; - -/** - * Swagger API文档相关配置 - * Created by macro on 2018/4/26. - */ -@Configuration -@EnableSwagger2 -public class SwaggerConfig extends BaseSwaggerConfig { - - @Override - public SwaggerProperties swaggerProperties() { - return SwaggerProperties.builder() - .apiBasePackage("com.macro.mall.search.controller") - .title("mall搜索系统") - .description("mall搜索相关接口文档") - .contactName("macro") - .version("1.0") - .enableSecurity(false) - .build(); - } - - @Bean - public BeanPostProcessor springfoxHandlerProviderBeanPostProcessor() { - return generateBeanPostProcessor(); - } -} diff --git a/mall-search/src/main/java/com/macro/mall/search/controller/EsProductController.java b/mall-search/src/main/java/com/macro/mall/search/controller/EsProductController.java index f5ac575..d88b936 100644 --- a/mall-search/src/main/java/com/macro/mall/search/controller/EsProductController.java +++ b/mall-search/src/main/java/com/macro/mall/search/controller/EsProductController.java @@ -5,9 +5,11 @@ import com.macro.mall.common.api.CommonResult; import com.macro.mall.search.domain.EsProduct; import com.macro.mall.search.domain.EsProductRelatedInfo; import com.macro.mall.search.service.EsProductService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.stereotype.Controller; @@ -20,13 +22,13 @@ import java.util.List; * Created by macro on 2018/6/19. */ @Controller -@Api(tags = "EsProductController", description = "搜索商品管理") +@Tag(name = "EsProductController", description = "搜索商品管理") @RequestMapping("/esProduct") public class EsProductController { @Autowired private EsProductService esProductService; - @ApiOperation(value = "导入所有数据库中商品到ES") + @Operation(summary = "导入所有数据库中商品到ES") @RequestMapping(value = "/importAll", method = RequestMethod.POST) @ResponseBody public CommonResult importAllList() { @@ -34,7 +36,7 @@ public class EsProductController { return CommonResult.success(count); } - @ApiOperation(value = "根据id删除商品") + @Operation(summary = "根据id删除商品") @RequestMapping(value = "/delete/{id}", method = RequestMethod.GET) @ResponseBody public CommonResult delete(@PathVariable Long id) { @@ -42,7 +44,7 @@ public class EsProductController { return CommonResult.success(null); } - @ApiOperation(value = "根据id批量删除商品") + @Operation(summary = "根据id批量删除商品") @RequestMapping(value = "/delete/batch", method = RequestMethod.POST) @ResponseBody public CommonResult delete(@RequestParam("ids") List ids) { @@ -50,7 +52,7 @@ public class EsProductController { return CommonResult.success(null); } - @ApiOperation(value = "根据id创建商品") + @Operation(summary = "根据id创建商品") @RequestMapping(value = "/create/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult create(@PathVariable Long id) { @@ -62,7 +64,7 @@ public class EsProductController { } } - @ApiOperation(value = "简单搜索") + @Operation(summary = "简单搜索") @RequestMapping(value = "/search/simple", method = RequestMethod.GET) @ResponseBody public CommonResult> search(@RequestParam(required = false) String keyword, @@ -72,9 +74,8 @@ public class EsProductController { return CommonResult.success(CommonPage.restPage(esProductPage)); } - @ApiOperation(value = "综合搜索、筛选、排序") - @ApiImplicitParam(name = "sort", value = "排序字段:0->按相关度;1->按新品;2->按销量;3->价格从低到高;4->价格从高到低", - defaultValue = "0", allowableValues = "0,1,2,3,4", paramType = "query", dataType = "integer") + @Operation(summary = "综合搜索、筛选、排序") + @Parameter(name = "sort", description = "排序字段:0->按相关度;1->按新品;2->按销量;3->价格从低到高;4->价格从高到低", in = ParameterIn.QUERY, schema = @Schema(type = "integer",defaultValue = "0",allowableValues = {"0","1","2","3","4"})) @RequestMapping(value = "/search", method = RequestMethod.GET) @ResponseBody public CommonResult> search(@RequestParam(required = false) String keyword, @@ -87,7 +88,7 @@ public class EsProductController { return CommonResult.success(CommonPage.restPage(esProductPage)); } - @ApiOperation(value = "根据商品id推荐商品") + @Operation(summary = "根据商品id推荐商品") @RequestMapping(value = "/recommend/{id}", method = RequestMethod.GET) @ResponseBody public CommonResult> recommend(@PathVariable Long id, @@ -97,7 +98,7 @@ public class EsProductController { return CommonResult.success(CommonPage.restPage(esProductPage)); } - @ApiOperation(value = "获取搜索的相关品牌、分类及筛选属性") + @Operation(summary = "获取搜索的相关品牌、分类及筛选属性") @RequestMapping(value = "/search/relate", method = RequestMethod.GET) @ResponseBody public CommonResult searchRelatedInfo(@RequestParam(required = false) String keyword) { diff --git a/mall-search/src/main/java/com/macro/mall/search/service/impl/EsProductServiceImpl.java b/mall-search/src/main/java/com/macro/mall/search/service/impl/EsProductServiceImpl.java index a0bb232..b0d0ef8 100644 --- a/mall-search/src/main/java/com/macro/mall/search/service/impl/EsProductServiceImpl.java +++ b/mall-search/src/main/java/com/macro/mall/search/service/impl/EsProductServiceImpl.java @@ -1,52 +1,35 @@ package com.macro.mall.search.service.impl; +import cn.hutool.core.collection.ListUtil; +import cn.hutool.core.map.MapUtil; +import cn.hutool.core.util.StrUtil; +import co.elastic.clients.elasticsearch._types.aggregations.*; +import co.elastic.clients.elasticsearch._types.aggregations.Aggregation; +import co.elastic.clients.elasticsearch._types.query_dsl.*; +import co.elastic.clients.elasticsearch._types.query_dsl.QueryBuilders; +import co.elastic.clients.util.ObjectBuilder; import com.macro.mall.search.dao.EsProductDao; import com.macro.mall.search.domain.EsProduct; import com.macro.mall.search.domain.EsProductRelatedInfo; import com.macro.mall.search.repository.EsProductRepository; import com.macro.mall.search.service.EsProductService; -import org.elasticsearch.common.lucene.search.function.FunctionScoreQuery; -import org.elasticsearch.index.query.BoolQueryBuilder; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.index.query.functionscore.FunctionScoreQueryBuilder; -import org.elasticsearch.index.query.functionscore.ScoreFunctionBuilders; -import org.elasticsearch.search.aggregations.AbstractAggregationBuilder; -import org.elasticsearch.search.aggregations.Aggregation; -import org.elasticsearch.search.aggregations.AggregationBuilders; -import org.elasticsearch.search.aggregations.Aggregations; -import org.elasticsearch.search.aggregations.bucket.filter.ParsedFilter; -import org.elasticsearch.search.aggregations.bucket.nested.ParsedNested; -import org.elasticsearch.search.aggregations.bucket.terms.ParsedLongTerms; -import org.elasticsearch.search.aggregations.bucket.terms.ParsedStringTerms; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.search.sort.SortBuilders; -import org.elasticsearch.search.sort.SortOrder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.PageImpl; -import org.springframework.data.domain.PageRequest; -import org.springframework.data.domain.Pageable; -import org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate; +import org.springframework.data.domain.*; +import org.springframework.data.elasticsearch.client.elc.*; import org.springframework.data.elasticsearch.core.SearchHit; import org.springframework.data.elasticsearch.core.SearchHits; -import org.springframework.data.elasticsearch.core.mapping.IndexCoordinates; -import org.springframework.data.elasticsearch.core.query.NativeSearchQuery; -import org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilder; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; -import org.springframework.util.StringUtils; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.Map; +import java.util.*; +import java.util.function.Function; import java.util.stream.Collectors; /** - * 商品搜索管理Service实现类 + * 搜索商品管理Service实现类 * Created by macro on 2018/6/19. */ @Service @@ -57,7 +40,7 @@ public class EsProductServiceImpl implements EsProductService { @Autowired private EsProductRepository productRepository; @Autowired - private ElasticsearchRestTemplate elasticsearchRestTemplate; + private ElasticsearchTemplate elasticsearchTemplate; @Override public int importAll() { List esProductList = productDao.getAllEsProductList(null); @@ -109,61 +92,66 @@ public class EsProductServiceImpl implements EsProductService { @Override public Page search(String keyword, Long brandId, Long productCategoryId, Integer pageNum, Integer pageSize,Integer sort) { Pageable pageable = PageRequest.of(pageNum, pageSize); - NativeSearchQueryBuilder nativeSearchQueryBuilder = new NativeSearchQueryBuilder(); + NativeQueryBuilder nativeQueryBuilder = new NativeQueryBuilder(); //分页 - nativeSearchQueryBuilder.withPageable(pageable); + nativeQueryBuilder.withPageable(pageable); //过滤 if (brandId != null || productCategoryId != null) { - BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery(); - if (brandId != null) { - boolQueryBuilder.must(QueryBuilders.termQuery("brandId", brandId)); - } - if (productCategoryId != null) { - boolQueryBuilder.must(QueryBuilders.termQuery("productCategoryId", productCategoryId)); - } - nativeSearchQueryBuilder.withFilter(boolQueryBuilder); + Query boolQuery = QueryBuilders.bool(builder -> { + if (brandId != null) { + builder.must(QueryBuilders.term(b -> b.field("brandId").value(brandId))); + } + if (productCategoryId != null) { + builder.must(QueryBuilders.term(b -> b.field("productCategoryId").value(productCategoryId))); + } + return builder; + }); + nativeQueryBuilder.withFilter(boolQuery); } //搜索 - if (StringUtils.isEmpty(keyword)) { - nativeSearchQueryBuilder.withQuery(QueryBuilders.matchAllQuery()); + if (StrUtil.isEmpty(keyword)) { + nativeQueryBuilder.withQuery(QueryBuilders.matchAll(builder -> builder)); } else { - List filterFunctionBuilders = new ArrayList<>(); - filterFunctionBuilders.add(new FunctionScoreQueryBuilder.FilterFunctionBuilder(QueryBuilders.matchQuery("name", keyword), - ScoreFunctionBuilders.weightFactorFunction(10))); - filterFunctionBuilders.add(new FunctionScoreQueryBuilder.FilterFunctionBuilder(QueryBuilders.matchQuery("subTitle", keyword), - ScoreFunctionBuilders.weightFactorFunction(5))); - filterFunctionBuilders.add(new FunctionScoreQueryBuilder.FilterFunctionBuilder(QueryBuilders.matchQuery("keywords", keyword), - ScoreFunctionBuilders.weightFactorFunction(2))); - FunctionScoreQueryBuilder.FilterFunctionBuilder[] builders = new FunctionScoreQueryBuilder.FilterFunctionBuilder[filterFunctionBuilders.size()]; - filterFunctionBuilders.toArray(builders); - FunctionScoreQueryBuilder functionScoreQueryBuilder = QueryBuilders.functionScoreQuery(builders) - .scoreMode(FunctionScoreQuery.ScoreMode.SUM) - .setMinScore(2); - nativeSearchQueryBuilder.withQuery(functionScoreQueryBuilder); + List functionScoreList = new ArrayList<>(); + functionScoreList.add(new FunctionScore.Builder() + .filter(QueryBuilders.match(builder -> builder.field("name").query(keyword))) + .weight(10.0) + .build()); + functionScoreList.add(new FunctionScore.Builder() + .filter(QueryBuilders.match(builder -> builder.field("subTitle").query(keyword))) + .weight(5.0) + .build()); + functionScoreList.add(new FunctionScore.Builder() + .filter(QueryBuilders.match(builder -> builder.field("keywords").query(keyword))) + .weight(2.0) + .build()); + FunctionScoreQuery.Builder functionScoreQueryBuilder = QueryBuilders.functionScore() + .functions(functionScoreList) + .scoreMode(FunctionScoreMode.Sum) + .minScore(2.0); + nativeQueryBuilder.withQuery(builder -> builder.functionScore(functionScoreQueryBuilder.build())); } //排序 if(sort==1){ //按新品从新到旧 - nativeSearchQueryBuilder.withSort(SortBuilders.fieldSort("id").order(SortOrder.DESC)); + nativeQueryBuilder.withSort(Sort.by(Sort.Order.desc("id"))); }else if(sort==2){ //按销量从高到低 - nativeSearchQueryBuilder.withSort(SortBuilders.fieldSort("sale").order(SortOrder.DESC)); + nativeQueryBuilder.withSort(Sort.by(Sort.Order.desc("sale"))); }else if(sort==3){ //按价格从低到高 - nativeSearchQueryBuilder.withSort(SortBuilders.fieldSort("price").order(SortOrder.ASC)); + nativeQueryBuilder.withSort(Sort.by(Sort.Order.asc("price"))); }else if(sort==4){ //按价格从高到低 - nativeSearchQueryBuilder.withSort(SortBuilders.fieldSort("price").order(SortOrder.DESC)); - }else{ - //按相关度 - nativeSearchQueryBuilder.withSort(SortBuilders.scoreSort().order(SortOrder.DESC)); + nativeQueryBuilder.withSort(Sort.by(Sort.Order.desc("price"))); } - nativeSearchQueryBuilder.withSort(SortBuilders.scoreSort().order(SortOrder.DESC)); - NativeSearchQuery searchQuery = nativeSearchQueryBuilder.build(); - LOGGER.info("DSL:{}", searchQuery.getQuery().toString()); - SearchHits searchHits = elasticsearchRestTemplate.search(searchQuery, EsProduct.class); + //按相关度 + nativeQueryBuilder.withSort(Sort.by(Sort.Order.desc("_score"))); + NativeQuery nativeQuery = nativeQueryBuilder.build(); + LOGGER.info("DSL:{}", nativeQuery.getQuery().toString()); + SearchHits searchHits = elasticsearchTemplate.search(nativeQuery, EsProduct.class); if(searchHits.getTotalHits()<=0){ - return new PageImpl<>(null,pageable,0); + return new PageImpl<>(ListUtil.empty(),pageable,0); } List searchProductList = searchHits.stream().map(SearchHit::getContent).collect(Collectors.toList()); return new PageImpl<>(searchProductList,pageable,searchHits.getTotalHits()); @@ -178,68 +166,76 @@ public class EsProductServiceImpl implements EsProductService { String keyword = esProduct.getName(); Long brandId = esProduct.getBrandId(); Long productCategoryId = esProduct.getProductCategoryId(); - //根据商品标题、品牌、分类进行搜索 - List filterFunctionBuilders = new ArrayList<>(); - filterFunctionBuilders.add(new FunctionScoreQueryBuilder.FilterFunctionBuilder(QueryBuilders.matchQuery("name", keyword), - ScoreFunctionBuilders.weightFactorFunction(8))); - filterFunctionBuilders.add(new FunctionScoreQueryBuilder.FilterFunctionBuilder(QueryBuilders.matchQuery("subTitle", keyword), - ScoreFunctionBuilders.weightFactorFunction(2))); - filterFunctionBuilders.add(new FunctionScoreQueryBuilder.FilterFunctionBuilder(QueryBuilders.matchQuery("keywords", keyword), - ScoreFunctionBuilders.weightFactorFunction(2))); - filterFunctionBuilders.add(new FunctionScoreQueryBuilder.FilterFunctionBuilder(QueryBuilders.matchQuery("brandId", brandId), - ScoreFunctionBuilders.weightFactorFunction(5))); - filterFunctionBuilders.add(new FunctionScoreQueryBuilder.FilterFunctionBuilder(QueryBuilders.matchQuery("productCategoryId", productCategoryId), - ScoreFunctionBuilders.weightFactorFunction(3))); - FunctionScoreQueryBuilder.FilterFunctionBuilder[] builders = new FunctionScoreQueryBuilder.FilterFunctionBuilder[filterFunctionBuilders.size()]; - filterFunctionBuilders.toArray(builders); - FunctionScoreQueryBuilder functionScoreQueryBuilder = QueryBuilders.functionScoreQuery(builders) - .scoreMode(FunctionScoreQuery.ScoreMode.SUM) - .setMinScore(2); - //用于过滤掉相同的商品 - BoolQueryBuilder boolQueryBuilder = new BoolQueryBuilder(); - boolQueryBuilder.mustNot(QueryBuilders.termQuery("id",id)); //构建查询条件 - NativeSearchQueryBuilder builder = new NativeSearchQueryBuilder(); - builder.withQuery(functionScoreQueryBuilder); - builder.withFilter(boolQueryBuilder); - builder.withPageable(pageable); - NativeSearchQuery searchQuery = builder.build(); - LOGGER.info("DSL:{}", searchQuery.getQuery().toString()); - SearchHits searchHits = elasticsearchRestTemplate.search(searchQuery, EsProduct.class); + NativeQueryBuilder nativeQueryBuilder = new NativeQueryBuilder(); + //分页 + nativeQueryBuilder.withPageable(pageable); + //用于过滤掉相同的商品 + nativeQueryBuilder.withFilter(QueryBuilders.bool(build -> build.mustNot(QueryBuilders.term(b->b.field("id").value(id))))); + //根据商品标题、品牌、分类进行搜索 + List functionScoreList = new ArrayList<>(); + functionScoreList.add(new FunctionScore.Builder() + .filter(QueryBuilders.match(builder -> builder.field("name").query(keyword))) + .weight(8.0) + .build()); + functionScoreList.add(new FunctionScore.Builder() + .filter(QueryBuilders.match(builder -> builder.field("subTitle").query(keyword))) + .weight(2.0) + .build()); + functionScoreList.add(new FunctionScore.Builder() + .filter(QueryBuilders.match(builder -> builder.field("keywords").query(keyword))) + .weight(2.0) + .build()); + functionScoreList.add(new FunctionScore.Builder() + .filter(QueryBuilders.match(builder -> builder.field("brandId").query(brandId))) + .weight(5.0) + .build()); + functionScoreList.add(new FunctionScore.Builder() + .filter(QueryBuilders.match(builder -> builder.field("productCategoryId").query(productCategoryId))) + .weight(3.0) + .build()); + FunctionScoreQuery.Builder functionScoreQueryBuilder = QueryBuilders.functionScore() + .functions(functionScoreList) + .scoreMode(FunctionScoreMode.Sum) + .minScore(2.0); + nativeQueryBuilder.withQuery(builder -> builder.functionScore(functionScoreQueryBuilder.build())); + NativeQuery nativeQuery = nativeQueryBuilder.build(); + LOGGER.info("DSL:{}", nativeQuery.getQuery().toString()); + SearchHits searchHits = elasticsearchTemplate.search(nativeQuery, EsProduct.class); if(searchHits.getTotalHits()<=0){ - return new PageImpl<>(null,pageable,0); + return new PageImpl<>(ListUtil.empty(),pageable,0); } List searchProductList = searchHits.stream().map(SearchHit::getContent).collect(Collectors.toList()); return new PageImpl<>(searchProductList,pageable,searchHits.getTotalHits()); } - return new PageImpl<>(null); + return new PageImpl<>(ListUtil.empty()); } @Override public EsProductRelatedInfo searchRelatedInfo(String keyword) { - NativeSearchQueryBuilder builder = new NativeSearchQueryBuilder(); + NativeQueryBuilder nativeQueryBuilder = new NativeQueryBuilder(); //搜索条件 - if(StringUtils.isEmpty(keyword)){ - builder.withQuery(QueryBuilders.matchAllQuery()); + if(StrUtil.isEmpty(keyword)){ + nativeQueryBuilder.withQuery(QueryBuilders.matchAll(builder -> builder)); }else{ - builder.withQuery(QueryBuilders.multiMatchQuery(keyword,"name","subTitle","keywords")); + nativeQueryBuilder.withQuery(QueryBuilders.multiMatch(builder -> builder.fields("name","subTitle","keywords").query(keyword))); } //聚合搜索品牌名称 - builder.addAggregation(AggregationBuilders.terms("brandNames").field("brandName")); - //集合搜索分类名称 - builder.addAggregation(AggregationBuilders.terms("productCategoryNames").field("productCategoryName")); - //聚合搜索商品属性,去除type=1的属性 - AbstractAggregationBuilder aggregationBuilder = AggregationBuilders.nested("allAttrValues","attrValueList") - .subAggregation(AggregationBuilders.filter("productAttrs",QueryBuilders.termQuery("attrValueList.type",1)) - .subAggregation(AggregationBuilders.terms("attrIds") - .field("attrValueList.productAttributeId") - .subAggregation(AggregationBuilders.terms("attrValues") - .field("attrValueList.value")) - .subAggregation(AggregationBuilders.terms("attrNames") - .field("attrValueList.name")))); - builder.addAggregation(aggregationBuilder); - NativeSearchQuery searchQuery = builder.build(); - SearchHits searchHits = elasticsearchRestTemplate.search(searchQuery, EsProduct.class); + nativeQueryBuilder.withAggregation("brandNames",AggregationBuilders.terms(builder -> builder.field("brandName").size(10))); + //聚合搜索分类名称 + nativeQueryBuilder.withAggregation("productCategoryNames",AggregationBuilders.terms(builder -> builder.field("productCategoryName").size(10))); + //聚合搜索商品属性,去除type=0的属性 + Aggregation aggregation = new Aggregation.Builder().nested(builder -> builder.path("attrValueList")) + .aggregations("productAttrs",new Aggregation.Builder() + .filter(b->b.term(a->a.field("attrValueList.type").value("1"))) + .aggregations("attrIds",new Aggregation.Builder().terms(b->b.field("attrValueList.productAttributeId").size(10)) + .aggregations("attrValues",new Aggregation.Builder().terms(b->b.field("attrValueList.value").size(10)).build()) + .aggregations("attrNames",new Aggregation.Builder().terms(b->b.field("attrValueList.name").size(10)).build()) + .build()).build()).build(); + nativeQueryBuilder.withAggregation("allAttrValues",aggregation); + NativeQuery nativeQuery = nativeQueryBuilder.build(); + LOGGER.info("DSL:{}", nativeQueryBuilder.getQuery().toString()); + SearchHits searchHits = elasticsearchTemplate.search(nativeQuery, EsProduct.class); return convertProductRelatedInfo(searchHits); } @@ -248,37 +244,39 @@ public class EsProductServiceImpl implements EsProductService { */ private EsProductRelatedInfo convertProductRelatedInfo(SearchHits response) { EsProductRelatedInfo productRelatedInfo = new EsProductRelatedInfo(); - Map aggregationMap = ((Aggregations)response.getAggregations().aggregations()).asMap(); + Map esAggregationMap = ((ElasticsearchAggregations) response.getAggregations()).aggregationsAsMap(); //设置品牌 - Aggregation brandNames = aggregationMap.get("brandNames"); + ElasticsearchAggregation brandNames = esAggregationMap.get("brandNames"); List brandNameList = new ArrayList<>(); - for(int i = 0; i<((Terms) brandNames).getBuckets().size(); i++){ - brandNameList.add(((Terms) brandNames).getBuckets().get(i).getKeyAsString()); + List brandNameBuckets = ((StringTermsAggregate) brandNames.aggregation().getAggregate()._get()).buckets().array(); + for(int i = 0; i productCategoryNameList = new ArrayList<>(); - for(int i=0;i<((Terms) productCategoryNames).getBuckets().size();i++){ - productCategoryNameList.add(((Terms) productCategoryNames).getBuckets().get(i).getKeyAsString()); + List productCategoryNameBuckets = ((StringTermsAggregate) productCategoryNames.aggregation().getAggregate()._get()).buckets().array(); + for(int i = 0; i attrIds = ((ParsedLongTerms) ((ParsedFilter) ((ParsedNested) productAttrs).getAggregations().get("productAttrs")).getAggregations().get("attrIds")).getBuckets(); + ElasticsearchAggregation productAttrs = esAggregationMap.get("allAttrValues"); + List attrIdBuckets = ((LongTermsAggregate) ((FilterAggregate) ((NestedAggregate) productAttrs.aggregation().getAggregate()._get()).aggregations().get("productAttrs")._get()).aggregations().get("attrIds")._get()).buckets().array(); List attrList = new ArrayList<>(); - for (Terms.Bucket attrId : attrIds) { + for (LongTermsBucket item : attrIdBuckets) { EsProductRelatedInfo.ProductAttr attr = new EsProductRelatedInfo.ProductAttr(); - attr.setAttrId((Long) attrId.getKey()); + attr.setAttrId(item.key()); List attrValueList = new ArrayList<>(); - List attrValues = ((ParsedStringTerms) attrId.getAggregations().get("attrValues")).getBuckets(); - List attrNames = ((ParsedStringTerms) attrId.getAggregations().get("attrNames")).getBuckets(); - for (Terms.Bucket attrValue : attrValues) { - attrValueList.add(attrValue.getKeyAsString()); + List attrValues = ((StringTermsAggregate) item.aggregations().get("attrValues")._get()).buckets().array(); + List attrNames = ((StringTermsAggregate) item.aggregations().get("attrNames")._get()).buckets().array(); + for (StringTermsBucket attrValue : attrValues) { + attrValueList.add(attrValue.key().stringValue()); } attr.setAttrValues(attrValueList); if(!CollectionUtils.isEmpty(attrNames)){ - String attrName = attrNames.get(0).getKeyAsString(); + String attrName = attrNames.get(0).key().stringValue(); attr.setAttrName(attrName); } attrList.add(attr); diff --git a/mall-search/src/main/resources/application.yml b/mall-search/src/main/resources/application.yml index f8f9304..c02057d 100644 --- a/mall-search/src/main/resources/application.yml +++ b/mall-search/src/main/resources/application.yml @@ -27,14 +27,36 @@ mybatis: mapper-locations: - classpath:dao/*.xml - classpath*:com/**/mapper/*.xml -management: #开启SpringBoot Admin的监控 +management: endpoints: web: exposure: - include: '*' + include: '*' #暴露Actuator的监控端点 endpoint: health: - show-details: always + show-details: always #显示健康的详细信息 + env: + show-values: always #默认Actuator的环境变量会以****显示,这里开启显示 + configprops: + show-values: always #默认Actuator的配置属性会以****显示,这里开启显示 + info: + enabled: true +springdoc: + swagger-ui: + # 修改Swagger UI路径 + path: /swagger-ui.html + # 开启Swagger UI界面 + enabled: true + # 用于配置tag和operation的展开方式,这里配置为都不展开 + doc-expansion: 'none' + api-docs: + # 修改api-docs路径 + path: /v3/api-docs + # 开启api-docs + enabled: true + group-configs: + - group: 'mall-search' + packages-to-scan: com.macro.mall.search.controller diff --git a/mall-search/src/test/java/com/macro/mall/search/MallSearchApplicationTests.java b/mall-search/src/test/java/com/macro/mall/search/MallSearchApplicationTests.java index 5f070a9..a02185f 100644 --- a/mall-search/src/test/java/com/macro/mall/search/MallSearchApplicationTests.java +++ b/mall-search/src/test/java/com/macro/mall/search/MallSearchApplicationTests.java @@ -6,9 +6,8 @@ import com.macro.mall.search.domain.EsProduct; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate; +import org.springframework.data.elasticsearch.client.elc.ElasticsearchTemplate; import org.springframework.data.elasticsearch.core.IndexOperations; -import org.springframework.test.context.junit4.SpringRunner; import java.util.List; import java.util.Map; @@ -18,7 +17,7 @@ public class MallSearchApplicationTests { @Autowired private EsProductDao productDao; @Autowired - private ElasticsearchRestTemplate elasticsearchTemplate; + private ElasticsearchTemplate elasticsearchTemplate; @Test public void contextLoads() { } diff --git a/pom.xml b/pom.xml index 53bb7a1..473ede1 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ org.springframework.boot spring-boot-starter-parent - 2.7.0 + 3.2.2 @@ -33,28 +33,27 @@ UTF-8 true http://192.168.3.101:2375 - 0.40.0 - 1.8 - 2.7.0 - 2021.0.3 - 2021.0.1.0 - 2.2.5.RELEASE - 1.4.2 - 5.3.0 + 0.43.3 + 17 + 3.2.2 + 2023.0.1 + 2023.0.1.0 + 2.1.0 + 6.1.0 1.2.9 - 5.8.0 - 1.4.1 - 3.5.9 + 5.8.16 + 1.4.2 + 3.5.14 + 3.0.3 8.0.29 - 2.7.0 - 0.9.1 + 3.2.2 2.5.0 4.38.61.ALL 5.3 - 2.7.0 - 8.4.1 - 3.0.3 - 9.23 + 3.2.2 + 8.4.5 + 4.5.0 + 1.37.0 1.0-SNAPSHOT 1.0-SNAPSHOT @@ -130,6 +129,12 @@ pagehelper ${pagehelper.version} + + + org.mybatis.spring.boot + mybatis-spring-boot-starter + ${mybatis-spring-boot-starter.version} + com.alibaba @@ -145,12 +150,12 @@ com.github.xiaoymin - knife4j-micro-spring-boot-starter + knife4j-gateway-spring-boot-starter ${knife4j.version} com.github.xiaoymin - knife4j-spring-boot-starter + knife4j-openapi3-jakarta-spring-boot-starter ${knife4j.version} @@ -177,18 +182,6 @@ spring-data-commons ${spring-data-commons.version} - - - io.jsonwebtoken - jjwt - ${jjwt.version} - - - - com.nimbusds - nimbus-jose-jwt - ${nimbus-jose-jwt.version} - com.aliyun.oss @@ -205,7 +198,13 @@ de.codecentric spring-boot-admin-starter-server - ${admin-starter-server.version} + ${spring-boot-admin.version} + + + + de.codecentric + spring-boot-admin-starter-client + ${spring-boot-admin.version} @@ -213,6 +212,36 @@ minio ${minio.version} + + + com.alipay.sdk + alipay-sdk-java + ${alipay-sdk.version} + + + + cn.dev33 + sa-token-reactor-spring-boot3-starter + ${sa-token.version} + + + + cn.dev33 + sa-token-spring-boot3-starter + ${sa-token.version} + + + + cn.dev33 + sa-token-redis-jackson + ${sa-token.version} + + + + cn.dev33 + sa-token-jwt + ${sa-token.version} + @@ -248,7 +277,7 @@ - openjdk:8 + openjdk:17 ${project.build.finalName}.jar @@ -270,9 +299,21 @@ + + + + org.apache.maven.plugins + maven-compiler-plugin + + + -parameters + + + + - + aliyunmaven @@ -286,4 +327,18 @@ + + + + aliyunmaven + aliyun + https://maven.aliyun.com/repository/public + + + central2 + central2 + https://repo1.maven.org/maven2/ + + + \ No newline at end of file