From b97031b4dd48684e3905e71445049c4388597691 Mon Sep 17 00:00:00 2001 From: DB <2502523450@qq.com> Date: Thu, 13 Jun 2024 17:40:43 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=93=81=E7=89=8C=E6=A0=A1?= =?UTF-8?q?=E5=8C=BA=E6=95=B0=E6=8D=AE=E8=8E=B7=E5=8F=96,=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E4=BE=9D=E8=B5=96=EF=BC=8C=E8=B0=83=E6=95=B4=E6=A0=A1?= =?UTF-8?q?=E5=8C=BA=E6=8F=92=E4=BB=B6,=E8=B0=83=E6=95=B4=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../json/ArrayToStringDeserializer.java | 4 +- .../com/cpop/generator/CpopGenerator.java | 12 +- .../main/resources/template/enjoy/entity.tpl | 2 +- .../src/main/resources/application-dev.yml | 8 +- .../src/main/resources/application-test.yml | 12 +- .../com/cpop/oam/business/bo/BrandBo.java | 38 ++ .../oam/business/bo/ChangePlugOpenBo.java | 6 + .../oam/business/bo/ChangePlugVisibleBo.java | 45 +++ .../java/com/cpop/oam/business/bo/PlugBo.java | 66 ++++ .../com/cpop/oam}/business/bo/StoreBo.java | 2 +- .../cpop/oam}/business/bo/StoreRunOffBo.java | 2 +- .../business/bo/StoreSignRenewPageBo.java | 2 +- .../oam}/business/bo/StoreSignRenewXmlBo.java | 2 +- .../backstage/BackstageBrandController.java | 92 +++++ .../backstage/BackstageLoginController.java | 29 +- .../backstage/BackstageStoreController.java | 40 +- .../BackstageStorePlugController.java | 372 +++++++++++++----- .../BackstageStoreSignController.java | 118 ++++++ .../cpop/oam}/business/dto/StoreRenewDto.java | 2 +- .../com/cpop/oam/business/entity/Order.java | 95 +++++ .../com/cpop/oam/business/entity/Plug.java | 37 +- .../cpop/oam/business/entity/StorePlug.java | 60 +++ .../cpop/oam}/business/entity/StoreRenew.java | 15 +- .../cpop/oam/business/mapper/OrderMapper.java | 14 + .../oam/business/service/OrderService.java | 14 + .../service/impl/OrderServiceImpl.java | 18 + .../service/impl/TaskDemandServiceImpl.java | 117 +++++- .../impl/TaskWorkOrderServiceImpl.java | 38 +- .../com/cpop/oam/business/vo/BrandInfoVo.java | 36 +- .../com/cpop/oam/business/vo/BrandPageVo.java | 57 +++ .../com/cpop/oam/business/vo/PlugPageVo.java | 54 +++ .../java/com/cpop/oam/business/vo/PlugVo.java | 58 +++ .../cpop/oam}/business/vo/StorePageVo.java | 7 +- .../cpop/oam/business/vo/StorePlugListVo.java | 82 ++++ .../business/vo/StoreSignRenewPageVo.java | 2 +- .../cpop/oam/framework/enums/OrderType.java | 140 +++++++ .../handler/tencentCos/TencentCosHandler.java | 34 +- .../src/main/resources/mapper/OrderMapper.xml | 2 +- Cpop-System/pom.xml | 50 --- .../com/cpop/system/business/bo/BrandBo.java | 108 ----- .../com/cpop/system/business/bo/MenuBo.java | 112 ------ .../cpop/system/business/bo/MenuListBo.java | 30 -- .../com/cpop/system/business/bo/RoleBo.java | 68 ---- .../cpop/system/business/bo/RolePageBo.java | 29 -- .../cpop/system/business/bo/RoleStatusBo.java | 35 -- .../backstage/BackstageBrandController.java | 109 ----- .../BackstageStoreSignController.java | 83 ---- .../cpop/system/business/entity/Brand.java | 191 --------- .../cpop/system/business/entity/Store.java | 256 ------------ .../system/business/entity/StoreSign.java | 81 ---- .../system/business/mapper/BrandMapper.java | 16 - .../business/mapper/ProfitSharingMapper.java | 14 - .../system/business/mapper/StoreMapper.java | 14 - .../business/mapper/StoreRenewMapper.java | 14 - .../business/mapper/StoreSignMapper.java | 14 - .../system/business/service/BrandService.java | 25 -- .../service/ProfitSharingService.java | 14 - .../business/service/StoreRenewService.java | 14 - .../system/business/service/StoreService.java | 34 -- .../business/service/StoreSignService.java | 47 --- .../service/impl/BrandServiceImpl.java | 43 -- .../impl/ProfitSharingServiceImpl.java | 18 - .../service/impl/StoreRenewServiceImpl.java | 18 - .../service/impl/StoreServiceImpl.java | 65 --- .../service/impl/StoreSignServiceImpl.java | 126 ------ .../cpop/system/business/vo/MenuRouteVo.java | 153 ------- .../com/cpop/system/business/vo/MenuVo.java | 119 ------ .../cpop/system/business/vo/RolePageVo.java | 72 ---- .../com/cpop/system/business/vo/RoleVo.java | 56 --- .../src/main/resources/mapper/BrandMapper.xml | 7 - .../resources/mapper/ProfitSharingMapper.xml | 7 - .../resources/mapper/StoreRenewMapper.xml | 7 - .../main/resources/mapper/StoreSignMapper.xml | 7 - pom.xml | 9 +- 74 files changed, 1485 insertions(+), 2314 deletions(-) create mode 100644 Cpop-Oam/src/main/java/com/cpop/oam/business/bo/BrandBo.java create mode 100644 Cpop-Oam/src/main/java/com/cpop/oam/business/bo/ChangePlugVisibleBo.java create mode 100644 Cpop-Oam/src/main/java/com/cpop/oam/business/bo/PlugBo.java rename {Cpop-System/src/main/java/com/cpop/system => Cpop-Oam/src/main/java/com/cpop/oam}/business/bo/StoreBo.java (98%) rename {Cpop-System/src/main/java/com/cpop/system => Cpop-Oam/src/main/java/com/cpop/oam}/business/bo/StoreRunOffBo.java (95%) rename {Cpop-System/src/main/java/com/cpop/system => Cpop-Oam/src/main/java/com/cpop/oam}/business/bo/StoreSignRenewPageBo.java (97%) rename {Cpop-System/src/main/java/com/cpop/system => Cpop-Oam/src/main/java/com/cpop/oam}/business/bo/StoreSignRenewXmlBo.java (96%) create mode 100644 Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageBrandController.java rename {Cpop-System/src/main/java/com/cpop/system => Cpop-Oam/src/main/java/com/cpop/oam}/business/controller/backstage/BackstageStoreController.java (52%) create mode 100644 Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageStoreSignController.java rename {Cpop-System/src/main/java/com/cpop/system => Cpop-Oam/src/main/java/com/cpop/oam}/business/dto/StoreRenewDto.java (97%) create mode 100644 Cpop-Oam/src/main/java/com/cpop/oam/business/entity/Order.java rename Cpop-System/src/main/java/com/cpop/system/business/entity/ProfitSharing.java => Cpop-Oam/src/main/java/com/cpop/oam/business/entity/Plug.java (52%) create mode 100644 Cpop-Oam/src/main/java/com/cpop/oam/business/entity/StorePlug.java rename {Cpop-System/src/main/java/com/cpop/system => Cpop-Oam/src/main/java/com/cpop/oam}/business/entity/StoreRenew.java (81%) create mode 100644 Cpop-Oam/src/main/java/com/cpop/oam/business/mapper/OrderMapper.java create mode 100644 Cpop-Oam/src/main/java/com/cpop/oam/business/service/OrderService.java create mode 100644 Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/OrderServiceImpl.java rename Cpop-System/src/main/java/com/cpop/system/business/vo/BrandPageVo.java => Cpop-Oam/src/main/java/com/cpop/oam/business/vo/BrandInfoVo.java (77%) create mode 100644 Cpop-Oam/src/main/java/com/cpop/oam/business/vo/BrandPageVo.java create mode 100644 Cpop-Oam/src/main/java/com/cpop/oam/business/vo/PlugPageVo.java create mode 100644 Cpop-Oam/src/main/java/com/cpop/oam/business/vo/PlugVo.java rename {Cpop-System/src/main/java/com/cpop/system => Cpop-Oam/src/main/java/com/cpop/oam}/business/vo/StorePageVo.java (93%) create mode 100644 Cpop-Oam/src/main/java/com/cpop/oam/business/vo/StorePlugListVo.java rename {Cpop-System/src/main/java/com/cpop/system => Cpop-Oam/src/main/java/com/cpop/oam}/business/vo/StoreSignRenewPageVo.java (97%) create mode 100644 Cpop-Oam/src/main/java/com/cpop/oam/framework/enums/OrderType.java rename Cpop-System/src/main/resources/mapper/StoreMapper.xml => Cpop-Oam/src/main/resources/mapper/OrderMapper.xml (72%) delete mode 100644 Cpop-System/pom.xml delete mode 100644 Cpop-System/src/main/java/com/cpop/system/business/bo/BrandBo.java delete mode 100644 Cpop-System/src/main/java/com/cpop/system/business/bo/MenuBo.java delete mode 100644 Cpop-System/src/main/java/com/cpop/system/business/bo/MenuListBo.java delete mode 100644 Cpop-System/src/main/java/com/cpop/system/business/bo/RoleBo.java delete mode 100644 Cpop-System/src/main/java/com/cpop/system/business/bo/RolePageBo.java delete mode 100644 Cpop-System/src/main/java/com/cpop/system/business/bo/RoleStatusBo.java delete mode 100644 Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageBrandController.java delete mode 100644 Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageStoreSignController.java delete mode 100644 Cpop-System/src/main/java/com/cpop/system/business/entity/Brand.java delete mode 100644 Cpop-System/src/main/java/com/cpop/system/business/entity/Store.java delete mode 100644 Cpop-System/src/main/java/com/cpop/system/business/entity/StoreSign.java delete mode 100644 Cpop-System/src/main/java/com/cpop/system/business/mapper/BrandMapper.java delete mode 100644 Cpop-System/src/main/java/com/cpop/system/business/mapper/ProfitSharingMapper.java delete mode 100644 Cpop-System/src/main/java/com/cpop/system/business/mapper/StoreMapper.java delete mode 100644 Cpop-System/src/main/java/com/cpop/system/business/mapper/StoreRenewMapper.java delete mode 100644 Cpop-System/src/main/java/com/cpop/system/business/mapper/StoreSignMapper.java delete mode 100644 Cpop-System/src/main/java/com/cpop/system/business/service/BrandService.java delete mode 100644 Cpop-System/src/main/java/com/cpop/system/business/service/ProfitSharingService.java delete mode 100644 Cpop-System/src/main/java/com/cpop/system/business/service/StoreRenewService.java delete mode 100644 Cpop-System/src/main/java/com/cpop/system/business/service/StoreService.java delete mode 100644 Cpop-System/src/main/java/com/cpop/system/business/service/StoreSignService.java delete mode 100644 Cpop-System/src/main/java/com/cpop/system/business/service/impl/BrandServiceImpl.java delete mode 100644 Cpop-System/src/main/java/com/cpop/system/business/service/impl/ProfitSharingServiceImpl.java delete mode 100644 Cpop-System/src/main/java/com/cpop/system/business/service/impl/StoreRenewServiceImpl.java delete mode 100644 Cpop-System/src/main/java/com/cpop/system/business/service/impl/StoreServiceImpl.java delete mode 100644 Cpop-System/src/main/java/com/cpop/system/business/service/impl/StoreSignServiceImpl.java delete mode 100644 Cpop-System/src/main/java/com/cpop/system/business/vo/MenuRouteVo.java delete mode 100644 Cpop-System/src/main/java/com/cpop/system/business/vo/MenuVo.java delete mode 100644 Cpop-System/src/main/java/com/cpop/system/business/vo/RolePageVo.java delete mode 100644 Cpop-System/src/main/java/com/cpop/system/business/vo/RoleVo.java delete mode 100644 Cpop-System/src/main/resources/mapper/BrandMapper.xml delete mode 100644 Cpop-System/src/main/resources/mapper/ProfitSharingMapper.xml delete mode 100644 Cpop-System/src/main/resources/mapper/StoreRenewMapper.xml delete mode 100644 Cpop-System/src/main/resources/mapper/StoreSignMapper.xml diff --git a/Cpop-Core/src/main/java/com/cpop/core/strategy/json/ArrayToStringDeserializer.java b/Cpop-Core/src/main/java/com/cpop/core/strategy/json/ArrayToStringDeserializer.java index ef68450..8811654 100644 --- a/Cpop-Core/src/main/java/com/cpop/core/strategy/json/ArrayToStringDeserializer.java +++ b/Cpop-Core/src/main/java/com/cpop/core/strategy/json/ArrayToStringDeserializer.java @@ -1,6 +1,7 @@ package com.cpop.core.strategy.json; import cn.hutool.core.util.StrUtil; +import com.alibaba.fastjson2.JSONArray; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.TreeNode; @@ -30,8 +31,9 @@ public class ArrayToStringDeserializer extends JsonDeserializer { } else if (treeNode instanceof DoubleNode) { return ((DoubleNode) treeNode).asText(); } else if (treeNode instanceof ArrayNode) { + JSONArray array = JSONArray.parseArray((treeNode).toString()); //字符串数组,会多出两个引号,需要手动去除 - return StrUtil.replace(StrUtil.join(",", (ArrayNode) treeNode), "\"", ""); + return StrUtil.join(",", array); } else if (treeNode instanceof TextNode) { return ((TextNode) treeNode).asText(); } diff --git a/Cpop-Generator/src/main/java/com/cpop/generator/CpopGenerator.java b/Cpop-Generator/src/main/java/com/cpop/generator/CpopGenerator.java index 438ccc5..5b8eb8f 100644 --- a/Cpop-Generator/src/main/java/com/cpop/generator/CpopGenerator.java +++ b/Cpop-Generator/src/main/java/com/cpop/generator/CpopGenerator.java @@ -27,31 +27,31 @@ public class CpopGenerator { * 数据库 URL */ // private static final String URL = "jdbc:mysql://localhost:3306/cpop-dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8"; - private static final String URL = "jdbc:mysql://localhost:3306/cpop_dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8"; + private static final String URL = "jdbc:mysql://bj-cynosdbmysql-grp-anccz88g.sql.tencentcdb.com:24808/cpop_dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8"; /** * 数据库用户名 */ - private static final String USERNAME = "root"; + private static final String USERNAME = "cpop_dev"; /** * 数据库密码 */ - private static final String PASSWORD = "Admin@123"; + private static final String PASSWORD = "Ch5WkZRsCATsnMXw"; //private static final String PASSWORD = "Customer0401"; /** * 输出路径 */ - private static final String EXPORT_URL = "/Cpop-Jambox"; + private static final String EXPORT_URL = "/Cpop-Oam"; /** * 模块 */ - private static final String EXPORT_ITEM = "jambox"; + private static final String EXPORT_ITEM = "oam"; /** * 表前缀 */ - private static final String TABLE_PREFIX = "cp_j_"; + private static final String TABLE_PREFIX = "cp_sys_"; /** * 主入口 diff --git a/Cpop-Generator/src/main/resources/template/enjoy/entity.tpl b/Cpop-Generator/src/main/resources/template/enjoy/entity.tpl index 8a6c8f3..6a05237 100644 --- a/Cpop-Generator/src/main/resources/template/enjoy/entity.tpl +++ b/Cpop-Generator/src/main/resources/template/enjoy/entity.tpl @@ -5,7 +5,7 @@ #set(entityClassName = table.buildEntityClassName()) package #(packageConfig.entityPackage); -#for(importClass : table.buildImports()) +#for(importClass : table.buildImports(false)) import #(importClass); #end #if(withActiveRecord) diff --git a/Cpop-Oam/Cpop-Oam-Web/src/main/resources/application-dev.yml b/Cpop-Oam/Cpop-Oam-Web/src/main/resources/application-dev.yml index a7abf7c..3f5168b 100644 --- a/Cpop-Oam/Cpop-Oam-Web/src/main/resources/application-dev.yml +++ b/Cpop-Oam/Cpop-Oam-Web/src/main/resources/application-dev.yml @@ -9,9 +9,9 @@ cpop: gateway: rsa-keypair: # 公钥文件 - publicKeyFile: D:\Cpop\Cpop-Union\Cpop-Core\src\main\resources\static\keypair\publicKey + publicKeyFile: E:\Cpop\Cpop-Union-1.1.0\Cpop-Oam\Cpop-Oam-Web\src\main\resources\static\keypair\publicKey # 公钥文件 - privateKeyFile: D:\Cpop\Cpop-Union\Cpop-Core\src\main\resources\static\keypair\privateKey + privateKeyFile: E:\Cpop\Cpop-Union-1.1.0\Cpop-Oam\Cpop-Oam-Web\src\main\resources\static\keypair\privateKey # DataSource Config spring: @@ -54,9 +54,9 @@ mongo-plus: #数据库名 database: cpop_dev #用户名,没有可不填(若账号中出现@,!等等符号,不需要再进行转码!!!) - username: mongo_kBXjhm + username: mongo_AGwXPs #密码,同上(若密码中出现@,!等等符号,不需要再进行转码!!!) - password: mongo_7RF4Zj + password: mongo_xe4Dhe #验证数据库 admin authentication-database: admin connect-timeout-m-s: 50000 diff --git a/Cpop-Oam/Cpop-Oam-Web/src/main/resources/application-test.yml b/Cpop-Oam/Cpop-Oam-Web/src/main/resources/application-test.yml index 7a27ef9..4ac7256 100644 --- a/Cpop-Oam/Cpop-Oam-Web/src/main/resources/application-test.yml +++ b/Cpop-Oam/Cpop-Oam-Web/src/main/resources/application-test.yml @@ -48,15 +48,15 @@ mongo-plus: data: mongodb: #ip - host: 1panel.cpopsz.com + host: mongodb #端口 port: 27017 #数据库名 database: cpop_test #用户名,没有可不填(若账号中出现@,!等等符号,不需要再进行转码!!!) - username: mongo_kBXjhm + username: mongo_AGwXPs #密码,同上(若密码中出现@,!等等符号,不需要再进行转码!!!) - password: mongo_7RF4Zj + password: mongo_xe4Dhe #验证数据库 admin authentication-database: admin connect-timeout-m-s: 50000 @@ -71,9 +71,9 @@ mybatis-flex: username: cpop_test password: zkrK3nT8TzsJABwr jambox: - url: jdbc:mysql://bj-cynosdbmysql-grp-anccz88g.sql.tencentcdb.com:24808/cpop_test?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true - username: cpop_test - password: zkrK3nT8TzsJABwr + url: jdbc:mysql://bj-cynosdbmysql-grp-anccz88g.sql.tencentcdb.com:24808/jambox_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + username: jambox_test + password: R6fkprEYRttsQHh8 # springdoc-openapi项目配置 springdoc: diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/bo/BrandBo.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/bo/BrandBo.java new file mode 100644 index 0000000..20bf04e --- /dev/null +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/bo/BrandBo.java @@ -0,0 +1,38 @@ +package com.cpop.oam.business.bo; + +import com.cpop.core.anno.StringArrayConvert; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotBlank; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * @author DB + * @since 2023/10/25 16:43 + */ +@Data +@Accessors(chain = true) +@Schema(description = "品牌请求参数") +public class BrandBo { + + /** + * 主键 + */ + @NotBlank(message = "主键不能为空") + @Schema(description = "主键",requiredMode = Schema.RequiredMode.REQUIRED) + private String id; + + /** + * 微信商户id + */ + @Schema(description = "微信商户id") + private String wxMchId; + + /** + * 授权产品 + */ + @StringArrayConvert + @Schema(description = "授权产品") + private String authProduct; + +} diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/bo/ChangePlugOpenBo.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/bo/ChangePlugOpenBo.java index 2685dfd..7e95010 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/bo/ChangePlugOpenBo.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/bo/ChangePlugOpenBo.java @@ -16,6 +16,12 @@ import lombok.experimental.Accessors; @Schema(description = "ChangePlugOpenBo对象") public class ChangePlugOpenBo { + /** + * 主键 + */ + @Schema(description = "主键") + private String id; + /** * 校区 */ diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/bo/ChangePlugVisibleBo.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/bo/ChangePlugVisibleBo.java new file mode 100644 index 0000000..a5148ae --- /dev/null +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/bo/ChangePlugVisibleBo.java @@ -0,0 +1,45 @@ +package com.cpop.oam.business.bo; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * @author DB + * @version 1.0.0 + * @since 2024-01-05 14:31 + */ +@Data +@Accessors(chain = true) +@Schema(description = "ChangePlugOpenBo对象") +public class ChangePlugVisibleBo { + + /** + * 主键 + */ + @Schema(description = "主键") + private String id; + + /** + * 校区 + */ + @NotBlank(message = "校区不能为空") + @Schema(description = "校区",requiredMode = Schema.RequiredMode.REQUIRED) + private String storeId; + + /** + * 插件 + */ + @NotBlank(message = "插件不能为空") + @Schema(description = "插件",requiredMode = Schema.RequiredMode.REQUIRED) + private String plugTag; + + /** + * 开启与关闭 + */ + @NotNull(message = "开启与关闭不能为空") + @Schema(description = "开启与关闭",requiredMode = Schema.RequiredMode.REQUIRED) + private Boolean isVisible; +} diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/bo/PlugBo.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/bo/PlugBo.java new file mode 100644 index 0000000..d0f71f3 --- /dev/null +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/bo/PlugBo.java @@ -0,0 +1,66 @@ +package com.cpop.oam.business.bo; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import lombok.Data; +import lombok.experimental.Accessors; + + + +/** + * @author DB + * @version 1.0.0 + * @since 2024-01-05 12:47 + */ +@Data +@Accessors(chain = true) +@Schema(description = "插件请求参数") +public class PlugBo { + + /** + * 主键 + */ + @Schema(description = "主键") + private String id; + + /** + * 插件名 + */ + @NotBlank(message = "插件名不能为空") + @Schema(description = "插件名",requiredMode = Schema.RequiredMode.REQUIRED) + private String name; + + /** + * 插件标签 + */ + @NotBlank(message = "插件标签不能为空") + @Schema(description = "插件标签",requiredMode = Schema.RequiredMode.REQUIRED) + private String plugTag; + + /** + * 插件图标地址 + */ + @Schema(description = "插件图标地址") + private String picUrl; + + /** + * 排序 + */ + @NotNull(message = "排序不能为空") + @Schema(description = "排序",requiredMode = Schema.RequiredMode.REQUIRED) + private Integer orderNo; + + /** + * 备注 + */ + @Schema(description = "备注") + private String remark; + + /** + * 状态(0:禁用;1:使用) + */ + @NotNull(message = "状态不能为空") + @Schema(description = "状态",requiredMode = Schema.RequiredMode.REQUIRED) + private Integer status; +} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/bo/StoreBo.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/bo/StoreBo.java similarity index 98% rename from Cpop-System/src/main/java/com/cpop/system/business/bo/StoreBo.java rename to Cpop-Oam/src/main/java/com/cpop/oam/business/bo/StoreBo.java index dba1a37..267251d 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/bo/StoreBo.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/bo/StoreBo.java @@ -1,4 +1,4 @@ -package com.cpop.system.business.bo; +package com.cpop.oam.business.bo; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; diff --git a/Cpop-System/src/main/java/com/cpop/system/business/bo/StoreRunOffBo.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/bo/StoreRunOffBo.java similarity index 95% rename from Cpop-System/src/main/java/com/cpop/system/business/bo/StoreRunOffBo.java rename to Cpop-Oam/src/main/java/com/cpop/oam/business/bo/StoreRunOffBo.java index c4f6f68..53f0be4 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/bo/StoreRunOffBo.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/bo/StoreRunOffBo.java @@ -1,4 +1,4 @@ -package com.cpop.system.business.bo; +package com.cpop.oam.business.bo; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; diff --git a/Cpop-System/src/main/java/com/cpop/system/business/bo/StoreSignRenewPageBo.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/bo/StoreSignRenewPageBo.java similarity index 97% rename from Cpop-System/src/main/java/com/cpop/system/business/bo/StoreSignRenewPageBo.java rename to Cpop-Oam/src/main/java/com/cpop/oam/business/bo/StoreSignRenewPageBo.java index 464c169..459e6e5 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/bo/StoreSignRenewPageBo.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/bo/StoreSignRenewPageBo.java @@ -1,4 +1,4 @@ -package com.cpop.system.business.bo; +package com.cpop.oam.business.bo; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; diff --git a/Cpop-System/src/main/java/com/cpop/system/business/bo/StoreSignRenewXmlBo.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/bo/StoreSignRenewXmlBo.java similarity index 96% rename from Cpop-System/src/main/java/com/cpop/system/business/bo/StoreSignRenewXmlBo.java rename to Cpop-Oam/src/main/java/com/cpop/oam/business/bo/StoreSignRenewXmlBo.java index 1bc682e..83defef 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/bo/StoreSignRenewXmlBo.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/bo/StoreSignRenewXmlBo.java @@ -1,4 +1,4 @@ -package com.cpop.system.business.bo; +package com.cpop.oam.business.bo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageBrandController.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageBrandController.java new file mode 100644 index 0000000..5049c85 --- /dev/null +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageBrandController.java @@ -0,0 +1,92 @@ +package com.cpop.oam.business.controller.backstage; + +import com.cpop.core.base.entity.PageDomain; +import com.cpop.core.base.entity.R; +import com.cpop.core.utils.SqlUtils; +import com.cpop.oam.business.bo.BrandBo; +import com.cpop.oam.business.vo.BrandInfoVo; +import com.cpop.oam.business.vo.BrandPageVo; +import com.mybatisflex.core.datasource.DataSourceKey; +import com.mybatisflex.core.paginate.Page; +import com.mybatisflex.core.row.DbChain; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import static com.cpop.oam.business.entity.table.BrandTableDef.BRAND; + +/** + * 系统-品牌表 控制层。 + * + * @author DB + * @since 2023-10-25 + */ +@RestController +@Tag(name = "品牌接口") +@RequestMapping("/backstage/brand") +public class BackstageBrandController { + + /** + * 查询品牌分页列表 + * + * @param brandName 请求参数 + * @return {@link R }<{@link Page }<{@link BrandPageVo }>> + * @author DB + * @since 2023/09/13 17:55 + */ + @Operation(summary = "查询品牌分页列表") + @GetMapping("/getBrandPage") + public R> getBrandPageList(String brandName) { + PageDomain pageDomain = SqlUtils.getInstance().getPageDomain(); + Page page = DataSourceKey.use("jambox", () -> { + return DbChain.table(BRAND).select(BRAND.ID, BRAND.BRAND_NAME, BRAND.BRAND_LOGO, BRAND.WX_MCH_ID, BRAND.CREATE_TIME, BRAND.WX_MCH_ID, BRAND.BRAND_ADDR) + .and(BRAND.BRAND_NAME.likeLeft(brandName)) + .orderBy(BRAND.CREATE_TIME.desc()).pageAs(Page.of(pageDomain.getPage(), pageDomain.getPageSize()), BrandPageVo.class); + }); + return R.ok(page); + } + + /** + * 获取品牌信息 + * + * @param id id + * @return {@link R }<{@link BrandInfoVo }> + * @author DB + * @since 2024/06/07 + */ + @Operation(summary = "获取品牌信息") + @GetMapping("/getBrandInfo/{id}") + public R getBrandInfo(@PathVariable @Parameter(description = "品牌id", required = true) String id) { + BrandInfoVo brandInfoVo = DataSourceKey.use("jambox", () -> { + return DbChain.table(BRAND).select(BRAND.ID, BRAND.BRAND_NAME, BRAND.BRAND_LOGO, BRAND.WX_MCH_ID, BRAND.WX_MCH_ID, BRAND.BRAND_ADDR, BRAND.LICENSE_STATS, + BRAND.LICENSE_PIC_URL, BRAND.LICENSE_CREDIT_CODE, BRAND.LICENSE_FIRM_NAME, BRAND.LICENSE_USERNAME, BRAND.LICENSE_ADDR, BRAND.LICENSE_DATE, + BRAND.AUTH_PRODUCT) + .where(BRAND.ID.eq(id)) + .oneAs(BrandInfoVo.class); + }); + return R.ok(brandInfoVo); + } + + /** + * 修改品牌 + * + * @param bo 品牌参数 + * @return {@link R }<{@link Void }> + * @author DB + * @since 2023/11/10 9:21 + */ + @Operation(summary = "修改品牌") + @PutMapping("/updateBrand") + public R updateSysBrand(@RequestBody @Validated BrandBo bo) { + DataSourceKey.use("jambox", () -> { + DbChain.table(BRAND).set(BRAND.WX_MCH_ID,bo.getWxMchId()) + .set(BRAND.AUTH_PRODUCT,bo.getAuthProduct()) + .where(BRAND.ID.eq(bo.getId())) + .update(); + }); + return R.ok(); + } + +} diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageLoginController.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageLoginController.java index ef1e154..b1c8c3e 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageLoginController.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageLoginController.java @@ -38,9 +38,11 @@ public class BackstageLoginController { /** * 系统登录 + * + * @param loginForm 登录表单 + * @return {@link R }<{@link LoginSuccess }> * @author DB * @since 2023/12/2 - * @return R */ @Operation(summary="系统登录") @PostMapping("/login") @@ -68,9 +70,10 @@ public class BackstageLoginController { /** * 系统注销 + * + * @return {@link R }<{@link Void }> * @author DB * @since 2023/12/2 - * @return SaResult */ @Operation(summary="系统注销") @GetMapping("/logout") @@ -81,11 +84,12 @@ public class BackstageLoginController { } /** + * 获取登录用户详情 + * + * @return {@link R }<{@link LoginUserInfoVo }> * @author LOST.yuan - * @Description 获取登录用户详情 - * @date 14:52 2022/9/7 - * @return {@link R} - **/ + * @since 14:52 2022/9/7 + */ @GetMapping("/getUserInfo") @Operation(summary = "获取登录用户详情") public R getUserInfo() { @@ -93,11 +97,12 @@ public class BackstageLoginController { } /** - * @author LOST.yuan * 获取权限码 + * + * @return {@link R }<{@link List }<{@link String }>> + * @author LOST.yuan * @since 14:52 2022/9/7 - * @return {@link List} - **/ + */ @Operation(summary = "获取权限码") @GetMapping("/getPermCode") public R> getPermCode(){ @@ -106,10 +111,12 @@ public class BackstageLoginController { } /** - * @author LOST.yuan * 获取菜单列表 + * + * @return {@link R }<{@link List }<{@link MenuRouteVo }>> + * @author LOST.yuan * @since 14:52 2022/9/7 - **/ + */ @Operation(summary = "获取菜单列表") @GetMapping("/getMenuList") public R> getMenuList(){ diff --git a/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageStoreController.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageStoreController.java similarity index 52% rename from Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageStoreController.java rename to Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageStoreController.java index 572754a..a4f6c00 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageStoreController.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageStoreController.java @@ -1,17 +1,22 @@ -package com.cpop.system.business.controller.backstage; +package com.cpop.oam.business.controller.backstage; +import com.cpop.core.base.entity.PageDomain; import com.cpop.core.base.entity.R; -import com.cpop.system.business.bo.StoreBo; -import com.cpop.system.business.service.StoreRenewService; -import com.cpop.system.business.vo.StorePageVo; +import com.cpop.core.utils.SqlUtils; +import com.cpop.oam.business.bo.StoreBo; +import com.cpop.oam.business.vo.StorePageVo; +import com.mybatisflex.core.datasource.DataSourceKey; import com.mybatisflex.core.paginate.Page; +import com.mybatisflex.core.row.DbChain; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import org.springframework.beans.factory.annotation.Autowired; -import com.cpop.system.business.service.StoreService; + +import static com.cpop.oam.business.entity.table.BrandTableDef.BRAND; +import static com.cpop.oam.business.entity.table.StoreSignTableDef.STORE_SIGN; +import static com.cpop.oam.business.entity.table.StoreTableDef.STORE; /** * 系统-店铺/校区表 控制层。 @@ -24,12 +29,6 @@ import com.cpop.system.business.service.StoreService; @RequestMapping("/backstage/store") public class BackstageStoreController { - @Autowired - private StoreService storeService; - - @Autowired - private StoreRenewService storeRenewService; - /** * 查询校区分页列表 * @param name 校区名 @@ -40,8 +39,19 @@ public class BackstageStoreController { @Operation(summary = "查询校区分页列表") @GetMapping("/getStorePage") public R> getStorePage(@RequestParam(required = false) @Parameter(description = "校区名") String name) { - Page pageVo = storeService.getStorePage(name); - return R.ok(pageVo); + PageDomain pageDomain = SqlUtils.getInstance().getPageDomain(); + Page page = DataSourceKey.use("jambox", () -> { + return DbChain.table(STORE).select(STORE.ID, STORE.STORE_NAME, STORE.CREATE_TIME, STORE.STORE_ADDR, STORE.PERSON_CHARGE_NAME.as(StorePageVo::getPersonCharge), + STORE.PERSON_CHARGE_PHONE.as(StorePageVo::getPhone), STORE.WX_MCH_ID) + .select(STORE_SIGN.EXPIRE_DATE) + .select(BRAND.BRAND_NAME) + .from(STORE) + .leftJoin(STORE_SIGN).on(STORE_SIGN.STORE_ID.eq(STORE.ID)) + .leftJoin(BRAND).on(BRAND.ID.eq(STORE.BRAND_ID)) + .and(STORE.STORE_NAME.like(name)) + .orderBy(STORE.CREATE_TIME.desc()).pageAs(Page.of(pageDomain.getPage(), pageDomain.getPageSize()), StorePageVo.class); + }); + return R.ok(page); } /** @@ -68,7 +78,7 @@ public class BackstageStoreController { @PutMapping("/updateStore") @Deprecated(since = "1.1.0") public R updateStore(@RequestBody @Validated StoreBo bo) { - storeService.updateStore(bo); + //storeService.updateStore(bo); return R.ok(); } } diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageStorePlugController.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageStorePlugController.java index 44bd544..6bb4b3a 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageStorePlugController.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageStorePlugController.java @@ -1,8 +1,40 @@ package com.cpop.oam.business.controller.backstage; +import cn.dev33.satoken.annotation.SaCheckPermission; +import cn.dev33.satoken.stp.StpUtil; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.util.IdUtil; +import cn.hutool.core.util.StrUtil; +import com.cpop.core.base.entity.PageDomain; +import com.cpop.core.base.entity.R; +import com.cpop.core.base.exception.ServiceException; +import com.cpop.core.utils.SqlUtils; +import com.cpop.oam.business.bo.ChangePlugOpenBo; +import com.cpop.oam.business.bo.ChangePlugVisibleBo; +import com.cpop.oam.business.bo.PlugBo; +import com.cpop.oam.business.entity.Plug; +import com.cpop.oam.business.entity.StorePlug; +import com.cpop.oam.business.vo.PlugPageVo; +import com.cpop.oam.business.vo.PlugVo; +import com.cpop.oam.business.vo.StorePlugListVo; +import com.mybatisflex.core.datasource.DataSourceKey; +import com.mybatisflex.core.paginate.Page; +import com.mybatisflex.core.row.DbChain; +import com.mybatisflex.core.row.Row; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +import static com.cpop.oam.business.entity.table.PlugTableDef.PLUG; +import static com.cpop.oam.business.entity.table.StorePlugTableDef.STORE_PLUG; /** * 校区-插件记录表 控制层。 @@ -13,110 +45,240 @@ import org.springframework.web.bind.annotation.RestController; @RestController @Tag(name = "校区-插件记录表接口") @RequestMapping("/backstage/storePlug") -@Deprecated(since = "1.1.0") public class BackstageStorePlugController { -// @Autowired -// private StorePlugService storePlugService; -// -// @Autowired -// private PlugService plugService; -// -// /** -// * 查询插件分页 -// * @author DB -// * @since 2024/1/5 -// * @return R> -// */ -// @GetMapping("/getPlugPage") -// @Operation(summary = "查询插件分页") -// public R> getPlugPage() { -// Page page = plugService.getPlugPage(); -// return R.ok(page); -// } -// -// /** -// * 查询插件详情 -// * @author DB -// * @since 2024/1/5 -// * @param id 主键 -// * @return R -// */ -// @GetMapping("/getPlugById/{id}") -// @Operation(summary = "查询插件详情") -// public R getPlugById(@PathVariable String id) { -// PlugVo vo = plugService.getOneAs(QueryWrapper.create().where(PLUG.ID.eq(id)), PlugVo.class); -// return R.ok(vo); -// } -// -// /** -// * 新增插件 -// * @author DB -// * @since 2024/1/5 -// * @param bo 请求参数 -// * @return R -// */ -// @Operation(summary = "新增插件") -// @PostMapping("/insertPlug") -// public R insertPlug(@RequestBody @Validated PlugBo bo) { -// plugService.insertPlug(bo); -// return R.ok(); -// } -// -// /** -// * 修改插件 -// * @author DB -// * @since 2024/1/5 -// * @param bo 请求参数 -// * @return R -// */ -// @Operation(summary = "修改插件") -// @PutMapping("/updatePlug") -// public R updateStaff(@RequestBody @Validated PlugBo bo) { -// plugService.updatePlug(bo); -// return R.ok(); -// } -// -// /** -// * 删除插件 -// * @author DB -// * @since 2024/1/5 -// * @param id 主键 -// * @return R -// */ -// @Operation(summary = "删除插件") -// @DeleteMapping("/removePlugById/{id}") -// public R removeStaffById(@PathVariable String id) { -// plugService.removeById(id); -// return R.ok(); -// } -// -// /** -// * 查询校区插件列表 -// * -// * @param brandId brandId -// * @param storeId storeId -// */ -// @GetMapping("/getStorePlugList") -// @Operation(summary = "查询校区插件列表") -// public R> getStorePlugList(@Parameter(description = "品牌id") String brandId, @Parameter(description = "校区id") String storeId) { -// List list = storePlugService.getStorePlugList(brandId, storeId); -// return R.ok(list); -// } -// -// /** -// * 插件开启与关闭 -// */ -// @PutMapping("/changePlugOpen") -// @Operation(summary = "插件开启与关闭") -// public R changePlugOpen(@RequestBody @Validated ChangePlugOpenBo bo) { -// StorePlug storePlug = BeanUtils.mapToClass(bo, StorePlug.class); -// if (bo.getIsOpen()){ -// storePlugService.save(storePlug); -// } else { -// storePlugService.updateChain().where(STORE_PLUG.STORE_ID.eq(bo.getStoreId())).and(STORE_PLUG.PLUG_TAG.eq(bo.getPlugTag())).remove(); -// } -// return R.ok(); -// } + + /** + * 查询插件分页 + * + * @return {@link R }<{@link Page }<{@link PlugPageVo }>> + * @author DB + * @since 2024/06/12 + */ + @GetMapping("/getPlugPage") + @Operation(summary = "查询插件分页") + public R> getPlugPage() { + PageDomain pageDomain = SqlUtils.getInstance().getPageDomain(); + Page page = DataSourceKey.use("jambox", () -> { + return DbChain.table(PLUG).select(PLUG.ID, PLUG.NAME, PLUG.ORDER_NO, PLUG.STATUS, PLUG.PLUG_TAG, PLUG.REMARK) + .orderBy(PLUG.ORDER_NO.desc()) + .pageAs(Page.of(pageDomain.getPage(), pageDomain.getPageSize()), PlugPageVo.class); + }); + return R.ok(page); + } + + + /** + * 查询插件详情 + * + * @param id id + * @return {@link R }<{@link PlugVo }> + * @author DB + * @since 2024/06/12 + */ + @GetMapping("/getPlugById/{id}") + @Operation(summary = "查询插件详情") + public R getPlugById(@PathVariable String id) { + PlugVo vo = DataSourceKey.use("jambox", () -> { + return DbChain.table(PLUG).select() + .where(PLUG.ID.eq(id)) + .oneAs(PlugVo.class); + }); + return R.ok(vo); + } + + /** + * 新增插件 + * + * @param bo 请求参数 + * @return {@link R }<{@link Void }> + * @author DB + * @since 2024/1/5 + */ + @Operation(summary = "新增插件") + @PostMapping("/insertPlug") + public R insertPlug(@RequestBody @Validated PlugBo bo) { + DataSourceKey.use("jambox", () -> { + //检查标签是否存在 + DbChain dbChain = DbChain.table(PLUG); + long count = dbChain.where(PLUG.PLUG_TAG.eq(bo.getPlugTag())).count(); + if (count > 0) { + throw new ServiceException("标签已存在,请重新输入!"); + } + Plug plug = BeanUtil.toBean(bo, Plug.class); + plug.setId(IdUtil.getSnowflakeNextIdStr()); + plug.setCreateTime(LocalDateTime.now()); + plug.setCreateUserId(StpUtil.getLoginIdDefaultNull().toString()); + plug.setUpdateTime(LocalDateTime.now()); + plug.setUpdateUserId(StpUtil.getLoginIdDefaultNull().toString()); + dbChain.save(plug); + }); + return R.ok(); + } + + /** + * 修改插件 + * + * @param bo 请求参数 + * @return {@link R }<{@link Void }> + * @author DB + * @since 2024/1/5 + */ + @Operation(summary = "修改插件") + @PutMapping("/updatePlug") + public R updateStaff(@RequestBody @Validated PlugBo bo) { + DataSourceKey.use("jambox", () -> { + Plug plug = BeanUtil.toBean(bo, Plug.class); + plug.setUpdateTime(LocalDateTime.now()); + plug.setUpdateUserId(StpUtil.getLoginIdDefaultNull().toString()); + DbChain.table(PLUG).update(plug); + }); + return R.ok(); + } + + /** + * 批量下架插件 + * + * @param plugTag 标签 + * @return {@link R }<{@link Void }> + * @author DB + * @since 2024/1/5 + */ + @SaCheckPermission("brandStore.plugInManager.batchRemoval") + @Operation(summary = "批量下架插件") + @PutMapping("/batchRemovalPlug/{plugTag}") + public R batchRemovalPlug(@PathVariable String plugTag) { + DataSourceKey.use("jambox", () -> { + DbChain.table(STORE_PLUG).set(STORE_PLUG.IS_VISIBLE, false) + .set(STORE_PLUG.UPDATE_TIME, LocalDateTime.now()) + .set(STORE_PLUG.UPDATE_USER_ID, StpUtil.getLoginIdDefaultNull().toString()) + .where(STORE_PLUG.PLUG_TAG.eq(plugTag)).update(); + }); + return R.ok(); + } + + /** + * 删除插件 + * + * @param plugTag 主键 + * @return {@link R }<{@link Void }> + * @author DB + * @since 2024/1/5 + */ + @Operation(summary = "删除插件") + @DeleteMapping("/removePlugById/{plugTag}") + public R removeStaffById(@PathVariable String plugTag) { + DataSourceKey.use("jambox", () -> { + //检查是否有校区插件未下架,未下架不允许删除插件 + long count = DbChain.table(STORE_PLUG).where(STORE_PLUG.PLUG_TAG.eq(plugTag)).count(); + if (count > 0) { + throw new ServiceException("该插件有未下架的校区插件,请先批量下架!"); + } + DbChain.table(PLUG).set(PLUG.IS_DELETE, true) + .set(PLUG.UPDATE_TIME, LocalDateTime.now()) + .set(PLUG.UPDATE_USER_ID, StpUtil.getLoginIdDefaultNull().toString()) + .where(PLUG.PLUG_TAG.eq(plugTag)).update(); + }); + return R.ok(); + } + + /** + * 查询校区插件列表 + * + * @param brandId 品牌id + * @param storeId 校区id + * @return {@link R }<{@link List }<{@link StorePlugListVo }>> + * @author DB + * @since 2024/06/12 + */ + @GetMapping("/getStorePlugList") + @Operation(summary = "查询校区插件列表") + public R> getStorePlugList(@Parameter(description = "品牌id") String brandId, @Parameter(description = "校区id") String storeId) { + if (StrUtil.isBlank(brandId) || StrUtil.isBlank(storeId)) { + return R.ok(new ArrayList()); + } + List list = DataSourceKey.use("jambox", () -> { + //获取所有插件 + List plugList = DbChain.table(PLUG).listAs(StorePlugListVo.class); + if (!plugList.isEmpty()) { + List rowList = DbChain.table(STORE_PLUG).where(STORE_PLUG.STORE_ID.eq(storeId)).list(); + Map plugTagMap = rowList.stream().collect(Collectors.toMap(key -> key.getString("plug_tag"), value -> value)); + plugList.forEach(item -> { + if (plugTagMap.get(item.getPlugTag()) != null) { + Row row = plugTagMap.get(item.getPlugTag()); + item.setIsOpen(true); + item.setOpenTime(row.getLocalDateTime("create_time")); + item.setIsVisible(row.getBoolean("is_visible")); + } else { + item.setIsOpen(false); + item.setIsVisible(false); + } + item.setStoreId(storeId); + }); + return plugList; + } else { + return new ArrayList(); + } + }); + return R.ok(list); + } + + /** + * 插件可见开启与关闭 + * + * @param bo 薄 + * @return {@link R }<{@link Void }> + * @author DB + * @since 2024/06/12 + */ + @PutMapping("/changePlugOpen") + @Operation(summary = "插件开启与关闭") + public R changePlugOpen(@RequestBody @Validated ChangePlugOpenBo bo) { + StorePlug storePlug = BeanUtil.toBean(bo, StorePlug.class); + DataSourceKey.use("jambox", () -> { + DbChain dbChain = DbChain.table(STORE_PLUG); + LocalDateTime now = LocalDateTime.now(); + storePlug.setUpdateTime(now); + storePlug.setUpdateUserId(StpUtil.getLoginIdDefaultNull().toString()); + if (StrUtil.isBlank(bo.getId())){ + storePlug.setId(IdUtil.getSnowflakeNextIdStr()).setOpenTime(now); + storePlug.setCreateTime(now); + storePlug.setCreateUserId(StpUtil.getLoginIdDefaultNull().toString()); + dbChain.save(storePlug); + } else { + DbChain.table(STORE_PLUG).update(storePlug); + } + }); + return R.ok(); + } + + /** + * 插件开启与关闭 + * + * @param bo 薄 + * @return {@link R }<{@link Void }> + * @author DB + * @since 2024/06/12 + */ + @PutMapping("/changePlugVisible") + @Operation(summary = "插件开启与关闭") + public R changePlugVisible(@RequestBody @Validated ChangePlugVisibleBo bo) { + StorePlug storePlug = BeanUtil.toBean(bo, StorePlug.class); + DataSourceKey.use("jambox", () -> { + DbChain dbChain = DbChain.table(STORE_PLUG); + LocalDateTime now = LocalDateTime.now(); + storePlug.setUpdateTime(now); + storePlug.setUpdateUserId(StpUtil.getLoginIdDefaultNull().toString()); + if (StrUtil.isBlank(bo.getId())){ + storePlug.setId(IdUtil.getSnowflakeNextIdStr()); + storePlug.setCreateTime(now); + storePlug.setCreateUserId(StpUtil.getLoginIdDefaultNull().toString()); + dbChain.save(storePlug); + } else { + DbChain.table(STORE_PLUG).update(storePlug); + } + }); + return R.ok(); + } } diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageStoreSignController.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageStoreSignController.java new file mode 100644 index 0000000..5d369cd --- /dev/null +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageStoreSignController.java @@ -0,0 +1,118 @@ +package com.cpop.oam.business.controller.backstage; + +import com.cpop.core.base.entity.R; +import com.cpop.oam.business.bo.StoreRunOffBo; +import com.cpop.oam.business.bo.StoreSignRenewPageBo; +import com.cpop.oam.business.bo.StoreSignRenewXmlBo; +import com.cpop.oam.business.vo.StoreSignRenewPageVo; +import com.mybatisflex.core.paginate.Page; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.servlet.http.HttpServletResponse; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; + +/** + * 校区-签约表 控制层。 + * + * @author DB + * @since 2023-12-13 + */ +@RestController +@Tag(name = "校区签约续费接口") +@RequestMapping("/backstage/storeSignRenew") +public class BackstageStoreSignController { + + /** + * 获取校区签约续费分页 + * @author DB + * @since 2024/3/7 + * @return R> + */ + @GetMapping("/getStoreSignRenewPage") + @Operation(summary = "获取校区签约续费分页") + public R> getStoreSignRenewPage(StoreSignRenewPageBo bo) { +// PageDomain pageDomain = SqlUtils.getInstance().getPageDomain(); +// QueryWrapper queryWrapper = QueryWrapper.create(); +// if (StrUtil.isNotBlank(bo.getAddrOrName())){ +// queryWrapper.and(STORE.LICENSE_ADDR.like(bo.getAddrOrName()).or(STORE.LICENSE_FIRM_NAME.like(bo.getAddrOrName()))); +// } +// if (StrUtil.isNotBlank(bo.getBrandOrStore())){ +// queryWrapper.and(BRAND.BRAND_NAME.like(bo.getBrandOrStore()).or(STORE.STORE_NAME.like(bo.getBrandOrStore()))); +// } +// switch (bo.getRenewStatus()){ +// //待续费 +// case 0: +// queryWrapper.and(subDate(STORE_SIGN.EXPIRE_DATE, number(90)).le(now())).and(STORE_SIGN.IS_LOSS.eq(false)); +// break; +// //已续费 +// case 1: +// if (bo.getStartDate() != null && bo.getEndDate() != null) { +// queryWrapper.and(dateFormat(STORE_RENEW.CREATE_TIME, "%Y-%m-%d").between(bo.getStartDate(), bo.getEndDate())); +// } +// return SpringUtils.getBean(StoreRenewService.class).getMapper().paginateAs(Page.of(pageDomain.getPage(), pageDomain.getPageSize()), queryWrapper +// .select(BRAND.BRAND_NAME) +// .select(STORE.CREATE_TIME.as(StoreSignRenewPageVo::getCreateTime), STORE.PERSON_CHARGE_NAME, STORE.PERSON_CHARGE_PHONE, STORE.STORE_NAME) +// .select(STORE_SIGN.EXPIRE_DATE, STORE_SIGN.ID) +// .select(STORE.LICENSE_ADDR, STORE.LICENSE_FIRM_NAME, STORE.LICENSE_USERNAME) +// .select(STORE_RENEW.CREATE_TIME, STORE_RENEW.AMOUNT) +// .from(STORE_RENEW) +// .leftJoin(STORE).on(STORE.ID.eq(STORE_RENEW.STORE_ID)) +// .leftJoin(BRAND).on(BRAND.ID.eq(STORE.BRAND_ID)) +// .leftJoin(STORE_SIGN).on(STORE_SIGN.STORE_ID.eq(STORE.ID)), +// StoreSignRenewPageVo.class); +// //已流失 +// default: +// queryWrapper.and(STORE_SIGN.IS_LOSS.eq(true)); +// } +// return this.mapper.paginateAs(Page.of(pageDomain.getPage(), pageDomain.getPageSize()), queryWrapper +// .select(BRAND.BRAND_NAME) +// .select(STORE.CREATE_TIME.as(StoreSignRenewPageVo::getCreateTime), STORE.PERSON_CHARGE_NAME, STORE.PERSON_CHARGE_PHONE, STORE.STORE_NAME) +// .select(STORE.LICENSE_ADDR, STORE.LICENSE_FIRM_NAME, STORE.LICENSE_USERNAME) +// .select(STORE_RENEW.CREATE_TIME, STORE_RENEW.AMOUNT) +// .leftJoin(STORE).on(STORE.ID.eq(STORE_SIGN.STORE_ID)) +// .leftJoin(BRAND).on(BRAND.ID.eq(STORE.BRAND_ID)) +// .leftJoin(STORE_RENEW).on(STORE_RENEW.STORE_ID.eq(STORE.ID)), +// StoreSignRenewPageVo.class); +// return R.ok(page); + return R.ok(); + } + + /** + * 机构/店铺流失 + * @author DB + * @since 2023/12/14 + * @param bo 请求参数 + * @return R + */ + @PostMapping("/runOff") + @Operation(summary = "机构流失") + public R runOff(@RequestBody @Validated StoreRunOffBo bo) { + //storeSignService.runOff(bo); + return R.ok(); + } + + /** + * 获取签约续费导出数据 + * @author DB + * @since 2023/12/14 + * @param response 响应 + * @param bo 请求参数 + */ + @PostMapping("/getSignRenewXml") + @Operation(summary = "获取签约续费导出数据") + public void getRenewXml(HttpServletResponse response, @RequestBody @Validated StoreSignRenewXmlBo bo) throws IOException { + // 这里注意 有同学反应使用swagger 会导致各种问题,请直接用浏览器或者用postman + response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + response.setCharacterEncoding("utf-8"); + // 这里URLEncoder.encode可以防止中文乱码 当然和easyExcel没有关系 + String fileName = URLEncoder.encode("已续费数据", StandardCharsets.UTF_8).replaceAll("\\+", "%20"); + response.setHeader("Content-disposition", "attachment;filename*=" + fileName + ".xlsx"); + //EasyExcel.write(response.getOutputStream(), StoreRenewDto.class).sheet("记录").doWrite(storeSignService.getSignRenewXml(bo)); + } + +} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/dto/StoreRenewDto.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/dto/StoreRenewDto.java similarity index 97% rename from Cpop-System/src/main/java/com/cpop/system/business/dto/StoreRenewDto.java rename to Cpop-Oam/src/main/java/com/cpop/oam/business/dto/StoreRenewDto.java index befdea8..626fce5 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/dto/StoreRenewDto.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/dto/StoreRenewDto.java @@ -1,4 +1,4 @@ -package com.cpop.system.business.dto; +package com.cpop.oam.business.dto; import com.alibaba.excel.annotation.ExcelProperty; import lombok.Data; diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/entity/Order.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/entity/Order.java new file mode 100644 index 0000000..ce65128 --- /dev/null +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/entity/Order.java @@ -0,0 +1,95 @@ +package com.cpop.oam.business.entity; + +import com.cpop.core.base.entity.BaseEntity; +import com.cpop.core.base.entity.BaseInsertListener; +import com.cpop.core.base.entity.BaseUpdateListener; +import com.mybatisflex.annotation.Column; +import com.mybatisflex.annotation.Id; +import com.mybatisflex.annotation.Table; +import lombok.*; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * oam支付订单 实体类。 + * + * @author DB + * @since 2024-06-05 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@Builder +@NoArgsConstructor +@AllArgsConstructor +@Accessors(chain = true) +@Table(value = "cp_sys_order", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false) + +public class Order extends BaseEntity implements Serializable { + + /** + * 主键 + */ + @Id + private String id; + + /** + * 购买的商品信息 + */ + private String orderContent; + + /** + * 支付状态(0:待付款;1:待发货;2:待确认;3:已完成;4:退款/售后中:5:订单取消;6:过期) + */ + private Integer orderStatus; + + /** + * 外部订单号 + */ + private String outOrderNo; + + /** + * 品牌id + */ + private String brandId; + + /** + * 校区id + */ + private String storeId; + + /** + * 产品/课卡id + */ + private String productId; + + /** + * 总金额 + */ + private BigDecimal totalAmount; + + /** + * 总支付金额 + */ + private BigDecimal totalPayAmount; + + /** + * 订单类型(枚举) + */ + private String orderType; + + /** + * 支付二维码 + */ + private String payQrCode; + + + + /** + * 逻辑删除(0否1是) + */ + @Column(isLogicDelete = true) + private Boolean isDelete; + +} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/entity/ProfitSharing.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/entity/Plug.java similarity index 52% rename from Cpop-System/src/main/java/com/cpop/system/business/entity/ProfitSharing.java rename to Cpop-Oam/src/main/java/com/cpop/oam/business/entity/Plug.java index 952dbc3..4e99232 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/entity/ProfitSharing.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/entity/Plug.java @@ -1,4 +1,4 @@ -package com.cpop.system.business.entity; +package com.cpop.oam.business.entity; import com.cpop.core.base.entity.BaseEntity; import com.cpop.core.base.entity.BaseInsertListener; @@ -6,15 +6,16 @@ import com.cpop.core.base.entity.BaseUpdateListener; import com.mybatisflex.annotation.Column; import com.mybatisflex.annotation.Id; import com.mybatisflex.annotation.Table; -import java.io.Serializable; import lombok.*; import lombok.experimental.Accessors; +import java.io.Serializable; + /** - * 系统分账表 实体类。 + * 果酱插件 实体类。 * * @author DB - * @since 2023-10-27 + * @since 2024-06-12 */ @Data @EqualsAndHashCode(callSuper=false) @@ -22,8 +23,8 @@ import lombok.experimental.Accessors; @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) -@Table(value = "cp_sys_profit_sharing", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false) -public class ProfitSharing extends BaseEntity implements Serializable { +@Table(value = "j_sys_plug", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false) +public class Plug extends BaseEntity implements Serializable { /** * 主键 @@ -32,34 +33,34 @@ public class ProfitSharing extends BaseEntity implements Serializable { private String id; /** - * 外部分账单号 + * 插件名 */ - private String outProfitSharingId; + private String name; /** - * 订单id + * 插件标签 */ - private String orderId; + private String plugTag; /** - * 订单来源 + * 插件图标地址 */ - private String orderSource; + private String picUrl; /** - * 分账金额(单位分) + * 排序 */ - private Long amount; + private Integer orderNo; /** - * 支付账号信息 + * 备注 */ - private String payAccount; + private String remark; /** - * 分账状态(0:分账中;1:分账成功;2;分账退款) + * 状态(0:禁用;1:使用) */ - private Integer profitSharingStatus; + private Integer status; /** * 逻辑删除(0否1是) diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/entity/StorePlug.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/entity/StorePlug.java new file mode 100644 index 0000000..e4cd296 --- /dev/null +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/entity/StorePlug.java @@ -0,0 +1,60 @@ +package com.cpop.oam.business.entity; + +import com.cpop.core.base.entity.BaseEntity; +import com.cpop.core.base.entity.BaseInsertListener; +import com.cpop.core.base.entity.BaseUpdateListener; +import com.mybatisflex.annotation.Id; +import com.mybatisflex.annotation.Table; +import lombok.*; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * 校区-插件记录表 实体类。 + * + * @author DB + * @since 2024-06-12 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@Builder +@NoArgsConstructor +@AllArgsConstructor +@Accessors(chain = true) +@Table(value = "j_sys_store_plug", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false) +public class StorePlug extends BaseEntity implements Serializable { + + /** + * 主键 + */ + @Id + private String id; + + /** + * 校区id + */ + private String storeId; + + /** + * 插件标记 + */ + private String plugTag; + + /** + * 是否可见 + */ + private Boolean isVisible; + + /** + * 启用时间 + */ + private LocalDateTime openTime; + + /** + * 是否启用 + */ + private Boolean isOpen; + +} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/entity/StoreRenew.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/entity/StoreRenew.java similarity index 81% rename from Cpop-System/src/main/java/com/cpop/system/business/entity/StoreRenew.java rename to Cpop-Oam/src/main/java/com/cpop/oam/business/entity/StoreRenew.java index 83b6710..b44e6ee 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/entity/StoreRenew.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/entity/StoreRenew.java @@ -1,4 +1,4 @@ -package com.cpop.system.business.entity; +package com.cpop.oam.business.entity; import com.cpop.core.base.entity.BaseEntity; import com.cpop.core.base.entity.BaseInsertListener; @@ -6,26 +6,27 @@ import com.cpop.core.base.entity.BaseUpdateListener; import com.mybatisflex.annotation.Column; import com.mybatisflex.annotation.Id; import com.mybatisflex.annotation.Table; +import lombok.*; +import lombok.experimental.Accessors; + import java.io.Serializable; import java.math.BigDecimal; import java.time.LocalDate; import java.time.LocalDateTime; -import lombok.*; -import lombok.experimental.Accessors; /** - * 校区续费表 实体类。 + * 签约续费 实体类。 * * @author DB - * @since 2023-12-14 + * @since 2024-03-07 */ @Data -@EqualsAndHashCode(callSuper = false) +@EqualsAndHashCode(callSuper=false) @Builder @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) -@Table(value = "j_sys_store_renew", dataSource = "jambox", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false) +@Table(value = "j_sys_store_renew", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false) public class StoreRenew extends BaseEntity implements Serializable { /** diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/mapper/OrderMapper.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/mapper/OrderMapper.java new file mode 100644 index 0000000..bf4b9cd --- /dev/null +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/mapper/OrderMapper.java @@ -0,0 +1,14 @@ +package com.cpop.oam.business.mapper; + +import com.mybatisflex.core.BaseMapper; +import com.cpop.oam.business.entity.Order; + +/** + * oam支付订单 映射层。 + * + * @author DB + * @since 2024-06-05 + */ +public interface OrderMapper extends BaseMapper { + +} diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/service/OrderService.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/service/OrderService.java new file mode 100644 index 0000000..a0df2ab --- /dev/null +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/service/OrderService.java @@ -0,0 +1,14 @@ +package com.cpop.oam.business.service; + +import com.mybatisflex.core.service.IService; +import com.cpop.oam.business.entity.Order; + +/** + * oam支付订单 服务层。 + * + * @author DB + * @since 2024-06-05 + */ +public interface OrderService extends IService { + +} diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/OrderServiceImpl.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/OrderServiceImpl.java new file mode 100644 index 0000000..34088a0 --- /dev/null +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/OrderServiceImpl.java @@ -0,0 +1,18 @@ +package com.cpop.oam.business.service.impl; + +import com.mybatisflex.spring.service.impl.ServiceImpl; +import com.cpop.oam.business.entity.Order; +import com.cpop.oam.business.mapper.OrderMapper; +import com.cpop.oam.business.service.OrderService; +import org.springframework.stereotype.Service; + +/** + * oam支付订单 服务层实现。 + * + * @author DB + * @since 2024-06-05 + */ +@Service("orderService") +public class OrderServiceImpl extends ServiceImpl implements OrderService { + +} diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/TaskDemandServiceImpl.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/TaskDemandServiceImpl.java index 740df67..242bcc5 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/TaskDemandServiceImpl.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/TaskDemandServiceImpl.java @@ -1,15 +1,14 @@ package com.cpop.oam.business.service.impl; -import cn.binarywang.wx.miniapp.api.WxMaQrcodeService; -import cn.binarywang.wx.miniapp.api.WxMaService; import cn.dev33.satoken.stp.StpUtil; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.util.StrUtil; +import cn.hutool.extra.qrcode.QrCodeUtil; +import cn.hutool.extra.qrcode.QrConfig; import com.cpop.api.tencent.wxWork.handler.WebHookSendHandler; import com.cpop.core.base.entity.PageDomain; import com.cpop.core.base.exception.ServiceException; import com.cpop.core.base.table.Config; -import com.cpop.core.constant.Constants; import com.cpop.core.service.ConfigService; import com.cpop.core.service.RedisService; import com.cpop.core.utils.SpringUtils; @@ -17,33 +16,47 @@ import com.cpop.core.utils.SqlUtils; import com.cpop.oam.business.bo.TaskDemandBo; import com.cpop.oam.business.bo.TaskDemandPageBo; import com.cpop.oam.business.bo.TaskDemandUrgentBo; +import com.cpop.oam.business.entity.Order; import com.cpop.oam.business.entity.Task; import com.cpop.oam.business.entity.TaskDemand; import com.cpop.oam.business.mapper.TaskDemandMapper; import com.cpop.oam.business.service.CommonService; +import com.cpop.oam.business.service.OrderService; import com.cpop.oam.business.service.TaskDemandService; import com.cpop.oam.business.service.TaskService; import com.cpop.oam.business.vo.TaskDemandPageVo; import com.cpop.oam.business.vo.TaskDemandUrgentVo; import com.cpop.oam.framework.constant.WebHookKeyConstant; import com.cpop.oam.framework.enums.OamConfigEnum; +import com.cpop.oam.framework.enums.OrderType; +import com.cpop.oam.framework.handler.tencentCos.TencentCosHandler; +import com.cpop.pay.framewok.config.wxPay.WxPayConfiguration; +import com.cpop.pay.framewok.handler.wxPay.WxPayHandler; +import com.github.binarywang.wxpay.bean.request.WxPayUnifiedOrderV3Request; +import com.github.binarywang.wxpay.bean.result.WxPayUnifiedOrderResult; +import com.github.binarywang.wxpay.bean.result.enums.TradeTypeEnum; +import com.github.binarywang.wxpay.exception.WxPayException; +import com.github.binarywang.wxpay.service.WxPayService; import com.mybatisflex.core.datasource.DataSourceKey; import com.mybatisflex.core.paginate.Page; import com.mybatisflex.core.query.QueryWrapper; import com.mybatisflex.core.row.DbChain; import com.mybatisflex.core.row.Row; import com.mybatisflex.spring.service.impl.ServiceImpl; -import me.chanjar.weixin.common.error.WxErrorException; +import com.qcloud.cos.model.UploadResult; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.awt.*; +import java.io.ByteArrayInputStream; import java.io.IOException; +import java.math.BigDecimal; import java.util.ArrayList; -import java.util.Base64; import java.util.List; import static com.cpop.core.base.table.table.UserTableDef.USER; import static com.cpop.oam.business.entity.table.BrandTableDef.BRAND; +import static com.cpop.oam.business.entity.table.OrderTableDef.ORDER; import static com.cpop.oam.business.entity.table.StaffTableDef.STAFF; import static com.cpop.oam.business.entity.table.StoreTableDef.STORE; import static com.cpop.oam.business.entity.table.TaskDemandTableDef.TASK_DEMAND; @@ -269,24 +282,86 @@ public class TaskDemandServiceImpl extends ServiceImpl { + return BigDecimal.valueOf(3000); + } + case "B" -> { + return BigDecimal.valueOf(1500); + } + case "C" -> { + return BigDecimal.valueOf(700); + } + case "D" -> { + return BigDecimal.valueOf(500); + } + case "E" -> { + return BigDecimal.valueOf(300); + } + case "F" -> { + return BigDecimal.valueOf(100); + } + default -> { + return BigDecimal.valueOf(100); + } + } + } } diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/TaskWorkOrderServiceImpl.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/TaskWorkOrderServiceImpl.java index f2f64b2..4fb0948 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/TaskWorkOrderServiceImpl.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/TaskWorkOrderServiceImpl.java @@ -21,11 +21,8 @@ import com.cpop.oam.framework.constant.WebHookKeyConstant; import com.cpop.oam.framework.enums.OamConfigEnum; import com.cpop.oam.framework.enums.QuartzEnums; import com.cpop.oam.framework.tasks.*; -import com.mybatisflex.core.datasource.DataSourceKey; import com.mybatisflex.core.paginate.Page; import com.mybatisflex.core.query.QueryWrapper; -import com.mybatisflex.core.row.DbChain; -import com.mybatisflex.core.row.Row; import com.mybatisflex.spring.service.impl.ServiceImpl; import lombok.extern.slf4j.Slf4j; import org.quartz.*; @@ -43,7 +40,6 @@ import java.time.ZoneId; import java.time.format.DateTimeFormatter; import java.time.temporal.TemporalAdjusters; import java.util.*; -import java.util.concurrent.atomic.AtomicReference; import java.util.stream.Collectors; import static com.cpop.core.base.table.table.UserTableDef.USER; @@ -93,9 +89,14 @@ public class TaskWorkOrderServiceImpl extends ServiceImpl> storeAndBrandMap = new AtomicReference<>(); - try { - DataSourceKey.use("jambox", () -> { - storeAndBrandMap.set(DbChain.table(STORE) - .select(BRAND.ID.as("brandId"), BRAND.BRAND_NAME.as("storeName"), STORE.ID.as("storeId"), STORE.STORE_NAME.as("brandName")) - .from(STORE) - .leftJoin(BRAND).on(BRAND.ID.eq(STORE.BRAND_ID)) - .where(STORE.ID.in(dtoList.stream().map(TaskWorkOrderReceiveDealPauseDto::getStoreId).toList())) - .list() - .stream().collect(Collectors.toMap(row -> row.getString("storeId"), row -> row))); - }); - } finally { - DataSourceKey.clear(); - } - dtoList.forEach(item->{ - Row row = storeAndBrandMap.get().get(item.getStoreId()); - if (row != null){ - item.setStoreName(row.getString("storeName")); - item.setBrandName(row.getString("brandName")); - } - }); // 分组过滤 Map> taskStatusMap = dtoList.stream().collect(Collectors.groupingBy(TaskWorkOrderReceiveDealPauseDto::getTaskStatus)); TaskWorkOrderReceiveDealPauseVo taskWorkOrderReceiveDealPauseVo = new TaskWorkOrderReceiveDealPauseVo(); diff --git a/Cpop-System/src/main/java/com/cpop/system/business/vo/BrandPageVo.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/vo/BrandInfoVo.java similarity index 77% rename from Cpop-System/src/main/java/com/cpop/system/business/vo/BrandPageVo.java rename to Cpop-Oam/src/main/java/com/cpop/oam/business/vo/BrandInfoVo.java index 82b8943..1ffecb3 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/vo/BrandPageVo.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/vo/BrandInfoVo.java @@ -1,21 +1,19 @@ -package com.cpop.system.business.vo; +package com.cpop.oam.business.vo; -import com.fasterxml.jackson.annotation.JsonFormat; +import com.cpop.core.anno.StringArrayConvert; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.experimental.Accessors; -import java.time.LocalDateTime; - /** - * Description: - * date: 2023/6/1 18:08 * @author DB + * @version 1.0.0 + * @since 2024-06-07 13:56 */ @Data @Accessors(chain = true) -@Schema(description = "品牌分页返回对象") -public class BrandPageVo { +@Schema(description = "品牌详情对象") +public class BrandInfoVo { /** * 主键 @@ -29,19 +27,19 @@ public class BrandPageVo { @Schema(description = "品牌名") private String brandName; + /** + * 品牌logo + */ + @StringArrayConvert + @Schema(description = "品牌logo") + private String brandLogo; + /** * 微信商户号 */ @Schema(description = "微信商户号") private String wxMchId; - /** - * 创建时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8") - @Schema(description = "创建时间") - private LocalDateTime createTime; - /** * 品牌总部地址 */ @@ -57,6 +55,7 @@ public class BrandPageVo { /** * 总部营业执照图片地址 */ + @StringArrayConvert @Schema(description = "总部营业执照图片地址") private String licensePicUrl; @@ -89,4 +88,11 @@ public class BrandPageVo { */ @Schema(description = "总部营业执照日期") private String licenseDate; + + /** + * 授权产品 + */ + @StringArrayConvert + @Schema(description = "授权产品") + private String authProduct; } diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/vo/BrandPageVo.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/vo/BrandPageVo.java new file mode 100644 index 0000000..09dc5e3 --- /dev/null +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/vo/BrandPageVo.java @@ -0,0 +1,57 @@ +package com.cpop.oam.business.vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.experimental.Accessors; + +import java.time.LocalDateTime; + +/** + * Description: + * date: 2023/6/1 18:08 + * @author DB + */ +@Data +@Accessors(chain = true) +@Schema(description = "品牌分页返回对象") +public class BrandPageVo { + + /** + * 主键 + */ + @Schema(description = "主键") + private String id; + + /** + * 云函数id + */ + @Schema(description = "品牌名") + private String brandName; + + /** + * 品牌logo + */ + @Schema(description = "品牌logo") + private String brandLogo; + + /** + * 微信商户号 + */ + @Schema(description = "微信商户号") + private String wxMchId; + + /** + * 创建时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8") + @Schema(description = "创建时间") + private LocalDateTime createTime; + + /** + * 品牌总部地址 + */ + @Schema(description = "品牌总部地址") + private String brandAddr; + +} diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/vo/PlugPageVo.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/vo/PlugPageVo.java new file mode 100644 index 0000000..4ba0846 --- /dev/null +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/vo/PlugPageVo.java @@ -0,0 +1,54 @@ +package com.cpop.oam.business.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * 果酱插件 + * @author DB + * @version 1.0.0 + * @since 2024-01-05 10:33 + */ +@Data +@Accessors(chain = true) +@Schema(description = "PlugPageVo对象") +public class PlugPageVo { + + /** + * 主键 + */ + @Schema(description = "主键") + private String id; + + /** + * 插件名 + */ + @Schema(description = "插件名") + private String name; + + /** + * 备注 + */ + @Schema(description = "备注") + private String remark; + + /** + * 插件标签 + */ + @Schema(description = "插件标签") + private String plugTag; + + /** + * 排序 + */ + @Schema(description = "排序") + private Integer orderNo; + + /** + * 状态(0:禁用;1:使用) + */ + @Schema(description = "状态(0:禁用;1:使用)") + private Integer status; + +} diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/vo/PlugVo.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/vo/PlugVo.java new file mode 100644 index 0000000..59722b6 --- /dev/null +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/vo/PlugVo.java @@ -0,0 +1,58 @@ +package com.cpop.oam.business.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * @author DB + * @version 1.0.0 + * @since 2024-01-05 13:48 + */ +@Data +@Accessors(chain = true) +@Schema(description = "PlugPageVo对象") +public class PlugVo { + + /** + * 主键 + */ + @Schema(description = "主键") + private String id; + + /** + * 插件名 + */ + @Schema(description = "插件名") + private String name; + + /** + * 插件标签 + */ + @Schema(description = "插件标签") + private String plugTag; + + /** + * 插件图标地址 + */ + @Schema(description = "插件图标地址") + private String picUrl; + + /** + * 排序 + */ + @Schema(description = "排序") + private Integer orderNo; + + /** + * 备注 + */ + @Schema(description = "备注") + private String remark; + + /** + * 状态(0:禁用;1:使用) + */ + @Schema(description = "状态(0:禁用;1:使用)") + private Integer status; +} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/vo/StorePageVo.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/vo/StorePageVo.java similarity index 93% rename from Cpop-System/src/main/java/com/cpop/system/business/vo/StorePageVo.java rename to Cpop-Oam/src/main/java/com/cpop/oam/business/vo/StorePageVo.java index b5afe97..d4196d7 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/vo/StorePageVo.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/vo/StorePageVo.java @@ -1,11 +1,12 @@ -package com.cpop.system.business.vo; +package com.cpop.oam.business.vo; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.experimental.Accessors; + import java.io.Serializable; -import java.time.LocalDate; +import java.sql.Date; import java.time.LocalDateTime; /** @@ -66,7 +67,7 @@ public class StorePageVo implements Serializable { */ @JsonFormat(pattern = "yyyy-MM-dd") @Schema(description = "到期日期") - private LocalDate expireDate; + private Date expireDate; /** * 微信商户号 diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/vo/StorePlugListVo.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/vo/StorePlugListVo.java new file mode 100644 index 0000000..fb5fdf3 --- /dev/null +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/vo/StorePlugListVo.java @@ -0,0 +1,82 @@ +package com.cpop.oam.business.vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.experimental.Accessors; + +import java.time.LocalDateTime; + +/** + * @author DB + * @version 1.0.0 + * @since 2023-12-29 16:36 + */ +@Data +@Accessors(chain = true) +@Schema(description = "StorePlugListVo对象") +public class StorePlugListVo { + + /** + * 主键 + */ + @Schema(description = "主键") + private String id; + + /** + * 插件名 + */ + @Schema(description = "插件名") + private String name; + + /** + * 备注 + */ + @Schema(description = "备注") + private String remark; + + /** + * 插件标签 + */ + @Schema(description = "插件标签") + private String plugTag; + + /** + * 排序 + */ + @Schema(description = "排序") + private Integer orderNo; + + /** + * 是否开启 + */ + @Schema(description = "是否开启") + private Boolean isOpen; + + + /** + * 上架时间 + */ + @Schema(description = "上架时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private LocalDateTime updateTime; + + /** + * 开启时间 + */ + @Schema(description = "开启时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private LocalDateTime openTime; + + /** + * 校区id + */ + @Schema(description = "校区id") + private String storeId; + + /** + * 是否可见 + */ + @Schema(description = "是否可见") + private Boolean isVisible = false; +} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/vo/StoreSignRenewPageVo.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/vo/StoreSignRenewPageVo.java similarity index 97% rename from Cpop-System/src/main/java/com/cpop/system/business/vo/StoreSignRenewPageVo.java rename to Cpop-Oam/src/main/java/com/cpop/oam/business/vo/StoreSignRenewPageVo.java index 310eba5..b9f49d9 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/vo/StoreSignRenewPageVo.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/vo/StoreSignRenewPageVo.java @@ -1,4 +1,4 @@ -package com.cpop.system.business.vo; +package com.cpop.oam.business.vo; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/framework/enums/OrderType.java b/Cpop-Oam/src/main/java/com/cpop/oam/framework/enums/OrderType.java new file mode 100644 index 0000000..6257b26 --- /dev/null +++ b/Cpop-Oam/src/main/java/com/cpop/oam/framework/enums/OrderType.java @@ -0,0 +1,140 @@ +package com.cpop.oam.framework.enums; + +import com.mybatisflex.annotation.EnumValue; +import lombok.Getter; + +/** + * 订单来源 + * @author DB + * @version 1.0.0 + * @since 2024-04-16 9:34 + */ +public interface OrderType { + + /** + * 获取分账比例 + * @author DB + * @since 2024/4/17 + * @return Double + */ + Double getRate(); + + /** + * 获取类型 + * @author DB + * @since 2024/4/17 + * @return Double + */ + String getName(); + + /** + * 放心学 + */ + @Getter + enum EasyLearn implements OrderType { + + /** + * 多期支付(次付) + */ + MULTIPLE_PAY("EasyLearn.MULTIPLE_PAY", 0.06), + + /** + * 月付 + */ + MONTH_PAY("EasyLearn.MONTH_PAY", 0.06), + + /** + * 数字人民币支付 + */ + DIGITAL_PAY("EasyLearn.DIGITAL_PAY", null), + + /** + * 微信支付 + */ + WX_PAY("EasyLearn.WX_PAY", 0.06), + + /** + * 趣学赞 + */ + FUN_LEARN("EasyLearn.FUN_LEARN", null), + ; + + @EnumValue + private final String name; + + /** + * 分账比例 + */ + private final Double rate; + + EasyLearn(String name, Double rate) { + this.name = name; + this.rate = rate; + } + } + + /** + * 商城 + */ + @Getter + enum Mall implements OrderType { + + /** + * 微信支付 + */ + WX_PAY("Mall.WX_PAY", 0.002), + ; + + @EnumValue + private final String name; + + /** + * 分账比例 + */ + private final Double rate; + + Mall(String name, Double rate) { + this.name = name; + this.rate = rate; + } + } + + + + /** + * 系统 + */ + @Getter + enum System implements OrderType { + + /** + * 会员支付 + */ + MEMBER_PAY("System.MEMBER_PAY",0.06), + + /** + * 校区续费支付 + */ + STORE_RENEW_PAY("System.STORE_RENEW_PAY",null), + + /** + * 任务需求支付 + */ + TASK_DEMAND_PAY("System.TASK_DEMAND_PAY",null), + ; + + @EnumValue + private final String name; + + /** + * 分账比例 + */ + private final Double rate; + + System(String name, Double rate) { + this.name = name; + this.rate = rate; + } + } + +} diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/framework/handler/tencentCos/TencentCosHandler.java b/Cpop-Oam/src/main/java/com/cpop/oam/framework/handler/tencentCos/TencentCosHandler.java index 370d2b4..5bdb63e 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/framework/handler/tencentCos/TencentCosHandler.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/framework/handler/tencentCos/TencentCosHandler.java @@ -140,14 +140,13 @@ public class TencentCosHandler { public UploadResult cdnUpload(MultipartFile file) { createTransferManager(); try { - String fileType = FileUtil.getType(file.getResource().getFile()); ObjectMetadata objectMetadata = new ObjectMetadata(); // 上传的流如果能够获取准确的流长度,则推荐一定填写 content-length // 如果确实没办法获取到,则下面这行可以省略,但同时高级接口也没办法使用分块上传了 objectMetadata.setContentLength(file.getSize()); objectMetadata.setContentType(file.getContentType()); InputStream inputStream = file.getInputStream(); - PutObjectRequest putObjectRequest = new PutObjectRequest(properties.getBucketName(), IdUtil.getSnowflakeNextId() + "." + fileType, inputStream, objectMetadata); + PutObjectRequest putObjectRequest = new PutObjectRequest(properties.getBucketName(), uploadHandler.getName(uploadHandler.extractFilename(file)), inputStream, objectMetadata); // 设置存储类型(如有需要,不需要请忽略此行代码), 默认是标准(Standard), 低频(standard_ia) // 更多存储类型请参见 https://cloud.tencent.com/document/product/436/33417 putObjectRequest.setStorageClass(StorageClass.Standard); @@ -238,4 +237,35 @@ public class TencentCosHandler { throw new UtilException(e.getMessage()); } } + + /** + * 根据输入流上传文件 + * @author DB + * @since 2024/5/7 + * @param inputStream 数据流 + * @param type 类型 + * @return UploadResult + */ + public UploadResult uploadInputStream(InputStream inputStream, String type){ + createTransferManager(); + try { + ObjectMetadata objectMetadata = new ObjectMetadata(); + // 上传的流如果能够获取准确的流长度,则推荐一定填写 content-length + // 如果确实没办法获取到,则下面这行可以省略,但同时高级接口也没办法使用分块上传了 + objectMetadata.setContentLength(inputStream.readAllBytes().length); + objectMetadata.setContentType(type); + PutObjectRequest putObjectRequest = new PutObjectRequest(properties.getBucketName(), IdUtil.getSnowflakeNextId() + "." + type, inputStream, objectMetadata); + // 设置存储类型(如有需要,不需要请忽略此行代码), 默认是标准(Standard), 低频(standard_ia) + // 更多存储类型请参见 https://cloud.tencent.com/document/product/436/33417 + putObjectRequest.setStorageClass(StorageClass.Standard); + Upload upload = transferManager.upload(putObjectRequest); + UploadResult uploadResult = upload.waitForUploadResult(); + inputStream.close(); + return uploadResult; + } catch (IOException | InterruptedException e) { + throw new UtilException(e); + } finally { + shutdownTransferManager(transferManager); + } + } } diff --git a/Cpop-System/src/main/resources/mapper/StoreMapper.xml b/Cpop-Oam/src/main/resources/mapper/OrderMapper.xml similarity index 72% rename from Cpop-System/src/main/resources/mapper/StoreMapper.xml rename to Cpop-Oam/src/main/resources/mapper/OrderMapper.xml index f8a71c7..9b493c6 100644 --- a/Cpop-System/src/main/resources/mapper/StoreMapper.xml +++ b/Cpop-Oam/src/main/resources/mapper/OrderMapper.xml @@ -2,6 +2,6 @@ - + diff --git a/Cpop-System/pom.xml b/Cpop-System/pom.xml deleted file mode 100644 index 57e4096..0000000 --- a/Cpop-System/pom.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - 4.0.0 - - com.cpop - Cpop-Union - 1.1.2 - ../pom.xml - - Cpop-System - Cpop-System - Cpop-System - jar - - - - - com.cpop - Cpop-Core - - - - com.cpop - Cpop-Api - - - - com.tencentcloudapi - tencentcloud-sdk-java - - - - com.qcloud - cos_api - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - true - - - - - diff --git a/Cpop-System/src/main/java/com/cpop/system/business/bo/BrandBo.java b/Cpop-System/src/main/java/com/cpop/system/business/bo/BrandBo.java deleted file mode 100644 index 42e8d75..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/bo/BrandBo.java +++ /dev/null @@ -1,108 +0,0 @@ -package com.cpop.system.business.bo; - -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotBlank; -import lombok.Data; -import lombok.experimental.Accessors; - -/** - * @author DB - * @since 2023/10/25 16:43 - */ -@Data -@Accessors(chain = true) -@Schema(description = "品牌请求参数") -public class BrandBo { - - /** - * 主键 - */ - @NotBlank(message = "主键不能为空") - @Schema(description = "主键",requiredMode = Schema.RequiredMode.REQUIRED) - private String id; - - /** - * 品牌名 - */ - @NotBlank(message = "品牌名不能为空") - @Schema(description = "品牌名",requiredMode = Schema.RequiredMode.REQUIRED) - private String brandName; - - /** - * 负责人 - */ - @NotBlank(message = "负责人不能为空") - @Schema(description = "负责人",requiredMode = Schema.RequiredMode.REQUIRED) - private String personChargeName; - - /** - * 负责人手机号 - */ - @NotBlank(message = "负责人手机号不能为空") - @Schema(description = "负责人手机号",requiredMode = Schema.RequiredMode.REQUIRED) - private String personChargePhone; - - /** - * 经度 - */ - @NotBlank(message = "经度不能为空") - @Schema(description = "经度",requiredMode = Schema.RequiredMode.REQUIRED) - private String longitude; - - /** - * 纬度 - */ - @NotBlank(message = "纬度不能为空") - @Schema(description = "纬度",requiredMode = Schema.RequiredMode.REQUIRED) - private String latitude; - - /** - * 品牌地址 - */ - @NotBlank(message = "品牌地址不能为空") - @Schema(description = "品牌地址",requiredMode = Schema.RequiredMode.REQUIRED) - private String brandAddr; - - /** - * 总部营业执照地址 - */ - @NotBlank(message = "总部营业执照地址不能为空") - @Schema(description = "总部营业执照地址",requiredMode = Schema.RequiredMode.REQUIRED) - private String licenseAddr; - - /** - * 总部营业执照日期 - */ - @NotBlank(message = "总部营业执照日期不能为空") - @Schema(description = "总部营业执照日期",requiredMode = Schema.RequiredMode.REQUIRED) - private String licenseDate; - - /** - * 总部营业执照公司名 - */ - @NotBlank(message = "总部营业执照公司名不能为空") - @Schema(description = "总部营业执照公司名",requiredMode = Schema.RequiredMode.REQUIRED) - private String licenseFirmName; - - /** - * 总部营业执照法人名 - */ - @NotBlank(message = "总部营业执照法人名不能为空") - @Schema(description = "总部营业执照法人名",requiredMode = Schema.RequiredMode.REQUIRED) - private String licenseUsername; - - /** - * 营业执照社会信用代码 - */ - @NotBlank(message = "总部营业执照社会信用代码不能为空") - @Schema(description = "总部营业执照社会信用代码",requiredMode = Schema.RequiredMode.REQUIRED) - private String licenseCreditCode; - - /** - * 总部营业执照图片地址 - */ - @NotBlank(message = "总部营业执照图片地址不能为空") - @Schema(description = "总部营业执照图片地址",requiredMode = Schema.RequiredMode.REQUIRED) - private String licensePicUrl; - -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/bo/MenuBo.java b/Cpop-System/src/main/java/com/cpop/system/business/bo/MenuBo.java deleted file mode 100644 index 8a513b3..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/bo/MenuBo.java +++ /dev/null @@ -1,112 +0,0 @@ -package com.cpop.system.business.bo; - -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotNull; -import lombok.Data; -import lombok.experimental.Accessors; - -import java.io.Serializable; - - -/** - * 系统菜单表Bo - * - * @author DB.lost - * @since 2023-05-10 - */ -@Data -@Accessors(chain = true) -@Schema(description = "菜单对象") -public class MenuBo { - - /** - * 菜单ID - */ - @Schema(description = "菜单ID") - private String id; - - /** - * 父级菜单ID - */ - @Schema(description = "父级菜单ID") - private String parentMenu; - - /** - * 菜单名称 - */ - @Schema(description = "菜单名称") - private String name; - - /** - * 菜单图标 - */ - @Schema(description = "菜单图标") - private String icon; - - /** - * 菜单路由,父菜单为空 - */ - @Schema(description = "菜单路由,父菜单为空") - private String component; - - /** - * 标记菜单的状态 0:禁用 1:启用(根据权限正常显示) - */ - @NotNull(message = "状态不能为空") - @Schema(description = "标记菜单的状态 0:禁用 1:启用(根据权限正常显示)", requiredMode = Schema.RequiredMode.REQUIRED) - private Boolean status; - - /** - * 菜单类型,0:目录,1:菜单,2:按钮 - */ - @NotNull(message = "菜单类型不能为空") - @Schema(description = "菜单类型,0:目录,1:菜单,2:按钮", requiredMode = Schema.RequiredMode.REQUIRED) - private Integer type; - - /** - * 权限 - */ - @Schema(description = "权限") - private String permission; - - /** - * 重定向路径,一级菜单有值 - */ - @Schema(description = "重定向路径,一级菜单有值") - private String redirect; - - /** - * 排序,值越小越靠前,一级菜单有值 - */ - @NotNull(message = "排序不能为空") - @Schema(description = "排序,值越小越靠前,一级菜单有值", requiredMode = Schema.RequiredMode.REQUIRED) - private Integer orderNo; - - /** - * 路由地址 - */ - @Schema(description = "路由地址") - private String path; - - /** - * 标题 - */ - @NotBlank(message = "标题不能为空") - @Schema(description = "标题", requiredMode = Schema.RequiredMode.REQUIRED) - private String title; - - /** - * 隐藏菜单 - */ - @Schema(description = "隐藏菜单") - private Boolean hideMenu; - - /** - * 是否忽略KeepAlive缓存 - */ - @NotNull(message = "是否忽略KeepAlive缓存不能为空") - @Schema(description = "是否忽略KeepAlive缓存") - private Boolean ignoreKeepAlive; - -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/bo/MenuListBo.java b/Cpop-System/src/main/java/com/cpop/system/business/bo/MenuListBo.java deleted file mode 100644 index c595fc5..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/bo/MenuListBo.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.cpop.system.business.bo; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.experimental.Accessors; - -import java.io.Serializable; - -/** - * Description: - * date: 2023/4/25 18:01 - * @author ST - */ -@Data -@Accessors(chain = true) -@Schema(description = "菜单传入对象") -public class MenuListBo { - - /** - * 标题 - */ - @Schema(description = "标题") - private String title; - - /** - * 标记菜单的状态 0:禁用 1:启用(根据权限正常显示) - */ - @Schema(description = "标记菜单的状态 0:禁用 1:启用(根据权限正常显示)") - private Boolean status; -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/bo/RoleBo.java b/Cpop-System/src/main/java/com/cpop/system/business/bo/RoleBo.java deleted file mode 100644 index f9e5e44..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/bo/RoleBo.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.cpop.system.business.bo; - -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotNull; -import lombok.Data; -import lombok.experimental.Accessors; - -import java.util.List; - -/** - * 系统角色表Bo - * - * @author DB.lost - * @since 2023-05-10 - */ -@Data -@Accessors(chain = true) -@Schema(description = "角色对象") -public class RoleBo { - - /** - * 主键 - */ - @Schema(description = "主键") - private String id; - - /** - * 角色名称 - */ - @NotBlank(message = "角色名称不能为空") - @Schema(description = "角色名称") - private String roleName; - - /** - * 角色值 - */ - @NotBlank(message = "角色值不能为空") - @Schema(description = "角色值") - private String roleValue; - - /** - * 状态 - */ - @NotNull(message = "状态不能为空") - @Schema(description = "状态") - private Boolean status; - - /** - * 备注 - */ - @Schema(description = "备注") - private String remark; - - /** - * 排序 - */ - @NotNull(message = "排序不能为空") - @Schema(description = "排序") - private Integer orderNo; - - /** - * 菜单集合 - */ - @Schema(description = "菜单集合") - private List menuIds; - -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/bo/RolePageBo.java b/Cpop-System/src/main/java/com/cpop/system/business/bo/RolePageBo.java deleted file mode 100644 index 1a819c1..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/bo/RolePageBo.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.cpop.system.business.bo; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.experimental.Accessors; - -import java.io.Serializable; - -/** - * @since 2023/5/9 13:58 - * @author DB - */ -@Data -@Accessors(chain = true) -@Schema(description = "SysRole分页对象") -public class RolePageBo { - - /** - * 角色名称 - */ - @Schema(description = "角色名称") - private String roleName; - - /** - * 状态 - */ - @Schema(description = "状态") - private Boolean status; -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/bo/RoleStatusBo.java b/Cpop-System/src/main/java/com/cpop/system/business/bo/RoleStatusBo.java deleted file mode 100644 index a3c8948..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/bo/RoleStatusBo.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.cpop.system.business.bo; - -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotNull; -import lombok.Data; -import lombok.experimental.Accessors; - -import java.io.Serializable; - -/** - * Description: - * date: 2023/5/9 14:12 - * - * @Author DB - */ -@Data -@Accessors(chain = true) -@Schema(description = "角色状态对象") -public class RoleStatusBo { - - /** - * 主键 - */ - @NotBlank(message = "id不能为空") - @Schema(description = "主键",requiredMode = Schema.RequiredMode.REQUIRED) - private String id; - - /** - * 状态 - */ - @NotNull(message = "状态不能为空") - @Schema(description = "状态",requiredMode = Schema.RequiredMode.REQUIRED) - private Boolean status; -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageBrandController.java b/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageBrandController.java deleted file mode 100644 index 06b5e14..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageBrandController.java +++ /dev/null @@ -1,109 +0,0 @@ -package com.cpop.system.business.controller.backstage; - -import cn.hutool.core.bean.BeanUtil; -import com.cpop.core.base.entity.R; -import com.cpop.system.business.bo.BrandBo; -import com.cpop.system.business.vo.BrandPageVo; -import com.mybatisflex.core.paginate.Page; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.beans.factory.annotation.Autowired; -import com.cpop.system.business.entity.Brand; -import com.cpop.system.business.service.BrandService; -import org.springframework.web.bind.annotation.RestController; - -/** - * 系统-品牌表 控制层。 - * - * @author DB - * @since 2023-10-25 - */ -@RestController -@Tag(name = "品牌接口") -@RequestMapping("/backstage/brand") -public class BackstageBrandController { - - @Autowired - private BrandService brandService; - - /** - * 新增品牌 - * @author DB - * @since 2023/10/25 16:53 - * @param bo 品牌参数 - * @return com.cpop.core.base.entity.R - */ - @PostMapping("/insertSysBrand") - @Operation(summary = "新增品牌") - @Deprecated(since = "1.1.0") - public R insertSysBrand(@RequestBody @Parameter(description = "品牌") @Validated BrandBo bo) { - return R.fail("新增品牌接口已废弃"); - } - - /** - * 修改品牌 - * - * @param bo 品牌参数 - * @return com.cpop.core.base.entity.R - * @author DB - * @since 2023/11/10 9:21 - */ - @Operation(summary = "修改品牌") - @PutMapping("/updateSysBrand") - public R updateSysBrand(@RequestBody @Parameter(description = "品牌") @Validated BrandBo bo) { - Brand entity = BeanUtil.toBean(bo, Brand.class); - brandService.updateById(entity); - return R.ok(); - } - - /** - * 导入果酱品牌 - * @author DB - * @since 2023/10/25 15:53 - * @param brandId 果酱品牌信息 - */ - @PostMapping("/importJamboxBrand/{brandId}") - @Operation(summary = "导入果酱品牌") - @Deprecated(since = "1.1.0") - public R importJamboxBrand(@PathVariable String brandId) { - return R.fail("导入果酱品牌接口已废弃"); - } - - /** - * 查询品牌分页列表 - * @author DB - * @since 2023/09/13 17:55 - * @param brandName 请求参数 - * @return com.cpop.core.base.entity.R> - */ - @Operation(summary = "查询品牌分页列表") - @GetMapping("/getBrandPage") - public R> getBrandPageList(String brandName) { - Page pageVo = brandService.getBrandPage(brandName); - return R.ok(pageVo); - } - - /** - * 根据品牌id删除品牌 - * @author DB - * @since 2023/11/09 10:31 - * @param id 主键 - * @return com.cpop.core.base.entity.R - */ - @Operation(summary = "根据品牌id删除品牌") - @DeleteMapping("/removeBrandById/{id}") - @Deprecated(since = "1.1.0") - public R removeBrandById(@PathVariable String id) { - return R.fail("根据品牌id删除品牌接口已废弃"); - } - -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageStoreSignController.java b/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageStoreSignController.java deleted file mode 100644 index 8004741..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageStoreSignController.java +++ /dev/null @@ -1,83 +0,0 @@ -package com.cpop.system.business.controller.backstage; - -import com.alibaba.excel.EasyExcel; -import com.cpop.core.base.entity.R; -import com.cpop.system.business.bo.StoreRunOffBo; -import com.cpop.system.business.bo.StoreSignRenewPageBo; -import com.cpop.system.business.bo.StoreSignRenewXmlBo; -import com.cpop.system.business.dto.StoreRenewDto; -import com.cpop.system.business.service.StoreSignService; -import com.cpop.system.business.vo.StoreSignRenewPageVo; -import com.mybatisflex.core.paginate.Page; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.servlet.http.HttpServletResponse; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import java.io.IOException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; - -/** - * 校区-签约表 控制层。 - * - * @author DB - * @since 2023-12-13 - */ -@RestController -@Tag(name = "校区签约续费接口") -@RequestMapping("/backstage/storeSignRenew") -public class BackstageStoreSignController { - - @Autowired - private StoreSignService storeSignService; - - /** - * 获取校区签约续费分页 - * @author DB - * @since 2024/3/7 - * @return R> - */ - @GetMapping("/getStoreSignRenewPage") - @Operation(summary = "获取校区签约续费分页") - public R> getStoreSignRenewPage(StoreSignRenewPageBo bo) { - Page page = storeSignService.getStoreSignRenewPage(bo); - return R.ok(page); - } - - /** - * 机构/店铺流失 - * @author DB - * @since 2023/12/14 - * @param bo 请求参数 - * @return R - */ - @PostMapping("/runOff") - @Operation(summary = "机构流失") - public R runOff(@RequestBody @Validated StoreRunOffBo bo) { - storeSignService.runOff(bo); - return R.ok(); - } - - /** - * 获取签约续费导出数据 - * @author DB - * @since 2023/12/14 - * @param response 响应 - * @param bo 请求参数 - */ - @PostMapping("/getSignRenewXml") - @Operation(summary = "获取签约续费导出数据") - public void getRenewXml(HttpServletResponse response, @RequestBody @Validated StoreSignRenewXmlBo bo) throws IOException { - // 这里注意 有同学反应使用swagger 会导致各种问题,请直接用浏览器或者用postman - response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); - response.setCharacterEncoding("utf-8"); - // 这里URLEncoder.encode可以防止中文乱码 当然和easyExcel没有关系 - String fileName = URLEncoder.encode("已续费数据", StandardCharsets.UTF_8).replaceAll("\\+", "%20"); - response.setHeader("Content-disposition", "attachment;filename*=" + fileName + ".xlsx"); - EasyExcel.write(response.getOutputStream(), StoreRenewDto.class).sheet("记录").doWrite(storeSignService.getSignRenewXml(bo)); - } - -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/entity/Brand.java b/Cpop-System/src/main/java/com/cpop/system/business/entity/Brand.java deleted file mode 100644 index cb1a1eb..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/entity/Brand.java +++ /dev/null @@ -1,191 +0,0 @@ -package com.cpop.system.business.entity; - -import com.cpop.core.base.entity.BaseEntity; -import com.cpop.core.base.entity.BaseInsertListener; -import com.cpop.core.base.entity.BaseUpdateListener; -import com.mybatisflex.annotation.Column; -import com.mybatisflex.annotation.Id; -import com.mybatisflex.annotation.Table; -import java.io.Serializable; - -import lombok.*; -import lombok.experimental.Accessors; - -/** - * 系统-品牌表 实体类。 - * - * @author DB - * @since 2023-10-25 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Builder -@NoArgsConstructor -@AllArgsConstructor -@Accessors(chain = true) -@Table(value = "j_sys_brand", dataSource = "jambox", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false) -public class Brand extends BaseEntity implements Serializable { - - /** - * 主键 - */ - @Id - private String id; - - /** - * 品牌名 - */ - private String brandName; - - /** - * 品牌logo - */ - private String brandLogo; - - /** - * 品牌名简称 - */ - private String simpleBrandName; - - /** - * 微信商户号 - */ - private String wxMchId; - - /** - * 微信商户名称 - */ - private String wxMchName; - - /** - * 微信商户管理员 - */ - private String wxMchAdmin; - - /** - * 授权产品(0:商城;1:先学后付次付;2:先学后付月付;3:一次性支付) - */ - private Integer authProduct; - - /** - * 小程序名 - */ - private String wxMiniName; - - /** - * 负责人 - */ - private String personChargeName; - - /** - * 负责人手机号 - */ - private String personChargePhone; - - /** - * 品牌横图 - */ - private String brandHorizontalGraph; - - /** - * 品牌长图 - */ - private String brandLongChart; - - /** - * 主色系 - */ - private String mainColor; - - /** - * 副色系 - */ - private String secondaryColor; - - /** - * 管理模式(0:全直营;1:直营+加盟;2:全加盟) - */ - private Integer manageType; - - /** - * 省 - */ - private String province; - - /** - * 市 - */ - private String city; - - /** - * 区 - */ - private String region; - - /** - * 经度 - */ - private String longitude; - - /** - * 纬度 - */ - private String latitude; - - /** - * 品牌地址 - */ - private String brandAddr; - - /** - * 品牌学员端二维码 - */ - private String brandWxQr; - - /** - * 总部营业执照地址 - */ - private String licenseAddr; - - /** - * 总部营业执照社会信用代码 - */ - private String licenseCreditCode; - - /** - * 总部营业执照日期 - */ - private String licenseDate; - - /** - * 总部营业执照公司名 - */ - private String licenseFirmName; - - /** - * 总部公司属性(0:个体;1:企业) - */ - private Boolean licenseStats; - - /** - * 总部营业执照法人名 - */ - private String licenseUsername; - - /** - * 总部营业执照图片地址 - */ - private String licensePicUrl; - - /** - * 是否首次登录 - */ - private Boolean perfectInformation; - - /** - * 逻辑删除(0否1是) - */ - @Column(isLogicDelete = true) - private Boolean isDelete; - -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/entity/Store.java b/Cpop-System/src/main/java/com/cpop/system/business/entity/Store.java deleted file mode 100644 index 5dce3b8..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/entity/Store.java +++ /dev/null @@ -1,256 +0,0 @@ -package com.cpop.system.business.entity; - -import com.cpop.core.base.entity.BaseEntity; -import com.cpop.core.base.entity.BaseInsertListener; -import com.cpop.core.base.entity.BaseUpdateListener; -import com.mybatisflex.annotation.Column; -import com.mybatisflex.annotation.Id; -import com.mybatisflex.annotation.Table; -import lombok.*; -import lombok.experimental.Accessors; - -import java.io.Serializable; - -/** - * 系统-店铺/校区表 实体类。 - * - * @author DB - * @since 2023-10-26 - */ -@Data -@EqualsAndHashCode(callSuper=false) -@Builder -@NoArgsConstructor -@AllArgsConstructor -@Accessors(chain = true) -@Table(value = "j_sys_store", dataSource = "jambox", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false) -public class Store extends BaseEntity implements Serializable { - - /** - * 店铺/校区id - */ - @Id - private String id; - - /** - * 品牌id - */ - private String brandId; - - /** - * 店铺/校区名 - */ - private String storeName; - - /** - * 负责人 - */ - private String personChargeName; - - /** - * 手机号 - */ - private String personChargePhone; - - /** - * 店铺/校区地址 - */ - private String storeAddr; - - /** - * 校区横图 - */ - private String storeHorizontalGraph; - - /** - * 省 - */ - private String province; - - /** - * 市 - */ - private String city; - - /** - * 区 - */ - private String region; - - /** - * 经度 - */ - private String longitude; - - /** - * 纬度 - */ - private String latitude; - - /** - * 校区营业执照地址 - */ - private String licenseAddr; - - /** - * 校区营业执照日期 - */ - private String licenseDate; - - /** - * 总部营业执照社会信用代码 - */ - private String licenseCreditCode; - - /** - * 校区营业执照公司名 - */ - private String licenseFirmName; - - /** - * 校区公司属性(0:个体;1:企业) - */ - private Boolean licenseStats; - - /** - * 校区营业执照法人名 - */ - private String licenseUsername; - - /** - * 校区营业执照图片地址 - */ - private String licensePicUrl; - - /** - * 微信商户名称 - */ - private String wxMchName; - - /** - * 微信商户号 - */ - private String wxMchId; - - /** - * 微信商户管理员 - */ - private String wxMchAdmin; - - /** - * 授权产品(0:商城;1:先学后付次付;2:先学后付月付;3:一次性支付) - */ - private Integer authProduct; - - /** - * 校区学员端二维码 - */ - private String storeWxQr; - - /** - * 合约内容 - */ - private String contractContent; - - /** - * 合约签名 - */ - private String contractSign; - - /** - * 开启课卡权益审批 - */ - private Boolean openCardEquityAudit; - - /** - * 开启账单变动审核 - */ - private Boolean openBillChangeAudit; - - /** - * 预创建员工权限组 - */ - private Boolean preCreateStaffPermissionGroup; - - /** - * 创建课卡类型 - */ - private Boolean preCreateCardType; - - /** - * 预创建客户类型 - */ - private Boolean preCreateCustomerType; - - /** - * 开启预约人数隐藏 - */ - private Boolean openPreCustomerNumHide; - - /** - * 开启金额隐藏 - */ - private Boolean openAmountHide; - - /** - * 开启预约排队功能 - */ - private Boolean openPreQueue; - - /** - * 开启按课次课消 - */ - private Boolean openClassTimeConsume; - - /** - * 开启自动复制课表 - */ - private Boolean openAutoCopyClassSchedule; - - /** - * 课前可预约时间 - */ - private Integer beforeClassCourseReservationTime; - - /** - * 课前不可预约时间 - */ - private Integer beforeClassNotCourseReservationTime; - - /** - * 课前取消预约时间 - */ - private Integer beforeClassCancelCourseReservationTime; - - /** - * 课前请假时间 - */ - private Integer beforeClassLeaveTime; - - /** - * 新课卡默认缓存时间 - */ - private Integer newClassCardBufferTime; - - /** - * 品牌预设模板id - */ - private String brandPreinstallTemplateId; - - /** - * 是否首次登录 - */ - private Boolean perfectInformation; - - /** - * 授权微信商户(使用品牌绑定的微信商户) - */ - private Boolean authWxMch; - - /** - * 逻辑删除(0否1是) - */ - @Column(isLogicDelete = true) - private Boolean isDelete; - -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/entity/StoreSign.java b/Cpop-System/src/main/java/com/cpop/system/business/entity/StoreSign.java deleted file mode 100644 index bf68d6c..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/entity/StoreSign.java +++ /dev/null @@ -1,81 +0,0 @@ -package com.cpop.system.business.entity; - -import com.cpop.core.base.entity.BaseEntity; -import com.cpop.core.base.entity.BaseInsertListener; -import com.cpop.core.base.entity.BaseUpdateListener; -import com.mybatisflex.annotation.Column; -import com.mybatisflex.annotation.Id; -import com.mybatisflex.annotation.Table; -import java.io.Serializable; -import java.time.LocalDate; -import lombok.*; -import lombok.experimental.Accessors; - -/** - * 校区-签约表 实体类。 - * - * @author DB - * @since 2023-12-13 - */ -@Data -@EqualsAndHashCode(callSuper=false) -@Builder -@NoArgsConstructor -@AllArgsConstructor -@Accessors(chain = true) -@Table(value = "j_sys_store_sign", dataSource = "jambox", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false) -public class StoreSign extends BaseEntity implements Serializable { - - /** - * 主键 - */ - @Id - private String id; - - /** - * 校区/店铺id - */ - private String storeId; - - /** - * 签约状态(0:未签约;1:已签约;2:已过期) - */ - private Integer signStatus; - - /** - * 到期日期 - */ - private LocalDate expireDate; - - /** - * 签约员工id - */ - private String signStaffId; - - /** - * 是否流失 - */ - private Boolean isLoss; - - /** - * 流失日期 - */ - private LocalDate runOffDate; - - /** - * 流失原因 - */ - private String runOffReason; - - /** - * 签约月份 - */ - private String signMonth; - - /** - * 逻辑删除(0否1是) - */ - @Column(isLogicDelete = true) - private Boolean isDelete; - -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/mapper/BrandMapper.java b/Cpop-System/src/main/java/com/cpop/system/business/mapper/BrandMapper.java deleted file mode 100644 index 9fc58ca..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/mapper/BrandMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.cpop.system.business.mapper; - -import com.mybatisflex.annotation.UseDataSource; -import com.mybatisflex.core.BaseMapper; -import com.cpop.system.business.entity.Brand; - -/** - * 系统-品牌表 映射层。 - * - * @author DB - * @since 2023-10-25 - */ -@UseDataSource("jambox") -public interface BrandMapper extends BaseMapper { - -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/mapper/ProfitSharingMapper.java b/Cpop-System/src/main/java/com/cpop/system/business/mapper/ProfitSharingMapper.java deleted file mode 100644 index 593d2f1..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/mapper/ProfitSharingMapper.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.cpop.system.business.mapper; - -import com.mybatisflex.core.BaseMapper; -import com.cpop.system.business.entity.ProfitSharing; - -/** - * 系统分账表 映射层。 - * - * @author DB - * @since 2023-10-27 - */ -public interface ProfitSharingMapper extends BaseMapper { - -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/mapper/StoreMapper.java b/Cpop-System/src/main/java/com/cpop/system/business/mapper/StoreMapper.java deleted file mode 100644 index c473ac9..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/mapper/StoreMapper.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.cpop.system.business.mapper; - -import com.mybatisflex.core.BaseMapper; -import com.cpop.system.business.entity.Store; - -/** - * 系统-店铺/校区表 映射层。 - * - * @author DB - * @since 2023-10-26 - */ -public interface StoreMapper extends BaseMapper { - -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/mapper/StoreRenewMapper.java b/Cpop-System/src/main/java/com/cpop/system/business/mapper/StoreRenewMapper.java deleted file mode 100644 index 3d938e4..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/mapper/StoreRenewMapper.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.cpop.system.business.mapper; - -import com.mybatisflex.core.BaseMapper; -import com.cpop.system.business.entity.StoreRenew; - -/** - * 校区续费表 映射层。 - * - * @author DB - * @since 2023-12-14 - */ -public interface StoreRenewMapper extends BaseMapper { - -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/mapper/StoreSignMapper.java b/Cpop-System/src/main/java/com/cpop/system/business/mapper/StoreSignMapper.java deleted file mode 100644 index a198f13..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/mapper/StoreSignMapper.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.cpop.system.business.mapper; - -import com.mybatisflex.core.BaseMapper; -import com.cpop.system.business.entity.StoreSign; - -/** - * 校区-签约表 映射层。 - * - * @author DB - * @since 2023-12-13 - */ -public interface StoreSignMapper extends BaseMapper { - -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/service/BrandService.java b/Cpop-System/src/main/java/com/cpop/system/business/service/BrandService.java deleted file mode 100644 index 8711c5a..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/service/BrandService.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.cpop.system.business.service; - -import com.cpop.system.business.vo.BrandPageVo; -import com.mybatisflex.core.paginate.Page; -import com.mybatisflex.core.service.IService; -import com.cpop.system.business.entity.Brand; - -/** - * 系统-品牌表 服务层。 - * - * @author DB - * @since 2023-10-25 - */ -public interface BrandService extends IService { - - /** - * 查询品牌分页列表 - * @author DB - * @since 2023/10/25 17:32 - * @param brandName 请求参数 - * @return com.mybatisflex.core.paginate.Page - */ - Page getBrandPage(String brandName); - -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/service/ProfitSharingService.java b/Cpop-System/src/main/java/com/cpop/system/business/service/ProfitSharingService.java deleted file mode 100644 index 8156fe0..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/service/ProfitSharingService.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.cpop.system.business.service; - -import com.mybatisflex.core.service.IService; -import com.cpop.system.business.entity.ProfitSharing; - -/** - * 系统分账表 服务层。 - * - * @author DB - * @since 2023-10-27 - */ -public interface ProfitSharingService extends IService { - -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/service/StoreRenewService.java b/Cpop-System/src/main/java/com/cpop/system/business/service/StoreRenewService.java deleted file mode 100644 index 55e611d..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/service/StoreRenewService.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.cpop.system.business.service; - -import com.mybatisflex.core.service.IService; -import com.cpop.system.business.entity.StoreRenew; - -/** - * 校区续费表 服务层。 - * - * @author DB - * @since 2023-12-14 - */ -public interface StoreRenewService extends IService { - -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/service/StoreService.java b/Cpop-System/src/main/java/com/cpop/system/business/service/StoreService.java deleted file mode 100644 index d3a5e71..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/service/StoreService.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.cpop.system.business.service; - -import com.cpop.system.business.bo.StoreBo; -import com.cpop.system.business.vo.StorePageVo; -import com.mybatisflex.core.paginate.Page; -import com.mybatisflex.core.service.IService; -import com.cpop.system.business.entity.Store; - -/** - * 系统-店铺/校区表 服务层。 - * - * @author DB - * @since 2023-10-26 - */ -public interface StoreService extends IService { - - /** - * 查询校区分页列表 - * @param name 请求参数 - * @return R> - * @author Administrator - * @since 2023/6/7 0007 10:18 - */ - Page getStorePage(String name); - - /** - * 更新校区 - * @author DB - * @since 2024/1/15 - * @param bo 请求参数 - */ - void updateStore(StoreBo bo); - -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/service/StoreSignService.java b/Cpop-System/src/main/java/com/cpop/system/business/service/StoreSignService.java deleted file mode 100644 index 6e5eac3..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/service/StoreSignService.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.cpop.system.business.service; - -import com.cpop.system.business.bo.StoreRunOffBo; -import com.cpop.system.business.bo.StoreSignRenewPageBo; -import com.cpop.system.business.bo.StoreSignRenewXmlBo; -import com.cpop.system.business.dto.StoreRenewDto; -import com.cpop.system.business.vo.StoreSignRenewPageVo; -import com.mybatisflex.core.paginate.Page; -import com.mybatisflex.core.service.IService; -import com.cpop.system.business.entity.StoreSign; - -import java.util.List; - -/** - * 校区-签约表 服务层。 - * - * @author DB - * @since 2023-12-13 - */ -public interface StoreSignService extends IService { - - /** - * 获取校区签约续费分页 - * @author DB - * @since 2024/3/7 - * @return Page - */ - Page getStoreSignRenewPage(StoreSignRenewPageBo bo); - - /** - * 机构/店铺流失 - * @author DB - * @since 2023/12/14 - * @param bo 请求参数 - */ - void runOff(StoreRunOffBo bo); - - /** - * 获取已续费导出数据 - * @author DB - * @since 2023/12/14 - * @param bo 请求 - * @return List - */ - List getSignRenewXml(StoreSignRenewXmlBo bo); - -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/service/impl/BrandServiceImpl.java b/Cpop-System/src/main/java/com/cpop/system/business/service/impl/BrandServiceImpl.java deleted file mode 100644 index 4524427..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/service/impl/BrandServiceImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.cpop.system.business.service.impl; - -import com.cpop.core.base.entity.PageDomain; -import com.cpop.core.utils.SqlUtils; -import com.cpop.system.business.entity.Brand; -import com.cpop.system.business.mapper.BrandMapper; -import com.cpop.system.business.service.BrandService; -import com.cpop.system.business.vo.BrandPageVo; -import com.mybatisflex.core.paginate.Page; -import com.mybatisflex.core.query.QueryWrapper; -import com.mybatisflex.spring.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; - -import static com.cpop.system.business.entity.table.BrandTableDef.BRAND; - -/** - * 系统-品牌表 服务层实现。 - * - * @author DB - * @since 2023-10-25 - */ -@Service("brandService") -public class BrandServiceImpl extends ServiceImpl implements BrandService { - - /** - * 查询品牌分页列表 - * @author DB - * @since 2023/10/25 17:32 - * @param brandName 请求参数 - * @return com.mybatisflex.core.paginate.Page - */ - @Override - public Page getBrandPage(String brandName) { - PageDomain pageDomain = SqlUtils.getInstance().getPageDomain(); - return this.mapper.paginateAs(pageDomain.getPage(), pageDomain.getPageSize(), QueryWrapper.create() - .select(BRAND.ID, BRAND.BRAND_NAME, BRAND.WX_MCH_ID, BRAND.CREATE_TIME, BRAND.WX_MCH_ID, BRAND.BRAND_ADDR, BRAND.LICENSE_STATS, BRAND.LICENSE_PIC_URL, BRAND.LICENSE_CREDIT_CODE, - BRAND.LICENSE_FIRM_NAME, BRAND.LICENSE_USERNAME, BRAND.LICENSE_ADDR, BRAND.LICENSE_DATE) - .and(BRAND.BRAND_NAME.likeLeft(brandName)) - .orderBy(BRAND.CREATE_TIME.desc()), - BrandPageVo.class); - } - -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/service/impl/ProfitSharingServiceImpl.java b/Cpop-System/src/main/java/com/cpop/system/business/service/impl/ProfitSharingServiceImpl.java deleted file mode 100644 index 66b957e..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/service/impl/ProfitSharingServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.cpop.system.business.service.impl; - -import com.mybatisflex.spring.service.impl.ServiceImpl; -import com.cpop.system.business.entity.ProfitSharing; -import com.cpop.system.business.mapper.ProfitSharingMapper; -import com.cpop.system.business.service.ProfitSharingService; -import org.springframework.stereotype.Service; - -/** - * 系统分账表 服务层实现。 - * - * @author DB - * @since 2023-10-27 - */ -@Service("profitSharingService") -public class ProfitSharingServiceImpl extends ServiceImpl implements ProfitSharingService { - -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/service/impl/StoreRenewServiceImpl.java b/Cpop-System/src/main/java/com/cpop/system/business/service/impl/StoreRenewServiceImpl.java deleted file mode 100644 index 4674da7..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/service/impl/StoreRenewServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.cpop.system.business.service.impl; - -import com.mybatisflex.spring.service.impl.ServiceImpl; -import com.cpop.system.business.entity.StoreRenew; -import com.cpop.system.business.mapper.StoreRenewMapper; -import com.cpop.system.business.service.StoreRenewService; -import org.springframework.stereotype.Service; - -/** - * 校区续费表 服务层实现。 - * - * @author DB - * @since 2023-12-14 - */ -@Service("storeRenewService") -public class StoreRenewServiceImpl extends ServiceImpl implements StoreRenewService { - -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/service/impl/StoreServiceImpl.java b/Cpop-System/src/main/java/com/cpop/system/business/service/impl/StoreServiceImpl.java deleted file mode 100644 index bbe03f6..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/service/impl/StoreServiceImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.cpop.system.business.service.impl; - -import cn.hutool.core.bean.BeanUtil; -import com.cpop.core.base.entity.PageDomain; -import com.cpop.core.utils.SqlUtils; -import com.cpop.system.business.bo.StoreBo; -import com.cpop.system.business.entity.Store; -import com.cpop.system.business.mapper.StoreMapper; -import com.cpop.system.business.service.StoreService; -import com.cpop.system.business.vo.StorePageVo; -import com.mybatisflex.core.paginate.Page; -import com.mybatisflex.core.query.QueryWrapper; -import com.mybatisflex.spring.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import static com.cpop.system.business.entity.table.BrandTableDef.BRAND; -import static com.cpop.system.business.entity.table.StoreSignTableDef.STORE_SIGN; -import static com.cpop.system.business.entity.table.StoreTableDef.STORE; - -/** - * 系统-店铺/校区表 服务层实现。 - * - * @author DB - * @since 2023-10-26 - */ -@Service("storeService") -public class StoreServiceImpl extends ServiceImpl implements StoreService { - - /** - * 查询校区分页列表 - * @param name 请求参数 - * @return R> - * @author Administrator - * @since 2023/6/7 0007 10:18 - */ - @Override - public Page getStorePage(String name) { - PageDomain pageDomain = SqlUtils.getInstance().getPageDomain(); - return this.getMapper().paginateAs(Page.of(pageDomain.getPage(), pageDomain.getPageSize()), QueryWrapper.create() - .select(STORE.ID, STORE.STORE_NAME, STORE.CREATE_TIME, STORE.STORE_ADDR, STORE.PERSON_CHARGE_NAME.as(StorePageVo::getPersonCharge), - STORE.PERSON_CHARGE_PHONE.as(StorePageVo::getPhone), STORE.WX_MCH_ID) - .select(STORE_SIGN.EXPIRE_DATE) - .select(BRAND.BRAND_NAME) - .from(STORE) - .leftJoin(STORE_SIGN).on(STORE_SIGN.STORE_ID.eq(STORE.ID)) - .leftJoin(BRAND).on(BRAND.ID.eq(STORE.BRAND_ID)) - .and(STORE.STORE_NAME.like(name)) - .orderBy(STORE.CREATE_TIME.desc()), - StorePageVo.class); - } - - /** - * 更新校区 - * @author DB - * @since 2024/1/15 - * @param bo 请求参数 - */ - @Override - @Transactional(rollbackFor = Exception.class) - public void updateStore(StoreBo bo) { - Store store = BeanUtil.toBean(bo, Store.class); - this.updateById(store); - } -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/service/impl/StoreSignServiceImpl.java b/Cpop-System/src/main/java/com/cpop/system/business/service/impl/StoreSignServiceImpl.java deleted file mode 100644 index 3cb6057..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/service/impl/StoreSignServiceImpl.java +++ /dev/null @@ -1,126 +0,0 @@ -package com.cpop.system.business.service.impl; - -import cn.hutool.core.util.StrUtil; -import com.cpop.core.base.entity.PageDomain; -import com.cpop.core.utils.SpringUtils; -import com.cpop.core.utils.SqlUtils; -import com.cpop.system.business.bo.StoreRunOffBo; -import com.cpop.system.business.bo.StoreSignRenewPageBo; -import com.cpop.system.business.bo.StoreSignRenewXmlBo; -import com.cpop.system.business.dto.StoreRenewDto; -import com.cpop.system.business.entity.StoreSign; -import com.cpop.system.business.mapper.StoreSignMapper; -import com.cpop.system.business.service.StoreRenewService; -import com.cpop.system.business.service.StoreSignService; -import com.cpop.system.business.vo.StoreSignRenewPageVo; -import com.mybatisflex.core.paginate.Page; -import com.mybatisflex.core.query.QueryWrapper; -import com.mybatisflex.spring.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; - -import java.util.List; - -import static com.cpop.system.business.entity.table.BrandTableDef.BRAND; -import static com.cpop.system.business.entity.table.StoreRenewTableDef.STORE_RENEW; -import static com.cpop.system.business.entity.table.StoreSignTableDef.STORE_SIGN; -import static com.cpop.system.business.entity.table.StoreTableDef.STORE; -import static com.mybatisflex.core.query.QueryMethods.*; - -/** - * 校区-签约表 服务层实现。 - * - * @author DB - * @since 2023-12-13 - */ -@Service("storeSignService") -public class StoreSignServiceImpl extends ServiceImpl implements StoreSignService { - - /** - * 获取校区签约续费分页 - * @author DB - * @since 2024/3/7 - * @return Page - */ - @Override - public Page getStoreSignRenewPage(StoreSignRenewPageBo bo) { - PageDomain pageDomain = SqlUtils.getInstance().getPageDomain(); - QueryWrapper queryWrapper = QueryWrapper.create(); - if (StrUtil.isNotBlank(bo.getAddrOrName())){ - queryWrapper.and(STORE.LICENSE_ADDR.like(bo.getAddrOrName()).or(STORE.LICENSE_FIRM_NAME.like(bo.getAddrOrName()))); - } - if (StrUtil.isNotBlank(bo.getBrandOrStore())){ - queryWrapper.and(BRAND.BRAND_NAME.like(bo.getBrandOrStore()).or(STORE.STORE_NAME.like(bo.getBrandOrStore()))); - } - switch (bo.getRenewStatus()){ - //待续费 - case 0: - queryWrapper.and(subDate(STORE_SIGN.EXPIRE_DATE, number(90)).le(now())).and(STORE_SIGN.IS_LOSS.eq(false)); - break; - //已续费 - case 1: - if (bo.getStartDate() != null && bo.getEndDate() != null) { - queryWrapper.and(dateFormat(STORE_RENEW.CREATE_TIME, "%Y-%m-%d").between(bo.getStartDate(), bo.getEndDate())); - } - return SpringUtils.getBean(StoreRenewService.class).getMapper().paginateAs(Page.of(pageDomain.getPage(), pageDomain.getPageSize()), queryWrapper - .select(BRAND.BRAND_NAME) - .select(STORE.CREATE_TIME.as(StoreSignRenewPageVo::getCreateTime), STORE.PERSON_CHARGE_NAME, STORE.PERSON_CHARGE_PHONE, STORE.STORE_NAME) - .select(STORE_SIGN.EXPIRE_DATE, STORE_SIGN.ID) - .select(STORE.LICENSE_ADDR, STORE.LICENSE_FIRM_NAME, STORE.LICENSE_USERNAME) - .select(STORE_RENEW.CREATE_TIME, STORE_RENEW.AMOUNT) - .from(STORE_RENEW) - .leftJoin(STORE).on(STORE.ID.eq(STORE_RENEW.STORE_ID)) - .leftJoin(BRAND).on(BRAND.ID.eq(STORE.BRAND_ID)) - .leftJoin(STORE_SIGN).on(STORE_SIGN.STORE_ID.eq(STORE.ID)), - StoreSignRenewPageVo.class); - //已流失 - default: - queryWrapper.and(STORE_SIGN.IS_LOSS.eq(true)); - } - return this.mapper.paginateAs(Page.of(pageDomain.getPage(), pageDomain.getPageSize()), queryWrapper - .select(BRAND.BRAND_NAME) - .select(STORE.CREATE_TIME.as(StoreSignRenewPageVo::getCreateTime), STORE.PERSON_CHARGE_NAME, STORE.PERSON_CHARGE_PHONE, STORE.STORE_NAME) - .select(STORE.LICENSE_ADDR, STORE.LICENSE_FIRM_NAME, STORE.LICENSE_USERNAME) - .select(STORE_RENEW.CREATE_TIME, STORE_RENEW.AMOUNT) - .leftJoin(STORE).on(STORE.ID.eq(STORE_SIGN.STORE_ID)) - .leftJoin(BRAND).on(BRAND.ID.eq(STORE.BRAND_ID)) - .leftJoin(STORE_RENEW).on(STORE_RENEW.STORE_ID.eq(STORE.ID)), - StoreSignRenewPageVo.class); - } - - /** - * 机构/店铺流失 - * @author DB - * @since 2023/12/14 - * @param bo 请求参数 - */ - @Override - public void runOff(StoreRunOffBo bo) { - this.updateChain().set(STORE_SIGN.RUN_OFF_REASON, bo.getRunOffReason()) - .set(STORE_SIGN.RUN_OFF_DATE, now()) - .set(STORE_SIGN.IS_LOSS, true) - .where(STORE_SIGN.ID.eq(bo.getId())).update(); - } - - /** - * 获取已续费导出数据 - * @author DB - * @since 2023/12/14 - * @param bo 请求 - * @return List - */ - @Override - public List getSignRenewXml(StoreSignRenewXmlBo bo) { - return SpringUtils.getBean(StoreRenewService.class).listAs(QueryWrapper.create() - .select(BRAND.BRAND_NAME) - .select(STORE.CREATE_TIME.as(StoreRenewDto::getCreateTime), STORE.PERSON_CHARGE_NAME, STORE.PERSON_CHARGE_PHONE, STORE.STORE_NAME) - .select(STORE_SIGN.EXPIRE_DATE, STORE_SIGN.ID) - .select(STORE.LICENSE_ADDR, STORE.LICENSE_FIRM_NAME, STORE.LICENSE_USERNAME) - .select(STORE_RENEW.CREATE_TIME, STORE_RENEW.AMOUNT) - .leftJoin(STORE).on(STORE.ID.eq(STORE_RENEW.STORE_ID)) - .leftJoin(BRAND).on(BRAND.ID.eq(STORE.BRAND_ID)) - .leftJoin(STORE_SIGN).on(STORE_SIGN.STORE_ID.eq(STORE.ID)) - .and(dateFormat(STORE_RENEW.CREATE_TIME, "%Y-%m-%d").between(bo.getStartDate(), bo.getEndDate())) - .and(BRAND.BRAND_NAME.like(bo.getBrandOrStore()).or(STORE.STORE_NAME.like(bo.getBrandOrStore()))), - StoreRenewDto.class); - } -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/vo/MenuRouteVo.java b/Cpop-System/src/main/java/com/cpop/system/business/vo/MenuRouteVo.java deleted file mode 100644 index bb63bcc..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/vo/MenuRouteVo.java +++ /dev/null @@ -1,153 +0,0 @@ -package com.cpop.system.business.vo; - -import com.mybatisflex.annotation.Column; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.experimental.Accessors; - -import java.util.List; - -/** - * Description: - * date: 2023/5/11 9:14 - * - * @author DB - */ -@Data -@Accessors(chain = true) -@Schema(description = "Menu对象") -public class MenuRouteVo { - - /** - * 菜单ID - */ - @Schema(description = "菜单ID") - private String id; - - /** - * 父级菜单ID - */ - @Schema(description = "父级菜单ID") - private String parentMenu; - - /** - * 菜单名 - */ - @Schema(description = "菜单名") - private String name; - - /** - * 菜单图标 - */ - @Schema(description = "菜单图标") - private String icon; - - /** - * 菜单路由,父菜单为空 - */ - @Schema(description = "菜单路由,父菜单为空") - private String component; - - /** - * 标记菜单的状态 0:禁用 1:正常(根据权限正常显示) - */ - @Schema(description = "标记菜单的状态 0:禁用 1:正常(根据权限正常显示)") - private Boolean status; - - /** - * 用户类型,1管理员,2审计管理员,3安全管理员,4普通用户 - */ - @Schema(description = "用户类型,1管理员,2审计管理员,3安全管理员,4普通用户") - private String type; - - /** - * 权限 - */ - @Schema(description = "权限") - private String permission; - - /** - * 重定向路径,一级菜单有值 - */ - @Schema(description = "重定向路径,一级菜单有值") - private String redirect; - - /** - * 排序,值越小越靠前,一级菜单有值 - */ - @Schema(description = "排序,值越小越靠前,一级菜单有值") - private Integer orderNo; - - /** - * 子菜单集 - */ - @Column(ignore = true) - @Schema(description = "子菜单集") - private List children; - - /** - * 路由地址 - */ - @Schema(description = "路由地址") - private String path; - - /** - * 标题 - */ - @Schema(description = "标题") - private String title; - - /** - * 隐藏菜单 - */ - @Schema(description = "隐藏菜单") - private Boolean hideMenu; - - /** - * 是否忽略KeepAlive缓存 - */ - @Schema(description = "是否忽略KeepAlive缓存") - private Boolean ignoreKeepAlive; - //private Boolean keepalive; - - /** - * 内部定义类 - */ - @Column(ignore = true) - @Schema(description = "内部定义类") - private Meta meta; - - /** - * 内部类 - */ - @Data - public class Meta { - - /** - * 标题 - */ - private String title; - /** - * 图标 - */ - private String icon; - /** - * 排序 - */ - private Integer orderNo; - /** - * 隐藏菜单 - */ - private Boolean hideMenu; - - /** - * 隐藏子类菜单 - */ - private Boolean hideChildrenInMenu; - - /** - * 是否忽略KeepAlive缓存 - */ - private Boolean ignoreKeepAlive; - } -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/vo/MenuVo.java b/Cpop-System/src/main/java/com/cpop/system/business/vo/MenuVo.java deleted file mode 100644 index 7eba577..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/vo/MenuVo.java +++ /dev/null @@ -1,119 +0,0 @@ -package com.cpop.system.business.vo; - -import com.fasterxml.jackson.annotation.JsonFormat; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.experimental.Accessors; - -import java.time.LocalDateTime; -import java.util.List; - -/** - * 系统菜单表Vo输出 - * - * @author DB.lost - * @since 2023-05-10 - */ -@Data -@Accessors(chain = true) -@Schema(description = "菜单返回对象") -public class MenuVo { - - /** - * 菜单ID - */ - @Schema(description = "菜单ID") - private String id; - - /** - * 父级菜单ID - */ - @Schema(description = "父级菜单ID") - private String parentMenu; - - /** - * 菜单名称 - */ - @Schema(description = "菜单名称") - private String name; - - /** - * 菜单图标 - */ - @Schema(description = "菜单图标") - private String icon; - - /** - * 菜单路由,父菜单为空 - */ - @Schema(description = "菜单路由,父菜单为空") - private String component; - - /** - * 标记菜单的状态 0:禁用 1:启用(根据权限正常显示) - */ - @Schema(description = "标记菜单的状态 0:禁用 1:启用(根据权限正常显示)") - private Boolean status; - - /** - * 权限 - */ - @Schema(description = "权限") - private String permission; - - /** - * 重定向路径,一级菜单有值 - */ - @Schema(description = "重定向路径,一级菜单有值") - private String redirect; - - /** - * 排序,值越小越靠前,一级菜单有值 - */ - @Schema(description = "排序,值越小越靠前,一级菜单有值") - private Integer orderNo; - - /** - * 路由地址 - */ - @Schema(description = "路由地址") - private String path; - - /** - * 标题 - */ - @Schema(description = "标题") - private String title; - - /** - * 子菜单集 - */ - @Schema(description = "子菜单集") - private List children; - - /** - * 更新时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8") - @Schema(description = "更新时间") - private LocalDateTime updateTime; - - /** - * 菜单类型,0:目录,1:菜单,2:按钮 - */ - @Schema(description = "菜单类型,0:目录,1:菜单,2:按钮") - private Integer type; - - /** - * 隐藏菜单 - */ - @Schema(description = "隐藏菜单") - private Boolean hideMenu; - - /** - * 是否忽略KeepAlive缓存 - */ - @Schema(description = "是否忽略KeepAlive缓存") - private Boolean ignoreKeepAlive; - -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/vo/RolePageVo.java b/Cpop-System/src/main/java/com/cpop/system/business/vo/RolePageVo.java deleted file mode 100644 index 8ebd497..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/vo/RolePageVo.java +++ /dev/null @@ -1,72 +0,0 @@ -package com.cpop.system.business.vo; - -import com.fasterxml.jackson.annotation.JsonFormat; -import com.mybatisflex.annotation.Column; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.experimental.Accessors; - -import java.time.LocalDateTime; -import java.util.List; - -/** - * Description: - * date: 2023/5/9 14:21 - * - * @Author DB - */ -@Data -@Accessors(chain = true) -@Schema(description = "角色分页返回对象") -public class RolePageVo { - - /** - * 主键 - */ - @Schema(description = "主键") - private String id; - - /** - * 角色名称 - */ - @Schema(description = "角色名称") - private String roleName; - - /** - * 角色值 - */ - @Schema(description = "角色值") - private String roleValue; - - /** - * 状态 - */ - @Schema(description = "状态") - private Boolean status; - - /** - * 备注 - */ - @Schema(description = "备注") - private String remark; - - /** - * 排序 - */ - @Schema(description = "排序") - private Integer orderNo; - - /** - * 更新时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8") - @Schema(description = "更新时间") - private LocalDateTime updateTime; - - /** - * 角色所属菜单id集合 - */ - @Schema(description = "角色所属菜单id集合") - @Column(ignore = true) - private List menuIds; -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/vo/RoleVo.java b/Cpop-System/src/main/java/com/cpop/system/business/vo/RoleVo.java deleted file mode 100644 index 4a0aeb7..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/vo/RoleVo.java +++ /dev/null @@ -1,56 +0,0 @@ -package com.cpop.system.business.vo; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.experimental.Accessors; - -import java.io.Serializable; - -/** - * 系统角色表Vo输出 - * - * @author DB.lost - * @since 2023-05-10 - */ -@Data -@Accessors(chain = true) -@Schema(description = "角色信息") -public class RoleVo { - - /** - * 主键 - */ - @Schema(description = "主键") - private String id; - - /** - * 角色名称 - */ - @Schema(description = "角色名称") - private String roleName; - - /** - * 角色值 - */ - @Schema(description = "角色值") - private String roleValue; - - /** - * 状态 0:禁用 1:正常 - */ - @Schema(description = "状态 0:禁用 1:正常") - private Boolean status; - - /** - * 备注 - */ - @Schema(description = "备注") - private String remark; - - /** - * 排序 - */ - @Schema(description = "排序") - private Integer orderNo; - -} diff --git a/Cpop-System/src/main/resources/mapper/BrandMapper.xml b/Cpop-System/src/main/resources/mapper/BrandMapper.xml deleted file mode 100644 index 35756af..0000000 --- a/Cpop-System/src/main/resources/mapper/BrandMapper.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Cpop-System/src/main/resources/mapper/ProfitSharingMapper.xml b/Cpop-System/src/main/resources/mapper/ProfitSharingMapper.xml deleted file mode 100644 index b9e4f61..0000000 --- a/Cpop-System/src/main/resources/mapper/ProfitSharingMapper.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Cpop-System/src/main/resources/mapper/StoreRenewMapper.xml b/Cpop-System/src/main/resources/mapper/StoreRenewMapper.xml deleted file mode 100644 index c8b51cb..0000000 --- a/Cpop-System/src/main/resources/mapper/StoreRenewMapper.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Cpop-System/src/main/resources/mapper/StoreSignMapper.xml b/Cpop-System/src/main/resources/mapper/StoreSignMapper.xml deleted file mode 100644 index a3b84c0..0000000 --- a/Cpop-System/src/main/resources/mapper/StoreSignMapper.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/pom.xml b/pom.xml index 0aa3bf1..0e42cda 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,6 @@ Cpop-Api Cpop-Oam Cpop-Oam/Cpop-Oam-Web - Cpop-System Cpop-Pay Cpop-ClockIn-Demo @@ -29,17 +28,17 @@ 17 1.1.2 - 1.8.9 + 1.9.0 2.0.46 - 3.3.2 + 3.3.4 1.38.0 4.5.0 3.1.970 5.6.155 4.6.0 - 2.0.9.2 + 2.0.9.3 1.0.0-beta.3 - 5.8.27 + 5.8.28 33.2.0-jre