diff --git a/.idea/dataSources/e46bfd2c-b955-434f-b6fc-b16ffa1fd71a.xml b/.idea/dataSources/e46bfd2c-b955-434f-b6fc-b16ffa1fd71a.xml new file mode 100644 index 0000000..6d025d3 --- /dev/null +++ b/.idea/dataSources/e46bfd2c-b955-434f-b6fc-b16ffa1fd71a.xml @@ -0,0 +1,3295 @@ + + + + + exact + InnoDB + InnoDB + |root||root||ALTER|G +|root||root||ALTER ROUTINE|G +|root||mysql.infoschema|localhost|AUDIT_ABORT_EXEMPT|G +|root||mysql.session|localhost|AUDIT_ABORT_EXEMPT|G +|root||mysql.sys|localhost|AUDIT_ABORT_EXEMPT|G +|root||mysql.session|localhost|BACKUP_ADMIN|G +|root||mysql.session|localhost|CLONE_ADMIN|G +|root||mysql.session|localhost|CONNECTION_ADMIN|G +|root||root||CREATE|G +|root||root||CREATE ROLE|G +|root||root||CREATE ROUTINE|G +|root||root||CREATE TABLESPACE|G +|root||root||CREATE TEMPORARY TABLES|G +|root||root||CREATE USER|G +|root||root||CREATE VIEW|G +|root||root||DELETE|G +|root||root||DROP|G +|root||root||DROP ROLE|G +|root||root||EVENT|G +|root||root||EXECUTE|G +|root||root||FILE|G +|root||root||INDEX|G +|root||root||INSERT|G +|root||root||LOCK TABLES|G +|root||mysql.session|localhost|PERSIST_RO_VARIABLES_ADMIN|G +|root||root||PROCESS|G +|root||root||REFERENCES|G +|root||root||RELOAD|G +|root||root||REPLICATION CLIENT|G +|root||root||REPLICATION SLAVE|G +|root||mysql.infoschema|localhost|SELECT|G +|root||root||SELECT|G +|root||mysql.session|localhost|SESSION_VARIABLES_ADMIN|G +|root||root||SHOW DATABASES|G +|root||root||SHOW VIEW|G +|root||mysql.session|localhost|SHUTDOWN|G +|root||root||SHUTDOWN|G +|root||mysql.session|localhost|SUPER|G +|root||root||SUPER|G +|root||mysql.infoschema|localhost|SYSTEM_USER|G +|root||mysql.session|localhost|SYSTEM_USER|G +|root||mysql.sys|localhost|SYSTEM_USER|G +|root||mysql.session|localhost|SYSTEM_VARIABLES_ADMIN|G +|root||root||TRIGGER|G +|root||root||UPDATE|G +|root||root||grant option|G +gitea|schema||gitea||ALTER|G +gitea|schema||gitea||ALTER ROUTINE|G +gitea|schema||gitea||CREATE|G +gitea|schema||gitea||CREATE ROUTINE|G +gitea|schema||gitea||CREATE TEMPORARY TABLES|G +gitea|schema||gitea||CREATE VIEW|G +gitea|schema||gitea||DELETE|G +gitea|schema||gitea||DROP|G +gitea|schema||gitea||EVENT|G +gitea|schema||gitea||EXECUTE|G +gitea|schema||gitea||INDEX|G +gitea|schema||gitea||INSERT|G +gitea|schema||gitea||LOCK TABLES|G +gitea|schema||gitea||REFERENCES|G +gitea|schema||gitea||SELECT|G +gitea|schema||gitea||SHOW VIEW|G +gitea|schema||gitea||TRIGGER|G +gitea|schema||gitea||UPDATE|G +giteadb|schema||gitea||ALTER|G +giteadb|schema||gitea||ALTER ROUTINE|G +giteadb|schema||gitea||CREATE|G +giteadb|schema||gitea||CREATE ROUTINE|G +giteadb|schema||gitea||CREATE TEMPORARY TABLES|G +giteadb|schema||gitea||CREATE VIEW|G +giteadb|schema||gitea||DELETE|G +giteadb|schema||gitea||DROP|G +giteadb|schema||gitea||EVENT|G +giteadb|schema||gitea||EXECUTE|G +giteadb|schema||gitea||INDEX|G +giteadb|schema||gitea||INSERT|G +giteadb|schema||gitea||LOCK TABLES|G +giteadb|schema||gitea||REFERENCES|G +giteadb|schema||gitea||SELECT|G +giteadb|schema||gitea||SHOW VIEW|G +giteadb|schema||gitea||TRIGGER|G +giteadb|schema||gitea||UPDATE|G +performance_schema|schema||mysql.session|localhost|SELECT|G +sys|schema||mysql.sys|localhost|TRIGGER|G + 8.0.28 + + + armscii8 + + + armscii8 + 1 + + + ascii + + + ascii + 1 + + + big5 + + + big5 + 1 + + + binary + 1 + + + cp1250 + + + cp1250 + + + cp1250 + + + cp1250 + 1 + + + cp1250 + + + cp1251 + + + cp1251 + + + cp1251 + 1 + + + cp1251 + + + cp1251 + + + cp1256 + + + cp1256 + 1 + + + cp1257 + + + cp1257 + 1 + + + cp1257 + + + cp850 + + + cp850 + 1 + + + cp852 + + + cp852 + 1 + + + cp866 + + + cp866 + 1 + + + cp932 + + + cp932 + 1 + + + dec8 + + + dec8 + 1 + + + eucjpms + + + eucjpms + 1 + + + euckr + + + euckr + 1 + + + gb18030 + + + gb18030 + 1 + + + gb18030 + + + gb2312 + + + gb2312 + 1 + + + gbk + + + gbk + 1 + + + geostd8 + + + geostd8 + 1 + + + greek + + + greek + 1 + + + hebrew + + + hebrew + 1 + + + hp8 + + + hp8 + 1 + + + keybcs2 + + + keybcs2 + 1 + + + koi8r + + + koi8r + 1 + + + koi8u + + + koi8u + 1 + + + latin1 + + + latin1 + + + latin1 + + + latin1 + + + latin1 + + + latin1 + + + latin1 + + + latin1 + 1 + + + latin2 + + + latin2 + + + latin2 + + + latin2 + 1 + + + latin2 + + + latin5 + + + latin5 + 1 + + + latin7 + + + latin7 + + + latin7 + 1 + + + latin7 + + + macce + + + macce + 1 + + + macroman + + + macroman + 1 + + + sjis + + + sjis + 1 + + + swe7 + + + swe7 + 1 + + + tis620 + + + tis620 + 1 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + 1 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ujis + + + ujis + 1 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + 1 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16le + + + utf16le + 1 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + 1 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + 1 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8mb4 + 1 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + 1 + 2023-12-25.23:41:01 + 2023-12-25.07:41:11 + utf8_general_ci + + + utf8mb4_0900_ai_ci + + + utf8_general_ci + + + utf8mb4_0900_ai_ci + + + utf8mb4_0900_ai_ci + + + utf8mb4_0900_ai_ci + + + caching_sha2_password + + + 0 + localhost + caching_sha2_password + + + 0 + localhost + caching_sha2_password + + + 0 + localhost + caching_sha2_password + + + caching_sha2_password + + + 分类品牌 + InnoDB + utf8mb4_0900_ai_ci +
+ + 商品分类 + InnoDB + utf8mb4_0900_ai_ci +
+ + 分类品牌 + InnoDB + utf8mb4_0900_ai_ci +
+ + 优惠券信息 + InnoDB + utf8_general_ci +
+ + 优惠券范围表 + InnoDB + utf8_general_ci +
+ + 优惠券领用表 + InnoDB + utf8_general_ci +
+ + 订单 + InnoDB + utf8_general_ci +
+ + 订单项信息 + InnoDB + utf8_general_ci +
+ + 订单操作日志记录 + InnoDB + utf8_general_ci +
+ + 订单统计 + InnoDB + utf8_general_ci +
+ + 付款信息表 + InnoDB + utf8mb4_0900_ai_ci +
+ + 商品 + InnoDB + utf8mb4_0900_ai_ci +
+ + 商品属性表 + InnoDB + utf8mb4_0900_ai_ci +
+ + 商品sku属性表 + InnoDB + utf8mb4_0900_ai_ci +
+ + 商品sku + InnoDB + utf8mb4_0900_ai_ci +
+ + 商品规格 + InnoDB + utf8mb4_0900_ai_ci +
+ + 商品单位 + InnoDB + utf8mb4_0900_ai_ci +
+ + 地区信息表 + InnoDB + utf8mb4_0900_ai_ci +
+ + 系统用户登录记录 + InnoDB + utf8_general_ci +
+ + 菜单表 + InnoDB + utf8mb4_0900_ai_ci +
+ + 操作日志记录 + InnoDB + utf8_general_ci +
+ + 角色 + InnoDB + utf8_general_ci +
+ + 角色菜单 + InnoDB + utf8_general_ci +
+ + 用户表 + InnoDB + utf8mb4_0900_ai_ci +
+ + 用户角色 + InnoDB + utf8_general_ci +
+ + 用户地址表 + InnoDB + utf8mb4_0900_ai_ci +
+ + 用户浏览记录表 + InnoDB + utf8mb4_0900_ai_ci +
+ + 用户收藏表 + InnoDB + utf8mb4_0900_ai_ci +
+ + 会员表 + InnoDB + utf8mb4_0900_ai_ci +
+ + 6 + ID + bigint|0s + 1 + 1 + + + 品牌名称 + varchar(100)|0s + 2 + utf8_general_ci + + + 品牌图标 + varchar(255)|0s + 3 + utf8_general_ci + + + 创建时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + 4 + + + 更新时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + CURRENT_TIMESTAMP + 5 + + + 删除标记(0:不可用 1:可用) + tinyint|0s + 0 + 1 + 6 + + + id + btree + 1 + + + 1 + 1 + PRIMARY + + + 9992 + 分类id + bigint|0s + 1 + 1 + + + 分类名称 + varchar(50)|0s + 2 + + + varchar(200)|0s + 3 + + + 父分类id + bigint|0s + 4 + + + 是否显示[0-不显示,1显示] + tinyint|0s + 5 + + + 排序 + int|0s + 6 + + + 创建时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + 7 + + + 更新时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + CURRENT_TIMESTAMP + 8 + + + 删除标记(0:不可用 1:可用) + tinyint|0s + 0 + 1 + 9 + + + id + btree + 1 + + + 1 + 1 + PRIMARY + + + 9 + ID + bigint|0s + 1 + 1 + + + 品牌ID + bigint|0s + 2 + + + 分类ID + bigint|0s + 3 + + + 创建时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + 4 + + + 更新时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + CURRENT_TIMESTAMP + 5 + + + 删除标记(0:不可用 1:可用) + tinyint|0s + 0 + 1 + 6 + + + id + btree + 1 + + + 1 + 1 + PRIMARY + + + 7 + id + bigint|0s + 1 + 1 + + + 购物券类型 1 现金券 2 满减券 + tinyint|0s + 1 + 1 + 2 + + + 优惠卷名字 + varchar(100)|0s + 3 + + + 金额 + decimal(10,2 digit)|0s + 0.00 + 1 + 4 + + + 使用门槛 0->没门槛 + decimal(10,2 digit)|0s + 0.00 + 1 + 5 + + + 可以领取的开始日期 + date|0s + 6 + + + 可以领取的结束日期 + date|0s + 7 + + + 使用范围[1->全场通用;2->指定分类;3->指定商品] + tinyint|0s + 1 + 1 + 8 + + + 使用范围描述 + varchar(200)|0s + 9 + + + 发行数量 + int|0s + 1 + 1 + 10 + + + 每人限领张数 + int|0s + 1 + 1 + 11 + + + 已使用数量 + int|0s + 0 + 1 + 12 + + + 领取数量 + int|0s + 0 + 1 + 13 + + + 过期时间 + datetime|0s + 14 + + + 发布状态[0-未发布,1-已发布] + tinyint(1)|0s + 15 + + + 创建时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + 16 + + + 更新时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + CURRENT_TIMESTAMP + 17 + + + 删除标记(0:不可用 1:可用) + tinyint|0s + 0 + 1 + 18 + + + id + btree + 1 + + + 1 + 1 + PRIMARY + + + 7 + 购物券编号 + bigint|0s + 1 + 1 + + + 优惠券id + bigint|0s + 0 + 1 + 2 + + + 范围类型; 1->商品(sku) ;2->分类 + tinyint|0s + 1 + 1 + 3 + + + bigint|0s + 0 + 1 + 4 + + + 创建时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + 5 + + + 更新时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + CURRENT_TIMESTAMP + 6 + + + 删除标记(0:不可用 1:可用) + tinyint|0s + 0 + 1 + 7 + + + id + btree + 1 + + + 1 + 1 + PRIMARY + + + 17 + 编号 + bigint|0s + 1 + 1 + + + 购物券ID + bigint|0s + 2 + + + 用户ID + bigint|0s + 3 + + + 订单ID + bigint|0s + 4 + + + 购物券状态(1:未使用 2:已使用) + tinyint|0s + 5 + + + 获取类型(1:后台赠送;2:主动获取) + tinyint|0s + 2 + 1 + 6 + + + 获取时间 + datetime|0s + 7 + + + 使用时间 + datetime|0s + 8 + + + 支付时间 + datetime|0s + 9 + + + 过期时间 + datetime|0s + 10 + + + 创建时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + 11 + + + 更新时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + CURRENT_TIMESTAMP + 12 + + + 删除标记(0:不可用 1:可用) + tinyint|0s + 0 + 1 + 13 + + + id + btree + 1 + + + 1 + 1 + PRIMARY + + + 210 + id + bigint|0s + 1 + 1 + + + 会员_id + bigint|0s + 0 + 1 + 2 + + + 昵称 + varchar(200)|0s + 3 + + + 订单号 + char(64)|0s + '' + 1 + 4 + + + 使用的优惠券 + bigint|0s + 5 + + + 订单总额 + decimal(10,2 digit)|0s + 0.00 + 1 + 6 + + + 优惠券 + decimal(10,2 digit)|0s + 0.00 + 1 + 7 + + + 原价金额 + decimal(10,2 digit)|0s + 0.00 + 1 + 8 + + + 运费 + decimal(10,2 digit)|0s + 0.00 + 1 + 9 + + + 支付方式【1->微信 2->支付宝】 + tinyint|0s + 10 + + + 订单状态【0->待付款;1->待发货;2->已发货;3->待用户收货,已完成;-1->已取消】 + tinyint|0s + 0 + 1 + 11 + + + 收货人姓名 + varchar(100)|0s + 12 + + + 收货人电话 + varchar(32)|0s + 13 + + + 收货人地址标签 + varchar(32)|0s + 14 + + + 省份/直辖市 + bigint|0s + 15 + + + 城市 + bigint|0s + 16 + + + + bigint|0s + 17 + + + 详细地址 + varchar(200)|0s + 18 + + + 支付时间 + datetime|0s + 19 + + + 发货时间 + datetime|0s + 20 + + + 确认收货时间 + datetime|0s + 21 + + + 订单备注 + varchar(500)|0s + 22 + + + 取消订单时间 + datetime|0s + 23 + + + 取消订单原因 + varchar(255)|0s + 24 + + + 创建时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + 25 + + + 更新时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + CURRENT_TIMESTAMP + 26 + + + 删除标记(0:不可用 1:可用) + tinyint|0s + 0 + 1 + 27 + + + id + btree + 1 + + + 1 + 1 + PRIMARY + + + 446 + id + bigint|0s + 1 + 1 + + + order_id + bigint|0s + 2 + + + 商品sku编号 + bigint|0s + 3 + + + 商品sku名字 + varchar(255)|0s + 4 + + + 商品sku图片 + varchar(500)|0s + 5 + + + 商品sku价格 + decimal(10,2 digit)|0s + 6 + + + 商品购买的数量 + int|0s + 7 + + + 创建时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + 8 + + + 更新时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + CURRENT_TIMESTAMP + 9 + + + 删除标记(0:不可用 1:可用) + tinyint|0s + 0 + 1 + 10 + + + id + btree + 1 + + + 1 + 1 + PRIMARY + + + 217 + bigint|0s + 1 + 1 + + + 订单id + bigint|0s + 2 + + + 操作人:用户;系统;后台管理员 + varchar(100)|0s + 3 + + + 订单状态 + int|0s + 4 + + + 备注 + varchar(500)|0s + 5 + + + 创建时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + 6 + + + 更新时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + CURRENT_TIMESTAMP + 7 + + + 删除标记(0:不可用 1:可用) + tinyint|0s + 0 + 1 + 8 + + + id + btree + 1 + + + 1 + 1 + PRIMARY + + + 303 + bigint|0s + 1 + 1 + + + 省份 + varchar(20)|0s + 2 + + + 订单统计日期 + date|0s + 3 + + + 总金额 + decimal(10,2 digit)|0s + 4 + + + 订单总数 + int|0s + 5 + + + 创建时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + 6 + + + 更新时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + CURRENT_TIMESTAMP + 7 + + + 删除标记(0:不可用 1:可用) + tinyint|0s + 0 + 1 + 8 + + + id + btree + 1 + + + 1 + 1 + PRIMARY + + + 81 + 编号 + int|0s + 1 + 1 + + + 用户id + bigint|0s + 2 + + + 订单号 + varchar(50)|0s + '' + 1 + 3 + + + 付款方式:1-微信 2-支付宝 + tinyint|0s + 0 + 1 + 4 + + + 交易编号(微信或支付) + varchar(50)|0s + 5 + + + 支付金额 + decimal(10,2 digit)|0s + 6 + + + 交易内容 + varchar(200)|0s + 7 + + + 支付状态:0-未支付 1-已支付 + char(4)|0s + 8 + + + 回调时间 + datetime|0s + 9 + + + 回调信息 + text|0s + 10 + + + 创建时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + 11 + + + timestamp|0s + CURRENT_TIMESTAMP + 1 + CURRENT_TIMESTAMP + 12 + + + tinyint|0s + 0 + 1 + 13 + + + id + btree + 1 + + + order_no + btree + + + 1 + 1 + PRIMARY + + + 5 + ID + bigint|0s + 1 + 1 + + + 商品名称 + varchar(255)|0s + 2 + utf8_general_ci + + + 品牌ID + bigint|0s + 3 + + + 一级分类id + bigint|0s + 4 + + + 二级分类id + bigint|0s + 5 + + + 三级分类id + bigint|0s + 6 + + + 计量单位 + varchar(50)|0s + 7 + utf8_general_ci + + + 轮播图 + text|0s + 8 + + + 商品规格json + varchar(255)|0s + 9 + + + 线上状态:0-初始值,1-上架,-1-自主下架 + tinyint|0s + 0 + 1 + 10 + + + 审核状态:0-初始值,1-通过,-1-未通过 + tinyint|0s + 0 + 1 + 11 + + + 审核信息 + varchar(255)|0s + 12 + utf8_general_ci + + + 创建时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + 13 + + + 更新时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + CURRENT_TIMESTAMP + 14 + + + 删除标记(0:不可用 1:可用) + tinyint|0s + 0 + 1 + 15 + + + id + btree + 1 + + + 1 + 1 + PRIMARY + + + 1 + ID + bigint|0s + 1 + 1 + + + 商品id + bigint|0s + 2 + + + 属性key + varchar(255)|0s + 3 + + + 属性value + varchar(255)|0s + 4 + utf8_general_ci + + + 创建时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + 5 + + + 更新时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + CURRENT_TIMESTAMP + 6 + + + 删除标记(0:不可用 1:可用) + tinyint|0s + 0 + 1 + 7 + + + id + btree + 1 + + + 1 + 1 + PRIMARY + + + 4 + ID + bigint|0s + 1 + 1 + + + 商品id + bigint|0s + 2 + + + 详情图片地址 + text|0s + 3 + + + 创建时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + 4 + + + 更新时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + CURRENT_TIMESTAMP + 5 + + + 删除标记(0:不可用 1:可用) + tinyint|0s + 0 + 1 + 6 + + + id + btree + 1 + + + 1 + 1 + PRIMARY + + + 11 + ID + bigint|0s + 1 + 1 + + + 商品编号 + varchar(30)|0s + 2 + utf8_general_ci + + + varchar(255)|0s + 3 + + + 商品ID + bigint|0s + 4 + + + 缩略图路径 + varchar(255)|0s + 5 + utf8_general_ci + + + 售价 + decimal(10,2 digit)|0s + 6 + + + 市场价 + decimal(10,2 digit)|0s + 7 + + + 成本价 + decimal(10,2 digit)|0s + 8 + + + 库存数 + int|0s + 9 + + + 销量 + int|0s + 0 + 1 + 10 + + + sku规格信息json + varchar(255)|0s + '' + 11 + utf8_general_ci + + + 重量 + decimal(10,2 digit)|0s + 12 + + + 体积 + decimal(10,2 digit)|0s + 13 + + + 线上状态:0-初始值,1-上架,-1-自主下架 + tinyint|0s + 14 + + + 创建时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + 15 + + + 更新时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + CURRENT_TIMESTAMP + 16 + + + 删除标记(0:不可用 1:可用) + tinyint|0s + 0 + 1 + 17 + + + id + btree + 1 + + + 1 + 1 + PRIMARY + + + 10 + ID + bigint|0s + 1 + 1 + + + 规格名称 + varchar(100)|0s + 2 + utf8_general_ci + + + 规格值:"[{"key":"颜色","valueList":["蓝","白","红"]]" + text|0s + 3 + utf8_general_ci + + + 创建时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + 4 + + + 更新时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + CURRENT_TIMESTAMP + 5 + + + 删除标记(0:不可用 1:可用) + tinyint|0s + 0 + 1 + 6 + + + id + btree + 1 + + + 1 + 1 + PRIMARY + + + 6 + ID + bigint|0s + 1 + 1 + + + 名称 + varchar(255)|0s + 2 + utf8_general_ci + + + 创建时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + 3 + + + 更新时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + CURRENT_TIMESTAMP + 4 + + + 删除标记(0:不可用 1:可用) + tinyint|0s + 0 + 1 + 5 + + + id + btree + 1 + + + 1 + 1 + PRIMARY + + + 3712 + 地区id + bigint|0s + 1 + 1 + + + 地区编码 + varchar(10)|0s + 2 + + + 上级地区code + bigint|0s + 3 + + + 地区名称 + varchar(20)|0s + 4 + + + 地区级别:1-省、自治区、直辖市 2-地级市、地区、自治州、盟 3-市辖区、县级市、县 + int|0s + 5 + + + 创建时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + 6 + + + 更新时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + CURRENT_TIMESTAMP + 7 + + + 逻辑删除(1:已删除,0:未删除) + tinyint|0s + 0 + 1 + 8 + + + id + btree + 1 + + + code + btree + 1 + + + 1 + 1 + PRIMARY + + + idx_code + + + 4 + 访问ID + bigint|0s + 1 + 1 + + + 用户账号 + varchar(50)|0s + '' + 2 + + + 登录IP地址 + varchar(128)|0s + '' + 3 + + + 登录状态(0成功 1失败) + tinyint(1)|0s + 0 + 4 + + + 提示信息 + varchar(255)|0s + '' + 5 + + + 访问时间 + datetime|0s + 6 + + + timestamp|0s + CURRENT_TIMESTAMP + 1 + CURRENT_TIMESTAMP + 7 + + + timestamp|0s + CURRENT_TIMESTAMP + 8 + + + 删除标记(0:不可用 1:可用) + tinyint|0s + 0 + 1 + 9 + + + id + btree + 1 + + + 1 + 1 + PRIMARY + + + 31 + 编号 + bigint|0s + 1 + 1 + + + 所属上级 + bigint|0s + 0 + 1 + 2 + + + 菜单标题 + varchar(20)|0s + '' + 1 + 3 + + + 组件名称 + varchar(100)|0s + 4 + + + 排序 + int|0s + 1 + 1 + 5 + + + 状态(0:禁止,1:正常) + tinyint|0s + 1 + 1 + 6 + + + 创建时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + 7 + + + 更新时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + CURRENT_TIMESTAMP + 8 + + + 删除标记(0:不可用 1:可用) + tinyint|0s + 0 + 1 + 9 + + + id + btree + 1 + + + parent_id + btree + + + 1 + 1 + PRIMARY + + + 81 + 日志主键 + bigint|0s + 1 + 1 + + + 模块标题 + varchar(50)|0s + '' + 2 + + + 方法名称 + varchar(100)|0s + '' + 3 + + + 请求方式 + varchar(10)|0s + '' + 4 + + + 操作类别(0其它 1后台用户 2手机端用户) + varchar(20)|0s + '0' + 5 + + + 操作人员 + varchar(50)|0s + '' + 6 + + + 请求URL + varchar(255)|0s + '' + 7 + + + 主机地址 + varchar(128)|0s + '' + 8 + + + 请求参数 + varchar(2000)|0s + '' + 9 + + + 返回参数 + varchar(2000)|0s + '' + 10 + + + 操作状态(0正常 1异常) + int|0s + 0 + 11 + + + 错误消息 + varchar(2000)|0s + '' + 12 + + + timestamp|0s + CURRENT_TIMESTAMP + 1 + CURRENT_TIMESTAMP + 13 + + + timestamp|0s + CURRENT_TIMESTAMP + 14 + + + 删除标记(0:不可用 1:可用) + tinyint|0s + 0 + 1 + 15 + + + id + btree + 1 + + + 1 + 1 + PRIMARY + + + 41 + 角色id + bigint|0s + 1 + 1 + + + 角色名称 + varchar(20)|0s + '' + 1 + 2 + + + 角色编码 + varchar(20)|0s + 3 + + + 描述 + varchar(255)|0s + 4 + + + 创建时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + 5 + + + 更新时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + CURRENT_TIMESTAMP + 6 + + + 删除标记(0:不可用 1:可用) + tinyint|0s + 0 + 1 + 7 + + + id + btree + 1 + + + 1 + 1 + PRIMARY + + + 257 + bigint|0s + 1 + 1 + + + bigint|0s + 0 + 1 + 2 + + + bigint|0s + 0 + 1 + 3 + + + 创建时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + 4 + + + 更新时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + CURRENT_TIMESTAMP + 5 + + + 删除标记(0:不可用 1:可用) + tinyint|0s + 0 + 1 + 6 + + + tinyint|0s + 7 + + + id + btree + 1 + + + role_id + btree + + + menu_id + btree + + + 1 + 1 + PRIMARY + + + 16 + 会员id + bigint|0s + 1 + 1 + + + 用户名 + varchar(20)|0s + '' + 1 + 2 + + + 密码 + varchar(32)|0s + '' + 1 + 3 + + + 姓名 + varchar(50)|0s + 4 + + + 手机 + varchar(11)|0s + 5 + + + 头像 + varchar(255)|0s + 6 + + + 描述 + varchar(255)|0s + 7 + + + 状态(1:正常 0:停用) + tinyint|0s + 1 + 1 + 8 + + + 创建时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + 9 + + + 更新时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + CURRENT_TIMESTAMP + 10 + + + 删除标记(0:不可用 1:可用) + tinyint|0s + 0 + 1 + 11 + + + id + btree + 1 + + + 1 + 1 + PRIMARY + + + 53 + 主键id + bigint|0s + 1 + 1 + + + 角色id + bigint|0s + 0 + 1 + 2 + + + 用户id + bigint|0s + 0 + 1 + 3 + + + 创建时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + 4 + + + 更新时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + CURRENT_TIMESTAMP + 5 + + + 删除标记(0:不可用 1:可用) + tinyint|0s + 0 + 1 + 6 + + + id + btree + 1 + + + role_id + btree + + + user_id + btree + + + 1 + 1 + PRIMARY + + + 4 + int|0s + 1 + 1 + + + 用户ID + int|0s + 0 + 1 + 2 + + + varchar(20)|0s + '' + 1 + 3 + + + 电话 + varchar(11)|0s + '' + 1 + 4 + + + 标签名称 + varchar(20)|0s + 5 + + + varchar(20)|0s + 6 + + + varchar(20)|0s + 7 + + + varchar(20)|0s + 8 + + + 详细地址 + varchar(100)|0s + '' + 1 + 9 + + + 完整地址 + varchar(500)|0s + 10 + + + 是否默认地址(0:否 1:是) + tinyint|0s + 1 + 1 + 11 + + + 创建时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + 12 + + + 更新时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + CURRENT_TIMESTAMP + 13 + + + 删除标识(0:否 1:是) + tinyint|0s + 0 + 1 + 14 + + + id + btree + 1 + + + 1 + 1 + PRIMARY + + + 10 + 主键 + bigint|0s + 1 + 1 + + + 用户ID + bigint|0s + 1 + 2 + + + 商品skuID + bigint|0s + 0 + 1 + 3 + + + 创建时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + 4 + + + timestamp|0s + CURRENT_TIMESTAMP + 1 + CURRENT_TIMESTAMP + 5 + + + tinyint|0s + 0 + 1 + 6 + + + id + btree + 1 + + + user_id + btree + + + 1 + 1 + PRIMARY + + + 4 + 主键 + bigint|0s + 1 + 1 + + + 用户ID + bigint|0s + 1 + 2 + + + 商品skuID + bigint|0s + 0 + 1 + 3 + + + 创建时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + 4 + + + timestamp|0s + CURRENT_TIMESTAMP + 1 + CURRENT_TIMESTAMP + 5 + + + tinyint|0s + 0 + 1 + 6 + + + id + btree + 1 + + + user_id + btree + + + 1 + 1 + PRIMARY + + + 33 + id + bigint|0s + 1 + 1 + + + 用户名 + varchar(50)|0s + 2 + + + 密码 + varchar(500)|0s + 3 + + + 昵称 + varchar(100)|0s + 4 + + + 电话号码 + varchar(17)|0s + 5 + + + 头像 + varchar(200)|0s + 6 + + + 性别 + tinyint(1)|0s + 7 + + + 备注 + varchar(100)|0s + 8 + + + 微信open id + varchar(45)|0s + 9 + + + 微信开放平台unionID + varchar(45)|0s + 10 + + + 最后一次登录ip + varchar(50)|0s + 11 + + + 最后一次登录时间 + datetime|0s + 12 + + + 状态:1为正常,0为禁止 + tinyint|0s + 13 + + + 创建时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + 14 + + + 更新时间 + timestamp|0s + CURRENT_TIMESTAMP + 1 + CURRENT_TIMESTAMP + 15 + + + 删除标记(0:不可用 1:可用) + tinyint|0s + 0 + 1 + 16 + + + id + btree + 1 + + + 1 + 1 + PRIMARY + +
+
\ No newline at end of file diff --git a/.idea/dataSources/e46bfd2c-b955-434f-b6fc-b16ffa1fd71a/storage_v2/_src_/schema/db_spzx.fMWaVg.meta b/.idea/dataSources/e46bfd2c-b955-434f-b6fc-b16ffa1fd71a/storage_v2/_src_/schema/db_spzx.fMWaVg.meta new file mode 100644 index 0000000..22db718 --- /dev/null +++ b/.idea/dataSources/e46bfd2c-b955-434f-b6fc-b16ffa1fd71a/storage_v2/_src_/schema/db_spzx.fMWaVg.meta @@ -0,0 +1,2 @@ +#n:db_spzx +! [1703518861000, 0, null, null, -2147483648, -2147483648] diff --git a/.idea/dataSources/e46bfd2c-b955-434f-b6fc-b16ffa1fd71a/storage_v2/_src_/schema/information_schema.FNRwLQ.meta b/.idea/dataSources/e46bfd2c-b955-434f-b6fc-b16ffa1fd71a/storage_v2/_src_/schema/information_schema.FNRwLQ.meta new file mode 100644 index 0000000..1ff3db2 --- /dev/null +++ b/.idea/dataSources/e46bfd2c-b955-434f-b6fc-b16ffa1fd71a/storage_v2/_src_/schema/information_schema.FNRwLQ.meta @@ -0,0 +1,2 @@ +#n:information_schema +! [null, 0, null, null, -2147483648, -2147483648] diff --git a/.idea/dataSources/e46bfd2c-b955-434f-b6fc-b16ffa1fd71a/storage_v2/_src_/schema/mysql.osA4Bg.meta b/.idea/dataSources/e46bfd2c-b955-434f-b6fc-b16ffa1fd71a/storage_v2/_src_/schema/mysql.osA4Bg.meta new file mode 100644 index 0000000..86a53f1 --- /dev/null +++ b/.idea/dataSources/e46bfd2c-b955-434f-b6fc-b16ffa1fd71a/storage_v2/_src_/schema/mysql.osA4Bg.meta @@ -0,0 +1,2 @@ +#n:mysql +! [null, 0, null, null, -2147483648, -2147483648] diff --git a/.idea/dataSources/e46bfd2c-b955-434f-b6fc-b16ffa1fd71a/storage_v2/_src_/schema/performance_schema.kIw0nw.meta b/.idea/dataSources/e46bfd2c-b955-434f-b6fc-b16ffa1fd71a/storage_v2/_src_/schema/performance_schema.kIw0nw.meta new file mode 100644 index 0000000..9394db1 --- /dev/null +++ b/.idea/dataSources/e46bfd2c-b955-434f-b6fc-b16ffa1fd71a/storage_v2/_src_/schema/performance_schema.kIw0nw.meta @@ -0,0 +1,2 @@ +#n:performance_schema +! [null, 0, null, null, -2147483648, -2147483648] diff --git a/.idea/dataSources/e46bfd2c-b955-434f-b6fc-b16ffa1fd71a/storage_v2/_src_/schema/sys.zb4BAA.meta b/.idea/dataSources/e46bfd2c-b955-434f-b6fc-b16ffa1fd71a/storage_v2/_src_/schema/sys.zb4BAA.meta new file mode 100644 index 0000000..2f4470b --- /dev/null +++ b/.idea/dataSources/e46bfd2c-b955-434f-b6fc-b16ffa1fd71a/storage_v2/_src_/schema/sys.zb4BAA.meta @@ -0,0 +1,2 @@ +#n:sys +! [null, 0, null, null, -2147483648, -2147483648] diff --git a/spzx-service/service-product/src/main/java/cn/bunny/web/product/ProductApplication.java b/spzx-service/service-product/src/main/java/cn/bunny/web/product/ProductApplication.java new file mode 100644 index 0000000..a567531 --- /dev/null +++ b/spzx-service/service-product/src/main/java/cn/bunny/web/product/ProductApplication.java @@ -0,0 +1,11 @@ +package cn.bunny.web.product; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class ProductApplication { + public static void main(String[] args) { + SpringApplication.run(ProductApplication.class, args); + } +} diff --git a/spzx-service/service-product/src/main/java/cn/bunny/web/product/controller/IndexController.java b/spzx-service/service-product/src/main/java/cn/bunny/web/product/controller/IndexController.java new file mode 100644 index 0000000..a7ebdfb --- /dev/null +++ b/spzx-service/service-product/src/main/java/cn/bunny/web/product/controller/IndexController.java @@ -0,0 +1,44 @@ +package cn.bunny.web.product.controller; + +import cn.bunny.common.spzx.model.entity.product.Category; +import cn.bunny.common.spzx.model.entity.product.ProductSku; +import cn.bunny.common.spzx.model.vo.common.Result; +import cn.bunny.common.spzx.model.vo.common.ResultCodeEnum; +import cn.bunny.common.spzx.model.vo.h5.IndexVo; +import cn.bunny.web.product.service.CategoryService; +import cn.bunny.web.product.service.ProductService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +@Tag(name = "首页接口管理") +@RestController +@RequestMapping(value = "/api/product/index") +@CrossOrigin +public class IndexController { + @Resource + private CategoryService categoryService; + @Resource + private ProductService productService; + + @Operation(summary = "获取首页数据") + @GetMapping("") + public Result index() { + // 所有一级分类 + List categoryList = categoryService. selectOneCategory(); + // 根据销量排序,获取前十条激励 + List productSkuList = productService.selectProductSkuBySal(); + + // 封装数据到VO + IndexVo indexVo = new IndexVo(); + indexVo.setCategoryList(categoryList); + indexVo.setProductSkuList(productSkuList); + return Result.build(indexVo, ResultCodeEnum.SUCCESS); + } +} diff --git a/spzx-service/service-product/src/main/java/cn/bunny/web/product/mapper/CategoryMapper.java b/spzx-service/service-product/src/main/java/cn/bunny/web/product/mapper/CategoryMapper.java new file mode 100644 index 0000000..7e3e3bf --- /dev/null +++ b/spzx-service/service-product/src/main/java/cn/bunny/web/product/mapper/CategoryMapper.java @@ -0,0 +1,15 @@ +package cn.bunny.web.product.mapper; + +import cn.bunny.common.spzx.model.entity.product.Category; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface CategoryMapper { + // 查询所有一级分类 + List selectOneCategory(); + + // 1. 查询所有分类,返回list集合 + List findAll(); +} diff --git a/spzx-service/service-product/src/main/java/cn/bunny/web/product/service/CategoryService.java b/spzx-service/service-product/src/main/java/cn/bunny/web/product/service/CategoryService.java new file mode 100644 index 0000000..e5eab15 --- /dev/null +++ b/spzx-service/service-product/src/main/java/cn/bunny/web/product/service/CategoryService.java @@ -0,0 +1,12 @@ +package cn.bunny.web.product.service; + +import cn.bunny.common.spzx.model.entity.product.Category; + +import java.util.List; + +public interface CategoryService { + // 所有一级分类 + List selectOneCategory(); + // 获取分类树形数据 + List findCategoryTree(); +} diff --git a/spzx-service/service-product/src/main/java/cn/bunny/web/product/service/ProductService.java b/spzx-service/service-product/src/main/java/cn/bunny/web/product/service/ProductService.java new file mode 100644 index 0000000..41c3cb4 --- /dev/null +++ b/spzx-service/service-product/src/main/java/cn/bunny/web/product/service/ProductService.java @@ -0,0 +1,10 @@ +package cn.bunny.web.product.service; + +import cn.bunny.common.spzx.model.entity.product.ProductSku; + +import java.util.List; + +public interface ProductService { + // 根据销量排序,获取前十条激励 + List selectProductSkuBySal(); +} diff --git a/spzx-service/service-product/src/main/java/cn/bunny/web/product/service/imp/CategoryServiceImpl.java b/spzx-service/service-product/src/main/java/cn/bunny/web/product/service/imp/CategoryServiceImpl.java new file mode 100644 index 0000000..2738e48 --- /dev/null +++ b/spzx-service/service-product/src/main/java/cn/bunny/web/product/service/imp/CategoryServiceImpl.java @@ -0,0 +1,48 @@ +package cn.bunny.web.product.service.imp; + +import cn.bunny.common.spzx.model.entity.product.Category; +import cn.bunny.web.product.mapper.CategoryMapper; +import cn.bunny.web.product.service.CategoryService; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +@Service +public class CategoryServiceImpl implements CategoryService { + @Resource + private CategoryMapper categoryMapper; + + // 商品一级分类接口 + @Override + public List selectOneCategory() { + return categoryMapper.selectOneCategory(); + } + + // 获取分类树形数据 + @Override + public List findCategoryTree() { + // 1. 查询所有分类,返回list集合 + List allCategoryList = categoryMapper.findAll(); + + // 2. 遍历所有分类list集合,通过parentId=0得到所有一级分类 + List categoryList = allCategoryList.stream().filter(item -> item.getParentId() == 0) + .toList(); + + // 3. 编辑所有一级分类list几个,条件判断;id=parentId,得到一级下面二级分类 + categoryList.forEach(category -> { + List categories = allCategoryList.stream().filter(item -> Objects.equals(item.getParentId(), category.getId())).collect(Collectors.toList()); + category.setChildren(categories); + + categories.forEach(twoCategory -> { + List threeCategorieList = allCategoryList.stream().filter(item -> Objects.equals(item.getParentId(), twoCategory.getId())).toList(); + twoCategory.setChildren(threeCategorieList); + }); + }); + + // 4. 遍历所有二级分类,条件判断;id=parentId得到二级下面三级分类 + return categoryList; + } +} diff --git a/spzx-service/service-product/src/main/java/cn/bunny/web/product/service/imp/ProductServiceImpl.java b/spzx-service/service-product/src/main/java/cn/bunny/web/product/service/imp/ProductServiceImpl.java new file mode 100644 index 0000000..30b2098 --- /dev/null +++ b/spzx-service/service-product/src/main/java/cn/bunny/web/product/service/imp/ProductServiceImpl.java @@ -0,0 +1,20 @@ +package cn.bunny.web.product.service.imp; + +import cn.bunny.common.spzx.model.entity.product.ProductSku; +import cn.bunny.web.product.mapper.ProductSkuMapper; +import cn.bunny.web.product.service.ProductService; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class ProductServiceImpl implements ProductService { + @Resource + private ProductSkuMapper productSkuMapper; + + @Override + public List selectProductSkuBySal() { + return productSkuMapper.selectProductSkuBySale(); + } +}