diff --git a/README.md b/README.md
index 3d81776410c5a4933c2dff3566c1e58dfbd04569..e6c47b0b61e15a44f201dd173d978c7ca9e98a92 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,10 @@
-# Bootx-Platform (v1.2.1)
+# Bootx-Platform (v1.2.2)
-
+
-
+
@@ -15,29 +15,35 @@
基于Spring Boot框架打造,针对单体式应用进行专门设计,提供整套服务模块,努力为打造全方位企业级开发解决方案,
致力将开源版打造成超越商业版后台管理框架的项目。
-- Spring Cloud版本使用Spring Cloud Alibaba技术栈
+- 单体版本使用Spring Boot相关技术栈
+- 分布式版本使用Spring Cloud Alibaba技术栈
- vue2使用 [ANTD PRO VUE](https://pro.antdv.com/) 作为脚手架
- vue3使用 [Vben-Admin](https://vvbin.cn/doc-next/) 作为脚手架
-- 移动端使用 [Taro](https://taro.jd.com/) vue3+TS为技术栈。
+- 可视化大屏使用 [Go-VIew](https://gitee.com/dromara/go-view) 作为基础框架
+- 移动端使用 [Taro](https://taro.jd.com/)、[NutUI](https://nutui.jd.com/) vue3+TS为技术栈。
## 🍒文档
-- 系统演示地址:[管理平台(vue2)](http://web.platform.bootx.cn/)、[管理平台(vue3)](http://v3.platform.bootx.cn/)
-- 前端项目地址:[前端项目(vue2)](https://gitee.com/bootx/bootx-platform-ui)、[前端项目(vue3)](https://gitee.com/bootx/bootx-platform-vue3)
+- 系统演示地址:[管理平台(vue2)](http://web.platform.bootx.cn/)、[管理平台(vue3)](http://v3.platform.bootx.cn/)、[可视化大屏](http://visualization.platform.bootx.cn/)
+- 前端项目地址:[前端项目(vue2)](https://gitee.com/bootx/bootx-platform-ui)、[前端项目(vue3)](https://gitee.com/bootx/bootx-platform-vue3)、[可视化大屏](https://gitee.com/bootx/bootx-platform-visualization)
- 移动端项目地址:[移动端项目(taro+vue3+ts)](https://gitee.com/xucun/bootx-platform-mobile)
- 日志收集:[ELK](http://elk.dev.bootx.cn:5601/app/discove)、[PlumeLog](http://platform.dev.bootx.cn:8080/plumelog/#/)
- 项目文档:[项目文档(GITEE)](https://bootx.gitee.io/)、[项目文档(备用)](https://doc.bootx.cn/)
- 更新日志:[更新日志](./_doc/ChangeLog.md)
## 🛠️功能亮点
+
+低代码可视化平台,基于`GoView`开发,可以通过托拉拽来生成常用的大屏,可以用上快速开打各种数据看板的场景。
+
+
+集成最新版本的Flowable 6.7.2 工作流,并基于Bpmn.js定制流程设计器,相较于自带modeler更贴近业务和易用,通过关联动态表单可通过托拉拽实现业务审批流的业务
+
+
支持支付宝、微信、聚合支付、现金支付、储值卡支付、钱包,对各种支付方式抽象成策略类,通过模板模式进行串通,方便扩展新的支付方式或业务
结算台演示地址:[http://web.platform.bootx.cn/cashier](http://web.platform.bootx.cn/cashier)

-集成最新版本的Flowable 6.7.2 工作流,并基于Bpmn.js定制流程设计器,相较于自带modeler更贴近业务和易用,通过关联动态表单可通过托拉拽实现业务审批流的业务
-
-
## 🍎特色功能
- 支持单通道支付、聚合支付、组合支付、部分和全部退款等支付功能
- 支持支付宝、微信、云闪付、现金、钱包、储值卡等多种支付方式
@@ -52,39 +58,32 @@
- 支持站内信、微信、钉钉、企业微信、微信公众号的消息推送
- 支持微信自定义菜单、素材、消息模板等资源的管理
- 集成Flowable+Bpmn.js工作流全家桶,方便OA相关功能的开发
+- 基于GoView打造低代码可视化大屏平台,快速生成各种数据展板和大屏
## 🚅 路线图
-- 工作流功能完善
- - [x] 更灵活的节点用户配置,可配置发起人、指定用户、指定角色等,关联消息通知
- - [x] 会签处理、串签处理、或签处理、驳回处理、任意节点退回、会签比例通过处理
-- Vue3版本前端
- - [x] 登录模块移植
- - [x] 基础功能移植已完成
- - [x] 组件移植和Mixin转换为Hooks、
- - [x] 支付功能移植基本完成
- - [ ] 工作流功能移植除流程设计器外已完成
-- Spring Cloud版本
- - [ ] 代码组织结构调整
- - [x] 网关定制开发
- - [ ] 功能模块移植
+- 功能
+ - [x] 基于`GoView`的低代码可视化大屏平台 (90%)
+ - [ ] Vue3工作流功能移植除流程设计器
+ - [ ] 短信通知
## 🥂 Quick Start
-- 下载项目并切换到master分支,或者下载发行版后导入IDEA中,下载对应的Maven依赖
-- 配置好各种必要的数据库中间件地址(见下方中间表),直接启动项目。注:不需要导入Sql脚本到数据库中,默认启用`flyway`会自动对数据库进行初始化
-- 如果使用`_config/sql`导入到数据库中的方式,则需要在项目启动前将`spring.flyway.enabled`设为`false`后启动项目,推荐使用`flyway`对数据库进行数据管理
-- 后端启动启动成功,开始启动前端
-- 安装依赖 `yarn install`,node版本需要12以上,推荐使用16
-- 启动前端 `yarn serve`,进行访问
+[后端](https://bootx.gitee.io/doc/overview/config/项目启动.html#后端启动)
+
+Vue2前端: [Vue2前端启动流程](https://bootx.gitee.io/doc/overview/config/%E9%A1%B9%E7%9B%AE%E5%90%AF%E5%8A%A8.html#环境准备)
+
+Vue3后端: [Vue3前端启动流程](https://bootx.gitee.io/doc/overview/config/%E9%A1%B9%E7%9B%AE%E5%90%AF%E5%8A%A8.html#环境准备-1)
+
+可视化大屏: [可视化大屏启动流程](http://)
**中间件配置**
-| 组件 | 是否必须配置 | 备注 |
-| -------- | ------------ |---------------------------------------------|
-| MySQL | 是 | 不设置无法启动 |
-| Redis | 是 | 不设置启动后无法正常使用 |
-| RabbitMQ | 否 | 支付消息通知在使用 |
-| MongoDB | 否 | 默认审计日志和文件管理使用持久化方式为Mono,可在配置文件中配置切换成其他持久化方式 |
-| plumelog | 是 | 默认项目自带lite版plumelog,不需要额外配置中间件,直接就可以使用 |
+| 组件 | 是否必须配置 | 备注 |
+|----------|--------|---------------------------------------------|
+| MySQL | 是 | 不设置无法启动 |
+| Redis | 是 | 不设置启动后无法正常使用 |
+| RabbitMQ | 否 | 支付消息通知在使用 |
+| MongoDB | 否 | 默认审计日志和文件管理使用持久化方式为Mono,可在配置文件中配置切换成其他持久化方式 |
+| plumelog | 是 | 默认项目自带lite版plumelog,不需要额外配置中间件,直接就可以使用 |
## 🥞项目整体结构
```lua
@@ -125,17 +124,13 @@ bootx-platform
├── common-websocket -- websocket封装
├── common-xxl-job -- XXL-JOB定时任务
├── bootx-demo -- demo示例模块
- ├── bootx-modules -- 业务系统(停用)
- ├── eshop -- 网上商城(停用)
├── bootx-services -- 业务服务模块
├── service-baseapi -- 基础api功能服务
- ├── service-goods -- 商品中心服务(停用)
├── service-iam -- 身份识别与访问管理
├── service-notice -- 消息通知服务
├── service-office -- 办公服务
- ├── service-order -- 订单服务(停用)
+ ├── service-visualization 可视化大屏管理
├── service-payment -- 支付服务
- ├── service-sales -- 销售中心(停用)
├── bootx-start -- 启动模块
```
## 🍇模块结构说明
@@ -159,7 +154,7 @@ service-iam
**core核心包业务代码分包**
```lua
-├───code
+├───core
├── business -- 业务模块
├── convert -- 实体类转换
├── dao -- 持久化类
diff --git a/_config/sql/1.2.2/1.2.1_up_1.2.2.sql b/_config/sql/1.2.2/1.2.1_up_1.2.2.sql
new file mode 100644
index 0000000000000000000000000000000000000000..a264264f5bffa5ee62dd915c11eca1a4508fd6cd
--- /dev/null
+++ b/_config/sql/1.2.2/1.2.1_up_1.2.2.sql
@@ -0,0 +1,106 @@
+SET FOREIGN_KEY_CHECKS=0;
+
+CREATE TABLE `report_project_info` (
+ `id` bigint(20) NOT NULL COMMENT '主键',
+ `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目名称',
+ `state` int(11) NULL DEFAULT NULL COMMENT '发布状态',
+ `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '报表内容',
+ `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
+ `creator` bigint(20) NULL DEFAULT NULL COMMENT '创建者ID',
+ `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+ `last_modifier` bigint(20) NULL DEFAULT NULL COMMENT '最后修者ID',
+ `last_modified_time` datetime(0) NULL DEFAULT NULL COMMENT '最后修改时间',
+ `version` int(11) NOT NULL COMMENT '乐观锁',
+ `deleted` bit(1) NOT NULL COMMENT '删除标志',
+ `index_image` bigint(20) NULL DEFAULT NULL COMMENT '预览图片id',
+ `edit` bit(1) NULL DEFAULT NULL COMMENT '是否在编辑中',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '自定义大屏信息' ROW_FORMAT = Dynamic;
+
+CREATE TABLE `report_project_info_publish` (
+ `id` bigint(20) NOT NULL COMMENT '主键',
+ `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '报表内容',
+ `creator` bigint(20) NULL DEFAULT NULL COMMENT '创建者ID',
+ `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+ `last_modifier` bigint(20) NULL DEFAULT NULL COMMENT '最后修者ID',
+ `last_modified_time` datetime(0) NULL DEFAULT NULL COMMENT '最后修改时间',
+ `version` int(11) NOT NULL COMMENT '乐观锁',
+ `deleted` bit(1) NOT NULL COMMENT '删除标志',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '自定义大屏发布信息' ROW_FORMAT = Dynamic;
+
+DROP TABLE `goods_brand`;
+
+DROP TABLE `goods_category`;
+
+DROP TABLE `goods_category_brand`;
+
+DROP TABLE `goods_category_parameter`;
+
+DROP TABLE `goods_category_parameter_group`;
+
+DROP TABLE `goods_category_specification`;
+
+DROP TABLE `goods_goods`;
+
+DROP TABLE `goods_goods_packing`;
+
+DROP TABLE `goods_goods_sku`;
+
+DROP TABLE `goods_goods_sku_attr`;
+
+DROP TABLE `goods_goods_sku_packing`;
+
+DROP TABLE `goods_specification`;
+
+DROP TABLE `order_order`;
+
+DROP TABLE `order_order_billing`;
+
+DROP TABLE `order_order_detail`;
+
+DROP TABLE `order_order_item_billing`;
+
+DROP TABLE `order_order_strategy_mapping`;
+
+DROP TABLE `sales_activity`;
+
+DROP TABLE `sales_check_rule`;
+
+DROP TABLE `sales_coupon`;
+
+DROP TABLE `sales_coupon_template`;
+
+DROP TABLE `sales_match_rule`;
+
+DROP TABLE `sales_strategy`;
+
+DROP TABLE `sales_strategy_check_rule`;
+
+DROP TABLE `sales_strategy_config`;
+
+DROP TABLE `sales_strategy_config_value`;
+
+DROP TABLE `sales_strategy_register`;
+
+SET FOREIGN_KEY_CHECKS = 0;
+
+INSERT INTO `iam_client`(`id`, `code`, `name`, `system`, `enable`, `login_type_ids`, `description`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `version`, `deleted`) VALUES (1626840094767714304, 'GoView', '可视化平台', b'0', b'1', '1430430071299207168', '', 1414143554414059520, '2023-02-18 15:04:38', 1414143554414059520, '2023-02-18 15:04:38', 0, 0);
+
+INSERT INTO `iam_login_type`(`id`, `code`, `name`, `type`, `system`, `timeout`, `captcha`, `pwd_err_num`, `enable`, `description`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `version`, `deleted`) VALUES (1626845524617203712, 'passwordGoView', '可视化平台登录', 'password', b'0', 3600, b'0', -1, b'1', '', 1414143554414059520, '2023-02-18 15:26:13', 1414143554414059520, '2023-02-18 15:26:13', 0, 0);
+
+UPDATE `iam_login_type` SET `code` = 'password', `name` = '账号密码登陆', `type` = 'password', `system` = b'1', `timeout` = 3600, `captcha` = b'0', `pwd_err_num` = -1, `enable` = b'1', `description` = NULL, `creator` = 1399985191002447872, `create_time` = '2021-08-25 15:21:20', `last_modifier` = 1399985191002447872, `last_modified_time` = '2022-11-03 22:24:53', `version` = 20, `deleted` = 0 WHERE `id` = 1430430071299207168;
+
+INSERT INTO `iam_perm_menu`(`id`, `client_code`, `parent_id`, `title`, `name`, `perm_code`, `effect`, `icon`, `hidden`, `hide_children_in_menu`, `component`, `component_name`, `path`, `redirect`, `sort_no`, `menu_type`, `leaf`, `keep_alive`, `target_outside`, `hidden_header_content`, `admin`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `version`, `deleted`) VALUES (1631946120891707392, 'admin', 1552207982510706688, '可视化大屏', 'ProjectInfoList', NULL, b'0', '', b'0', b'0', 'develop/report/ProjectInfoList', NULL, '/develop/report', '', 0, 1, NULL, b'1', b'0', b'0', b'0', NULL, 1399985191002447872, '2023-03-04 17:14:10', 1399985191002447872, '2023-03-04 17:14:10', 0, 0);
+
+INSERT INTO `iam_perm_menu`(`id`, `client_code`, `parent_id`, `title`, `name`, `perm_code`, `effect`, `icon`, `hidden`, `hide_children_in_menu`, `component`, `component_name`, `path`, `redirect`, `sort_no`, `menu_type`, `leaf`, `keep_alive`, `target_outside`, `hidden_header_content`, `admin`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `version`, `deleted`) VALUES (1629039360928075776, 'adminv3', 1582276341792985088, '可视化大屏', 'ProjectInfoList', NULL, b'0', '', b'0', b'0', '/modules/develop/report/ProjectInfoList', NULL, '/develop/report', '', 0, 1, NULL, b'1', b'0', b'0', b'0', NULL, 1414143554414059520, '2023-02-24 16:43:44', 1414143554414059520, '2023-02-24 16:44:17', 1, 0);
+
+UPDATE `iam_perm_menu` SET `client_code` = 'adminv3', `parent_id` = 1599378992811429888, `title` = '邮件通知', `name` = 'EmailSenderDemo', `perm_code` = NULL, `effect` = b'0', `icon` = '', `hidden` = b'0', `hide_children_in_menu` = b'0', `component` = '/modules/demo/notice/email/EmailSenderDemo.vue', `component_name` = NULL, `path` = '/demo/notice/email', `redirect` = '', `sort_no` = 0, `menu_type` = 1, `leaf` = NULL, `keep_alive` = b'1', `target_outside` = b'0', `hidden_header_content` = b'0', `admin` = b'0', `remark` = NULL, `creator` = 1414143554414059520, `create_time` = '2023-02-08 22:20:04', `last_modifier` = 1414143554414059520, `last_modified_time` = '2023-02-20 10:38:55', `version` = 1, `deleted` = 0 WHERE `id` = 1623325795944439808;
+
+UPDATE `iam_user_info` SET `name` = '小小明', `username` = 'xxm', `password` = 'f52020dca765fd3943ed40a615dc2c5c', `phone` = '133****3333', `email` = 'x******@outlook.com', `client_ids` = '1430430071299207168,1430430071299207169,1626840094767714304,1580487061605175296', `avatar` = NULL, `source` = NULL, `admin` = b'1', `register_time` = '2021-06-02 15:04:12', `status` = 1, `creator` = 1, `create_time` = '2021-06-02 15:04:15', `last_modifier` = 1414143554414059520, `last_modified_time` = '2023-02-18 15:08:42', `version` = 55, `deleted` = 0 WHERE `id` = 1399985191002447872;
+
+UPDATE `iam_user_info` SET `name` = '小小明1995', `username` = 'xxm1995', `password` = 'f52020dca765fd3943ed40a615dc2c5c', `phone` = '130****0000', `email` = 'x******@foxmail.com', `client_ids` = '1430430071299207168,1580487061605175296,1430430071299207169,1626840094767714304', `avatar` = NULL, `source` = NULL, `admin` = b'1', `register_time` = '2021-07-11 16:44:31', `status` = 1, `creator` = 1, `create_time` = '2021-07-11 16:44:32', `last_modifier` = 1414143554414059520, `last_modified_time` = '2023-02-18 15:08:48', `version` = 9, `deleted` = 0 WHERE `id` = 1414143554414059520;
+
+SET FOREIGN_KEY_CHECKS = 1;
+
+SET FOREIGN_KEY_CHECKS=1;
diff --git a/_config/sql/bootx-platform.sql b/_config/sql/bootx-platform.sql
index e66a1ad8c0ceffa6aeb83fc16c1a06b5bf1950b8..3ba3dba131aa3140f0c4e081fc3c30ea305bc101 100644
--- a/_config/sql/bootx-platform.sql
+++ b/_config/sql/bootx-platform.sql
@@ -9,7 +9,7 @@
Target Server Version : 50735
File Encoding : 65001
- Date: 12/02/2023 15:11:59
+ Date: 03/03/2023 16:59:26
*/
SET NAMES utf8mb4;
@@ -4034,316 +4034,6 @@ INSERT INTO `demo_super_query` VALUES (1496372489909899264, '张飞', 54, b'0',
INSERT INTO `demo_super_query` VALUES (1496372766427779072, '梁冀', 38, b'1', '1958-02-08', '08:30:00', '2022-02-23 14:34:03', '1', '', 1399985191002447872, '2022-02-23 14:34:03', 1399985191002447872, '2022-02-23 14:34:03', 0, 0);
INSERT INTO `demo_super_query` VALUES (1496373512871284736, '刘备', 108, b'0', '1993-11-12', '09:30:10', '2022-02-23 14:37:01', '2', '刘羽禅的粑粑', 1399985191002447872, '2022-02-23 14:37:01', 1399985191002447872, '2022-02-23 14:37:01', 0, 0);
--- ----------------------------
--- Table structure for goods_brand
--- ----------------------------
-DROP TABLE IF EXISTS `goods_brand`;
-CREATE TABLE `goods_brand` (
- `id` bigint(20) NOT NULL,
- `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '品牌名称',
- `logo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '品牌图标',
- `enable` bit(1) NULL DEFAULT NULL COMMENT '是否启用',
- `remark` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '描述',
- `creator` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
- `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
- `last_modifier` bigint(20) NULL DEFAULT NULL COMMENT '最后修改人',
- `last_modified_time` datetime(0) NULL DEFAULT NULL COMMENT '最后修改时间',
- `version` int(11) NOT NULL COMMENT '版本',
- `deleted` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0:未删除。1:已删除',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '品牌' ROW_FORMAT = DYNAMIC;
-
--- ----------------------------
--- Records of goods_brand
--- ----------------------------
-INSERT INTO `goods_brand` VALUES (1524046765181800448, '鸭鸭', '', NULL, '', 1399985191002447872, '2022-05-10 23:20:39', 1399985191002447872, '2022-05-10 23:20:39', 0, 0);
-INSERT INTO `goods_brand` VALUES (1525092807788691456, '微信', '', b'1', '', 1399985191002447872, '2022-05-13 20:37:15', 1399985191002447872, '2022-05-13 20:37:15', 0, 0);
-INSERT INTO `goods_brand` VALUES (1525092835118776320, '舜泰', '', b'1', '', 1399985191002447872, '2022-05-13 20:37:21', 1399985191002447872, '2022-05-13 20:37:21', 0, 0);
-INSERT INTO `goods_brand` VALUES (1525092854139944960, '绿城', '', b'1', '', 1399985191002447872, '2022-05-13 20:37:26', 1399985191002447872, '2022-05-13 20:37:26', 0, 0);
-
--- ----------------------------
--- Table structure for goods_category
--- ----------------------------
-DROP TABLE IF EXISTS `goods_category`;
-CREATE TABLE `goods_category` (
- `id` bigint(20) NOT NULL,
- `pid` bigint(20) NULL DEFAULT NULL COMMENT '上级类目id',
- `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '类目名称',
- `image` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '图标/图片地址',
- `enable` bit(1) NOT NULL COMMENT '是否启用',
- `sort_no` double(8, 2) NULL DEFAULT NULL COMMENT '排序',
- `level` int(5) NULL DEFAULT NULL COMMENT '层级',
- `remark` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '描述',
- `creator` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
- `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
- `last_modifier` bigint(20) NULL DEFAULT NULL COMMENT '最后修改人',
- `last_modified_time` datetime(0) NULL DEFAULT NULL COMMENT '最后修改时间',
- `version` int(11) NOT NULL COMMENT '版本',
- `deleted` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0:未删除。1:已删除',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '类目' ROW_FORMAT = DYNAMIC;
-
--- ----------------------------
--- Records of goods_category
--- ----------------------------
-
--- ----------------------------
--- Table structure for goods_category_brand
--- ----------------------------
-DROP TABLE IF EXISTS `goods_category_brand`;
-CREATE TABLE `goods_category_brand` (
- `id` bigint(20) NOT NULL,
- `category_id` bigint(20) NOT NULL COMMENT '分类id',
- `brand_id` bigint(20) NOT NULL COMMENT '品牌id',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '类目品牌关联' ROW_FORMAT = DYNAMIC;
-
--- ----------------------------
--- Records of goods_category_brand
--- ----------------------------
-
--- ----------------------------
--- Table structure for goods_category_parameter
--- ----------------------------
-DROP TABLE IF EXISTS `goods_category_parameter`;
-CREATE TABLE `goods_category_parameter` (
- `id` bigint(20) NOT NULL,
- `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '品牌名称',
- `type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '类型',
- `options` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '选择值(列表)',
- `required` bit(1) NULL DEFAULT NULL COMMENT '是否必填',
- `sort_no` double(8, 2) NULL DEFAULT NULL COMMENT '排序',
- `group_id` bigint(20) NULL DEFAULT NULL COMMENT '参数组id',
- `category_id` bigint(20) NULL DEFAULT NULL COMMENT '类目id',
- `remark` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '描述',
- `creator` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
- `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
- `last_modifier` bigint(20) NULL DEFAULT NULL COMMENT '最后修改人',
- `last_modified_time` datetime(0) NULL DEFAULT NULL COMMENT '最后修改时间',
- `version` int(11) NOT NULL COMMENT '版本',
- `deleted` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0:未删除。1:已删除',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '类目参数' ROW_FORMAT = DYNAMIC;
-
--- ----------------------------
--- Records of goods_category_parameter
--- ----------------------------
-
--- ----------------------------
--- Table structure for goods_category_parameter_group
--- ----------------------------
-DROP TABLE IF EXISTS `goods_category_parameter_group`;
-CREATE TABLE `goods_category_parameter_group` (
- `id` bigint(20) NOT NULL,
- `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '名称',
- `sort_no` double(8, 2) NULL DEFAULT NULL COMMENT '排序',
- `category_id` bigint(20) NULL DEFAULT NULL COMMENT '类目id',
- `remark` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '描述',
- `creator` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
- `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
- `last_modifier` bigint(20) NULL DEFAULT NULL COMMENT '最后修改人',
- `last_modified_time` datetime(0) NULL DEFAULT NULL COMMENT '最后修改时间',
- `version` int(11) NOT NULL COMMENT '版本',
- `deleted` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0:未删除。1:已删除',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '类目参数组' ROW_FORMAT = DYNAMIC;
-
--- ----------------------------
--- Records of goods_category_parameter_group
--- ----------------------------
-
--- ----------------------------
--- Table structure for goods_category_specification
--- ----------------------------
-DROP TABLE IF EXISTS `goods_category_specification`;
-CREATE TABLE `goods_category_specification` (
- `id` bigint(20) NOT NULL,
- `category_id` bigint(20) NOT NULL COMMENT '分类id',
- `specification_id` bigint(20) NOT NULL COMMENT '规格id',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '类目规格关联' ROW_FORMAT = DYNAMIC;
-
--- ----------------------------
--- Records of goods_category_specification
--- ----------------------------
-INSERT INTO `goods_category_specification` VALUES (1525131071690076160, 1523994966466924544, 1524258633343254528);
-INSERT INTO `goods_category_specification` VALUES (1525131071694270464, 1523994966466924544, 1524360756764590080);
-
--- ----------------------------
--- Table structure for goods_goods
--- ----------------------------
-DROP TABLE IF EXISTS `goods_goods`;
-CREATE TABLE `goods_goods` (
- `id` bigint(20) NOT NULL,
- `cid` bigint(20) NULL DEFAULT NULL COMMENT '类目id',
- `cname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '类目名称',
- `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '商品名',
- `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '编码',
- `packing` bit(1) NOT NULL COMMENT '是否是打包品',
- `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '描述',
- `addition` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '附加参数',
- `state` int(11) NOT NULL COMMENT '状态',
- `banner_uri` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
- `display_price` decimal(19, 2) NULL DEFAULT NULL,
- `goods_type` int(11) NULL DEFAULT NULL,
- `main_uri` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
- `sale_off_time` datetime(6) NULL DEFAULT NULL,
- `sale_on_time` datetime(6) NULL DEFAULT NULL,
- `sale_state` int(11) NULL DEFAULT NULL,
- `shop_id` bigint(20) NULL DEFAULT NULL,
- `attr_def_ids` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
- `attr_value_displays` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
- `attr_values` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
- `display_lower_price` decimal(19, 2) NULL DEFAULT NULL,
- `display_upper_price` decimal(19, 2) NULL DEFAULT NULL,
- `creator` bigint(20) NULL DEFAULT NULL,
- `create_time` datetime(6) NULL DEFAULT NULL,
- `last_modifier` bigint(20) NULL DEFAULT NULL,
- `last_modified_time` datetime(6) NULL DEFAULT NULL,
- `version` int(11) NULL DEFAULT NULL,
- `deleted` bit(1) NOT NULL,
- `out_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商品spu' ROW_FORMAT = DYNAMIC;
-
--- ----------------------------
--- Records of goods_goods
--- ----------------------------
-
--- ----------------------------
--- Table structure for goods_goods_packing
--- ----------------------------
-DROP TABLE IF EXISTS `goods_goods_packing`;
-CREATE TABLE `goods_goods_packing` (
- `id` bigint(20) NOT NULL,
- `goods_id` bigint(20) NULL DEFAULT NULL COMMENT '打包品',
- `packed_goods_id` bigint(20) NULL DEFAULT NULL COMMENT '被打包品',
- `create_time` datetime(6) NULL DEFAULT NULL,
- `creator` bigint(20) NULL DEFAULT NULL,
- `last_modified_time` datetime(6) NULL DEFAULT NULL,
- `last_modifier` bigint(20) NULL DEFAULT NULL,
- `version` int(11) NULL DEFAULT NULL,
- `deleted` bit(1) NOT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商品打包关系' ROW_FORMAT = DYNAMIC;
-
--- ----------------------------
--- Records of goods_goods_packing
--- ----------------------------
-
--- ----------------------------
--- Table structure for goods_goods_sku
--- ----------------------------
-DROP TABLE IF EXISTS `goods_goods_sku`;
-CREATE TABLE `goods_goods_sku` (
- `id` bigint(20) NOT NULL,
- `cid` bigint(20) NULL DEFAULT NULL COMMENT '所属类目id',
- `goods_id` bigint(20) NULL DEFAULT NULL COMMENT '所属商品 id',
- `shop_id` bigint(20) NULL DEFAULT NULL COMMENT '所属商户',
- `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '外部编码',
- `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'SKU 名称',
- `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '描述',
- `packing` bit(1) NOT NULL COMMENT '是否打包品',
- `addition` varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '附加信息',
- `business_id` bigint(20) NULL DEFAULT NULL COMMENT '业务id',
- `attr_def_ids` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '生成此商品 SKU 的属性定义的 id 拼接串',
- `attr_values` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '属性值id拼接串',
- `attr_value_displays` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '示值拼接串',
- `is_unlimited` bit(1) NOT NULL COMMENT '是否无限库存',
- `capacity` int(11) NOT NULL COMMENT '初始库存',
- `locked` int(11) NOT NULL COMMENT '预占库存',
- `sold` int(11) NOT NULL COMMENT '已用库存',
- `available` int(11) NOT NULL COMMENT '可用库存',
- `sale_state` int(11) NULL DEFAULT NULL COMMENT '销售状态',
- `sale_off_time` datetime(6) NULL DEFAULT NULL COMMENT '上架时间',
- `sale_on_time` datetime(6) NULL DEFAULT NULL COMMENT '下架时间',
- `price` decimal(19, 2) NULL DEFAULT NULL COMMENT '价格',
- `state` int(11) NOT NULL COMMENT '状态',
- `creator` bigint(20) NULL DEFAULT NULL,
- `create_time` datetime(6) NULL DEFAULT NULL,
- `last_modifier` bigint(20) NULL DEFAULT NULL,
- `last_modified_time` datetime(6) NULL DEFAULT NULL,
- `version` int(11) NULL DEFAULT NULL,
- `deleted` bit(1) NOT NULL,
- `tid` bigint(20) NULL DEFAULT NULL,
- `out_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商品sku' ROW_FORMAT = DYNAMIC;
-
--- ----------------------------
--- Records of goods_goods_sku
--- ----------------------------
-
--- ----------------------------
--- Table structure for goods_goods_sku_attr
--- ----------------------------
-DROP TABLE IF EXISTS `goods_goods_sku_attr`;
-CREATE TABLE `goods_goods_sku_attr` (
- `id` bigint(20) NOT NULL,
- `cid` bigint(20) NULL DEFAULT NULL COMMENT '类目 id',
- `goods_id` bigint(20) NULL DEFAULT NULL COMMENT '商品 id',
- `sku_id` bigint(20) NULL DEFAULT NULL COMMENT 'SKU id',
- `attr_def_id` bigint(20) NULL DEFAULT NULL COMMENT '属性定义 id',
- `attr_value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '属性值',
- `attr_value_display` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '显示值',
- `tid` bigint(20) NOT NULL,
- `attr_values_display` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
- `attr_value_displays` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'sku属性' ROW_FORMAT = DYNAMIC;
-
--- ----------------------------
--- Records of goods_goods_sku_attr
--- ----------------------------
-
--- ----------------------------
--- Table structure for goods_goods_sku_packing
--- ----------------------------
-DROP TABLE IF EXISTS `goods_goods_sku_packing`;
-CREATE TABLE `goods_goods_sku_packing` (
- `id` bigint(20) NOT NULL,
- `goods_id` bigint(20) NULL DEFAULT NULL COMMENT '打包品',
- `packed_goods_id` bigint(20) NULL DEFAULT NULL COMMENT '被打包品',
- `goods_sku_id` bigint(20) NULL DEFAULT NULL COMMENT '打包SKU',
- `packed_sku_id` bigint(20) NULL DEFAULT NULL COMMENT '被打包SKU',
- `create_time` datetime(6) NULL DEFAULT NULL,
- `creator` bigint(20) NULL DEFAULT NULL,
- `last_modified_time` datetime(6) NULL DEFAULT NULL,
- `last_modifier` bigint(20) NULL DEFAULT NULL,
- `version` int(11) NULL DEFAULT NULL,
- `deleted` bit(1) NOT NULL,
- `tid` bigint(20) NULL DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'sku打包关系' ROW_FORMAT = DYNAMIC;
-
--- ----------------------------
--- Records of goods_goods_sku_packing
--- ----------------------------
-
--- ----------------------------
--- Table structure for goods_specification
--- ----------------------------
-DROP TABLE IF EXISTS `goods_specification`;
-CREATE TABLE `goods_specification` (
- `id` bigint(20) NOT NULL,
- `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '规格名称',
- `type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '类型',
- `options` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '规格列表值',
- `state` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '状态',
- `remark` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '描述',
- `creator` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
- `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
- `last_modifier` bigint(20) NULL DEFAULT NULL COMMENT '最后修改人',
- `last_modified_time` datetime(0) NULL DEFAULT NULL COMMENT '最后修改时间',
- `version` int(11) NOT NULL COMMENT '版本',
- `deleted` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0:未删除。1:已删除',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '规格' ROW_FORMAT = DYNAMIC;
-
--- ----------------------------
--- Records of goods_specification
--- ----------------------------
-
-- ----------------------------
-- Table structure for iam_client
-- ----------------------------
@@ -4371,6 +4061,7 @@ CREATE TABLE `iam_client` (
INSERT INTO `iam_client` VALUES (1430430071299207168, 'admin', 'pc管理端', b'1', b'1', '1430430071299207168,1435138582839009280,1430478946919653376,1542091599907115008,1542804450312122368,1543126042909016064', 'pc浏览器', 1399985191002447872, '2021-08-25 15:21:20', 1399985191002447872, '2022-07-02 14:55:11', 4, 0);
INSERT INTO `iam_client` VALUES (1430430071299207169, 'h5', 'h5端', b'1', b'1', '1430430071299207168,1435138582839009280', '手机wap', 1399985191002447872, '2021-08-25 15:21:20', 1399985191002447872, '2022-06-29 18:31:45', 1, 0);
INSERT INTO `iam_client` VALUES (1580487061605175296, 'adminv3', 'pc管理端(vue3版)', b'0', b'1', '1430430071299207168,1430478946919653376,1435138582839009280,1542091599907115008,1542804450312122368,1543126042909016064', 'vue3版本', 1399985191002447872, '2022-10-13 17:14:14', 1399985191002447872, '2022-10-13 17:14:25', 1, 0);
+INSERT INTO `iam_client` VALUES (1626840094767714304, 'GoView', '可视化平台', b'0', b'1', '1430430071299207168', '', 1414143554414059520, '2023-02-18 15:04:38', 1414143554414059520, '2023-02-18 15:04:38', 0, 0);
-- ----------------------------
-- Table structure for iam_data_scope
@@ -4509,12 +4200,13 @@ CREATE TABLE `iam_login_type` (
-- ----------------------------
-- Records of iam_login_type
-- ----------------------------
-INSERT INTO `iam_login_type` VALUES (1430430071299207168, 'password', '账号密码登陆', 'password', b'1', 3600, b'1', -1, b'1', NULL, 1399985191002447872, '2021-08-25 15:21:20', 1414143554414059520, '2022-11-02 21:32:48', 19, 0);
+INSERT INTO `iam_login_type` VALUES (1430430071299207168, 'password', '账号密码登陆', 'password', b'1', 3600, b'0', -1, b'1', NULL, 1399985191002447872, '2021-08-25 15:21:20', 1399985191002447872, '2022-11-03 22:24:53', 20, 0);
INSERT INTO `iam_login_type` VALUES (1430478946919653376, 'miniApp', '微信小程序', 'openId', b'0', 99999, b'0', 0, b'1', NULL, 1399985191002447872, '2021-08-25 18:35:33', 1399985191002447872, '2022-07-16 12:32:26', 3, 0);
INSERT INTO `iam_login_type` VALUES (1435138582839009280, 'phone', '手机短信登录', 'openId', b'0', 3600, b'0', 0, b'1', NULL, 1399985191002447872, '2021-09-07 15:11:16', 1399985191002447872, '2022-07-16 12:32:19', 5, 0);
INSERT INTO `iam_login_type` VALUES (1542091599907115008, 'dingTalk', '钉钉', 'openId', b'0', 5, b'0', -1, b'1', '', 1399985191002447872, '2022-06-29 18:24:23', 1399985191002447872, '2022-07-02 14:55:01', 5, 0);
INSERT INTO `iam_login_type` VALUES (1542804450312122368, 'weCom', '企业微信', 'openId', b'0', 5, b'0', -1, b'1', '', 1399985191002447872, '2022-07-01 17:37:00', 1399985191002447872, '2022-07-01 17:37:00', 0, 0);
INSERT INTO `iam_login_type` VALUES (1543126042909016064, 'weChat', '微信登录', 'openId', b'0', 5, b'0', -1, b'1', '', 1399985191002447872, '2022-07-02 14:54:53', 0, '2022-10-12 22:15:05', 2, 0);
+INSERT INTO `iam_login_type` VALUES (1626845524617203712, 'passwordGoView', '可视化平台登录', 'password', b'0', 3600, b'0', -1, b'1', '', 1414143554414059520, '2023-02-18 15:26:13', 1414143554414059520, '2023-02-18 15:26:13', 0, 0);
-- ----------------------------
-- Table structure for iam_perm_menu
@@ -4749,8 +4441,10 @@ INSERT INTO `iam_perm_menu` VALUES (1617847653746315264, 'adminv3', 159710279937
INSERT INTO `iam_perm_menu` VALUES (1617847747375763456, 'adminv3', 1597102799370317824, '数据脱敏', 'DataSensitiveDemoList', NULL, b'0', '', b'0', b'0', '/modules/demo/data/sensitive/DataSensitiveDemoList.vue', NULL, '/demo/data/sensitive', '', 0, 1, NULL, b'1', b'0', b'0', b'0', NULL, 1414143554414059520, '2023-01-24 19:32:16', 1414143554414059520, '2023-01-24 20:06:58', 1, 0);
INSERT INTO `iam_perm_menu` VALUES (1621150743447965696, 'admin', 1495968302034210816, '省市区联动', 'ChinaRegionDemo', NULL, b'0', '', b'0', b'0', 'demo/chinaregion/ChinaRegionDemo', NULL, '/demo/chinaregion', '', 0, 1, NULL, b'1', b'0', b'0', b'0', NULL, 1399985191002447872, '2023-02-02 22:17:11', 1399985191002447872, '2023-02-08 09:43:39', 1, 0);
INSERT INTO `iam_perm_menu` VALUES (1623156857846034432, 'adminv3', 1582276516905177088, '省市区联动', 'ChinaRegionDemo', NULL, b'0', '', b'0', b'0', '/modules/demo/chinaregion/ChinaRegionDemo', NULL, '/demo/chinaregion', '', 0, 1, NULL, b'1', b'0', b'0', b'0', NULL, 1414143554414059520, '2023-02-08 11:08:46', 1414143554414059520, '2023-02-08 11:08:46', 0, 0);
-INSERT INTO `iam_perm_menu` VALUES (1623325795944439808, 'adminv3', 1599378992811429888, '邮件通知', '', NULL, b'0', '', b'0', b'0', '', NULL, '/demo/notice', '', 0, 1, NULL, b'1', b'0', b'0', b'0', NULL, 1414143554414059520, '2023-02-08 22:20:04', 1414143554414059520, '2023-02-08 22:20:04', 0, 0);
+INSERT INTO `iam_perm_menu` VALUES (1623325795944439808, 'adminv3', 1599378992811429888, '邮件通知', 'EmailSenderDemo', NULL, b'0', '', b'0', b'0', '/modules/demo/notice/email/EmailSenderDemo.vue', NULL, '/demo/notice/email', '', 0, 1, NULL, b'1', b'0', b'0', b'0', NULL, 1414143554414059520, '2023-02-08 22:20:04', 1414143554414059520, '2023-02-20 10:38:55', 1, 0);
INSERT INTO `iam_perm_menu` VALUES (1623494586215579648, 'admin', 1552207982510706688, '行政区划', 'ChinaRegion', NULL, b'0', '', b'1', b'0', 'develop/region/ChinaRegionList', NULL, '/develop/region', '', 0, 1, NULL, b'1', b'0', b'0', b'0', NULL, 1399985191002447872, '2023-02-09 09:30:47', 1399985191002447872, '2023-02-09 17:50:05', 1, 0);
+INSERT INTO `iam_perm_menu` VALUES (1629039360928075776, 'adminv3', 1582276341792985088, '可视化大屏', 'ProjectInfoList', NULL, b'0', '', b'0', b'0', '/modules/develop/report/ProjectInfoList', NULL, '/develop/report', '', 0, 1, NULL, b'1', b'0', b'0', b'0', NULL, 1414143554414059520, '2023-02-24 16:43:44', 1414143554414059520, '2023-02-24 16:44:17', 1, 0);
+INSERT INTO `iam_perm_menu` VALUES (1631946120891707392, 'admin', 1552207982510706688, '可视化大屏', 'ProjectInfoList', NULL, b'0', '', b'0', b'0', 'develop/report/ProjectInfoList', NULL, '/develop/report', '', 0, 1, NULL, b'1', b'0', b'0', b'0', NULL, 1399985191002447872, '2023-03-04 17:14:10', 1399985191002447872, '2023-03-04 17:14:10', 0, 0);
-- ----------------------------
-- Table structure for iam_perm_path
@@ -4940,8 +4634,8 @@ CREATE TABLE `iam_user_info` (
-- ----------------------------
-- Records of iam_user_info
-- ----------------------------
-INSERT INTO `iam_user_info` VALUES (1399985191002447872, '小小明', 'xxm', 'f52020dca765fd3943ed40a615dc2c5c', '13333333333', 'xxm1995@outlook.com', '1430430071299207168,1430430071299207169', NULL, NULL, b'1', '2021-06-02 15:04:12', 1, 1, '2021-06-02 15:04:15', 1399985191002447872, '2022-06-27 23:09:31', 50, 0);
-INSERT INTO `iam_user_info` VALUES (1414143554414059520, '小小明1995', 'xxm1995', 'f52020dca765fd3943ed40a615dc2c5c', '13000000000', 'xxm1995@foxmail.com', NULL, NULL, NULL, b'1', '2021-07-11 16:44:31', 1, 1, '2021-07-11 16:44:32', 1414143554414059520, '2022-10-31 13:30:07', 5, 0);
+INSERT INTO `iam_user_info` VALUES (1399985191002447872, '小小明', 'xxm', 'f52020dca765fd3943ed40a615dc2c5c', '133****3333', 'x******@outlook.com', '1430430071299207168,1430430071299207169,1626840094767714304,1580487061605175296', NULL, NULL, b'1', '2021-06-02 15:04:12', 1, 1, '2021-06-02 15:04:15', 1414143554414059520, '2023-02-18 15:08:42', 55, 0);
+INSERT INTO `iam_user_info` VALUES (1414143554414059520, '小小明1995', 'xxm1995', 'f52020dca765fd3943ed40a615dc2c5c', '130****0000', 'x******@foxmail.com', '1430430071299207168,1580487061605175296,1430430071299207169,1626840094767714304', NULL, NULL, b'1', '2021-07-11 16:44:31', 1, 1, '2021-07-11 16:44:32', 1414143554414059520, '2023-02-18 15:08:48', 9, 0);
INSERT INTO `iam_user_info` VALUES (1435894470432456704, '管理员', 'admin', 'f52020dca765fd3943ed40a615dc2c5c', '13000001111', 'admin@qq.com', '1430430071299207168', '', NULL, b'0', '2021-09-09 17:14:52', 1, 1399985191002447872, '2021-09-09 17:14:54', 1399985191002447872, '2022-09-16 16:41:51', 7, 0);
INSERT INTO `iam_user_info` VALUES (1435967884114194432, '测试', 'test', 'f52020dca765fd3943ed40a615dc2c5c', '13311111111', 'test@qq.com', '1430430071299207168', '', NULL, b'0', '2021-09-09 22:06:37', 1, 1414143554414059520, '2021-09-09 22:06:37', 1399985191002447872, '2022-05-31 15:59:37', 9, 0);
INSERT INTO `iam_user_info` VALUES (1477990832987361280, '测试用户001', 'test001', 'f52020dca765fd3943ed40a615dc2c5c', '', '', '1430430071299207168', '', NULL, b'0', '2022-01-03 21:10:49', 1, 1399985191002447872, '2022-01-03 21:10:49', 1399985191002447872, '2022-06-05 20:26:26', 1, 0);
@@ -5196,166 +4890,6 @@ CREATE TABLE `notice_wechat_config` (
-- ----------------------------
INSERT INTO `notice_wechat_config` VALUES (181361815405135421, 0, 'test01', 'test01', 'ww9d6247559117d202', '8n6A3SzN-DJNkw8wyCcJnr8-SOjFFWSOlBqZN8vypKM', 1, 1415, '2018-11-20 11:07:07', 1415, '2018-11-20 11:07:07', 0, 0);
--- ----------------------------
--- Table structure for order_order
--- ----------------------------
-DROP TABLE IF EXISTS `order_order`;
-CREATE TABLE `order_order` (
- `id` bigint(20) NOT NULL,
- `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '编码',
- `contact_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系人',
- `contact_phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '手机号',
- `contact_email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系邮箱',
- `channel_id` bigint(20) NULL DEFAULT NULL COMMENT '渠道',
- `pay_time` datetime(6) NULL DEFAULT NULL COMMENT '支付时间',
- `user_id` bigint(20) NULL DEFAULT NULL COMMENT '购买用户id',
- `status` int(11) NOT NULL COMMENT '状态',
- `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '描述',
- `type` int(11) NULL DEFAULT NULL COMMENT '类型',
- `total_amount` decimal(19, 2) NULL DEFAULT NULL COMMENT '总金额',
- `pay_amount` decimal(19, 2) NULL DEFAULT NULL COMMENT '实付金额',
- `coupon_ids` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所用优惠券ids',
- `address_info` json NULL COMMENT '地址参数',
- `invoice_info` json NULL COMMENT '发票参数',
- `addition` varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '附加参数',
- `device_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '设备id',
- `source` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '来源',
- `business_id` bigint(20) NULL DEFAULT NULL COMMENT '业务id',
- `creator` bigint(20) NULL DEFAULT NULL,
- `create_time` datetime(6) NULL DEFAULT NULL,
- `last_modified_time` datetime(6) NULL DEFAULT NULL,
- `last_modifier` bigint(20) NULL DEFAULT NULL,
- `version` int(11) NOT NULL,
- `deleted` bit(1) NOT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '订单' ROW_FORMAT = DYNAMIC;
-
--- ----------------------------
--- Records of order_order
--- ----------------------------
-
--- ----------------------------
--- Table structure for order_order_billing
--- ----------------------------
-DROP TABLE IF EXISTS `order_order_billing`;
-CREATE TABLE `order_order_billing` (
- `id` bigint(20) NOT NULL,
- `user_id` bigint(20) NULL DEFAULT NULL COMMENT '用户id',
- `channel_id` bigint(20) NULL DEFAULT NULL COMMENT '渠道id',
- `order_id` bigint(20) NULL DEFAULT NULL COMMENT '订单id',
- `pay_type` int(11) NOT NULL COMMENT '交易目的',
- `transaction_purpose` int(11) NOT NULL COMMENT '交易类型',
- `transaction_type` int(11) NOT NULL COMMENT '支付类型',
- `amount` decimal(19, 2) NULL DEFAULT NULL COMMENT '金额',
- `count` int(11) NULL DEFAULT NULL COMMENT '交易数量',
- `business_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '业务id',
- `creator` bigint(20) NULL DEFAULT NULL,
- `create_time` datetime(6) NULL DEFAULT NULL,
- `last_modifier` bigint(20) NULL DEFAULT NULL,
- `last_modified_time` datetime(6) NULL DEFAULT NULL,
- `version` int(11) NOT NULL,
- `deleted` bit(1) NOT NULL,
- `tid` bigint(20) NOT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '订单账单' ROW_FORMAT = DYNAMIC;
-
--- ----------------------------
--- Records of order_order_billing
--- ----------------------------
-
--- ----------------------------
--- Table structure for order_order_detail
--- ----------------------------
-DROP TABLE IF EXISTS `order_order_detail`;
-CREATE TABLE `order_order_detail` (
- `id` bigint(20) NOT NULL,
- `active_id` bigint(20) NULL DEFAULT NULL COMMENT '活动id',
- `shop_id` bigint(20) NULL DEFAULT NULL COMMENT '店铺id',
- `order_id` bigint(20) NULL DEFAULT NULL COMMENT '订单id',
- `category_id` bigint(20) NULL DEFAULT NULL COMMENT '类目id',
- `goods_id` bigint(20) NULL DEFAULT NULL COMMENT '商品id',
- `sku_id` bigint(20) NULL DEFAULT NULL COMMENT '库存id',
- `goods_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '商品名称',
- `goods_price` decimal(19, 2) NULL DEFAULT NULL COMMENT '商品价格',
- `num` int(11) NOT NULL COMMENT '数量',
- `total_amount` decimal(19, 2) NULL DEFAULT NULL COMMENT '总价',
- `pay_amount` decimal(19, 2) NULL DEFAULT NULL COMMENT '支付价',
- `state` int(11) NULL DEFAULT NULL COMMENT '状态',
- `addition` varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '附加参数',
- `creator` bigint(20) NULL DEFAULT NULL,
- `create_time` datetime(6) NULL DEFAULT NULL,
- `last_modifier` bigint(20) NULL DEFAULT NULL,
- `last_modified_time` datetime(6) NULL DEFAULT NULL,
- `version` int(11) NOT NULL,
- `deleted` bit(1) NOT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '订单明细' ROW_FORMAT = DYNAMIC;
-
--- ----------------------------
--- Records of order_order_detail
--- ----------------------------
-
--- ----------------------------
--- Table structure for order_order_item_billing
--- ----------------------------
-DROP TABLE IF EXISTS `order_order_item_billing`;
-CREATE TABLE `order_order_item_billing` (
- `id` bigint(20) NOT NULL,
- `order_billing_id` bigint(20) NULL DEFAULT NULL COMMENT '账单id',
- `user_id` bigint(20) NULL DEFAULT NULL COMMENT '用户id',
- `order_id` bigint(20) NULL DEFAULT NULL COMMENT '订单id',
- `order_item_id` bigint(20) NULL DEFAULT NULL COMMENT '订单项id',
- `sku_id` bigint(20) NULL DEFAULT NULL COMMENT '订单项目skuId',
- `transaction_purpose` int(11) NOT NULL COMMENT '交易目的',
- `transaction_type` int(11) NOT NULL COMMENT '交易类型(名目)',
- `pay_type` int(11) NOT NULL COMMENT '支付类型',
- `amount` decimal(19, 2) NULL DEFAULT NULL COMMENT '支付金额',
- `count` int(11) NULL DEFAULT NULL COMMENT '使用数量',
- `bookkeeping_time` bigint(20) NULL DEFAULT NULL COMMENT '入账时间',
- `creator` bigint(20) NULL DEFAULT NULL,
- `create_time` datetime(6) NULL DEFAULT NULL,
- `last_modifier` bigint(20) NULL DEFAULT NULL,
- `last_modified_time` datetime(6) NULL DEFAULT NULL,
- `version` int(11) NOT NULL,
- `deleted` bit(1) NOT NULL,
- `tid` bigint(20) NOT NULL,
- `business_type` int(11) NULL DEFAULT NULL,
- `source_item_billing_id` bigint(20) NULL DEFAULT NULL,
- `source_order_item_id` bigint(20) NULL DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '订单明细账单' ROW_FORMAT = DYNAMIC;
-
--- ----------------------------
--- Records of order_order_item_billing
--- ----------------------------
-
--- ----------------------------
--- Table structure for order_order_strategy_mapping
--- ----------------------------
-DROP TABLE IF EXISTS `order_order_strategy_mapping`;
-CREATE TABLE `order_order_strategy_mapping` (
- `id` bigint(20) NOT NULL,
- `order_id` bigint(20) NULL DEFAULT NULL COMMENT '订单id',
- `order_detail_id` bigint(20) NULL DEFAULT NULL COMMENT '明细id',
- `strategy_id` bigint(20) NULL DEFAULT NULL COMMENT '策略ID',
- `strategy_type` int(11) NULL DEFAULT NULL COMMENT '策略类型(普通/优惠券ID)',
- `strategy_register_id` bigint(20) NULL DEFAULT NULL COMMENT '策略注册ID',
- `price_change` decimal(19, 2) NULL DEFAULT NULL COMMENT '价格变动',
- `desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注信息',
- `coupon_id` bigint(20) NULL DEFAULT NULL,
- `creator` bigint(20) NULL DEFAULT NULL,
- `create_time` datetime(6) NULL DEFAULT NULL,
- `last_modifier` bigint(20) NULL DEFAULT NULL,
- `last_modified_time` datetime(6) NULL DEFAULT NULL,
- `version` int(11) NOT NULL,
- `deleted` bit(1) NOT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '订单策略映射' ROW_FORMAT = DYNAMIC;
-
--- ----------------------------
--- Records of order_order_strategy_mapping
--- ----------------------------
-
-- ----------------------------
-- Table structure for pay_ali_payment
-- ----------------------------
@@ -6034,276 +5568,48 @@ CREATE TABLE `qrtz_triggers` (
INSERT INTO `qrtz_triggers` VALUES ('quartzScheduler', '1546857070483939328', 'DEFAULT', '1546857070483939328', 'DEFAULT', NULL, 1663741925000, 1663741920000, 5, 'ACQUIRED', 'CRON', 1657634445000, 0, NULL, 0, '');
-- ----------------------------
--- Table structure for sales_activity
--- ----------------------------
-DROP TABLE IF EXISTS `sales_activity`;
-CREATE TABLE `sales_activity` (
- `id` bigint(20) NOT NULL,
- `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'name',
- `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '描述',
- `strategy_id` bigint(255) NULL DEFAULT NULL COMMENT '策略id',
- `strategy_register_id` bigint(20) NOT NULL COMMENT '策略注册id',
- `activity_mutual` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动互斥',
- `start_time` datetime(6) NOT NULL COMMENT '有效开始时间',
- `end_time` datetime(6) NOT NULL COMMENT '有效结束时间',
- `creator` bigint(20) NULL DEFAULT NULL,
- `create_time` datetime(6) NULL DEFAULT NULL,
- `last_modifier` bigint(20) NULL DEFAULT NULL,
- `last_modified_time` datetime(6) NULL DEFAULT NULL,
- `version` int(11) NOT NULL,
- `deleted` bit(1) NOT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '优惠活动' ROW_FORMAT = DYNAMIC;
-
--- ----------------------------
--- Records of sales_activity
--- ----------------------------
-INSERT INTO `sales_activity` VALUES (1394892920481533952, '100-16', '100-16活动策略2', NULL, 1394892919403597824, '', '2021-05-18 17:43:59.000000', '2021-07-01 17:44:02.000000', 1, '2021-05-19 13:49:22.757000', 1, '2021-05-19 13:49:22.757000', 0, b'0');
-INSERT INTO `sales_activity` VALUES (1394918400265965568, '100-5', '100-5活动策略3', NULL, 1394918398827319296, '', '2021-05-18 17:43:59.000000', '2021-07-01 17:44:02.000000', 1, '2021-05-19 15:30:37.611000', 1, '2021-05-19 15:30:37.611000', 0, b'0');
-INSERT INTO `sales_activity` VALUES (1395308738893729792, '50-20', '50-20活动策略3', 1382517531398524928, 1395308573587820544, '', '2021-05-18 17:43:59.000000', '2021-07-01 17:44:02.000000', 1, '2021-05-20 17:21:41.592000', 1, '2021-05-20 17:21:41.592000', 0, b'0');
-
--- ----------------------------
--- Table structure for sales_check_rule
--- ----------------------------
-DROP TABLE IF EXISTS `sales_check_rule`;
-CREATE TABLE `sales_check_rule` (
- `id` bigint(20) NOT NULL,
- `strategy_register_id` bigint(20) NOT NULL COMMENT '关联策略注册id',
- `register_type` int(6) NOT NULL COMMENT '策略类型 策略/优惠券',
- `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '规则名称',
- `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '规则code',
- `rule_type` int(11) NOT NULL COMMENT '规则类型',
- `strategy_id` bigint(20) NULL DEFAULT NULL COMMENT '对应策略id',
- `addition` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '附加对象 json',
- `priority` int(11) NULL DEFAULT NULL COMMENT '优先级',
- `creator` bigint(20) NULL DEFAULT NULL,
- `create_time` datetime(6) NULL DEFAULT NULL,
- `last_modifier` bigint(20) NULL DEFAULT NULL,
- `last_modified_time` datetime(6) NULL DEFAULT NULL,
- `version` int(11) NULL DEFAULT NULL,
- `deleted` bit(1) NOT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '检查规则' ROW_FORMAT = DYNAMIC;
-
--- ----------------------------
--- Records of sales_check_rule
+-- Table structure for report_project_info
-- ----------------------------
-
--- ----------------------------
--- Table structure for sales_coupon
--- ----------------------------
-DROP TABLE IF EXISTS `sales_coupon`;
-CREATE TABLE `sales_coupon` (
- `id` bigint(20) NOT NULL,
- `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '名称',
- `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '描述',
- `template_id` bigint(20) NULL DEFAULT NULL COMMENT '模板id',
- `strategy_register_id` bigint(20) NULL DEFAULT NULL COMMENT '策略注册id',
- `start_time` datetime(6) NULL DEFAULT NULL COMMENT '有效开始时间',
- `end_time` datetime(6) NULL DEFAULT NULL COMMENT '有效结束时间',
- `status` int(6) NOT NULL COMMENT '状态',
- `obtain_time` datetime(6) NULL DEFAULT NULL COMMENT '领取时间',
- `used_time` datetime(6) NULL DEFAULT NULL COMMENT '使用时间',
- `order_id` bigint(20) NULL DEFAULT NULL COMMENT '所用订单Id',
- `user_id` bigint(20) NULL DEFAULT NULL COMMENT '用户id',
- `creator` bigint(20) NULL DEFAULT NULL,
- `last_modifier` bigint(20) NULL DEFAULT NULL,
- `create_time` datetime(6) NULL DEFAULT NULL,
- `last_modified_time` datetime(6) NULL DEFAULT NULL,
- `version` int(11) NULL DEFAULT NULL,
- `deleted` bit(1) NOT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '优惠券' ROW_FORMAT = DYNAMIC;
-
--- ----------------------------
--- Records of sales_coupon
--- ----------------------------
-
--- ----------------------------
--- Table structure for sales_coupon_template
--- ----------------------------
-DROP TABLE IF EXISTS `sales_coupon_template`;
-CREATE TABLE `sales_coupon_template` (
- `id` bigint(20) NOT NULL,
- `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '名称',
- `strategy_register_id` bigint(20) NOT NULL COMMENT '策略注册id',
- `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '描述',
- `num` int(11) NOT NULL COMMENT '数量',
- `channel_ids` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '渠道',
- `activity_mutual` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '活动互斥',
- `coupon_mutual` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '优惠券互斥',
- `effective_type` int(8) NOT NULL COMMENT '有效类型',
- `time_type` int(8) NULL DEFAULT NULL COMMENT '时间类型',
- `effective_time` bigint(20) NULL DEFAULT NULL COMMENT '有效时间',
- `start_time` datetime(6) NULL DEFAULT NULL COMMENT '开始时间',
- `end_time` datetime(6) NULL DEFAULT NULL COMMENT '结束时间',
- `creator` bigint(20) NULL DEFAULT NULL,
- `create_time` datetime(6) NULL DEFAULT NULL,
- `last_modifier` bigint(20) NULL DEFAULT NULL,
- `last_modified_time` datetime(6) NULL DEFAULT NULL,
- `version` int(11) NOT NULL,
- `deleted` bit(1) NOT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '优惠券模板' ROW_FORMAT = DYNAMIC;
-
--- ----------------------------
--- Records of sales_coupon_template
--- ----------------------------
-INSERT INTO `sales_coupon_template` VALUES (1395284918623424512, '100-33', 1395284918430486528, '100-33优惠券', 999, NULL, '', '', 0, 1, NULL, NULL, NULL, 1, '2021-05-20 15:47:02.397000', 1, '2021-05-20 15:58:10.795000', 1, b'0');
-INSERT INTO `sales_coupon_template` VALUES (1395320423364841472, '100-33', 1395320422941216768, '100-33优惠券', 988, NULL, '', '', 0, 1, NULL, NULL, NULL, 1, '2021-05-20 18:08:07.387000', 1, '2021-05-20 18:28:33.743000', 12, b'0');
-
--- ----------------------------
--- Table structure for sales_match_rule
--- ----------------------------
-DROP TABLE IF EXISTS `sales_match_rule`;
-CREATE TABLE `sales_match_rule` (
- `id` bigint(20) NOT NULL,
- `strategy_register_id` bigint(20) NOT NULL COMMENT '关联策略注册id',
- `register_type` int(6) NOT NULL COMMENT '策略类型 策略/优惠券',
- `feature_type` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '特征类型(sku/spu/shop)',
- `feature_point` varchar(55) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '特征点',
- `match_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '匹配类型',
- `creator` bigint(20) NULL DEFAULT NULL,
- `create_time` datetime(6) NULL DEFAULT NULL,
- `last_modifier` bigint(20) NULL DEFAULT NULL,
- `last_modified_time` datetime(6) NULL DEFAULT NULL,
- `version` int(11) NOT NULL,
- `deleted` bit(1) NOT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '匹配检查' ROW_FORMAT = DYNAMIC;
-
--- ----------------------------
--- Records of sales_match_rule
--- ----------------------------
-
--- ----------------------------
--- Table structure for sales_strategy
--- ----------------------------
-DROP TABLE IF EXISTS `sales_strategy`;
-CREATE TABLE `sales_strategy` (
- `id` bigint(20) NOT NULL,
- `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '唯一编码',
- `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '名称',
- `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '描述',
- `engine_type` int(1) NOT NULL COMMENT '引擎类型, java/js/groovy',
- `target_type` int(11) NOT NULL COMMENT '目标类型',
- `rule_script` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '规则脚本',
- `show` int(1) NULL DEFAULT NULL COMMENT '是否展示 0不展示,1展示(default)',
- `state` int(1) NOT NULL COMMENT '0 可用 1 不可用',
- `creator` bigint(20) NULL DEFAULT NULL,
- `create_time` datetime(6) NULL DEFAULT NULL,
- `last_modifier` bigint(20) NULL DEFAULT NULL,
- `last_modified_time` datetime(6) NULL DEFAULT NULL,
- `version` int(11) NOT NULL,
- `deleted` bit(1) NOT NULL,
- `tid` bigint(20) NULL DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '策略' ROW_FORMAT = DYNAMIC;
-
--- ----------------------------
--- Records of sales_strategy
--- ----------------------------
-INSERT INTO `sales_strategy` VALUES (1382516141636866048, 'instantReduction', '立减策略', '立减指定的金额', 1, 1, NULL, 1, 1, 1, '2021-04-15 10:08:28.720000', 1, '2021-04-15 10:08:28.720000', 0, b'0', 10011);
-INSERT INTO `sales_strategy` VALUES (1382517531398524928, 'fullReduction', '满减策略', '满减策略', 1, 1, NULL, 1, 1, 1, '2021-04-15 10:14:00.075000', 1, '2021-04-15 10:14:00.075000', 0, b'0', 10011);
-INSERT INTO `sales_strategy` VALUES (1394909889247203328, 'channelCheck', '渠道检查', '渠道检查', 1, 2, NULL, 1, 1, 1, '2021-05-19 14:56:48.426000', 1, '2021-05-19 14:56:48.426000', 0, b'0', 10011);
-INSERT INTO `sales_strategy` VALUES (1395320340615417856, 'obtainMultiple', '多张领取检查', '多张领取检查', 1, 3, '', NULL, 1, 1, '2021-05-20 18:07:47.642000', 1, '2021-05-20 18:07:47.642000', 0, b'0', 10011);
-
--- ----------------------------
--- Table structure for sales_strategy_check_rule
--- ----------------------------
-DROP TABLE IF EXISTS `sales_strategy_check_rule`;
-CREATE TABLE `sales_strategy_check_rule` (
- `id` bigint(20) NOT NULL,
- `register_id` bigint(20) NULL DEFAULT NULL COMMENT '模板id',
- `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '规则名称',
- `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '规则code',
- `type` int(11) NOT NULL COMMENT '类型',
- `addition` varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '附加参数 json',
- `creator` bigint(20) NULL DEFAULT NULL,
- `create_time` datetime(6) NULL DEFAULT NULL,
- `last_modifier` bigint(20) NULL DEFAULT NULL,
- `last_modified_time` datetime(6) NULL DEFAULT NULL,
- `version` int(11) NULL DEFAULT NULL,
- `deleted` bit(1) NOT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '策略规则检查' ROW_FORMAT = DYNAMIC;
-
--- ----------------------------
--- Records of sales_strategy_check_rule
--- ----------------------------
-
--- ----------------------------
--- Table structure for sales_strategy_config
--- ----------------------------
-DROP TABLE IF EXISTS `sales_strategy_config`;
-CREATE TABLE `sales_strategy_config` (
- `id` bigint(20) NOT NULL,
- `strategy_id` bigint(20) NULL DEFAULT NULL COMMENT '策略id',
- `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数类型',
- `key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '方法参数名',
- `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数名称',
- `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '描述',
- `creator` bigint(20) NULL DEFAULT NULL,
- `create_time` datetime(6) NULL DEFAULT NULL,
- `last_modifier` bigint(20) NULL DEFAULT NULL,
- `last_modified_time` datetime(6) NULL DEFAULT NULL,
- `version` int(11) NOT NULL,
- `deleted` bit(1) NOT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '策略参数定义' ROW_FORMAT = DYNAMIC;
-
--- ----------------------------
--- Records of sales_strategy_config
--- ----------------------------
-INSERT INTO `sales_strategy_config` VALUES (1382517531788595199, 1382516141636866048, 'BigDecimal', 'amount', '立减金额', '立减金额', 1, '2021-04-15 10:08:28.873000', 1, '2021-04-15 10:08:28.873000', 0, b'0');
-INSERT INTO `sales_strategy_config` VALUES (1382517531788595200, 1382517531398524928, 'BigDecimal', 'satisfy', '满多少', '配置满多少的字段', 1, '2021-04-15 10:14:00.169000', 1, '2021-04-15 10:14:00.169000', 0, b'0');
-INSERT INTO `sales_strategy_config` VALUES (1382517531788595201, 1382517531398524928, 'BigDecimal', 'minus', '减多少', '配置减多少的字段', 1, '2021-04-15 10:14:00.169000', 1, '2021-04-15 10:14:00.169000', 0, b'0');
-
--- ----------------------------
--- Table structure for sales_strategy_config_value
--- ----------------------------
-DROP TABLE IF EXISTS `sales_strategy_config_value`;
-CREATE TABLE `sales_strategy_config_value` (
- `id` bigint(20) NOT NULL,
- `strategy_id` bigint(20) NULL DEFAULT NULL COMMENT '策略id',
- `strategy_register_id` bigint(20) NULL DEFAULT NULL COMMENT '策略注册id',
- `strategy_config_id` bigint(20) NULL DEFAULT NULL COMMENT '策略定义id',
- `key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '策略参数key',
- `value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数值',
- `creator` bigint(20) NULL DEFAULT NULL,
- `create_time` datetime(6) NULL DEFAULT NULL,
- `last_modifier` bigint(20) NULL DEFAULT NULL,
- `last_modified_time` datetime(6) NULL DEFAULT NULL,
- `version` int(11) NOT NULL,
- `deleted` bit(1) NOT NULL,
+DROP TABLE IF EXISTS `report_project_info`;
+CREATE TABLE `report_project_info` (
+ `id` bigint(20) NOT NULL COMMENT '主键',
+ `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目名称',
+ `state` int(11) NULL DEFAULT NULL COMMENT '发布状态',
+ `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '报表内容',
+ `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
+ `creator` bigint(20) NULL DEFAULT NULL COMMENT '创建者ID',
+ `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+ `last_modifier` bigint(20) NULL DEFAULT NULL COMMENT '最后修者ID',
+ `last_modified_time` datetime(0) NULL DEFAULT NULL COMMENT '最后修改时间',
+ `version` int(11) NOT NULL COMMENT '乐观锁',
+ `deleted` bit(1) NOT NULL COMMENT '删除标志',
+ `index_image` bigint(20) NULL DEFAULT NULL COMMENT '预览图片id',
+ `edit` bit(1) NULL DEFAULT NULL COMMENT '是否在编辑中',
PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '策略配置参数' ROW_FORMAT = DYNAMIC;
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '自定义大屏信息' ROW_FORMAT = DYNAMIC;
-- ----------------------------
--- Records of sales_strategy_config_value
+-- Records of report_project_info
-- ----------------------------
-- ----------------------------
--- Table structure for sales_strategy_register
+-- Table structure for report_project_info_publish
-- ----------------------------
-DROP TABLE IF EXISTS `sales_strategy_register`;
-CREATE TABLE `sales_strategy_register` (
- `id` bigint(20) NOT NULL,
- `strategy_id` bigint(20) NULL DEFAULT NULL COMMENT '策略id',
- `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '策略注册名称',
- `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '描述',
- `strategy_type` int(11) NULL DEFAULT NULL COMMENT '策略类型(1活动/2优惠券)',
- `creator` bigint(20) NULL DEFAULT NULL,
- `create_time` datetime(6) NULL DEFAULT NULL,
- `last_modifier` bigint(20) NULL DEFAULT NULL,
- `last_modified_time` datetime(6) NULL DEFAULT NULL,
- `version` int(11) NOT NULL,
- `deleted` bit(1) NOT NULL,
+DROP TABLE IF EXISTS `report_project_info_publish`;
+CREATE TABLE `report_project_info_publish` (
+ `id` bigint(20) NOT NULL COMMENT '主键',
+ `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '报表内容',
+ `creator` bigint(20) NULL DEFAULT NULL COMMENT '创建者ID',
+ `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+ `last_modifier` bigint(20) NULL DEFAULT NULL COMMENT '最后修者ID',
+ `last_modified_time` datetime(0) NULL DEFAULT NULL COMMENT '最后修改时间',
+ `version` int(11) NOT NULL COMMENT '乐观锁',
+ `deleted` bit(1) NOT NULL COMMENT '删除标志',
PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '策略注册' ROW_FORMAT = DYNAMIC;
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '自定义大屏发布信息' ROW_FORMAT = DYNAMIC;
-- ----------------------------
--- Records of sales_strategy_register
+-- Records of report_project_info_publish
-- ----------------------------
-- ----------------------------
diff --git a/_doc/ChangeLog.md b/_doc/ChangeLog.md
index 61a633076bd61ec0da0a8e9fe796aae5d36cdc1b..ba22d0791ef938634c65c1e31e63711d3a401075 100644
--- a/_doc/ChangeLog.md
+++ b/_doc/ChangeLog.md
@@ -1,4 +1,24 @@
# CHANGELOG
+## [v1.2.2] 一号线-创新谷
+**项目主要更新**
+- 增加Minio文件上传方式
+- 集成GoVIew可视化大屏功能
+
+**可视化大屏**
+- 登录接口对接
+- 编辑保存对接
+- 列表接口对接
+- 复制功能
+- 修改基础信息功能
+
+**Vue3更新**
+- 新增邮件发送演示
+- 新增数据版本信息展示
+
+**Vue2更新**
+- 新增数据版本信息展示
+
+
## [v1.2.1] 一号线-创新谷
**项目主要更新**
- 数据字段翻译功能支持字典翻译
diff --git a/_doc/Task.md b/_doc/Task.md
new file mode 100644
index 0000000000000000000000000000000000000000..71bb1fac8dc9b652a9c65869d72feeb3277df937
--- /dev/null
+++ b/_doc/Task.md
@@ -0,0 +1 @@
+[ ]
diff --git a/_license/go-view/LICENSE2 b/_license/go-view/LICENSE2
new file mode 100644
index 0000000000000000000000000000000000000000..6f55195df70a015a9ca72ed2c0631315025810ff
--- /dev/null
+++ b/_license/go-view/LICENSE2
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2021 奔跑的面条
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
diff --git a/bootx-common-core/pom.xml b/bootx-common-core/pom.xml
index 7557d16b1b722506ff23dd9757427520601edd9d..7371a94f899cf46ca461bdbe24c51556fc7582d2 100644
--- a/bootx-common-core/pom.xml
+++ b/bootx-common-core/pom.xml
@@ -5,7 +5,7 @@
cn.bootx.platform
bootx-platform
- 1.2.1
+ 1.2.2
4.0.0
diff --git a/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/Translate.java b/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/Translate.java
index ea6b356cb37dc0813717fd75fe0fc1c98db21415..eebb68323b30d159f1b8bc2d7cec89c685c6718e 100644
--- a/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/Translate.java
+++ b/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/Translate.java
@@ -14,7 +14,6 @@ import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
public @interface Translate {
-
/**
* 翻译类型
*/
diff --git a/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/TranslationResult.java b/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/TranslationResult.java
index ba7a3030dde5f89355fd00704c0ecdc560035113..4c971712a4d6e558876fa75b36402766570c63b4 100644
--- a/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/TranslationResult.java
+++ b/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/TranslationResult.java
@@ -35,7 +35,7 @@ public @interface TranslationResult {
*/
MAP,
/**
- * 不对目标对象的类型进行修改, 只对字典值进行翻译, 但遇到注解标注的字段出现字典项code与name类型不一致, 会抛出异常
+ * 不对目标对象的类型进行修改, 只对字典值进行翻译, 但遇到注解标注的字段出现字典项code与name类型不一致, 会进行忽略
*/
OBJECT
}
diff --git a/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/actable/Unique.java b/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/actable/Unique.java
index 105e91aa254780a66d40a683081fe48a7eecba73..c632a52b38a6706bc4fe4cdf172e7ac3dc94fe40 100644
--- a/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/actable/Unique.java
+++ b/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/actable/Unique.java
@@ -15,7 +15,7 @@ public @interface Unique {
/**
* 唯一约束的名字,不设置默认为{actable_uni_当前标记字段名@Column的name}
- * 如果设置了名字例如union_name,系统会默认在名字前加actable_uni_前缀,也就是actable_uni_union_name
+ * 如果设置了名字例如union_name,系统会默认在名字前加auni_前缀,也就是uni_union_name
*/
String value() default "";
diff --git a/bootx-common-core/src/main/java/cn/bootx/common/core/rest/param/PageParam.java b/bootx-common-core/src/main/java/cn/bootx/common/core/rest/param/PageParam.java
index 83090164dcf37df2a4e1fd927fd227275d9e59f6..f62a451fc8d269f72bdd0562b135d1f8bbd372e4 100644
--- a/bootx-common-core/src/main/java/cn/bootx/common/core/rest/param/PageParam.java
+++ b/bootx-common-core/src/main/java/cn/bootx/common/core/rest/param/PageParam.java
@@ -2,7 +2,9 @@ package cn.bootx.common.core.rest.param;
import cn.hutool.core.util.PageUtil;
import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.AllArgsConstructor;
import lombok.Getter;
+import lombok.NoArgsConstructor;
import lombok.Setter;
import java.io.Serializable;
@@ -13,6 +15,8 @@ import java.io.Serializable;
@Getter
@Setter
@Schema(title = "分页查询参数")
+@NoArgsConstructor
+@AllArgsConstructor
public class PageParam implements Serializable {
private static final long serialVersionUID = 7489222986629492487L;
diff --git a/bootx-common-starters/common-starter-audit-log/pom.xml b/bootx-common-starters/common-starter-audit-log/pom.xml
index 181afaec2ecc6668c3401d5c5231790030e9acea..4ffe400f87bbe6733bb872984c3012fdcf8d3f85 100644
--- a/bootx-common-starters/common-starter-audit-log/pom.xml
+++ b/bootx-common-starters/common-starter-audit-log/pom.xml
@@ -5,7 +5,7 @@
bootx-common-starters
cn.bootx.platform
- 1.2.1
+ 1.2.2
4.0.0
diff --git a/bootx-common-starters/common-starter-audit-log/src/main/java/cn/bootx/starter/audit/log/core/db/dao/DataVersionLogDbManager.java b/bootx-common-starters/common-starter-audit-log/src/main/java/cn/bootx/starter/audit/log/core/db/dao/DataVersionLogDbManager.java
index 77416daffd4f2353772f0186b7930f0d72e8ad92..e505c4c01b3799c5cbdd90a83923bf059c443620 100644
--- a/bootx-common-starters/common-starter-audit-log/src/main/java/cn/bootx/starter/audit/log/core/db/dao/DataVersionLogDbManager.java
+++ b/bootx-common-starters/common-starter-audit-log/src/main/java/cn/bootx/starter/audit/log/core/db/dao/DataVersionLogDbManager.java
@@ -43,7 +43,9 @@ public class DataVersionLogDbManager extends BaseManager page(PageParam pageParam, DataVersionLogParam param) {
- DataVersionLogMongo dataVersionLogMongo = new DataVersionLogMongo().setDataId(param.getDataId())
+ DataVersionLogMongo dataVersionLogMongo = new DataVersionLogMongo()
+ .setDataId(param.getDataId())
+ .setVersion(param.getVersion())
+ .setTableName(param.getTableName())
.setDataName(param.getDataName());
// 查询条件
ExampleMatcher matching = ExampleMatcher.matching()
diff --git a/bootx-common-starters/common-starter-audit-log/src/main/java/cn/bootx/starter/audit/log/handler/DataVersionRecordHandler.java b/bootx-common-starters/common-starter-audit-log/src/main/java/cn/bootx/starter/audit/log/handler/DataVersionRecordHandler.java
index 59cc2e6e38c85d49802f330afcc2a6faba9e263b..3588158423876d5321c64d572cb188e48dc1db8f 100644
--- a/bootx-common-starters/common-starter-audit-log/src/main/java/cn/bootx/starter/audit/log/handler/DataVersionRecordHandler.java
+++ b/bootx-common-starters/common-starter-audit-log/src/main/java/cn/bootx/starter/audit/log/handler/DataVersionRecordHandler.java
@@ -42,15 +42,15 @@ public class DataVersionRecordHandler extends DataChangeRecorderInnerInterceptor
Map updateRecord = new HashMap<>();
// 遍历原始数据的所有字段
for (DataColumnChangeResult originalColumn : originalColumns) {
- System.out.println(originalColumn.getColumnName()+":"+originalColumn.getOriginalValue());
dataRecord.put(originalColumn.getColumnName(),originalColumn.getOriginalValue());
}
// 用新数据进行替换
List updatedColumns = Optional.ofNullable(changedRecord.getUpdatedColumns())
.orElse(new ArrayList<>(0));
for (DataColumnChangeResult updatedColumn : updatedColumns) {
+ // 更新记录列表记录变更前的数据
+ updateRecord.put(updatedColumn.getColumnName(),dataRecord.get(updatedColumn.getColumnName()));
dataRecord.put(updatedColumn.getColumnName(),updatedColumn.getUpdateValue());
- updateRecord.put(updatedColumn.getColumnName(),updatedColumn.getUpdateValue());
}
Object pkColumnVal = changedRecord.getPkColumnVal();
// insert手动获取下主键值
diff --git a/bootx-common-starters/common-starter-audit-log/src/main/java/cn/bootx/starter/audit/log/param/DataVersionLogParam.java b/bootx-common-starters/common-starter-audit-log/src/main/java/cn/bootx/starter/audit/log/param/DataVersionLogParam.java
index 16788e061b4b6f09ed0165b88567b1ac71731184..7af330cb01fcc17b18626fb2916ebc838729bec5 100644
--- a/bootx-common-starters/common-starter-audit-log/src/main/java/cn/bootx/starter/audit/log/param/DataVersionLogParam.java
+++ b/bootx-common-starters/common-starter-audit-log/src/main/java/cn/bootx/starter/audit/log/param/DataVersionLogParam.java
@@ -27,4 +27,7 @@ public class DataVersionLogParam {
@Schema(description = "本次变动的数据内容")
private Object changeContent;
+
+ @Schema(description = "版本")
+ private Integer version;
}
diff --git a/bootx-common-starters/common-starter-auth/pom.xml b/bootx-common-starters/common-starter-auth/pom.xml
index f6f801dbe1c060246ca579bcac55279a97f8155f..3695d04e2ab277002902a60fd92a7b8ea2275f62 100644
--- a/bootx-common-starters/common-starter-auth/pom.xml
+++ b/bootx-common-starters/common-starter-auth/pom.xml
@@ -5,7 +5,7 @@
cn.bootx.platform
bootx-common-starters
- 1.2.1
+ 1.2.2
4.0.0
common-starter-auth
diff --git a/bootx-common-starters/common-starter-auth/src/main/java/cn/bootx/starter/auth/authentication/AbstractAuthentication.java b/bootx-common-starters/common-starter-auth/src/main/java/cn/bootx/starter/auth/authentication/AbstractAuthentication.java
index e8d13766dd2c4637be38e31903131652321068ff..bac16b7e6edcaef2fd9d69392bcb2524deb4dcf6 100644
--- a/bootx-common-starters/common-starter-auth/src/main/java/cn/bootx/starter/auth/authentication/AbstractAuthentication.java
+++ b/bootx-common-starters/common-starter-auth/src/main/java/cn/bootx/starter/auth/authentication/AbstractAuthentication.java
@@ -23,7 +23,7 @@ public interface AbstractAuthentication {
String getLoginType();
/**
- * openId类型是否匹配
+ * 登录类型是否匹配
*/
default boolean adaptation(String loginType){
return Objects.equals(getLoginType(),loginType);
diff --git a/bootx-common-starters/common-starter-auth/src/main/java/cn/bootx/starter/auth/code/AuthLoginTypeCode.java b/bootx-common-starters/common-starter-auth/src/main/java/cn/bootx/starter/auth/code/AuthLoginTypeCode.java
index b0c5793125170cff1694facaa81d0f9058534534..6183002608439c94b0eedfab41885f5df05ab7a2 100644
--- a/bootx-common-starters/common-starter-auth/src/main/java/cn/bootx/starter/auth/code/AuthLoginTypeCode.java
+++ b/bootx-common-starters/common-starter-auth/src/main/java/cn/bootx/starter/auth/code/AuthLoginTypeCode.java
@@ -1,9 +1,9 @@
package cn.bootx.starter.auth.code;
-/**
+/**
* 认证录方式
-* @author xxm
-* @date 2021/8/2
+* @author xxm
+* @date 2021/8/2
*/
public interface AuthLoginTypeCode {
@@ -19,9 +19,13 @@ public interface AuthLoginTypeCode {
int SUCCESS = 2000;
- /** 账号密码登录 */
+ /* 登录方式 */
+ /** 账号密码登录(普通) */
String PASSWORD = "password";
+ /** 账号密码登录(GoView) */
+ String PASSWORD_GO_VIEW = "passwordGoView";
+
/** 手机号登录 */
String PHONE = "phone";
@@ -39,6 +43,9 @@ public interface AuthLoginTypeCode {
/** 码云 */
String GITEE = "gitee";
+ /** 飞书 */
+ String FEISHU = "feishu";
+
/** 钉钉登录 */
String DING_TALK = "dingTalk";
diff --git a/bootx-common-starters/common-starter-auth/src/main/java/cn/bootx/starter/auth/endpoint/TokenService.java b/bootx-common-starters/common-starter-auth/src/main/java/cn/bootx/starter/auth/endpoint/TokenService.java
index bf5264ca05468419abe11d5673caf82cc6919ba2..b26eef91f666dad61c62c888c3c96b76b5ed76a1 100644
--- a/bootx-common-starters/common-starter-auth/src/main/java/cn/bootx/starter/auth/endpoint/TokenService.java
+++ b/bootx-common-starters/common-starter-auth/src/main/java/cn/bootx/starter/auth/endpoint/TokenService.java
@@ -140,12 +140,12 @@ public class TokenService {
* 认证
*/
private @NotNull AuthInfoResult authentication(LoginAuthContext context){
- String clientCode = context.getAuthLoginType().getCode();
+ String loginType = context.getAuthLoginType().getCode();
return abstractAuthentications.stream()
- .filter(o->o.adaptation(clientCode))
+ .filter(o->o.adaptation(loginType))
.findFirst()
.map(o->o.authentication(context))
- .orElseThrow(() -> new LoginFailureException("未找到对应的终端认证器"));
+ .orElseThrow(() -> new LoginFailureException("未找到对应的登录认证器"));
}
/**
diff --git a/bootx-common-starters/common-starter-code-gen/pom.xml b/bootx-common-starters/common-starter-code-gen/pom.xml
index 78ec0b36e75952911b635542e5cd4cbbd432ca68..384673250da32874d82e4a83d6fe49fa21e0f0e2 100644
--- a/bootx-common-starters/common-starter-code-gen/pom.xml
+++ b/bootx-common-starters/common-starter-code-gen/pom.xml
@@ -5,7 +5,7 @@
cn.bootx.platform
bootx-common-starters
- 1.2.1
+ 1.2.2
4.0.0
diff --git a/bootx-common-starters/common-starter-code-gen/src/main/resources/codegen/template/vue2/list.vue.vm b/bootx-common-starters/common-starter-code-gen/src/main/resources/codegen/template/vue2/list.vue.vm
index 370da787747106a449d8606bf3c8d79ebe119587..5039c8623df888fdb14e2a3ea7a3ae1635ba255c 100644
--- a/bootx-common-starters/common-starter-code-gen/src/main/resources/codegen/template/vue2/list.vue.vm
+++ b/bootx-common-starters/common-starter-code-gen/src/main/resources/codegen/template/vue2/list.vue.vm
@@ -21,12 +21,12 @@
:loading="loading"
:data="tableData"
>
-
+
#foreach ($column in $columns)
-
+
#end
-
-
+
+
查看
@@ -44,7 +44,7 @@
删除
-
+
bootx-common-starters
cn.bootx.platform
- 1.2.1
+ 1.2.2
4.0.0
diff --git a/bootx-common-starters/common-starter-dingtalk/pom.xml b/bootx-common-starters/common-starter-dingtalk/pom.xml
index f2f269682d001672092205e8fd95ad04f89ce68e..292e91aadeca0ca80c1607fb5756e72102b47d47 100644
--- a/bootx-common-starters/common-starter-dingtalk/pom.xml
+++ b/bootx-common-starters/common-starter-dingtalk/pom.xml
@@ -5,7 +5,7 @@
bootx-common-starters
cn.bootx.platform
- 1.2.1
+ 1.2.2
4.0.0
diff --git a/bootx-common-starters/common-starter-file/pom.xml b/bootx-common-starters/common-starter-file/pom.xml
index 1fe768efe3046ed18dc6f02f49523e1bc027b5b9..ed491ac049f09116e63addf96049087f337f8e3d 100644
--- a/bootx-common-starters/common-starter-file/pom.xml
+++ b/bootx-common-starters/common-starter-file/pom.xml
@@ -5,7 +5,7 @@
bootx-common-starters
cn.bootx.platform
- 1.2.1
+ 1.2.2
4.0.0
@@ -30,5 +30,11 @@
common-mybatis-plus
true
+
+
+ io.minio
+ minio
+ ${minio.version}
+
diff --git a/bootx-common-starters/common-starter-file/src/main/java/cn/bootx/starter/file/configuration/FileUploadProperties.java b/bootx-common-starters/common-starter-file/src/main/java/cn/bootx/starter/file/configuration/FileUploadProperties.java
index eb2c33b9d680d0d86fb652f75923e8c5a7648c9c..d37dff3814194790d8a147a7f6080d7d5bc44e56 100644
--- a/bootx-common-starters/common-starter-file/src/main/java/cn/bootx/starter/file/configuration/FileUploadProperties.java
+++ b/bootx-common-starters/common-starter-file/src/main/java/cn/bootx/starter/file/configuration/FileUploadProperties.java
@@ -31,6 +31,9 @@ public class FileUploadProperties {
/** mongo存储配置 */
private Mongo mongo = new Mongo();
+ /** minio存储配置 */
+ private Minio minio = new Minio();
+
/**
* 本地存储
*/
@@ -50,4 +53,22 @@ public class FileUploadProperties {
/** 存储桶 */
private String bucket = "fs";
}
+
+ /**
+ * Minio存储配置
+ */
+ @Getter
+ @Setter
+ public static class Minio{
+ /** 端点地址 */
+ private String endpoint;
+ /** 区域 */
+ private String region;
+ /** 访问 key */
+ private String accessKey;
+ /** 访问 Secret */
+ private String accessSecret;
+ /** 存储桶 需要至少三位 */
+ private String bucket = "bootx";
+ }
}
diff --git a/bootx-common-starters/common-starter-file/src/main/java/cn/bootx/starter/file/service/UploadService.java b/bootx-common-starters/common-starter-file/src/main/java/cn/bootx/starter/file/service/UploadService.java
index 832a2c9d6ecd5239017d6b22b02a4e8946827e84..19e68f0bd8ca53142f75ee0c7cea468d30f2bf60 100644
--- a/bootx-common-starters/common-starter-file/src/main/java/cn/bootx/starter/file/service/UploadService.java
+++ b/bootx-common-starters/common-starter-file/src/main/java/cn/bootx/starter/file/service/UploadService.java
@@ -31,4 +31,9 @@ public interface UploadService {
* 下载文件
*/
InputStream download(UpdateFileInfo updateFileInfo);
+
+ /**
+ * 删除文件
+ */
+ void delete(UpdateFileInfo updateFileInfo );
}
diff --git a/bootx-common-starters/common-starter-file/src/main/java/cn/bootx/starter/file/service/impl/LocalUploadService.java b/bootx-common-starters/common-starter-file/src/main/java/cn/bootx/starter/file/service/impl/LocalUploadService.java
index 44e6979a9282f94ad4394445162d2990738b72dd..53c4a53485f998f8b35d1037e7f936c142bdc1db 100644
--- a/bootx-common-starters/common-starter-file/src/main/java/cn/bootx/starter/file/service/impl/LocalUploadService.java
+++ b/bootx-common-starters/common-starter-file/src/main/java/cn/bootx/starter/file/service/impl/LocalUploadService.java
@@ -25,10 +25,10 @@ import java.io.InputStream;
import java.nio.file.Files;
import java.util.Optional;
-/**
+/**
* 上传文件本地存储
-* @author xxm
-* @date 2022/1/12
+* @author xxm
+* @date 2022/1/12
*/
@Slf4j
@Service
@@ -89,4 +89,13 @@ public class LocalUploadService implements UploadService {
}
return Files.newInputStream(file.toPath());
}
+
+ /**
+ * 删除文件
+ */
+ @Override
+ public void delete(UpdateFileInfo updateFileInfo) {
+ String storePath = fileUploadProperties.getLocal().getLocalPath() + updateFileInfo.getFilePath();
+ FileUtil.del(storePath);
+ }
}
diff --git a/bootx-common-starters/common-starter-file/src/main/java/cn/bootx/starter/file/service/impl/MinioUploadService.java b/bootx-common-starters/common-starter-file/src/main/java/cn/bootx/starter/file/service/impl/MinioUploadService.java
index c386d354c546273488ee06f1adb4b6816869110d..59aa06ba790f3c782772f4c3dfc681f2a94754dd 100644
--- a/bootx-common-starters/common-starter-file/src/main/java/cn/bootx/starter/file/service/impl/MinioUploadService.java
+++ b/bootx-common-starters/common-starter-file/src/main/java/cn/bootx/starter/file/service/impl/MinioUploadService.java
@@ -1,16 +1,128 @@
package cn.bootx.starter.file.service.impl;
+import cn.bootx.starter.file.code.FileUploadTypeEnum;
+import cn.bootx.starter.file.configuration.FileUploadProperties;
+import cn.bootx.starter.file.entity.UpdateFileInfo;
+import cn.bootx.starter.file.entity.UploadFileContext;
+import cn.bootx.starter.file.service.UploadService;
+import cn.hutool.core.io.IoUtil;
+import io.minio.*;
import lombok.RequiredArgsConstructor;
+import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
+import org.springframework.http.HttpHeaders;
import org.springframework.stereotype.Service;
+import org.springframework.web.multipart.MultipartFile;
-/**
-* minio方式存储文件
-* @author xxm
-* @date 2022/1/12
-*/
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServletResponse;
+import java.io.InputStream;
+import java.util.Objects;
+
+/**
+ * minio方式存储文件
+ * @author xxm
+ * @date 2022/1/12
+ */
@Slf4j
@Service
@RequiredArgsConstructor
-public class MinioUploadService {
+public class MinioUploadService implements UploadService {
+ private final FileUploadProperties fileUploadProperties;
+ private MinioClient client;
+
+ /**
+ * 判断启用
+ */
+ @Override
+ public boolean enable(FileUploadTypeEnum type) {
+ boolean b = type == FileUploadTypeEnum.MINIO;
+ if (b){
+ this.doInit();
+ }
+ return b;
+ }
+
+ /**
+ * 上传文件
+ */
+ @SneakyThrows
+ @Override
+ public UpdateFileInfo upload(MultipartFile file, UploadFileContext context) {
+ FileUploadProperties.Minio minio = fileUploadProperties.getMinio();
+ PutObjectArgs putObjectArgs = PutObjectArgs.builder()
+ .bucket(minio.getBucket()) // bucket 必须传递
+ .contentType(file.getContentType())
+ .object(context.getFileId()+"."+context.getFileSuffix())
+ .stream(file.getInputStream(), file.getSize(), -1) // 文件内容
+ .build();
+ // 执行上传
+ client.putObject(putObjectArgs);
+ return new UpdateFileInfo()
+ .setExternalStorageId(putObjectArgs.object())
+ .setFileSize(file.getSize());
+ }
+
+ /**
+ * 预览文件
+ */
+ @SneakyThrows
+ @Override
+ public void preview(UpdateFileInfo updateFileInfo, HttpServletResponse response) {
+ FileUploadProperties.Minio minio = fileUploadProperties.getMinio();
+ String storageId = updateFileInfo.getExternalStorageId();
+ GetObjectResponse inputStream = client.getObject(GetObjectArgs.builder()
+ .bucket(minio.getBucket())
+ .object(storageId)
+ .build());
+ //获取响应输出流
+ ServletOutputStream os = response.getOutputStream();
+ IoUtil.copy(inputStream, os);
+ response.addHeader(HttpHeaders.CONTENT_DISPOSITION, updateFileInfo.getFileType());
+ IoUtil.close(inputStream);
+ IoUtil.close(os);
+ }
+
+ /**
+ * 下载文件
+ */
+ @SneakyThrows
+ @Override
+ public InputStream download(UpdateFileInfo updateFileInfo) {
+ FileUploadProperties.Minio minio = fileUploadProperties.getMinio();
+ String storageId = updateFileInfo.getExternalStorageId();
+ return client.getObject(GetObjectArgs.builder()
+ .bucket(minio.getBucket()) // bucket 必须传递
+ .object(storageId) // 相对路径作为 key
+ .build());
+ }
+
+ /**
+ * 删除文件
+ */
+ @SneakyThrows
+ @Override
+ public void delete(UpdateFileInfo updateFileInfo) {
+ FileUploadProperties.Minio minio = fileUploadProperties.getMinio();
+ client.removeObject(RemoveObjectArgs.builder()
+ .bucket(minio.getBucket()) // bucket 必须传递
+ .object(updateFileInfo.getExternalStorageId()) // 相对路径作为 key
+ .build());
+ }
+
+ /**
+ * 初始化
+ */
+ protected void doInit() {
+ if (Objects.nonNull(client)){
+ return;
+ }
+ FileUploadProperties.Minio minio = fileUploadProperties.getMinio();
+ // 初始化客户端
+ client = MinioClient.builder()
+ .endpoint(minio.getEndpoint()) // Endpoint URL
+ .region(minio.getRegion()) // Region
+ .credentials(minio.getAccessKey(), minio.getAccessSecret()) // 认证密钥
+ .build();
+ }
}
diff --git a/bootx-common-starters/common-starter-file/src/main/java/cn/bootx/starter/file/service/impl/MongoUploadService.java b/bootx-common-starters/common-starter-file/src/main/java/cn/bootx/starter/file/service/impl/MongoUploadService.java
index 965056e421d27d8ab4d30edb808ad158086d5b10..6715456cfb3783c40f6fc7f1018bb53a4e50ed32 100644
--- a/bootx-common-starters/common-starter-file/src/main/java/cn/bootx/starter/file/service/impl/MongoUploadService.java
+++ b/bootx-common-starters/common-starter-file/src/main/java/cn/bootx/starter/file/service/impl/MongoUploadService.java
@@ -82,4 +82,14 @@ public class MongoUploadService implements UploadService {
GridFsResource resource = gridFsTemplate.getResource(gridFSFile);
return resource.getInputStream();
}
+
+ /**
+ * 删除文件
+ */
+ @Override
+ public void delete(UpdateFileInfo updateFileInfo) {
+ Criteria criteria = Criteria.where("_id").is(new ObjectId(updateFileInfo.getExternalStorageId()));
+ Query query = new Query(criteria);
+ gridFsTemplate.delete(query);
+ }
}
diff --git a/bootx-common-starters/common-starter-flowable/pom.xml b/bootx-common-starters/common-starter-flowable/pom.xml
index 560d313c73d131be965ce71f52a7bfc65896727c..333084d45e6f9c3e60269507d7360c17648ddedb 100644
--- a/bootx-common-starters/common-starter-flowable/pom.xml
+++ b/bootx-common-starters/common-starter-flowable/pom.xml
@@ -5,7 +5,7 @@
bootx-common-starters
cn.bootx.platform
- 1.2.1
+ 1.2.2
4.0.0
diff --git a/bootx-common-starters/common-starter-monitor/pom.xml b/bootx-common-starters/common-starter-monitor/pom.xml
index 24be62b330e247ff4fb8a8f876168b180205348e..6738e0bedbf0a33dd2003d800fff669ba32b1d95 100644
--- a/bootx-common-starters/common-starter-monitor/pom.xml
+++ b/bootx-common-starters/common-starter-monitor/pom.xml
@@ -5,7 +5,7 @@
bootx-common-starters
cn.bootx.platform
- 1.2.1
+ 1.2.2
4.0.0
jar
diff --git a/bootx-common-starters/common-starter-quartz/pom.xml b/bootx-common-starters/common-starter-quartz/pom.xml
index f040915364fb4a02259162f9ce19ad461453f2dc..9485f1d175bd49de6e3f20054fbdbd1da7edac9a 100644
--- a/bootx-common-starters/common-starter-quartz/pom.xml
+++ b/bootx-common-starters/common-starter-quartz/pom.xml
@@ -5,7 +5,7 @@
cn.bootx.platform
bootx-common-starters
- 1.2.1
+ 1.2.2
4.0.0
diff --git a/bootx-common-starters/common-starter-wechat/pom.xml b/bootx-common-starters/common-starter-wechat/pom.xml
index e480c8819ea51dd0ceb5dd53630d4ccf3a845bac..dd9bdab6eff546925110bb1e3c24da9f1d24896c 100644
--- a/bootx-common-starters/common-starter-wechat/pom.xml
+++ b/bootx-common-starters/common-starter-wechat/pom.xml
@@ -5,7 +5,7 @@
bootx-common-starters
cn.bootx.platform
- 1.2.1
+ 1.2.2
4.0.0
diff --git a/bootx-common-starters/common-starter-wecom/pom.xml b/bootx-common-starters/common-starter-wecom/pom.xml
index 0020579d3b7869f8cb5c6f664b88e710a766b971..e07e5def01047b8ddbddbc468e2c32f3192b9393 100644
--- a/bootx-common-starters/common-starter-wecom/pom.xml
+++ b/bootx-common-starters/common-starter-wecom/pom.xml
@@ -5,7 +5,7 @@
cn.bootx.platform
bootx-common-starters
- 1.2.1
+ 1.2.2
4.0.0
jar
diff --git a/bootx-common-starters/pom.xml b/bootx-common-starters/pom.xml
index 263a44cb38c6c1699078a276cf1c0eb4edf28718..8bcfb857a18d16c32ed3b541ec17ee3fb603bace 100644
--- a/bootx-common-starters/pom.xml
+++ b/bootx-common-starters/pom.xml
@@ -5,7 +5,7 @@
bootx-platform
cn.bootx.platform
- 1.2.1
+ 1.2.2
4.0.0
diff --git a/bootx-commons/common-actable/pom.xml b/bootx-commons/common-actable/pom.xml
index 90146acfe8b05ae30563b524cb959ee6d07c3ce4..47d3cf2738d70ddf93606dc6db644c76db89d39b 100644
--- a/bootx-commons/common-actable/pom.xml
+++ b/bootx-commons/common-actable/pom.xml
@@ -6,7 +6,7 @@
cn.bootx.platform
bootx-commons
- 1.2.1
+ 1.2.2
common-actable
diff --git a/bootx-commons/common-cache/pom.xml b/bootx-commons/common-cache/pom.xml
index 1ea1b9575d8c4f7bb699c6cbe08a8809b567219f..47864b3d32b9e4e5c70e7924f42890c16acb0491 100644
--- a/bootx-commons/common-cache/pom.xml
+++ b/bootx-commons/common-cache/pom.xml
@@ -5,7 +5,7 @@
cn.bootx.platform
bootx-commons
- 1.2.1
+ 1.2.2
4.0.0
diff --git a/bootx-commons/common-data-translate/pom.xml b/bootx-commons/common-data-translate/pom.xml
index 9db25112cbd9dd985bb2cba89c119be1d8ff9141..08ce3b2041ab1bbc05f35fe70b3ccf2edb9cb2ee 100644
--- a/bootx-commons/common-data-translate/pom.xml
+++ b/bootx-commons/common-data-translate/pom.xml
@@ -5,7 +5,7 @@
cn.bootx.platform
bootx-commons
- 1.2.1
+ 1.2.2
4.0.0
diff --git a/bootx-commons/common-exception-handler/pom.xml b/bootx-commons/common-exception-handler/pom.xml
index b8289d65b8e7f8ce9eb130c749e6a5d40dc36727..4921b27beae8e1563682b20cc5f00dfa1649570a 100644
--- a/bootx-commons/common-exception-handler/pom.xml
+++ b/bootx-commons/common-exception-handler/pom.xml
@@ -5,7 +5,7 @@
bootx-commons
cn.bootx.platform
- 1.2.1
+ 1.2.2
4.0.0
common-exception-handler
diff --git a/bootx-commons/common-header-holder/pom.xml b/bootx-commons/common-header-holder/pom.xml
index e52e731b7bc6976124162b5d4c48e2013530b5f2..596e1f231c1f7201fe474545b0eea87ec3bf52f7 100644
--- a/bootx-commons/common-header-holder/pom.xml
+++ b/bootx-commons/common-header-holder/pom.xml
@@ -5,7 +5,7 @@
bootx-commons
cn.bootx.platform
- 1.2.1
+ 1.2.2
4.0.0
diff --git a/bootx-commons/common-idempotency/pom.xml b/bootx-commons/common-idempotency/pom.xml
index 299b8ced86724d5a7f605b0c49327701acba55a7..2bd3af37a1f45ee9278f638adfc865172c7536ed 100644
--- a/bootx-commons/common-idempotency/pom.xml
+++ b/bootx-commons/common-idempotency/pom.xml
@@ -5,7 +5,7 @@
bootx-commons
cn.bootx.platform
- 1.2.1
+ 1.2.2
4.0.0
diff --git a/bootx-commons/common-jackson/pom.xml b/bootx-commons/common-jackson/pom.xml
index 700ff61c1e92b6083cd17c0d419c0193e7244a50..620fa92cec889155a48ec6b9194e6b561f94c922 100644
--- a/bootx-commons/common-jackson/pom.xml
+++ b/bootx-commons/common-jackson/pom.xml
@@ -5,7 +5,7 @@
cn.bootx.platform
bootx-commons
- 1.2.1
+ 1.2.2
4.0.0
diff --git a/bootx-commons/common-lock/pom.xml b/bootx-commons/common-lock/pom.xml
index 84e6cdbb3b37c0445b67b43fa13ed0baf4884aea..5f0f53f541167a36ff05c2b66ff5b55a50c89088 100644
--- a/bootx-commons/common-lock/pom.xml
+++ b/bootx-commons/common-lock/pom.xml
@@ -5,7 +5,7 @@
cn.bootx.platform
bootx-commons
- 1.2.1
+ 1.2.2
4.0.0
diff --git a/bootx-commons/common-log/pom.xml b/bootx-commons/common-log/pom.xml
index 475b7e66c560bd2cb7ff0cb693fef78718b9b5e7..8d583d90e5adb98502f10a3455891cd469bd5ce3 100644
--- a/bootx-commons/common-log/pom.xml
+++ b/bootx-commons/common-log/pom.xml
@@ -5,7 +5,7 @@
cn.bootx.platform
bootx-commons
- 1.2.1
+ 1.2.2
4.0.0
diff --git a/bootx-commons/common-mongo/pom.xml b/bootx-commons/common-mongo/pom.xml
index 3d7a6a491b265a19aeb22e2ca54c06b43e94aca4..85ed2ba60de8377c24941cd1cf1daeb022beda64 100644
--- a/bootx-commons/common-mongo/pom.xml
+++ b/bootx-commons/common-mongo/pom.xml
@@ -5,7 +5,7 @@
cn.bootx.platform
bootx-commons
- 1.2.1
+ 1.2.2
4.0.0
common-mongo
diff --git a/bootx-commons/common-mqtt/pom.xml b/bootx-commons/common-mqtt/pom.xml
index 32d203eafe07ce620d5015878c28084acba596b6..17f7b2c401c18f957ac8f674e7214dfc88a62bb8 100644
--- a/bootx-commons/common-mqtt/pom.xml
+++ b/bootx-commons/common-mqtt/pom.xml
@@ -5,7 +5,7 @@
bootx-commons
cn.bootx.platform
- 1.2.1
+ 1.2.2
4.0.0
diff --git a/bootx-commons/common-mybatis-plus/pom.xml b/bootx-commons/common-mybatis-plus/pom.xml
index 37c8deeb43aa1017072b4be0a3b26f253ac1f261..6d5bbce304e843e7ae50233e481a1d97732673a0 100644
--- a/bootx-commons/common-mybatis-plus/pom.xml
+++ b/bootx-commons/common-mybatis-plus/pom.xml
@@ -5,7 +5,7 @@
bootx-commons
cn.bootx.platform
- 1.2.1
+ 1.2.2
4.0.0
diff --git a/bootx-commons/common-mybatis-plus/src/main/java/cn/bootx/common/mybatisplus/base/MpCreateEntity.java b/bootx-commons/common-mybatis-plus/src/main/java/cn/bootx/common/mybatisplus/base/MpCreateEntity.java
index e78d899e1b41a293ca7f89665eebe6a3a8da5b84..523943711892e5bead7ab1b6373cf0574e4959c1 100644
--- a/bootx-commons/common-mybatis-plus/src/main/java/cn/bootx/common/mybatisplus/base/MpCreateEntity.java
+++ b/bootx-commons/common-mybatis-plus/src/main/java/cn/bootx/common/mybatisplus/base/MpCreateEntity.java
@@ -20,7 +20,7 @@ import java.time.LocalDateTime;
public abstract class MpCreateEntity extends MpIdEntity{
/** 创建者ID */
- @Column(comment = "创建者ID",order = Integer.MAX_VALUE-600)
+ @Column(comment = "创建者ID",length = 20,order = Integer.MAX_VALUE-600)
@TableField(fill = FieldFill.INSERT)
private Long creator;
diff --git a/bootx-commons/common-mybatis-plus/src/main/java/cn/bootx/common/mybatisplus/base/MpDelEntity.java b/bootx-commons/common-mybatis-plus/src/main/java/cn/bootx/common/mybatisplus/base/MpDelEntity.java
index 08f4c256ed27bc5e3f5d55169f22d214bfd6f4e0..7f7935c076961f89f539b40d835855e228229f07 100644
--- a/bootx-commons/common-mybatis-plus/src/main/java/cn/bootx/common/mybatisplus/base/MpDelEntity.java
+++ b/bootx-commons/common-mybatis-plus/src/main/java/cn/bootx/common/mybatisplus/base/MpDelEntity.java
@@ -21,7 +21,7 @@ import java.time.LocalDateTime;
public abstract class MpDelEntity extends MpCreateEntity{
/** 最后修者ID */
- @Column(comment = "最后修者ID",order = Integer.MAX_VALUE-400)
+ @Column(comment = "最后修者ID",length = 20,order = Integer.MAX_VALUE-400)
@TableField(fill = FieldFill.INSERT_UPDATE)
private Long lastModifier;
diff --git a/bootx-commons/common-rabbitmq/pom.xml b/bootx-commons/common-rabbitmq/pom.xml
index b4cf8618a4e02debcf24ce344c2eb373ef3873be..83e007a735e3af692a2c31ca925ea111b9d330c6 100644
--- a/bootx-commons/common-rabbitmq/pom.xml
+++ b/bootx-commons/common-rabbitmq/pom.xml
@@ -5,7 +5,7 @@
bootx-commons
cn.bootx.platform
- 1.2.1
+ 1.2.2
4.0.0
diff --git a/bootx-commons/common-redis-client/pom.xml b/bootx-commons/common-redis-client/pom.xml
index 5301b329ead67f54bbd81fbc9429e8a83dbe2722..26aea755800d59ced98b248add84e2e8f31ee7e1 100644
--- a/bootx-commons/common-redis-client/pom.xml
+++ b/bootx-commons/common-redis-client/pom.xml
@@ -5,7 +5,7 @@
bootx-commons
cn.bootx.platform
- 1.2.1
+ 1.2.2
4.0.0
diff --git a/bootx-commons/common-sequence/pom.xml b/bootx-commons/common-sequence/pom.xml
index ed5e4dad3f9a7a304ec0d240f0e48dde2ef70ef7..14f9fbe41fb2be21128cb6edcfaceeb833e3d67f 100644
--- a/bootx-commons/common-sequence/pom.xml
+++ b/bootx-commons/common-sequence/pom.xml
@@ -5,7 +5,7 @@
bootx-commons
cn.bootx.platform
- 1.2.1
+ 1.2.2
4.0.0
diff --git a/bootx-commons/common-spring/pom.xml b/bootx-commons/common-spring/pom.xml
index 2eca10bac5b3f33b72414d11d38ce8871bc29992..3675aaf3f063541efc3a0e5054fdc86f9c138a23 100644
--- a/bootx-commons/common-spring/pom.xml
+++ b/bootx-commons/common-spring/pom.xml
@@ -5,7 +5,7 @@
bootx-commons
cn.bootx.platform
- 1.2.1
+ 1.2.2
4.0.0
diff --git a/bootx-commons/common-super-query/pom.xml b/bootx-commons/common-super-query/pom.xml
index 539858101d999cea1865dba70e05e618f464063e..6457f0e94301a47ed6a61800785ee7da986bc4e8 100644
--- a/bootx-commons/common-super-query/pom.xml
+++ b/bootx-commons/common-super-query/pom.xml
@@ -5,7 +5,7 @@
bootx-commons
cn.bootx.platform
- 1.2.1
+ 1.2.2
4.0.0
diff --git a/bootx-commons/common-swagger/pom.xml b/bootx-commons/common-swagger/pom.xml
index ea7de927760fc0485365befde24a353daaa89e72..7785e8fc40eb5292f265e25fd41160db9614c0f8 100644
--- a/bootx-commons/common-swagger/pom.xml
+++ b/bootx-commons/common-swagger/pom.xml
@@ -5,7 +5,7 @@
bootx-commons
cn.bootx.platform
- 1.2.1
+ 1.2.2
4.0.0
diff --git a/bootx-commons/common-websocket/pom.xml b/bootx-commons/common-websocket/pom.xml
index 6a55f377817d76b14c8a23216b9328e2336ec806..9b3dce07c7675f1b5e84894c712195ef2fbd1199 100644
--- a/bootx-commons/common-websocket/pom.xml
+++ b/bootx-commons/common-websocket/pom.xml
@@ -5,7 +5,7 @@
bootx-commons
cn.bootx.platform
- 1.2.1
+ 1.2.2
4.0.0
diff --git a/bootx-commons/common-xxl-job/pom.xml b/bootx-commons/common-xxl-job/pom.xml
index 3cea1d3bf453f1666ab3e5c2cb5423249901ed4d..705c240b6daf09fba4c65f8c12347cf632cf83ec 100644
--- a/bootx-commons/common-xxl-job/pom.xml
+++ b/bootx-commons/common-xxl-job/pom.xml
@@ -5,7 +5,7 @@
bootx-commons
cn.bootx.platform
- 1.2.1
+ 1.2.2
4.0.0
diff --git a/bootx-commons/pom.xml b/bootx-commons/pom.xml
index 28d82d9f48d78880b773b6d6e7ef7047b7f440fc..f2819f552dbe0d6ccd4da3a50fb88c8289728b4a 100644
--- a/bootx-commons/pom.xml
+++ b/bootx-commons/pom.xml
@@ -7,7 +7,7 @@
cn.bootx.platform
bootx-platform
- 1.2.1
+ 1.2.2
bootx-commons
diff --git a/bootx-demo/pom.xml b/bootx-demo/pom.xml
index c745e0b4715d3e144fe0f48516ee79c02cee8b36..73cfa2559f101b5bcb16f71d4b31eea05af08642 100644
--- a/bootx-demo/pom.xml
+++ b/bootx-demo/pom.xml
@@ -5,7 +5,7 @@
bootx-platform
cn.bootx.platform
- 1.2.1
+ 1.2.2
4.0.0
@@ -37,6 +37,11 @@
service-office
${bootx-platform.version}
+
+ cn.bootx.platform
+ service-visualization
+ ${bootx-platform.version}
+
cn.bootx.platform
common-starter-file
diff --git a/bootx-modules/module-eshop/pom.xml b/bootx-modules/module-eshop/pom.xml
deleted file mode 100644
index 4ce0005a709c464af30288a621a18e0136bc7c30..0000000000000000000000000000000000000000
--- a/bootx-modules/module-eshop/pom.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
- bootx-modules
- cn.bootx.platform
- 1.2.1
-
- 4.0.0
-
- module-eshop
- jar
- 网上商城
-
-
-
- cn.bootx.platform
- service-iam
- ${bootx-platform.version}
-
-
-
- cn.bootx.platform
- service-payment
- ${bootx-platform.version}
-
-
- cn.bootx.platform
- service-goods
- ${bootx-platform.version}
-
-
- cn.bootx.platform
- service-sales
- ${bootx-platform.version}
-
-
- cn.bootx.platform
- service-order
- ${bootx-platform.version}
-
-
-
-
diff --git a/bootx-modules/module-eshop/src/main/resources/META-INF/spring.factories b/bootx-modules/module-eshop/src/main/resources/META-INF/spring.factories
deleted file mode 100644
index 8ca5a5a0cbdbb25cf91d95ba93fc36078a7c3854..0000000000000000000000000000000000000000
--- a/bootx-modules/module-eshop/src/main/resources/META-INF/spring.factories
+++ /dev/null
@@ -1,3 +0,0 @@
-## 配置自动化配置
-org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
- cn.bootx.models.eshop.EshopApplication
diff --git a/bootx-modules/module-eshop/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-modules/module-eshop/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
deleted file mode 100644
index fd445ebb2cca8d683cc778d86e1dd47ff64f1367..0000000000000000000000000000000000000000
--- a/bootx-modules/module-eshop/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
+++ /dev/null
@@ -1 +0,0 @@
-cn.bootx.starter.wecom.WeComAutoConfiguration
\ No newline at end of file
diff --git a/bootx-modules/pom.xml b/bootx-modules/pom.xml
deleted file mode 100644
index 2574434a894d784f4fa2f2209c7aac8dbacd33ec..0000000000000000000000000000000000000000
--- a/bootx-modules/pom.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- bootx-platform
- cn.bootx.platform
- 1.2.1
-
- 4.0.0
-
- bootx-modules
- pom
- 解决方案实现
-
-
-
-
-
-
- cn.bootx.platform
- service-baseapi
- ${bootx-platform.version}
-
-
-
-
diff --git a/bootx-services/pom.xml b/bootx-services/pom.xml
index e48ba4d0d5a153720cbcd1003a4c78f583b2c4e1..df39b8a790406e5ac269c0976487e07e09a0bc20 100644
--- a/bootx-services/pom.xml
+++ b/bootx-services/pom.xml
@@ -5,7 +5,7 @@
cn.bootx.platform
bootx-platform
- 1.2.1
+ 1.2.2
4.0.0
@@ -20,9 +20,7 @@
service-payment
service-notice
service-office
-
-
-
+ service-visualization
diff --git a/bootx-services/service-baseapi/pom.xml b/bootx-services/service-baseapi/pom.xml
index 0cbb9c9253cef1dd706d4748fe491dfecb36ef5f..ea8e1a08ea576c50818f808ced0ae703855b347f 100644
--- a/bootx-services/service-baseapi/pom.xml
+++ b/bootx-services/service-baseapi/pom.xml
@@ -5,7 +5,7 @@
cn.bootx.platform
bootx-services
- 1.2.1
+ 1.2.2
4.0.0
diff --git a/bootx-services/service-goods/README.md b/bootx-services/service-goods/README.md
deleted file mode 100644
index 0388b7f5c91c73adef1bce79e6162329cef96f42..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/README.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# 商品中心
-
-## 介绍
-
-## 能力
-
-## 核心概念
-
-## 使用
\ No newline at end of file
diff --git a/bootx-services/service-goods/pom.xml b/bootx-services/service-goods/pom.xml
deleted file mode 100644
index a2f19a4fbf29c08d92bee4662f1b9e72ada6f357..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/pom.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- bootx-services
- cn.bootx.platform
- 1.2.1
-
- 4.0.0
-
- service-goods
-
-
-
-
- com.mysql
- mysql-connector-j
- runtime
-
-
-
- cn.bootx.platform
- common-starter-quartz
-
-
-
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/GoodsApplication.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/GoodsApplication.java
deleted file mode 100644
index 6834bf10d9bca3df09ba63cc38cf8d1bdd98c0ae..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/GoodsApplication.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package cn.bootx.goods;
-
-import org.apache.ibatis.annotations.Mapper;
-import org.mybatis.spring.annotation.MapperScan;
-import org.springframework.context.annotation.ComponentScan;
-
-/**
-* 商品中心
-* @author xxm
-* @date 2021/7/27
-*/
-@ComponentScan
-@MapperScan(annotationClass = Mapper.class)
-public class GoodsApplication {
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/code/CategoryCode.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/code/CategoryCode.java
deleted file mode 100644
index f85bbb5b44c74d51a5650fa0b340c0a555f31799..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/code/CategoryCode.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package cn.bootx.goods.code;
-
-/**
-* 类目相关常量
-* @author xxm
-* @date 2022/5/9
-*/
-public interface CategoryCode {
-
- /** 根类目 id */
- long ID_ROOT = 0L;
-
- // 类目层级
- /** 一级类目 */
- int LEVEL_TOP = 1;
- /** 中间类目 */
- int LEVEL_MIDDLE = 2;
- /** 子孙类目 */
- int LEVEL_CHILD = 3;
-
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/code/GoodsCode.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/code/GoodsCode.java
deleted file mode 100644
index 60b1fbcca5b5407fa45aa9d83e63743fd1cd7b1a..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/code/GoodsCode.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package cn.bootx.goods.code;
-
-/**
-* 商品中心常量
-* @author xxm
-* @date 2021/3/21
-*/
-public interface GoodsCode {
-
- /**
- * 项目名称
- */
- String APPLICATION_NAME = "service-goods-center";
- /**
- * 默认的不受限库存数
- */
- int CAPACITY_UNLIMITED = 99999999;
-
- /**
- * 库存操作 token 过期时间,30分钟
- */
- long INVENTORY_TOKEN_EXPIRED_TIME = 30 * 60 * 1000L;
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/code/GoodsErrorCode.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/code/GoodsErrorCode.java
deleted file mode 100644
index 61c630984f0a25296253dbc4c02a6a66f89b4a8c..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/code/GoodsErrorCode.java
+++ /dev/null
@@ -1,75 +0,0 @@
-package cn.bootx.goods.code;
-
-/**
-* 错误码定义类
-* @author xxm
-* @date 2020/11/20
-*/
-public interface GoodsErrorCode {
-
-
- /** 类目已存在 */
- int CATEGORY_ALREADY_EXISTED = 22010;
- /** 类目属性定义已存在 */
- int CATEGORY_ATTR_DEF_ALREADY_EXISTED = 22011;
- /** 类目不存在 */
- int CATEGORY_NOT_EXISTED = 22012;
- /** 类目属性是系统自定义商品公用属性 */
- int CATEGORY_DEF_NOT_ALLOWED = 22014;
- /** 类目名称支持字母数组和下划线 */
- int CATEGORY_LEF_NAME = 22015;
- /** 类目属性名称支持字母数组和下划线 */
- int CATEGORY_DEF_NAME = 22016;
- /** 类目属性数据库字段同步失败 */
- int CATEGORY_DEF_DDL = 22017;
-
- /** 商品已存在 */
- int GOODS_ALREADY_EXISTED = 22020;
- /** SKU不存在 */
- int GOODS_NOT_EXISTED = 22021;
- /** 必填字段丢失 */
- int REQUIRED_FIELD_MISS = 22025;
-
-
- /** SKU不存在 */
- int GOODS_SKU_NOT_EXISTED = 22021;
- /** 商品SKU已停售 */
- int GOODS_SKU_ALREADY_OFF = 22022;
- /** 商品SKU尚未开售 */
- int GOODS_SKU_NOT_ON = 22023;
-
- /** 库存不足 */
- int INVENTORY_INSUFFICIENT = 22030;
- /** 预占的库存不足 */
- int INVENTORY_LOCK_INSUFFICIENT = 22031;
- /** 未找到对应的库存 */
- int INVENTORY_NOT_FOUND = 22032;
- /** 更新 sku 时状态错误 */
- int GOODS_SKU_UPDATE_STATE = 22033;
- /** 更新 sku 时价格错误 */
- int GOODS_SKU_UPDATE_PRICE = 22034;
- /** 更新 sku 库存信息错误 */
- int GOODS_SKU_UPDATE_STOCK = 22035;
-
- /** 更新 sku 库存信息错误 */
- int GOODS_SKU_TIME_FORMAT_ERROR = 22036;
-
- /** 推送 更新 sku时,延迟设置异常 */
- int GOODS_SKU_DELAY_STRATEGY_EXCEPTION = 22037;
-
- /** 根据sku价格类型创建表失败 */
- int GOODS_SKU_PRICE_TYPE_DEF_DDL = 22038;
- /** 名称支持字母数字和下划线 */
- int GOODS_SKU_PRICE_TYPE_LEF_NAME = 22039;
- /** sku价格类型已存在 */
- int GOODS_SKU_PRICE_TYPE_ALREADY_EXISTED = 22040;
-
- /** 名称只支持字母数字和下划线 */
- int COMMON_INVALID_NAME = 22060;
- /** name已存在 */
- int COMMON_NAME_ALREADY_EXISTED = 22061;
- /** 价格类型数据不存在 */
- int COMMON_DATA_NOT_EXIST = 22062;
- /** 库存 token 已过期 */
- int TOKEN_OUT_OF_DADE = 22063;
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/controller/BrandController.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/controller/BrandController.java
deleted file mode 100644
index 088fe9eeef7de6aec1db81073ee6bbab79ee28cd..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/controller/BrandController.java
+++ /dev/null
@@ -1,66 +0,0 @@
-
-package cn.bootx.goods.controller;
-
-import cn.bootx.common.core.rest.PageResult;
-import cn.bootx.common.core.rest.Res;
-import cn.bootx.common.core.rest.ResResult;
-import cn.bootx.common.core.rest.param.PageParam;
-import cn.bootx.goods.core.category.service.BrandService;
-import cn.bootx.goods.dto.category.BrandDto;
-import cn.bootx.goods.param.category.BrandParam;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import lombok.RequiredArgsConstructor;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-
-/**
- * 品牌
- * @author xxm
- * @date 2022-05-09
- */
-@Tag(name ="品牌")
-@RestController
-@RequestMapping("/brand")
-@RequiredArgsConstructor
-public class BrandController {
- private final BrandService brandService;
-
- @Operation( summary = "添加")
- @PostMapping(value = "/add")
- public ResResult add(@RequestBody BrandParam param){
- return Res.ok(brandService.add(param));
- }
-
- @Operation( summary = "修改")
- @PostMapping(value = "/update")
- public ResResult update(@RequestBody BrandParam param){
- return Res.ok(brandService.update(param));
- }
-
- @Operation( summary = "删除")
- @DeleteMapping(value = "/delete")
- public ResResult delete(Long id){
- brandService.delete(id);
- return Res.ok();
- }
-
- @Operation( summary = "通过ID查询")
- @GetMapping(value = "/findById")
- public ResResult findById(Long id){
- return Res.ok(brandService.findById(id));
- }
-
- @Operation( summary = "查询所有")
- @GetMapping(value = "/findAll")
- public ResResult> findAll(){
- return Res.ok(brandService.findAll());
- }
-
- @Operation( summary = "分页查询")
- @GetMapping(value = "/page")
- public ResResult> page(PageParam pageParam, BrandParam brandParam){
- return Res.ok(brandService.page(pageParam,brandParam));
- }
-}
\ No newline at end of file
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/controller/CategoryController.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/controller/CategoryController.java
deleted file mode 100644
index ddf687babbba914935b192f209a9e40a31d96397..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/controller/CategoryController.java
+++ /dev/null
@@ -1,110 +0,0 @@
-package cn.bootx.goods.controller;
-
-import cn.bootx.common.core.rest.Res;
-import cn.bootx.common.core.rest.ResResult;
-import cn.bootx.common.core.util.ValidationUtil;
-import cn.bootx.goods.core.category.service.CategoryService;
-import cn.bootx.goods.dto.category.CategoryDto;
-import cn.bootx.goods.dto.category.CategoryTreeNode;
-import cn.bootx.goods.param.category.CategoryBrandParam;
-import cn.bootx.goods.param.category.CategoryParam;
-import cn.bootx.goods.param.category.CategorySpecParam;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import lombok.AllArgsConstructor;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-
-/**
- * @author xxm
- * @date 2020/11/19
- */
-@Tag(name ="类目管理")
-@RestController
-@RequestMapping("/category")
-@AllArgsConstructor
-public class CategoryController {
- private final CategoryService categoryService;
-
- @Operation(summary = "增加新类目")
- @PostMapping("/add")
- public ResResult add(@RequestBody CategoryParam categoryParam) {
- ValidationUtil.validateParam(categoryParam);
- categoryService.add(categoryParam);
- return Res.ok();
- }
-
- @Operation(summary = "更新类目")
- @PostMapping("/update")
- public ResResult update(@RequestBody CategoryDto categoryDto){
- return Res.ok(categoryService.update(categoryDto));
- }
-
- @Operation( summary = "获取所有类目")
- @GetMapping("/findAll")
- public ResResult> findAll() {
- return Res.ok(categoryService.findAll());
- }
-
- @Operation(summary = "判断类目是否已经存在")
- @GetMapping("/existsByName")
- public ResResult existsByName(String name){
- return Res.ok(categoryService.existsByName(name));
- }
-
- @Operation(summary = "判断类目是否已经存在(不包含自身)")
- @GetMapping("/existsByNameNotId")
- public ResResult existsByName(String name,Long id){
- return Res.ok(categoryService.existsByName(name,id));
- }
-
- @Operation( summary = "获取类目树")
- @GetMapping("/findTree")
- public ResResult> findTree() {
- return Res.ok(categoryService.findTree());
- }
-
- @Operation( summary = "通过 id 获取指定类目")
- @GetMapping("/findById")
- public ResResult findById(@Parameter(description = "类目 id", required = true)
- @RequestParam(value = "id") Long id) {
- return Res.ok(categoryService.findById(id));
- }
-
- @Operation( summary = "通过 id 删除类目")
- @DeleteMapping("/delete")
- public ResResult delete(Long id) {
- categoryService.delete(id);
- return Res.ok();
- }
-
- @Operation(summary = "根据类目id查询关联的绑定品牌id集合")
- @GetMapping("/findBindBrandIds")
- public ResResult> findBindBrandIds(Long categoryId){
- return Res.ok(categoryService.findBindBrandIds(categoryId));
- }
-
- @Operation(summary = "绑定品牌")
- @PostMapping("/bindBrand")
- public ResResult bindBrand(@RequestBody CategoryBrandParam param){
- ValidationUtil.validateParam(param);
- categoryService.bindBrand(param);
- return Res.ok();
- }
-
- @Operation(summary = "根据类目id查询关联的绑定规格id集合")
- @GetMapping("/findBindSpecIds")
- public ResResult> findBindSpecIds(Long categoryId){
- return Res.ok(categoryService.findBindSpecIds(categoryId));
- }
-
- @Operation(summary = "绑定规格")
- @PostMapping("/bindSpec")
- public ResResult bindSpec(@RequestBody CategorySpecParam param){
- ValidationUtil.validateParam(param);
- categoryService.bindSpec(param);
- return Res.ok();
- }
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/controller/CategoryParameterController.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/controller/CategoryParameterController.java
deleted file mode 100644
index 1d99d4e9034a76fc51ed537e881ff77ef8aced94..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/controller/CategoryParameterController.java
+++ /dev/null
@@ -1,83 +0,0 @@
-package cn.bootx.goods.controller;
-
-import cn.bootx.common.core.rest.PageResult;
-import cn.bootx.common.core.rest.Res;
-import cn.bootx.common.core.rest.ResResult;
-import cn.bootx.common.core.rest.param.PageParam;
-import cn.bootx.common.core.util.ValidationUtil;
-import cn.bootx.common.core.validation.ValidationGroup;
-import cn.bootx.goods.core.category.service.CategoryParameterService;
-import cn.bootx.goods.dto.category.CategoryParameterDto;
-import cn.bootx.goods.param.category.CategoryParameterParam;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import lombok.RequiredArgsConstructor;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-
-/**
- * 类目参数
- * @author xxm
- * @date 2022-05-09
- */
-@Tag(name ="类目参数")
-@RestController
-@RequestMapping("/categoryParameter")
-@RequiredArgsConstructor
-public class CategoryParameterController {
- private final CategoryParameterService categoryParameterService;
-
- @Operation( summary = "添加")
- @PostMapping(value = "/add")
- public ResResult add(@RequestBody CategoryParameterParam param){
- ValidationUtil.validateParam(param, ValidationGroup.add.class);
- return Res.ok(categoryParameterService.add(param));
- }
-
- @Operation( summary = "修改")
- @PostMapping(value = "/update")
- public ResResult update(@RequestBody CategoryParameterParam param){
- ValidationUtil.validateParam(param,ValidationGroup.edit.class);
- return Res.ok(categoryParameterService.update(param));
- }
-
- @Operation( summary = "删除")
- @DeleteMapping(value = "/delete")
- public ResResult delete(Long id){
- categoryParameterService.delete(id);
- return Res.ok();
- }
-
- @Operation( summary = "通过ID查询")
- @GetMapping(value = "/findById")
- public ResResult findById(Long id){
- return Res.ok(categoryParameterService.findById(id));
- }
-
- @Operation( summary = "查询所有")
- @GetMapping(value = "/findAll")
- public ResResult> findAll(){
- return Res.ok(categoryParameterService.findAll());
- }
-
- @Operation( summary = "分页查询(限定类目和分组id)")
- @GetMapping(value = "/page")
- public ResResult> page(PageParam pageParam, CategoryParameterParam categoryParameterParam){
- ValidationUtil.validateParam(categoryParameterParam,ValidationGroup.query.class);
- return Res.ok(categoryParameterService.page(pageParam,categoryParameterParam));
- }
-
- @Operation(summary = "判断类目参数是否已经存在")
- @GetMapping("/existsByName")
- public ResResult existsByName(String name,Long groupId){
- return Res.ok(categoryParameterService.existsByName(name,groupId));
- }
-
- @Operation(summary = "判断类目参数是否已经存在(不包含自身)")
- @GetMapping("/existsByNameNotId")
- public ResResult existsByName(String name,Long groupId,Long id){
- return Res.ok(categoryParameterService.existsByName(name,groupId,id));
- }
-
-}
\ No newline at end of file
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/controller/CategoryParameterGroupController.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/controller/CategoryParameterGroupController.java
deleted file mode 100644
index c81f9f737e9ae97d71dc636db4fc38ee3cb3d269..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/controller/CategoryParameterGroupController.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package cn.bootx.goods.controller;
-
-import cn.bootx.common.core.rest.PageResult;
-import cn.bootx.common.core.rest.Res;
-import cn.bootx.common.core.rest.ResResult;
-import cn.bootx.common.core.rest.param.PageParam;
-import cn.bootx.goods.core.category.service.CategoryParameterGroupService;
-import cn.bootx.goods.dto.category.CategoryParameterGroupDto;
-import cn.bootx.goods.param.category.CategoryParameterGroupParam;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import lombok.RequiredArgsConstructor;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-
-/**
- * 类目参数组
- * @author xxm
- * @date 2022-05-09
- */
-@Tag(name ="类目参数组")
-@RestController
-@RequestMapping("/categoryParameterGroup")
-@RequiredArgsConstructor
-public class CategoryParameterGroupController {
- private final CategoryParameterGroupService categoryParameterGroupService;
-
- @Operation( summary = "添加")
- @PostMapping(value = "/add")
- public ResResult add(@RequestBody CategoryParameterGroupParam param){
- return Res.ok(categoryParameterGroupService.add(param));
- }
-
- @Operation( summary = "修改")
- @PostMapping(value = "/update")
- public ResResult update(@RequestBody CategoryParameterGroupParam param){
- return Res.ok(categoryParameterGroupService.update(param));
- }
-
- @Operation( summary = "删除")
- @DeleteMapping(value = "/delete")
- public ResResult delete(Long id){
- categoryParameterGroupService.delete(id);
- return Res.ok();
- }
-
- @Operation( summary = "通过ID查询")
- @GetMapping(value = "/findById")
- public ResResult findById(Long id){
- return Res.ok(categoryParameterGroupService.findById(id));
- }
-
- @Operation( summary = "查询所有")
- @GetMapping(value = "/findAll")
- public ResResult> findAll(){
- return Res.ok(categoryParameterGroupService.findAll());
- }
-
- @Operation( summary = "分页查询")
- @GetMapping(value = "/page")
- public ResResult> page(PageParam pageParam, CategoryParameterGroupParam categoryParameterGroupParam){
- return Res.ok(categoryParameterGroupService.page(pageParam,categoryParameterGroupParam));
- }
-
- @Operation(summary = "判断类目参数组是否已经存在")
- @GetMapping("/existsByName")
- public ResResult existsByName(String name,Long categoryId){
- return Res.ok(categoryParameterGroupService.existsByName(name,categoryId));
- }
-
- @Operation(summary = "判断类目参数组是否已经存在(不包含自身)")
- @GetMapping("/existsByNameNotId")
- public ResResult existsByName(String name,Long categoryId,Long id){
- return Res.ok(categoryParameterGroupService.existsByName(name,categoryId,id));
- }
-
-}
\ No newline at end of file
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/controller/GoodsController.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/controller/GoodsController.java
deleted file mode 100644
index f6f6eee3f4f2552f69435e2b036ef382b8ef563f..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/controller/GoodsController.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package cn.bootx.goods.controller;
-
-import cn.bootx.common.core.rest.PageResult;
-import cn.bootx.common.core.rest.Res;
-import cn.bootx.common.core.rest.ResResult;
-import cn.bootx.common.core.rest.param.PageParam;
-import cn.bootx.goods.core.goods.service.GoodsService;
-import cn.bootx.goods.dto.goods.GoodsDto;
-import cn.bootx.goods.param.goods.GoodsParam;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import lombok.AllArgsConstructor;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-
-@Tag(name ="商品管理")
-@RestController
-@RequestMapping("/goods")
-@AllArgsConstructor
-public class GoodsController{
- private final GoodsService goodsService;
-
- @Operation(summary = "添加商品")
- @PostMapping("/add")
- public ResResult add(@RequestBody GoodsParam param){
- goodsService.add(param);
- return Res.ok();
- }
-
- @Operation(summary = "查询全部")
- @GetMapping("/findAll")
- public ResResult> findAll(){
- return Res.ok(goodsService.findAll());
- }
-
- @Operation(summary = "分页")
- @GetMapping("/page")
- public ResResult> page(PageParam param, GoodsParam query){
- return Res.ok(goodsService.page(param,query));
- }
-
- @Operation(summary = "查询包含sku的详情")
- @GetMapping("/getDetails")
- public ResResult getDetails(Long id){
- return Res.ok(goodsService.getDetails(id));
- }
-
- @Operation(summary = "查询包含商品信息")
- @GetMapping("/findById")
- public ResResult findById(Long id){
- return Res.ok(goodsService.findById(id));
- }
-
- @Operation(summary = "按类目查询")
- @GetMapping("/findByCategory")
- public ResResult> findByCategory(Long cid){
- return Res.ok(goodsService.findByCategory(cid));
- }
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/controller/GoodsSkuController.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/controller/GoodsSkuController.java
deleted file mode 100644
index fd77fb2db95bee28a0b402d5bcbaef603837e4a0..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/controller/GoodsSkuController.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package cn.bootx.goods.controller;
-
-import cn.bootx.common.core.rest.Res;
-import cn.bootx.common.core.rest.ResResult;
-import cn.bootx.goods.core.sku.service.GoodsSkuService;
-import cn.bootx.goods.dto.sku.GoodsSkuDto;
-import cn.bootx.goods.param.sku.SkuParam;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import io.swagger.v3.oas.annotations.Operation;
-import lombok.AllArgsConstructor;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-
-/**
-* @author xxm
-* @date 2020/11/21
-*/
-@Tag(name ="sku操作")
-@RestController
-@RequestMapping("/sku")
-@AllArgsConstructor
-public class GoodsSkuController {
- private final GoodsSkuService goodsSkuService;
-
- @Operation(summary = "添加商品sku")
- @PostMapping("/add")
- public ResResult add(@RequestBody SkuParam skuParam){
- return Res.ok(goodsSkuService.add(skuParam));
- }
-
- @Operation(summary = "获取sku")
- @GetMapping("/get")
- public ResResult getById(Long id){
- return Res.ok(goodsSkuService.getById(id));
- }
-
- @Operation(summary = "获取sku集合")
- @GetMapping("/findBySkuIds")
- public ResResult> findBySkuIds(@RequestParam List skuIds){
- return Res.ok(goodsSkuService.findBySkuIds(skuIds));
- }
-
- @Operation(summary = "根据goodsId查询")
- @GetMapping("/findByGoodsId")
- public ResResult> findByGoodsId(Long goodsId){
- return Res.ok(goodsSkuService.findByGoodsId(goodsId));
- }
-
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/controller/InventoryController.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/controller/InventoryController.java
deleted file mode 100644
index 5dd6cea3b8fa6b7cca0ff1bdd4fb3c46a56c1832..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/controller/InventoryController.java
+++ /dev/null
@@ -1,89 +0,0 @@
-package cn.bootx.goods.controller;
-
-import cn.bootx.common.core.rest.Res;
-import cn.bootx.common.core.rest.ResResult;
-import cn.bootx.goods.core.inventory.service.InventoryService;
-import cn.bootx.goods.core.inventory.service.OperateInventoryService;
-import cn.bootx.goods.dto.inventory.LockInventoryDto;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import io.swagger.v3.oas.annotations.Operation;
-import lombok.AllArgsConstructor;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
-* @author xxm
-* @date 2020/11/23
-*/
-@Tag(name ="库存操作")
-@RestController
-@RequestMapping("/inventory")
-@AllArgsConstructor
-public class InventoryController {
- private final InventoryService inventoryService;
- private final OperateInventoryService operateInventoryService;
-
- @Operation(summary = "获取指定 SKU 的可用库存")
- @GetMapping("/getAvailable")
- public ResResult getAvailable(Long skuId){
- return Res.ok(inventoryService.getAvailable(skuId));
- }
-
- @Operation(summary = "锁定库存")
- @PostMapping("/lockInventory")
- public ResResult lockInventory(Long skuId, int count){
- return Res.ok(operateInventoryService.lockInventory(skuId,count));
- }
-
- @Operation(summary = "释放预占的SKU库存,需使用token")
- @PostMapping("/unlockInventory")
- public ResResult unlockInventory(Long skuId, int count, String token){
- operateInventoryService.unlockInventory(skuId,count,token);
- return Res.ok();
- }
-
- @Operation(summary = "解锁没有令牌的库存")
- @PostMapping("/unlockInventoryWithoutToken")
- public ResResult unlockInventoryWithoutToken(Long skuId, int count){
- operateInventoryService.unlockInventoryWithoutToken(skuId,count);
- return Res.ok();
- }
-
- @Operation(summary = "扣减指定 SKU 的预占库存,增加对应售出")
- @PostMapping("/reduceInventory")
- public ResResult reduceInventory(Long skuId, int count, String token){
- operateInventoryService.reduceInventory(skuId,count,token);
- return Res.ok();
- }
-
- @Operation(summary = "增补指定 SKU 的可售库存, 扣减对应售出")
- @PostMapping("/increaseInventory")
- public ResResult increaseInventory(Long skuId, int count){
- operateInventoryService.increaseInventory(skuId,count);
- return Res.ok();
- }
-
- @Operation(summary = "增补指定 SKU 的可售库存")
- @PostMapping("/increaseAvailable")
- public ResResult increaseAvailable(Long skuId, int count){
- operateInventoryService.increaseAvailable(skuId,count);
- return Res.ok();
- }
-
- @Operation(summary = "扣减指定的 SKU 的库存")
- @PostMapping("/reduceLockedAndCapacity")
- public ResResult reduceLockedAndCapacity(Long skuId, int count, String token){
- operateInventoryService.reduceLockedAndCapacity(skuId,count,token);
- return Res.ok();
- }
-
-
- @Operation(summary = "扣减指定 SKU 的售出库存并减少总库存")
- @PostMapping("/reduceSoldAndCapacity")
- public ResResult reduceSoldAndCapacity(Long skuId, int count){
- operateInventoryService.reduceSoldAndCapacity(skuId,count);
- return Res.ok();
- }
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/controller/SpecificationController.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/controller/SpecificationController.java
deleted file mode 100644
index a8f45b5fae65578e1fe13bfe4440b0bebd08175c..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/controller/SpecificationController.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package cn.bootx.goods.controller;
-
-import cn.bootx.common.core.rest.PageResult;
-import cn.bootx.common.core.rest.Res;
-import cn.bootx.common.core.rest.ResResult;
-import cn.bootx.common.core.rest.param.PageParam;
-import cn.bootx.goods.core.category.service.SpecificationService;
-import cn.bootx.goods.dto.category.SpecificationDto;
-import cn.bootx.goods.param.category.SpecificationParam;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import lombok.RequiredArgsConstructor;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-
-/**
- * 规格
- * @author xxm
- * @date 2022-05-09
- */
-@Tag(name ="规格")
-@RestController
-@RequestMapping("/specification")
-@RequiredArgsConstructor
-public class SpecificationController {
- private final SpecificationService specificationService;
-
- @Operation( summary = "添加")
- @PostMapping(value = "/add")
- public ResResult add(@RequestBody SpecificationParam param){
- specificationService.add(param);
- return Res.ok();
- }
-
- @Operation( summary = "修改")
- @PostMapping(value = "/update")
- public ResResult update(@RequestBody SpecificationParam param){
- return Res.ok(specificationService.update(param));
- }
-
- @Operation( summary = "删除")
- @DeleteMapping(value = "/delete")
- public ResResult delete(Long id){
- specificationService.delete(id);
- return Res.ok();
- }
-
- @Operation( summary = "通过ID查询")
- @GetMapping(value = "/findById")
- public ResResult findById(Long id){
- return Res.ok(specificationService.findById(id));
- }
-
- @Operation( summary = "查询所有")
- @GetMapping(value = "/findAll")
- public ResResult> findAll(){
- return Res.ok(specificationService.findAll());
- }
-
- @Operation( summary = "分页查询")
- @GetMapping(value = "/page")
- public ResResult> page(PageParam pageParam, SpecificationParam specificationParam){
- return Res.ok(specificationService.page(pageParam,specificationParam));
- }
-}
\ No newline at end of file
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/convert/BrandConvert.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/convert/BrandConvert.java
deleted file mode 100644
index aa7604963893792b5eee29cc2b549acbfd54665e..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/convert/BrandConvert.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package cn.bootx.goods.core.category.convert;
-
-import cn.bootx.goods.core.category.entity.Brand;
-import cn.bootx.goods.dto.category.BrandDto;
-import cn.bootx.goods.param.category.BrandParam;
-import org.mapstruct.Mapper;
-import org.mapstruct.factory.Mappers;
-
-/**
- * 品牌
- * @author xxm
- * @date 2022-05-09
- */
-@Mapper
-public interface BrandConvert {
- BrandConvert CONVERT = Mappers.getMapper(BrandConvert.class);
-
- Brand convert(BrandParam in);
-
- BrandDto convert(Brand in);
-
-}
\ No newline at end of file
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/convert/CategoryConvert.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/convert/CategoryConvert.java
deleted file mode 100644
index b6351621806c117acf741ca9fbe287be00414335..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/convert/CategoryConvert.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package cn.bootx.goods.core.category.convert;
-
-import cn.bootx.goods.core.category.entity.Category;
-import cn.bootx.goods.dto.category.CategoryDto;
-import cn.bootx.goods.param.category.CategoryParam;
-import org.mapstruct.Mapper;
-import org.mapstruct.factory.Mappers;
-
-@Mapper
-public interface CategoryConvert {
- CategoryConvert CONVERT = Mappers.getMapper(CategoryConvert.class);
- CategoryDto convert(Category in);
-
- Category convert(CategoryParam in);
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/convert/CategoryParameterConvert.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/convert/CategoryParameterConvert.java
deleted file mode 100644
index b71219821b43d011f16b4d2d831d71a0ccd0c85b..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/convert/CategoryParameterConvert.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package cn.bootx.goods.core.category.convert;
-
-import cn.bootx.goods.core.category.entity.CategoryParameter;
-import cn.bootx.goods.dto.category.CategoryParameterDto;
-import cn.bootx.goods.param.category.CategoryParameterParam;
-import org.mapstruct.Mapper;
-import org.mapstruct.factory.Mappers;
-
-/**
- * 类目参数
- * @author xxm
- * @date 2022-05-09
- */
-@Mapper
-public interface CategoryParameterConvert {
- CategoryParameterConvert CONVERT = Mappers.getMapper(CategoryParameterConvert.class);
-
- CategoryParameter convert(CategoryParameterParam in);
-
- CategoryParameterDto convert(CategoryParameter in);
-
-}
\ No newline at end of file
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/convert/CategoryParameterGroupConvert.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/convert/CategoryParameterGroupConvert.java
deleted file mode 100644
index ba35f682173c0e0b7d434994406c91b1ec2081d7..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/convert/CategoryParameterGroupConvert.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package cn.bootx.goods.core.category.convert;
-
-import cn.bootx.goods.core.category.entity.CategoryParameterGroup;
-import cn.bootx.goods.dto.category.CategoryParameterGroupDto;
-import cn.bootx.goods.param.category.CategoryParameterGroupParam;
-import org.mapstruct.Mapper;
-import org.mapstruct.factory.Mappers;
-
-/**
- * 类目参数组
- * @author xxm
- * @date 2022-05-09
- */
-@Mapper
-public interface CategoryParameterGroupConvert {
- CategoryParameterGroupConvert CONVERT = Mappers.getMapper(CategoryParameterGroupConvert.class);
-
- CategoryParameterGroup convert(CategoryParameterGroupParam in);
-
- CategoryParameterGroupDto convert(CategoryParameterGroup in);
-
-}
\ No newline at end of file
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/convert/SpecificationConvert.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/convert/SpecificationConvert.java
deleted file mode 100644
index 493e0deb87d995e76e961ce131abd975578621bf..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/convert/SpecificationConvert.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package cn.bootx.goods.core.category.convert;
-
-import cn.bootx.goods.core.category.entity.Specification;
-import cn.bootx.goods.dto.category.SpecificationDto;
-import cn.bootx.goods.param.category.SpecificationParam;
-import org.mapstruct.Mapper;
-import org.mapstruct.factory.Mappers;
-
-/**
- * 规格
- * @author xxm
- * @date 2022-05-09
- */
-@Mapper
-public interface SpecificationConvert {
- SpecificationConvert CONVERT = Mappers.getMapper(SpecificationConvert.class);
-
- Specification convert(SpecificationParam in);
-
- SpecificationDto convert(Specification in);
-
-}
\ No newline at end of file
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/BrandManager.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/BrandManager.java
deleted file mode 100644
index 7b827e525324a6c9dc8fd69d5497e2f88f9d0282..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/BrandManager.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package cn.bootx.goods.core.category.dao;
-
-import cn.bootx.common.core.rest.param.PageParam;
-import cn.bootx.common.mybatisplus.base.MpIdEntity;
-import cn.bootx.common.mybatisplus.impl.BaseManager;
-import cn.bootx.common.mybatisplus.util.MpUtil;
-import cn.bootx.goods.core.category.entity.Brand;
-import cn.bootx.goods.param.category.BrandParam;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.RequiredArgsConstructor;
-import org.springframework.stereotype.Repository;
-
-/**
- * 品牌
- * @author xxm
- * @date 2022-05-09
- */
-@Repository
-@RequiredArgsConstructor
-public class BrandManager extends BaseManager {
- private final BrandMapper mapper;
-
- /**
- * 分页
- */
- public Page page(PageParam pageParam, BrandParam param) {
- Page mpPage = MpUtil.getMpPage(pageParam, Brand.class);
- return lambdaQuery().orderByDesc(MpIdEntity::getId).page(mpPage);
- }
-}
\ No newline at end of file
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/BrandMapper.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/BrandMapper.java
deleted file mode 100644
index b28500c7bde713eda0c0c35c0baf926504c1e70e..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/BrandMapper.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package cn.bootx.goods.core.category.dao;
-
-import cn.bootx.goods.core.category.entity.Brand;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.apache.ibatis.annotations.Mapper;
-
-/**
- * 品牌
- * @author xxm
- * @date 2022-05-09
- */
-@Mapper
-public interface BrandMapper extends BaseMapper {
-}
\ No newline at end of file
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/CategoryBrandManager.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/CategoryBrandManager.java
deleted file mode 100644
index 78ac2a6868178206e38793d813e1e9e47358c227..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/CategoryBrandManager.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package cn.bootx.goods.core.category.dao;
-
-import cn.bootx.common.mybatisplus.impl.BaseManager;
-import cn.bootx.goods.core.category.entity.CategoryBrand;
-import lombok.RequiredArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Repository;
-
-import java.util.List;
-
-/**
-*
-* @author xxm
-* @date 2022/5/9
-*/
-@Slf4j
-@Repository
-@RequiredArgsConstructor
-public class CategoryBrandManager extends BaseManager {
-
- public List findAllByCategoryId(Long categoryId) {
- return findAllByField(CategoryBrand::getCategoryId,categoryId);
- }
-
- public void deleteByCategoryId(Long categoryId){
- deleteByField(CategoryBrand::getCategoryId,categoryId);
- }
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/CategoryBrandMapper.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/CategoryBrandMapper.java
deleted file mode 100644
index c1f252c117dc9b991dee4cd751fad300120849aa..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/CategoryBrandMapper.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package cn.bootx.goods.core.category.dao;
-
-import cn.bootx.goods.core.category.entity.CategoryBrand;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.apache.ibatis.annotations.Mapper;
-
-/**
-*
-* @author xxm
-* @date 2022/5/9
-*/
-@Mapper
-public interface CategoryBrandMapper extends BaseMapper {
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/CategoryManager.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/CategoryManager.java
deleted file mode 100644
index e8a8e6a545d132472701e935ea9083a733329549..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/CategoryManager.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package cn.bootx.goods.core.category.dao;
-
-import cn.bootx.common.mybatisplus.impl.BaseManager;
-import cn.bootx.goods.core.category.entity.Category;
-import lombok.RequiredArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Repository;
-
-/**
-* 类目
-* @author xxm
-* @date 2020/11/19
-*/
-@Slf4j
-@Repository
-@RequiredArgsConstructor
-public class CategoryManager extends BaseManager {
-
- public boolean existsByChildren(Long id) {
- return existedByField(Category::getPid,id);
- }
-
- public boolean existsName(String name) {
- return existedByField(Category::getName,name);
- }
-
- public boolean existsName(String name,Long id) {
- return existedByField(Category::getName,name,id);
- }
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/CategoryMapper.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/CategoryMapper.java
deleted file mode 100644
index d3c1108ace5130b7ea18482687eb0722c19bb462..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/CategoryMapper.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package cn.bootx.goods.core.category.dao;
-
-import cn.bootx.goods.core.category.entity.Category;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.apache.ibatis.annotations.Mapper;
-
-/**
-* 类目
-* @author xxm
-* @date 2020/11/19
-*/
-@Mapper
-public interface CategoryMapper extends BaseMapper {
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/CategoryParameterGroupManager.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/CategoryParameterGroupManager.java
deleted file mode 100644
index cf88667cbc1134a78cd86d62ddea5b6c1a2fa49c..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/CategoryParameterGroupManager.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package cn.bootx.goods.core.category.dao;
-
-import cn.bootx.common.core.rest.param.PageParam;
-import cn.bootx.common.mybatisplus.base.MpIdEntity;
-import cn.bootx.common.mybatisplus.impl.BaseManager;
-import cn.bootx.common.mybatisplus.util.MpUtil;
-import cn.bootx.goods.core.category.entity.CategoryParameterGroup;
-import cn.bootx.goods.param.category.CategoryParameterGroupParam;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.RequiredArgsConstructor;
-import org.springframework.stereotype.Repository;
-
-/**
- * 类目参数组
- * @author xxm
- * @date 2022-05-09
- */
-@Repository
-@RequiredArgsConstructor
-public class CategoryParameterGroupManager extends BaseManager {
- private final CategoryParameterGroupMapper mapper;
-
- /**
- * 分页
- */
- public Page page(PageParam pageParam, CategoryParameterGroupParam param) {
- Page mpPage = MpUtil.getMpPage(pageParam, CategoryParameterGroup.class);
- return lambdaQuery()
- .eq(CategoryParameterGroup::getCategoryId,param.getCategoryId())
- .orderByDesc(MpIdEntity::getId)
- .page(mpPage);
- }
-
- /**
- * 名称是否存在
- */
- public boolean existsByName(String name, Long categoryId){
- return this.lambdaQuery()
- .eq(CategoryParameterGroup::getName,name)
- .eq(CategoryParameterGroup::getCategoryId,categoryId)
- .exists();
- }
- /**
- * 名称是否存在
- */
- public boolean existsByName(String name, Long categoryId, Long id){
- return this.lambdaQuery()
- .eq(CategoryParameterGroup::getName,name)
- .eq(CategoryParameterGroup::getCategoryId,categoryId)
- .ne(CategoryParameterGroup::getId,id)
- .exists();
- }
-}
\ No newline at end of file
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/CategoryParameterGroupMapper.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/CategoryParameterGroupMapper.java
deleted file mode 100644
index 440f10d7feea33d162eb6be8590acc4eec6155e5..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/CategoryParameterGroupMapper.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package cn.bootx.goods.core.category.dao;
-
-import cn.bootx.goods.core.category.entity.CategoryParameterGroup;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.apache.ibatis.annotations.Mapper;
-
-/**
- * 类目参数组
- * @author xxm
- * @date 2022-05-09
- */
-@Mapper
-public interface CategoryParameterGroupMapper extends BaseMapper {
-}
\ No newline at end of file
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/CategoryParameterManager.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/CategoryParameterManager.java
deleted file mode 100644
index fdf0e508a4d2be8b2c6bb20b0fb9f7fb6512f9a9..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/CategoryParameterManager.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package cn.bootx.goods.core.category.dao;
-
-import cn.bootx.common.core.rest.param.PageParam;
-import cn.bootx.common.mybatisplus.base.MpIdEntity;
-import cn.bootx.common.mybatisplus.impl.BaseManager;
-import cn.bootx.common.mybatisplus.util.MpUtil;
-import cn.bootx.goods.core.category.entity.CategoryParameter;
-import cn.bootx.goods.param.category.CategoryParameterParam;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.RequiredArgsConstructor;
-import org.springframework.stereotype.Repository;
-
-/**
- * 类目参数
- * @author xxm
- * @date 2022-05-09
- */
-@Repository
-@RequiredArgsConstructor
-public class CategoryParameterManager extends BaseManager {
- private final CategoryParameterMapper mapper;
-
- /**
- * 分页
- */
- public Page page(PageParam pageParam, CategoryParameterParam param) {
- Page mpPage = MpUtil.getMpPage(pageParam, CategoryParameter.class);
- return lambdaQuery()
- .eq(CategoryParameter::getCategoryId,param.getCategoryId())
- .eq(CategoryParameter::getGroupId,param.getGroupId())
- .orderByDesc(MpIdEntity::getId)
- .page(mpPage);
- }
-
- /**
- * 名称是否存在
- */
- public boolean existsByName(String name, Long groupId){
- return this.lambdaQuery()
- .eq(CategoryParameter::getName,name)
- .eq(CategoryParameter::getGroupId,groupId)
- .exists();
- }
- /**
- * 名称是否存在
- */
- public boolean existsByName(String name, Long groupId, Long id){
- return this.lambdaQuery()
- .eq(CategoryParameter::getName,name)
- .eq(CategoryParameter::getGroupId,groupId)
- .ne(CategoryParameter::getId,id)
- .exists();
- }
-}
\ No newline at end of file
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/CategoryParameterMapper.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/CategoryParameterMapper.java
deleted file mode 100644
index 808327b81456cc6ebe733941cb32f2b3c8dadb18..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/CategoryParameterMapper.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package cn.bootx.goods.core.category.dao;
-
-import cn.bootx.goods.core.category.entity.CategoryParameter;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.apache.ibatis.annotations.Mapper;
-
-/**
- * 类目参数
- * @author xxm
- * @date 2022-05-09
- */
-@Mapper
-public interface CategoryParameterMapper extends BaseMapper {
-}
\ No newline at end of file
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/CategorySpecificationManager.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/CategorySpecificationManager.java
deleted file mode 100644
index ea9a34516d16cb301a15cdd5241ba8531d8a92f5..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/CategorySpecificationManager.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package cn.bootx.goods.core.category.dao;
-
-import cn.bootx.common.mybatisplus.impl.BaseManager;
-import cn.bootx.goods.core.category.entity.CategorySpecification;
-import lombok.RequiredArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Repository;
-
-import java.util.List;
-
-/**
-*
-* @author xxm
-* @date 2022/5/13
-*/
-@Slf4j
-@Repository
-@RequiredArgsConstructor
-public class CategorySpecificationManager extends BaseManager {
-
- public List findAllByCategoryId(Long categoryId) {
- return findAllByField(CategorySpecification::getCategoryId,categoryId);
- }
-
- public void deleteByCategoryId(Long categoryId){
- deleteByField(CategorySpecification::getCategoryId,categoryId);
- }
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/CategorySpecificationMapper.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/CategorySpecificationMapper.java
deleted file mode 100644
index 2bab2c82b2463020e14ea49d15c1d8eb13a996be..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/CategorySpecificationMapper.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package cn.bootx.goods.core.category.dao;
-
-import cn.bootx.goods.core.category.entity.CategorySpecification;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.apache.ibatis.annotations.Mapper;
-
-/**
-*
-* @author xxm
-* @date 2022/5/13
-*/
-@Mapper
-public interface CategorySpecificationMapper extends BaseMapper {
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/SpecificationManager.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/SpecificationManager.java
deleted file mode 100644
index c3d70952c4be57e56468d14cc4ef275ece87f615..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/SpecificationManager.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package cn.bootx.goods.core.category.dao;
-
-import cn.bootx.common.core.rest.param.PageParam;
-import cn.bootx.common.mybatisplus.base.MpIdEntity;
-import cn.bootx.common.mybatisplus.impl.BaseManager;
-import cn.bootx.common.mybatisplus.util.MpUtil;
-import cn.bootx.goods.core.category.entity.Specification;
-import cn.bootx.goods.param.category.SpecificationParam;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.RequiredArgsConstructor;
-import org.springframework.stereotype.Repository;
-
-/**
- * 规格
- * @author xxm
- * @date 2022-05-09
- */
-@Repository
-@RequiredArgsConstructor
-public class SpecificationManager extends BaseManager {
- private final SpecificationMapper mapper;
-
- /**
- * 分页
- */
- public Page page(PageParam pageParam, SpecificationParam param) {
- Page mpPage = MpUtil.getMpPage(pageParam, Specification.class);
- return lambdaQuery().orderByDesc(MpIdEntity::getId).page(mpPage);
- }
-}
\ No newline at end of file
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/SpecificationMapper.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/SpecificationMapper.java
deleted file mode 100644
index 16f2f68e7b723dccd6195c8fabfae8773e1e967a..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/dao/SpecificationMapper.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package cn.bootx.goods.core.category.dao;
-
-import cn.bootx.goods.core.category.entity.Specification;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.apache.ibatis.annotations.Mapper;
-
-/**
- * 规格
- * @author xxm
- * @date 2022-05-09
- */
-@Mapper
-public interface SpecificationMapper extends BaseMapper {
-}
\ No newline at end of file
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/entity/Brand.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/entity/Brand.java
deleted file mode 100644
index 7522d8e1694eab11c6405638e7325b58009d3eda..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/entity/Brand.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package cn.bootx.goods.core.category.entity;
-
-import cn.bootx.common.core.function.EntityBaseFunction;
-import cn.bootx.common.mybatisplus.base.MpBaseEntity;
-import cn.bootx.goods.core.category.convert.BrandConvert;
-import cn.bootx.goods.dto.category.BrandDto;
-import cn.bootx.goods.param.category.BrandParam;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
-/**
-* 品牌
-* @author xxm
-* @date 2022-05-09
-*/
-@EqualsAndHashCode(callSuper = true)
-@Data
-@TableName("goods_brand")
-@Accessors(chain = true)
-public class Brand extends MpBaseEntity implements EntityBaseFunction{
-
- /** 品牌名称 */
- private String name;
- /** 品牌图标 */
- private String logo;
- /** 状态 */
- private Boolean enable;
- /** 描述 */
- private String remark;
-
- /** 创建对象 */
- public static Brand init(BrandParam in) {
- return BrandConvert.CONVERT.convert(in);
- }
-
- /** 转换成dto */
- @Override
- public BrandDto toDto() {
- return BrandConvert.CONVERT.convert(this);
- }
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/entity/Category.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/entity/Category.java
deleted file mode 100644
index e18e85df92f93314262056a59e395fa1c3edc6ca..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/entity/Category.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package cn.bootx.goods.core.category.entity;
-
-import cn.bootx.common.core.function.EntityBaseFunction;
-import cn.bootx.common.mybatisplus.base.MpBaseEntity;
-import cn.bootx.goods.core.category.convert.CategoryConvert;
-import cn.bootx.goods.dto.category.CategoryDto;
-import cn.bootx.goods.param.category.CategoryParam;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
-
-/**
-* 类目
-* @author xxm
-* @date 2020/11/19
-*/
-@EqualsAndHashCode(callSuper = true)
-@Data
-@TableName("goods_category")
-@Accessors(chain = true)
-public class Category extends MpBaseEntity implements EntityBaseFunction {
- private static final long serialVersionUID = -3604408346443111551L;
-
- /** 上级类目id */
- private Long pid;
- /** 类目名称 */
- private String name;
- /** 描述 */
- private String remark;
- /** 状态 */
- private Boolean enable;
- /** 排序 */
- private Double sortNo;
- /** 图标/图片地址 */
- private String image;
- /** 层级 */
- private Integer level;
-
- public static Category init(CategoryParam in) {
- return CategoryConvert.CONVERT.convert(in);
- }
-
- @Override
- public CategoryDto toDto() {
- return CategoryConvert.CONVERT.convert(this);
- }
-
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/entity/CategoryBrand.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/entity/CategoryBrand.java
deleted file mode 100644
index de1ea551f233c5824d11b6605c67fe7a13ded573..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/entity/CategoryBrand.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package cn.bootx.goods.core.category.entity;
-
-import cn.bootx.common.mybatisplus.base.MpIdEntity;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
-/**
-* 类目品牌关联
-* @author xxm
-* @date 2022/5/9
-*/
-@EqualsAndHashCode(callSuper = true)
-@Data
-@Accessors(chain = true)
-@TableName("goods_category_brand")
-public class CategoryBrand extends MpIdEntity {
-
- /** 分类id */
- private Long categoryId;
-
- /** 品牌id */
- private Long brandId;
-
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/entity/CategoryParameter.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/entity/CategoryParameter.java
deleted file mode 100644
index f04d496b55c51ca3da281347aa3e77d5b9b08d98..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/entity/CategoryParameter.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package cn.bootx.goods.core.category.entity;
-
-import cn.bootx.common.core.function.EntityBaseFunction;
-import cn.bootx.common.mybatisplus.base.MpBaseEntity;
-import cn.bootx.goods.core.category.convert.CategoryParameterConvert;
-import cn.bootx.goods.dto.category.CategoryParameterDto;
-import cn.bootx.goods.param.category.CategoryParameterParam;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
-import java.util.List;
-
-/**
-* 类目参数
-* @author xxm
-* @date 2022-05-09
-*/
-@EqualsAndHashCode(callSuper = true)
-@Data
-@TableName(value = "goods_category_parameter",autoResultMap = true)
-@Accessors(chain = true)
-public class CategoryParameter extends MpBaseEntity implements EntityBaseFunction{
-
- /** 参数名称 */
- private String name;
- /** 类型 */
- private String type;
- /** 选择值(列表) */
- @TableField(typeHandler= JacksonTypeHandler.class)
- private List options;
- /** 是否必填 */
- private Boolean required;
- /** 排序 */
- private Double sortNo;
- /** 参数组id */
- private Long groupId;
- /** 类目id */
- private Long categoryId;
- /** 描述 */
- private String remark;
-
- /** 创建对象 */
- public static CategoryParameter init(CategoryParameterParam in) {
- return CategoryParameterConvert.CONVERT.convert(in);
- }
-
- /** 转换成dto */
- @Override
- public CategoryParameterDto toDto() {
- return CategoryParameterConvert.CONVERT.convert(this);
- }
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/entity/CategoryParameterGroup.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/entity/CategoryParameterGroup.java
deleted file mode 100644
index 1a1f547a35d6932d5999202103bceb5c937f364d..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/entity/CategoryParameterGroup.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package cn.bootx.goods.core.category.entity;
-
-import cn.bootx.common.core.function.EntityBaseFunction;
-import cn.bootx.common.mybatisplus.base.MpBaseEntity;
-import cn.bootx.goods.core.category.convert.CategoryParameterGroupConvert;
-import cn.bootx.goods.dto.category.CategoryParameterGroupDto;
-import cn.bootx.goods.param.category.CategoryParameterGroupParam;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
-/**
-* 类目参数组
-* @author xxm
-* @date 2022-05-09
-*/
-@EqualsAndHashCode(callSuper = true)
-@Data
-@TableName("goods_category_parameter_group")
-@Accessors(chain = true)
-public class CategoryParameterGroup extends MpBaseEntity implements EntityBaseFunction{
-
- /** 参数组名称 */
- private String name;
- /** 排序 */
- private Double sortNo;
- /** 类目id */
- private Long categoryId;
- /** 描述 */
- private String remark;
-
- /** 创建对象 */
- public static CategoryParameterGroup init(CategoryParameterGroupParam in) {
- return CategoryParameterGroupConvert.CONVERT.convert(in);
- }
-
- /** 转换成dto */
- @Override
- public CategoryParameterGroupDto toDto() {
- return CategoryParameterGroupConvert.CONVERT.convert(this);
- }
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/entity/Specification.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/entity/Specification.java
deleted file mode 100644
index a67b65944c8bb294324c2568a55b3875772bd863..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/entity/Specification.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package cn.bootx.goods.core.category.entity;
-
-import cn.bootx.common.core.function.EntityBaseFunction;
-import cn.bootx.common.mybatisplus.base.MpBaseEntity;
-import cn.bootx.goods.core.category.convert.SpecificationConvert;
-import cn.bootx.goods.dto.category.SpecificationDto;
-import cn.bootx.goods.param.category.SpecificationParam;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
-import java.util.List;
-
-
-/**
- * 规格
- * @author xxm
- * @date 2022-05-09
- */
-@EqualsAndHashCode(callSuper = true)
-@Data
-@Accessors(chain = true)
-@TableName(value = "goods_specification",autoResultMap = true)
-public class Specification extends MpBaseEntity implements EntityBaseFunction{
-
- /** 规格名称 */
- private String name;
-
- /** 规格类型(文本/列表选择) */
- private String type;
-
- /** 规格值(列表) */
- @TableField(typeHandler= JacksonTypeHandler.class)
- private List options;
-
- /** 状态 */
- private String state;
-
- /** 描述 */
- private String remark;
-
- /** 创建对象 */
- public static Specification init(SpecificationParam in) {
- return SpecificationConvert.CONVERT.convert(in);
- }
-
- /** 转换成dto */
- @Override
- public SpecificationDto toDto() {
- return SpecificationConvert.CONVERT.convert(this);
- }
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/service/BrandService.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/service/BrandService.java
deleted file mode 100644
index 93b5deaf00ec2e413ba5d842810c80d738e82fa7..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/service/BrandService.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package cn.bootx.goods.core.category.service;
-
-import cn.bootx.common.core.exception.DataNotExistException;
-import cn.bootx.common.core.rest.PageResult;
-import cn.bootx.common.core.rest.param.PageParam;
-import cn.bootx.common.core.util.ResultConvertUtil;
-import cn.bootx.common.mybatisplus.util.MpUtil;
-import cn.bootx.goods.core.category.dao.BrandManager;
-import cn.bootx.goods.core.category.entity.Brand;
-import cn.bootx.goods.dto.category.BrandDto;
-import cn.bootx.goods.param.category.BrandParam;
-import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.bean.copier.CopyOptions;
-import lombok.RequiredArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-/**
- * 品牌
- * @author xxm
- * @date 2022-05-09
- */
-@Slf4j
-@Service
-@RequiredArgsConstructor
-public class BrandService {
- private final BrandManager brandManager;
-
- /**
- * 添加
- */
- public BrandDto add(BrandParam param){
- Brand brand = Brand.init(param);
- return brandManager.save(brand).toDto();
- }
-
- /**
- * 修改
- */
- public BrandDto update(BrandParam param){
- Brand brand = brandManager.findById(param.getId()).orElseThrow(DataNotExistException::new);
-
- BeanUtil.copyProperties(param,brand, CopyOptions.create().ignoreNullValue());
- return brandManager.updateById(brand).toDto();
- }
-
- /**
- * 分页
- */
- public PageResult page(PageParam pageParam,BrandParam brandParam){
- return MpUtil.convert2DtoPageResult(brandManager.page(pageParam,brandParam));
- }
-
- /**
- * 获取单条
- */
- public BrandDto findById(Long id){
- return brandManager.findById(id).map(Brand::toDto).orElseThrow(DataNotExistException::new);
- }
-
- /**
- * 获取全部
- */
- public List findAll(){
- return ResultConvertUtil.dtoListConvert(brandManager.findAll());
- }
-
- /**
- * 删除
- */
- public void delete(Long id){
- brandManager.deleteById(id);
- }
-
-}
\ No newline at end of file
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/service/CategoryParameterGroupService.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/service/CategoryParameterGroupService.java
deleted file mode 100644
index af2763e0fd5ca830bcb71626e04f2f2e6f04f41c..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/service/CategoryParameterGroupService.java
+++ /dev/null
@@ -1,90 +0,0 @@
-package cn.bootx.goods.core.category.service;
-
-import cn.bootx.common.core.exception.DataNotExistException;
-import cn.bootx.common.core.rest.PageResult;
-import cn.bootx.common.core.rest.param.PageParam;
-import cn.bootx.common.core.util.ResultConvertUtil;
-import cn.bootx.common.mybatisplus.util.MpUtil;
-import cn.bootx.goods.core.category.dao.CategoryParameterGroupManager;
-import cn.bootx.goods.core.category.entity.CategoryParameterGroup;
-import cn.bootx.goods.dto.category.CategoryParameterGroupDto;
-import cn.bootx.goods.param.category.CategoryParameterGroupParam;
-import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.bean.copier.CopyOptions;
-import lombok.RequiredArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-/**
- * 类目参数组
- * @author xxm
- * @date 2022-05-09
- */
-@Slf4j
-@Service
-@RequiredArgsConstructor
-public class CategoryParameterGroupService {
- private final CategoryParameterGroupManager categoryParameterGroupManager;
-
- /**
- * 添加
- */
- public CategoryParameterGroupDto add(CategoryParameterGroupParam param) {
- CategoryParameterGroup categoryParameterGroup = CategoryParameterGroup.init(param);
- return categoryParameterGroupManager.save(categoryParameterGroup).toDto();
- }
-
- /**
- * 修改
- */
- public CategoryParameterGroupDto update(CategoryParameterGroupParam param) {
- CategoryParameterGroup categoryParameterGroup = categoryParameterGroupManager.findById(param.getId()).orElseThrow(DataNotExistException::new);
- param.setId(null);
- BeanUtil.copyProperties(param, categoryParameterGroup, CopyOptions.create().ignoreNullValue());
- return categoryParameterGroupManager.updateById(categoryParameterGroup).toDto();
- }
-
- /**
- * 分页
- */
- public PageResult page(PageParam pageParam, CategoryParameterGroupParam categoryParameterGroupParam) {
- return MpUtil.convert2DtoPageResult(categoryParameterGroupManager.page(pageParam, categoryParameterGroupParam));
- }
-
- /**
- * 获取单条
- */
- public CategoryParameterGroupDto findById(Long id) {
- return categoryParameterGroupManager.findById(id).map(CategoryParameterGroup::toDto).orElseThrow(DataNotExistException::new);
- }
-
- /**
- * 获取全部
- */
- public List findAll() {
- return ResultConvertUtil.dtoListConvert(categoryParameterGroupManager.findAll());
- }
-
- /**
- * 删除
- */
- public void delete(Long id) {
- categoryParameterGroupManager.deleteById(id);
- }
-
- /**
- * 名称是否存在
- */
- public boolean existsByName(String name, Long categoryId) {
- return categoryParameterGroupManager.existsByName(name,categoryId);
- }
-
- /**
- * 名称是否存在
- */
- public boolean existsByName(String name, Long categoryId, Long id) {
- return categoryParameterGroupManager.existsByName(name,categoryId,id);
- }
-}
\ No newline at end of file
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/service/CategoryParameterService.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/service/CategoryParameterService.java
deleted file mode 100644
index 16301641a85094cf2424a25a0b411ba1d57a39fe..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/service/CategoryParameterService.java
+++ /dev/null
@@ -1,90 +0,0 @@
-package cn.bootx.goods.core.category.service;
-
-import cn.bootx.common.core.exception.DataNotExistException;
-import cn.bootx.common.core.rest.PageResult;
-import cn.bootx.common.core.rest.param.PageParam;
-import cn.bootx.common.core.util.ResultConvertUtil;
-import cn.bootx.common.mybatisplus.util.MpUtil;
-import cn.bootx.goods.core.category.dao.CategoryParameterManager;
-import cn.bootx.goods.core.category.entity.CategoryParameter;
-import cn.bootx.goods.dto.category.CategoryParameterDto;
-import cn.bootx.goods.param.category.CategoryParameterParam;
-import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.bean.copier.CopyOptions;
-import lombok.RequiredArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-/**
- * 类目参数
- * @author xxm
- * @date 2022-05-09
- */
-@Slf4j
-@Service
-@RequiredArgsConstructor
-public class CategoryParameterService {
- private final CategoryParameterManager categoryParameterManager;
-
- /**
- * 添加
- */
- public CategoryParameterDto add(CategoryParameterParam param){
- CategoryParameter categoryParameter = CategoryParameter.init(param);
- return categoryParameterManager.save(categoryParameter).toDto();
- }
-
- /**
- * 修改
- */
- public CategoryParameterDto update(CategoryParameterParam param){
- CategoryParameter categoryParameter = categoryParameterManager.findById(param.getId()).orElseThrow(DataNotExistException::new);
-
- BeanUtil.copyProperties(param,categoryParameter, CopyOptions.create().ignoreNullValue());
- return categoryParameterManager.updateById(categoryParameter).toDto();
- }
-
- /**
- * 分页
- */
- public PageResult page(PageParam pageParam,CategoryParameterParam categoryParameterParam){
- return MpUtil.convert2DtoPageResult(categoryParameterManager.page(pageParam,categoryParameterParam));
- }
-
- /**
- * 获取单条
- */
- public CategoryParameterDto findById(Long id){
- return categoryParameterManager.findById(id).map(CategoryParameter::toDto).orElseThrow(DataNotExistException::new);
- }
-
- /**
- * 获取全部
- */
- public List findAll(){
- return ResultConvertUtil.dtoListConvert(categoryParameterManager.findAll());
- }
-
- /**
- * 删除
- */
- public void delete(Long id){
- categoryParameterManager.deleteById(id);
- }
-
- /**
- * 名称是否存在
- */
- public boolean existsByName(String name, Long groupId) {
- return categoryParameterManager.existsByName(name,groupId);
- }
-
- /**
- * 名称是否存在
- */
- public boolean existsByName(String name, Long groupId, Long id) {
- return categoryParameterManager.existsByName(name,groupId,id);
- }
-}
\ No newline at end of file
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/service/CategoryService.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/service/CategoryService.java
deleted file mode 100644
index 8f506c99c4cae0f5ab2f70b10d9ca5d9bb94873b..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/service/CategoryService.java
+++ /dev/null
@@ -1,181 +0,0 @@
-package cn.bootx.goods.core.category.service;
-
-import cn.bootx.common.core.exception.BizException;
-import cn.bootx.common.core.exception.DataNotExistException;
-import cn.bootx.goods.code.CategoryCode;
-import cn.bootx.goods.core.category.convert.CategoryConvert;
-import cn.bootx.goods.core.category.dao.CategoryBrandManager;
-import cn.bootx.goods.core.category.dao.CategoryManager;
-import cn.bootx.goods.core.category.dao.CategorySpecificationManager;
-import cn.bootx.goods.core.category.entity.Category;
-import cn.bootx.goods.core.category.entity.CategoryBrand;
-import cn.bootx.goods.core.category.entity.CategorySpecification;
-import cn.bootx.goods.core.category.util.CategoryTreeUtil;
-import cn.bootx.goods.dto.category.CategoryDto;
-import cn.bootx.goods.dto.category.CategoryTreeNode;
-import cn.bootx.goods.exception.category.CategoryAlreadyExistedException;
-import cn.bootx.goods.exception.category.CategoryNotExistedException;
-import cn.bootx.goods.param.category.CategoryBrandParam;
-import cn.bootx.goods.param.category.CategoryParam;
-import cn.bootx.goods.param.category.CategorySpecParam;
-import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.bean.copier.CopyOptions;
-import cn.hutool.core.collection.CollUtil;
-import lombok.RequiredArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.Comparator;
-import java.util.List;
-import java.util.Objects;
-import java.util.stream.Collectors;
-
-/**
- * 类目
- * @author xxm
- * @date 2020/11/19
- */
-@Slf4j
-@Service
-@RequiredArgsConstructor
-public class CategoryService {
- private final CategoryManager categoryManager;
- private final CategoryBrandManager categoryBrandManager;
- private final CategorySpecificationManager categorySpecificationManager;
-
- /**
- * 添加新类目
- */
- @Transactional(rollbackFor = Exception.class)
- public void add(CategoryParam param) {
- int level = 1;
- // 不传pid为根类目
- if (Objects.nonNull(param.getPid())){
- Category category = categoryManager.findById(param.getPid()).orElseThrow(() -> new BizException("父类不存在"));
- level = category.getLevel() + 1;
- if (level > CategoryCode.LEVEL_CHILD){
- throw new BizException("类目层级最高为三层");
- }
-
- }
- if (categoryManager.existsName(param.getName())) {
- throw new CategoryAlreadyExistedException();
- }
- Category category = CategoryConvert.CONVERT.convert(param);
- category.setLevel(level);
- categoryManager.save(category);
- }
-
- /**
- * 更新类目基本信息
- */
- @Transactional(rollbackFor = Exception.class)
- public CategoryDto update(CategoryDto param) {
- Category category = categoryManager.findById(param.getId()).orElseThrow(CategoryNotExistedException::new);
- // pid不可以更新
- param.setPid(null);
- BeanUtil.copyProperties(param,category, CopyOptions.create().ignoreNullValue());
- return categoryManager.updateById(category).toDto();
- }
-
- /**
- * 获取所有类目
- */
- public List findAll(){
- return categoryManager.findAll()
- .stream()
- .map(Category::toDto)
- .collect(Collectors.toList());
- }
-
- /**
- * 根据 id 获取相应的类目
- */
- public CategoryDto findById(Long id){
- return categoryManager.findById(id).map(Category::toDto).orElseThrow(DataNotExistException::new);
- }
-
- /**
- * 获取类目树
- */
- public List findTree() {
- List categories = categoryManager.findAll().stream()
- .sorted(Comparator.comparingDouble(Category::getSortNo))
- .collect(Collectors.toList());
- return CategoryTreeUtil.build(categories);
- }
-
- /**
- * 判断类目是否已经存在
- */
- public boolean existsByName(String name) {
- return categoryManager.existsName(name);
- }
-
- /**
- * 判断类目是否已经存在
- */
- public boolean existsByName(String name, Long id) {
- return categoryManager.existsName(name,id);
- }
-
- /**
- * 根据 id 删除相应的类目
- */
- public void delete(Long id){
- // 判断是否还有子类目
- if (categoryManager.existsByChildren(id)){
- throw new BizException("无法删除, 还有子类目");
- }
- categoryManager.deleteById(id);
- }
-
- /**
- * 查询已经绑定的品牌id
- */
- public List findBindBrandIds(Long categoryId){
- return categoryBrandManager.findAllByCategoryId(categoryId).stream()
- .map(CategoryBrand::getBrandId)
- .collect(Collectors.toList());
- }
-
- /**
- * 绑定品牌
- */
- @Transactional(rollbackFor = Exception.class)
- public void bindBrand(CategoryBrandParam param){
- // 先删后增
- categoryBrandManager.deleteByCategoryId(param.getCategoryId());
- if (CollUtil.isNotEmpty(param.getBrandIds())){
- List collect = param.getBrandIds().stream()
- .map(id -> new CategoryBrand().setCategoryId(param.getCategoryId()).setBrandId(id))
- .collect(Collectors.toList());
- categoryBrandManager.saveAll(collect);
- }
- }
-
- /**
- * 查询绑定的规格id集合
- */
- public List findBindSpecIds(Long categoryId){
- return categorySpecificationManager.findAllByCategoryId(categoryId).stream()
- .map(CategorySpecification::getSpecificationId)
- .collect(Collectors.toList());
- }
-
- /**
- * 绑定规格
- */
- @Transactional(rollbackFor = Exception.class)
- public void bindSpec(CategorySpecParam param){
- // 删旧增新
- categorySpecificationManager.deleteByCategoryId(param.getCategoryId());
- if (CollUtil.isNotEmpty(param.getSpecIds())) {
- List collect = param.getSpecIds().stream()
- .map(id -> new CategorySpecification().setCategoryId(param.getCategoryId()).setSpecificationId(id))
- .collect(Collectors.toList());
- categorySpecificationManager.saveAll(collect);
- }
- }
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/service/SpecificationService.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/service/SpecificationService.java
deleted file mode 100644
index f1de6ddaf62eae067184bcac91b1d8986840eb90..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/service/SpecificationService.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package cn.bootx.goods.core.category.service;
-
-import cn.bootx.common.core.exception.DataNotExistException;
-import cn.bootx.common.core.rest.PageResult;
-import cn.bootx.common.core.rest.param.PageParam;
-import cn.bootx.common.core.util.ResultConvertUtil;
-import cn.bootx.common.mybatisplus.util.MpUtil;
-import cn.bootx.goods.core.category.dao.SpecificationManager;
-import cn.bootx.goods.core.category.entity.Specification;
-import cn.bootx.goods.dto.category.SpecificationDto;
-import cn.bootx.goods.param.category.SpecificationParam;
-import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.bean.copier.CopyOptions;
-import lombok.RequiredArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-/**
- * 规格
- * @author xxm
- * @date 2022-05-09
- */
-@Slf4j
-@Service
-@RequiredArgsConstructor
-public class SpecificationService {
- private final SpecificationManager specificationManager;
-
- /**
- * 添加
- */
- public void add(SpecificationParam param){
- Specification specification = Specification.init(param);
- specificationManager.save(specification);
- }
-
- /**
- * 修改
- */
- public SpecificationDto update(SpecificationParam param){
- Specification specification = specificationManager.findById(param.getId()).orElseThrow(DataNotExistException::new);
-
- BeanUtil.copyProperties(param,specification, CopyOptions.create().ignoreNullValue());
- return specificationManager.updateById(specification).toDto();
- }
-
- /**
- * 分页
- */
- public PageResult page(PageParam pageParam,SpecificationParam specificationParam){
- return MpUtil.convert2DtoPageResult(specificationManager.page(pageParam,specificationParam));
- }
-
- /**
- * 获取单条
- */
- public SpecificationDto findById(Long id){
- return specificationManager.findById(id).map(Specification::toDto).orElseThrow(DataNotExistException::new);
- }
-
- /**
- * 获取全部
- */
- public List findAll(){
- return ResultConvertUtil.dtoListConvert(specificationManager.findAll());
- }
-
- /**
- * 删除
- */
- public void delete(Long id){
- specificationManager.deleteById(id);
- }
-
-}
\ No newline at end of file
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/util/CategoryTreeUtil.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/util/CategoryTreeUtil.java
deleted file mode 100644
index 1bbcdd9680c727c015f025ae7aff3f285ce842dd..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/util/CategoryTreeUtil.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package cn.bootx.goods.core.category.util;
-
-
-import cn.bootx.goods.core.category.entity.Category;
-import cn.bootx.goods.dto.category.CategoryTreeNode;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Objects;
-
-/**
-* 类目树构建
-* @author xxm
-* @date 2020/11/20
-*/
-public class CategoryTreeUtil {
-
- /**
- * 构建类目树
- */
- public static List build(List categories) {
- List tree = new ArrayList<>();
- for (Category category : categories) {
- // 顶级类目
- if (Objects.isNull(category.getPid())) {
- CategoryTreeNode treeNode = new CategoryTreeNode(category);
- findChildren(treeNode, categories);
- tree.add(treeNode);
- }
- }
- return tree;
- }
-
- /**
- * 递归查找子节点
- */
- private static void findChildren(CategoryTreeNode treeNode, List categories) {
- for (Category category : categories) {
- if (Objects.equals(treeNode.getId(),category.getPid())) {
- if (treeNode.getChildren() == null) {
- treeNode.setChildren(new ArrayList<>());
- }
- CategoryTreeNode childNode = new CategoryTreeNode(category);
- findChildren(childNode, categories);
- treeNode.getChildren().add(childNode);
- }
- }
- }
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/util/Descartes.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/util/Descartes.java
deleted file mode 100644
index 851cbc5193fa79e0c0272a9b23867fa845a51f58..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/category/util/Descartes.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package cn.bootx.goods.core.category.util;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
-* 未知维度集合的笛卡尔积
-* @author xxm
-* @date 2020/11/21
-*/
-public class Descartes {
- /**
- * 递归实现 dimValue 中的笛卡尔积,结果放在 result 中
- *
- * @param dimValue 原始数据
- * @param result 结果数据
- * @param layer dimValue的层数
- * @param curList 每次笛卡尔积的结果
- */
- public static void recursive(List> dimValue, List> result, int layer, List curList) {
- if (layer < dimValue.size() - 1) {
- if (dimValue.get(layer).size() == 0) {
- recursive(dimValue, result, layer + 1, curList);
- } else {
- for (int i = 0; i < dimValue.get(layer).size(); i++) {
- List list = new ArrayList<>(curList);
- list.add(dimValue.get(layer).get(i));
- recursive(dimValue, result, layer + 1, list);
- }
- }
- } else if (layer == dimValue.size() - 1) {
- if (dimValue.get(layer).size() == 0) {
- result.add(curList);
- } else {
- for (int i = 0; i < dimValue.get(layer).size(); i++) {
- List list = new ArrayList<>(curList);
- list.add(dimValue.get(layer).get(i));
- result.add(list);
- }
- }
- }
- }
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/goods/convert/GoodsConvert.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/goods/convert/GoodsConvert.java
deleted file mode 100644
index bae25a381822891f9e1e4e1f3e6acbdc66fda5f5..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/goods/convert/GoodsConvert.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package cn.bootx.goods.core.goods.convert;
-
-import cn.bootx.goods.core.goods.entity.Goods;
-import cn.bootx.goods.dto.goods.GoodsDto;
-import cn.bootx.goods.param.goods.GoodsParam;
-import org.mapstruct.Mapper;
-import org.mapstruct.Mappings;
-import org.mapstruct.factory.Mappers;
-
-/**
-* 转换
-* @author xxm
-* @date 2021/7/23
-*/
-@Mapper
-public interface GoodsConvert {
- GoodsConvert CONVERT = Mappers.getMapper(GoodsConvert.class);
-
- Goods convert(GoodsParam in);
-
- GoodsDto convert(Goods in);
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/goods/dao/GoodsMapper.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/goods/dao/GoodsMapper.java
deleted file mode 100644
index 759cd72bac08da079f49735d2a7b4a4619e88844..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/goods/dao/GoodsMapper.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package cn.bootx.goods.core.goods.dao;
-
-import cn.bootx.goods.core.goods.entity.Goods;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.apache.ibatis.annotations.Mapper;
-
-import java.util.Collection;
-import java.util.List;
-import java.util.Optional;
-
-/**
-* 商品
-* @author xxm
-* @date 2021/8/10
-*/
-@Mapper
-public interface GoodsMapper extends BaseMapper {
- Optional findByIdAndTid(Long id, Long tid);
-
- List findAllByTid(Long tid);
-
- List findAllByCidAndTid(Long cid, Long tid);
-
- List findAllByIdInAndTid(Collection goodsIds, Long tid);
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/goods/entity/Goods.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/goods/entity/Goods.java
deleted file mode 100644
index 62aa185984b1667a724e364c523773a8afcec185..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/goods/entity/Goods.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package cn.bootx.goods.core.goods.entity;
-
-import cn.bootx.common.core.function.EntityBaseFunction;
-import cn.bootx.common.mybatisplus.base.MpBaseEntity;
-import cn.bootx.goods.core.goods.convert.GoodsConvert;
-import cn.bootx.goods.dto.goods.GoodsDto;
-import cn.bootx.goods.param.goods.GoodsParam;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
-import java.math.BigDecimal;
-
-/**
-* 商品表
-* @author xxm
-* @date 2020/11/19
-*/
-@EqualsAndHashCode(callSuper = true)
-@Data
-@Accessors(chain = true)
-@TableName("goods_goods")
-public class Goods extends MpBaseEntity implements EntityBaseFunction {
-
- /** 所属类目id */
- private Long cid;
-
- /** 所属类目名称 */
- private String cname;
-
- /** 商品名称 */
- private String name;
-
- /** 描述*/
- private String remark;
-
- /** banner图片 多个图片逗号分隔 */
- private String bannerUri;
-
- /** 商品介绍主图 多个图片逗号分隔 */
- private String mainUri;
-
- /** 显示上限价格 */
- private BigDecimal displayUpperPrice;
-
- /** 显示下限价格 */
- private BigDecimal displayLowerPrice;
-
- /** 状态(1:可用,0:不可用) */
- private int state;
-
- public static Goods init(GoodsParam in){
- return GoodsConvert.CONVERT.convert(in);
- }
-
- @Override
- public GoodsDto toDto() {
- return GoodsConvert.CONVERT.convert(this);
- }
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/goods/entity/GoodsGallery.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/goods/entity/GoodsGallery.java
deleted file mode 100644
index b3c92a27fb5b4a67fbc878005df61f80ea18e3a9..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/goods/entity/GoodsGallery.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package cn.bootx.goods.core.goods.entity;
-
-import cn.bootx.common.mybatisplus.base.MpBaseEntity;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
-/**
-* 商品相册
-* @author xxm
-* @date 2022/5/9
-*/
-@EqualsAndHashCode(callSuper = true)
-@Data
-@Accessors(chain = true)
-@TableName("goods_goods_gallery")
-public class GoodsGallery extends MpBaseEntity {
-
- /** 商品id */
- private Long goodsId;
-
- /** 缩略图 */
- private String thumbnail;
-
- /** 小图 */
- private String small;
-
- /** 原图 */
- private String original;
-
- /** 是否主图 */
- private Boolean main;
-
- /** 排序 */
- private Double sortNo;
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/goods/entity/GoodsWords.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/goods/entity/GoodsWords.java
deleted file mode 100644
index 5934e84895c209a473f937f7c33924e3f8969ade..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/goods/entity/GoodsWords.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package cn.bootx.goods.core.goods.entity;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-/**
-* 商品关键字
-* @author xxm
-* @date 2022/5/9
-*/
-@Data
-@Accessors(chain = true)
-@TableName("goods_goods_words")
-public class GoodsWords {
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/goods/service/GoodsService.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/goods/service/GoodsService.java
deleted file mode 100644
index 15815168c6957e5d44afca8e28b4f7f922d8d7f4..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/goods/service/GoodsService.java
+++ /dev/null
@@ -1,82 +0,0 @@
-package cn.bootx.goods.core.goods.service;
-
-import cn.bootx.common.core.exception.DataNotExistException;
-import cn.bootx.common.core.rest.PageResult;
-import cn.bootx.common.core.rest.param.PageParam;
-import cn.bootx.common.core.util.ResultConvertUtil;
-import cn.bootx.common.mybatisplus.util.MpUtil;
-import cn.bootx.goods.core.goods.dao.GoodsManager;
-import cn.bootx.goods.core.goods.entity.Goods;
-import cn.bootx.goods.core.sku.dao.GoodsSkuManager;
-import cn.bootx.goods.dto.goods.GoodsDto;
-import cn.bootx.goods.dto.sku.GoodsSkuDto;
-import cn.bootx.goods.param.goods.GoodsParam;
-import lombok.RequiredArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-import java.util.Objects;
-
-/**
- *
- * @author xxm
- * @date 2020/11/20
- */
-@Slf4j
-@Service
-@RequiredArgsConstructor
-public class GoodsService {
- private final GoodsManager goodsManager;
- private final GoodsSkuManager goodsSkuManager;
-
- /**
- * 新增商品
- */
- public GoodsDto add(GoodsParam goodsParam){
- Goods goods = Goods.init(goodsParam);
- return goodsManager.save(goods).toDto();
- }
-
- /**
- * 查询全部
- */
- public List findAll(){
- return ResultConvertUtil.dtoListConvert(goodsManager.findAll());
- }
-
- /**
- * 分页
- */
- public PageResult page(PageParam param,GoodsParam query){
- return MpUtil.convert2DtoPageResult(goodsManager.page(param,query));
- }
-
- /**
- * 查询商品详情
- */
- public GoodsDto getDetails(Long goodsId){
- GoodsDto goodsDto = goodsManager.findById(goodsId).map(Goods::toDto).orElseThrow(DataNotExistException::new);
- if (Objects.nonNull(goodsDto)){
- // 查询sku
- List goodsSkus = ResultConvertUtil.dtoListConvert(goodsSkuManager.findByGoodsId(goodsId));
- goodsDto.setSkus(goodsSkus);
- }
- return goodsDto;
- }
-
-
- /**
- * 获取商品信息
- */
- public GoodsDto findById(Long goodsId){
- return goodsManager.findById(goodsId).map(Goods::toDto).orElseThrow(DataNotExistException::new);
- }
-
- /**
- * 按照类目查询商品
- */
- public List findByCategory(Long cid){
- return ResultConvertUtil.dtoListConvert(goodsManager.findByCid(cid));
- }
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/inventory/dao/InventoryMapper.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/inventory/dao/InventoryMapper.java
deleted file mode 100644
index 7ad5d3b580a2f62f99c73cc063387ceb8ce3783d..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/inventory/dao/InventoryMapper.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package cn.bootx.goods.core.inventory.dao;
-
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-
-/**
-* 库存操作 数据库
-* @author xxm
-* @date 2020/11/23
-*/
-@Mapper
-public interface InventoryMapper {
-
- /**
- * 锁定库存
- */
- int lockInventory(@Param("id") Long id, @Param("count") int count);
-
- /**
- * 解锁库存
- */
- int unlockInventory(@Param("id") Long id, @Param("count") int count);
-
- /**
- * 减少库存
- */
- int reduceInventory(@Param("id") Long id, @Param("count") int count);
-
- /**
- * 增补指定 SKU 的可售库存, 扣减对应售出
- */
- int increaseInventory(@Param("id") Long id, @Param("count") int count);
-
- /**
- * 增补指定 SKU 的可售库存
- */
- int increaseAvailable(@Param("id") Long id, @Param("count") int count);
-
- /**
- * 扣减指定 SKU 的预占库存并减少总库存
- */
- int reduceLockedAndCapacity(@Param("id") Long id, @Param("count") int count);
-
- /**
- * 扣减指定 SKU 的售出库存并减少总库存
- */
- int reduceSoldAndCapacity(@Param("id") Long id, @Param("count") int count);
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/inventory/dao/InventoryTokenExpiredTimeRepository.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/inventory/dao/InventoryTokenExpiredTimeRepository.java
deleted file mode 100644
index 522b85b67be5be4bff551dcb50056d5377af6444..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/inventory/dao/InventoryTokenExpiredTimeRepository.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package cn.bootx.goods.core.inventory.dao;
-
-import cn.bootx.common.redis.RedisClient;
-import lombok.RequiredArgsConstructor;
-import org.springframework.stereotype.Component;
-
-import java.util.Set;
-
-/**
- * 用于对库存操作 token 过期时间的管理
- * 在 Redis 中每一个 token 对应的键 sku:lock:{skuId}:{token}
- * 都存储在有序集合 sku:lock:expiredtime 里,有序集合的 score 为各 token 的过期时间。
- * @author xxm
- * @date 2020/11/23
- */
-@Component
-@RequiredArgsConstructor
-public class InventoryTokenExpiredTimeRepository {
-
- private static final String KEY = "sku:lock:expiredtime";
-
- private final RedisClient redisClient;
-
- /**
- * 根据 token 存储对应的 ExpiredTokenKey
- */
- public void store(String key, long expiredTime) {
- redisClient.zadd(KEY, key, expiredTime);
- }
-
- /**
- * 获取所有已过期的ExpiredTokenKey
- */
- public Set retrieveExpiredKeys(long deadline) {
- return redisClient.zrangeByScore(KEY, 0L, deadline);
- }
-
- /**
- * 删除指定的ExpiredTokenKey
- */
- public void removeKeys(String... keys) {
- if (keys != null && keys.length > 0) {
- redisClient.zremByMembers(KEY, keys);
- }
- }
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/inventory/dao/InventoryTokenRepository.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/inventory/dao/InventoryTokenRepository.java
deleted file mode 100644
index ae362addbf7620a4475a9e290e5e4e1df2763af8..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/inventory/dao/InventoryTokenRepository.java
+++ /dev/null
@@ -1,126 +0,0 @@
-package cn.bootx.goods.core.inventory.dao;
-
-import cn.bootx.common.redis.RedisClient;
-import cn.hutool.core.collection.CollectionUtil;
-import cn.hutool.core.util.StrUtil;
-import lombok.AllArgsConstructor;
-import lombok.Getter;
-import lombok.RequiredArgsConstructor;
-import org.springframework.stereotype.Component;
-
-import java.util.*;
-import java.util.stream.Collectors;
-
-/**
- * 用于对库存操作 token 的存取管理
- * 在 Redis 中每一个 token 对应一个键为 sku:lock:{skuId}:{token} 的字符串,值为预占库存数。
- * @author xxm
- * @date 2020/11/23
- */
-@Component
-@RequiredArgsConstructor
-public class InventoryTokenRepository {
-
- private static final String SPLITTER = ":";
-
- private static final String KEY_PREFIX = "sku" + SPLITTER + "lock" + SPLITTER;
-
- private final RedisClient redisClient;
-
- /**
- * 根据 token 存储对应的库存数,返回 token 对应的 Redis 键
- */
- public String storeByToken(Long skuId, String token, int count) {
- String key = buildKey(skuId, token);
- redisClient.set(key, String.valueOf(count));
- return key;
- }
-
- /**
- * 根据 token 获取对应的库存数
- */
- public int retrieveByToken(Long skuId, String token) {
- String key = buildKey(skuId, token);
- String value = redisClient.get(key);
- return StrUtil.isEmpty(value) ? 0 : Integer.parseInt(value);
- }
-
- /**
- * 移除 token 相关信息
- */
- public void removeByToken(Long skuId, String token) {
- String key = buildKey(skuId, token);
- redisClient.deleteKey(key);
- }
-
- /**
- * 根据 token 对应的 key 进行处理,对相同 sku 的预占库存数进行合计
- *
- * @return Map,key 为 skuId,value 为(预占库存总数和相关 token 列表)对象
- */
- public Map extractSkuIdCountMap(List keys) {
- Map skuIdCountMap = new HashMap<>(keys.size());
- if (!CollectionUtil.isEmpty(keys)) {
- Set skuIdSet = extractSkuIds(keys);
- // 先批量取回所有 key 的值,值的顺序与 keys 的顺序是一致的
- List countList = redisClient.get(keys);
-
- for (String skuId : skuIdSet) {
- int count = 0;
- List keyList = new ArrayList<>(keys.size());
-
- for (int i = 0; i < keys.size(); i++) {
- String key = keys.get(i);
- if (key.contains(skuId)) {
- String value = countList.get(i);
- count += (value == null ? 0 : Integer.parseInt(value));
- keyList.add(key);
- }
- }
-
- skuIdCountMap.put(skuId, new KeysCountPair(count, keyList));
- }
- }
- return skuIdCountMap;
- }
-
- /**
- * 按键计数对
- */
- @Getter
- @AllArgsConstructor
- public static class KeysCountPair {
- /** 数量 */
- private final int count;
- /** 预占库存key */
- private final List keys;
- }
-
- /**
- * 提取skuIds
- */
- private Set extractSkuIds(Collection keys) {
- return keys.stream().map(this::extractSkuId).collect(Collectors.toSet());
- }
-
- /**
- * 提取SkuId
- */
- private String extractSkuId(String key) {
- return key.split(SPLITTER)[2];
- }
-
- /**
- * 移除指定的 key
- */
- public void removeByKeys(Collection keys) {
- redisClient.deleteKeys(keys);
- }
-
- /**
- * 构建key
- */
- public String buildKey(Long skuId, String token) {
- return KEY_PREFIX + skuId + SPLITTER + token;
- }
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/inventory/handler/PackedInventoryHandler.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/inventory/handler/PackedInventoryHandler.java
deleted file mode 100644
index d146c6e323de0f2847822596fd4b0fef3ddc40dd..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/inventory/handler/PackedInventoryHandler.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package cn.bootx.goods.core.inventory.handler;
-
-/**
-* 被打包商品库存处理器
-* @author xxm
-* @date 2021/2/7
-*/
-@FunctionalInterface
-public interface PackedInventoryHandler {
-
- /**
- * 处理函数
- */
- void handle(Long skuId, int count);
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/inventory/manager/InventoryManager.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/inventory/manager/InventoryManager.java
deleted file mode 100644
index c4e9f760211784cb06a347316799ec037bd67fef..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/inventory/manager/InventoryManager.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package cn.bootx.goods.core.inventory.manager;
-
-import cn.bootx.goods.core.inventory.dao.InventoryMapper;
-import cn.bootx.goods.exception.inventory.InventoryInsufficientException;
-import cn.bootx.goods.exception.inventory.InventoryLockInsufficientException;
-import lombok.RequiredArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Repository;
-import org.springframework.transaction.annotation.Transactional;
-
-/**
-* 库存操作
-* @author xxm
-* @date 2020/11/22
-*/
-@Slf4j
-@Repository
-@RequiredArgsConstructor
-public class InventoryManager {
- private final InventoryMapper inventoryMapper;
-
- /**
- * 锁定库存
- */
- @Transactional(rollbackFor = Exception.class)
- public void lockInventory(Long skuId, int count) {
- int rows = inventoryMapper.lockInventory(skuId, count);
- if (rows < 1) {
- log.warn("库存操作,skuId:"+ skuId + ",库存不足,count:" + count);
- throw new InventoryInsufficientException();
- }
- log.info("库存操作,skuId:"+ skuId + ",正常锁定,count:" + count);
- }
-
- /**
- * 解锁库存
- */
- @Transactional(rollbackFor = Exception.class)
- public void unlockInventory(Long skuId, int count) {
- int rows = inventoryMapper.unlockInventory(skuId, count);
- if (rows < 1) {
- log.warn("库存操作,skuId:"+ skuId + ",解锁库存不足,count:" + count);
- throw new InventoryLockInsufficientException();
- }
- log.info("库存操作,skuId:"+ skuId + ",库存正常解锁,count:" + count);
- }
-
- /**
- * 减少库存
- */
- @Transactional(rollbackFor = Exception.class)
- public void reduceInventory(Long skuId, int count) {
- int rows = inventoryMapper.reduceInventory(skuId, count);
- if (rows < 1) {
- log.warn("库存操作,skuId:"+ skuId + ",库存不足,count:" + count);
- throw new InventoryLockInsufficientException();
- }
- log.info("库存操作,skuId:"+ skuId + ",库存正常扣除,count:" + count);
- }
-
- /**
- * 增补指定 SKU 的可售库存, 扣减对应售出
- */
- @Transactional(rollbackFor = Exception.class)
- public void increaseInventory(Long skuId, int amount) {
- inventoryMapper.increaseInventory(skuId, amount);
- log.info("库存操作,skuId:"+ skuId + ",increaseInventory,count:" + amount);
- }
-
- /**
- * 增补指定 SKU 的可售库存
- */
- @Transactional(rollbackFor = Exception.class)
- public void increaseAvailable(Long skuId, int amount) {
- inventoryMapper.increaseAvailable(skuId, amount);
- log.info("库存操作,skuId:"+ skuId + ",increaseAvailable,count:" + amount);
- }
-
- /**
- * 扣减指定 SKU 的预占库存并减少总库存
- */
- @Transactional(rollbackFor = Exception.class)
- public void reduceLockedAndCapacity(Long skuId, int amount) {
- int rows = inventoryMapper.reduceLockedAndCapacity(skuId, amount);
- if (rows < 1) {
- log.warn("库存操作,skuId:"+ skuId + ",扣减库存总数库存不足,count:" + amount);
- throw new InventoryLockInsufficientException();
- }
- log.info("库存操作,skuId:"+ skuId + ",扣减库存总数正常扣除,count:" + amount);
- }
-
- /**
- * 扣减指定 SKU 的售出库存并减少总库存
- */
- @Transactional(rollbackFor = Exception.class)
- public void reduceSoldAndCapacity(Long skuId, int amount) {
- int rows = inventoryMapper.reduceSoldAndCapacity(skuId, amount);
- if (rows < 1) {
- log.warn("库存操作,skuId:"+ skuId + ",扣减库存总数和sold库存不足,count:" + amount);
- throw new InventoryInsufficientException();
- }
- log.info("库存操作,skuId:"+ skuId + ",扣减库存总数和sold正常扣除,count:" + amount);
- }
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/inventory/manager/InventoryTokenContainer.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/inventory/manager/InventoryTokenContainer.java
deleted file mode 100644
index 39e7ec46ac6e60eb4e662b79973cf435930c2fcc..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/inventory/manager/InventoryTokenContainer.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package cn.bootx.goods.core.inventory.manager;
-
-import cn.bootx.goods.exception.inventory.InventoryLockInsufficientException;
-import cn.hutool.core.util.RandomUtil;
-import lombok.RequiredArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Component;
-
-/**
-* 库存操作 Token 容器
-* @author xxm
-* @date 2020/11/23
-*/
-@Slf4j
-@Component
-@RequiredArgsConstructor
-public class InventoryTokenContainer{
-
- private final InventoryTokenManager manager;
-
- /**
- * 获取锁定库存操作 token
- */
- public String saveAndGetToken(Long skuId,int count) {
- String token = RandomUtil.randomString(6);
- // 锁定并存储过期时间
- manager.storeByToken(skuId, token, count);
- return token;
- }
-
- /**
- * 消耗指定 token 锁定的库存
- */
- public void consumeInventory(Long skuId, int count, String token) {
- int inventory = manager.retrieveByToken(skuId, token);
- // 库存锁定不足异常
- if (inventory < count) {
- throw new InventoryLockInsufficientException();
- }
- int remain = inventory - count;
- if (remain > 0) {
- // 重新设置库存锁定数
- manager.resetByToken(skuId, token, remain);
- } else {
- // 删除库存锁定和过期时间key值
- manager.removeByToken(skuId, token);
- manager.removeExpiredTimeTokenKey(skuId,token);
- }
- }
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/inventory/manager/InventoryTokenManager.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/inventory/manager/InventoryTokenManager.java
deleted file mode 100644
index f4baeeaa0e9f1943f7ea857d44aa79d31f4bd0b3..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/inventory/manager/InventoryTokenManager.java
+++ /dev/null
@@ -1,99 +0,0 @@
-package cn.bootx.goods.core.inventory.manager;
-
-import cn.bootx.goods.code.GoodsCode;
-import cn.bootx.goods.core.inventory.dao.InventoryTokenExpiredTimeRepository;
-import cn.bootx.goods.core.inventory.dao.InventoryTokenRepository;
-import cn.hutool.core.collection.CollUtil;
-import lombok.RequiredArgsConstructor;
-import org.springframework.stereotype.Component;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * 库存操作 Token 管理器
- * @author xxm
- * @date 2020/11/23
- */
-@Component
-@RequiredArgsConstructor
-public class InventoryTokenManager {
-
- private final InventoryTokenRepository tokenRepository;
- private final InventoryTokenExpiredTimeRepository expiredTimeRepository;
-
- /**
- * 通过token存储预占库存数
- */
- public void storeByToken(Long skuId, String token, int count) {
- // 存储预占库存数量
- String key = tokenRepository.storeByToken(skuId, token, count);
- // 过期时间
- long expiredTime = this.calculateExpiredTime();
- expiredTimeRepository.store(key, expiredTime);
- }
-
- /**
- * 通过token检索预占库存数
- */
- public int retrieveByToken(Long skuId, String token) {
- return tokenRepository.retrieveByToken(skuId, token);
- }
-
- /**
- * 通过token重新设置预占库存数
- */
- public void resetByToken(Long skuId, String token, int count) {
- tokenRepository.storeByToken(skuId, token, count);
- }
-
- /**
- * 通过token删除预占库存数
- */
- public void removeByToken(Long skuId, String token) {
- tokenRepository.removeByToken(skuId, token);
- }
-
- /**
- * 计算过期时间
- */
- private long calculateExpiredTime() {
- return System.currentTimeMillis() + GoodsCode.INVENTORY_TOKEN_EXPIRED_TIME;
- }
-
- /**
- * 返回所有已过期的 预占库存数 token
- */
- public Set retrieveExpiredTokenKeys() {
- long deadline = System.currentTimeMillis();
- return expiredTimeRepository.retrieveExpiredKeys(deadline);
- }
-
- /**
- * 根据 token 对应的 key,抽取 skuId,并合计其预占的库存总数,形成 map
- */
- public Map extractSkuIdCountMap(Set keys) {
- return tokenRepository.extractSkuIdCountMap(new ArrayList<>(keys));
- }
-
- /**
- * 通过token删除 预占库存过期时间信息
- */
- public void removeExpiredTimeTokenKey(Long skuId, String token) {
- expiredTimeRepository.removeKeys(tokenRepository.buildKey(skuId,token));
- }
-
- /**
- * 根据 token 删除对应的 预占库存过期时间信息
- */
- public void removeExpiredTokenKeys(Collection keys) {
- if (!CollUtil.isEmpty(keys)) {
- // 删除过期的 key
- tokenRepository.removeByKeys(keys);
- // 删除过期表中的数据
- expiredTimeRepository.removeKeys(keys.toArray(new String[0]));
- }
- }
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/inventory/service/InventoryService.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/inventory/service/InventoryService.java
deleted file mode 100644
index 4f6690ebf5ec35e53f8cefd9c4114ae70ea88284..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/inventory/service/InventoryService.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package cn.bootx.goods.core.inventory.service;
-
-import cn.bootx.goods.core.inventory.manager.InventoryManager;
-import cn.bootx.goods.core.sku.dao.GoodsSkuManager;
-import cn.bootx.goods.core.sku.entity.GoodsSku;
-import cn.bootx.goods.exception.inventory.InventoryNotFoundException;
-import lombok.RequiredArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Service;
-
-/**
- * 库存服务
- * @author xxm
- * @date 2020/11/21
- */
-@Slf4j
-@Service
-@RequiredArgsConstructor
-public class InventoryService {
- private final GoodsSkuManager skuManager;
- private final InventoryManager inventoryManager;
-
- /**
- * 获取指定 SKU 的可用库存
- */
- public Integer getAvailable(Long skuId){
- GoodsSku sku = skuManager.findById(skuId).orElseThrow(InventoryNotFoundException::new);
- return sku.getAvailable();
- }
-
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/inventory/service/OperateInventoryService.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/inventory/service/OperateInventoryService.java
deleted file mode 100644
index 89ead833a425e62cd2b29bd9f6cb31f0acba0b65..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/inventory/service/OperateInventoryService.java
+++ /dev/null
@@ -1,116 +0,0 @@
-package cn.bootx.goods.core.inventory.service;
-
-import cn.bootx.common.core.exception.BizException;
-import cn.bootx.goods.core.inventory.manager.InventoryManager;
-import cn.bootx.goods.core.inventory.manager.InventoryTokenContainer;
-import cn.bootx.goods.core.sku.dao.GoodsSkuManager;
-import cn.bootx.goods.core.sku.entity.GoodsSku;
-import cn.bootx.goods.dto.inventory.LockInventoryDto;
-import cn.bootx.goods.exception.inventory.InventoryNotFoundException;
-import lombok.RequiredArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-/**
- * 库存操作
- * @author xxm
- * @date 2021/2/7
- */
-@Slf4j
-@Service
-@RequiredArgsConstructor
-public class OperateInventoryService {
- private final InventoryTokenContainer tokenContainer;
-
- private final GoodsSkuManager skuManager;
- private final InventoryManager inventoryManager;
-
- /**
- * 预占指定 SKU 的库存,返回授权码,需要在调用释放或扣减库存API时使用
- */
- @Transactional(rollbackFor = Exception.class)
- public LockInventoryDto lockInventory(Long skuId, int count) {
- if (count < 1){
- throw new BizException("要锁定的库存不得小于1");
- }
-
- LockInventoryDto result = new LockInventoryDto();
- result.setCount(count);
- GoodsSku sku = skuManager.findById(skuId).orElseThrow(InventoryNotFoundException::new);
-
- inventoryManager.lockInventory(skuId, count);
-
- result.setStartIndex(sku.getLocked() + sku.getSold() + 1);
- // 记录锁定数和过期时间
- result.setToken(tokenContainer.saveAndGetToken(skuId, count));
- return result;
- }
-
- /**
- * 释放指定的 SKU 的库存,需要使用预占库存时分配的 token
- */
- @Transactional(rollbackFor = Exception.class)
- public void unlockInventory(Long skuId, int count, String token) {
- // 解锁库存
- this.unlockInventoryWithoutToken(skuId, count);
- tokenContainer.consumeInventory(skuId, count, token);
- }
-
- /**
- * 解锁没有令牌的库存
- */
- @Transactional(rollbackFor = Exception.class)
- public void unlockInventoryWithoutToken(Long skuId, int count) {
- skuManager.findById(skuId).orElseThrow(InventoryNotFoundException::new);
- // 自身处理
- inventoryManager.unlockInventory(skuId, count);
- }
-
- /**
- * 扣减指定的 SKU 的库存,需要使用预占库存时分配的 token
- */
- @Transactional(rollbackFor = Exception.class)
- public void reduceInventory(Long skuId, int count, String token) {
- skuManager.findById(skuId).orElseThrow(InventoryNotFoundException::new);
- inventoryManager.reduceInventory(skuId, count);
- tokenContainer.consumeInventory(skuId, count, token);
- }
-
- /**
- * 增补指定 SKU 的可售库存, 扣减对应售出
- */
- @Transactional(rollbackFor = Exception.class)
- public void increaseInventory(Long skuId, int count) {
- skuManager.findById(skuId).orElseThrow(InventoryNotFoundException::new);
- inventoryManager.increaseInventory(skuId, count);
- }
-
- /**
- * 增补指定 SKU 的可售库存
- */
- @Transactional(rollbackFor = Exception.class)
- public void increaseAvailable(Long skuId, int count) {
- skuManager.findById(skuId).orElseThrow(InventoryNotFoundException::new);
- inventoryManager.increaseAvailable(skuId, count);
- }
-
- /**
- * 扣减指定 SKU 的预占库存并减少总库存
- */
- @Transactional(rollbackFor = Exception.class)
- public void reduceLockedAndCapacity(Long skuId, int count, String token) {
- skuManager.findById(skuId).orElseThrow(InventoryNotFoundException::new);
- tokenContainer.consumeInventory(skuId, count, token);
- inventoryManager.reduceLockedAndCapacity(skuId, count);
- }
-
- /**
- * 扣减指定 SKU 的售出库存并减少总库存
- */
- @Transactional(rollbackFor = Exception.class)
- public void reduceSoldAndCapacity(Long skuId, int count) {
- skuManager.findById(skuId).orElseThrow(InventoryNotFoundException::new);
- inventoryManager.reduceSoldAndCapacity(skuId, count);
- }
-}
\ No newline at end of file
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/sku/convert/SkuConvert.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/sku/convert/SkuConvert.java
deleted file mode 100644
index 20b75104691faed9f8291a0054d8e138a5c970e1..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/sku/convert/SkuConvert.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package cn.bootx.goods.core.sku.convert;
-
-import cn.bootx.goods.core.sku.entity.GoodsSku;
-import cn.bootx.goods.dto.sku.GoodsSkuDto;
-import cn.bootx.goods.param.sku.SkuParam;
-import org.mapstruct.Mapper;
-import org.mapstruct.Mappings;
-import org.mapstruct.factory.Mappers;
-
-/**
-* 转换
-* @author xxm
-* @date 2021/7/23
-*/
-@Mapper
-public interface SkuConvert {
- SkuConvert CONVERT = Mappers.getMapper(SkuConvert.class);
-
- GoodsSku convert(SkuParam in);
-
- GoodsSku convert(GoodsSkuDto in);
-
- GoodsSkuDto convert(GoodsSku in);
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/sku/dao/GoodsSkuManager.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/sku/dao/GoodsSkuManager.java
deleted file mode 100644
index 3c325c9e917b6e0703ff9eb115150297745aa4b5..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/sku/dao/GoodsSkuManager.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package cn.bootx.goods.core.sku.dao;
-
-import cn.bootx.common.mybatisplus.impl.BaseManager;
-import cn.bootx.goods.core.sku.entity.GoodsSku;
-import lombok.RequiredArgsConstructor;
-import org.springframework.stereotype.Repository;
-
-import java.util.List;
-
-/**
-* 商品sku
-* @author xxm
-* @date 2020/11/20
-*/
-@Repository
-@RequiredArgsConstructor
-public class GoodsSkuManager extends BaseManager {
-
-
- public List findByGoodsId(Long goodsId) {
- return findAllByField(GoodsSku::getGoodsId,goodsId);
- }
-
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/sku/dao/GoodsSkuMapper.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/sku/dao/GoodsSkuMapper.java
deleted file mode 100644
index b2033b9acacd908d4359ffffc5d5bf040ec02a51..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/sku/dao/GoodsSkuMapper.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package cn.bootx.goods.core.sku.dao;
-
-import cn.bootx.goods.core.sku.entity.GoodsSku;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.apache.ibatis.annotations.Mapper;
-
-/**
-* 商品sku
-* @author xxm
-* @date 2021/8/10
-*/
-@Mapper
-public interface GoodsSkuMapper extends BaseMapper {
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/sku/entity/GoodsSku.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/sku/entity/GoodsSku.java
deleted file mode 100644
index 66c20e466295580794efe77fc97b37cfd5ec1997..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/sku/entity/GoodsSku.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package cn.bootx.goods.core.sku.entity;
-
-import cn.bootx.common.core.function.EntityBaseFunction;
-import cn.bootx.common.mybatisplus.base.MpBaseEntity;
-import cn.bootx.goods.core.sku.convert.SkuConvert;
-import cn.bootx.goods.dto.sku.GoodsSkuDto;
-import cn.bootx.goods.param.sku.SkuParam;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
-import java.math.BigDecimal;
-
-/**
- * 商品 SKU
- * @author xxm
- * @date 2020/11/19
- */
-@EqualsAndHashCode(callSuper = true)
-@Data
-@Accessors(chain = true)
-@TableName("goods_goods_sku")
-public class GoodsSku extends MpBaseEntity implements EntityBaseFunction {
-
- /** 所属类目id */
- private Long cid;
- /** 商品 id */
- private Long goodsId;
- /** 外部编码 */
- private String outNo;
- /** SKU 名称 */
- private String name;
- /** 描述 */
- private String description;
- /** 附加信息 */
- private String addition;
-
- /** 是否无限库存 */
- @TableField("is_unlimited")
- private boolean unlimited;
-
- /** 初始库存 */
- private Integer capacity;
- /** 预占库存 */
- private int locked;
- /** 已用库存 */
- private int sold;
- /** 可用库存 */
- private Integer available;
-
- /** 价格 */
- private BigDecimal price;
-
- /** 状态 */
- private int state;
-
- public static GoodsSku init(GoodsSkuDto in) {
- return SkuConvert.CONVERT.convert(in);
- }
-
- public static GoodsSku init(SkuParam in) {
- return SkuConvert.CONVERT.convert(in);
- }
-
- @Override
- public GoodsSkuDto toDto() {
- return SkuConvert.CONVERT.convert(this);
- }
-
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/sku/service/GoodsSkuService.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/sku/service/GoodsSkuService.java
deleted file mode 100644
index 050dc4e6de2a1229d0f5fb4ea2ed3ae905c1f9f2..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/core/sku/service/GoodsSkuService.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package cn.bootx.goods.core.sku.service;
-
-import cn.bootx.common.core.util.ResultConvertUtil;
-import cn.bootx.goods.core.sku.dao.GoodsSkuManager;
-import cn.bootx.goods.core.sku.entity.GoodsSku;
-import cn.bootx.goods.dto.sku.GoodsSkuDto;
-import cn.bootx.goods.exception.sku.SkuNotFoundException;
-import cn.bootx.goods.param.sku.SkuParam;
-import lombok.RequiredArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-/**
- * sku管理
- * @author xxm
- * @date 2020/11/20
- */
-@Slf4j
-@Service
-@RequiredArgsConstructor
-public class GoodsSkuService {
- private final GoodsSkuManager skuManager;
-
-
- /**
- * 添加sku
- */
- public GoodsSkuDto add(SkuParam skuParam){
- GoodsSku goodsSku = GoodsSku.init(skuParam);
-
- // 无限库存
- if (goodsSku.isUnlimited()){
- goodsSku.setAvailable(999999999)
- .setCapacity(999999999);
- }
- return skuManager.save(goodsSku).toDto();
- }
-
-
- /**
- * 根据 id 获取相应的商品SKU
- */
- public GoodsSkuDto getById(Long id) {
- GoodsSku goodsSku = skuManager.findById(id).orElseThrow(SkuNotFoundException::new);
- return goodsSku.toDto();
- }
-
- /**
- * 根据goodsId查询
- */
- public List findByGoodsId(Long goodsId){
- return ResultConvertUtil.dtoListConvert(skuManager.findByGoodsId(goodsId));
- }
-
- /**
- * 批量查询sku
- */
- public List findBySkuIds(List skuIds){
- return ResultConvertUtil.dtoListConvert(skuManager.findAllByIds(skuIds));
- }
-
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/dto/category/CategoryDto.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/dto/category/CategoryDto.java
deleted file mode 100644
index 6c7eb9ca75df34d3ebc205917556eb9a19397ecd..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/dto/category/CategoryDto.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package cn.bootx.goods.dto.category;
-
-import cn.bootx.common.core.rest.dto.BaseDto;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
-import java.io.Serializable;
-
-/**
-* @author xxm
-* @date 2020/11/19
-*/
-@EqualsAndHashCode(callSuper = true)
-@Data
-@Accessors(chain = true)
-@Schema(title = "类目DTO")
-public class CategoryDto extends BaseDto implements Serializable {
- private static final long serialVersionUID = -6395120064541083702L;
-
- @Schema(description="上级类目id")
- private Long pid;
-
- @Schema(description="类目名称", required = true)
- private String name;
-
- @Schema(description="类目描述")
- private String remark;
-
- @Schema(description="是否启用")
- private Boolean enable;
-
- @Schema(description="排序,默认0")
- private Double sortNo;
-
- @Schema(description= "层级")
- private Integer level;
-
- @Schema(description= " 图标/图片地址")
- private String image;
-
-}
\ No newline at end of file
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/dto/category/CategoryParameterDto.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/dto/category/CategoryParameterDto.java
deleted file mode 100644
index f8be6d9b52b210dfe7dd6e5b2bf1f39b332e2735..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/dto/category/CategoryParameterDto.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package cn.bootx.goods.dto.category;
-
-import cn.bootx.common.core.rest.dto.BaseDto;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * 类目参数
- * @author xxm
- * @date 2022-05-09
- */
-@EqualsAndHashCode(callSuper = true)
-@Data
-@Schema(title = "类目参数")
-@Accessors(chain = true)
-public class CategoryParameterDto extends BaseDto {
-
- @Schema(description = "品牌名称")
- private String name;
- @Schema(description = "类型")
- private String type;
- @Schema(description = "选择值(列表)")
- private List options = new ArrayList<>();
- @Schema(description = "是否必填")
- private Boolean required;
- @Schema(description = "排序")
- private Double sortNo;
- @Schema(description = "参数组id")
- private Long groupId;
- @Schema(description = "类目id")
- private Long categoryId;
- @Schema(description = "描述")
- private String remark;
-
-}
\ No newline at end of file
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/dto/category/CategoryParameterGroupDto.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/dto/category/CategoryParameterGroupDto.java
deleted file mode 100644
index 8701c87698d7b9536d89d2f40c34c93f2c632ec5..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/dto/category/CategoryParameterGroupDto.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package cn.bootx.goods.dto.category;
-
-import cn.bootx.common.core.rest.dto.BaseDto;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
-/**
- * 类目参数组
- * @author xxm
- * @date 2022-05-09
- */
-@EqualsAndHashCode(callSuper = true)
-@Data
-@Schema(title = "类目参数组")
-@Accessors(chain = true)
-public class CategoryParameterGroupDto extends BaseDto {
-
- @Schema(description = "参数组名称")
- private String name;
- @Schema(description = "排序")
- private Double sortNo;
- @Schema(description = "类目id")
- private Long categoryId;
- @Schema(description = "描述")
- private String remark;
-
-}
\ No newline at end of file
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/dto/category/CategoryTreeNode.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/dto/category/CategoryTreeNode.java
deleted file mode 100644
index c45cc44c186ddb584495b65fdd822854ad617e97..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/dto/category/CategoryTreeNode.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package cn.bootx.goods.dto.category;
-
-import cn.bootx.goods.core.category.entity.Category;
-import cn.hutool.core.bean.BeanUtil;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-import lombok.experimental.Accessors;
-
-import java.io.Serializable;
-import java.util.List;
-
-/**
-* 类目树节点
-* @author xxm
-* @date 2020/11/20
-*/
-@Data
-@Accessors(chain = true)
-@Schema(title = "类目树节点")
-@NoArgsConstructor
-public class CategoryTreeNode implements Serializable {
-
- private static final long serialVersionUID = -1587023420309803676L;
-
- @Schema(description="主键")
- private Long id;
-
- @Schema(description="类目名称")
- private String name;
-
- @Schema(description="类目描述")
- private String remark;
-
- @Schema(description="排序,默认0")
- private Double sortNo;
-
- @Schema(description="是否启用")
- private Boolean enable;
-
- @Schema(description= "层级")
- private Integer level;
-
- @Schema(description= " 图标/图片地址")
- private String image;
-
- @Schema(description="子节点列表")
- private List children;
-
- public CategoryTreeNode(Category category) {
- BeanUtil.copyProperties(category,this);
- }
-}
\ No newline at end of file
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/dto/category/SpecificationDto.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/dto/category/SpecificationDto.java
deleted file mode 100644
index f6f75c41dfa84a29a4e0300b58d1c81d4e1df16b..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/dto/category/SpecificationDto.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package cn.bootx.goods.dto.category;
-
-import cn.bootx.common.core.rest.dto.BaseDto;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * 规格
- * @author xxm
- * @date 2022-05-09
- */
-@EqualsAndHashCode(callSuper = true)
-@Data
-@Schema(title = "规格")
-@Accessors(chain = true)
-public class SpecificationDto extends BaseDto {
-
- @Schema(description = "规格名称")
- private String name;
- @Schema(description = "类型")
- private String type;
- @Schema(description = "列表选择值")
- private List options = new ArrayList<>();
- @Schema(description = "状态")
- private String state;
- @Schema(description = "描述")
- private String remark;
-
-}
\ No newline at end of file
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/dto/goods/GoodsDto.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/dto/goods/GoodsDto.java
deleted file mode 100644
index 178f5925e3626e699f737bfdd9576cd916291140..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/dto/goods/GoodsDto.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package cn.bootx.goods.dto.goods;
-
-import cn.bootx.common.core.rest.dto.BaseDto;
-import cn.bootx.goods.dto.sku.GoodsSkuDto;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
-import java.io.Serializable;
-import java.util.List;
-
-/**
-* @author xxm
-* @date 2020/11/20
-*/
-@EqualsAndHashCode(callSuper = true)
-@Data
-@Accessors(chain = true)
-@Schema(title = "商品DTO")
-public class GoodsDto extends BaseDto implements Serializable {
- private static final long serialVersionUID = 9191023721658520976L;
-
- @Schema(description= "所属类目id", required = true)
- private Long cid;
-
- @Schema(description= "所属类目名称(前端展示使用)")
- private String cname;
-
- @Schema(description= "商品名称", required = true)
- private String name;
-
- @Schema(description= "商品描述")
- private String remark;
-
- /** banner图片 多个图片逗号分隔 */
- private String bannerUri;
-
- /** 商品介绍主图 多个图片逗号分隔 */
- private String mainUri;
-
- @Schema(description= "附加信息")
- private String addition;
-
- @Schema(description= "状态(1:可用,0:不可用)")
- private int state;
-
- @Schema(description= "关联sku")
- private List skus;
-
-}
\ No newline at end of file
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/dto/inventory/LockInventoryDto.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/dto/inventory/LockInventoryDto.java
deleted file mode 100644
index 637d84942dce97d4f3b425cba088889c188fb2fb..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/dto/inventory/LockInventoryDto.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package cn.bootx.goods.dto.inventory;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import java.io.Serializable;
-
-/**
-* @author xxm
-* @date 2020/11/21
-*/
-@Data
-@Accessors(chain = true)
-@Schema(title = "库存锁定")
-public class LockInventoryDto implements Serializable {
- private static final long serialVersionUID = 7373301471799658911L;
- @Schema(description= "锁库存token")
- private String token;
-
- @Schema(description= "锁定库存的起始顺序号")
- private Integer startIndex;
-
- @Schema(description= "锁定总数")
- private Integer count;
-
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/dto/sku/GoodsSkuDto.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/dto/sku/GoodsSkuDto.java
deleted file mode 100644
index d59c87f7af3d5ade4b19558b4c179ade36bd0e85..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/dto/sku/GoodsSkuDto.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package cn.bootx.goods.dto.sku;
-
-import cn.bootx.common.core.rest.dto.BaseDto;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-
-/**
-* 商品SKU
-* @author xxm
-* @date 2020/11/19
-*/
-@EqualsAndHashCode(callSuper = true)
-@Data
-@Accessors(chain = true)
-@Schema(title = "商品SKU DTO")
-public class GoodsSkuDto extends BaseDto implements Serializable {
- private static final long serialVersionUID = 9214661437061650242L;
-
- @Schema(description= "主键")
- private Long id;
- @Schema(description= "所属类目id")
- private Long cid;
- @Schema(description= "所属商品id")
- private Long goodsId;
- @Schema(description= "SKU名称", required = true)
- private String name;
- @Schema(description= "SKU描述")
- private String description;
- @Schema(description= "附加信息")
- private String addition;
-
- @Schema(description= "无限库存")
- private boolean unlimited;
- @Schema(description= "库存总量")
- private Integer capacity;
- @Schema(description= "预占库存")
- private int locked;
- @Schema(description= "已用库存")
- private int sold;
- @Schema(description= "可用库存")
- private Integer available;
-
- @Schema(description= "售价")
- private BigDecimal price;
- @Schema(description= "状态")
- private int state;
-}
\ No newline at end of file
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/exception/category/CategoryAlreadyExistedException.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/exception/category/CategoryAlreadyExistedException.java
deleted file mode 100644
index 78985b242b0382cf2f15373bc3f7ec3435740821..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/exception/category/CategoryAlreadyExistedException.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package cn.bootx.goods.exception.category;
-
-
-import cn.bootx.common.core.exception.BizException;
-
-import static cn.bootx.goods.code.GoodsErrorCode.CATEGORY_ALREADY_EXISTED;
-
-/**
-* 已存在异常
-* @author xxm
-* @date 2020/11/20
-*/
-public class CategoryAlreadyExistedException extends BizException {
- public CategoryAlreadyExistedException() {
- super(CATEGORY_ALREADY_EXISTED, "类别已经存在");
- }
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/exception/category/CategoryAttrDefAlreadyExistedException.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/exception/category/CategoryAttrDefAlreadyExistedException.java
deleted file mode 100644
index ad1434d8c6e2f1580c063881d578522dcc28e634..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/exception/category/CategoryAttrDefAlreadyExistedException.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package cn.bootx.goods.exception.category;
-
-
-import cn.bootx.common.core.exception.BizException;
-
-import java.io.Serializable;
-
-import static cn.bootx.goods.code.GoodsErrorCode.CATEGORY_ATTR_DEF_ALREADY_EXISTED;
-
-/**
-* 类别属性定义已存在
-* @author xxm
-* @date 2020/11/22
-*/
-public class CategoryAttrDefAlreadyExistedException extends BizException implements Serializable {
- public CategoryAttrDefAlreadyExistedException() {
- super(CATEGORY_ATTR_DEF_ALREADY_EXISTED, "类别属性定义已存在");
- }
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/exception/category/CategoryNotExistedException.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/exception/category/CategoryNotExistedException.java
deleted file mode 100644
index 9d549127ed0eb27c960cff02d72c0e07ca1da9dc..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/exception/category/CategoryNotExistedException.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package cn.bootx.goods.exception.category;
-
-
-import cn.bootx.common.core.exception.BizException;
-
-import java.io.Serializable;
-
-import static cn.bootx.goods.code.GoodsErrorCode.CATEGORY_NOT_EXISTED;
-
-/**
-* Category 不存在异常
-* @author xxm
-* @date 2020/11/20
-*/
-public class CategoryNotExistedException extends BizException implements Serializable {
- public CategoryNotExistedException() {
- super(CATEGORY_NOT_EXISTED, "类目不存在");
- }
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/exception/goods/GoodsAlreadyExistedException.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/exception/goods/GoodsAlreadyExistedException.java
deleted file mode 100644
index bc395478f9da8e533f239003b4e3393b5e91b0b2..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/exception/goods/GoodsAlreadyExistedException.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package cn.bootx.goods.exception.goods;
-
-
-import cn.bootx.common.core.exception.BizException;
-
-import static cn.bootx.goods.code.GoodsErrorCode.GOODS_ALREADY_EXISTED;
-
-/**
-* 商品已存在异常
-* @author xxm
-* @date 2020/11/20
-*/
-public class GoodsAlreadyExistedException extends BizException {
- public GoodsAlreadyExistedException() {
- super(GOODS_ALREADY_EXISTED, "商品已经存在");
- }
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/exception/goods/GoodsNotOnException.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/exception/goods/GoodsNotOnException.java
deleted file mode 100644
index 98473f6c7e1811ff6a909985ff14b006cb92f4ec..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/exception/goods/GoodsNotOnException.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package cn.bootx.goods.exception.goods;
-
-import cn.bootx.common.core.exception.BizException;
-
-import static cn.bootx.goods.code.GoodsErrorCode.GOODS_NOT_EXISTED;
-
-/**
-*
-* @author xxm
-* @date 2020/12/10
-*/
-public class GoodsNotOnException extends BizException {
- public GoodsNotOnException() {
- super(GOODS_NOT_EXISTED, "商品不存在");
- }
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/exception/inventory/InventoryInsufficientException.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/exception/inventory/InventoryInsufficientException.java
deleted file mode 100644
index 4ed567c2988228de19d181c2205adbb55d282823..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/exception/inventory/InventoryInsufficientException.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package cn.bootx.goods.exception.inventory;
-
-
-import cn.bootx.common.core.exception.BizException;
-
-import static cn.bootx.goods.code.GoodsErrorCode.INVENTORY_INSUFFICIENT;
-
-/**
-* 库存不足异常
-* @author xxm
-* @date 2020/11/23
-*/
-public class InventoryInsufficientException extends BizException {
- public InventoryInsufficientException() {
- super(INVENTORY_INSUFFICIENT, "库存不足异常");
- }
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/exception/inventory/InventoryLockInsufficientException.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/exception/inventory/InventoryLockInsufficientException.java
deleted file mode 100644
index 6d85f212d79483d258894b3ab6eee2ddd1924b48..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/exception/inventory/InventoryLockInsufficientException.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package cn.bootx.goods.exception.inventory;
-
-import cn.bootx.common.core.exception.BizException;
-
-import static cn.bootx.goods.code.GoodsErrorCode.INVENTORY_LOCK_INSUFFICIENT;
-
-
-/**
-* 预占的库存不足异常
-* @author xxm
-* @date 2020/11/23
-*/
-public class InventoryLockInsufficientException extends BizException {
- public InventoryLockInsufficientException() {
- super(INVENTORY_LOCK_INSUFFICIENT, "预占的库存不足异常");
- }
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/exception/inventory/InventoryNotFoundException.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/exception/inventory/InventoryNotFoundException.java
deleted file mode 100644
index 36fa0af55c372c48e4fa91998da49969770cc6af..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/exception/inventory/InventoryNotFoundException.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package cn.bootx.goods.exception.inventory;
-
-
-import cn.bootx.common.core.exception.BizException;
-
-import static cn.bootx.goods.code.GoodsErrorCode.INVENTORY_NOT_FOUND;
-
-
-/**
-* 库存未找到异常
-* @author xxm
-* @date 2020/11/22
-*/
-public class InventoryNotFoundException extends BizException {
- public InventoryNotFoundException() {
- super(INVENTORY_NOT_FOUND, "找不到库存");
- }
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/exception/inventory/TokenOutOfDateException.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/exception/inventory/TokenOutOfDateException.java
deleted file mode 100644
index d9dcf58b173125b9e097595b736359559eaa4927..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/exception/inventory/TokenOutOfDateException.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package cn.bootx.goods.exception.inventory;
-
-import cn.bootx.common.core.exception.BizException;
-
-import static cn.bootx.goods.code.GoodsErrorCode.TOKEN_OUT_OF_DADE;
-
-/**
-* 库存Token已过期
-* @author xxm
-* @date 2020/11/23
-*/
-public class TokenOutOfDateException extends BizException {
- public TokenOutOfDateException() {
- super(TOKEN_OUT_OF_DADE, "库存Token已过期");
- }
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/exception/sku/SkuAlreadyOffException.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/exception/sku/SkuAlreadyOffException.java
deleted file mode 100644
index fd4afcd7af375ebf95852703dae4537ed1cee474..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/exception/sku/SkuAlreadyOffException.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package cn.bootx.goods.exception.sku;
-
-
-import cn.bootx.common.core.exception.BizException;
-
-import static cn.bootx.goods.code.GoodsErrorCode.GOODS_SKU_ALREADY_OFF;
-
-/**
-* 商品 SKU 已下架异常
-* @author xxm
-* @date 2020/11/24
-*/
-public class SkuAlreadyOffException extends BizException {
- public SkuAlreadyOffException() {
- super(GOODS_SKU_ALREADY_OFF, "商品 SKU 已下架异常");
- }
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/exception/sku/SkuNotFoundException.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/exception/sku/SkuNotFoundException.java
deleted file mode 100644
index 74cf2d3c825bfcdcaa66ddfde96f63b559cad5ed..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/exception/sku/SkuNotFoundException.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package cn.bootx.goods.exception.sku;
-
-
-import cn.bootx.common.core.exception.BizException;
-
-import static cn.bootx.goods.code.GoodsErrorCode.GOODS_SKU_NOT_EXISTED;
-
-/**
-* sku不存在
-* @author xxm
-* @date 2020/12/10
-*/
-public class SkuNotFoundException extends BizException {
- public SkuNotFoundException() {
- super(GOODS_SKU_NOT_EXISTED, "商品SKU不存在");
- }
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/exception/sku/SkuNotOnException.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/exception/sku/SkuNotOnException.java
deleted file mode 100644
index b47211bcc25d726911775ea1a983874633c08cee..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/exception/sku/SkuNotOnException.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package cn.bootx.goods.exception.sku;
-
-
-import cn.bootx.common.core.exception.BizException;
-
-import static cn.bootx.goods.code.GoodsErrorCode.GOODS_SKU_NOT_ON;
-
-/**
-* 商品 SKU 尚未开售异常
-* @author xxm
-* @date 2020/11/24
-*/
-public class SkuNotOnException extends BizException {
- public SkuNotOnException() {
- super(GOODS_SKU_NOT_ON, "商品 SKU 尚未开售异常");
- }
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/mq/InventoryExpiredListener.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/mq/InventoryExpiredListener.java
deleted file mode 100644
index c19c9607e84852b787095ce81c9a8b414ea83bff..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/mq/InventoryExpiredListener.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package cn.bootx.goods.mq;
-
-import cn.bootx.common.redis.listener.RedisKeyExpiredListener;
-import lombok.RequiredArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Component;
-
-/**
- * 库存解锁事件
- * @author xxm
- * @date 2022/5/9
- */
-@Slf4j
-@Component
-@RequiredArgsConstructor
-public class InventoryExpiredListener implements RedisKeyExpiredListener {
-
- @Override
- public String getPrefixKey() {
- return "inventory:lock";
- }
-
- @Override
- public void onMessage(String key) {
- log.info("过期key: "+key);
- }
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/param/category/CategoryBrandParam.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/param/category/CategoryBrandParam.java
deleted file mode 100644
index cf8fdc9ed2b9bd8a6438fb97898481e650811d61..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/param/category/CategoryBrandParam.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package cn.bootx.goods.param.category;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import javax.validation.constraints.NotNull;
-import java.util.List;
-
-/**
-* 类目绑定品牌参数
-* @author xxm
-* @date 2022/5/13
-*/
-@Data
-@Accessors(chain = true)
-@Schema(title = "类目绑定品牌参数")
-public class CategoryBrandParam {
-
- @NotNull
- @Schema(description = "类目id")
- private Long categoryId;
-
- @Schema(description = "品牌ids")
- private List brandIds;
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/param/category/CategoryParam.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/param/category/CategoryParam.java
deleted file mode 100644
index 6927109ec72f685b8ab497280d0769fdc63ef05d..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/param/category/CategoryParam.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package cn.bootx.goods.param.category;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import java.io.Serializable;
-
-/**
-* @author xxm
-* @date 2020/11/19
-*/
-@Data
-@Accessors(chain = true)
-@Schema(title = "类目")
-public class CategoryParam implements Serializable {
-
- private static final long serialVersionUID = 88503981680088056L;
-
- @Schema(description="主键")
- private Long id;
-
- @Schema(description="上级类目id")
- private Long pid;
-
- @Schema(description="类目名称", required = true)
- private String name;
-
- @Schema(description="类目描述")
- private String remark;
-
- @Schema(description="是否启用")
- private Boolean enable;
-
- @Schema(description="排序,默认0")
- private Double sortNo;
-
- @Schema(description= " 图标/图片地址")
- private String image;
-
-}
\ No newline at end of file
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/param/category/CategoryParameterGroupParam.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/param/category/CategoryParameterGroupParam.java
deleted file mode 100644
index 21ac2db1c556647a51a50b559e8ada88b403ca51..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/param/category/CategoryParameterGroupParam.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package cn.bootx.goods.param.category;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import javax.validation.constraints.NotEmpty;
-import javax.validation.constraints.NotNull;
-
-/**
- * 类目参数组
- * @author xxm
- * @date 2022-05-09
- */
-@Data
-@Schema(title = "类目参数组")
-@Accessors(chain = true)
-public class CategoryParameterGroupParam {
-
- @Schema(description= "主键")
- private Long id;
- @NotEmpty
- @Schema(description = "参数组名称")
- private String name;
- @Schema(description = "排序")
- private Double sortNo;
- @NotNull
- @Schema(description = "类目id")
- private Long categoryId;
- @Schema(description = "描述")
- private String remark;
-
-}
\ No newline at end of file
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/param/category/CategoryParameterParam.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/param/category/CategoryParameterParam.java
deleted file mode 100644
index 74612a99bc503130921df8a2f93574d5cc7b1149..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/param/category/CategoryParameterParam.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package cn.bootx.goods.param.category;
-
-import cn.bootx.common.core.validation.ValidationGroup;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import javax.validation.constraints.NotEmpty;
-import javax.validation.constraints.NotNull;
-import java.util.List;
-
-/**
- * 类目参数
- * @author xxm
- * @date 2022-05-09
- */
-@Data
-@Schema(title = "类目参数")
-@Accessors(chain = true)
-public class CategoryParameterParam {
-
- @NotNull(groups = ValidationGroup.edit.class)
- @Schema(description= "主键")
- private Long id;
- @NotNull(groups = ValidationGroup.add.class)
- @Schema(description = "参数名称")
- private String name;
- @NotEmpty
- @Schema(description = "手动输入or列表选择")
- private String type;
- @Schema(description = "选择值(列表)")
- private List options;
- @Schema(description = "是否必填")
- private Boolean required;
- @Schema(description = "排序")
- private Double sortNo;
- @NotNull
- @Schema(description = "参数组id")
- private Long groupId;
- @NotNull
- @Schema(description = "类目id")
- private Long categoryId;
- @Schema(description = "描述")
- private String remark;
-
-}
\ No newline at end of file
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/param/category/CategorySpecParam.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/param/category/CategorySpecParam.java
deleted file mode 100644
index abdade1220d48b473b4e734cebddfc5cdbc8f927..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/param/category/CategorySpecParam.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package cn.bootx.goods.param.category;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import javax.validation.constraints.NotNull;
-import java.util.List;
-
-/**
-* @author xxm
-* @date 2022/5/13
-*/
-@Data
-@Accessors(chain = true)
-@Schema(title = "类目规格绑定")
-public class CategorySpecParam {
- @NotNull
- @Schema(description = "类目id")
- private Long categoryId;
-
- @Schema(description = "品牌ids")
- private List specIds;
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/param/goods/GoodsParam.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/param/goods/GoodsParam.java
deleted file mode 100644
index 72810aab50434bd2e3e57ffff38edb801e34f1a1..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/param/goods/GoodsParam.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package cn.bootx.goods.param.goods;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import java.io.Serializable;
-
-/**
-* @author xxm
-* @date 2021/2/2
-*/
-@Data
-@Accessors(chain = true)
-@Schema(title = "商品创建参数")
-public class GoodsParam implements Serializable {
- private static final long serialVersionUID = -8666559882709167480L;
-
- @Schema(description= "主键")
- private Long id;
-
- @Schema(description= "所属类目id", required = true)
- private Long cid;
-
- @Schema(description= "所属类目名称(前端展示使用)")
- private String cname;
-
- @Schema(description= "商品名称", required = true)
- private String name;
-
- @Schema(description= "商品描述")
- private String remark;
-
- @Schema(description= "附加信息")
- private String addition;
-
- @Schema(description= "价格表类型id")
- private Long priceTypeId;
-
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/param/inventory/ReduceInventoryParam.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/param/inventory/ReduceInventoryParam.java
deleted file mode 100644
index 9ff653ec7c23cdbeb05116f07b79c1f594b01a1a..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/param/inventory/ReduceInventoryParam.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package cn.bootx.goods.param.inventory;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-/**
-* @author xxm
-* @date 2021/4/29
-*/
-@Data
-@Accessors(chain = true)
-@Schema(title = "减少SKU库存参数")
-public class ReduceInventoryParam {
-
- @Schema(description= "skuID")
- private Long skuId;
-
- @Schema(description= "数量")
- private int count;
-
- @Schema(description= "token")
- private String token;
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/param/inventory/UnlockInventoryParam.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/param/inventory/UnlockInventoryParam.java
deleted file mode 100644
index 110ad369da568577001abe3b4a31f8929558f83a..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/param/inventory/UnlockInventoryParam.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package cn.bootx.goods.param.inventory;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-/**
-* @author xxm
-* @date 2021/4/22
-*/
-@Data
-@Accessors(chain = true)
-@Schema(title = "释放SKU库存参数")
-public class UnlockInventoryParam {
-
- @Schema(description= "skuID")
- private Long skuId;
-
- @Schema(description= "数量")
- private int count;
-
- @Schema(description= "token")
- private String token;
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/param/sku/SkuParam.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/param/sku/SkuParam.java
deleted file mode 100644
index 14dbbb0f57edede61dade1fd2a1ecb7720ec3fc4..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/param/sku/SkuParam.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package cn.bootx.goods.param.sku;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-
-/**
-* @author xxm
-* @date 2021/7/23
-*/
-@Data
-@Accessors(chain = true)
-@Schema(title = "sku添加")
-public class SkuParam implements Serializable {
- private static final long serialVersionUID = -8038996282288514501L;
-
- @Schema(description= "主键")
- private Long id;
-
- @Schema(description= "所属类目id")
- private Long cid;
-
- @Schema(description= "外部编码")
- private String outNo;
-
- @Schema(description= "所属商品id")
- private Long goodsId;
-
- @Schema(description= "SKU名称")
- private String name;
-
- @Schema(description= "SKU描述")
- private String description;
-
- @Schema(description= "附加信息")
- private String addition;
-
- @Schema(description= "是否打包品")
- private boolean packing;
-
- @Schema(description= "是否无限库存")
- private boolean unlimited;
-
- @Schema(description= "初始库存")
- private Integer capacity;
-
- @Schema(description= "售价")
- private BigDecimal price;
-
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/task/InventoryTask.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/task/InventoryTask.java
deleted file mode 100644
index 0eb917c5791843631577526070e66e24366d0c71..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/task/InventoryTask.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package cn.bootx.goods.task;
-
-import lombok.RequiredArgsConstructor;
-import org.quartz.Job;
-import org.quartz.JobExecutionContext;
-import org.springframework.stereotype.Component;
-
-/**
-* 库存定时任务
-* @author xxm
-* @date 2021/4/16
-*/
-@Component
-@RequiredArgsConstructor
-public class InventoryTask implements Job {
- private final InventoryTaskService inventoryTaskService;
-
- @Override
- public void execute(JobExecutionContext context) {
- inventoryTaskService.expireTokens();
- }
-}
diff --git a/bootx-services/service-goods/src/main/java/cn/bootx/goods/task/InventoryTaskService.java b/bootx-services/service-goods/src/main/java/cn/bootx/goods/task/InventoryTaskService.java
deleted file mode 100644
index 56bbfc07bb9d9be0956bd8cc11542eafa75e6d95..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/java/cn/bootx/goods/task/InventoryTaskService.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package cn.bootx.goods.task;
-
-import cn.bootx.goods.core.inventory.dao.InventoryTokenRepository;
-import cn.bootx.goods.core.inventory.manager.InventoryTokenManager;
-import cn.bootx.goods.core.inventory.service.OperateInventoryService;
-import cn.bootx.goods.exception.inventory.InventoryLockInsufficientException;
-import cn.hutool.core.collection.CollUtil;
-import cn.hutool.core.map.MapUtil;
-import lombok.RequiredArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * 库存任务 token 过期处理服务
- * @author xxm
- * @date 2021/2/12
- */
-@Slf4j
-@Service
-@RequiredArgsConstructor
-public class InventoryTaskService {
-
- private final OperateInventoryService inventoryService;
- private final InventoryTokenManager tokenManager;
-
- /**
- * 释放过期
- */
- public void expireTokens(){
- // 1,获取所有过期的 token 对应的 key
- Set keys = tokenManager.retrieveExpiredTokenKeys();
- if (!CollUtil.isEmpty(keys)) {
- // 2,获取过期 key 预占的 sku 库存数
- Map skuIdCountMap = tokenManager.extractSkuIdCountMap(keys);
- if (!MapUtil.isEmpty(skuIdCountMap)) {
- Set skuIdSet = skuIdCountMap.keySet();
- // 3,释放 sku 的库存
- for (String skuId : skuIdSet) {
- int count = skuIdCountMap.get(skuId).getCount();
- List keyList = skuIdCountMap.get(skuId).getKeys();
- log.info("到期Tokens解锁 skuId={} 数量= {}",skuId, count);
- try {
- if (count > 0) {
- inventoryService.unlockInventoryWithoutToken(Long.parseLong(skuId), count);
- }
- // 4,移除过期的 token 对应的 key
- tokenManager.removeExpiredTokenKeys(keyList);
- } catch (InventoryLockInsufficientException ex) {
- log.error("过期 skuId 或 打包SkuId:=" + skuId + " " + ex.getMessage(), ex);
- }
- }
- }
- }
- }
-}
diff --git a/bootx-services/service-goods/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-services/service-goods/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
deleted file mode 100644
index 8729b696402313fed9ee5af5fc849da856bdd55c..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
+++ /dev/null
@@ -1 +0,0 @@
-cn.bootx.goods.GoodsApplication
\ No newline at end of file
diff --git a/bootx-services/service-goods/src/main/resources/mapper/inventory/InventoryMapper.xml b/bootx-services/service-goods/src/main/resources/mapper/inventory/InventoryMapper.xml
deleted file mode 100644
index 7ce1c0cad5f8a023cdec211fb5b85d153980ccfd..0000000000000000000000000000000000000000
--- a/bootx-services/service-goods/src/main/resources/mapper/inventory/InventoryMapper.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-
-
-
-
-
-
- update goods_goods_sku
- set available = (available - #{count}),
- locked = (locked + #{count}),
- version = (version + 1)
- where id = #{id} and (available - #{count}) >= 0
-
-
-
- update goods_goods_sku
- set available = (available + #{count}),
- locked = (locked - #{count}),
- version = (version + 1)
- where id = #{id} and (locked - #{count}) >= 0
-
-
-
- update goods_goods_sku
- set locked = (locked - #{count}),
- sold = (sold + #{count}),
- version = (version + 1)
- where id = #{id} and (locked - #{count}) >= 0
-
-
-
- update goods_goods_sku
- set available = (available + #{count}),
- sold = (sold - #{count}),
- version = (version + 1)
- where id = #{id}
-
-
-
- update goods_goods_sku
- set available = (available + #{count}),
- capacity = (capacity + #{count}),
- version = (version + 1)
- where id = #{id}
-
-
-
- update goods_goods_sku
- set locked = (locked - #{count}),
- capacity = (capacity - #{count}),
- version = (version + 1)
- where id = #{id} and (locked - #{count}) >= 0
-
-
-
- update goods_goods_sku
- set sold = (sold - #{count}),
- capacity = (capacity - #{count}),
- version = (version + 1)
- where id = #{id} and (capacity - #{count}) >= 0 and (sold - #{count}) >= 0
-
-
\ No newline at end of file
diff --git a/bootx-services/service-iam/pom.xml b/bootx-services/service-iam/pom.xml
index d23754c29564884895c5ba164a8232f075e68ab4..b8dec3ba56750160a07f033b910fd0c7a51c93fb 100644
--- a/bootx-services/service-iam/pom.xml
+++ b/bootx-services/service-iam/pom.xml
@@ -5,7 +5,7 @@
cn.bootx.platform
bootx-services
- 1.2.1
+ 1.2.2
4.0.0
diff --git a/bootx-services/service-notice/pom.xml b/bootx-services/service-notice/pom.xml
index 2feacdcfe27be418b6421c3edb4a4862024abc45..c7a50bd47d1bf5e1a78c5df0742bdb259e8d5134 100644
--- a/bootx-services/service-notice/pom.xml
+++ b/bootx-services/service-notice/pom.xml
@@ -5,7 +5,7 @@
bootx-services
cn.bootx.platform
- 1.2.1
+ 1.2.2
4.0.0
diff --git a/bootx-services/service-office/pom.xml b/bootx-services/service-office/pom.xml
index ef6b81211e4a426b63848b8c942a4f0f66a23f5e..f29e0c7233d001b7e7784dbc4cb49bfa658f54d3 100644
--- a/bootx-services/service-office/pom.xml
+++ b/bootx-services/service-office/pom.xml
@@ -5,7 +5,7 @@
bootx-services
cn.bootx.platform
- 1.2.1
+ 1.2.2
4.0.0
diff --git a/bootx-services/service-order/README.md b/bootx-services/service-order/README.md
deleted file mode 100644
index 0a7ba745f8c2e48b87c031f3715cf9f8f30c267f..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/README.md
+++ /dev/null
@@ -1 +0,0 @@
-# 订单中心
\ No newline at end of file
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/OrderApplication.java b/bootx-services/service-order/src/main/java/cn/bootx/order/OrderApplication.java
deleted file mode 100644
index 554d719ea7c8d5bbc3ab2962805deed4af47c040..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/OrderApplication.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package cn.bootx.order;
-
-import org.apache.ibatis.annotations.Mapper;
-import org.mybatis.spring.annotation.MapperScan;
-import org.springframework.context.annotation.ComponentScan;
-
-/**
-* 订单中心
-* @author xxm
-* @date 2021/8/11
-*/
-@ComponentScan
-@MapperScan(annotationClass = Mapper.class)
-public class OrderApplication {
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/code/OrderCenterCode.java b/bootx-services/service-order/src/main/java/cn/bootx/order/code/OrderCenterCode.java
deleted file mode 100644
index d3160400becfca2d220231e3ae533d0723644497..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/code/OrderCenterCode.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package cn.bootx.order.code;
-
-/**
-*
-* @author xxm
-* @date 2021/4/13
-*/
-public interface OrderCenterCode {
- /**
- * 项目名称
- */
- String APPLICATION_NAME = "service-order-center";
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/code/OrderCenterErrorCode.java b/bootx-services/service-order/src/main/java/cn/bootx/order/code/OrderCenterErrorCode.java
deleted file mode 100644
index a65df19936b35a7c233473821a1b0f66149d5717..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/code/OrderCenterErrorCode.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package cn.bootx.order.code;
-
-/**
-* 商品中心
-* @author xxm
-* @date 2021/3/10
-*/
-public interface OrderCenterErrorCode {
-
-
- /**
- * 订单不存在
- */
- int ORDER_NOT_EXIST = 23015;
-
- /**
- * 订单超时
- */
- int ORDER_TIME_OUT = 44007;
-
- /**
- * 订单支付中
- */
- int ORDER_PAYING = 44008;
-
- /**
- * 订单已支付
- */
- int ORDER_ALREADY_PAID = 44009;
-
- /**
- * 订单已取消
- */
- int ORDER_CANCELLED = 44010;
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/code/OrderStatusCode.java b/bootx-services/service-order/src/main/java/cn/bootx/order/code/OrderStatusCode.java
deleted file mode 100644
index e3e5a0bb64df0b4c917c6942fc836f27f4038625..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/code/OrderStatusCode.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package cn.bootx.order.code;
-
-/**
-* 订单状态
-* @author xxm
-* @date 2020/11/27
-*/
-public interface OrderStatusCode {
-
- /** 未支付 */
- int STATUS_NORMAL = 0;
- /** 支付中 */
- int STATUS_PAYING = 1;
- /** 已支付未发货 */
- int STATUS_NOT_YET_SHIPPED = 2;
- /** 已支付已完成 */
- int STATUS_PAYED = 3;
- /** 已取消 */
- int STATUS_CANCEL = 4;
-
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/code/OrderTypeCode.java b/bootx-services/service-order/src/main/java/cn/bootx/order/code/OrderTypeCode.java
deleted file mode 100644
index e91d9b3061d1c8d83ad438375aa77ae3c431e7be..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/code/OrderTypeCode.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package cn.bootx.order.code;
-
-/**
-* 订单类型
-* @author xxm
-* @date 2021/4/16
-*/
-public interface OrderTypeCode {
-
- /** 普通订单 */
- int NORMAL = 1;
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/controller/OrderFindController.java b/bootx-services/service-order/src/main/java/cn/bootx/order/controller/OrderFindController.java
deleted file mode 100644
index 8b62e668ff363f76158b2b0547113b5457e75448..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/controller/OrderFindController.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package cn.bootx.order.controller;
-
-import cn.bootx.common.core.rest.PageResult;
-import cn.bootx.common.core.rest.Res;
-import cn.bootx.common.core.rest.ResResult;
-import cn.bootx.common.core.rest.param.PageParam;
-import cn.bootx.order.core.order.service.OrderFindService;
-import cn.bootx.order.dto.order.OrderDto;
-import cn.hutool.core.date.DatePattern;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import io.swagger.v3.oas.annotations.Operation;
-import lombok.AllArgsConstructor;
-import org.springframework.format.annotation.DateTimeFormat;
-import org.springframework.web.bind.annotation.*;
-
-import java.time.LocalDateTime;
-import java.util.List;
-
-/**
-* @author xxm
-* @date 2021/4/13
-*/
-@Tag(name ="订单查询")
-@RestController
-@RequestMapping("/order")
-@AllArgsConstructor
-public class OrderFindController {
- private final OrderFindService orderFindService;
-
-
- @Operation(summary = "根据用户获取订单")
- @GetMapping("/findByUser")
- public ResResult> findByUser(Long id){
- return Res.ok(orderFindService.findByUser(id));
- }
-
- @Operation(summary = "订单列表 分页")
- @GetMapping("/page")
- public ResResult> page(PageParam page){
- return Res.ok(orderFindService.page(page));
- }
-
- @Operation(summary = "获取完整订单详情")
- @GetMapping("/getWholeById")
- public ResResult getWholeById(Long id) {
- return Res.ok(orderFindService.getWholeById(id));
- }
-
- @Operation(summary = "查询订单包含的skuIds")
- @GetMapping("/findOrderSkuIds")
- public ResResult> findOrderSkuIds(Long orderId){
- return Res.ok(orderFindService.findOrderSkuIds(orderId));
- }
-
- @Operation(summary = "获取指定类型超时订单的id集合")
- @GetMapping("/findPayTimeoutOrderIdsByType")
- public ResResult> findPayTimeoutOrderIdsByType(@DateTimeFormat(pattern = DatePattern.NORM_DATETIME_PATTERN) LocalDateTime date, Integer type){
- return Res.ok(orderFindService.findPayTimeoutOrderIdsByType(date,type));
- }
-
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/controller/OrderOperateController.java b/bootx-services/service-order/src/main/java/cn/bootx/order/controller/OrderOperateController.java
deleted file mode 100644
index 9dc5321c841156c9d8c6e5ac9483372386759224..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/controller/OrderOperateController.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package cn.bootx.order.controller;
-
-import cn.bootx.common.core.rest.Res;
-import cn.bootx.common.core.rest.ResResult;
-import cn.bootx.order.core.order.service.OrderOperateService;
-import cn.bootx.order.dto.order.OrderDto;
-import cn.bootx.order.param.order.OrderWholeParam;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import io.swagger.v3.oas.annotations.Operation;
-import lombok.AllArgsConstructor;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
-*
-* @author xxm
-* @date 2021/4/13
-*/
-@Tag(name ="订单操作")
-@RestController
-@RequestMapping("/order")
-@AllArgsConstructor
-public class OrderOperateController {
- private final OrderOperateService orderOperateService;
-
- @Operation(summary = "传入订单和优惠, 下单")
- @PostMapping("/placeOrder")
- public ResResult placeOrder(@RequestBody OrderWholeParam orderWholeParam){
- return Res.ok(orderOperateService.placeOrder(orderWholeParam));
- }
-
- @Operation(summary = "付款成功状态变更")
- @PostMapping("/paidOrderState")
- public ResResult paidOrderState(Long orderId){
- orderOperateService.paidOrderState(orderId);
- return Res.ok();
- }
-
- @Operation(summary = "取消订单")
- @PostMapping("/cancelOrderState")
- public ResResult cancelOrderState(Long orderId) {
- orderOperateService.cancelOrderState(orderId);
- return Res.ok();
- }
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/core/billing/context/OrderDetailContext.java b/bootx-services/service-order/src/main/java/cn/bootx/order/core/billing/context/OrderDetailContext.java
deleted file mode 100644
index c8a4665fdf6b8586bf642c55160ffb29c53c3726..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/core/billing/context/OrderDetailContext.java
+++ /dev/null
@@ -1,69 +0,0 @@
-package cn.bootx.order.core.billing.context;
-
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import java.math.BigDecimal;
-import java.util.List;
-
-/**
-* 订单详情的上下文,将原来的订单详情,
- * 转换为更适合我们的格式,同时屏蔽各种不同的订单详情的差异化
-* @author xxm
-* @date 2020/12/9
-*/
-@Data
-@Accessors(chain = true)
-public class OrderDetailContext {
-
- /**
- * ID != order detail id
- * 因为多个项目会共用一个相同的order detail id 所以此处重新生成,保证每个都不一致。
- */
- private Long id;
-
- /**
- * 订单详情的id
- */
- private Long orderDetailId;
-
- /**
- * 对应的skuId
- */
- private Long skuId;
-
- /**
- * 支付金额
- */
- private BigDecimal payAmount;
-
- /**
- * 已经记账的金额
- */
- private BigDecimal recordedAmount;
-
- /**
- * 该订单项目不支持的payMode列表,部分订单详情可能不支持某种支付方式,拆分的时候需要过滤的
- */
- private List unSupportPayModeList;
-
- /**
- * 交易目的
- * @see PayTransactionPurposeCode
- */
- private int transactionPurpose;
-
- /**
- * 交易类型
- * @see PayTransactionTypeCode
- */
- private int transactionType;
-
- /**
- * 剩余的记账金额
- * @return 这个order detail 剩余的记账金额
- */
- public BigDecimal getRemainingAmount() {
- return this.getPayAmount().subtract(this.getRecordedAmount());
- }
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/core/billing/context/PayModeContext.java b/bootx-services/service-order/src/main/java/cn/bootx/order/core/billing/context/PayModeContext.java
deleted file mode 100644
index ee9470c5b37d79e03708ccfc4ff5f2af60130582..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/core/billing/context/PayModeContext.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package cn.bootx.order.core.billing.context;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import java.math.BigDecimal;
-
-/**
-* 支付信息的上下文,将支付参数中的支付方式列表转换成更适合billing拆分的格式
-* @author xxm
-* @date 2020/12/9
-*/
-@Data
-@Accessors(chain = true)
-@Schema(title = "支付信息的上下文")
-public class PayModeContext {
-
- /**
- * 当前的支付类型
- */
- private int type;
-
- /**
- * 当前支付类型支付的金额
- */
- private BigDecimal totalAmount;
-
- /**
- * 当前支付类型支付的积分数量
- */
- private BigDecimal count;
-
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/core/billing/convert/BillingConvert.java b/bootx-services/service-order/src/main/java/cn/bootx/order/core/billing/convert/BillingConvert.java
deleted file mode 100644
index 22402d576b873f2a293788f8d5d38ccda6cafc60..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/core/billing/convert/BillingConvert.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package cn.bootx.order.core.billing.convert;
-
-import cn.bootx.order.core.billing.entity.OrderBilling;
-import cn.bootx.order.core.billing.entity.OrderItemBilling;
-import cn.bootx.order.dto.billing.OrderBillingDto;
-import cn.bootx.order.dto.billing.OrderItemBillingDto;
-import org.mapstruct.Mapper;
-import org.mapstruct.Mappings;
-import org.mapstruct.factory.Mappers;
-
-/**
-* 账单转换
-* @author xxm
-* @date 2021/6/28
-*/
-@Mapper
-public interface BillingConvert {
- BillingConvert CONVERT = Mappers.getMapper(BillingConvert.class);
-
- OrderBillingDto convert(OrderBilling in);
-
- OrderItemBillingDto convert(OrderItemBilling in);
-
-
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/core/billing/dao/OrderBillingManager.java b/bootx-services/service-order/src/main/java/cn/bootx/order/core/billing/dao/OrderBillingManager.java
deleted file mode 100644
index abcb0075769794ea402e9d0e547bc08c009cd4a1..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/core/billing/dao/OrderBillingManager.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package cn.bootx.order.core.billing.dao;
-
-import cn.bootx.common.mybatisplus.impl.BaseManager;
-import cn.bootx.order.core.billing.entity.OrderBilling;
-import lombok.RequiredArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Service;
-
-@Slf4j
-@Service
-@RequiredArgsConstructor
-public class OrderBillingManager extends BaseManager {
-
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/core/billing/dao/OrderBillingMapper.java b/bootx-services/service-order/src/main/java/cn/bootx/order/core/billing/dao/OrderBillingMapper.java
deleted file mode 100644
index 0f0e99df61095a5b5d6e3f0ad8041c94a8bf441a..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/core/billing/dao/OrderBillingMapper.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package cn.bootx.order.core.billing.dao;
-
-import cn.bootx.order.core.billing.entity.OrderBilling;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.springframework.stereotype.Repository;
-
-@Repository
-public interface OrderBillingMapper extends BaseMapper {
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/core/billing/dao/OrderItemBillingManager.java b/bootx-services/service-order/src/main/java/cn/bootx/order/core/billing/dao/OrderItemBillingManager.java
deleted file mode 100644
index a55d3b37eb7749590d8a953eaf6ab2749f363fe7..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/core/billing/dao/OrderItemBillingManager.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package cn.bootx.order.core.billing.dao;
-
-import lombok.RequiredArgsConstructor;
-import org.springframework.stereotype.Service;
-
-/**
- * 订单明细账单
- * @author xxm
- * @date 2020/12/11
- */
-@Service
-@RequiredArgsConstructor
-public class OrderItemBillingManager {
-
- private final OrderItemBillingMapper orderItemBillingRepository;
-
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/core/billing/dao/OrderItemBillingMapper.java b/bootx-services/service-order/src/main/java/cn/bootx/order/core/billing/dao/OrderItemBillingMapper.java
deleted file mode 100644
index eaeafb07a9711db256f3fbe29b0f92bfe25f3ce8..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/core/billing/dao/OrderItemBillingMapper.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package cn.bootx.order.core.billing.dao;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.apache.ibatis.annotations.Mapper;
-
-@Mapper
-public interface OrderItemBillingMapper extends BaseMapper {
-
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/core/billing/entity/OrderBilling.java b/bootx-services/service-order/src/main/java/cn/bootx/order/core/billing/entity/OrderBilling.java
deleted file mode 100644
index c90348b1f477c413b4279b5ab8c40d768a87ad36..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/core/billing/entity/OrderBilling.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package cn.bootx.order.core.billing.entity;
-
-import cn.bootx.common.core.function.EntityBaseFunction;
-import cn.bootx.common.mybatisplus.base.MpBaseEntity;
-import cn.bootx.order.core.billing.convert.BillingConvert;
-import cn.bootx.order.dto.billing.OrderBillingDto;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
-import java.math.BigDecimal;
-
-/**
-* 订单账单
-* @author xxm
-* @date 2020/12/11
-*/
-@EqualsAndHashCode(callSuper = true)
-@Data
-@Accessors(chain = true)
-@TableName("order_order_billing")
-public class OrderBilling extends MpBaseEntity implements EntityBaseFunction {
-
- /** 用户id */
- private Long userId;
-
- /** 渠道id */
- private Long channelId;
-
- /** 订单id */
- private Long orderId;
-
- /** 支付类型 */
- private Integer payType;
-
- /** 金额 */
- private BigDecimal amount;
-
- /**
- * 交易数量(积分,代金券,兑换券的场合具体数量
- */
- private Integer count;
-
- /** 业务id */
- private String businessId;
-
- @Override
- public OrderBillingDto toDto() {
- return BillingConvert.CONVERT.convert(this);
- }
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/core/billing/entity/OrderItemBilling.java b/bootx-services/service-order/src/main/java/cn/bootx/order/core/billing/entity/OrderItemBilling.java
deleted file mode 100644
index c197ac1f122d55ddbe8bf6f02ddf3b56d70787e7..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/core/billing/entity/OrderItemBilling.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package cn.bootx.order.core.billing.entity;
-
-import cn.bootx.common.core.function.EntityBaseFunction;
-import cn.bootx.common.mybatisplus.base.MpBaseEntity;
-import cn.bootx.order.core.billing.convert.BillingConvert;
-import cn.bootx.order.dto.billing.OrderItemBillingDto;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
-import java.math.BigDecimal;
-
-/**
-* 订单项账单
-* @author xxm
-* @date 2020/12/11
-*/
-@EqualsAndHashCode(callSuper = true)
-@Data
-@Accessors(chain = true)
-@TableName("order_order_item_billing")
-public class OrderItemBilling extends MpBaseEntity implements EntityBaseFunction {
-
- /** 账单id */
- private Long orderBillingId;
-
- /** 用户id */
- private Long userId;
-
- /** 订单id */
- private Long orderId;
-
- /** 订单项id */
- private Long orderItemId;
-
- /** 订单项目skuId */
- private Long skuId;
-
- /** 支付金额 */
- private BigDecimal amount;
-
- /** 入账时间 */
- private Long bookkeepingTime;
-
- /** 原始订单项id */
- private Long sourceItemBillingId;
-
- /** 原始订单项d */
- private Long sourceOrderItemId;
-
- @Override
- public OrderItemBillingDto toDto() {
- return BillingConvert.CONVERT.convert(this);
- }
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/core/billing/service/OrderBillingService.java b/bootx-services/service-order/src/main/java/cn/bootx/order/core/billing/service/OrderBillingService.java
deleted file mode 100644
index ae53cf1c4a04e71015b2e09427f0c481e69db1ba..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/core/billing/service/OrderBillingService.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package cn.bootx.order.core.billing.service;
-
-import cn.bootx.order.core.billing.dao.OrderBillingManager;
-import cn.bootx.order.core.billing.dao.OrderItemBillingManager;
-import cn.bootx.payment.core.payment.dao.PaymentManager;
-import lombok.RequiredArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Propagation;
-import org.springframework.transaction.annotation.Transactional;
-
-
-/**
- * 账单服务
- * @author xxm
- * @date 2021/2/25
- */
-@Slf4j
-@Service
-@RequiredArgsConstructor
-public class OrderBillingService {
-
- private final OrderBillingManager orderBillingManager;
- private final OrderItemBillingManager orderItemBillingManager;
- private final PaymentManager paymentManager;
-
-
- /**
- * billing 的拆分操作
- */
- @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRES_NEW)
- public void handleBilling(Long paymentId) {
- }
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/core/billing/service/OrderItemBillingService.java b/bootx-services/service-order/src/main/java/cn/bootx/order/core/billing/service/OrderItemBillingService.java
deleted file mode 100644
index 324a0fcad03057f9e9e9449ca6905815938e6e9f..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/core/billing/service/OrderItemBillingService.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package cn.bootx.order.core.billing.service;
-
-import cn.bootx.order.core.billing.dao.OrderItemBillingManager;
-import lombok.RequiredArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Service;
-
-/**
-* 订单明细账单服务
-* @author xxm
-* @date 2021/2/25
-*/
-@Slf4j
-@Service
-@RequiredArgsConstructor
-public class OrderItemBillingService {
- private final OrderItemBillingManager orderItemBillingManager;
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/convert/OrderConvert.java b/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/convert/OrderConvert.java
deleted file mode 100644
index 1df20a3723c16c720d8b3a26990704b18a227968..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/convert/OrderConvert.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package cn.bootx.order.core.order.convert;
-
-import cn.bootx.order.core.order.entity.Order;
-import cn.bootx.order.core.order.entity.OrderDetail;
-import cn.bootx.order.core.order.entity.OrderStrategyMapping;
-import cn.bootx.order.dto.order.OrderDetailDto;
-import cn.bootx.order.dto.order.OrderDto;
-import cn.bootx.order.dto.order.OrderStrategyMappingDto;
-import cn.bootx.order.param.order.OrderDetailParam;
-import org.mapstruct.Mapper;
-import org.mapstruct.Mappings;
-import org.mapstruct.factory.Mappers;
-
-/**
-* 订单转换
-* @author xxm
-* @date 2021/8/11
-*/
-@Mapper
-public interface OrderConvert {
- OrderConvert CONVERT = Mappers.getMapper(OrderConvert.class);
- OrderDto convert(Order in);
-
- Order convert(OrderDto in);
-
- OrderDetailDto convert(OrderDetail in);
-
- OrderDetail convert(OrderDetailDto in);
-
- OrderDetail convert(OrderDetailParam in);
-
- OrderStrategyMappingDto convert(OrderStrategyMapping in);
-
- OrderStrategyMapping convert(OrderStrategyMappingDto in);
-
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/dao/OrderDetailManager.java b/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/dao/OrderDetailManager.java
deleted file mode 100644
index 7da41b218edd189d7d56e51f538a43f6925b41e5..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/dao/OrderDetailManager.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package cn.bootx.order.core.order.dao;
-
-import cn.bootx.common.mybatisplus.impl.BaseManager;
-import cn.bootx.order.core.order.entity.OrderDetail;
-import lombok.RequiredArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-/**
-* 订单明细
-* @author xxm
-* @date 2020/11/18
-*/
-@Slf4j
-@Service
-@RequiredArgsConstructor
-public class OrderDetailManager extends BaseManager {
-
- public List findByOrder(Long orderId){
- return findAllByField(OrderDetail::getOrderId,orderId);
- }
-
- /**
- * 获取订单中的sku列表
- */
- public List findOrderSkuIds(Long orderId){
- return lambdaQuery().eq(OrderDetail::getOrderId,orderId)
- .select(OrderDetail::getSkuId)
- .list();
- }
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/dao/OrderDetailMapper.java b/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/dao/OrderDetailMapper.java
deleted file mode 100644
index 03e0618ee4ba3d2025b09fa45753deae3b6c8b7a..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/dao/OrderDetailMapper.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package cn.bootx.order.core.order.dao;
-
-import cn.bootx.order.core.order.entity.OrderDetail;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.apache.ibatis.annotations.Mapper;
-
-/**
-* 订单明细
-* @author xxm
-* @date 2020/11/18
-*/
-@Mapper
-public interface OrderDetailMapper extends BaseMapper {
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/dao/OrderManager.java b/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/dao/OrderManager.java
deleted file mode 100644
index 0e6682d1089f955ccc3b53a39c59a094d677c8ca..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/dao/OrderManager.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package cn.bootx.order.core.order.dao;
-
-import cn.bootx.common.core.rest.param.PageParam;
-import cn.bootx.common.mybatisplus.base.MpIdEntity;
-import cn.bootx.common.mybatisplus.impl.BaseManager;
-import cn.bootx.common.mybatisplus.util.MpUtil;
-import cn.bootx.order.code.OrderStatusCode;
-import cn.bootx.order.core.order.entity.Order;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.RequiredArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Service;
-
-import java.time.LocalDateTime;
-import java.util.List;
-
-/**
- * 订单
- * @author xxm
- * @date 2020/11/18
- */
-@Slf4j
-@Service
-@RequiredArgsConstructor
-public class OrderManager extends BaseManager {
-
- public List findByUser(Long id) {
- return findAllByField(Order::getUserId,id);
- }
-
- public Page page(PageParam pageParam) {
- Page mpPage = MpUtil.getMpPage(pageParam, Order.class);
- return lambdaQuery()
- .orderByDesc(MpIdEntity::getId)
- .page(mpPage);
- }
-
- /**
- * 获取超时订单的id集合
- */
- public List findPayTimeoutOrderIdsByType(LocalDateTime date, Integer type) {
- // select id from Order where state = ?1 and createTime < ?2 and businessId = ?3
- return lambdaQuery().eq(Order::getStatus,OrderStatusCode.STATUS_NORMAL)
- .le(MpIdEntity::getId,date)
- .eq(Order::getType,type)
- .list();
- }
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/dao/OrderMapper.java b/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/dao/OrderMapper.java
deleted file mode 100644
index 6eab717d75c7e2541cbf8386e92775a41315c64e..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/dao/OrderMapper.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package cn.bootx.order.core.order.dao;
-
-import cn.bootx.order.core.order.entity.Order;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.apache.ibatis.annotations.Mapper;
-
-@Mapper
-public interface OrderMapper extends BaseMapper {
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/dao/OrderStrategyMappingManager.java b/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/dao/OrderStrategyMappingManager.java
deleted file mode 100644
index 20e0fc311f88bb0da7eb9ecd58965229d9d6c165..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/dao/OrderStrategyMappingManager.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package cn.bootx.order.core.order.dao;
-
-import cn.bootx.common.mybatisplus.impl.BaseManager;
-import cn.bootx.order.core.order.entity.OrderStrategyMapping;
-import lombok.RequiredArgsConstructor;
-import org.springframework.stereotype.Repository;
-
-import java.util.List;
-
-/**
-* 订单策略映射
-* @author xxm
-* @date 2020/11/27
-*/
-@Repository
-@RequiredArgsConstructor
-public class OrderStrategyMappingManager extends BaseManager {
-
- public List findByOrder(Long orderId) {
- return findAllByField(OrderStrategyMapping::getOrderId,orderId);
- }
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/dao/OrderStrategyMappingMapper.java b/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/dao/OrderStrategyMappingMapper.java
deleted file mode 100644
index 596c90358b19a7f865d1fd1759fc0fd0ff2d8366..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/dao/OrderStrategyMappingMapper.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package cn.bootx.order.core.order.dao;
-
-import cn.bootx.order.core.order.entity.OrderStrategyMapping;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.apache.ibatis.annotations.Mapper;
-
-@Mapper
-public interface OrderStrategyMappingMapper extends BaseMapper {
-
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/entity/Order.java b/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/entity/Order.java
deleted file mode 100644
index 682f60443886bfac65296d2d4a758c2cf72af331..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/entity/Order.java
+++ /dev/null
@@ -1,96 +0,0 @@
-package cn.bootx.order.core.order.entity;
-
-import cn.bootx.common.core.function.EntityBaseFunction;
-import cn.bootx.common.mybatisplus.base.MpBaseEntity;
-import cn.bootx.order.core.order.convert.OrderConvert;
-import cn.bootx.order.dto.order.OrderAddressDto;
-import cn.bootx.order.dto.order.OrderDto;
-import cn.bootx.order.dto.order.OrderInvoiceDto;
-import cn.hutool.core.collection.CollUtil;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
-import java.math.BigDecimal;
-import java.time.LocalDateTime;
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
-* 订单
-* @author xxm
-* @date 2020/10/15
-*/
-@EqualsAndHashCode(callSuper = true)
-@Data
-@Accessors(chain = true)
-@TableName("order_order")
-public class Order extends MpBaseEntity implements EntityBaseFunction {
-
- /** 编码 */
- private String code;
-
- /** 渠道 */
- private Long channelId;
-
- /** 描述 */
- private String description;
-
- /** 购买用户ID */
- private Long userId;
-
- /**
- * 状态
- * @see cn.bootx.order.code.OrderStatusCode
- */
- private int status;
-
- /** 支付时间 */
- private LocalDateTime payTime;
-
- /** 类型 */
- private Integer type;
-
- /** 总金额 */
- private BigDecimal totalAmount;
-
- /** 实付金额 */
- private BigDecimal payAmount;
-
- /** 所用优惠券 */
- private String couponIds;
-
- /** 业务id */
- private Long businessId;
-
- /** 附加参数 */
- private String addition;
-
- /** 订单明细 */
- @TableField(exist = false)
- private List orderDetails;
-
- /** 收货信息 */
- @TableField(typeHandler = JacksonTypeHandler.class)
- private OrderAddressDto addressInfo;
-
- /** 发票信息 */
- @TableField(typeHandler = JacksonTypeHandler.class)
- private OrderInvoiceDto invoiceInfo;
-
- public static Order init(OrderDto in){
- return OrderConvert.CONVERT.convert(in);
- }
-
- @Override
- public OrderDto toDto() {
- OrderDto dto = OrderConvert.CONVERT.convert(this);
- if (CollUtil.isNotEmpty(orderDetails)){
- dto.setDetails(orderDetails.stream().map(OrderDetail::toDto).collect(Collectors.toList()));
- }
- return dto;
- }
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/entity/OrderDetail.java b/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/entity/OrderDetail.java
deleted file mode 100644
index 34ad5d4adedbe5b3f9c65e250cb339ff6ca6e36f..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/entity/OrderDetail.java
+++ /dev/null
@@ -1,73 +0,0 @@
-package cn.bootx.order.core.order.entity;
-
-import cn.bootx.common.core.function.EntityBaseFunction;
-import cn.bootx.common.mybatisplus.base.MpBaseEntity;
-import cn.bootx.order.core.order.convert.OrderConvert;
-import cn.bootx.order.dto.order.OrderDetailDto;
-import cn.bootx.order.param.order.OrderDetailParam;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
-import java.math.BigDecimal;
-import java.util.List;
-
-/**
- * 订单明细
- * @author xxm
- * @date 2020/10/15
- */
-@EqualsAndHashCode(callSuper = true)
-@Data
-@Accessors(chain = true)
-@TableName("order_order_detail")
-public class OrderDetail extends MpBaseEntity implements EntityBaseFunction {
-
- /** 订单id */
- private Long orderId;
-
- /** 店铺id */
- private Long shopId;
-
- /** 类目 */
- private Long categoryId;
-
- /** 商品id */
- private Long goodsId;
-
- /** 库存id */
- private Long skuId;
-
- /** 商品名称 */
- private String goodsTitle;
-
- /** 商品价格 */
- private BigDecimal goodsPrice;
-
- /** 数量 */
- private int num;
-
- /** 总价 */
- private BigDecimal totalAmount;
-
- /** 支付价 */
- private BigDecimal payAmount;
-
- /** 状态 */
- private Integer state;
-
- /** 策略映射 */
- @TableField(exist = false)
- private List mappings;
-
- public static OrderDetail init(OrderDetailParam in){
- return OrderConvert.CONVERT.convert(in);
- }
-
- @Override
- public OrderDetailDto toDto() {
- return OrderConvert.CONVERT.convert(this);
- }
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/entity/OrderStrategyMapping.java b/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/entity/OrderStrategyMapping.java
deleted file mode 100644
index bbcbf8bed02fd30808ffe78c30d261a929e3eebc..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/entity/OrderStrategyMapping.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package cn.bootx.order.core.order.entity;
-
-import cn.bootx.common.core.function.EntityBaseFunction;
-import cn.bootx.common.mybatisplus.base.MpBaseEntity;
-import cn.bootx.order.core.order.convert.OrderConvert;
-import cn.bootx.order.dto.order.OrderStrategyMappingDto;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
-import java.math.BigDecimal;
-
-/**
- * 订单策略映射
- * 用于保存策略计算过程中的结果,会保存当时计算的订单策略、订单类型(订单/明细)和价格变动数量
- * @author xxm
- * @date 2020/10/11
- */
-@EqualsAndHashCode(callSuper = true)
-@Data
-@Accessors(chain = true)
-@TableName("order_order_strategy_mapping")
-public class OrderStrategyMapping extends MpBaseEntity implements EntityBaseFunction {
-
- /** 订单id */
- private Long orderId;
-
- /** 明细id */
- private Long orderDetailId;
-
- /** 策略类型 1 活动策略 2 优惠券策略*/
- private Integer strategyType;
-
- /** 优惠券ID */
- private Long couponId;
-
- /** 策略ID */
- private Long strategyId;
-
- /** 策略注册ID */
- private Long strategyRegisterId;
-
- /** 价格变动 */
- private BigDecimal priceChange;
-
- /** 描述 */
- private String description;
-
- @Override
- public OrderStrategyMappingDto toDto() {
- return OrderConvert.CONVERT.convert(this);
- }
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/factory/OrderFactory.java b/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/factory/OrderFactory.java
deleted file mode 100644
index b11fe93e647571970a21f0912e65c5516625040d..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/factory/OrderFactory.java
+++ /dev/null
@@ -1,95 +0,0 @@
-package cn.bootx.order.core.order.factory;
-
-import cn.bootx.order.core.order.entity.Order;
-import cn.bootx.order.core.order.entity.OrderDetail;
-import cn.bootx.order.core.order.entity.OrderStrategyMapping;
-import cn.bootx.order.param.order.OrderParam;
-import cn.bootx.sales.dto.coupon.CouponDto;
-import cn.bootx.sales.dto.order.OrderDetailPreviewResult;
-import cn.bootx.sales.dto.order.OrderPreviewResult;
-import cn.bootx.sales.dto.order.OrderStrategyMappingResult;
-import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.bean.copier.CopyOptions;
-import cn.hutool.core.collection.CollUtil;
-import cn.hutool.core.util.IdUtil;
-import lombok.RequiredArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Component;
-
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * 订单工厂
- * @author xxm
- * @date 2020/11/19
- */
-@Slf4j
-@Component
-@RequiredArgsConstructor
-public class OrderFactory {
-
- /**
- * 转换订单为可持久化对象
- */
- public Order buildOrder(OrderPreviewResult previewResult, OrderParam orderParam){
- List orderDetails = previewResult.getOrderDetails();
-
- long orderId = IdUtil.getSnowflakeNextId();
-
- // 明细转换为持久类
- List collect = orderDetails.stream()
- .map(o -> this.buildOrderDetail(o,orderId))
- .collect(Collectors.toList());
-
- String couponIds = null;
- if (CollUtil.isNotEmpty(previewResult.getCoupons())){
- couponIds = previewResult.getCoupons().stream()
- .map(CouponDto::getId)
- .map(String::valueOf)
- .collect(Collectors.joining(","));
- }
-
- Order order = new Order();
- BeanUtil.copyProperties(previewResult,order);
- BeanUtil.copyProperties(orderParam,order,CopyOptions.create().ignoreNullValue());
-
- order.setId(orderId);
- order.setOrderDetails(collect)
- .setCouponIds(couponIds);
- return order;
- }
-
- /**
- * 转换订单明细
- */
- private OrderDetail buildOrderDetail(OrderDetailPreviewResult orderDetailCheckDto, long orderId){
- long orderDetailId = IdUtil.getSnowflakeNextId();
- OrderDetail orderDetail = new OrderDetail();
- BeanUtil.copyProperties(orderDetailCheckDto,orderDetail, CopyOptions.create().ignoreNullValue());
-
- List mappingDtos = orderDetailCheckDto.getMappings();
- List collect = mappingDtos.stream()
- .map(o -> this.buildMapping(o,orderId,orderDetailId))
- .collect(Collectors.toList());
- orderDetail.setOrderId(orderId)
- .setGoodsTitle(orderDetailCheckDto.getGoodsTitle())
- .setMappings(collect)
- .setId(orderDetailId);
- return orderDetail;
- }
-
-
-
- /**
- * 转换策略映射
- */
- private OrderStrategyMapping buildMapping(OrderStrategyMappingResult strategyMappingResult, Long orderId, Long orderDetailId){
- OrderStrategyMapping orderStrategyMapping = new OrderStrategyMapping();
- BeanUtil.copyProperties(strategyMappingResult,orderStrategyMapping,CopyOptions.create().ignoreNullValue());
- orderStrategyMapping.setOrderDetailId(orderDetailId)
- .setOrderId(orderId);
- return orderStrategyMapping;
- }
-
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/service/OrderFindService.java b/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/service/OrderFindService.java
deleted file mode 100644
index 3392c1f053fcc55b31fc639da16bf110a3582fc7..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/service/OrderFindService.java
+++ /dev/null
@@ -1,97 +0,0 @@
-package cn.bootx.order.core.order.service;
-
-import cn.bootx.common.core.rest.PageResult;
-import cn.bootx.common.core.rest.param.PageParam;
-import cn.bootx.common.core.util.ResultConvertUtil;
-import cn.bootx.common.mybatisplus.base.MpIdEntity;
-import cn.bootx.common.mybatisplus.util.MpUtil;
-import cn.bootx.order.core.order.dao.OrderDetailManager;
-import cn.bootx.order.core.order.dao.OrderManager;
-import cn.bootx.order.core.order.dao.OrderStrategyMappingManager;
-import cn.bootx.order.core.order.entity.Order;
-import cn.bootx.order.core.order.entity.OrderDetail;
-import cn.bootx.order.core.order.entity.OrderStrategyMapping;
-import cn.bootx.order.dto.order.OrderDetailDto;
-import cn.bootx.order.dto.order.OrderDto;
-import cn.bootx.order.dto.order.OrderStrategyMappingDto;
-import cn.bootx.order.exception.order.OrderNotExistException;
-import lombok.RequiredArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Service;
-
-import java.time.LocalDateTime;
-import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
-
-/**
- * 订单查询
- * @author xxm
- * @date 2020/11/26
- */
-@Slf4j
-@Service
-@RequiredArgsConstructor
-public class OrderFindService {
- private final OrderManager orderManager;
- private final OrderDetailManager orderDetailManager;
- private final OrderStrategyMappingManager mappingManager;
-
- /**
- * 根据用户获取订单
- */
- public List findByUser(Long id){
- return ResultConvertUtil.dtoListConvert(orderManager.findByUser(id));
- }
-
- /**
- * 订单列表 分页
- */
- public PageResult page(PageParam page){
- return MpUtil.convert2DtoPageResult(orderManager.page(page));
- }
-
- /**
- * 订单详情
- */
- public OrderDto getWholeById(Long id){
-
- // 订单
- Order order = orderManager.findById(id).orElseThrow(OrderNotExistException::new);
- OrderDto orderDto = order.toDto();
-
- // 获取生效的优惠
- Map> mappingMap = mappingManager.findByOrder(id).stream()
- .map(OrderStrategyMapping::toDto)
- .collect(Collectors.groupingBy(OrderStrategyMappingDto::getOrderDetailId));
-
- // 获取明细
- List details = orderDetailManager.findByOrder(id)
- .stream()
- .map(OrderDetail::toDto)
- .map(orderDetailDto -> orderDetailDto.setMappings(mappingMap.get(orderDetailDto.getId())))
- .collect(Collectors.toList());
- orderDto.setDetails(details);
-
- return orderDto;
- }
-
- /**
- * 获取订单中的sku列表
- */
- public List findOrderSkuIds(Long orderId) {
- return orderDetailManager.findOrderSkuIds(orderId).stream()
- .map(OrderDetail::getSkuId)
- .collect(Collectors.toList());
- }
-
- /**
- * 获取指定类型超时订单的id集合
- */
- public List findPayTimeoutOrderIdsByType(LocalDateTime date,Integer type){
- return orderManager.findPayTimeoutOrderIdsByType(date,type)
- .stream().map(MpIdEntity::getId)
- .collect(Collectors.toList());
- }
-
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/service/OrderOperateService.java b/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/service/OrderOperateService.java
deleted file mode 100644
index 7f27c39823eec4aae992958f44f835bab6463cef..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/core/order/service/OrderOperateService.java
+++ /dev/null
@@ -1,143 +0,0 @@
-package cn.bootx.order.core.order.service;
-
-import cn.bootx.common.core.exception.BizException;
-import cn.bootx.order.code.OrderStatusCode;
-import cn.bootx.order.core.order.dao.OrderDetailManager;
-import cn.bootx.order.core.order.dao.OrderManager;
-import cn.bootx.order.core.order.dao.OrderStrategyMappingManager;
-import cn.bootx.order.core.order.entity.Order;
-import cn.bootx.order.core.order.entity.OrderDetail;
-import cn.bootx.order.core.order.entity.OrderStrategyMapping;
-import cn.bootx.order.core.order.factory.OrderFactory;
-import cn.bootx.order.dto.order.OrderDto;
-import cn.bootx.order.param.order.OrderParam;
-import cn.bootx.order.param.order.OrderWholeParam;
-import cn.bootx.sales.core.calculate.service.OrderPreviewService;
-import cn.bootx.sales.core.coupon.service.CouponService;
-import cn.bootx.sales.dto.coupon.CouponDto;
-import cn.bootx.sales.dto.order.OrderPreviewResult;
-import cn.bootx.sales.param.order.OrderCheckParam;
-import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.collection.CollUtil;
-import cn.hutool.core.util.StrUtil;
-import lombok.RequiredArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.time.LocalDateTime;
-import java.util.Collection;
-import java.util.List;
-import java.util.Objects;
-import java.util.stream.Collectors;
-
-/**
- * 订单构建操作类
- * @author xxm
- * @date 2020/10/12
- */
-@Slf4j
-@Service
-@RequiredArgsConstructor
-public class OrderOperateService {
- private final OrderManager orderManager;
- private final OrderDetailManager orderDetailManager;
- private final OrderStrategyMappingManager orderStrategyMappingManager;
-
- private final CouponService couponService;
- private final OrderPreviewService orderPreviewService;
-
- private final OrderFactory orderFactory;
-
- /**
- * 传入订单和优惠, 下单
- */
- @Transactional(rollbackFor = Exception.class)
- public OrderDto placeOrder(OrderWholeParam orderWholeParam){
-
- OrderParam orderParam = orderWholeParam.getOrderParam();
- OrderCheckParam orderCheckParam = this.buildCheckOrder(orderParam);
-
- // 计算价格
- OrderPreviewResult orderCheck = orderPreviewService.previewOrderPrice(orderCheckParam);
-
- // 转换成订单对象
- Order order = orderFactory.buildOrder(orderCheck,orderWholeParam.getOrderParam());
- order.setAddressInfo(orderWholeParam.getOrderAddressInfo());
- order.setInvoiceInfo(orderWholeParam.getOrderInvoiceInfo());
-
- // 锁定优惠券
- if (CollUtil.isNotEmpty(orderCheck.getCoupons())){
- List couponIds = orderCheck.getCoupons().stream().map(CouponDto::getId).collect(Collectors.toList());
- couponService.lockByIds(couponIds);
- }
-
- // 订单持久化
- this.orderInfoPersistence(order);
- // 发布订单创建成功事件
-
- return order.toDto();
- }
-
- /**
- * 持久化
- */
- private void orderInfoPersistence(Order order){
- order.setStatus(OrderStatusCode.STATUS_NORMAL);
-
- // 保存订单
- orderManager.save(order);
- // 保存明细
- orderDetailManager.saveAll(order.getOrderDetails());
-
- List orderStrategyMappings = order.getOrderDetails()
- .stream()
- .map(OrderDetail::getMappings)
- .flatMap(Collection::stream)
- .collect(Collectors.toList());
- // 保存策略映射
- orderStrategyMappingManager.saveAll(orderStrategyMappings);
- }
-
- /**
- * 付款成功状态变更
- */
- public void paidOrderState(Long orderId) {
- Order order = orderManager.findById(orderId).orElseThrow(() -> new BizException("订单未查到"));
- if (!Objects.equals(order.getStatus(), OrderStatusCode.STATUS_NORMAL)) {
- throw new BizException("不可以操作的状态");
- }
-
- order.setStatus(OrderStatusCode.STATUS_NOT_YET_SHIPPED)
- .setPayTime(LocalDateTime.now());
- orderManager.updateById(order);
-
- // 使用优惠券
- String couponIds = order.getCouponIds();
- if (StrUtil.isNotBlank(couponIds)) {
- List ids = StrUtil.split(couponIds, ",").stream()
- .map(Long::new)
- .collect(Collectors.toList());
-// couponClient.useBatch(ids,orderId);
- }
- }
-
- /**
- * 转化成销售中心所需参数
- */
- private OrderCheckParam buildCheckOrder(OrderParam orderParam){
- OrderCheckParam orderCheckParam = new OrderCheckParam();
- BeanUtil.copyProperties(orderParam,orderCheckParam);
- return orderCheckParam;
- }
-
- /**
- * 取消订单
- */
- public void cancelOrderState(Long orderId) {
- Order order = orderManager.findById(orderId).orElseThrow(() -> new BizException("订单未查到"));
- order.setStatus(OrderStatusCode.STATUS_CANCEL);
-// throw new BizException("回滚测试");
- orderManager.updateById(order);
- }
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/dto/billing/OrderBillingDto.java b/bootx-services/service-order/src/main/java/cn/bootx/order/dto/billing/OrderBillingDto.java
deleted file mode 100644
index c823a9e830f2762b30b8572db7d97c5605a26d9d..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/dto/billing/OrderBillingDto.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package cn.bootx.order.dto.billing;
-
-import cn.bootx.common.core.rest.dto.BaseDto;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.List;
-
-/**
-* @author xxm
-* @date 2020/12/9
-*/
-@EqualsAndHashCode(callSuper = true)
-@Data
-@Accessors(chain = true)
-@Schema(title = "订单账单")
-public class OrderBillingDto extends BaseDto implements Serializable {
-
- private static final long serialVersionUID = 6684557809868264317L;
-
- @Schema(description= "账户")
- private Long userId;
-
- @Schema(description= "订单id")
- private Long orderId;
-
- @Schema(description= "支付通道")
- private Integer payType;
-
- @Schema(description= "支付类型名称")
- private String payTypeName;
-
- @Schema(description= "支付金额")
- private BigDecimal amount;
-
- @Schema(description= "使用数量")
- private int count;
-
- @Schema(description= "业务主键")
- private String businessId;
-
- private List orderItemBillings;
-}
\ No newline at end of file
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/dto/billing/OrderItemBillingDto.java b/bootx-services/service-order/src/main/java/cn/bootx/order/dto/billing/OrderItemBillingDto.java
deleted file mode 100644
index 550d438568a481f24990fcb0b19e7f4ed94e1ba1..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/dto/billing/OrderItemBillingDto.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package cn.bootx.order.dto.billing;
-
-import cn.bootx.common.core.rest.dto.BaseDto;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-
-/**
-* @author xxm
-* @date 2020/12/9
-*/
-@EqualsAndHashCode(callSuper = true)
-@Data
-@Accessors(chain = true)
-@Schema(title = "订单详情账单")
-public class OrderItemBillingDto extends BaseDto implements Serializable {
-
- private static final long serialVersionUID = -5696250791473519741L;
-
- @Schema(description= "账单id")
- private Long orderBillingId;
-
- @Schema(description= "用户id")
- private Long userId;
-
- @Schema(description= "订单id")
- private Long orderId;
-
- @Schema(description= "订单项id")
- private Long orderItemId;
-
- @Schema(description= "订单项目skuId")
- private Long orderItemSkuId;
-
- /**
- * @see PayTransactionPurposeCode
- */
- @Schema(description= "交易目的")
- private int transactionPurpose;
-
- /**
- * @see PayTransactionTypeCode
- */
- @Schema(description= "交易类型")
- private int transactionType;
-
- @Schema(description= "支付类型")
- private int payType;
-
- @Schema(description= "支付金额")
- private BigDecimal amount;
-
- @Schema(description= "使用数量")
- private int count;
-
- @Schema(description= "入账时间")
- private Long bookkeepingTime;
-
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/dto/order/OrderAddressDto.java b/bootx-services/service-order/src/main/java/cn/bootx/order/dto/order/OrderAddressDto.java
deleted file mode 100644
index ed3167fd0437cbc7168e8bf51a394bc24441cc0e..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/dto/order/OrderAddressDto.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package cn.bootx.order.dto.order;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-/**
-* 订单收货地址
-* @author xxm
-* @date 2021/1/31
-*/
-@Data
-@Accessors(chain = true)
-@Schema(title = "订单收货地址")
-public class OrderAddressDto {
-
- /** 收货人 */
- private String consignee;
-
- /** 联系方式 */
- private String contact;
-
- /** 手机号 */
- private String phone;
-
- /** 邮政编码 */
- private String postalCode;
-
- /** 省编号 */
- private Integer provinceId;
-
- /** 省名称 */
- private String provinceName;
-
- /** 市编号 */
- private Integer cityId;
-
- /** 市名称 */
- private String cityName;
-
- /** 区县编号 */
- private Integer countyId;
-
- /** 区县名称 */
- private String countyName;
-
- /** 详细地址 */
- private String street;
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/dto/order/OrderDetailDto.java b/bootx-services/service-order/src/main/java/cn/bootx/order/dto/order/OrderDetailDto.java
deleted file mode 100644
index 90df3e1aa40509c9f7efc693cc922fff1c7d2be0..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/dto/order/OrderDetailDto.java
+++ /dev/null
@@ -1,75 +0,0 @@
-package cn.bootx.order.dto.order;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
-* @author xxm
-* @date 2020/10/21
-*/
-@Data
-@Accessors(chain = true)
-@Schema(title = "订单明细")
-public class OrderDetailDto implements Serializable {
-
- private static final long serialVersionUID = 7528634567769864592L;
-
- @Schema(description= "主键ID")
- private Long id;
-
- @Schema(description= "活动ID")
- private Long activeId;
-
- @Schema(description= "店铺ID")
- private Long shopId;
-
- @Schema(description= "订单ID")
- private Long orderId;
-
- @Schema(description= "类目ID")
- private Long categoryId;
-
- @Schema(description= "商品ID")
- private Long goodsId;
-
- @Schema(description= "skuId")
- private Long skuId;
-
- @Schema(description= "商品名")
- private String goodsTitle;
-
- @Schema(description= "商品价格")
- private BigDecimal goodsPrice;
-
- @Schema(description= "商品数量")
- private int num;
-
- @Schema(description= "总金额(原始)")
- private BigDecimal totalAmount;
-
- @Schema(description= "优惠差价")
- private BigDecimal payChange;
-
- @Schema(description= "总金额(优惠后)")
- private BigDecimal payAmount;
-
- @Schema(description= "状态")
- private int state = 0;
-
- @Schema(description= "是否虚拟商品")
- private Boolean isVirtual = false;
-
- @Schema(description= "addition")
- private String addition;
-
- @Schema(description= "应用策略后价格变动记录")
- private List mappings = new ArrayList<>();
-
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/dto/order/OrderDetailPriceDto.java b/bootx-services/service-order/src/main/java/cn/bootx/order/dto/order/OrderDetailPriceDto.java
deleted file mode 100644
index c2d65d560c5847052cf31c486732b2b137cd8ae6..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/dto/order/OrderDetailPriceDto.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package cn.bootx.order.dto.order;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-
-/**
- * @author xxm
- * @date 2020/10/30
- */
-@Data
-@Accessors(chain = true)
-@Schema(title = "订单详细价格")
-public class OrderDetailPriceDto implements Serializable {
-
- private static final long serialVersionUID = 6826090889958126998L;
-
- private Long id;
-
- private Long orderId;
-
- private Long orderDetailId;
-
- private Long orderPriceId;
-
- private String name;
-
- private int type;
-
- private BigDecimal amount;
-
- private String addition;
-
- private String remark;
-
-}
-
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/dto/order/OrderDto.java b/bootx-services/service-order/src/main/java/cn/bootx/order/dto/order/OrderDto.java
deleted file mode 100644
index 472dee15da3770d3875defd500e8c6caf9bbd71e..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/dto/order/OrderDto.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package cn.bootx.order.dto.order;
-
-import cn.bootx.order.code.OrderStatusCode;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.time.LocalDateTime;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * 订单
- * @author xxm
- * @date 2020/10/11
- */
-@Data
-@Accessors(chain = true)
-@Schema(title = "订单")
-public class OrderDto implements Serializable {
- private static final long serialVersionUID = -7600415200619006458L;
-
- @Schema(description= "主键ID")
- private Long id;
-
- @Schema(description= "code")
- private String code;
-
- @Schema(description= "支付时间")
- private LocalDateTime payTime;
-
- @Schema(description= "订单描述")
- private String description;
-
- @Schema(description= "创建时间")
- private LocalDateTime createTime;
-
- @Schema(description= "购买人ID")
- private Long userId;
-
- /**
- * @see OrderStatusCode
- */
- @Schema(description= "状态")
- private Integer status;
-
- @Schema(description= "类型")
- private Integer type;
-
- @Schema(description= "总金额")
- private BigDecimal totalAmount;
-
- @Schema(description= "实付金额")
- private BigDecimal payAmount;
-
- @Schema(description= "渠道ID")
- private Long channelId;
-
- @Schema(description= "所用优惠券")
- private String couponIds;
-
- @Schema(description= "订单明细")
- private List details;
-
- @Schema(description= "优惠金额")
- private List mappings = new ArrayList<>();
-
- @Schema(description= "收货地址")
- private OrderAddressDto orderAddressInfo;
-
- @Schema(description= "发票信息")
- private OrderInvoiceDto orderInvoiceInfo;
-
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/dto/order/OrderInvoiceDto.java b/bootx-services/service-order/src/main/java/cn/bootx/order/dto/order/OrderInvoiceDto.java
deleted file mode 100644
index 20f54ae4abd4ffb4eaccd0b8f339429165aab75a..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/dto/order/OrderInvoiceDto.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package cn.bootx.order.dto.order;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import java.util.Date;
-
-/**
- * 订单发票信息
- * @author xxm
- * @date 2021/1/31
- */
-@Data
-@Accessors(chain = true)
-@Schema(title = "订单发票信息")
-public class OrderInvoiceDto {
-
- /** 发票id */
- private Integer invoiceId;
-
- /** 用户增值税发票id */
- private Integer userInvoiceId;
-
- /** 税号 */
- private String contact;
-
- /** 开户行名称 */
- private String bankName;
-
- /** 开户行账号 */
- private String bankNo;
-
- /** 详细地址 */
- private String registerAddress;
-
- /** 手机号 */
- private String invoicePhone;
-
- /** 发票抬头 */
- private String invoiceTitle;
-
- /** 发票类型 0普通发票1电子发票2增值税发票 */
- private Integer invoiceType;
-
- /** 发票类型名称 0普通发票1电子发票2增值税发票 */
- private String invoiceTypeName;
-
- /** 发票内容 */
- private String invoiceDesc;
-
- /** 开票时间 */
- private Date addTime;
-
- /** 发票状态 */
- private Integer status;
-
- /** 公司名称 */
- private String companyName;
-
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/dto/order/OrderPriceDto.java b/bootx-services/service-order/src/main/java/cn/bootx/order/dto/order/OrderPriceDto.java
deleted file mode 100644
index ad6f850f79c0195ec688eb37920a834d295bd423..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/dto/order/OrderPriceDto.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package cn.bootx.order.dto.order;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-
-/**
- * @author xxm
- * @date 2020/10/18
- */
-@Data
-@Accessors(chain = true)
-@Schema(title = "订单价格")
-public class OrderPriceDto implements Serializable {
-
- private static final long serialVersionUID = 7509707540439019092L;
-
- public static final int TYPE_STRATEGY = 1;
-
- public static final int TYPE_FEE = 2;
-
- public static final int TYPE_TAX = 3;
-
- public static final int TYPE_OTHER = 4;
-
- private Long id;
-
- private Long orderId;
-
- private String name;
-
- private int type;
-
- private BigDecimal amount;
-
- private String addition;
-
- private String remark;
-
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/dto/order/OrderStrategyMappingDto.java b/bootx-services/service-order/src/main/java/cn/bootx/order/dto/order/OrderStrategyMappingDto.java
deleted file mode 100644
index 6535d76d1305ddf3c3caa0105cf729457058b4fc..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/dto/order/OrderStrategyMappingDto.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package cn.bootx.order.dto.order;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-
-/**
-*
-* @author xxm
-* @date 2021/3/10
-*/
-@Data
-@Accessors(chain = true)
-@Schema(title = "应用策略后价格变动记录")
-public class OrderStrategyMappingDto implements Serializable {
- private static final long serialVersionUID = 5845910774643018583L;
-
- @Schema(description= "主键ID")
- private Long id;
-
- @Schema(description= "订单id")
- private Long orderId;
-
- @Schema(description= "明细id")
- private Long orderDetailId;
-
- @Schema(description= "优惠券ID")
- private Long couponId;
-
- @Schema(description= "策略ID")
- private Long strategyId;
-
- @Schema(description= "策略注册ID")
- private Long strategyRegisterId;
-
- @Schema(description= "价格变动")
- private BigDecimal priceChange;
-
- @Schema(description= "描述")
- private String desc;
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/dto/returm/ReturnOrderDetailDto.java b/bootx-services/service-order/src/main/java/cn/bootx/order/dto/returm/ReturnOrderDetailDto.java
deleted file mode 100644
index 6f9bb9b87f82832be07ebd6ae51a892a0b8e4d6e..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/dto/returm/ReturnOrderDetailDto.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package cn.bootx.order.dto.returm;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-
-/**
-*
-* @author xxm
-* @date 2020/11/19
-*/
-@Data
-@Accessors(chain = true)
-@Schema(title = "退货单明细dto")
-public class ReturnOrderDetailDto implements Serializable {
-
- private static final long serialVersionUID = 3467727603218965746L;
-
- @Schema(description= "主键ID")
- private Long id;
-
- @Schema(description= "订单ID")
- private Long orderId;
-
- @Schema(description= "skuId")
- private Long skuId;
-
- @Schema(description= "支付金额")
- private BigDecimal payAmount;
-
- @Schema(description= "原订单明细ID")
- private Long originDetailId;
-
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/dto/returm/ReturnOrderDto.java b/bootx-services/service-order/src/main/java/cn/bootx/order/dto/returm/ReturnOrderDto.java
deleted file mode 100644
index 8abfc91d271de2a74a3e96d2c16956bd941bd19e..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/dto/returm/ReturnOrderDto.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package cn.bootx.order.dto.returm;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.List;
-
-/**
-* @author xxm
-* @date 2020/11/19
-*/
-@Data
-@Accessors(chain = true)
-@Schema(title = "退货单dto")
-public class ReturnOrderDto implements Serializable {
- private static final long serialVersionUID = 3654344763212531452L;
-
- /**
- * 退款中
- */
- public static final int STATE_REFUNDING = 0;
-
- /**
- * 退款成功
- */
- public static final int STATE_REFUNDED = 1;
-
- /**
- * 退款失败
- */
- public static final int STATE_REFUND_FAILURE = 2;
-
-
- @Schema(description= "主键ID")
- private Long id;
-
- @Schema(description= "租户ID")
- private Long tenantId;
-
- @Schema(description= "渠道ID")
- private Long channelId;
-
- @Schema(description= "支付金额")
- private BigDecimal payAmount;
-
- @Schema(description= "原订单ID")
- private Long originOrderId;
-
- @Schema(description= "退货单状态")
- private Integer state;
-
- @Schema(description= "业务主键")
- private Long businessId;
-
- private List detailDtos;
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/exception/order/OrderAlreadyPaidException.java b/bootx-services/service-order/src/main/java/cn/bootx/order/exception/order/OrderAlreadyPaidException.java
deleted file mode 100644
index 91afb3f8e36240b0823e44bac4ae9c9b1d30d5d3..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/exception/order/OrderAlreadyPaidException.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package cn.bootx.order.exception.order;
-
-import cn.bootx.common.core.exception.BizException;
-
-import static cn.bootx.order.code.OrderCenterErrorCode.ORDER_ALREADY_PAID;
-
-/**
- * 订单已支付
-* @author xxm
-* @date 2020/12/10
-*/
-public class OrderAlreadyPaidException extends BizException {
-
- public OrderAlreadyPaidException() {
- super(ORDER_ALREADY_PAID, "订单已支付");
- }
-}
-
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/exception/order/OrderCancelledException.java b/bootx-services/service-order/src/main/java/cn/bootx/order/exception/order/OrderCancelledException.java
deleted file mode 100644
index fb5cc06ea93da376251d007dae492fc4bfdc7613..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/exception/order/OrderCancelledException.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package cn.bootx.order.exception.order;
-
-import cn.bootx.common.core.exception.BizException;
-
-import static cn.bootx.order.code.OrderCenterErrorCode.ORDER_CANCELLED;
-
-/**
-* 订单已取消
-* @author xxm
-* @date 2019/5/28 13:51
-*/
-
-public class OrderCancelledException extends BizException {
-
- public OrderCancelledException() {
- super(ORDER_CANCELLED, "订单被取消");
- }
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/exception/order/OrderNotExistException.java b/bootx-services/service-order/src/main/java/cn/bootx/order/exception/order/OrderNotExistException.java
deleted file mode 100644
index 9b84073248cb4ea32475db9989bd27d818c57482..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/exception/order/OrderNotExistException.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package cn.bootx.order.exception.order;
-
-import cn.bootx.common.core.exception.BizException;
-
-import static cn.bootx.order.code.OrderCenterErrorCode.ORDER_NOT_EXIST;
-
-/**
- * 订单不存在
- * @author xxm
- * @date 2020/11/26
- */
-public class OrderNotExistException extends BizException {
- public OrderNotExistException() {
- super(ORDER_NOT_EXIST, "订单不存在");
- }
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/exception/order/OrderPayingException.java b/bootx-services/service-order/src/main/java/cn/bootx/order/exception/order/OrderPayingException.java
deleted file mode 100644
index e846470aa4a605845e89170ab3db50d0bb6f076b..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/exception/order/OrderPayingException.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package cn.bootx.order.exception.order;
-
-import cn.bootx.common.core.exception.BizException;
-
-import static cn.bootx.order.code.OrderCenterErrorCode.ORDER_PAYING;
-
-/**
-* 订单已付款
-* @author xxm
-* @date 2020/12/10
-*/
-public class OrderPayingException extends BizException {
-
- public OrderPayingException() {
- super(ORDER_PAYING, "订单已付款");
- }
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/exception/order/OrderTimeOutException.java b/bootx-services/service-order/src/main/java/cn/bootx/order/exception/order/OrderTimeOutException.java
deleted file mode 100644
index 365e142ca848474d67fd21ea8365f7ca1ea895eb..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/exception/order/OrderTimeOutException.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package cn.bootx.order.exception.order;
-
-
-import cn.bootx.common.core.exception.BizException;
-
-import static cn.bootx.order.code.OrderCenterErrorCode.ORDER_TIME_OUT;
-
-/**
-* 订单超时
-* @author xxm
-* @date 2020/12/10
-*/
-public class OrderTimeOutException extends BizException {
-
- public OrderTimeOutException() {
- super(ORDER_TIME_OUT, "订单超时");
- }
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/param/billing/BillingItemQueryParam.java b/bootx-services/service-order/src/main/java/cn/bootx/order/param/billing/BillingItemQueryParam.java
deleted file mode 100644
index 3a066a6779cb153c83972bf7604895ac96f272f5..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/param/billing/BillingItemQueryParam.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package cn.bootx.order.param.billing;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import java.io.Serializable;
-import java.time.LocalDateTime;
-import java.util.List;
-
-@Data
-@Accessors(chain = true)
-@Schema(title = "")
-public class BillingItemQueryParam implements Serializable {
-
- private static final long serialVersionUID = -1207002879020383711L;
- private LocalDateTime startDate;
-
- private LocalDateTime endDate;
-
- private LocalDateTime startBookingKeepingDate;
-
- private LocalDateTime endBookingKeepingDate;
-
- private List shiftIds;
-
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/param/billing/BillingOrderDetailParam.java b/bootx-services/service-order/src/main/java/cn/bootx/order/param/billing/BillingOrderDetailParam.java
deleted file mode 100644
index 8354652d1463bd4b589c5eb9763a184bc82080b7..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/param/billing/BillingOrderDetailParam.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package cn.bootx.order.param.billing;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.List;
-
-/**
-* @author xxm
-* @date 2020/12/09
-*/
-@Data
-@Accessors(chain = true)
-@Schema(title = "分账订单明细参数")
-public class BillingOrderDetailParam implements Serializable {
-
- private static final long serialVersionUID = 6183800463776194467L;
- @Schema(description= "订单明细ID", required = true)
- private Long id;
-
- @Schema(description= "库存单品Id", required = true)
- private Long skuId;
-
- @Schema(description= "商品标题")
- private String goodsTitle;
-
- @Schema(description= "商品价格")
- private BigDecimal goodsPrice;
-
- @Schema(description= "数量")
- private int num;
-
- @Schema(description= "支付金额")
- private BigDecimal payAmount;
-
- @Schema(description= "状态")
- private int state = 0;
-
- @Schema(description= "订单项扩展信息")
- private String addition;
-
- /**
- * 该detail不支持的支付方式
- * (例如 部分prod不支持积分支付,那么在记账的时候该product将无法分担积分部分的账单金额)
- */
- @Schema(description= "该detail不支持的支付方式")
- private List unsupportedPaymentType;
-
- @Schema(description= "剩余记账次数(当前只用于订单,不支持商品附加服务额外付款)", hidden = true)
- private int leftBillingNum;
-
- @Schema(description= "未记账金额", hidden = true)
- private BigDecimal leftBillingAmount;
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/param/billing/BillingOrderParam.java b/bootx-services/service-order/src/main/java/cn/bootx/order/param/billing/BillingOrderParam.java
deleted file mode 100644
index 01a92e292fd5be4bf7161462e715d9b93a93cac9..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/param/billing/BillingOrderParam.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package cn.bootx.order.param.billing;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
-* @author xxm
-* @date 2020/12/10
-*/
-@Data
-@Accessors(chain = true)
-@Schema(title = "分账订单参数")
-public class BillingOrderParam implements Serializable {
-
- private static final long serialVersionUID = 157222599179861801L;
- @Schema(description= "订单ID", required = true)
- private Long id;
-
- @Schema(description= "订单号")
- private String code;
-
- @Schema(description= "订单描述")
- private String description;
-
- @Schema(description= "支付金额")
- private BigDecimal payAmount;
-
- @Schema(description= "订单详情列表",required = true)
- private List orderDetailParams = new ArrayList<>();
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/param/billing/BillingQueryWithPageParam.java b/bootx-services/service-order/src/main/java/cn/bootx/order/param/billing/BillingQueryWithPageParam.java
deleted file mode 100644
index c0be4fef65c09bee1b8d2a01ea046062ac646ad7..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/param/billing/BillingQueryWithPageParam.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package cn.bootx.order.param.billing;
-
-import cn.bootx.common.core.rest.param.PageParam;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
-import java.io.Serializable;
-
-@EqualsAndHashCode(callSuper = true)
-@Data
-@Accessors(chain = true)
-@Schema(title = "")
-public class BillingQueryWithPageParam extends PageParam implements Serializable {
-
- private static final long serialVersionUID = -1135003203694525261L;
- private Long userId;
-
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/param/order/OrderDetailParam.java b/bootx-services/service-order/src/main/java/cn/bootx/order/param/order/OrderDetailParam.java
deleted file mode 100644
index 25f9d51284dd4e1a6a9e8694bdd33dd8a39a8f7e..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/param/order/OrderDetailParam.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package cn.bootx.order.param.order;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.List;
-
-@Data
-@Accessors(chain = true)
-@Schema(title = "订单明细参数")
-public class OrderDetailParam implements Serializable {
-
- private static final long serialVersionUID = 2984639517325652160L;
- @Schema(description= "类目id")
- private Long categoryId;
-
- @Schema(description= "活动ID")
- private Long activeId;
-
- @Schema(description= "店铺id")
- private Long shopId;
-
- @Schema(description= "商品id")
- private Long goodsId;
-
- @Schema(description= "sku id")
- private Long skuId;
-
- @Schema(description= "商品名")
- private String goodsTitle;
-
- @Schema(description= "商品价格")
- private BigDecimal goodsPrice;
-
- @Schema(description= "数量")
- private int num;
-
- @Schema(description= "附加参数 json")
- private String addition;
-
- @Schema(description= "使用的活动策略id集合")
- private List activityIds;
-
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/param/order/OrderParam.java b/bootx-services/service-order/src/main/java/cn/bootx/order/param/order/OrderParam.java
deleted file mode 100644
index cd59590d2addbc1ccd28313fe50ddfe22ce2cc6e..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/param/order/OrderParam.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package cn.bootx.order.param.order;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.List;
-
-/**
-* @author xxm
-* @date 2020/10/15
-*/
-@Data
-@Accessors(chain = true)
-@Schema(title = "订单参数")
-public class OrderParam implements Serializable {
-
- private static final long serialVersionUID = 546385575171313726L;
-
- @Schema(description= "code")
- private String code;
-
- @Schema(description= "购者id")
- private Long userId;
-
- @Schema(description= "订单描述")
- private String description;
-
- @Schema(description= "来源")
- private String source;
-
- @Schema(description= "渠道id")
- private Long channelId;
-
- @Schema(description= "订单类型")
- private Integer type;
-
- @Schema(description= "总金额")
- private BigDecimal totalAmount;
-
- @Schema(description= "附加参数 json")
- private String addition;
-
- @Schema(description= "设备id")
- private String deviceId;
-
- @Schema(description= "业务 ID")
- private Long businessId;
-
- @Schema(description= "订单明细")
- private List details;
-
- @Schema(description= "选择的优惠券")
- private List couponIds;
-
- @Schema(description= "全部待选优惠券",hidden = true)
- private List allCouponIds;
-
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/param/order/OrderPriceInfoParam.java b/bootx-services/service-order/src/main/java/cn/bootx/order/param/order/OrderPriceInfoParam.java
deleted file mode 100644
index 7a70aa799e598d981b39babd5c273f40b99c2e44..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/param/order/OrderPriceInfoParam.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package cn.bootx.order.param.order;
-
-
-import cn.bootx.order.dto.order.OrderPriceDto;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-
-/**
-* 应用于订单的价格项目,实付金额会根据本列表进行计算
-* @author xxm
-* @date 2020/10/15
-*/
-@Data
-@Accessors(chain = true)
-@Schema(title = "订单价格信息参数")
-public class OrderPriceInfoParam implements Serializable {
-
-
- public static final int TYPE_STRATEGY = OrderPriceDto.TYPE_STRATEGY;
-
- public static final int TYPE_FEE = OrderPriceDto.TYPE_FEE;
-
- public static final int TYPE_TAX = OrderPriceDto.TYPE_TAX;
-
- public static final int TYPE_OTHER = OrderPriceDto.TYPE_OTHER;
- private static final long serialVersionUID = -2629554281566395675L;
-
-
- /**
- * 价格类型 (默认 TYPE_OTHER)
- */
- private Integer type = TYPE_OTHER;
-
- /**
- * 价格项目名称
- */
- private String name;
-
- /**
- * 金额(实付金额会+/-本金额)
- */
- private BigDecimal amount;
-
- /**
- * 备注内容会直接计入价格项目的备注
- */
- private String remark;
-
- private String addition;
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/param/order/OrderUpdateParam.java b/bootx-services/service-order/src/main/java/cn/bootx/order/param/order/OrderUpdateParam.java
deleted file mode 100644
index 082812bfcbd4b522ea73659df33a95f5e76ffe47..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/param/order/OrderUpdateParam.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package cn.bootx.order.param.order;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
-* @author xxm
-* @date 2020/10/31
-*/
-@Data
-@Accessors(chain = true)
-@Schema(title = "订单更新参数")
-public class OrderUpdateParam implements Serializable {
-
- private static final long serialVersionUID = 4460069559043995466L;
- private Long id;
-
- @Schema(description= "姓名")
- private String contactName;
-
- @Schema(description= "手机")
- private String contactPhone;
-
- @Schema(description= "邮箱")
- private String contactEmail;
-
- @Schema(description= "支付时间")
- private Date payTime;
-
- @Schema(description= "状态")
- private Integer state;
-
- private Long buyerId;
-
-}
diff --git a/bootx-services/service-order/src/main/java/cn/bootx/order/param/order/OrderWholeParam.java b/bootx-services/service-order/src/main/java/cn/bootx/order/param/order/OrderWholeParam.java
deleted file mode 100644
index d590e719b7109e3e0daf6e9b70472fdc6c1deebe..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/java/cn/bootx/order/param/order/OrderWholeParam.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package cn.bootx.order.param.order;
-
-import cn.bootx.order.dto.order.OrderAddressDto;
-import cn.bootx.order.dto.order.OrderInvoiceDto;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import java.io.Serializable;
-
-/**
-* 下单参数
-* @author xxm
-* @date 2021/3/14
-*/
-@Data
-@Accessors(chain = true)
-@Schema(title = "下单参数")
-public class OrderWholeParam implements Serializable {
- private static final long serialVersionUID = 7661069240452921149L;
-
- /** 订单参数 */
- private OrderParam orderParam;
-
- /** 收货信息 */
- private OrderAddressDto orderAddressInfo;
-
- /** 发票信息 */
- private OrderInvoiceDto orderInvoiceInfo;
-}
diff --git a/bootx-services/service-order/src/main/resources/META-INF/spring.factories b/bootx-services/service-order/src/main/resources/META-INF/spring.factories
deleted file mode 100644
index 52fb738b6dc6b64482e876470ec04d871e7b034b..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/resources/META-INF/spring.factories
+++ /dev/null
@@ -1,3 +0,0 @@
-## 配置自动化配置
-org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
- cn.bootx.order.OrderApplication
diff --git a/bootx-services/service-order/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-services/service-order/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
deleted file mode 100644
index fd445ebb2cca8d683cc778d86e1dd47ff64f1367..0000000000000000000000000000000000000000
--- a/bootx-services/service-order/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
+++ /dev/null
@@ -1 +0,0 @@
-cn.bootx.starter.wecom.WeComAutoConfiguration
\ No newline at end of file
diff --git a/bootx-services/service-payment/pom.xml b/bootx-services/service-payment/pom.xml
index 24af9dff77f18b7dabe9f78bbeff86881fac733e..b932bc107e70a321908a616fcde31574918561a1 100644
--- a/bootx-services/service-payment/pom.xml
+++ b/bootx-services/service-payment/pom.xml
@@ -5,7 +5,7 @@
cn.bootx.platform
bootx-services
- 1.2.1
+ 1.2.2
4.0.0
diff --git a/bootx-services/service-sales/README.md b/bootx-services/service-sales/README.md
deleted file mode 100644
index 8f69a8034aaf724cc7b01718b75b84e8f299373e..0000000000000000000000000000000000000000
--- a/bootx-services/service-sales/README.md
+++ /dev/null
@@ -1,124 +0,0 @@
-# 销售中心
-
-## 介绍
-
-## 核心概念
-- 策略定义
-- 策略注册
-- 策略参数定义
-- 策略参数配置
-- 优惠活动
-- 优惠券模板
-- 优惠券
-- 检查规则
-- 匹配规则
-- 特征点
-- 优惠互斥
-- 优惠叠加(使用平行优惠)
-
-## 核心流程时序图
-### 优惠选择时序图
-
-### 优惠检查时序图
-
-### 优惠计算时序图
-
-
-## 说明
-1. 策略定义
- 一种行为的抽象定义,如满减,满折,立减就是一种优惠策略,首次购买、需要身份是会员、生日当天可用就是一种检测策略
- 策略定义根据执行引擎分,有Java原生、Groovy脚本引擎和JavaScript引擎
- - Java原生,通常推荐使用这种类型,性能最优,运行稳定,缺点是无法在运行时进行动态修改
- - JavaScript,可以被热部署,编写脚本保存到数据库中就可以生效,但是无法访问和调用传入参数之外的资源
- - Groovy,相对于JavaScript,Groovy脚本在执行的时候可以调用项目中的Java代码,能实现更灵活的
- 根据应用目标分,有计算、检查、匹配三种。
-
-2. 策略注册
- 策略注册分为优惠活动和优惠券模板,把策略定义看为类的话,策略注册就是根据定义创建的一个个对象,如一个满减策略就可以创建出90-50、30-20,5-4等多种满减方式
-3. 策略参数定义
- 和策略定义是一对多关系,一个策略定义会有多个策略参数定义,把策略定义看做一个函数的话,策略参数定义就是函数的入参定义,例如一个满减策略,需要配置满多少减多少,满多少和减多少就是两个策略参数定义。
-4. 策略参数配置
- 拿90-50满减策略打比喻,通过策略定义创建出这个具体的满减策略时,90和50就是要配置参数。策略参数配置依赖于策略注册,可以视为是创建对象时,所传入的参数值
-5. 优惠活动
- 只要用户符合条件就可以参加的优惠,如双十一全场300-40活动,具体体现可以看看京东,
-6. 优惠券模板
- 根据优惠券模板可以定义将要发送多少张优惠券,使用领取时的限定条件,具体的优惠措施等
-7. 优惠券
- 在购物支付时可以使用的卡券,与活动不同的是,优惠券需要自己手动领取
-8. 检查规则
- 检查传入订单选择的优惠是否合法,分为优惠活动检查和优惠券检查,有领取检查、选择检查和使用检查。一个检查规则会对应到一个策略定义上,
-9. 匹配规则
- 根据特征点匹配关系进行匹配对应策略,核心属性是特征类型、特征点和匹配类型构成
- - 特征类型 如商品分类、所属商店等
- - 特征点 如电子产品,Apple自营店
- - 匹配类型 例如,属于、不属于、大于、小于等
-10. 特征点
- 对传入订单参数进行特征点提取,通过特征点判断是否适用对应的优惠策略,目前抽取特征点算法都是通过java编写,暂不支持其他语言引擎
-
-## 使用说明
-### 添加策略定义
-
-参数对象说明
-
-策略定义对象 `cn.bootx.sales.param.strategy.StrategyParam`
-策略参数定义对象 `cn.bootx.sales.param.strategy.StrategyConfigParam`
-
-通过code和engineType参数找到要执行的优惠策略,想要增加对应的java原生类型策略,需要实现对应接口,并将策略类注册到Spring的Bean容器中
-1. 检查策略,实现`AbstractCheckRule`接口
-2. 计算策略,实现`JavaCalculateHandler`接口
-3. 特征点提取规则,实现`FeatureHandler`接口(虽然不属于策略定义, 但定义方式类似,这也放一份了)
-
-
-### 检查规则
-
-计算时具体执行逻辑通过
-
-**检查规则对象 CheckRuleParam**
-
-| 参数 | 名称 | 说明 |
-| ---------- | -------- | ------------------------------------------ |
-| priority | 优先级 | 运行时的顺序,优先级越高越靠前 |
-| name | 规则名称 | 名称 |
-| code | 规则code | 编码 |
-| ruleType | 规则类型 | 优惠券模板类型和活动类型 |
-| strategyId | 策略id | 策略定义的id, 用来关联到检查策略 |
-| addition | 附加对象 | 计算时所需要的参数,相当于策略运行时的参数 |
-
-### 匹配规则
-
-**匹配规则对象 MatchRuleParam**
-
-| 参数 | 名称 | 说明 |
-| ------------ | -------- | ----------------------------- |
-| featureType | 特征类型 | 要被抽取特征点的类型,如skuId |
-| featurePoint | 特征点 | 具体的特征点值 |
-| matchType | 匹配类型 | 和订单进行匹配的明细 |
-
-1. 新增特征点提取规则,实现`FeatureHandler`接口
-
-### 添加活动
-
-第一需要设置应用的是那种策略,第二是设置会根据哪些特征点进行匹配,第三是选择、使用等时候的检查规则
-
-参数对象说明
-
-活动参数对象 `cn.bootx.sales.param.activity.ActivityParam`
-策略参数值 `cn.bootx.sales.param.strategy.StrategyConfigValueParam`
-检查规则参数 `cn.bootx.sales.param.strategy.CheckRuleParam`
-匹配配置 `cn.bootx.sales.param.strategy.MatchRuleParam`
-
-### 添加优惠劵模板
-
-基本同优惠活动,第一需要设置应用的是那种策略,第二是设置会根据哪些特征点进行匹配,第三是领取、使用等时候的检查规则, 第四是优惠券特有的一些配置
-
-参数对象说明
-优惠券模板 `cn.bootx.sales.param.coupon.CouponTemplateParam`
-策略参数值 `cn.bootx.sales.param.strategy.StrategyConfigValueParam`
-检查规则参数 `cn.bootx.sales.param.strategy.CheckRuleParam`
-匹配配置 `cn.bootx.sales.param.strategy.MatchRuleParam`
-
-### 计算价格
-调用 `cn.bootx.sales.core.calculate.service.OrderPreviewService`的 `previewOrderPrice`或者`previewOrderPriceNoCheck`方法
-
-### 缓存构建
-因为计算时或对订单策略进行监察室会访问很多数据,io开销较大,为了提高预算是的速度,在进行计算之前,会提前缓存计算过程中所需要的数据,参见`CalculateFactory`和`CalculateCache`对象
\ No newline at end of file
diff --git a/bootx-services/service-sales/pom.xml b/bootx-services/service-sales/pom.xml
deleted file mode 100644
index 05b0b1cdac84e3add8ff218e30a56e54f399dc6f..0000000000000000000000000000000000000000
--- a/bootx-services/service-sales/pom.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
- bootx-services
- cn.bootx.platform
- 1.2.1
-
- 4.0.0
-
- service-sales
-
-
-
-
- com.mysql
- mysql-connector-j
- runtime
-
-
-
-
- com.baomidou
- mybatis-plus-boot-starter
-
-
-
-
diff --git a/bootx-services/service-sales/src/main/java/cn/bootx/sales/SalesApplication.java b/bootx-services/service-sales/src/main/java/cn/bootx/sales/SalesApplication.java
deleted file mode 100644
index 23bc6dd522d963f443abd8a4557a2381e876bb1c..0000000000000000000000000000000000000000
--- a/bootx-services/service-sales/src/main/java/cn/bootx/sales/SalesApplication.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package cn.bootx.sales;
-
-import org.apache.ibatis.annotations.Mapper;
-import org.mybatis.spring.annotation.MapperScan;
-import org.springframework.context.annotation.ComponentScan;
-
-/**
-* 销售中心
-* @author xxm
-* @date 2021/8/10
-*/
-@ComponentScan
-@MapperScan(annotationClass = Mapper.class)
-public class SalesApplication {
-}
diff --git a/bootx-services/service-sales/src/main/java/cn/bootx/sales/code/CheckRuleCode.java b/bootx-services/service-sales/src/main/java/cn/bootx/sales/code/CheckRuleCode.java
deleted file mode 100644
index 60a8f8f2b93f34b9a36f876888e3618c32e7b9d7..0000000000000000000000000000000000000000
--- a/bootx-services/service-sales/src/main/java/cn/bootx/sales/code/CheckRuleCode.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package cn.bootx.sales.code;
-
-/**
- *
- * @author xxm
- * @date 2021/5/8
- */
-public interface CheckRuleCode {
-
- /** 活动策略类型 */
- int RULE_ACTIVITY = StrategyCode.ACTIVITY;
-
- /** 优惠券类型 */
- int RULE_COUPON = StrategyCode.COUPON;
-
- /* 检查类型规则 */
- /** 活动使用检查 */
- int RULE_TYPE_ACTIVITY_CHECK = 1;
-
- /** 优惠券使用检查 */
- int RULE_TYPE_COUPON_CHECK = 2;
-
- /** 优惠券领取检查 */
- int RULE_TYPE_COUPON_OBTAIN = 3;
-
- interface Activity {
- /** 渠道检查 */
- String CHECK_CHANNEL = "activityCheckChannel";
-
- }
-
- interface Coupon {
-
- /** 渠道检查 */
- String CHECK_CHANNEL = "couponCheckChannel";
-
- /** 是否支持多个同时使用 */
- String CHECK_USE_MULTIPLE = "couponCheckUseMultiple";
-
- /** 是否支持领取多张 */
- String OBTAIN_MULTIPLE = "obtainMultiple";
-
- /** 领取时渠道限制 */
- String OBTAIN_CHANNEL_LIMIT = "obtainChannelLimit";
-
- /** 领取时间限制 */
- String OBTAIN_TIME_LIMIT = "obtainTimeLimit";
-
- /** 领取张数限制 */
- String OBTAIN_NUM_LIMIT = "obtainNumLimit";
-
- }
-}
diff --git a/bootx-services/service-sales/src/main/java/cn/bootx/sales/code/CouponStatusCode.java b/bootx-services/service-sales/src/main/java/cn/bootx/sales/code/CouponStatusCode.java
deleted file mode 100644
index 827c1dd61c778c8ff923a3eeb2b0998ba78e2215..0000000000000000000000000000000000000000
--- a/bootx-services/service-sales/src/main/java/cn/bootx/sales/code/CouponStatusCode.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package cn.bootx.sales.code;
-
-/**
-* 优惠券状态
-* @author xxm
-* @date 2020/12/1
-*/
-public interface CouponStatusCode {
- /** 正常可用 */
- int STATUS_NORMAL = 1;
- /** 冻结 */
- int STATUS_FREEZE = 2;
- /** 已使用 */
- int STATUS_USED = 3;
- /** 已过期 */
- int STATUS_EXPIRED = 4;
- /** 已撤销 */
- int STATUS_REVOKE = 5;
-}
diff --git a/bootx-services/service-sales/src/main/java/cn/bootx/sales/code/MatchRuleCode.java b/bootx-services/service-sales/src/main/java/cn/bootx/sales/code/MatchRuleCode.java
deleted file mode 100644
index f8b297e98c5cecf7209746632be46fc98ea2e497..0000000000000000000000000000000000000000
--- a/bootx-services/service-sales/src/main/java/cn/bootx/sales/code/MatchRuleCode.java
+++ /dev/null
@@ -1,76 +0,0 @@
-package cn.bootx.sales.code;
-
-import java.util.Arrays;
-import java.util.List;
-
-/**
-* 匹配策略
-* @author xxm
-* @date 2020/12/3
-*/
-public interface MatchRuleCode {
-
- /** 活动策略类型 */
- int MATCH_ACTIVITY = StrategyCode.ACTIVITY;
- /** 优惠券类型 */
- int MATCH_COUPON = StrategyCode.COUPON;
-
- /**
- * 注册类型 - SKU
- */
- int MATCH_TYPE_SKU = 1;
-
- /**
- * 注册类型 - 商品
- */
- int MATCH_TYPE_GOODS = 2;
-
- /**
- * 注册类型 - 类目
- */
- int MATCH_TYPE_CATEGORY = 3;
-
- /**
- * 注册类型 - 店铺
- */
- int MATCH_TYPE_SHOP = 4;
-
- /**
- * 注册类型 - 活动
- */
- int MATCH_TYPE_ACTIVE = 5;
-
- /**
- * 注册类型 - 全局适用
- */
- int MATCH_TYPE_GLOBAL = 6;
-
- /**
- * 注册类型 - 非虚拟商品
- */
- int MATCH_TYPE_NOT_VIRTUAL = 7;
-
- /**
- * 注册类型 - 排除指定SKU
- */
- int MATCH_TYPE_EXCLUDE_SKU = 11;
-
- /**
- * 注册类型 - 排除指定商品
- */
- int MATCH_TYPE_EXCLUDE_GOODS = 12;
-
- /**
- * 注册类型 - 排除指定类目
- */
- int MATCH_TYPE_EXCLUDE_CATEGORY = 13;
-
- List GLOBAL_ACTIVITY = Arrays.asList(
- MATCH_TYPE_GLOBAL,
- MATCH_TYPE_NOT_VIRTUAL,
- MATCH_TYPE_EXCLUDE_SKU,
- MATCH_TYPE_EXCLUDE_GOODS,
- MATCH_TYPE_EXCLUDE_CATEGORY
- );
-
-}
diff --git a/bootx-services/service-sales/src/main/java/cn/bootx/sales/code/MatchTypeCode.java b/bootx-services/service-sales/src/main/java/cn/bootx/sales/code/MatchTypeCode.java
deleted file mode 100644
index 22f4c8e03af406c174d7506ce115ad3ec2a39e03..0000000000000000000000000000000000000000
--- a/bootx-services/service-sales/src/main/java/cn/bootx/sales/code/MatchTypeCode.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package cn.bootx.sales.code;
-
-/**
-* 匹配类型
-* @author xxm
-* @date 2021/5/18
-*/
-public interface MatchTypeCode {
- String EQ = "eq";
- String NE = "ne";
- String LIKE = "like";
- String GT = "gt";
- String GE = "ge";
- String LT = "lt";
- String LE = "le";
- String IN = "in";
-}
diff --git a/bootx-services/service-sales/src/main/java/cn/bootx/sales/code/SalesCenterCode.java b/bootx-services/service-sales/src/main/java/cn/bootx/sales/code/SalesCenterCode.java
deleted file mode 100644
index 2f506b444771466ed03c328d97c9de3913a18996..0000000000000000000000000000000000000000
--- a/bootx-services/service-sales/src/main/java/cn/bootx/sales/code/SalesCenterCode.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package cn.bootx.sales.code;
-
-/**
-*
-* @author xxm
-* @date 2021/4/13
-*/
-public interface SalesCenterCode {
-
- /**
- * 项目名称
- */
- String APPLICATION_NAME = "service-sales-center";
-}
diff --git a/bootx-services/service-sales/src/main/java/cn/bootx/sales/code/SalesCenterErrorCode.java b/bootx-services/service-sales/src/main/java/cn/bootx/sales/code/SalesCenterErrorCode.java
deleted file mode 100644
index 0ad118bdda821f0588a7a2d78fc1a499f5326ddd..0000000000000000000000000000000000000000
--- a/bootx-services/service-sales/src/main/java/cn/bootx/sales/code/SalesCenterErrorCode.java
+++ /dev/null
@@ -1,66 +0,0 @@
-
-package cn.bootx.sales.code;
-
-/**
-* 错误码定义类
-* @author xxm
-* @date 2020/10/11
-*/
-public interface SalesCenterErrorCode {
-
- /**
- * 策略计算错误
- */
- int STRATEGY_CALCULATE_ERROR = 23010;
-
- /**
- * 策略已使用不可修改
- */
- int STRATEGY_ALREADY_USED = 23011;
-
- /**
- * 策略注册信息已存在
- */
- int STRATEGY_REGISTER_ALREADY_EXIST = 23012;
-
- /**
- * 策略类型错误
- */
- int STRATEGY_TYPE_ERROR = 23013;
-
- /**
- * 策略不存在
- */
- int STRATEGY_NOT_EXIST = 23014;
-
- /**
- * 渠道端已经被使用
- */
- int CLIENT_ALREADY_USED = 23016;
-
- /**
- * 渠道端不存在
- */
- int CLIENT_NOT_FOUND = 23017;
-
- /**
- * ID不存在
- */
- int ID_NOT_EXISTS = 23018;
-
- /**
- * 渠道已存在
- */
- int CHANNEL_ALREADY_EXISTS = 23019;
-
- /**
- * 优惠券领取异常
- */
- int COUPON_OBTAIN_EXCEPTION = 23020;
-
- /**
- * 优惠券使用异常
- */
- int COUPON_USE_EXCEPTION = 23021;
-
-}
diff --git a/bootx-services/service-sales/src/main/java/cn/bootx/sales/code/StrategyCode.java b/bootx-services/service-sales/src/main/java/cn/bootx/sales/code/StrategyCode.java
deleted file mode 100644
index 5b3b5e57fc6abec597409d9bdd0a695af27e8557..0000000000000000000000000000000000000000
--- a/bootx-services/service-sales/src/main/java/cn/bootx/sales/code/StrategyCode.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package cn.bootx.sales.code;
-
-/**
-* 策略code
-* @author xxm
-* @date 2021/3/10
-*/
-public interface StrategyCode {
-
- /** 系统内置 */
- int ENGINE_SYSTEM = 1;
- /** JavaScript引擎 */
- int ENGINE_JAVASCRIPT = 2;
- /** Groovy引擎 */
- int ENGINE_GROOVY = 3;
-
- /** 活动策略 */
- int ACTIVITY = 1;
- /** 优惠券 */
- int COUPON = 2;
-
- /** 计算 */
- int TARGET_TYPE_CALCULATE = 1;
- /** 匹配 */
- int TARGET_TYPE_MATCH = 2;
- /** 检查 */
- int TARGET_TYPE_CHECK = 3;
-
-
-}
diff --git a/bootx-services/service-sales/src/main/java/cn/bootx/sales/code/StrategyRegisterCode.java b/bootx-services/service-sales/src/main/java/cn/bootx/sales/code/StrategyRegisterCode.java
deleted file mode 100644
index a3b1699dc30514f72d65c0db8af578b24bad22f8..0000000000000000000000000000000000000000
--- a/bootx-services/service-sales/src/main/java/cn/bootx/sales/code/StrategyRegisterCode.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package cn.bootx.sales.code;
-
-/**
-* 策略注册相关常量
-* @author xxm
-* @date 2020/11/8
-*/
-public interface StrategyRegisterCode {
-
- /**
- * 策略类型 活动
- */
- int STRATEGY_TYPE_ACTIVITY = StrategyCode.ACTIVITY;
-
- /**
- * 策略类型 优惠券
- */
- int STRATEGY_TYPE_COUPON = StrategyCode.COUPON;
-
- /**
- * 策略状态
- */
- int STATE_NORMAL = 1;
- int STATE_NOT_ACTIVE = 0;
-
- /**
- * 策略激活状态
- */
- int ACTIVE_YES = 1;
- int ACTIVE_NO = 0;
-}
diff --git a/bootx-services/service-sales/src/main/java/cn/bootx/sales/controller/ActivityController.java b/bootx-services/service-sales/src/main/java/cn/bootx/sales/controller/ActivityController.java
deleted file mode 100644
index 0a7c4b2c1a6602ac822cbc561b668daea4032c58..0000000000000000000000000000000000000000
--- a/bootx-services/service-sales/src/main/java/cn/bootx/sales/controller/ActivityController.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package cn.bootx.sales.controller;
-
-import cn.bootx.common.core.rest.Res;
-import cn.bootx.common.core.rest.ResResult;
-import cn.bootx.sales.core.activity.service.ActivityService;
-import cn.bootx.sales.dto.activity.ActivityDto;
-import cn.bootx.sales.param.activity.ActivityParam;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import lombok.AllArgsConstructor;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-
-/**
-* @author xxm
-* @date 2021/5/7
-*/
-@Tag(name ="活动")
-@RestController
-@RequestMapping("/activity")
-@AllArgsConstructor
-public class ActivityController {
- private final ActivityService activityService;
-
- @Operation(summary = "注册活动")
- @PostMapping("/add")
- public ResResult add(@RequestBody ActivityParam param){
- return Res.ok(activityService.addByActivity(param));
- }
-
- @Operation(summary = "查询活动")
- @GetMapping("/findAll")
- public ResResult> findAll(){
- return Res.ok(activityService.findAll());
- }
-
- @Operation(summary = "查询活动")
- @GetMapping("//get/{id}")
- public ResResult get(@PathVariable Long id){
- return Res.ok(activityService.get(id));
- }
-}
diff --git a/bootx-services/service-sales/src/main/java/cn/bootx/sales/controller/CouponController.java b/bootx-services/service-sales/src/main/java/cn/bootx/sales/controller/CouponController.java
deleted file mode 100644
index 603f26f1082251c4089b05d2ed8018be9a4e98dd..0000000000000000000000000000000000000000
--- a/bootx-services/service-sales/src/main/java/cn/bootx/sales/controller/CouponController.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package cn.bootx.sales.controller;
-
-import cn.bootx.common.core.rest.Res;
-import cn.bootx.common.core.rest.ResResult;
-import cn.bootx.sales.core.coupon.service.CouponService;
-import cn.bootx.sales.dto.coupon.CouponDto;
-import cn.bootx.sales.param.coupon.ObtainCouponParam;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import lombok.RequiredArgsConstructor;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-
-/**
-* @author xxm
-* @date 2020/11/1
-*/
-@Tag(name ="优惠券")
-@RestController
-@RequestMapping("/coupon")
-@RequiredArgsConstructor
-public class CouponController {
- private final CouponService couponService;
-
- @Operation(summary = "领取优惠券")
- @PostMapping("/obtainCoupon")
- public ResResult obtainCoupon(@RequestBody ObtainCouponParam param){
- couponService.obtainCoupon(param);
- return Res.ok();
- }
-
- @Operation(summary = "个人可用的优惠券")
- @GetMapping("/findCoupon")
- public ResResult> findCoupon(Long userId){
- return Res.ok(couponService.findCouponByUserId(userId));
- }
-
- @Operation(summary = "批量优惠券")
- @GetMapping("/getById")
- public ResResult getByIds(Long couponId){
- return Res.ok(couponService.getById(couponId));
- }
-
- @Operation(summary = "批量查询优惠券")
- @GetMapping("/findByIds")
- public ResResult> findByIds(List couponIds){
- return Res.ok(couponService.findByIds(couponIds));
- }
-
- @Operation(summary = "锁定优惠券")
- @PostMapping("/lockById")
- public ResResult lockById(Long couponId){
- couponService.lockById(couponId);
- return Res.ok();
- }
-
- @Operation(summary = "批量锁定优惠券")
- @PostMapping("/lockByIds")
- public ResResult lockByIds(List couponIds){
- couponService.lockByIds(couponIds);
- return Res.ok();
- }
-
-
-}
diff --git a/bootx-services/service-sales/src/main/java/cn/bootx/sales/controller/CouponTemplateController.java b/bootx-services/service-sales/src/main/java/cn/bootx/sales/controller/CouponTemplateController.java
deleted file mode 100644
index 5d11fcb06ecbaf87aff3559854b757fbae9ac1ad..0000000000000000000000000000000000000000
--- a/bootx-services/service-sales/src/main/java/cn/bootx/sales/controller/CouponTemplateController.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package cn.bootx.sales.controller;
-
-import cn.bootx.common.core.rest.Res;
-import cn.bootx.common.core.rest.ResResult;
-import cn.bootx.sales.core.coupon.service.CouponTemplateService;
-import cn.bootx.sales.dto.coupon.CouponTemplateDto;
-import cn.bootx.sales.param.coupon.CouponTemplateParam;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import lombok.AllArgsConstructor;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-
-/**
-* @author xxm
-* @date 2020/11/1
-*/
-@Tag(name ="优惠券模板")
-@RestController
-@RequestMapping("/coupon/template")
-@AllArgsConstructor
-public class CouponTemplateController {
- private final CouponTemplateService couponTemplateService;
-
- @Operation(summary = "新建优惠券模板")
- @PostMapping("/add")
- public ResResult addCouponTemplate(@RequestBody CouponTemplateParam param){
- return Res.ok(couponTemplateService.add(param));
- }
-
- @Operation(summary = "查询优惠券模板")
- @PostMapping("/findAll")
- public ResResult> findAll(){
- return Res.ok(couponTemplateService.findAll());
- }
-
- @Operation(summary = "优惠券模板详情")
- @PostMapping("/get/{id}")
- public ResResult get(@PathVariable Long id){
- return Res.ok(couponTemplateService.findById(id));
- }
-}
diff --git a/bootx-services/service-sales/src/main/java/cn/bootx/sales/controller/OrderPreviewController.java b/bootx-services/service-sales/src/main/java/cn/bootx/sales/controller/OrderPreviewController.java
deleted file mode 100644
index 7199dc7bd05bea8d3852394cac27123b55247086..0000000000000000000000000000000000000000
--- a/bootx-services/service-sales/src/main/java/cn/bootx/sales/controller/OrderPreviewController.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package cn.bootx.sales.controller;
-
-import cn.bootx.common.core.rest.Res;
-import cn.bootx.common.core.rest.ResResult;
-import cn.bootx.sales.core.calculate.service.OrderPreviewService;
-import cn.bootx.sales.dto.order.OrderPreviewResult;
-import cn.bootx.sales.param.order.OrderCheckParam;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import lombok.AllArgsConstructor;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
-* @author xxm
-* @date 2020/10/17
-*/
-@Tag(name ="订单计算")
-@RestController
-@RequestMapping("/order/preview")
-@AllArgsConstructor
-public class OrderPreviewController {
- private final OrderPreviewService orderPreviewService;
-
-
- @Operation(summary = "预览价格(手动)")
- @PostMapping("/previewOrderPrice")
- public ResResult previewOrderPrice(@RequestBody OrderCheckParam orderParam){
- return Res.ok(orderPreviewService.previewOrderPrice(orderParam));
- }
-
- @Operation(summary = "预览价格(手动无检查)")
- @PostMapping("/previewOrderPriceNoCheck")
- public ResResult previewOrderPriceNoCheck(@RequestBody OrderCheckParam orderParam){
- return Res.ok(orderPreviewService.previewOrderPriceNoCheck(orderParam));
- }
-}
diff --git a/bootx-services/service-sales/src/main/java/cn/bootx/sales/controller/OrderRecommendController.java b/bootx-services/service-sales/src/main/java/cn/bootx/sales/controller/OrderRecommendController.java
deleted file mode 100644
index 3037ea58dfe905ecd8b34eabcab135b42bfc7320..0000000000000000000000000000000000000000
--- a/bootx-services/service-sales/src/main/java/cn/bootx/sales/controller/OrderRecommendController.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package cn.bootx.sales.controller;
-
-import cn.bootx.common.core.rest.Res;
-import cn.bootx.common.core.rest.ResResult;
-import cn.bootx.sales.core.recommend.OrderFindActivityService;
-import cn.bootx.sales.core.recommend.OrderFindCouponService;
-import cn.bootx.sales.dto.coupon.CouponDto;
-import cn.bootx.sales.dto.order.GoodsActivityResult;
-import cn.bootx.sales.param.order.OrderCheckParam;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import lombok.AllArgsConstructor;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import java.util.List;
-
-/**
-* @author xxm
-* @date 2021/5/14
-*/
-@Tag(name ="订单优惠选择与推荐")
-@RestController
-@RequestMapping("/order/recommend")
-@AllArgsConstructor
-public class OrderRecommendController {
-
- private final OrderFindCouponService couponSelectCheckService;
- private final OrderFindActivityService orderFindActivityService;
-
-
- @Operation(summary = "查询适用的活动")
- @PostMapping("/findActivity")
- public ResResult> findActivity(@RequestBody OrderCheckParam orderParam){
- return Res.ok(orderFindActivityService.findActivity(orderParam));
- }
-
- @Operation(summary = "查询适用的优惠券")
- @PostMapping("/findCoupon")
- public ResResult> findCoupon(@RequestBody OrderCheckParam orderParam){
- return Res.ok(couponSelectCheckService.findCoupon(orderParam));
- }
-}
diff --git a/bootx-services/service-sales/src/main/java/cn/bootx/sales/controller/StrategyController.java b/bootx-services/service-sales/src/main/java/cn/bootx/sales/controller/StrategyController.java
deleted file mode 100644
index e0e90c661e9e7b6afb907ffcec72a71387ad2860..0000000000000000000000000000000000000000
--- a/bootx-services/service-sales/src/main/java/cn/bootx/sales/controller/StrategyController.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package cn.bootx.sales.controller;
-
-import cn.bootx.common.core.rest.Res;
-import cn.bootx.common.core.rest.ResResult;
-import cn.bootx.sales.core.strategy.service.StrategyService;
-import cn.bootx.sales.dto.strategy.StrategyConfigDto;
-import cn.bootx.sales.dto.strategy.StrategyDto;
-import cn.bootx.sales.param.strategy.StrategyParam;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import lombok.AllArgsConstructor;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-
-/**
- * @author xxm
- * @date 2020/10/17
- */
-@Tag(name ="策略定义")
-@RestController
-@RequestMapping("/strategy")
-@AllArgsConstructor
-public class StrategyController {
- private final StrategyService strategyService;
-
- @Operation(summary = "添加策略")
- @PostMapping("/add")
- public ResResult add(@RequestBody StrategyParam param){
- strategyService.add(param);
- return Res.ok();
- }
-
- @Operation(summary = "更新策略")
- @PostMapping("/update")
- public ResResult update(@RequestBody StrategyParam param){
- return Res.ok(strategyService.update(param));
- }
-
- @Operation(summary = "查询全部策略")
- @GetMapping("/findAll")
- public ResResult> findAll(){
- return Res.ok(strategyService.findAll());
- }
-
- @Operation(summary = "获取策略及其配置项")
- @GetMapping("/findById")
- public ResResult findById(Long id){
- return Res.ok(strategyService.findById(id));
- }
-
- @Operation(summary = "获取参数配置")
- @GetMapping("/findConfigs")
- public ResResult> findConfigs(Long id){
- return Res.ok(strategyService.findConfigsByStrategyId(id));
- }
-
- @Operation(summary = "根据类型查询")
- @GetMapping("/findByType")
- public ResResult> findByType(Integer type){
- return Res.ok(strategyService.findByType(type));
- }
-
-}
diff --git a/bootx-services/service-sales/src/main/java/cn/bootx/sales/controller/StrategyRegisterController.java b/bootx-services/service-sales/src/main/java/cn/bootx/sales/controller/StrategyRegisterController.java
deleted file mode 100644
index ac040f81be5e445f124a1c67bb6ff11b32a1ac9c..0000000000000000000000000000000000000000
--- a/bootx-services/service-sales/src/main/java/cn/bootx/sales/controller/StrategyRegisterController.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package cn.bootx.sales.controller;
-
-import cn.bootx.common.core.rest.Res;
-import cn.bootx.common.core.rest.ResResult;
-import cn.bootx.sales.core.strategy.service.StrategyRegisterService;
-import cn.bootx.sales.dto.strategy.StrategyRegisterDto;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import lombok.AllArgsConstructor;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-
-/**
- * @author xxm
- * @date 2020/10/17
- */
-@Tag(name ="策略注册")
-@RestController
-@RequestMapping("/strategy/register")
-@AllArgsConstructor
-public class StrategyRegisterController {
- private final StrategyRegisterService strategyRegisterService;
-
-
- @Operation(summary = "查询全部")
- @GetMapping("/findAll")
- public ResResult> findAll(){
- return Res.ok(strategyRegisterService.findAll());
- }
-
- @Operation(summary = "删除")
- @DeleteMapping("/del/{id}")
- public ResResult delete(@PathVariable Long id){
- strategyRegisterService.deleteById(id);
- return Res.ok();
- }
-
-}
diff --git a/bootx-services/service-sales/src/main/java/cn/bootx/sales/core/activity/convert/ActivityConvert.java b/bootx-services/service-sales/src/main/java/cn/bootx/sales/core/activity/convert/ActivityConvert.java
deleted file mode 100644
index 1db7af096fd27932d1e3ccf059154855a7ab5c44..0000000000000000000000000000000000000000
--- a/bootx-services/service-sales/src/main/java/cn/bootx/sales/core/activity/convert/ActivityConvert.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package cn.bootx.sales.core.activity.convert;
-
-import cn.bootx.sales.core.activity.entity.Activity;
-import cn.bootx.sales.dto.activity.ActivityDto;
-import cn.bootx.sales.dto.activity.SimpleActivity;
-import cn.bootx.sales.param.activity.ActivityParam;
-import org.mapstruct.Mapper;
-import org.mapstruct.Mapping;
-import org.mapstruct.Mappings;
-import org.mapstruct.factory.Mappers;
-
-/**
-* 转换
-* @author xxm
-* @date 2021/5/19
-*/
-@Mapper
-public interface ActivityConvert {
- ActivityConvert CONVERT = Mappers.getMapper(ActivityConvert.class);
-
- @Mapping(target = "activityMutual", ignore = true)
- Activity convert(ActivityParam in);
-
- @Mapping(target = "creator", ignore = true)
- Activity convert(ActivityDto in);
-
- @Mapping(target = "configValues", ignore = true)
- ActivityDto convert(Activity in);
-
- SimpleActivity simple(ActivityDto in);
-
- SimpleActivity simple(Activity in);
-}
diff --git a/bootx-services/service-sales/src/main/java/cn/bootx/sales/core/activity/dao/ActivityManager.java b/bootx-services/service-sales/src/main/java/cn/bootx/sales/core/activity/dao/ActivityManager.java
deleted file mode 100644
index 45dd9f28716fdde9fcbbb89dac6dc242d82df5ad..0000000000000000000000000000000000000000
--- a/bootx-services/service-sales/src/main/java/cn/bootx/sales/core/activity/dao/ActivityManager.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package cn.bootx.sales.core.activity.dao;
-
-import cn.bootx.common.mybatisplus.impl.BaseManager;
-import cn.bootx.sales.core.activity.entity.Activity;
-import lombok.RequiredArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Repository;
-
-import java.util.List;
-
-/**
-* 优惠活动
-* @author xxm
-* @date 2021/5/7
-*/
-@Slf4j
-@Repository
-@RequiredArgsConstructor
-public class ActivityManager extends BaseManager {
-
- /**
- * 根据策略注册ids查询
- */
- public List findByStrategyRegister(List strategyRegisterIds){
- return findAllByFields(Activity::getStrategyRegisterId,strategyRegisterIds);
- }
-}
diff --git a/bootx-services/service-sales/src/main/java/cn/bootx/sales/core/activity/dao/ActivityMapper.java b/bootx-services/service-sales/src/main/java/cn/bootx/sales/core/activity/dao/ActivityMapper.java
deleted file mode 100644
index 2d00c6b670a91d5ed5276ba4532fb9afa39528e9..0000000000000000000000000000000000000000
--- a/bootx-services/service-sales/src/main/java/cn/bootx/sales/core/activity/dao/ActivityMapper.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package cn.bootx.sales.core.activity.dao;
-
-import cn.bootx.sales.core.activity.entity.Activity;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.apache.ibatis.annotations.Mapper;
-
-/**
-* 活动
-* @author xxm
-* @date 2021/5/7
-*/
-@Mapper
-public interface ActivityMapper extends BaseMapper