Commit 160606356e4a142ad4a3f2e95e165ffc53bac4ae
Committed by
Gitee
!467 修正相关问题让服务正常启动,改动位置都已加上TODO记录
Merge pull request !467 from puhui999/feature/mall_product
Showing
19 changed files
with
390 additions
and
47 deletions
pom.xml
| ... | ... | @@ -16,7 +16,7 @@ |
| 16 | 16 | <module>yudao-module-member</module> |
| 17 | 17 | <module>yudao-module-system</module> |
| 18 | 18 | <module>yudao-module-infra</module> |
| 19 | -<!-- <module>yudao-module-pay</module>--> | |
| 19 | + <module>yudao-module-pay</module> | |
| 20 | 20 | <!-- <module>yudao-module-bpm</module>--> |
| 21 | 21 | <!-- <module>yudao-module-report</module>--> |
| 22 | 22 | <!-- <module>yudao-module-mp</module>--> | ... | ... |
sql/mysql/optional/mall.sql
0 → 100644
| 1 | +/* | |
| 2 | + Navicat Premium Data Transfer | |
| 3 | + | |
| 4 | + Source Server : 127.0.0.1 MySQL | |
| 5 | + Source Server Type : MySQL | |
| 6 | + Source Server Version : 80026 | |
| 7 | + Source Host : localhost:3306 | |
| 8 | + Source Schema : ruoyi-vue-pro | |
| 9 | + | |
| 10 | + Target Server Type : MySQL | |
| 11 | + Target Server Version : 80026 | |
| 12 | + File Encoding : 65001 | |
| 13 | + | |
| 14 | + Date: 01/08/2022 23:01:36 | |
| 15 | +*/ | |
| 16 | + | |
| 17 | +SET NAMES utf8mb4; | |
| 18 | +SET FOREIGN_KEY_CHECKS = 0; | |
| 19 | + | |
| 20 | +-- ---------------------------- | |
| 21 | +-- Table structure for market_activity | |
| 22 | +-- ---------------------------- | |
| 23 | +DROP TABLE IF EXISTS `market_activity`; | |
| 24 | +CREATE TABLE `market_activity` ( | |
| 25 | + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '活动编号', | |
| 26 | + `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '活动标题', | |
| 27 | + `activity_type` tinyint NOT NULL COMMENT '活动类型', | |
| 28 | + `status` tinyint NOT NULL DEFAULT -1 COMMENT '活动状态', | |
| 29 | + `start_time` datetime NOT NULL COMMENT '开始时间', | |
| 30 | + `end_time` datetime NOT NULL COMMENT '结束时间', | |
| 31 | + `invalid_time` datetime NULL DEFAULT NULL COMMENT '失效时间', | |
| 32 | + `delete_time` datetime NULL DEFAULT NULL COMMENT '删除时间', | |
| 33 | + `time_limited_discount` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '限制折扣字符串,使用 JSON 序列化成字符串存储', | |
| 34 | + `full_privilege` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '限制折扣字符串,使用 JSON 序列化成字符串存储', | |
| 35 | + `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者', | |
| 36 | + `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | |
| 37 | + `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者', | |
| 38 | + `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', | |
| 39 | + `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', | |
| 40 | + `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', | |
| 41 | + PRIMARY KEY (`id`) USING BTREE | |
| 42 | +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '促销活动'; | |
| 43 | + | |
| 44 | +-- ---------------------------- | |
| 45 | +-- Records of market_activity | |
| 46 | +-- ---------------------------- | |
| 47 | +BEGIN; | |
| 48 | +COMMIT; | |
| 49 | + | |
| 50 | +-- ---------------------------- | |
| 51 | +-- Table structure for market_banner | |
| 52 | +-- ---------------------------- | |
| 53 | +DROP TABLE IF EXISTS `market_banner`; | |
| 54 | +CREATE TABLE `market_banner` ( | |
| 55 | + `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'Banner编号', | |
| 56 | + `title` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT 'Banner标题', | |
| 57 | + `pic_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '图片URL', | |
| 58 | + `status` tinyint NOT NULL DEFAULT -1 COMMENT '活动状态', | |
| 59 | + `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '跳转地址', | |
| 60 | + `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者', | |
| 61 | + `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | |
| 62 | + `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者', | |
| 63 | + `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', | |
| 64 | + `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', | |
| 65 | + `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', | |
| 66 | + `sort` tinyint NULL DEFAULT NULL COMMENT '排序', | |
| 67 | + `memo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '描述', | |
| 68 | + PRIMARY KEY (`id`) USING BTREE | |
| 69 | +) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'Banner管理'; | |
| 70 | + | |
| 71 | +-- ---------------------------- | |
| 72 | +-- Records of market_banner | |
| 73 | +-- ---------------------------- | |
| 74 | +BEGIN; | |
| 75 | +COMMIT; | |
| 76 | + | |
| 77 | +-- ---------------------------- | |
| 78 | +-- Table structure for member_address | |
| 79 | +-- ---------------------------- | |
| 80 | +DROP TABLE IF EXISTS `member_address`; | |
| 81 | +CREATE TABLE `member_address` ( | |
| 82 | + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '收件地址编号', | |
| 83 | + `user_id` bigint NOT NULL COMMENT '用户编号', | |
| 84 | + `name` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '收件人名称', | |
| 85 | + `mobile` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '手机号', | |
| 86 | + `area_id` bigint NOT NULL COMMENT '地区编码', | |
| 87 | + `post_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '邮编', | |
| 88 | + `detail_address` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '收件详细地址', | |
| 89 | + `defaulted` bit(1) NOT NULL COMMENT '是否默认', | |
| 90 | + `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', | |
| 91 | + `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | |
| 92 | + `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', | |
| 93 | + `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', | |
| 94 | + `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', | |
| 95 | + `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', | |
| 96 | + PRIMARY KEY (`id`) USING BTREE, | |
| 97 | + INDEX `idx_userId`(`user_id` ASC) USING BTREE | |
| 98 | +) ENGINE = InnoDB AUTO_INCREMENT = 21 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '用户收件地址'; | |
| 99 | + | |
| 100 | +-- ---------------------------- | |
| 101 | +-- Records of member_address | |
| 102 | +-- ---------------------------- | |
| 103 | +BEGIN; | |
| 104 | +INSERT INTO `member_address` (`id`, `user_id`, `name`, `mobile`, `area_id`, `post_code`, `detail_address`, `defaulted`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (21, 1, 'yunai', '15601691300', 610632, '200000', '芋道源码 233 号 666 室', b'1', '1', '2022-08-01 22:46:35', '1', '2022-08-01 22:46:35', b'0', 1); | |
| 105 | +COMMIT; | |
| 106 | + | |
| 107 | +-- ---------------------------- | |
| 108 | +-- Table structure for product_brand | |
| 109 | +-- ---------------------------- | |
| 110 | +DROP TABLE IF EXISTS `product_brand`; | |
| 111 | +CREATE TABLE `product_brand` ( | |
| 112 | + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '品牌编号', | |
| 113 | + `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '品牌名称', | |
| 114 | + `pic_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '品牌图片', | |
| 115 | + `sort` int NULL DEFAULT 0 COMMENT '品牌排序', | |
| 116 | + `description` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '品牌描述', | |
| 117 | + `status` tinyint NOT NULL COMMENT '状态', | |
| 118 | + `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', | |
| 119 | + `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | |
| 120 | + `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', | |
| 121 | + `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', | |
| 122 | + `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', | |
| 123 | + `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', | |
| 124 | + PRIMARY KEY (`id`) USING BTREE | |
| 125 | +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '商品品牌'; | |
| 126 | + | |
| 127 | +-- ---------------------------- | |
| 128 | +-- Records of product_brand | |
| 129 | +-- ---------------------------- | |
| 130 | +BEGIN; | |
| 131 | +INSERT INTO `product_brand` (`id`, `name`, `pic_url`, `sort`, `description`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1, '苹果', 'http://test.yudao.iocoder.cn/e3726713fa56db5717c78c011762fcc7a251db12735c3581470638b8e1fa17e2.jpeg', 0, '是上市', 0, '1', '2022-07-30 22:12:18', '1', '2022-07-30 22:13:55', b'0', 1); | |
| 132 | +COMMIT; | |
| 133 | + | |
| 134 | +-- ---------------------------- | |
| 135 | +-- Table structure for product_category | |
| 136 | +-- ---------------------------- | |
| 137 | +DROP TABLE IF EXISTS `product_category`; | |
| 138 | +CREATE TABLE `product_category` ( | |
| 139 | + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '分类编号', | |
| 140 | + `parent_id` bigint NOT NULL COMMENT '父分类编号', | |
| 141 | + `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '分类名称', | |
| 142 | + `pic_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '分类图片', | |
| 143 | + `sort` int NULL DEFAULT 0 COMMENT '分类排序', | |
| 144 | + `description` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '分类描述', | |
| 145 | + `status` tinyint NOT NULL COMMENT '开启状态', | |
| 146 | + `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', | |
| 147 | + `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | |
| 148 | + `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', | |
| 149 | + `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', | |
| 150 | + `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', | |
| 151 | + `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', | |
| 152 | + PRIMARY KEY (`id`) USING BTREE | |
| 153 | +) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '商品分类'; | |
| 154 | + | |
| 155 | +-- ---------------------------- | |
| 156 | +-- Records of product_category | |
| 157 | +-- ---------------------------- | |
| 158 | +BEGIN; | |
| 159 | +INSERT INTO `product_category` (`id`, `parent_id`, `name`, `pic_url`, `sort`, `description`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1, 0, '电脑办公', 'http://test.yudao.iocoder.cn/122d548e1b3cd5dec72fe8075c6977a70f9cc13541a684ab3685f1b5df42f6bd.jpeg', 1, '1234', 0, '1', '2022-07-30 16:36:35', '1', '2022-07-30 20:27:16', b'0', 1), (2, 1, '笔记本', 'http://test.yudao.iocoder.cn/72713ac7b947600a019a18786ed0e6562e8692e253dbd35110a0a85c2469bbec.jpg', 1, '<p>测试一下</p>', 0, '1', '2022-07-30 16:38:09', '1', '2022-07-30 16:38:09', b'0', 1), (3, 1, '游戏本', 'http://test.yudao.iocoder.cn/287c50dd9f5f575f57329a0c57b2095be6d1aeba83867b905fe549f54a296feb.jpg', 2, '<p>测试一下</p>', 0, '1', '2022-07-30 16:39:09', '1', '2022-07-30 20:26:59', b'0', 1), (4, 0, '手机', 'http://test.yudao.iocoder.cn/e1b63900c78dbb661b3e383960cee5cfea7e1dd2fb22cff2e317ff025faaf8b2.jpeg', 2, '<p>123</p>', 0, '1', '2022-07-30 16:40:00', '1', '2022-07-30 16:40:09', b'0', 1), (5, 4, '5G手机', 'http://test.yudao.iocoder.cn/3af6557ac7def6423f046f5b2e920b644793420b466959aaa996a2e19068bbde.jpeg', 1, '<p><br></p>', 0, '1', '2022-07-30 16:43:00', '1', '2022-07-30 16:43:00', b'0', 1), (6, 4, '游戏手机', 'http://test.yudao.iocoder.cn/964fe9ccd1710d64ede261dc36d231918a017641986c15293c367f9f66d94d05.jpeg', 2, NULL, 0, '1', '2022-07-30 16:43:44', '1', '2022-07-30 16:43:44', b'0', 1), (7, 5, '厉害的 5G 手机', 'http://test.yudao.iocoder.cn/b287122f277838e8de368769b96217918605743bc45f3a29bda3cc7359dc66e1.png', 0, '123', 0, '1', '2022-07-30 20:38:09', '1', '2022-07-30 20:38:09', b'0', 1); | |
| 160 | +COMMIT; | |
| 161 | + | |
| 162 | +-- ---------------------------- | |
| 163 | +-- Table structure for product_property | |
| 164 | +-- ---------------------------- | |
| 165 | +DROP TABLE IF EXISTS `product_property`; | |
| 166 | +CREATE TABLE `product_property` ( | |
| 167 | + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', | |
| 168 | + `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '规格名称', | |
| 169 | + `status` tinyint NULL DEFAULT NULL COMMENT '状态: 0 开启 ,1 禁用', | |
| 170 | + `create_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | |
| 171 | + `update_time` datetime NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', | |
| 172 | + `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', | |
| 173 | + `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人', | |
| 174 | + `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', | |
| 175 | + `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', | |
| 176 | + PRIMARY KEY (`id`) USING BTREE, | |
| 177 | + INDEX `idx_name`(`name`(32) ASC) USING BTREE COMMENT '规格名称索引' | |
| 178 | +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '规格名称'; | |
| 179 | + | |
| 180 | +-- ---------------------------- | |
| 181 | +-- Records of product_property | |
| 182 | +-- ---------------------------- | |
| 183 | +BEGIN; | |
| 184 | +COMMIT; | |
| 185 | + | |
| 186 | +-- ---------------------------- | |
| 187 | +-- Table structure for product_property_value | |
| 188 | +-- ---------------------------- | |
| 189 | +DROP TABLE IF EXISTS `product_property_value`; | |
| 190 | +CREATE TABLE `product_property_value` ( | |
| 191 | + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', | |
| 192 | + `property_id` bigint NULL DEFAULT NULL COMMENT '规格键id', | |
| 193 | + `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '规格值名字', | |
| 194 | + `status` tinyint NULL DEFAULT NULL COMMENT '状态: 1 开启 ,2 禁用', | |
| 195 | + `create_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | |
| 196 | + `update_time` datetime NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', | |
| 197 | + `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', | |
| 198 | + `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人', | |
| 199 | + `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', | |
| 200 | + `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', | |
| 201 | + PRIMARY KEY (`id`) USING BTREE | |
| 202 | +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '规格值'; | |
| 203 | + | |
| 204 | +-- ---------------------------- | |
| 205 | +-- Records of product_property_value | |
| 206 | +-- ---------------------------- | |
| 207 | +BEGIN; | |
| 208 | +COMMIT; | |
| 209 | + | |
| 210 | +-- ---------------------------- | |
| 211 | +-- Table structure for product_sku | |
| 212 | +-- ---------------------------- | |
| 213 | +DROP TABLE IF EXISTS `product_sku`; | |
| 214 | +CREATE TABLE `product_sku` ( | |
| 215 | + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', | |
| 216 | + `spu_id` bigint NOT NULL COMMENT 'spu编号', | |
| 217 | + `properties` varchar(512) DEFAULT NULL COMMENT '属性数组,JSON 格式 [{propertId: , valueId: }, {propertId: , valueId: }]', | |
| 218 | + `price` int NOT NULL DEFAULT '-1' COMMENT '商品价格,单位:分', | |
| 219 | + `market_price` int DEFAULT NULL COMMENT '市场价,单位:分', | |
| 220 | + `cost_price` int NOT NULL DEFAULT '-1' COMMENT '成本价,单位: 分', | |
| 221 | + `bar_code` varchar(64) DEFAULT NULL COMMENT 'SKU 的条形码', | |
| 222 | + `pic_url` varchar(256) NOT NULL COMMENT '图片地址', | |
| 223 | + `stock` int DEFAULT NULL COMMENT '库存', | |
| 224 | + `weight` double DEFAULT NULL COMMENT '商品重量,单位:kg 千克', | |
| 225 | + `volume` double DEFAULT NULL COMMENT '商品体积,单位:m^3 平米', | |
| 226 | + `sub_commission_first_price` int DEFAULT NULL COMMENT '一级分销的佣金,单位:分', | |
| 227 | + `sub_commission_second_price` int DEFAULT NULL COMMENT '二级分销的佣金,单位:分', | |
| 228 | + `sales_count` int DEFAULT NULL COMMENT '商品销量', | |
| 229 | + `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | |
| 230 | + `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', | |
| 231 | + `creator` varchar(64) DEFAULT NULL COMMENT '创建人', | |
| 232 | + `updater` double(64,0) DEFAULT NULL COMMENT '更新人', | |
| 233 | + `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', | |
| 234 | + `tenant_id` bigint NOT NULL DEFAULT '0' COMMENT '租户编号', | |
| 235 | +PRIMARY KEY (`id`) USING BTREE | |
| 236 | +) ENGINE=InnoDB COMMENT='商品sku'; | |
| 237 | + | |
| 238 | +-- ---------------------------- | |
| 239 | +-- Records of product_sku | |
| 240 | +-- ---------------------------- | |
| 241 | +BEGIN; | |
| 242 | +COMMIT; | |
| 243 | + | |
| 244 | +-- ---------------------------- | |
| 245 | +-- Table structure for product_spu | |
| 246 | +-- ---------------------------- | |
| 247 | +DROP TABLE IF EXISTS `product_spu`; | |
| 248 | +CREATE TABLE `product_spu` ( | |
| 249 | + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '商品 SPU 编号,自增', | |
| 250 | + `name` varchar(128) NOT NULL COMMENT '商品名称', | |
| 251 | + `keyword` varchar(256) DEFAULT NULL COMMENT '关键字', | |
| 252 | + `introduction` varchar(256) COMMENT '商品简介', | |
| 253 | + `description` text COMMENT '商品详情', | |
| 254 | + `bar_code` varchar(64) DEFAULT NULL COMMENT '条形码', | |
| 255 | + `category_id` bigint NOT NULL COMMENT '商品分类编号', | |
| 256 | + `brand_id` int DEFAULT NULL COMMENT '商品品牌编号', | |
| 257 | + `pic_url` varchar(256) NOT NULL COMMENT '商品封面图', | |
| 258 | + `slider_pic_urls` varchar(2000) DEFAULT '' COMMENT '商品轮播图地址\n 数组,以逗号分隔\n 最多上传15张', | |
| 259 | + `video_url` varchar(256) DEFAULT NULL COMMENT '商品视频', | |
| 260 | + `unit` tinyint NOT NULL COMMENT '单位', | |
| 261 | + `sort` int NOT NULL DEFAULT '0' COMMENT '排序字段', | |
| 262 | + `status` tinyint NOT NULL COMMENT '商品状态: 0 上架(开启) 1 下架(禁用)-1 回收', | |
| 263 | + `spec_type` bit(1) DEFAULT NULL COMMENT '规格类型:0 单规格 1 多规格', | |
| 264 | + `price` int NOT NULL DEFAULT '-1' COMMENT '商品价格,单位使用:分', | |
| 265 | + `market_price` int DEFAULT NULL COMMENT '市场价,单位使用:分', | |
| 266 | + `cost_price` int NOT NULL DEFAULT '-1' COMMENT '成本价,单位: 分', | |
| 267 | + `stock` int NOT NULL DEFAULT '0' COMMENT '库存', | |
| 268 | + `delivery_template_id` bigint NOT NULL COMMENT '物流配置模板编号', | |
| 269 | + `recommend_hot` bit(1) DEFAULT NULL COMMENT '是否热卖推荐: 0 默认 1 热卖', | |
| 270 | + `recommend_benefit` bit(1) DEFAULT NULL COMMENT '是否优惠推荐: 0 默认 1 优选', | |
| 271 | + `recommend_best` bit(1) DEFAULT NULL COMMENT '是否精品推荐: 0 默认 1 精品', | |
| 272 | + `recommend_new` bit(1) DEFAULT NULL COMMENT '是否新品推荐: 0 默认 1 新品', | |
| 273 | + `recommend_good` bit(1) DEFAULT NULL COMMENT '是否优品推荐', | |
| 274 | + `give_integral` int NOT NULL COMMENT '赠送积分', | |
| 275 | + `give_coupon_template_ids` varchar(512) DEFAULT '' COMMENT '赠送的优惠劵编号的数组', | |
| 276 | + `sub_commission_type` bit(1) DEFAULT NULL COMMENT '分销类型', | |
| 277 | + `activity_orders` varchar(16) NOT NULL DEFAULT '' COMMENT '活动显示排序0=默认, 1=秒杀,2=砍价,3=拼团', | |
| 278 | + `sales_count` int DEFAULT '0' COMMENT '商品销量', | |
| 279 | + `virtual_sales_count` int DEFAULT '0' COMMENT '虚拟销量', | |
| 280 | + `browse_count` int DEFAULT '0' COMMENT '商品点击量', | |
| 281 | + `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | |
| 282 | + `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', | |
| 283 | + `creator` varchar(64) DEFAULT NULL COMMENT '创建人', | |
| 284 | + `updater` varchar(64) DEFAULT NULL COMMENT '更新人', | |
| 285 | + `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', | |
| 286 | + `tenant_id` bigint NOT NULL DEFAULT '0' COMMENT '租户编号', | |
| 287 | + PRIMARY KEY (`id`) USING BTREE | |
| 288 | +) ENGINE=InnoDB COMMENT='商品spu'; | |
| 289 | + | |
| 290 | +-- ---------------------------- | |
| 291 | +-- Records of product_spu | |
| 292 | +-- ---------------------------- | |
| 293 | +BEGIN; | |
| 294 | +COMMIT; | |
| 295 | + | |
| 296 | +SET FOREIGN_KEY_CHECKS = 1; | |
| 297 | + | |
| 298 | +INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2000, '商品中心', '', 1, 60, 0, '/product', 'merchant', NULL, 0, b'1', b'1', '', '2022-07-29 15:53:53', '1', '2022-07-30 22:26:19', b'0'); | |
| 299 | +INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2002, '商品分类', '', 2, 2, 2000, 'category', 'dict', 'mall/product/category/index', 0, b'1', b'1', '', '2022-07-29 15:53:53', '1', '2022-07-30 22:23:37', b'0'); | |
| 300 | +INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2003, '分类查询', 'product:category:query', 3, 1, 2002, '', '', '', 0, b'1', b'1', '', '2022-07-29 15:53:53', '', '2022-07-29 15:53:53', b'0'); | |
| 301 | +INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2004, '分类创建', 'product:category:create', 3, 2, 2002, '', '', '', 0, b'1', b'1', '', '2022-07-29 15:53:53', '', '2022-07-29 15:53:53', b'0'); | |
| 302 | +INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2005, '分类更新', 'product:category:update', 3, 3, 2002, '', '', '', 0, b'1', b'1', '', '2022-07-29 15:53:53', '', '2022-07-29 15:53:53', b'0'); | |
| 303 | +INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2006, '分类删除', 'product:category:delete', 3, 4, 2002, '', '', '', 0, b'1', b'1', '', '2022-07-29 15:53:53', '', '2022-07-29 15:53:53', b'0'); | |
| 304 | +INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2007, '分类导出', 'product:category:export', 3, 5, 2002, '', '', '', 0, b'1', b'1', '', '2022-07-29 15:53:53', '', '2022-07-30 13:52:13', b'1'); | |
| 305 | +INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2008, '商品品牌', '', 2, 1, 2000, 'brand', 'dashboard', 'mall/product/brand/index', 0, b'1', b'1', '', '2022-07-30 13:52:44', '1', '2022-07-30 22:23:43', b'0'); | |
| 306 | +INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2009, '品牌查询', 'product:brand:query', 3, 1, 2008, '', '', '', 0, b'1', b'1', '', '2022-07-30 13:52:44', '', '2022-07-30 13:52:44', b'0'); | |
| 307 | +INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2010, '品牌创建', 'product:brand:create', 3, 2, 2008, '', '', '', 0, b'1', b'1', '', '2022-07-30 13:52:44', '', '2022-07-30 13:52:44', b'0'); | |
| 308 | +INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2011, '品牌更新', 'product:brand:update', 3, 3, 2008, '', '', '', 0, b'1', b'1', '', '2022-07-30 13:52:44', '', '2022-07-30 13:52:44', b'0'); | |
| 309 | +INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2012, '品牌删除', 'product:brand:delete', 3, 4, 2008, '', '', '', 0, b'1', b'1', '', '2022-07-30 13:52:44', '', '2022-07-30 13:52:44', b'0'); | |
| 310 | +INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2013, '品牌导出', 'product:brand:export', 3, 5, 2008, '', '', '', 0, b'1', b'1', '', '2022-07-30 13:52:44', '', '2022-07-30 14:15:00', b'1'); | |
| 311 | +INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2014, '商品管理', '', 2, 0, 2000, 'spu', 'link', 'mall/product/spu/index', 0, b'1', b'1', '', '2022-07-30 14:22:58', '1', '2022-07-30 22:26:35', b'0'); | |
| 312 | +INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2015, '商品查询', 'product:spu:query', 3, 1, 2014, '', '', '', 0, b'1', b'1', '', '2022-07-30 14:22:58', '', '2022-07-30 14:22:58', b'0'); | |
| 313 | +INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2016, '商品创建', 'product:spu:create', 3, 2, 2014, '', '', '', 0, b'1', b'1', '', '2022-07-30 14:22:58', '', '2022-07-30 14:22:58', b'0'); | |
| 314 | +INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2017, '商品更新', 'product:spu:update', 3, 3, 2014, '', '', '', 0, b'1', b'1', '', '2022-07-30 14:22:58', '', '2022-07-30 14:22:58', b'0'); | |
| 315 | +INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2018, '商品删除', 'product:spu:delete', 3, 4, 2014, '', '', '', 0, b'1', b'1', '', '2022-07-30 14:22:58', '', '2022-07-30 14:22:58', b'0'); | |
| 316 | +INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2019, '规格管理', '', 2, 3, 2000, 'property', '', 'mall/product/property/index', 0, b'1', b'1', '', '2022-08-01 14:55:35', '', '2022-08-01 14:55:35', b'0'); | |
| 317 | +INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2020, '规格查询', 'product:property:query', 3, 1, 2019, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:55:35', '', '2022-08-01 14:55:35', b'0'); | |
| 318 | +INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2021, '规格创建', 'product:property:create', 3, 2, 2019, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:55:35', '', '2022-08-01 14:55:35', b'0'); | |
| 319 | +INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2022, '规格更新', 'product:property:update', 3, 3, 2019, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:55:35', '', '2022-08-01 14:55:35', b'0'); | |
| 320 | +INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2023, '规格删除', 'product:property:delete', 3, 4, 2019, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:55:35', '', '2022-08-01 14:55:35', b'0'); | |
| 321 | +INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2024, '规格导出', 'product:property:export', 3, 5, 2019, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:55:35', '', '2022-08-01 14:55:35', b'0'); | |
| 322 | +INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2025, 'Banner管理', '', 2, 1, 2000, 'brand', '', 'mall/market/banner/index', 0, b'1', b'1', '', '2022-08-01 14:56:14', '', '2022-08-01 14:56:14', b'0'); | |
| 323 | +INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2026, 'Banner查询', 'market:banner:query', 3, 1, 2025, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:56:14', '', '2022-08-01 14:56:14', b'0'); | |
| 324 | +INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2027, 'Banner创建', 'market:banner:create', 3, 2, 2025, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:56:14', '', '2022-08-01 14:56:14', b'0'); | |
| 325 | +INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2028, 'Banner更新', 'market:banner:update', 3, 3, 2025, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:56:14', '', '2022-08-01 14:56:14', b'0'); | |
| 326 | +INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2029, 'Banner删除', 'market:banner:delete', 3, 4, 2025, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:56:14', '', '2022-08-01 14:56:14', b'0'); | |
| 327 | + | ... | ... |
yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/spu/dto/ProductSpuRespDTO.java
yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/enums/spu/ProductSpuSpecTypeEnum.java
| ... | ... | @@ -16,15 +16,15 @@ import java.util.Arrays; |
| 16 | 16 | @Deprecated |
| 17 | 17 | public enum ProductSpuSpecTypeEnum implements IntArrayValuable { |
| 18 | 18 | |
| 19 | - RECYCLE(1, "统一规格"), | |
| 20 | - DISABLE(2, "多规格"); | |
| 21 | - | |
| 22 | - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ProductSpuSpecTypeEnum::getType).toArray(); | |
| 19 | + RECYCLE(false, "统一规格"), | |
| 20 | + DISABLE(true, "多规格"); | |
| 23 | 21 | |
| 22 | + //public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ProductSpuSpecTypeEnum::getType).toArray();// TODO 暂时先这样跑起来 | |
| 23 | + public static final int[] ARRAYS = {}; | |
| 24 | 24 | /** |
| 25 | 25 | * 规格类型 |
| 26 | 26 | */ |
| 27 | - private final Integer type; | |
| 27 | + private final Boolean type; | |
| 28 | 28 | /** |
| 29 | 29 | * 规格名称 |
| 30 | 30 | */ | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/vo/ProductCategoryBaseVO.java
| ... | ... | @@ -32,7 +32,7 @@ public class ProductCategoryBaseVO { |
| 32 | 32 | @NotNull(message = "开启状态不能为空") |
| 33 | 33 | private Integer status; |
| 34 | 34 | |
| 35 | - @Schema(description = "PC端分类图") | |
| 36 | - private String bigPicUrl; | |
| 35 | + //@Schema(description = "PC端分类图") TODO 数据库没有这个字段 | |
| 36 | + //private String bigPicUrl; | |
| 37 | 37 | |
| 38 | 38 | } | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/vo/ProductCategoryCreateReqVO.java
| ... | ... | @@ -5,10 +5,13 @@ import lombok.Data; |
| 5 | 5 | import lombok.EqualsAndHashCode; |
| 6 | 6 | import lombok.ToString; |
| 7 | 7 | |
| 8 | +import javax.validation.constraints.NotBlank; | |
| 9 | + | |
| 8 | 10 | @Schema(description = "管理后台 - 商品分类创建 Request VO") |
| 9 | 11 | @Data |
| 10 | 12 | @EqualsAndHashCode(callSuper = true) |
| 11 | 13 | @ToString(callSuper = true) |
| 12 | 14 | public class ProductCategoryCreateReqVO extends ProductCategoryBaseVO { |
| 13 | - | |
| 15 | + @Schema(description = "分类描述") | |
| 16 | + private String description; | |
| 14 | 17 | } | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/vo/ProductCategoryUpdateReqVO.java
| ... | ... | @@ -5,6 +5,7 @@ import lombok.Data; |
| 5 | 5 | import lombok.EqualsAndHashCode; |
| 6 | 6 | import lombok.ToString; |
| 7 | 7 | |
| 8 | +import javax.validation.constraints.NotBlank; | |
| 8 | 9 | import javax.validation.constraints.NotNull; |
| 9 | 10 | |
| 10 | 11 | @Schema(description = "管理后台 - 商品分类更新 Request VO") |
| ... | ... | @@ -16,5 +17,7 @@ public class ProductCategoryUpdateReqVO extends ProductCategoryBaseVO { |
| 16 | 17 | @Schema(description = "分类编号", required = true, example = "2") |
| 17 | 18 | @NotNull(message = "分类编号不能为空") |
| 18 | 19 | private Long id; |
| 20 | + @Schema(description = "分类描述") | |
| 21 | + private String description; | |
| 19 | 22 | |
| 20 | 23 | } | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuBaseVO.java
| ... | ... | @@ -57,8 +57,7 @@ public class ProductSpuBaseVO { |
| 57 | 57 | |
| 58 | 58 | @Schema(description = "规格类型", required = true, example = "1") |
| 59 | 59 | @NotNull(message = "规格类型不能为空") |
| 60 | - @InEnum(ProductSpuSpecTypeEnum.class) | |
| 61 | - private Integer specType; | |
| 60 | + private Boolean specType; | |
| 62 | 61 | |
| 63 | 62 | @Schema(description = "是否展示库存", required = true, example = "true") |
| 64 | 63 | @NotNull(message = "是否展示库存不能为空") | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/vo/AppProductSpuDetailRespVO.java
| ... | ... | @@ -35,8 +35,8 @@ public class AppProductSpuDetailRespVO { |
| 35 | 35 | |
| 36 | 36 | // ========== SKU 相关字段 ========= |
| 37 | 37 | |
| 38 | - @Schema(description = "规格类型", required = true, example = "1") | |
| 39 | - private Integer specType; | |
| 38 | + @Schema(description = "规格类型", required = true, example = "true") | |
| 39 | + private Boolean specType; | |
| 40 | 40 | |
| 41 | 41 | @Schema(description = "是否展示库存", required = true, example = "true") |
| 42 | 42 | private Boolean showStock; | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/convert/sku/ProductSkuConvert.java
| ... | ... | @@ -37,7 +37,8 @@ public interface ProductSkuConvert { |
| 37 | 37 | |
| 38 | 38 | default List<ProductSkuDO> convertList06(List<ProductSkuCreateOrUpdateReqVO> list, Long spuId, String spuName) { |
| 39 | 39 | List<ProductSkuDO> result = convertList06(list); |
| 40 | - result.forEach(item -> item.setSpuId(spuId).setSpuName(spuName)); | |
| 40 | + // result.forEach(item -> item.setSpuId(spuId).setSpuName(spuName)); TODO ProductSkuDO中已经没有name相关属性 | |
| 41 | + result.forEach(item -> item.setSpuId(spuId)); | |
| 41 | 42 | return result; |
| 42 | 43 | } |
| 43 | 44 | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/category/ProductCategoryDO.java
| ... | ... | @@ -60,8 +60,13 @@ public class ProductCategoryDO extends BaseDO { |
| 60 | 60 | */ |
| 61 | 61 | private Integer status; |
| 62 | 62 | /** |
| 63 | - * PC端分类图 | |
| 63 | + * 描述 | |
| 64 | 64 | */ |
| 65 | - private String bigPicUrl; | |
| 65 | + private String description; | |
| 66 | + | |
| 67 | + /** | |
| 68 | + * PC端分类图 TODO 数据库没有这个字段 | |
| 69 | + */ | |
| 70 | + //private String bigPicUrl; | |
| 66 | 71 | |
| 67 | 72 | } | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/sku/ProductSkuMapper.java
| ... | ... | @@ -26,8 +26,8 @@ public interface ProductSkuMapper extends BaseMapperX<ProductSkuDO> { |
| 26 | 26 | default List<ProductSkuDO> selectListBySpuIdAndStatus(Long spuId, |
| 27 | 27 | Integer status) { |
| 28 | 28 | return selectList(new LambdaQueryWrapperX<ProductSkuDO>() |
| 29 | - .eq(ProductSkuDO::getSpuId, spuId) | |
| 30 | - .eqIfPresent(ProductSkuDO::getStatus, status)); | |
| 29 | + .eq(ProductSkuDO::getSpuId, spuId)// eqIfPresent(ProductSkuDO::getStatus, status) TODO ProductSkuDO已经没有status属性 | |
| 30 | + ); | |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | default List<ProductSkuDO> selectListBySpuId(Collection<Long> spuIds) { | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/spu/ProductSpuMapper.java
| ... | ... | @@ -52,7 +52,8 @@ public interface ProductSpuMapper extends BaseMapperX<ProductSpuDO> { |
| 52 | 52 | .eqIfPresent(ProductSpuDO::getStatus, status); |
| 53 | 53 | // 排序逻辑 |
| 54 | 54 | if (Objects.equals(pageReqVO.getSortField(), AppProductSpuPageReqVO.SORT_FIELD_PRICE)) { |
| 55 | - query.orderBy(true, pageReqVO.getSortAsc(), ProductSpuDO::getMaxPrice); | |
| 55 | + // TODO ProductSpuDO 已经没有maxPrice 属性 | |
| 56 | + //query.orderBy(true, pageReqVO.getSortAsc(), ProductSpuDO::getMaxPrice); | |
| 56 | 57 | } else if (Objects.equals(pageReqVO.getSortField(), AppProductSpuPageReqVO.SORT_FIELD_SALES_COUNT)) { |
| 57 | 58 | query.orderBy(true, pageReqVO.getSortAsc(), ProductSpuDO::getSalesCount); |
| 58 | 59 | } | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/sku/ProductSkuService.java
| ... | ... | @@ -50,7 +50,7 @@ public interface ProductSkuService { |
| 50 | 50 | * |
| 51 | 51 | * @param list sku组合的集合 |
| 52 | 52 | */ |
| 53 | - void validateSkuList(List<ProductSkuCreateOrUpdateReqVO> list, Integer specType); | |
| 53 | + void validateSkuList(List<ProductSkuCreateOrUpdateReqVO> list, Boolean specType); | |
| 54 | 54 | |
| 55 | 55 | /** |
| 56 | 56 | * 批量创建 SKU | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/sku/ProductSkuServiceImpl.java
| ... | ... | @@ -79,7 +79,7 @@ public class ProductSkuServiceImpl implements ProductSkuService { |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | @Override |
| 82 | - public void validateSkuList(List<ProductSkuCreateOrUpdateReqVO> skus, Integer specType) { | |
| 82 | + public void validateSkuList(List<ProductSkuCreateOrUpdateReqVO> skus, Boolean specType) { | |
| 83 | 83 | // 非多规格,不需要校验 |
| 84 | 84 | if (ObjectUtil.notEqual(specType, ProductSpuSpecTypeEnum.DISABLE.getType())) { |
| 85 | 85 | return; | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/spu/ProductSpuServiceImpl.java
| ... | ... | @@ -102,9 +102,10 @@ public class ProductSpuServiceImpl implements ProductSpuService { |
| 102 | 102 | */ |
| 103 | 103 | private void initSpuFromSkus(ProductSpuDO spu, List<ProductSkuCreateOrUpdateReqVO> skus) { |
| 104 | 104 | spu.setMarketPrice(getMaxValue(skus, ProductSkuCreateOrUpdateReqVO::getMarketPrice)); |
| 105 | - spu.setMaxPrice(getMaxValue(skus, ProductSkuCreateOrUpdateReqVO::getPrice)); | |
| 106 | - spu.setMinPrice(getMinValue(skus, ProductSkuCreateOrUpdateReqVO::getPrice)); | |
| 107 | - spu.setTotalStock(getSumValue(skus, ProductSkuCreateOrUpdateReqVO::getStock, Integer::sum)); | |
| 105 | + // TODO ProductSpuDO中已没有相关属性 | |
| 106 | + //spu.setMaxPrice(getMaxValue(skus, ProductSkuCreateOrUpdateReqVO::getPrice)); | |
| 107 | + //spu.setMinPrice(getMinValue(skus, ProductSkuCreateOrUpdateReqVO::getPrice)); | |
| 108 | + //spu.setTotalStock(getSumValue(skus, ProductSkuCreateOrUpdateReqVO::getStock, Integer::sum)); | |
| 108 | 109 | } |
| 109 | 110 | |
| 110 | 111 | /** | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/test/java/cn/iocoder/yudao/module/product/service/category/ProductCategoryServiceImplTest.java
| ... | ... | @@ -40,8 +40,8 @@ public class ProductCategoryServiceImplTest extends BaseDbUnitTest { |
| 40 | 40 | public void testCreateCategory_success() { |
| 41 | 41 | // 准备参数 |
| 42 | 42 | ProductCategoryCreateReqVO reqVO = randomPojo(ProductCategoryCreateReqVO.class,o -> { |
| 43 | - // 设置PC端图片可为空 | |
| 44 | - o.setBigPicUrl(null); | |
| 43 | + // 设置PC端图片可为空 TODO 数据库没有这个字段 | |
| 44 | + //o.setBigPicUrl(null); | |
| 45 | 45 | }); |
| 46 | 46 | |
| 47 | 47 | // mock 父类 | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/test/java/cn/iocoder/yudao/module/product/service/spu/ProductSpuServiceImplTest.java
| ... | ... | @@ -94,6 +94,7 @@ public class ProductSpuServiceImplTest extends BaseDbUnitTest { |
| 94 | 94 | ProductSpuDO productSpuDO = productSpuMapper.selectById(spu); |
| 95 | 95 | |
| 96 | 96 | createReqVO.setMarketPrice(CollectionUtils.getMaxValue(skuCreateReqList, ProductSkuCreateOrUpdateReqVO::getMarketPrice)); |
| 97 | + // TODO ProductSpuCreateReqVO中已没有相关属性 | |
| 97 | 98 | // createReqVO.setMaxPrice(CollectionUtils.getMaxValue(skuCreateReqList, ProductSkuCreateOrUpdateReqVO::getPrice)); |
| 98 | 99 | // createReqVO.setMinPrice(CollectionUtils.getMinValue(skuCreateReqList, ProductSkuCreateOrUpdateReqVO::getPrice)); |
| 99 | 100 | // createReqVO.setTotalStock(CollectionUtils.getSumValue(skuCreateReqList, ProductSkuCreateOrUpdateReqVO::getStock, Integer::sum)); |
| ... | ... | @@ -118,6 +119,7 @@ public class ProductSpuServiceImplTest extends BaseDbUnitTest { |
| 118 | 119 | |
| 119 | 120 | List<ProductSkuCreateOrUpdateReqVO> skuCreateReqList = reqVO.getSkus(); |
| 120 | 121 | reqVO.setMarketPrice(CollectionUtils.getMaxValue(skuCreateReqList, ProductSkuCreateOrUpdateReqVO::getMarketPrice)); |
| 122 | + // TODO ProductSpuUpdateReqVO中已没有相关属性 | |
| 121 | 123 | // reqVO.setMaxPrice(CollectionUtils.getMaxValue(skuCreateReqList, ProductSkuCreateOrUpdateReqVO::getPrice)); |
| 122 | 124 | // reqVO.setMinPrice(CollectionUtils.getMinValue(skuCreateReqList, ProductSkuCreateOrUpdateReqVO::getPrice)); |
| 123 | 125 | // reqVO.setTotalStock(CollectionUtils.getSumValue(skuCreateReqList, ProductSkuCreateOrUpdateReqVO::getStock, Integer::sum)); |
| ... | ... | @@ -193,21 +195,21 @@ public class ProductSpuServiceImplTest extends BaseDbUnitTest { |
| 193 | 195 | // 准备参数 |
| 194 | 196 | ProductSpuDO createReqVO = randomPojo(ProductSpuDO.class, o->{ |
| 195 | 197 | o.setStatus(ProductSpuStatusEnum.ENABLE.getStatus()); |
| 196 | - o.setTotalStock(500); | |
| 197 | - o.setMinPrice(1); | |
| 198 | - o.setMaxPrice(50); | |
| 198 | + //o.setTotalStock(500); | |
| 199 | + //o.setMinPrice(1); // TODO ProductSpuDO中已没有相关属性 | |
| 200 | + //o.setMaxPrice(50); | |
| 199 | 201 | o.setMarketPrice(25); |
| 200 | 202 | o.setSpecType(ProductSpuSpecTypeEnum.RECYCLE.getType()); |
| 201 | 203 | o.setBrandId(brandId); |
| 202 | 204 | o.setCategoryId(categoryId); |
| 203 | - o.setClickCount(100); | |
| 204 | - o.setCode(code); | |
| 205 | + //o.setClickCount(100); | |
| 206 | + //o.setCode(code); // TODO ProductSpuDO中已没有相关属性 | |
| 205 | 207 | o.setDescription("测试商品"); |
| 206 | 208 | o.setSliderPicUrls(new ArrayList<>()); |
| 207 | 209 | o.setName("测试"); |
| 208 | 210 | o.setSalesCount(100); |
| 209 | - o.setSellPoint("超级加倍"); | |
| 210 | - o.setShowStock(true); | |
| 211 | + //o.setSellPoint("超级加倍"); | |
| 212 | + //o.setShowStock(true); // TODO ProductSpuDO中已没有相关属性 | |
| 211 | 213 | o.setVideoUrl(""); |
| 212 | 214 | }); |
| 213 | 215 | productSpuMapper.insert(createReqVO); |
| ... | ... | @@ -241,21 +243,21 @@ public class ProductSpuServiceImplTest extends BaseDbUnitTest { |
| 241 | 243 | // 准备参数 |
| 242 | 244 | ProductSpuDO createReqVO = randomPojo(ProductSpuDO.class, o->{ |
| 243 | 245 | o.setStatus(ProductSpuStatusEnum.ENABLE.getStatus()); |
| 244 | - o.setTotalStock(1); | |
| 245 | - o.setMinPrice(1); | |
| 246 | - o.setMaxPrice(1); | |
| 246 | + //o.setTotalStock(1); | |
| 247 | + //o.setMinPrice(1); // TODO ProductSpuDO中已没有相关属性 | |
| 248 | + //o.setMaxPrice(1); | |
| 247 | 249 | o.setMarketPrice(1); |
| 248 | 250 | o.setSpecType(ProductSpuSpecTypeEnum.RECYCLE.getType()); |
| 249 | 251 | o.setBrandId(brandId); |
| 250 | 252 | o.setCategoryId(categoryId); |
| 251 | - o.setClickCount(1); | |
| 252 | - o.setCode(generateNo()); | |
| 253 | + //o.setClickCount(1); // TODO ProductSpuDO中已没有相关属性 | |
| 254 | + //o.setCode(generateNo()); | |
| 253 | 255 | o.setDescription("测试商品"); |
| 254 | 256 | o.setSliderPicUrls(new ArrayList<>()); |
| 255 | 257 | o.setName("测试"); |
| 256 | 258 | o.setSalesCount(1); |
| 257 | - o.setSellPoint("卖点"); | |
| 258 | - o.setShowStock(true); | |
| 259 | + //o.setSellPoint("卖点"); | |
| 260 | + //o.setShowStock(true); // TODO ProductSpuDO中已没有相关属性 | |
| 259 | 261 | }); |
| 260 | 262 | |
| 261 | 263 | // 准备参数 |
| ... | ... | @@ -345,15 +347,15 @@ public class ProductSpuServiceImplTest extends BaseDbUnitTest { |
| 345 | 347 | public void testUpdateSpuStock() { |
| 346 | 348 | // 准备参数 |
| 347 | 349 | Map<Long, Integer> stockIncrCounts = MapUtil.builder(1L, 10).put(2L, -20).build(); |
| 348 | - // mock 方法(数据) | |
| 349 | - productSpuMapper.insert(randomPojo(ProductSpuDO.class, o -> o.setId(1L).setTotalStock(20))); | |
| 350 | - productSpuMapper.insert(randomPojo(ProductSpuDO.class, o -> o.setId(2L).setTotalStock(30))); | |
| 350 | + // mock 方法(数据) // TODO ProductSpuDO中已没有相关属性 | |
| 351 | + //productSpuMapper.insert(randomPojo(ProductSpuDO.class, o -> o.setId(1L).setTotalStock(20))); | |
| 352 | + //productSpuMapper.insert(randomPojo(ProductSpuDO.class, o -> o.setId(2L).setTotalStock(30))); | |
| 351 | 353 | |
| 352 | 354 | // 调用 |
| 353 | 355 | productSpuService.updateSpuStock(stockIncrCounts); |
| 354 | - // 断言 | |
| 355 | - assertEquals(productSpuService.getSpu(1L).getTotalStock(), 30); | |
| 356 | - assertEquals(productSpuService.getSpu(2L).getTotalStock(), 10); | |
| 356 | + // 断言 // TODO ProductSpuDO中已没有相关属性 | |
| 357 | + //assertEquals(productSpuService.getSpu(1L).getTotalStock(), 30); | |
| 358 | + //assertEquals(productSpuService.getSpu(2L).getTotalStock(), 10); | |
| 357 | 359 | } |
| 358 | 360 | |
| 359 | 361 | } | ... | ... |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/AppTradeOrderController.java
| ... | ... | @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.trade.controller.app.order; |
| 2 | 2 | |
| 3 | 3 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 4 | 4 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 5 | +import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; | |
| 5 | 6 | import cn.iocoder.yudao.framework.security.core.annotations.PreAuthenticated; |
| 6 | 7 | import cn.iocoder.yudao.module.pay.api.notify.dto.PayOrderNotifyReqDTO; |
| 7 | 8 | import cn.iocoder.yudao.module.product.api.property.ProductPropertyValueApi; | ... | ... |