Compare commits
302 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b0dc4db48a | ||
|
|
471b128f22 | ||
|
|
7727c1a45b | ||
|
|
2bc381dad5 | ||
|
|
13c5ceea96 | ||
|
|
5ce5384230 | ||
|
|
36528ae416 | ||
|
|
327926adb9 | ||
|
|
a210565387 | ||
|
|
d1d91b78fc | ||
|
|
6006c3eeff | ||
|
|
7c2234b1a9 | ||
|
|
3f92034dd1 | ||
|
|
f99b65b2e6 | ||
|
|
19ab3789e5 | ||
|
|
0bbefb516d | ||
|
|
48a2502467 | ||
|
|
47620a61ef | ||
|
|
f44e787f72 | ||
|
|
ae745ef518 | ||
|
|
11baa30a9a | ||
|
|
9b7be69c6c | ||
|
|
d3e1de5620 | ||
|
|
8784da3449 | ||
|
|
006218e15a | ||
|
|
d470192ac6 | ||
|
|
97cac9916d | ||
|
|
cf6b1a60f4 | ||
|
|
5fcdbe8df9 | ||
|
|
4063c8b063 | ||
|
|
d84f3b547b | ||
|
|
80492903ae | ||
|
|
3c6d7162e8 | ||
|
|
daa0320d78 | ||
|
|
82d7ab1440 | ||
|
|
315ab4d132 | ||
|
|
a08373d6a8 | ||
|
|
7ac15d1abe | ||
|
|
8f10b6b2a6 | ||
|
|
a9f0eac6f7 | ||
|
|
fe675d6ac4 | ||
|
|
fb006e13a0 | ||
|
|
318cc04566 | ||
|
|
2e80478203 | ||
|
|
42e9ee06f4 | ||
|
|
88109995bb | ||
|
|
3c9c3c2c17 | ||
|
|
b78f1e512e | ||
|
|
7492abf4a3 | ||
|
|
2973bcdc7a | ||
|
|
98df40a9a1 | ||
|
|
e35eb6961d | ||
|
|
36beadbc03 | ||
|
|
e9075a94f3 | ||
|
|
c12dd02f8a | ||
|
|
eb19b8f218 | ||
|
|
37ec1bf771 | ||
|
|
d7e4948447 | ||
|
|
e08e187526 | ||
|
|
f8c1e9d8b8 | ||
|
|
74f92506d0 | ||
|
|
b930a598c8 | ||
|
|
1f15e8da30 | ||
|
|
07fae7a531 | ||
|
|
20f1d58386 | ||
|
|
cdfdf483d6 | ||
|
|
771f9668ce | ||
|
|
603c1d6935 | ||
|
|
3a14e96c5d | ||
|
|
09af55fde1 | ||
|
|
3d158125f9 | ||
|
|
fbb750927f | ||
|
|
55b5710769 | ||
|
|
a971066909 | ||
|
|
d4911d1a32 | ||
|
|
1726e50e46 | ||
|
|
3cd55a55d0 | ||
|
|
ef0eeda469 | ||
|
|
f9308fa5bf | ||
|
|
1424eaa90f | ||
|
|
e141d22504 | ||
|
|
7276824a18 | ||
|
|
4e2176e049 | ||
|
|
6c871d470e | ||
|
|
790dc53ad3 | ||
|
|
ab118a8efc | ||
|
|
a0638f0f23 | ||
|
|
f3e0fd7bf5 | ||
|
|
db56984cf3 | ||
|
|
7aa99497e5 | ||
|
|
7941b74efb | ||
|
|
c1d5673837 | ||
|
|
6c95679ad2 | ||
|
|
ebeec5e8a4 | ||
|
|
ee77ee6731 | ||
|
|
dbc5305ea7 | ||
|
|
48146edee9 | ||
|
|
8532400b82 | ||
|
|
100d5d3317 | ||
|
|
4d83b63f82 | ||
|
|
522ca6f157 | ||
|
|
9e3eb1f74e | ||
|
|
d8155b2c15 | ||
|
|
700d2eb401 | ||
|
|
d5b6ba5d00 | ||
|
|
9e8aa7f223 | ||
|
|
99160abd37 | ||
|
|
1195349ebf | ||
|
|
38124a702a | ||
|
|
e1ec2b9b27 | ||
|
|
64e45c10b1 | ||
|
|
69d712c4b1 | ||
|
|
f12c8a1aec | ||
|
|
2c054f27d3 | ||
|
|
28cde4817a | ||
|
|
74cc360900 | ||
|
|
dd7af218a4 | ||
|
|
f9a18ffbe1 | ||
|
|
6464d68133 | ||
|
|
fc76e74d34 | ||
|
|
7b7bab44c7 | ||
|
|
0a17fa9f53 | ||
|
|
2f48def734 | ||
|
|
e2592a6c38 | ||
|
|
2da7d51eeb | ||
|
|
45e65e71e1 | ||
|
|
50dcc461b1 | ||
|
|
50f27e57d4 | ||
|
|
8ceb214252 | ||
|
|
d6b05d4ff1 | ||
|
|
bf2882b566 | ||
|
|
9a10d2aa7f | ||
|
|
17705188e0 | ||
|
|
3648929ed3 | ||
|
|
6c22bf24a6 | ||
|
|
c3b6c88471 | ||
|
|
e01586b394 | ||
|
|
ba81cc5ece | ||
|
|
9b7f5f30fa | ||
|
|
bb7ea5881e | ||
|
|
74beaf0cf0 | ||
|
|
4498d63f6c | ||
|
|
86d0ecc89e | ||
|
|
b0b9420a8e | ||
|
|
d93e11b302 | ||
|
|
5ee25262aa | ||
|
|
dbe0821ecf | ||
|
|
77a30459cd | ||
|
|
c1025b7268 | ||
|
|
ce22c9b7ff | ||
|
|
99f93b516a | ||
|
|
60cf5c92dd | ||
|
|
3a2d4e6c91 | ||
|
|
7632cf325d | ||
|
|
f20ce80c96 | ||
|
|
cd7fc4d7ac | ||
|
|
644de06172 | ||
|
|
083b90a04a | ||
|
|
3a4d08980f | ||
|
|
26c67c72fa | ||
|
|
829472c6a3 | ||
|
|
8deaef09d7 | ||
|
|
2018457c28 | ||
|
|
0760c72ef8 | ||
|
|
0c87c6f080 | ||
|
|
6e611d3464 | ||
|
|
f71facf72a | ||
|
|
b804fa68cf | ||
|
|
363e7f40bf | ||
|
|
02327402a8 | ||
|
|
f8ae17b360 | ||
|
|
8e30ae435f | ||
|
|
f00386c81d | ||
|
|
f798dbf3ec | ||
|
|
0dd8488e19 | ||
|
|
a7f26ff19e | ||
|
|
0cad52cfa6 | ||
|
|
cd1b67ba84 | ||
|
|
4ac7c038f2 | ||
|
|
ceea01ccf8 | ||
|
|
b8634e9d59 | ||
|
|
5999b5f217 | ||
|
|
1b60079481 | ||
|
|
02f3bde2b4 | ||
|
|
5a7440c5bf | ||
|
|
a407d3a539 | ||
|
|
ad2640dac9 | ||
|
|
8b861e8fe7 | ||
|
|
fe8523ca3f | ||
|
|
0514bec994 | ||
|
|
e99aeeede5 | ||
|
|
2e2ba961d9 | ||
|
|
f9d7e9324a | ||
|
|
094212e6a2 | ||
|
|
7c48413d6b | ||
|
|
3acdb7733e | ||
|
|
1ee60c02d3 | ||
|
|
abdc74c773 | ||
|
|
2c8ac59628 | ||
|
|
280c5dec39 | ||
|
|
58d41775cf | ||
|
|
d6b59c23af | ||
|
|
fdb55bc426 | ||
|
|
66e9a4f4cc | ||
|
|
1c0a420515 | ||
|
|
0f02a398f6 | ||
|
|
41835aaece | ||
|
|
9f3a4dbf68 | ||
|
|
0ccdc94644 | ||
|
|
bd3aceaeac | ||
|
|
79da543d57 | ||
|
|
c459a9086a | ||
|
|
bc6abdbf1a | ||
|
|
dd491e38e5 | ||
|
|
b851de488b | ||
|
|
9ff2f50b8f | ||
|
|
6f1aa6e3d5 | ||
|
|
e9663434a2 | ||
|
|
6bbd2f8bb8 | ||
|
|
13ecd5815b | ||
|
|
3576c968cf | ||
|
|
bdbf4589ea | ||
|
|
44fb0601a6 | ||
|
|
37348335b2 | ||
|
|
8f351fdb8b | ||
|
|
f35ae5b1ee | ||
|
|
6a13351bc3 | ||
|
|
ecfe856fa7 | ||
|
|
0c1d3236e8 | ||
|
|
d6d0afa23a | ||
|
|
6607506929 | ||
|
|
fe021f8a11 | ||
|
|
4b7ab94ba4 | ||
|
|
15ab6bfda4 | ||
|
|
06212c073d | ||
|
|
eef270ff9c | ||
|
|
3c27cd09ff | ||
|
|
eda1e841bb | ||
|
|
dd213e7e33 | ||
|
|
9de55088ea | ||
|
|
451d683c4f | ||
|
|
d4642d85dd | ||
|
|
5d211c241d | ||
|
|
a9c79eedd4 | ||
|
|
ac5d04ddc2 | ||
|
|
caacb9e201 | ||
|
|
844bff971f | ||
|
|
0f8a5aba05 | ||
|
|
9ee5b4515a | ||
|
|
2246b498d9 | ||
|
|
93e4998b87 | ||
|
|
4718ce292d | ||
|
|
a360fd2eda | ||
|
|
e0ca366431 | ||
|
|
3d3be0b283 | ||
|
|
656e2a9307 | ||
|
|
7f08124afc | ||
|
|
86f010b87e | ||
|
|
d29d166ce0 | ||
|
|
3c78a06008 | ||
|
|
b6a5630021 | ||
|
|
560ab5f102 | ||
|
|
da1b2c3aa8 | ||
|
|
7db5690a26 | ||
|
|
a1fcadf8b2 | ||
|
|
8302ca2e3a | ||
|
|
17b977ef94 | ||
|
|
512a298cc9 | ||
|
|
86625e9e9d | ||
|
|
a599fb9d01 | ||
|
|
89b057dfca | ||
|
|
18d2379a19 | ||
|
|
3e73257922 | ||
|
|
9e240f22b6 | ||
|
|
6aadd00e45 | ||
|
|
5fc962b29d | ||
|
|
00e93c91f5 | ||
|
|
0e7a4ee06c | ||
|
|
531ca13555 | ||
|
|
a903160305 | ||
|
|
cd2942a96b | ||
|
|
6235faba96 | ||
|
|
6e7254e765 | ||
|
|
e338229902 | ||
|
|
9ff40291ee | ||
|
|
4c8375e861 | ||
|
|
acc40dc6fc | ||
|
|
177cd86366 | ||
|
|
d06b5ceb89 | ||
|
|
6926cd583d | ||
|
|
de2777e244 | ||
|
|
c10b698aed | ||
|
|
256d9e240e | ||
|
|
f9662bd61a | ||
|
|
eedea676aa | ||
|
|
92c3c21e32 | ||
|
|
bd13a9b150 | ||
|
|
931276f72b | ||
|
|
cce14b4794 | ||
|
|
f6706d6394 | ||
|
|
346465630c | ||
|
|
800437473d |
3
DB/README.md
Normal file
3
DB/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
## PS:数据库位置
|
||||
|
||||
点击跳转 https://gitee.com/beijing_hongye_huicheng/docker/tree/master/init/mysql 这里有与tag版本一致的sql,根据tag获取sql,如果使用master代码,则需要在lilishop项目根目录的update-sql目录中,获取对应的升级sql。
|
||||
66
DB/li_notice_message.sql
Normal file
66
DB/li_notice_message.sql
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
Navicat MySQL Data Transfer
|
||||
|
||||
Source Server : 192.168.0.116
|
||||
Source Server Type : MySQL
|
||||
Source Server Version : 80023
|
||||
Source Host : 192.168.0.116:3306
|
||||
Source Schema : lilishop
|
||||
|
||||
Target Server Type : MySQL
|
||||
Target Server Version : 80023
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 27/07/2021 19:42:15
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for li_notice_message
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `li_notice_message`;
|
||||
CREATE TABLE `li_notice_message` (
|
||||
`id` bigint NOT NULL,
|
||||
`create_by` varchar(255) DEFAULT NULL,
|
||||
`create_time` datetime(6) DEFAULT NULL,
|
||||
`delete_flag` bit(1) DEFAULT NULL,
|
||||
`update_by` varchar(255) DEFAULT NULL,
|
||||
`update_time` datetime(6) DEFAULT NULL,
|
||||
`notice_content` varchar(255) DEFAULT NULL,
|
||||
`notice_node` varchar(255) DEFAULT NULL,
|
||||
`notice_status` varchar(255) DEFAULT NULL,
|
||||
`notice_title` varchar(255) DEFAULT NULL,
|
||||
`variable` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of li_notice_message
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `li_notice_message` VALUES (1, NULL, '2021-07-14 19:22:03.000000', NULL, NULL, '2021-07-14 19:22:09.000000', '订单 #{商品名称}已经提交成功,请及时付款哦~', '订单提交成功通知', 'OPEN', '订单提交成功通知', 'goods');
|
||||
INSERT INTO `li_notice_message` VALUES (2, NULL, '2021-07-14 19:22:06.000000', NULL, NULL, '2021-07-14 19:22:11.000000', '订单#{商品名称}支付成功,我们将尽快为您安排发货哦~', '订单支付成功通知', 'OPEN', '订单支付成功通知', 'goods');
|
||||
INSERT INTO `li_notice_message` VALUES (3, NULL, '2021-07-15 19:10:14.000000', NULL, NULL, '2021-07-15 19:10:17.000000', '订单#{商品名称}已发货,请注意物流进度哦~', '订单发货通知\n', 'OPEN', '订单发货通知', 'goods');
|
||||
INSERT INTO `li_notice_message` VALUES (4, NULL, '2021-07-15 19:12:00.000000', NULL, NULL, '2021-07-15 19:12:02.000000', '订单#{商品名称}已完成,期待您分享商品评价与购物心得哦~', '订单完成通知', 'OPEN', '订单完成通知', 'goods');
|
||||
INSERT INTO `li_notice_message` VALUES (5, NULL, '2021-07-15 19:14:01.000000', NULL, NULL, '2021-07-15 19:14:04.000000', '订单#{商品名称}已取消,取消原因为 #{取消原因},请及时关注您的订单状态哦~', '订单取消成功通知', 'OPEN', '订单取消通知', 'goods,cancel_reason');
|
||||
INSERT INTO `li_notice_message` VALUES (6, NULL, '2021-07-15 19:26:27.000000', NULL, NULL, '2021-07-15 19:26:34.000000', '商品#{商品名称}还没有收到您的评价呢,期待您与我们分享哦~', '订单评价提醒', 'OPEN', '订单评价提醒', 'goods');
|
||||
INSERT INTO `li_notice_message` VALUES (7, NULL, '2021-07-15 19:26:25.000000', NULL, NULL, '2021-07-15 19:26:37.000000', '恭喜,您的拼团#{商品名称}已成团,我们将尽快为您安排发货哦~', '拼团成功通知', 'OPEN', '拼团成功通知', 'goods');
|
||||
INSERT INTO `li_notice_message` VALUES (8, NULL, '2021-07-15 19:31:45.000000', NULL, NULL, '2021-07-15 19:31:49.000000', '售后单 #{商品名称} 已经提交成功,需要商家审核,请耐心等待哦~', '售后提交成功通知', 'OPEN', '售后提交成功通知', 'goods');
|
||||
INSERT INTO `li_notice_message` VALUES (9, NULL, '2021-07-15 19:32:44.000000', NULL, NULL, '2021-07-15 19:32:49.000000', '售后单 #{商品名称} 已通过退货审核,请尽快安排将货物退还至商家哦~', '退货审核通过通知', 'OPEN', '退货审核通过通知', 'goods');
|
||||
INSERT INTO `li_notice_message` VALUES (10, NULL, '2021-07-15 19:32:46.000000', NULL, NULL, '2021-07-15 19:32:52.000000', '售后单 #{商品名称} 已通过退款审核,将在1-3个工作日内自动退款~', '退款审核通过通知', 'OPEN', '退款审核通过通知', 'goods');
|
||||
INSERT INTO `li_notice_message` VALUES (11, NULL, '2021-07-15 19:36:48.000000', NULL, NULL, '2021-07-15 19:36:50.000000', '很抱歉,售后单#{商品名称}未通过商家退货审核,原因是:#{拒绝原因}', '退货审核未通过通知', 'OPEN', '退货审核未通过通知', 'goods,refuse');
|
||||
INSERT INTO `li_notice_message` VALUES (12, NULL, '2021-07-15 19:36:46.000000', NULL, NULL, '2021-07-15 19:36:52.000000', '很抱歉,售后单#{商品名称}未通过商家退款审核,原因是:#{拒绝原因}', '退款审核未通过通知', 'OPEN', '退款审核未通过通知', 'goods,refuse');
|
||||
INSERT INTO `li_notice_message` VALUES (13, NULL, '2021-07-15 19:39:31.000000', NULL, NULL, '2021-07-15 19:39:34.000000', '很抱歉,您的退货物品{退单第一行商品名称}被商家拒收,原因是:#{拒绝原因}', '退货物品拒收通知', 'OPEN', '退货物品拒收通知', 'goods,refuse');
|
||||
INSERT INTO `li_notice_message` VALUES (14, NULL, '2021-07-15 19:39:39.000000', NULL, NULL, '2021-07-15 19:39:43.000000', '订单 #{商品名称} 商家已签收哦,请关注后续退款状态,将在1-3个工作日内自动退款~', '退货物品签收通知', 'OPEN', '退货物品签收通知', 'goods');
|
||||
INSERT INTO `li_notice_message` VALUES (15, NULL, '2021-07-15 19:44:38.000000', NULL, NULL, '2021-07-15 19:44:40.000000', '售后单 #{商品名称} 已经完成,请关注及时关注售后单状态~', '售后完成通知', 'OPEN', '售后完成通知', 'goods');
|
||||
INSERT INTO `li_notice_message` VALUES (16, NULL, '2021-07-15 19:47:27.000000', NULL, NULL, '2021-07-15 19:47:31.000000', '您当前到账{获得积分}积分,消费#{消费积分} 积分,积分可以抵现金哦,真的很棒棒呢~', '积分变更通知', 'OPEN', '积分变更通知', 'income_points,expenditure_points');
|
||||
INSERT INTO `li_notice_message` VALUES (17, NULL, '2021-07-15 19:53:10.000000', NULL, NULL, '2021-07-15 19:53:13.000000', '您的余额账户今日收入¥#{收入金额},支出¥#{支出金额},如遇异常变动,请及时联系我们哦~', '余额账户变更通知', 'OPEN', '余额账户变更通知', 'income,expenditure');
|
||||
INSERT INTO `li_notice_message` VALUES (18, NULL, '2021-07-15 19:57:01.000000', NULL, NULL, '2021-07-15 19:57:04.000000', '恭喜您,您的提处理成功,提现金额为¥#{收入金额},请及时关注余额变动哦~', '余额提现成功通知', 'OPEN', '余额提现成功通知', 'income');
|
||||
INSERT INTO `li_notice_message` VALUES (19, NULL, '2021-07-21 18:58:10.000000', NULL, NULL, '2021-07-21 18:58:13.000000', '恭喜您,您的提现金额为¥#{金额}的申请已经提交审核,请及时关注审核动态哦~', '提现申请提交成功通知', 'OPEN', '提现申请提交成功通知', 'price');
|
||||
INSERT INTO `li_notice_message` VALUES (20, NULL, '2021-07-21 19:16:58.000000', NULL, NULL, '2021-07-21 19:17:02.000000', '很抱歉,您的提现金额为¥#{金额}的申请已被拒绝,如有问题请及时联系管理员哦~', '提现申请驳回通知', 'OPEN', '提现申请驳回通知', 'price');
|
||||
INSERT INTO `li_notice_message` VALUES (21, NULL, '2021-07-26 18:59:00.000000', NULL, NULL, '2021-07-26 18:59:03.000000', '恭喜您,您的提处理成功,提现金额为¥#{收入金额},将在1-3个工作日内到账~', '微信提现成功通知', 'OPEN', '微信提现成功通知', 'income');
|
||||
COMMIT;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
28
DB/version4.1to4.2.sql
Normal file
28
DB/version4.1to4.2.sql
Normal file
@@ -0,0 +1,28 @@
|
||||
/** 添加分销员结算信息**/
|
||||
ALTER TABLE li_distribution ADD settlement_bank_account_name varchar ( 200 );
|
||||
ALTER TABLE li_distribution ADD settlement_bank_account_num varchar ( 200 );
|
||||
ALTER TABLE li_distribution ADD settlement_bank_branch_name varchar ( 200 );
|
||||
|
||||
/** 文章分类添加默认值**/
|
||||
ALTER TABLE li_article_category alter column sort set default 0;
|
||||
/** 添加分销提现菜单**/
|
||||
INSERT INTO `lilishop`.`li_menu`(`id`, `create_by`, `create_time`, `delete_flag`, `update_by`, `update_time`, `description`, `front_route`, `icon`, `level`, `name`, `parent_id`, `path`, `sort_order`, `title`, `front_component`) VALUES (1410862675914764290, 'admin', '2021-07-02 15:27:29', b'0', 'admin', '2021-07-02 15:27:45', 'null', 'distribution/distributionCash', '', 2, 'distributionCash', '1374173575405109248', 'distributionCash', 5.00, '分销提现', 'null');
|
||||
|
||||
/** 促销商品添加商品类型**/
|
||||
ALTER TABLE li_promotion_goods ADD goods_type varchar (200);
|
||||
/** 修改历史积分积分类型的字段类型 **/
|
||||
alter table li_member_points_history modify column point_type varchar(50);
|
||||
update li_member_points_history set point_type = 'INCREASE' where point_type=1;
|
||||
update li_member_points_history set point_type = 'REDUCE' where point_type=0;
|
||||
|
||||
/** 添加分词管理菜单*/
|
||||
INSERT INTO `lilishop`.`li_menu` (`id`, `create_by`, `create_time`, `delete_flag`, `update_by`, `update_time`, `description`, `front_route`, `icon`, `level`, `name`, `parent_id`, `path`, `sort_order`, `title`, `front_component`) VALUES (1349247640584085511, 'admin', '2021-01-13 14:51:20', b'0', 'admin', '2021-02-25 09:02:59', 'null', 'customWords/index', 'ios-american-football', 2, 'customWords', '1349237129847005184', 'customWords', 8.00, '分词管理', 'null');
|
||||
|
||||
/** 修改会员评价店铺图片字段类型 **/
|
||||
alter table li_member_evaluation modify column reply_image text;
|
||||
|
||||
/** 修改售后图片字段类型 **/
|
||||
alter table li_after_sale modify column after_sale_image text;
|
||||
|
||||
/** 提现申请审核sql **/
|
||||
INSERT INTO `lilishop`.`li_menu`(`id`, `create_by`, `create_time`, `delete_flag`, `update_by`, `update_time`, `description`, `front_route`, `icon`, `level`, `name`, `parent_id`, `path`, `sort_order`, `title`, `front_component`) VALUES (1367042804944994305, 'admin', '2021-03-03 09:22:58', b'0', NULL, NULL, NULL, 'member/advance/withdrawApply', 'ios-alert', 2, 'withdrawApply', '1367042490443497472', 'withdrawApply', 1.00, '提现申请', NULL);
|
||||
161
DB/version4.2to4.3.sql
Normal file
161
DB/version4.2to4.3.sql
Normal file
@@ -0,0 +1,161 @@
|
||||
/*
|
||||
Navicat Premium Data Transfer
|
||||
|
||||
Source Server : 192.168.0.116
|
||||
Source Server Type : MySQL
|
||||
Source Server Version : 80023
|
||||
Source Host : 192.168.0.116:3306
|
||||
Source Schema : lilishop
|
||||
|
||||
Target Server Type : MySQL
|
||||
Target Server Version : 80023
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 27/07/2021 17:04:46
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
/** 添加结算单积分、砍价结算价信息**/
|
||||
ALTER TABLE li_bill ADD point_settlement_price double DEFAULT 0.00 COMMENT '积分商品结算金额 ';
|
||||
ALTER TABLE li_bill ADD kanjia_settlement_price double DEFAULT 0.00 COMMENT '砍价商品结算金额';
|
||||
ALTER TABLE li_store_flow ADD point_settlement_price double DEFAULT 0.00 COMMENT '积分商品结算金额';
|
||||
ALTER TABLE li_store_flow ADD kanjia_settlement_price double DEFAULT 0.00 COMMENT '砍价商品结算金额';
|
||||
ALTER TABLE li_order ADD order_promotion_type varchar(255) DEFAULT null COMMENT '订单促销类型';
|
||||
|
||||
/** 热词管理*/
|
||||
UPDATE `lilishop`.`li_menu` SET `create_by` = 'admin', `create_time` = '2021-03-03 09:54:51', `delete_flag` = b'0', `update_by` = 'admin', `update_time` = '2021-07-23 19:07:45', `description` = 'null', `front_route` = 'page/article-manage/hotWords', `icon` = 'md-aperture', `level` = 2, `name` = 'hotKeyWord', `parent_id` = '1367050250249830400', `path` = 'hotKeyWord', `sort_order` = 0.00, `title` = '搜索热词', `front_component` = 'null' WHERE `id` = 1367050829697122304;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for li_menu
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `li_menu`;
|
||||
CREATE TABLE `li_menu` (
|
||||
`id` bigint NOT NULL COMMENT 'ID',
|
||||
`create_by` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建者',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`delete_flag` bit(1) DEFAULT NULL COMMENT '删除标志 true/false 删除/未删除',
|
||||
`update_by` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '更新者',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '说明备注',
|
||||
`front_route` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '前端路由',
|
||||
`icon` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '图标',
|
||||
`level` int DEFAULT NULL COMMENT '层级',
|
||||
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '菜单/权限名称',
|
||||
`parent_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '父id',
|
||||
`path` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '赋权API地址,正则表达式',
|
||||
`sort_order` decimal(10,2) DEFAULT NULL COMMENT '排序值',
|
||||
`title` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '菜单标题',
|
||||
`front_component` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '文件地址',
|
||||
`permission` varchar(255) DEFAULT NULL COMMENT '权限url',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of li_menu
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `li_menu` VALUES (1348810750596767744, 'admin', '2021-01-12 09:55:17', b'0', 'admin', '2021-01-15 09:42:50', 'null', '1', 'ios-american-football', 0, 'settings', '0', '1', 2.00, '设置', 'null', NULL);
|
||||
INSERT INTO `li_menu` VALUES (1348810864748945408, 'admin', '2021-01-12 09:55:45', b'0', 'admin', '2021-03-15 20:57:12', 'null', 'null', 'ios-american-football', 0, 'log', '0', 'null', 3.00, '日志', 'null', NULL);
|
||||
INSERT INTO `li_menu` VALUES (1349237129847005184, 'admin', '2021-01-13 14:09:34', b'0', 'admin', '2021-01-15 09:43:16', 'null', 'Main', 'ios-american-football', 1, 'sys', '1348810750596767744', '/sys', 1.00, '系统设置', 'null', NULL);
|
||||
INSERT INTO `li_menu` VALUES (1349237207378714624, 'admin', '2021-01-13 14:09:53', b'0', 'admin', '2021-07-27 16:07:49', 'null', 'Main', 'ios-american-football', 1, 'member', '1348810750596767744', '/member', 0.00, '用户管理', 'null', '/manager/user*,/manager/department*,/manager/role*,/manager/menu*');
|
||||
INSERT INTO `li_menu` VALUES (1349237928434098176, 'admin', '2021-01-13 14:13:03', b'0', 'admin', '2021-07-27 16:09:11', 'null', 'Main', 'ios-american-football', 1, 'log', '1348810864748945408', '/log', 1.00, '系统监控', 'null', '/manager/log*');
|
||||
INSERT INTO `li_menu` VALUES (1349246048900243456, 'admin', '2021-01-13 14:45:00', b'0', 'admin', '2021-07-27 16:07:57', 'null', 'sys/setting-manage/settingManage', 'ios-american-football', 2, 'setting', '1349237129847005184', 'setting', 1.00, '系统设置', 'null', '/manager/system/setting/get*,/manager/system/setting/put*');
|
||||
INSERT INTO `li_menu` VALUES (1349246347597602816, 'admin', '2021-01-13 14:46:12', b'0', 'admin', '2021-07-27 16:08:03', 'null', 'sys/oss-manage/ossManage', 'ios-american-football', 2, 'oss-manage', '1349237129847005184', 'oss-manage', 3.00, 'OSS资源', '', '/manager/file*');
|
||||
INSERT INTO `li_menu` VALUES (1349246468775239680, 'admin', '2021-01-13 14:46:41', b'0', 'admin', '2021-07-27 16:08:14', 'null', 'region/index', 'ios-american-football', 2, 'region', '1349237129847005184', 'region', 4.00, '行政地区', 'null', '/manager/region*');
|
||||
INSERT INTO `li_menu` VALUES (1349246671158796288, 'admin', '2021-01-13 14:47:29', b'0', 'admin', '2021-07-27 16:08:09', 'null', 'logistics/index', 'ios-american-football', 2, 'logistics', '1349237129847005184', 'logistics', 5.00, '物流公司', 'null', '/manager/logistics*');
|
||||
INSERT INTO `li_menu` VALUES (1349246896661356544, 'admin', '2021-01-13 14:48:23', b'0', 'admin', '2021-07-27 16:08:23', 'null', 'sys/setting-manage/settingManage', 'ios-american-football', 2, 'authLogin', '1349237129847005184', 'authLogin', 6.00, '信任登录', 'null', '/manager/system/setting/get*,/manager/system/setting/put*');
|
||||
INSERT INTO `li_menu` VALUES (1349247081504333824, 'admin', '2021-01-13 14:49:07', b'0', 'admin', '2021-07-27 16:08:45', 'null', 'sys/setting-manage/settingManage', 'ios-american-football', 2, 'pay', '1349237129847005184', 'pay', 7.00, '支付设置', 'null', '/manager/system/setting/get*,/manager/system/setting/put*,/manager/system/setting*');
|
||||
INSERT INTO `li_menu` VALUES (1349247640584085504, 'admin', '2021-01-13 14:51:20', b'0', 'admin', '2021-07-27 16:08:56', 'null', 'sensitiveWords/index', 'ios-american-football', 2, 'sensitiveWords', '1349237129847005184', 'sensitiveWords', 8.00, '敏感词', 'null', '/manager/sensitiveWords*');
|
||||
INSERT INTO `li_menu` VALUES (1349254815809298432, 'admin', '2021-01-13 15:19:51', b'0', 'admin', '2021-01-15 11:15:40', 'null', 'sys/user-manage/userManage', 'ios-american-football', 2, 'user-manage', '1349237207378714624', 'user-manage', 1.00, '用户管理', 'null', NULL);
|
||||
INSERT INTO `li_menu` VALUES (1349255214977015808, 'admin', '2021-01-13 15:21:26', b'0', 'admin', '2021-01-15 11:16:21', 'null', 'sys/department-manage/departmentManage', 'ios-american-football', 2, 'department-manage', '1349237207378714624', 'department-manage', 3.00, '部门管理', 'null', NULL);
|
||||
INSERT INTO `li_menu` VALUES (1349255404425338880, 'admin', '2021-01-13 15:22:11', b'0', 'admin', '2021-02-24 09:22:21', 'null', 'sys/role-manage/roleManage', 'ios-american-football', 2, 'role-manage', '1349237207378714624', 'role-manage', 4.00, '角色权限', 'null', NULL);
|
||||
INSERT INTO `li_menu` VALUES (1349256082979840000, 'admin', '2021-01-13 15:24:53', b'0', 'admin', '2021-01-15 11:18:14', 'null', 'sys/log-manage/logManage', 'ios-american-football', 2, 'log-manage', '1349237928434098176', 'log-manage', 2.00, '日志管理', 'null', NULL);
|
||||
INSERT INTO `li_menu` VALUES (1357584224760102912, 'admin', '2021-02-05 06:57:57', b'0', 'admin', '2021-07-27 16:09:02', 'null', 'sys/app-version/appVersion', 'ios-american-football', 2, 'appVersion', '1349237129847005184', 'appVersion', 9.00, 'APP版本', 'null', '/manager/systems/app*');
|
||||
INSERT INTO `li_menu` VALUES (1357873097859923969, 'admin', '2021-02-24 09:53:02', b'0', 'admin', '2021-02-24 09:53:12', NULL, 'sys/menu-manage/menuManage', 'ios-american-football', 2, 'menuManage', '1349237207378714624', 'menu-manage', 2.00, '菜单管理', NULL, NULL);
|
||||
INSERT INTO `li_menu` VALUES (1367038467288072192, 'admin', '2021-03-03 09:05:44', b'0', 'admin', '2021-03-03 09:09:27', 'null', 'null', 'ios-person-add', 0, 'member', '0', 'null', 0.00, '会员', 'null', NULL);
|
||||
INSERT INTO `li_menu` VALUES (1367039534616805376, 'admin', '2021-03-03 09:09:58', b'0', 'admin', '2021-05-18 10:51:12', 'null', 'null', 'md-reorder', 0, 'order', '0', 'null', 0.00, '订单', 'null', NULL);
|
||||
INSERT INTO `li_menu` VALUES (1367039950368800768, 'admin', '2021-03-03 09:11:37', b'0', NULL, NULL, NULL, NULL, 'ios-share', 0, 'goods', '0', NULL, 0.20, '商品', NULL, NULL);
|
||||
INSERT INTO `li_menu` VALUES (1367040067201138688, 'admin', '2021-03-03 09:12:05', b'0', NULL, NULL, NULL, NULL, 'ios-hammer', 0, 'promotion', '0', NULL, 0.30, '促销', NULL, NULL);
|
||||
INSERT INTO `li_menu` VALUES (1367040599596728320, 'admin', '2021-03-03 09:14:12', b'0', 'admin', '2021-03-03 09:52:13', 'null', 'null', 'ios-color-palette', 0, 'operate', '0', 'null', 0.50, '运营', 'null', NULL);
|
||||
INSERT INTO `li_menu` VALUES (1367040819248234496, 'admin', '2021-03-03 09:15:04', b'0', NULL, NULL, NULL, NULL, 'ios-stats', 0, 'statistics', '0', NULL, 0.70, '统计', NULL, NULL);
|
||||
INSERT INTO `li_menu` VALUES (1367041332861730816, 'admin', '2021-03-03 09:17:07', b'0', NULL, NULL, NULL, 'Main', 'ios-aperture', 1, '/', '1367038467288072192', '/', 0.00, '会员管理', NULL, NULL);
|
||||
INSERT INTO `li_menu` VALUES (1367041461194850304, 'admin', '2021-03-03 09:17:37', b'0', 'admin', '2021-07-27 16:02:17', NULL, 'member/list/index', 'ios-aperture', 2, 'memberList', '1367041332861730816', 'memberList', 0.00, '会员列表', NULL, '/manager/member*,/manager/orders*,/manager/wallet/log*,/manager/receipt*');
|
||||
INSERT INTO `li_menu` VALUES (1367041575619657728, 'admin', '2021-03-03 09:18:05', b'0', 'admin', '2021-07-27 15:59:50', NULL, 'member/list/memberRecycle', 'ios-aperture', 2, 'memberRecycle', '1367041332861730816', 'memberRecycle', 1.00, '回收站', NULL, '/manager/member*');
|
||||
INSERT INTO `li_menu` VALUES (1367042490443497472, 'admin', '2021-03-03 09:21:43', b'0', NULL, NULL, NULL, 'Main', 'ios-aperture', 1, '/', '1367038467288072192', '/', 1.00, '预存款', NULL, NULL);
|
||||
INSERT INTO `li_menu` VALUES (1367042664410644480, 'admin', '2021-03-03 09:22:24', b'0', 'admin', '2021-07-27 16:02:44', 'null', 'member/advance/walletLog', 'ios-aperture', 2, 'walletLog', '1367042490443497472', 'walletLog', 0.00, '会员资金', 'null', '/manager/wallet/log*');
|
||||
INSERT INTO `li_menu` VALUES (1367042804944994304, 'admin', '2021-03-03 09:22:58', b'0', 'admin', '2021-07-27 16:02:48', NULL, 'member/advance/recharge', 'ios-alert', 2, 'recharge', '1367042490443497472', 'recharge', 1.00, '充值记录', NULL, '/manager/recharge*');
|
||||
INSERT INTO `li_menu` VALUES (1367042804944994305, 'admin', '2021-03-03 09:22:58', b'0', 'admin', '2021-07-27 16:02:52', NULL, 'member/advance/withdrawApply', 'ios-alert', 2, 'withdrawApply', '1367042490443497472', 'withdrawApply', 1.00, '提现申请', NULL, '/manager/members/withdraw-apply*');
|
||||
INSERT INTO `li_menu` VALUES (1367042917113266176, 'admin', '2021-03-03 09:23:25', b'0', NULL, NULL, NULL, 'Main', 'ios-aperture', 1, 'commont', '1367038467288072192', '/', 0.00, '评价', NULL, NULL);
|
||||
INSERT INTO `li_menu` VALUES (1367043020976816128, 'admin', '2021-03-03 09:23:49', b'0', 'admin', '2021-07-27 16:02:35', NULL, 'goods/goods-review/index', 'md-aperture', 2, 'goodsReview', '1367042917113266176', 'goodsReview', 0.00, '会员评价', NULL, '/manager/memberEvaluation*');
|
||||
INSERT INTO `li_menu` VALUES (1367043443917848576, 'admin', '2021-03-03 09:25:30', b'0', 'admin', '2021-07-27 16:03:00', NULL, 'Main', 'md-aperture', 1, 'order', '1367039534616805376', '/', 0.00, '订单', NULL, '/manager/orders*');
|
||||
INSERT INTO `li_menu` VALUES (1367043505771249664, 'admin', '2021-03-03 09:25:45', b'0', NULL, NULL, NULL, 'Main', 'md-aperture', 1, 'aftersale', '1367039534616805376', '/', 0.00, '售后', NULL, NULL);
|
||||
INSERT INTO `li_menu` VALUES (1367043642379730944, 'admin', '2021-03-03 09:26:17', b'0', NULL, NULL, NULL, 'order/order/orderList', 'ios-aperture', 2, 'orderList', '1367043443917848576', 'orderList', 0.00, '商品订单', NULL, NULL);
|
||||
INSERT INTO `li_menu` VALUES (1367043791105556480, 'admin', '2021-03-03 09:26:53', b'0', NULL, NULL, NULL, 'order/order/fictitiousOrderList', 'ios-aperture', 2, 'fictitiousOrderList', '1367043443917848576', 'fictitiousOrderList', 1.00, '虚拟订单', NULL, NULL);
|
||||
INSERT INTO `li_menu` VALUES (1367043980407078912, 'admin', '2021-03-03 09:27:38', b'0', 'admin', '2021-07-27 16:03:43', NULL, 'order/after-order/afterSaleOrder', 'md-alert', 2, 'afterSaleOrder', '1367043505771249664', 'afterSaleOrder', 0.00, '售后管理', NULL, '/manager/afterSale*');
|
||||
INSERT INTO `li_menu` VALUES (1367044121163726848, 'admin', '2021-03-03 09:28:12', b'0', 'admin', '2021-07-27 16:03:48', NULL, 'order/after-order/orderComplaint', 'md-alert', 2, 'orderComplaint', '1367043505771249664', 'orderComplaint', 2.00, '交易投诉', NULL, '/manager/complain*');
|
||||
INSERT INTO `li_menu` VALUES (1367044247978508288, 'admin', '2021-03-03 09:28:42', b'0', 'admin', '2021-07-27 16:03:52', NULL, 'order/after-order/afterSale', 'md-aperture', 2, 'afterSaleReason', '1367043505771249664', 'afterSaleReason', 3.00, '售后原因', NULL, '/manager/afterSaleReason*');
|
||||
INSERT INTO `li_menu` VALUES (1367044376391319552, 'admin', '2021-03-03 09:29:12', b'0', 'admin', '2021-07-27 16:04:08', NULL, 'Main', 'md-aperture', 1, 'goodsManager', '1367039950368800768', '/', 0.00, '商品管理', NULL, '/manager/goods*');
|
||||
INSERT INTO `li_menu` VALUES (1367044657296441344, 'admin', '2021-03-03 09:30:19', b'0', NULL, NULL, NULL, 'Main', 'ios-aperture', 1, 'association', '1367039950368800768', '/', 1.00, '关联管理', NULL, NULL);
|
||||
INSERT INTO `li_menu` VALUES (1367045529720061952, 'admin', '2021-03-03 09:33:47', b'0', 'admin', '2021-07-27 15:38:46', NULL, 'goods/goods-info/goods', 'md-aperture', 2, 'managerGoods', '1367044376391319552', 'managerGoods', 0.00, '平台商品', NULL, 'null');
|
||||
INSERT INTO `li_menu` VALUES (1367045630710513664, 'admin', '2021-03-03 09:34:11', b'0', 'admin', '2021-07-27 15:38:56', NULL, 'goods/goods-info/goodsApply', 'ios-alert', 2, 'applyGoods', '1367044376391319552', 'applyGoods', 1.00, '商品审核', NULL, 'null');
|
||||
INSERT INTO `li_menu` VALUES (1367045794284175360, 'admin', '2021-03-03 09:34:50', b'0', 'admin', '2021-07-27 16:04:18', NULL, 'goods/goods-manage/category', 'md-alert', 2, 'goodsCategory', '1367044657296441344', 'goodsCategory', 0.00, '商品分类', NULL, '/manager/goods/category*,/manager/goods/brand*,/manager/goods/spec*,/manager/goods/parameters*');
|
||||
INSERT INTO `li_menu` VALUES (1367045921434501120, 'admin', '2021-03-03 09:35:21', b'0', 'admin', '2021-07-27 16:04:23', NULL, 'goods/goods-manage/brand', 'md-alert', 2, 'goodsBrand', '1367044657296441344', 'goodsBrand', 1.00, '品牌列表', NULL, '/manager/goods/brand*');
|
||||
INSERT INTO `li_menu` VALUES (1367046068369358848, 'admin', '2021-03-03 09:35:56', b'0', 'admin', '2021-07-27 16:04:27', NULL, 'goods/goods-manage/spec', 'md-aperture', 2, 'goodsSpec', '1367044657296441344', 'goodsSpec', 2.00, '规格列表', NULL, '/manager/goods/spec*');
|
||||
INSERT INTO `li_menu` VALUES (1367046266214678528, 'admin', '2021-03-03 09:36:43', b'0', 'admin', '2021-07-27 16:04:32', NULL, 'goods-unit/index', 'md-alert', 2, 'goodsUnit', '1367044657296441344', 'goodsUnit', 4.00, '计量单位', NULL, '/manager/goods/goodsUnit*');
|
||||
INSERT INTO `li_menu` VALUES (1367048084701315072, 'admin', '2021-03-03 09:43:57', b'0', 'admin', '2021-03-03 09:52:17', 'null', 'null', 'ios-pricetags', 0, 'shop', '0', 'null', 0.40, '店铺', 'null', NULL);
|
||||
INSERT INTO `li_menu` VALUES (1367048684339986432, 'admin', '2021-03-03 09:46:20', b'0', NULL, NULL, NULL, 'Main', 'md-aperture', 1, 'shopManager', '1367048084701315072', '/', 0.00, '店铺管理', NULL, NULL);
|
||||
INSERT INTO `li_menu` VALUES (1367048754229673984, 'admin', '2021-03-03 09:46:36', b'0', NULL, NULL, NULL, 'Main', 'md-aperture', 1, 'bill', '1367048084701315072', '/', 0.00, ' 店铺结算', NULL, NULL);
|
||||
INSERT INTO `li_menu` VALUES (1367048832210173952, 'admin', '2021-03-03 09:46:55', b'0', 'admin', '2021-07-27 16:05:30', NULL, 'seller/shop/shopList', 'md-aperture', 2, 'shopList', '1367048684339986432', 'shopList', 0.00, '店铺列表', NULL, '/manager/store*');
|
||||
INSERT INTO `li_menu` VALUES (1367048967635861504, 'admin', '2021-03-03 09:47:27', b'0', 'admin', '2021-07-27 16:05:32', NULL, 'seller/shop/shopAuditList', 'md-alert', 2, 'shopAuth', '1367048684339986432', 'shopAuth', 1.00, '店铺审核', NULL, '/manager/store*');
|
||||
INSERT INTO `li_menu` VALUES (1367049068122996736, 'admin', '2021-03-03 09:47:51', b'0', 'admin', '2021-07-27 16:05:36', NULL, 'seller/bill/bill', 'md-alert', 2, 'billList', '1367048754229673984', 'billList', 0.00, '店铺结算', NULL, '/manager/store/bill*');
|
||||
INSERT INTO `li_menu` VALUES (1367049214198022144, 'admin', '2021-03-03 09:48:26', b'0', NULL, NULL, NULL, 'Main', 'md-aperture', 1, 'promotionManager', '1367040067201138688', '/', 0.00, '促销管理', NULL, NULL);
|
||||
INSERT INTO `li_menu` VALUES (1367049384792948736, 'admin', '2021-03-03 09:49:07', b'0', 'admin', '2021-07-27 16:04:42', NULL, 'promotion/coupon/coupon', 'md-alert', 2, 'coupon', '1367049214198022144', 'coupon', 0.00, '优惠券', NULL, '/manager/promotion/coupon*');
|
||||
INSERT INTO `li_menu` VALUES (1367049500782231552, 'admin', '2021-03-03 09:49:34', b'0', 'admin', '2021-07-27 16:04:53', 'null', 'promotion/fullCut/full-cut', 'md-alert', 2, 'fullCut', '1367049214198022144', 'fullCut', 1.00, '满额活动', 'null', '/manager/promotion/fullDiscount*');
|
||||
INSERT INTO `li_menu` VALUES (1367049611578966016, 'admin', '2021-03-03 09:50:01', b'0', 'admin', '2021-07-27 16:04:58', 'null', 'promotion/seckill/seckill', 'md-alert', 2, 'seckill', '1367049214198022144', 'seckill', 2.00, '秒杀活动', 'null', '/manager/promotion/seckill*');
|
||||
INSERT INTO `li_menu` VALUES (1367049712657498112, 'admin', '2021-03-03 09:50:25', b'0', 'admin', '2021-07-27 16:05:02', 'null', 'promotion/pintuan/pintuan', 'md-alert', 2, 'pintuan', '1367049214198022144', 'pintuan', 3.00, '拼团活动', 'null', '/manager/promotion/pintuan*');
|
||||
INSERT INTO `li_menu` VALUES (1367050250249830400, 'admin', '2021-03-03 09:52:33', b'0', 'admin', '2021-03-22 20:38:14', 'null', 'Main', 'md-aperture', 1, 'document', '1367040599596728320', '/', 2.00, '文章管理', 'null', NULL);
|
||||
INSERT INTO `li_menu` VALUES (1367050320584114176, 'admin', '2021-03-03 09:52:50', b'0', 'admin', '2021-07-27 16:05:49', NULL, 'Main', 'md-aperture', 1, 'floor', '1367040599596728320', '/', 0.00, '楼层装修', NULL, '/manager/pageData*,/manager/file*,/manager/article-category*,/manager/article*,/manager/promotion*,/manager/goods*,/manager/store*');
|
||||
INSERT INTO `li_menu` VALUES (1367050530030878720, 'admin', '2021-03-03 09:53:40', b'0', 'admin', '2021-03-04 01:05:57', 'null', 'lili-floor-renovation/floorList', 'md-alert', 2, 'pcFloor', '1367050320584114176', 'pcFloor', 0.00, 'PC端', 'null', NULL);
|
||||
INSERT INTO `li_menu` VALUES (1367050673312497664, 'admin', '2021-03-03 09:54:14', b'0', 'admin', '2021-03-04 01:06:04', 'null', 'lili-floor-renovation/wap/wapList', 'md-aperture', 2, 'wapList', '1367050320584114176', 'wapList', 1.00, '移动端', 'null', NULL);
|
||||
INSERT INTO `li_menu` VALUES (1367050829697122304, 'admin', '2021-03-03 09:54:51', b'0', 'admin', '2021-07-27 16:06:32', 'null', 'page/article-manage/hotWords', 'md-aperture', 2, 'hotKeyWord', '1367050250249830400', 'hotKeyWord', 0.00, '搜索热词', 'null', '/manager/hotwords*');
|
||||
INSERT INTO `li_menu` VALUES (1367050939084570624, 'admin', '2021-03-03 09:55:17', b'0', 'admin', '2021-07-27 16:06:38', NULL, 'page/article-manage/ArticleCategory', 'md-aperture', 2, 'article-category', '1367050250249830400', 'article-category', 1.00, '文章分类', NULL, '/manager/article-category*');
|
||||
INSERT INTO `li_menu` VALUES (1367051048232943616, 'admin', '2021-03-03 09:55:43', b'0', 'admin', '2021-07-27 16:06:42', NULL, 'page/article-manage/articleList', 'md-alert', 2, 'articleList', '1367050250249830400', 'articleList', 3.00, '文章管理', NULL, '/manager/article-category*,/manager/article*');
|
||||
INSERT INTO `li_menu` VALUES (1367052616634204160, 'admin', '2021-03-03 10:01:57', b'0', 'admin', '2021-07-27 16:07:38', NULL, 'Main', 'md-aperture', 1, 'statistics', '1367040819248234496', '/', 0.00, '统计', NULL, '/manager/store*,/manager/member*');
|
||||
INSERT INTO `li_menu` VALUES (1367052705725415424, 'admin', '2021-03-03 10:02:18', b'0', 'admin', '2021-03-11 22:11:05', 'null', 'statistics/member', 'md-alert', 2, 'memberStatistics', '1367052616634204160', 'memberStatistics', 0.00, '会员统计', 'null', NULL);
|
||||
INSERT INTO `li_menu` VALUES (1367052805503713280, 'admin', '2021-03-03 10:02:42', b'0', 'admin', '2021-03-11 22:11:14', 'null', 'statistics/order', 'md-alert', 2, 'orderStatistics', '1367052616634204160', 'orderStatistics', 1.00, '订单统计', 'null', NULL);
|
||||
INSERT INTO `li_menu` VALUES (1367052915314786304, 'admin', '2021-03-03 10:03:08', b'0', 'admin', '2021-03-11 22:11:23', 'null', 'statistics/goods', 'md-alert', 2, 'goodsStatistics', '1367052616634204160', 'goodsStatistics', 2.00, '商品统计', 'null', NULL);
|
||||
INSERT INTO `li_menu` VALUES (1367053087121866752, 'admin', '2021-03-03 10:03:49', b'0', 'admin', '2021-03-11 22:11:34', 'null', 'statistics/traffic', 'md-alert', 2, 'trafficStatistics', '1367052616634204160', 'trafficStatistics', 4.00, '流量统计', 'null', NULL);
|
||||
INSERT INTO `li_menu` VALUES (1372807928452481024, 'admin', '2021-03-19 02:11:30', b'0', NULL, NULL, NULL, 'Main', 'ios-aperture', 1, 'flow', '1367039534616805376', '/', 3.00, '流水', NULL, NULL);
|
||||
INSERT INTO `li_menu` VALUES (1372808148565360640, 'admin', '2021-03-19 02:12:23', b'0', 'admin', '2021-07-27 16:03:57', NULL, 'order/flow/paymentLog', 'md-alert', 2, 'paymentLog', '1372807928452481024', 'paymentLog', 1.00, '收款记录', NULL, '/manager/paymentLog*');
|
||||
INSERT INTO `li_menu` VALUES (1372808352295288832, 'admin', '2021-03-19 02:13:11', b'0', 'admin', '2021-07-27 16:04:01', NULL, 'order/flow/refundLog', 'ios-aperture', 2, 'refundLog', '1372807928452481024', 'refundLog', 2.00, '退款流水', NULL, '/manager/refundLog*');
|
||||
INSERT INTO `li_menu` VALUES (1373166892465782784, 'admin', '2021-03-20 01:57:54', b'0', 'admin', '2021-03-22 20:13:48', 'null', 'Main', 'ios-aperture', 1, '/', '1367038467288072192', '/', 0.00, '积分', 'null', NULL);
|
||||
INSERT INTO `li_menu` VALUES (1373167227385151488, 'admin', '2021-03-20 01:59:14', b'0', 'admin', '2021-07-27 16:02:40', 'null', 'member/point/point', 'ios-aperture', 2, 'point', '1373166892465782784', 'point', 0.00, '积分历史', 'null', '/manager/member/memberPointsHistory*');
|
||||
INSERT INTO `li_menu` VALUES (1373791578371391488, 'admin', '2021-03-21 19:20:11', b'0', 'admin', '2021-07-27 16:05:38', NULL, 'seller/bill/accountStatementBill', 'md-alert', 2, 'accountStatementBill', '1367048754229673984', 'accountStatementBill', 0.00, '商家对账', NULL, '/manager/store/bill*');
|
||||
INSERT INTO `li_menu` VALUES (1374154349697040384, 'admin', '2021-03-22 19:21:42', b'0', 'admin', '2021-07-27 16:06:55', 'null', 'Main', 'md-aperture', 1, 'feedback', '1367040599596728320', '/', 3.00, '意见反馈', 'null', '/manager/feedback*');
|
||||
INSERT INTO `li_menu` VALUES (1374155741123837952, 'admin', '2021-03-22 19:27:14', b'0', 'admin', '2021-07-27 15:41:40', 'null', 'page/feedback/feedback', 'md-aperture', 2, 'feedback', '1374154349697040384', 'feedback', 0.00, '意见反馈', 'null', 'null');
|
||||
INSERT INTO `li_menu` VALUES (1374173575405109248, 'admin', '2021-03-22 20:38:06', b'0', 'admin', '2021-03-22 20:52:58', 'null', 'Main', 'ios-analytics', 1, 'distributionManager', '1367040599596728320', '/', 1.00, '分销管理', 'null', NULL);
|
||||
INSERT INTO `li_menu` VALUES (1374177618072436736, 'admin', '2021-03-22 20:54:10', b'0', 'admin', '2021-07-27 16:05:58', 'null', 'distribution/distributionSetting', 'ios-basketball', 2, 'distributionSetting', '1374173575405109248', 'distributionSetting', 0.00, '分销设置', 'null', '/manager/system/setting/put/DISTRIBUTION_SETTING*,/manager/system/setting/get/DISTRIBUTION_SETTING*');
|
||||
INSERT INTO `li_menu` VALUES (1374177789581721600, 'admin', '2021-03-22 20:54:51', b'0', 'admin', '2021-07-27 16:06:15', 'null', 'distribution/distributionGoods', 'ios-chatbubbles', 2, 'distributionGoods', '1374173575405109248', 'distributionGoods', 3.00, '分销商品', 'null', '/manager/distribution/goods*');
|
||||
INSERT INTO `li_menu` VALUES (1374177910411231232, 'admin', '2021-03-22 20:55:19', b'0', 'admin', '2021-07-27 16:06:20', 'null', 'distribution/distributionOrder', 'ios-cloudy', 2, 'distributionOrder', '1374173575405109248', 'distributionOrder', 4.00, '分销订单', 'null', '/manager/distribution/order*,/manager/store*');
|
||||
INSERT INTO `li_menu` VALUES (1374178079181635584, 'admin', '2021-03-22 20:56:00', b'0', 'admin', '2021-07-27 16:06:05', 'null', 'distribution/distributionApply', 'md-egg', 2, 'distributionApply', '1374173575405109248', 'distributionApply', 1.00, '分销申请', 'null', '/manager/distribution*');
|
||||
INSERT INTO `li_menu` VALUES (1374178303975358464, 'admin', '2021-03-22 20:56:53', b'0', 'admin', '2021-07-27 16:06:08', 'null', 'distribution/distribution', 'md-person', 2, 'distribution', '1374173575405109248', 'distribution', 2.00, '分销员', 'null', '/manager/distribution*');
|
||||
INSERT INTO `li_menu` VALUES (1374916594269945856, 'admin', '2021-03-24 21:50:35', b'0', 'admin', '2021-07-27 16:08:51', NULL, 'sys/slider/slider', 'ios-aperture', 2, 'slider', '1349237129847005184', 'slider', 7.00, '验证码', NULL, '/manager/verificationSource*');
|
||||
INSERT INTO `li_menu` VALUES (1376450531517530112, 'admin', '2021-03-29 03:25:55', b'0', NULL, NULL, NULL, 'Main', 'md-basketball', 1, 'notice', '1367040599596728320', '/', 5.00, '站内信', NULL, NULL);
|
||||
INSERT INTO `li_menu` VALUES (1376450662098796544, 'admin', '2021-03-29 03:26:26', b'0', 'admin', '2021-07-27 16:07:23', NULL, 'sys/message/noticeMessageTemplate', 'ios-american-football', 2, 'noticeMessageTemplate', '1376450531517530112', 'noticeMessageTemplate', 1.00, '站内信', NULL, '/manager/noticeMessage*,/manager/message*,/manager/store*,/manager/member*');
|
||||
INSERT INTO `li_menu` VALUES (1376450766817984512, 'admin', '2021-03-29 03:26:51', b'0', 'admin', '2021-03-29 03:27:25', 'null', 'Main', 'md-checkmark', 1, 'sms', '1367040599596728320', '/', 6.00, '短信管理', 'null', NULL);
|
||||
INSERT INTO `li_menu` VALUES (1376450876423536640, 'admin', '2021-03-29 03:27:17', b'0', 'admin', '2021-07-27 16:07:29', NULL, 'sys/message/sms', 'ios-timer', 2, 'sms', '1376450766817984512', 'sms', 1.00, '短信', NULL, '/manager/sms*,/manager/member*');
|
||||
INSERT INTO `li_menu` VALUES (1384035281702748160, 'admin', '2021-04-19 14:45:00', b'0', 'admin', '2021-07-27 16:08:18', 'null', 'member/message-manage/weChatMessageManager', 'md-aperture', 2, 'message-manage', '1349237129847005184', 'message-manage', 5.00, '微信消息', 'null', '/manager/message/wechat*,/manager/message/wechatMPMessage*');
|
||||
INSERT INTO `li_menu` VALUES (1403988156444962818, 'admin', '2021-06-13 16:10:36', b'0', 'admin', '2021-07-27 16:04:48', 'null', 'promotion/couponActivity/coupon', '', 2, 'coupon-activity', '1367049214198022144', 'coupon-activity', 0.00, '券活动', 'null', '/manager/promotion/couponActivity*');
|
||||
INSERT INTO `li_menu` VALUES (1407601962899230721, 'admin', '2021-06-23 15:30:35', b'0', 'admin', '2021-07-27 16:05:08', NULL, 'Main', '', 1, 'liveManage', '1367040067201138688', '/', 2.00, '直播管理', NULL, '/manager/broadcast*');
|
||||
INSERT INTO `li_menu` VALUES (1407602049759072258, 'admin', '2021-06-23 15:30:55', b'0', NULL, NULL, NULL, 'promotion/live/live', '', 2, 'live', '1407601962899230721', 'live', 1.00, '直播管理', NULL, NULL);
|
||||
INSERT INTO `li_menu` VALUES (1407602441964244994, 'admin', '2021-06-23 15:32:29', b'0', NULL, NULL, NULL, 'Main', '', 1, 'pointManage', '1367040067201138688', '/', 3.00, '积分活动', NULL, NULL);
|
||||
INSERT INTO `li_menu` VALUES (1407602516912263170, 'admin', '2021-06-23 15:32:47', b'0', 'admin', '2021-07-27 16:05:14', NULL, 'promotion/pointsGoods/pointsGoods', '', 2, 'pointsGoods', '1407602441964244994', 'pointsGoods', 1.00, '积分商品', NULL, '/manager/promotion/pointsGoods*,/manager/goods*');
|
||||
INSERT INTO `li_menu` VALUES (1407602673334636546, 'admin', '2021-06-23 15:33:24', b'0', 'admin', '2021-07-27 16:05:18', NULL, 'promotion/pointsGoodsCategory/pointsGoodsCategory', '', 2, 'pointsGoodsCategory', '1407602441964244994', 'pointsGoodsCategory', 2.00, '积分分类', NULL, '/manager/promotion/pointsGoodsCategory*');
|
||||
INSERT INTO `li_menu` VALUES (1410862675914764290, 'admin', '2021-07-02 15:27:29', b'0', 'admin', '2021-07-27 16:06:26', 'null', 'distribution/distributionCash', '', 2, 'distributionCash', '1374173575405109248', 'distributionCash', 5.00, '分销提现', 'null', '/manager/distribution/cash*');
|
||||
INSERT INTO `li_menu` VALUES (1419926569920536578, 'admin', '2021-07-27 15:44:10', b'0', 'admin', '2021-07-27 16:07:10', NULL, 'customWords/index', NULL, 2, 'customWords', '1367050250249830400', 'customWords', 4.00, 'ES分词', NULL, '/manager/manager/custom-words*');
|
||||
COMMIT;
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
/** 新增会员获的总积分 **/
|
||||
ALTER TABLE li_member ADD total_point bigint ( 20 ) DEFAULT 0 COMMENT '积分总数量';
|
||||
223
README.md
223
README.md
@@ -1,34 +1,47 @@
|
||||
## Lilishop B2B2C商城系统
|
||||
## 🔥 Lilishop B2B2C商城系统
|
||||
|
||||
##### 🌹 开源不易,如有帮助请点Star
|
||||
|
||||
|
||||
|
||||
#### 欢迎交流需求,交流业务,交流技术
|
||||
|
||||
##### 交流 qq 1群 961316482(已满)
|
||||
|
||||
##### 交流 qq 2群 875294241
|
||||
|
||||
|
||||
|
||||
##### 商城 公众号/小程序体验,扫描二维码
|
||||
|
||||
##### 官方公众号 & 开源不易,如有帮助请点Star
|
||||

|
||||
|
||||
[](https://gitee.com/beijing_hongye_huicheng/lilishop/stargazers)
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
### 介绍
|
||||
### 🔥 商城介绍
|
||||
**官网**:https://pickmall.cn
|
||||
|
||||
Lilishop 是一款Java开发,基于SpringBoot研发的B2B2C多用户商城,前端使用 Vue、uniapp开发 **系统全端全部代码开源**
|
||||
Lilishop 商城系统 基于SpringBoot 研发,B2B2C多用户商城系统,前端使用 Vue、uniapp开发 **系统全端全部代码开源**
|
||||
|
||||
产品前后端分离、支持分布式部署。
|
||||
业务兼容O2O商城/B2B商城/B2B2C商城/F2B2C商城/S2B2C商城。支持小程序商城、H5商城、APP商城、 PC商城。
|
||||
|
||||
商城展示端包含 PC、H5、微信小程序、APP。
|
||||
|
||||
|
||||
商城前后端分离、支持分布式部署。
|
||||
|
||||
商城包含 会员模块、**第三方登录模块**、**第三方支付模块**、**楼层装修模块**、订单模块、分销模块、文章模块、系统设置模块、流量分析模块
|
||||
|
||||
系统包含各种中间件、搜索引擎、多级缓存、分布式事务、分布式任务调度等,支持Docker,支持k8s。是一款高性能,支持高并发等商城系统。
|
||||
商城包含各种中间件、搜索引擎、多级缓存、分布式事务、分布式任务调度等,支持Docker,支持k8s。是一款高性能,支持高并发的商城系统。
|
||||
|
||||
开箱即用,简单配置即可部署一套属于您的系统。
|
||||
|
||||
### 文档
|
||||
|
||||
**产品文档**(需求、架构、使用、部署、开发):https://docs.pickmall.cn
|
||||
**功能清单** 功能列表:https://docs.qq.com/sheet/DQ1Z2dWJKUnBRZEt5
|
||||
### ☃️ 帮助文档
|
||||
|
||||
### 项目链接(gitee)
|
||||
https://docs.pickmall.cn
|
||||
|
||||
### 💧 项目链接(gitee)
|
||||
|
||||
**Java后台**:https://gitee.com/beijing_hongye_huicheng/lilishop.git
|
||||
|
||||
@@ -38,7 +51,7 @@ Lilishop 是一款Java开发,基于SpringBoot研发的B2B2C多用户商城,
|
||||
|
||||
**docker一键部署**:https://gitee.com/beijing_hongye_huicheng/docker.git
|
||||
|
||||
### 项目链接(github)
|
||||
### 💧 项目链接(github)
|
||||
|
||||
**Java后台**:https://github.com/hongyehuicheng/lilishop.git
|
||||
|
||||
@@ -48,42 +61,27 @@ Lilishop 是一款Java开发,基于SpringBoot研发的B2B2C多用户商城,
|
||||
|
||||
**docker一键部署**:https://github.com/hongyehuicheng/docker.git
|
||||
|
||||
### 演示地址
|
||||
### 💧 演示地址(手机验证码为 ‘111111’)
|
||||
|
||||
**运营后台**:https://admin-b2b2c.pickmall.cn 账号:admin/123456
|
||||
|
||||
**店铺后台**:https://store-b2b2c.pickmall.cn 账号:13011111111/111111
|
||||
|
||||
**用户前台**:https://pc-b2b2c.pickmall.cn
|
||||
**PC**:https://pc-b2b2c.pickmall.cn
|
||||
|
||||
**移动端**:https://m-b2b2c.pickmall.cn
|
||||
**WAP**:https://m-b2b2c.pickmall.cn
|
||||
|
||||
**小程序/公众号**:扫描二维码
|
||||
|
||||

|
||||
|
||||
### 3行命令搭建本地环境
|
||||
### 🚙 3行命令搭建本地运行环境
|
||||
|
||||
温馨提示:由于服务较多,如果笔记本环境启动内存没有32g可能无法启动成功(macbookpro 2020 16g内存启动无法成功),台式机在16g内存、AMD 3700x 的ubuntu系统成功运行。
|
||||
温馨提示:由于服务中间件较多,如果笔记本环境启动内存没有32g可能无法启动成功(macbookpro 2020 16g内存启动无法成功),台式机在16g内存、AMD 3700x 的ubuntu系统成功运行。
|
||||
|
||||
|
||||
|
||||
##### docker环境安装(已安装的用户可跳过)
|
||||
```shell
|
||||
#安装依赖
|
||||
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
|
||||
#设置源
|
||||
sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
|
||||
sudo yum makecache fast
|
||||
#安装docker
|
||||
sudo yum install docker-ce
|
||||
#启动服务
|
||||
sudo systemctl start docker
|
||||
#安装docker-compose
|
||||
sudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
|
||||
#授权
|
||||
sudo chmod +x /usr/local/bin/docker-compose
|
||||
#检测版本号
|
||||
docker-compose -v
|
||||
```
|
||||
##### docker环境安装 [点击跳转](https://docs.pickmall.cn/deploy/%E4%B8%80%E9%94%AE%E9%83%A8%E7%BD%B2.html)
|
||||
|
||||
|
||||
|
||||
@@ -98,39 +96,39 @@ docker-compose -v
|
||||
|
||||
|
||||
|
||||
PS:单独部署的话,数据库文件访问这里:https://gitee.com/beijing_hongye_huicheng/docker/tree/master/init/mysql
|
||||
PS:单独部署的话,点击跳转 https://gitee.com/beijing_hongye_huicheng/docker/tree/master/init/mysql 这里有与tag版本一致的sql,根据tag获取sql,如果使用master代码,则需要在lilishop项目根目录的update-sql目录中,获取对应的升级sql。
|
||||
|
||||
##### 各个地址
|
||||
##### 商城 API/UI 地址
|
||||
|
||||
| API | 地址 |
|
||||
| -------------- | --------------- |
|
||||
| 买家API | http://127.0.0.1:8888 |
|
||||
| 商家API | http://127.0.0.1:8889 |
|
||||
| 管理端API | http://127.0.0.1:8887 |
|
||||
| 通用API | http://127.0.0.1:8890 |
|
||||
| 商城买家API | http://127.0.0.1:8888 |
|
||||
| 商城商家API | http://127.0.0.1:8889 |
|
||||
| 商城管理端API | http://127.0.0.1:8887 |
|
||||
| 商城基础API | http://127.0.0.1:8890 |
|
||||
|
||||
| 前端演示 | 地址 |
|
||||
| -------------- | --------------- |
|
||||
| PC | http://127.0.0.1:10000 |
|
||||
| WAP | http://127.0.0.1:10001 |
|
||||
| 商家 | http://127.0.0.1:10002 |
|
||||
| 管理端 | http://127.0.0.1:10003 |
|
||||
| 商城PC端 | http://127.0.0.1:10000 |
|
||||
| 商城WAP端 | http://127.0.0.1:10001 |
|
||||
| 商城卖家端 | http://127.0.0.1:10002 |
|
||||
| 商城管理端 | http://127.0.0.1:10003 |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### 功能列表
|
||||
### ⚾️ 功能列表
|
||||
|
||||
|
||||
|
||||
#### 平台功能
|
||||
#### 🥎 商城平台功能
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
#### 商家端功能
|
||||
#### 🥎 商城卖家功能
|
||||
|
||||

|
||||
|
||||
@@ -138,28 +136,28 @@ PS:单独部署的话,数据库文件访问这里:https://gitee.com/beijing_
|
||||
|
||||
|
||||
|
||||
### 功能展示
|
||||
### 🧩 商城前端功能展示
|
||||
|
||||
|
||||
|
||||
#### 移动端
|
||||
#### ⚽️ 商城移动端
|
||||
|
||||
<img src="https://pickmall.cn/assets/imgs/other/app.gif" alt="移动端功能展示" style="zoom:50%;" />
|
||||
|
||||
|
||||
|
||||
#### 管理端
|
||||
#### ⚽️ 商城管理端
|
||||
|
||||

|
||||
|
||||
|
||||
### 技术选型
|
||||
### 商城技术选型
|
||||
|
||||
#### 架构图
|
||||
#### 🥅 架构图
|
||||
|
||||

|
||||
|
||||
##### Java后台
|
||||
##### 🕹 后台技术选型
|
||||
|
||||
| 说明 | 框架 | 说明 | |
|
||||
| -------------- | --------------- | -------------- | ------------- |
|
||||
@@ -173,7 +171,7 @@ PS:单独部署的话,数据库文件访问这里:https://gitee.com/beijing_
|
||||
| 短信 | 阿里云短信 | 认证 | JWT |
|
||||
| 日志处理 | Log4j | 接口规范 | RESTful |
|
||||
|
||||
##### 前端-运营后台、店铺后台
|
||||
##### 🖥 前端-运营后台、店铺后台
|
||||
|
||||
| 说明 | 框架 | 说明 | 框架 |
|
||||
| ---------- | ---------- | ---------- | ------- |
|
||||
@@ -183,115 +181,23 @@ PS:单独部署的话,数据库文件访问这里:https://gitee.com/beijing_
|
||||
| 基础UI库 | iView | UI界面基于 | iView |
|
||||
| 网络请求 | axios | | |
|
||||
|
||||
##### 前端-移动端
|
||||
##### 📱前端-移动端
|
||||
|
||||
| 说明 | 架构 | 说明 | 架构 |
|
||||
| --------- | ------- | -------- | ------- |
|
||||
| 基础UI库 | uViewui | 基础框架 | uni-app |
|
||||
| CSS预处理 | scss | 地图引擎 | amap |
|
||||
|
||||
### 升级计划
|
||||
|
||||
#### 计划每个月发布一个版本,具体时间可能有出入
|
||||
|
||||
时间:2021年7月15日
|
||||
### 🌟 版本升级
|
||||
|
||||
```
|
||||
新增功能:
|
||||
1.积分商城
|
||||
2.店铺移动端
|
||||
3.店铺支持发货单
|
||||
4.供求单
|
||||
5.店铺自提点
|
||||
6.移动端展示附近店铺
|
||||
7.开屏广告
|
||||
8.会员站内消息
|
||||
9.移动端店铺入驻
|
||||
功能优化:
|
||||
1.用户分享商城、关注店铺、邀请新用户可获取积分、经验值。
|
||||
2.隐私管理功能
|
||||
2.移动端店铺首页优化
|
||||
商城后续会持续版本升级,修复bug,完善功能,覆盖更多业务场景 o2o/b2b/s2b2b2c/跨境电商
|
||||
|
||||
后续会考虑推出微服务商城系统/中台商城等
|
||||
```
|
||||
|
||||
时间:2021年8月16日
|
||||
|
||||
```
|
||||
新增功能:
|
||||
1.微淘功能
|
||||
2.相册管理功能
|
||||
3.店铺申请品牌
|
||||
4.第三方商品导入(淘宝、99api)
|
||||
5.用户等级
|
||||
6.用户升级会员
|
||||
7.会员权益
|
||||
8.促销活动:第二件*折
|
||||
9.促销活动:商品打包价
|
||||
10.促销活动:商品组合购
|
||||
11.促销活动:进店赠券
|
||||
12.代客退单
|
||||
功能优化:
|
||||
1.批量上传商品分类
|
||||
2.店铺维护开票项目
|
||||
3.店铺展示营销中心
|
||||
```
|
||||
|
||||
时间:2021年9月15日
|
||||
|
||||
```
|
||||
新增功能:
|
||||
1.增加供应商功能
|
||||
2.商品预售
|
||||
3.商品预约
|
||||
4.电子券码
|
||||
5.企业会员
|
||||
6.企业会员购
|
||||
7.商品批发价
|
||||
功能优化:
|
||||
1.店铺运费模板支持按照体积计算
|
||||
2.店铺支持自定义移动端首页
|
||||
```
|
||||
|
||||
### 版本升级
|
||||
|
||||
```
|
||||
后续会持续版本升级,修复bug,完善功能,覆盖更多业务场景 o2o/b2b/s2b2b2c/跨境电商
|
||||
|
||||
后续会考虑推出微服务/中台等 企业级版本
|
||||
```
|
||||
|
||||
### 技术亮点
|
||||
|
||||
|
||||
1.后端框架基于Springboot,构建基于maven,持久层使用MyBatisPlus。使用elasticsearch、redis、mongodb、rocketmq 等各种中间健。都是主流架构,轻松应对各种环境。
|
||||
|
||||
2.支持集群、分布式,支持docker 轻松部署,解决各种复杂场景!
|
||||
|
||||
3.代码模块清晰,主要分为三端api(买家、卖家、管理),各端API互相隔离,自己鉴权,自己操作业务。
|
||||
|
||||
4.使用阿里开源的RocketMQ,基于mq解决各种并发场景,解决事务一致性,解决搞并发延迟场景问题。
|
||||
|
||||
5.项目使用多级缓存,应用不同场景,redis缓存业务数据、mongodb缓存关系型多对多关系问题、nginx缓存高频访问低频修改的页面。
|
||||
|
||||
6.支持各种联合登陆,支持各种客户端的支付问题,灵活配置灵活开启。
|
||||
|
||||
7.内置完善的楼层装修机制,各种拖拉拽,维护跳转页面或外网,即便是一个什么都不懂的运营也可以轻松掌握。
|
||||
|
||||
8.内置阿里短信接口,可以在线申请短信模版。内置阿里oss系统,可以对文件执行各种操作。oss商家端资源相互隔离。
|
||||
|
||||
10.强大的统计报表,统计效果,可以实现各个场景,包含在线人数,历史在线人数,活跃人数等信息。
|
||||
|
||||
11.标准Api接口、提供swagger文档,快速二开。
|
||||
|
||||
12.分布式调度任务中心,解决分布式定时任务多次执行问题。
|
||||
|
||||
13.代码注释完善,快速上手。
|
||||
|
||||
14.非移动端采用IView框架,各种自定义插件、选择器实现。移动端采用uniapp,一次编写,全端使用
|
||||
|
||||
15.已经对接好各种第三方插件,支持各种复杂等联合登陆,联合支付等场景。
|
||||
|
||||
|
||||
### 开源须知
|
||||
### ⚠️ 开源须知
|
||||
1.仅允许用于个人学习研究使用.
|
||||
|
||||
2.禁止将本开源的代码和资源进行任何形式任何名义的出售.
|
||||
@@ -301,7 +207,8 @@ PS:单独部署的话,数据库文件访问这里:https://gitee.com/beijing_
|
||||
4.限制商用,如果需要商业使用请联系我们。QQ3409056806.
|
||||
|
||||
|
||||
### 交流群
|
||||
### 🐧 交流群
|
||||
|
||||
**QQ群**:961316482
|
||||
##### 官方qq 1群 961316482(已满)
|
||||
##### 官方qq 2群 875294241
|
||||
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
<parent>
|
||||
<groupId>cn.lili</groupId>
|
||||
<artifactId>lili-shop-parent</artifactId>
|
||||
<version>4.2.0</version>
|
||||
<version>${revision}</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>admin</artifactId>
|
||||
@@ -15,7 +16,7 @@
|
||||
<dependency>
|
||||
<groupId>de.codecentric</groupId>
|
||||
<artifactId>spring-boot-admin-starter-server</artifactId>
|
||||
<version>2.3.1</version>
|
||||
<version>${spring-boot-admin}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
||||
@@ -12,6 +12,12 @@ import org.springframework.security.web.authentication.SavedRequestAwareAuthenti
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Admin
|
||||
*
|
||||
* @author Chopper
|
||||
* @since 2020/11/16 10:03 下午
|
||||
*/
|
||||
@Configuration
|
||||
@EnableAutoConfiguration
|
||||
@EnableAdminServer
|
||||
|
||||
@@ -3,21 +3,19 @@
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<properties>
|
||||
<enjoy.version>4.3</enjoy.version>
|
||||
</properties>
|
||||
<artifactId>buyer-api</artifactId>
|
||||
<parent>
|
||||
<groupId>cn.lili</groupId>
|
||||
<artifactId>lili-shop-parent</artifactId>
|
||||
<version>4.2.0</version>
|
||||
<version>${revision}</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>cn.lili</groupId>
|
||||
<artifactId>framework</artifactId>
|
||||
<version>4.2.0</version>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -6,7 +6,6 @@ import org.springframework.cache.annotation.EnableCaching;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.core.task.TaskExecutor;
|
||||
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
|
||||
@@ -14,10 +13,9 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
* 买家API
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020/11/16 10:03 下午
|
||||
* @since 2020/11/16 10:03 下午
|
||||
*/
|
||||
@SpringBootApplication
|
||||
@EnableJpaAuditing
|
||||
@EnableCaching
|
||||
@EnableAsync
|
||||
public class BuyerApiApplication {
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.util.List;
|
||||
* 买家端,商品分类接口
|
||||
*
|
||||
* @author Chopper
|
||||
* @date: 2020/11/16 10:05 下午
|
||||
* @since 2020/11/16 10:05 下午
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,商品分类接口")
|
||||
|
||||
@@ -5,7 +5,6 @@ import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.exception.ServiceException;
|
||||
import cn.lili.common.vo.PageVO;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.distribution.service.DistributionService;
|
||||
import cn.lili.modules.goods.entity.dos.Goods;
|
||||
import cn.lili.modules.goods.entity.dto.GoodsSearchParams;
|
||||
import cn.lili.modules.goods.entity.vos.GoodsVO;
|
||||
@@ -25,6 +24,7 @@ import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.elasticsearch.core.SearchPage;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -38,7 +38,7 @@ import java.util.Map;
|
||||
* 买家端,商品接口
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020/11/16 10:06 下午
|
||||
* @since 2020/11/16 10:06 下午
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "买家端,商品接口")
|
||||
@@ -61,12 +61,6 @@ public class GoodsBuyerController {
|
||||
*/
|
||||
@Autowired
|
||||
private EsGoodsSearchService goodsSearchService;
|
||||
/**
|
||||
* 分销员
|
||||
*/
|
||||
@Autowired
|
||||
private DistributionService distributionService;
|
||||
|
||||
|
||||
@ApiOperation(value = "通过id获取商品信息")
|
||||
@ApiImplicitParam(name = "goodsId", value = "商品ID", required = true, paramType = "path", dataType = "Long")
|
||||
@@ -106,9 +100,9 @@ public class GoodsBuyerController {
|
||||
|
||||
@ApiOperation(value = "从ES中获取商品信息")
|
||||
@GetMapping("/es")
|
||||
public ResultMessage<Page<EsGoodsIndex>> getGoodsByPageFromEs(EsGoodsSearchDTO goodsSearchParams, PageVO pageVO) {
|
||||
public ResultMessage<SearchPage<EsGoodsIndex>> getGoodsByPageFromEs(EsGoodsSearchDTO goodsSearchParams, PageVO pageVO) {
|
||||
pageVO.setNotConvert(true);
|
||||
Page<EsGoodsIndex> esGoodsIndices = goodsSearchService.searchGoods(goodsSearchParams, pageVO);
|
||||
SearchPage<EsGoodsIndex> esGoodsIndices = goodsSearchService.searchGoods(goodsSearchParams, pageVO);
|
||||
return ResultUtil.data(esGoodsIndices);
|
||||
}
|
||||
|
||||
@@ -122,8 +116,8 @@ public class GoodsBuyerController {
|
||||
|
||||
@ApiOperation(value = "获取搜索热词")
|
||||
@GetMapping("/hot-words")
|
||||
public ResultMessage<List<String>> getGoodsHotWords(Integer start, Integer end) {
|
||||
List<String> hotWords = goodsSearchService.getHotWords(start, end);
|
||||
public ResultMessage<List<String>> getGoodsHotWords(Integer count) {
|
||||
List<String> hotWords = goodsSearchService.getHotWords(count);
|
||||
return ResultUtil.data(hotWords);
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import javax.validation.constraints.NotNull;
|
||||
* 买家端,买家优惠券接口
|
||||
*
|
||||
* @author paulG
|
||||
* @date 2020/11/17 3:35 下午
|
||||
* @since 2020/11/17 3:35 下午
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,买家优惠券接口")
|
||||
|
||||
@@ -19,7 +19,7 @@ import java.util.List;
|
||||
* 买家端,浏览历史接口
|
||||
*
|
||||
* @author Chopper
|
||||
* @date: 2020/11/16 10:06 下午
|
||||
* @since 2020/11/16 10:06 下午
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,浏览历史接口")
|
||||
|
||||
@@ -20,7 +20,7 @@ import javax.validation.Valid;
|
||||
* 买家端,会员地址接口
|
||||
*
|
||||
* @author Bulbasaur
|
||||
* @date: 2020/11/16 10:07 下午
|
||||
* @since 2020/11/16 10:07 下午
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,会员地址接口")
|
||||
|
||||
@@ -18,7 +18,7 @@ import javax.validation.constraints.NotNull;
|
||||
* 买家端,会员收藏接口
|
||||
*
|
||||
* @author Chopper
|
||||
* @date: 2020/11/17 2:32 下午
|
||||
* @since 2020/11/17 2:32 下午
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,会员收藏接口")
|
||||
@@ -36,11 +36,16 @@ public class MemberCollectionController {
|
||||
@Autowired
|
||||
private StoreCollectionService storeCollectionService;
|
||||
|
||||
/**
|
||||
* 商品收藏关键字
|
||||
*/
|
||||
private String goods="GOODS";
|
||||
|
||||
@ApiOperation(value = "查询会员收藏列表")
|
||||
@ApiImplicitParam(name = "type", value = "类型", dataType = "String", paramType = "path", example = "GOODS:商品,STORE:店铺")
|
||||
@GetMapping("/{type}")
|
||||
public ResultMessage<Object> goodsList(@PathVariable String type, PageVO page) {
|
||||
if (type.equals("GOODS")) {
|
||||
if (goods.equals(type)) {
|
||||
return ResultUtil.data(goodsCollectionService.goodsCollection(page));
|
||||
}
|
||||
return ResultUtil.data(storeCollectionService.storeCollection(page));
|
||||
@@ -54,7 +59,7 @@ public class MemberCollectionController {
|
||||
@PostMapping("/add/{type}/{id}")
|
||||
public ResultMessage<Object> addGoodsCollection(@PathVariable String type,
|
||||
@NotNull(message = "值不能为空") @PathVariable String id) {
|
||||
if (type.equals("GOODS")) {
|
||||
if (goods.equals(type)) {
|
||||
return ResultUtil.data(goodsCollectionService.addGoodsCollection(id));
|
||||
}
|
||||
return ResultUtil.data(storeCollectionService.addStoreCollection(id));
|
||||
@@ -69,7 +74,7 @@ public class MemberCollectionController {
|
||||
@DeleteMapping(value = "/delete/{type}/{id}")
|
||||
public ResultMessage<Object> deleteGoodsCollection(@PathVariable String type,
|
||||
@NotNull(message = "值不能为空") @PathVariable String id) {
|
||||
if (type.equals("GOODS")) {
|
||||
if (goods.equals(type)) {
|
||||
return ResultUtil.data(goodsCollectionService.deleteGoodsCollection(id));
|
||||
}
|
||||
return ResultUtil.data(storeCollectionService.deleteStoreCollection(id));
|
||||
@@ -83,7 +88,7 @@ public class MemberCollectionController {
|
||||
@GetMapping(value = "/isCollection/{type}/{id}")
|
||||
public ResultMessage<Boolean> isCollection(@PathVariable String type,
|
||||
@NotNull(message = "值不能为空") @PathVariable String id) {
|
||||
if (type.equals("GOODS")) {
|
||||
if (goods.equals(type)) {
|
||||
return ResultUtil.data(this.goodsCollectionService.isCollection(id));
|
||||
}
|
||||
return ResultUtil.data(this.storeCollectionService.isCollection(id));
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package cn.lili.controller.member;
|
||||
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.enums.SwitchEnum;
|
||||
import cn.lili.common.security.context.UserContext;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.member.entity.dos.MemberEvaluation;
|
||||
import cn.lili.modules.member.entity.dto.EvaluationQueryParams;
|
||||
@@ -24,7 +24,7 @@ import javax.validation.constraints.NotNull;
|
||||
* 买家端,会员商品评价接口
|
||||
*
|
||||
* @author Bulbasaur
|
||||
* @date: 2020/11/16 10:08 下午
|
||||
* @since 2020/11/16 10:08 下午
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,会员商品评价接口")
|
||||
|
||||
@@ -4,8 +4,8 @@ import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.security.context.UserContext;
|
||||
import cn.lili.common.vo.PageVO;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.message.entity.enums.MessageStatusEnum;
|
||||
import cn.lili.modules.message.entity.dos.MemberMessage;
|
||||
import cn.lili.modules.message.entity.enums.MessageStatusEnum;
|
||||
import cn.lili.modules.message.entity.vos.MemberMessageQueryVO;
|
||||
import cn.lili.modules.message.service.MemberMessageService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -19,7 +19,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
* 买家端,会员站内消息接口
|
||||
*
|
||||
* @author Bulbasaur
|
||||
* @date: 2020/11/16 10:07 下午
|
||||
* @since 2020/11/16 10:07 下午
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,会员站内消息接口")
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package cn.lili.controller.member;
|
||||
|
||||
|
||||
import cn.lili.common.security.context.UserContext;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.security.context.UserContext;
|
||||
import cn.lili.common.vo.PageVO;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.member.entity.vo.MemberReceiptAddVO;
|
||||
@@ -19,7 +19,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
* 买家端,会员发票接口
|
||||
*
|
||||
* @author paulG
|
||||
* @date: 2021-03-29 14:10:16
|
||||
* @since 2021-03-29 14:10:16
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,会员发票接口")
|
||||
|
||||
@@ -18,7 +18,7 @@ import java.util.List;
|
||||
* 会员签到控制器
|
||||
*
|
||||
* @author pikachu
|
||||
* @date: 2020/11/16 10:07 下午
|
||||
* @since 2020/11/16 10:07 下午
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,会员签到API")
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
package cn.lili.controller.member;
|
||||
|
||||
import cn.lili.common.enums.ResultCode;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.exception.ServiceException;
|
||||
import cn.lili.common.security.AuthUser;
|
||||
import cn.lili.common.security.context.UserContext;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.verification.enums.VerificationEnums;
|
||||
import cn.lili.common.verification.service.VerificationService;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.member.entity.dos.Member;
|
||||
import cn.lili.modules.member.entity.dos.MemberWallet;
|
||||
import cn.lili.modules.member.entity.vo.MemberWalletVO;
|
||||
import cn.lili.modules.member.service.MemberService;
|
||||
import cn.lili.modules.member.service.MemberWalletService;
|
||||
import cn.lili.modules.verification.enums.VerificationEnums;
|
||||
import cn.lili.modules.verification.service.VerificationService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
@@ -30,7 +30,7 @@ import javax.validation.constraints.Pattern;
|
||||
* 买家端,会员余额接口
|
||||
*
|
||||
* @author pikachu
|
||||
* @date: 2020/11/16 10:07 下午
|
||||
* @since 2020/11/16 10:07 下午
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,会员余额接口")
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package cn.lili.controller.member;
|
||||
|
||||
|
||||
import cn.lili.common.security.context.UserContext;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.security.context.UserContext;
|
||||
import cn.lili.common.vo.PageVO;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.member.entity.dos.MemberWithdrawApply;
|
||||
@@ -22,7 +22,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* 买家端,余额提现记录接口
|
||||
*
|
||||
* @author pikachu
|
||||
* @date: 2020/11/16 10:07 下午
|
||||
* @since 2020/11/16 10:07 下午
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,余额提现记录接口")
|
||||
@@ -38,8 +38,8 @@ public class MemberWithdrawApplyBuyerController {
|
||||
public ResultMessage<IPage<MemberWithdrawApply>> getByPage(PageVO page, MemberWithdrawApplyQueryVO memberWithdrawApplyQueryVO) {
|
||||
memberWithdrawApplyQueryVO.setMemberId(UserContext.getCurrentUser().getId());
|
||||
//构建查询 返回数据
|
||||
IPage<MemberWithdrawApply> memberWithdrawApplyIPage = memberWithdrawApplyService.getMemberWithdrawPage(page, memberWithdrawApplyQueryVO);
|
||||
return ResultUtil.data(memberWithdrawApplyIPage);
|
||||
IPage<MemberWithdrawApply> memberWithdrawApplyPage = memberWithdrawApplyService.getMemberWithdrawPage(page, memberWithdrawApplyQueryVO);
|
||||
return ResultUtil.data(memberWithdrawApplyPage);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package cn.lili.controller.member;
|
||||
|
||||
import cn.lili.common.security.context.UserContext;
|
||||
import cn.lili.common.utils.PageUtil;
|
||||
import cn.lili.mybatis.util.PageUtil;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.vo.PageVO;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
@@ -15,6 +15,7 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
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;
|
||||
|
||||
@@ -22,7 +23,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* 买家端,会员积分历史接口
|
||||
*
|
||||
* @author Bulbasaur
|
||||
* @date 2020-02-25 14:10:16
|
||||
* @since 2020-02-25 14:10:16
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,会员积分历史接口")
|
||||
@@ -37,7 +38,7 @@ public class PointsHistoryBuyerController {
|
||||
|
||||
LambdaQueryWrapper<MemberPointsHistory> queryWrapper = Wrappers.lambdaQuery();
|
||||
queryWrapper.eq(MemberPointsHistory::getMemberId, UserContext.getCurrentUser().getId());
|
||||
|
||||
queryWrapper.orderByDesc(MemberPointsHistory::getCreateTime);
|
||||
return ResultUtil.data(memberPointsHistoryService.page(PageUtil.initPage(page), queryWrapper));
|
||||
}
|
||||
|
||||
@@ -46,4 +47,6 @@ public class PointsHistoryBuyerController {
|
||||
public ResultMessage<MemberPointsHistoryVO> getMemberPointsHistoryVO() {
|
||||
return ResultUtil.data(memberPointsHistoryService.getMemberPointsHistoryVO(UserContext.getCurrentUser().getId()));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package cn.lili.controller.member;
|
||||
|
||||
import cn.lili.common.security.context.UserContext;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.security.context.UserContext;
|
||||
import cn.lili.common.vo.PageVO;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.order.trade.entity.dos.Recharge;
|
||||
@@ -20,7 +20,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* 买家端,预存款充值记录接口
|
||||
*
|
||||
* @author pikachu
|
||||
* @date: 2020/11/16 10:07 下午
|
||||
* @since 2020/11/16 10:07 下午
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,预存款充值记录接口")
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package cn.lili.controller.member;
|
||||
|
||||
import cn.lili.common.utils.PageUtil;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.vo.PageVO;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.system.entity.dos.ServiceNotice;
|
||||
import cn.lili.modules.system.service.ServiceNoticeService;
|
||||
import cn.lili.mybatis.util.PageUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
@@ -21,7 +21,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* 买家端,会员站服务消息接口
|
||||
*
|
||||
* @author Chopper
|
||||
* @date: 2020/11/17 2:31 下午
|
||||
* @since 2020/11/17 2:31 下午
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/service/notice")
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package cn.lili.controller.other;
|
||||
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.utils.PageUtil;
|
||||
import cn.lili.common.vo.PageVO;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.system.entity.dos.AppVersion;
|
||||
import cn.lili.modules.system.service.AppVersionService;
|
||||
import cn.lili.mybatis.util.PageUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -21,7 +21,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* 买家端,APP版本
|
||||
*
|
||||
* @author Bulbasaur
|
||||
* @date: 2021/5/21 11:15 上午
|
||||
* @since 2021/5/21 11:15 上午
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,APP版本")
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.util.List;
|
||||
* 买家端,文章接口
|
||||
*
|
||||
* @author Chopper
|
||||
* @date: 2020/11/16 10:02 下午
|
||||
* @since 2020/11/16 10:02 下午
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,文章接口")
|
||||
|
||||
@@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* 买家端,意见反馈接口
|
||||
*
|
||||
* @author Bulbasaur
|
||||
* @date 2020-05-5 15:10:16
|
||||
* @since 2020-05-5 15:10:16
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,意见反馈接口")
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.util.List;
|
||||
* 买家端,物流公司接口
|
||||
*
|
||||
* @author Bulbasaur
|
||||
* @date 2020-05-5 15:10:16
|
||||
* @since 2020-05-5 15:10:16
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,物流公司接口")
|
||||
|
||||
@@ -18,7 +18,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* 买家端,页面接口
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020/11/16 10:08 下午
|
||||
* @since 2020/11/16 10:08 下午
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,页面接口")
|
||||
|
||||
@@ -3,8 +3,8 @@ package cn.lili.controller.other.broadcast;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.vo.PageVO;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.broadcast.entity.dos.Studio;
|
||||
import cn.lili.modules.broadcast.service.StudioService;
|
||||
import cn.lili.modules.goods.entity.dos.Studio;
|
||||
import cn.lili.modules.goods.service.StudioService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
@@ -19,7 +19,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* 买家端,直播间接口
|
||||
*
|
||||
* @author Bulbasaur
|
||||
* @date: 2021/5/20 12:03 下午
|
||||
* @since 2021/5/20 12:03 下午
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,直播间接口")
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
package cn.lili.controller.other.distribution;
|
||||
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.security.context.UserContext;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.distribution.entity.dos.Distribution;
|
||||
import cn.lili.modules.distribution.entity.dos.DistributionOrder;
|
||||
import cn.lili.modules.distribution.entity.dto.DistributionApplyDTO;
|
||||
import cn.lili.modules.distribution.entity.vos.DistributionOrderSearchParams;
|
||||
import cn.lili.modules.distribution.service.DistributionOrderService;
|
||||
import cn.lili.modules.distribution.service.DistributionService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -21,7 +20,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
* 买家端,分销员接口
|
||||
*
|
||||
* @author pikachu
|
||||
* @date: 2020/11/16 10:03 下午
|
||||
* @since 2020/11/16 10:03 下午
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,分销员接口")
|
||||
@@ -39,15 +38,10 @@ public class DistributionBuyerController {
|
||||
@Autowired
|
||||
private DistributionOrderService distributionOrderService;
|
||||
|
||||
//申请分销员
|
||||
@ApiOperation(value = "申请分销员")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "name", value = "姓名", required = true, paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "idNumber", value = "身份证号", required = true, paramType = "query", dataType = "String")
|
||||
})
|
||||
@PostMapping
|
||||
public ResultMessage<Object> applyDistribution(@RequestParam String name, @RequestParam String idNumber) {
|
||||
return ResultUtil.data(distributionService.applyDistribution(name, idNumber));
|
||||
public ResultMessage<Object> applyDistribution(DistributionApplyDTO distributionApplyDTO) {
|
||||
return ResultUtil.data(distributionService.applyDistribution(distributionApplyDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取分销员分页订单列表")
|
||||
@@ -66,7 +60,6 @@ public class DistributionBuyerController {
|
||||
return ResultUtil.data(distributionService.getDistribution());
|
||||
}
|
||||
|
||||
//申请分销员
|
||||
@ApiOperation(value = "绑定分销员")
|
||||
@ApiImplicitParam(name = "distributionId", value = "分销员ID", required = true, paramType = "path")
|
||||
@GetMapping("/bindingDistribution/{distributionId}")
|
||||
|
||||
@@ -19,6 +19,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
|
||||
@@ -26,7 +28,7 @@ import javax.validation.constraints.NotNull;
|
||||
* 买家端,分销商品佣金提现接口
|
||||
*
|
||||
* @author pikachu
|
||||
* @date: 2020/11/16 10:03 下午
|
||||
* @since 2020/11/16 10:03 下午
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,分销商品佣金提现接口")
|
||||
@@ -50,8 +52,10 @@ public class DistributionCashBuyerController {
|
||||
@ApiImplicitParam(name = "price", value = "申请金额", required = true, paramType = "query", dataType = "double")
|
||||
})
|
||||
@PostMapping
|
||||
public ResultMessage<Object> cash(@NotNull @ApiIgnore Double price) {
|
||||
if(distributionCashService.cash(price)){
|
||||
public ResultMessage<Object> cash(@Max(value = 1000, message = "提现金额单次最多允许提现1000元")
|
||||
@Min(value = 1, message = "提现金额单次最少提现金额为1元")
|
||||
@NotNull @ApiIgnore Double price) {
|
||||
if (distributionCashService.cash(price)) {
|
||||
return ResultUtil.success();
|
||||
}
|
||||
throw new ServiceException(ResultCode.ERROR);
|
||||
|
||||
@@ -11,6 +11,7 @@ import cn.lili.modules.distribution.service.DistributionSelectedGoodsService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -24,7 +25,7 @@ import javax.validation.constraints.NotNull;
|
||||
* 买家端,分销商品接口
|
||||
*
|
||||
* @author Bulbasaur
|
||||
* @date: 2020/11/16 10:06 下午
|
||||
* @since 2020/11/16 10:06 下午
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,分销商品接口")
|
||||
@@ -50,13 +51,25 @@ public class DistributionGoodsBuyerController {
|
||||
}
|
||||
|
||||
@ApiOperation(value = "选择分销商品")
|
||||
@ApiImplicitParam(name = "distributionGoodsId", value = "分销ID", required = true, dataType = "String", paramType = "path")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "distributionGoodsId", value = "分销ID", required = true, dataType = "String", paramType = "path"),
|
||||
@ApiImplicitParam(name = "checked", value = "是否选择", required = true, dataType = "boolean", paramType = "query")
|
||||
})
|
||||
@GetMapping(value = "/checked/{distributionGoodsId}")
|
||||
public ResultMessage<Object> distributionCheckGoods(
|
||||
@NotNull(message = "分销商品不能为空") @PathVariable("distributionGoodsId") String distributionGoodsId) {
|
||||
if(distributionSelectedGoodsService.add(distributionGoodsId)){
|
||||
return ResultUtil.success();
|
||||
@NotNull(message = "分销商品不能为空") @PathVariable("distributionGoodsId") String distributionGoodsId,Boolean checked) {
|
||||
Boolean result=false;
|
||||
if(checked){
|
||||
result=distributionSelectedGoodsService.add(distributionGoodsId);
|
||||
}else {
|
||||
result=distributionSelectedGoodsService.delete(distributionGoodsId);
|
||||
}
|
||||
throw new ServiceException(ResultCode.ERROR);
|
||||
//判断操作结果
|
||||
if(result){
|
||||
return ResultUtil.success(ResultCode.SUCCESS);
|
||||
}else{
|
||||
throw new ServiceException(ResultCode.ERROR);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* 买家端,分销商品佣金提现接口
|
||||
*
|
||||
* @author pikachu
|
||||
* @date: 2020/11/16 10:03 下午
|
||||
* @since 2020/11/16 10:03 下午
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,分销订单接口")
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
package cn.lili.controller.passport;
|
||||
|
||||
import cn.lili.common.enums.ResultCode;
|
||||
import cn.lili.common.exception.ServiceException;
|
||||
import cn.lili.common.sms.SmsUtil;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.verification.enums.VerificationEnums;
|
||||
import cn.lili.common.verification.service.VerificationService;
|
||||
import cn.lili.common.exception.ServiceException;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.member.entity.dos.Member;
|
||||
import cn.lili.modules.member.entity.dto.MemberEditDTO;
|
||||
import cn.lili.modules.member.service.MemberService;
|
||||
import cn.lili.modules.system.sms.SmsUtil;
|
||||
import cn.lili.modules.verification.enums.VerificationEnums;
|
||||
import cn.lili.modules.verification.service.VerificationService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
@@ -23,7 +23,7 @@ import javax.validation.constraints.NotNull;
|
||||
* 买家端,会员接口
|
||||
*
|
||||
* @author Chopper
|
||||
* @date: 2020/11/16 10:07 下午
|
||||
* @since 2020/11/16 10:07 下午
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,会员接口")
|
||||
@@ -66,7 +66,7 @@ public class MemberBuyerController {
|
||||
if (smsUtil.verifyCode(mobile, VerificationEnums.LOGIN, uuid, code)) {
|
||||
return ResultUtil.data(memberService.mobilePhoneLogin(mobile));
|
||||
} else {
|
||||
throw new ServiceException("验证码错误");
|
||||
throw new ServiceException(ResultCode.VERIFICATION_SMS_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.util.List;
|
||||
* 买家端,app/小程序 联合登录
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020-11-25 19:29
|
||||
* @since 2020-11-25 19:29
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,app/小程序 联合登录")
|
||||
|
||||
@@ -3,7 +3,7 @@ package cn.lili.controller.passport.connect;
|
||||
|
||||
import cn.lili.common.enums.ResultCode;
|
||||
import cn.lili.common.exception.ServiceException;
|
||||
import cn.lili.common.token.Token;
|
||||
import cn.lili.common.security.token.Token;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.connect.entity.dto.AuthCallback;
|
||||
@@ -29,7 +29,6 @@ import java.io.IOException;
|
||||
* 买家端,web联合登录
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020-11-25 19:29
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@@ -64,7 +63,7 @@ public class ConnectBuyerWebController {
|
||||
@ApiOperation(value = "信任登录统一回调地址", hidden = true)
|
||||
@GetMapping("/callback/{type}")
|
||||
public void callBack(@PathVariable String type, AuthCallback callback, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws IOException {
|
||||
connectUtil.callback(type, callback,httpServletRequest, httpServletResponse);
|
||||
connectUtil.callback(type, callback, httpServletRequest, httpServletResponse);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "信任登录响应结果获取")
|
||||
@@ -91,11 +90,11 @@ public class ConnectBuyerWebController {
|
||||
@ApiImplicitParam(name = "uniAccessToken", value = "联合登陆返回的accessToken", required = true, paramType = "query")
|
||||
})
|
||||
@GetMapping("/app/login")
|
||||
public ResultMessage<Token> unionIDLogin(ConnectAuthUser authUser, @RequestHeader("uuid") String uuid) {
|
||||
public ResultMessage<Token> unionLogin(ConnectAuthUser authUser, @RequestHeader("uuid") String uuid) {
|
||||
try {
|
||||
return ResultUtil.data(connectService.appLoginCallback(authUser, uuid));
|
||||
} catch (Exception e) {
|
||||
log.error("unionID登录错误",e);
|
||||
log.error("unionID登录错误", e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package cn.lili.controller.passport.connect;
|
||||
|
||||
import cn.lili.common.token.Token;
|
||||
import cn.lili.common.security.token.Token;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.connect.entity.dto.WechatMPLoginParams;
|
||||
@@ -23,7 +23,7 @@ import java.util.List;
|
||||
* 买家端,小程序登录接口
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2021/2/19 09:28
|
||||
* @since 2021/2/19 09:28
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/buyer/mini-program")
|
||||
@@ -34,6 +34,7 @@ public class MiniProgramBuyerController {
|
||||
public ConnectService connectService;
|
||||
@Autowired
|
||||
public WechatMpCodeUtil wechatMpCodeUtil;
|
||||
@SuppressWarnings("AlibabaLowerCamelCaseVariableNaming")
|
||||
@Autowired
|
||||
public WechatMPMessageService wechatMPMessageService;
|
||||
@Autowired
|
||||
|
||||
@@ -25,7 +25,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
* 买家端,收银台接口
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020-12-18 16:59
|
||||
* @since 2020-12-18 16:59
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
|
||||
@@ -17,7 +17,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||
* 买家端,退款回调
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020-12-18 16:59
|
||||
* @since 2020-12-18 16:59
|
||||
*/
|
||||
@Api(tags = "买家端,退款回调")
|
||||
@RestController
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
package cn.lili.controller.promotion;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.security.context.UserContext;
|
||||
import cn.lili.common.vo.PageVO;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.promotion.entity.dos.KanjiaActivity;
|
||||
import cn.lili.modules.promotion.entity.dos.KanjiaActivityLog;
|
||||
import cn.lili.modules.promotion.entity.dto.KanJiaActivityLogQuery;
|
||||
import cn.lili.modules.promotion.entity.dto.KanjiaActivityQuery;
|
||||
import cn.lili.modules.promotion.entity.enums.PromotionStatusEnum;
|
||||
import cn.lili.modules.promotion.entity.vos.kanjia.*;
|
||||
import cn.lili.modules.promotion.service.KanjiaActivityGoodsService;
|
||||
import cn.lili.modules.promotion.service.KanjiaActivityLogService;
|
||||
import cn.lili.modules.promotion.service.KanjiaActivityService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 买家端,砍价活动商品
|
||||
*
|
||||
* @author qiuqiu
|
||||
* @date 2021/7/12
|
||||
**/
|
||||
@RestController
|
||||
@Api(tags = "买家端,砍价商品接口")
|
||||
@RequestMapping("/buyer/promotion/kanjiaGoods")
|
||||
public class KanjiaGoodsActivityBuyerController {
|
||||
|
||||
/**
|
||||
* 砍价活动商品
|
||||
*/
|
||||
@Autowired
|
||||
private KanjiaActivityGoodsService kanJiaActivityGoodsService;
|
||||
/**
|
||||
* 帮砍记录
|
||||
*/
|
||||
@Autowired
|
||||
private KanjiaActivityLogService kanJiaActivityLogService;
|
||||
/**
|
||||
* 砍价活动
|
||||
*/
|
||||
@Autowired
|
||||
private KanjiaActivityService kanJiaActivityService;
|
||||
|
||||
@GetMapping
|
||||
@ApiOperation(value = "分页获取砍价商品")
|
||||
public ResultMessage<IPage<KanjiaActivityGoodsListVO>> kanjiaActivityGoodsPage(KanjiaActivityGoodsParams kanjiaActivityGoodsParams, PageVO page) {
|
||||
// 会员端查询到的肯定是已经开始的活动商品
|
||||
kanjiaActivityGoodsParams.setPromotionStatus(PromotionStatusEnum.START.name());
|
||||
kanjiaActivityGoodsParams.setStartTime(System.currentTimeMillis());
|
||||
kanjiaActivityGoodsParams.setEndTime(System.currentTimeMillis());
|
||||
return ResultUtil.data(kanJiaActivityGoodsService.kanjiaGoodsVOPage(kanjiaActivityGoodsParams, page));
|
||||
}
|
||||
|
||||
@GetMapping("/{id}")
|
||||
@ApiOperation(value = "获取砍价活动商品")
|
||||
@ApiImplicitParam(name = "id", value = "砍价活动商品ID", required = true, paramType = "path")
|
||||
public ResultMessage<KanjiaActivityGoodsVO> getKanjiaActivityGoods(@PathVariable String id) {
|
||||
return ResultUtil.data(kanJiaActivityGoodsService.getKanJiaGoodsVO(id));
|
||||
}
|
||||
|
||||
@GetMapping("/getKanjiaActivity/logs")
|
||||
@ApiOperation(value = "分页获取砍价活动-帮砍记录")
|
||||
public ResultMessage<IPage<KanjiaActivityLog>> getKanjiaActivityLog(KanJiaActivityLogQuery kanJiaActivityLogQuery, PageVO page) {
|
||||
return ResultUtil.data(kanJiaActivityLogService.getForPage(kanJiaActivityLogQuery, page));
|
||||
}
|
||||
|
||||
@PostMapping("/getKanjiaActivity")
|
||||
@ApiOperation(value = "获取砍价活动")
|
||||
public ResultMessage<KanjiaActivityVO> getKanJiaActivity(KanjiaActivitySearchParams kanjiaActivitySearchParams) {
|
||||
//如果是非被邀请关系则填写会员ID
|
||||
if (StrUtil.isEmpty(kanjiaActivitySearchParams.getKanjiaActivityId())) {
|
||||
kanjiaActivitySearchParams.setMemberId(UserContext.getCurrentUser().getId());
|
||||
}
|
||||
return ResultUtil.data(kanJiaActivityService.getKanjiaActivityVO(kanjiaActivitySearchParams));
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@ApiImplicitParam(name = "id", value = "砍价活动商品ID", required = true, paramType = "path")
|
||||
@ApiOperation(value = "发起砍价活动")
|
||||
public ResultMessage<KanjiaActivityLog> launchKanJiaActivity(String id) {
|
||||
KanjiaActivityLog kanjiaActivityLog = kanJiaActivityService.add(id);
|
||||
return ResultUtil.data(kanjiaActivityLog);
|
||||
}
|
||||
|
||||
@PostMapping("/help/{kanjiaActivityId}")
|
||||
@ApiImplicitParam(name = "kanJiaActivityId", value = "砍价活动ID", required = true, paramType = "path")
|
||||
@ApiOperation(value = "帮砍一刀")
|
||||
public ResultMessage<KanjiaActivityLog> helpKanJia(@PathVariable String kanjiaActivityId) {
|
||||
KanjiaActivityLog kanjiaActivityLog = kanJiaActivityService.helpKanJia(kanjiaActivityId);
|
||||
return ResultUtil.data(kanjiaActivityLog);
|
||||
}
|
||||
|
||||
@GetMapping("/kanjiaActivity/mine/")
|
||||
@ApiOperation(value = "分页获取已参与的砍价活动")
|
||||
public ResultMessage<IPage<KanjiaActivity>> getPointsGoodsPage(KanjiaActivityQuery kanjiaActivityQuery, PageVO page) {
|
||||
// 会员端查询到的肯定是已经开始的活动商品
|
||||
kanjiaActivityQuery.setMemberId(UserContext.getCurrentUser().getId());
|
||||
IPage<KanjiaActivity> kanjiaActivity = kanJiaActivityService.getForPage(kanjiaActivityQuery, page);
|
||||
return ResultUtil.data(kanjiaActivity);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -6,7 +6,7 @@ import cn.lili.common.vo.PageVO;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.promotion.entity.dto.PromotionGoodsDTO;
|
||||
import cn.lili.modules.promotion.entity.enums.PromotionStatusEnum;
|
||||
import cn.lili.modules.promotion.entity.enums.PromotionTypeEnum;
|
||||
import cn.lili.common.enums.PromotionTypeEnum;
|
||||
import cn.lili.modules.promotion.entity.vos.PintuanMemberVO;
|
||||
import cn.lili.modules.promotion.entity.vos.PintuanShareVO;
|
||||
import cn.lili.modules.promotion.entity.vos.PromotionGoodsSearchParams;
|
||||
@@ -27,7 +27,7 @@ import java.util.List;
|
||||
* 买家端,拼团接口
|
||||
*
|
||||
* @author paulG
|
||||
* @date 2021/2/20
|
||||
* @since 2021/2/20
|
||||
**/
|
||||
@Api(tags = "买家端,拼团接口")
|
||||
@RestController
|
||||
|
||||
@@ -10,9 +10,11 @@ import cn.lili.modules.promotion.service.PointsGoodsCategoryService;
|
||||
import cn.lili.modules.promotion.service.PointsGoodsService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@@ -20,7 +22,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* 买家端,积分商品接口
|
||||
*
|
||||
* @author paulG
|
||||
* @date 2021/1/19
|
||||
* @since 2021/1/19
|
||||
**/
|
||||
@RestController
|
||||
@Api(tags = "买家端,积分商品接口")
|
||||
@@ -44,4 +46,11 @@ public class PointsGoodsBuyerController {
|
||||
return ResultUtil.data(pointsGoodsCategoryService.getCategoryByPage(name, page));
|
||||
}
|
||||
|
||||
@GetMapping("/{id}")
|
||||
@ApiOperation(value = "获取积分活动商品")
|
||||
@ApiImplicitParam(name = "id", value = "积分商品ID", required = true, paramType = "path")
|
||||
public ResultMessage<PointsGoodsVO> getPointsGoodsPage(@PathVariable String id) {
|
||||
return ResultUtil.data(pointsGoodsService.getPointsGoodsDetail(id));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.util.List;
|
||||
* 买家端,秒杀活动接口
|
||||
*
|
||||
* @author paulG
|
||||
* @date 2020/11/17 2:30 下午
|
||||
* @since 2020/11/17 2:30 下午
|
||||
*/
|
||||
@Api(tags = "买家端,秒杀活动接口")
|
||||
@RestController
|
||||
|
||||
@@ -20,7 +20,7 @@ import javax.validation.constraints.NotNull;
|
||||
* 买家端,采购接口
|
||||
*
|
||||
* @author Chopper
|
||||
* @date: 2020/11/16 10:06 下午
|
||||
* @since 2020/11/16 10:06 下午
|
||||
*/
|
||||
@Api(tags = "买家端,采购接口")
|
||||
@RestController
|
||||
|
||||
@@ -18,7 +18,7 @@ import java.util.List;
|
||||
* 买家端,采购报价接口
|
||||
*
|
||||
* @author Bulbasaur
|
||||
* @date: 2020/11/16 10:06 下午
|
||||
* @since 2020/11/16 10:06 下午
|
||||
*/
|
||||
@Api(tags = "买家端,采购报价接口")
|
||||
@RestController
|
||||
|
||||
@@ -4,8 +4,6 @@ import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.security.context.UserContext;
|
||||
import cn.lili.common.vo.PageVO;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.statistics.aop.PageViewPoint;
|
||||
import cn.lili.modules.statistics.aop.enums.PageViewEnum;
|
||||
import cn.lili.modules.store.entity.dto.StoreBankDTO;
|
||||
import cn.lili.modules.store.entity.dto.StoreCompanyDTO;
|
||||
import cn.lili.modules.store.entity.dto.StoreOtherInfoDTO;
|
||||
@@ -29,7 +27,7 @@ import java.util.List;
|
||||
* 买家端,店铺接口
|
||||
*
|
||||
* @author Bulbasaur
|
||||
* @date: 2020/11/17 2:32 下午
|
||||
* @since 2020/11/17 2:32 下午
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/buyer/store")
|
||||
@@ -61,11 +59,17 @@ public class StoreBuyerController {
|
||||
@ApiOperation(value = "通过id获取店铺信息")
|
||||
@ApiImplicitParam(name = "id", value = "店铺ID", required = true, paramType = "path")
|
||||
@GetMapping(value = "/get/detail/{id}")
|
||||
@PageViewPoint(type = PageViewEnum.STORE, id = "#id")
|
||||
public ResultMessage<StoreBasicInfoVO> detail(@NotNull @PathVariable String id) {
|
||||
return ResultUtil.data(storeDetailService.getStoreBasicInfoDTO(id));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "通过id获取店铺详细信息-营业执照")
|
||||
@ApiImplicitParam(name = "id", value = "店铺ID", required = true, paramType = "path")
|
||||
@GetMapping(value = "/get/licencePhoto/{id}")
|
||||
public ResultMessage<StoreOtherVO> licencePhoto(@NotNull @PathVariable String id) {
|
||||
return ResultUtil.data(storeDetailService.getStoreOtherVO(id));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "通过id获取店铺商品分类")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "id", value = "店铺ID", required = true, paramType = "path")
|
||||
|
||||
@@ -30,7 +30,7 @@ import java.util.List;
|
||||
* 买家端,售后管理接口
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020/11/16 10:02 下午
|
||||
* @since 2020/11/16 10:02 下午
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,售后管理接口")
|
||||
@@ -72,7 +72,7 @@ public class AfterSaleBuyerController {
|
||||
})
|
||||
@GetMapping(value = "/applyAfterSaleInfo/{sn}")
|
||||
public ResultMessage<AfterSaleApplyVO> applyAfterSaleInfo(@PathVariable String sn) {
|
||||
return ResultUtil.data(afterSaleService.getAfterSaleDTO(sn));
|
||||
return ResultUtil.data(afterSaleService.getAfterSaleVO(sn));
|
||||
}
|
||||
|
||||
@PostMapping(value = "/save/{orderItemSn}")
|
||||
@@ -95,7 +95,7 @@ public class AfterSaleBuyerController {
|
||||
public ResultMessage<AfterSale> delivery(@NotNull(message = "售后编号不能为空") @PathVariable("afterSaleSn") String afterSaleSn,
|
||||
@NotNull(message = "发货单号不能为空") @RequestParam String logisticsNo,
|
||||
@NotNull(message = "请选择物流公司") @RequestParam String logisticsId,
|
||||
@NotNull(message = "请选择发货时间") @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date mDeliverTime) {
|
||||
@NotNull(message = "请选择发货时间") @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date mDeliverTime) {
|
||||
return ResultUtil.data(afterSaleService.buyerDelivery(afterSaleSn, logisticsNo, logisticsId, mDeliverTime));
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ import javax.validation.constraints.NotNull;
|
||||
* 买家端,购物车接口
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020/11/16 10:04 下午
|
||||
* @since 2020/11/16 10:04 下午
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@@ -52,7 +52,7 @@ public class CartController {
|
||||
String cartType) {
|
||||
try {
|
||||
//读取选中的列表
|
||||
cartService.add(skuId, num, cartType);
|
||||
cartService.add(skuId, num, cartType, false);
|
||||
return ResultUtil.success();
|
||||
} catch (ServiceException se) {
|
||||
log.info(se.getMsg(), se);
|
||||
@@ -93,7 +93,7 @@ public class CartController {
|
||||
@PostMapping(value = "/sku/num/{skuId}")
|
||||
public ResultMessage<Object> update(@NotNull(message = "产品id不能为空") @PathVariable(name = "skuId") String skuId,
|
||||
Integer num) {
|
||||
cartService.updateNum(skuId, num);
|
||||
cartService.add(skuId, num, CartTypeEnum.CART.name(), true);
|
||||
return ResultUtil.success();
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ import javax.validation.constraints.NotNull;
|
||||
* 买家端,订单接口
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020/11/16 10:08 下午
|
||||
* @since 2020/11/16 10:08 下午
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,订单接口")
|
||||
|
||||
@@ -21,7 +21,7 @@ import javax.validation.constraints.Min;
|
||||
* 买家端,预存款充值记录接口
|
||||
*
|
||||
* @author paulG
|
||||
* @date: 2020/11/16 10:07 下午
|
||||
* @since 2020/11/16 10:07 下午
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,预存款充值记录接口")
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package cn.lili.controller.trade;
|
||||
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.security.AuthUser;
|
||||
import cn.lili.common.security.context.UserContext;
|
||||
import cn.lili.common.utils.PageUtil;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.vo.PageVO;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.order.trade.entity.dos.WalletLog;
|
||||
import cn.lili.modules.order.trade.service.WalletLogService;
|
||||
import cn.lili.mybatis.util.PageUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -21,7 +21,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* 买家端,预存款变动日志记录接口
|
||||
*
|
||||
* @author pikachu
|
||||
* @date: 2020/11/16 10:07 下午
|
||||
* @since 2020/11/16 10:07 下午
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,预存款变动日志记录接口")
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package cn.lili.security;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.lili.common.cache.Cache;
|
||||
import cn.lili.common.cache.CachePrefix;
|
||||
import cn.lili.cache.Cache;
|
||||
import cn.lili.cache.CachePrefix;
|
||||
import cn.lili.common.security.AuthUser;
|
||||
import cn.lili.common.security.enums.SecurityEnum;
|
||||
import cn.lili.common.security.enums.UserEnums;
|
||||
import cn.lili.common.token.SecretKeyUtil;
|
||||
import cn.lili.common.security.token.SecretKeyUtil;
|
||||
import cn.lili.common.utils.ResponseUtil;
|
||||
import com.google.gson.Gson;
|
||||
import io.jsonwebtoken.Claims;
|
||||
@@ -35,8 +35,7 @@ import java.util.List;
|
||||
*
|
||||
* @author Chopper
|
||||
* @version v4.1
|
||||
* @date 2020/11/17 3:37 下午
|
||||
* @Description:
|
||||
* @since 2020/11/17 3:37 下午
|
||||
* @since
|
||||
*/
|
||||
@Slf4j
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package cn.lili.security;
|
||||
|
||||
import cn.lili.common.cache.Cache;
|
||||
import cn.lili.cache.Cache;
|
||||
import cn.lili.common.security.CustomAccessDeniedHandler;
|
||||
import cn.lili.common.utils.SpringContextUtil;
|
||||
import cn.lili.config.properties.IgnoredUrlsProperties;
|
||||
import cn.lili.common.properties.IgnoredUrlsProperties;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@@ -19,7 +19,6 @@ import org.springframework.web.cors.CorsConfigurationSource;
|
||||
*
|
||||
* @author Chopper
|
||||
* @version v4.0
|
||||
* @Description:
|
||||
* @since 2020/11/14 16:20
|
||||
*/
|
||||
|
||||
|
||||
@@ -34,11 +34,6 @@ spring:
|
||||
max-request-size: 20MB
|
||||
cache:
|
||||
type: redis
|
||||
#JPA
|
||||
jpa:
|
||||
# 自动生成表结构
|
||||
generate-ddl: true
|
||||
open-in-view: false
|
||||
#jackson json解析
|
||||
jackson:
|
||||
time-zone: GMT+8
|
||||
@@ -118,9 +113,9 @@ spring:
|
||||
# standard:
|
||||
# sharding-column: create_time
|
||||
# #分表策略
|
||||
# precise-algorithm-class-name: cn.lili.config.sharding.CreateTimeShardingTableAlgorithm
|
||||
# precise-algorithm-class-name: cn.lili.mybatis.sharding.CreateTimeShardingTableAlgorithm
|
||||
# #范围查询实现
|
||||
# range-algorithm-class-name: cn.lili.config.sharding.CreateTimeShardingTableAlgorithm
|
||||
# range-algorithm-class-name: cn.lili.mybatis.sharding.CreateTimeShardingTableAlgorithm
|
||||
props:
|
||||
#是否打印逻辑SQL语句和实际SQL语句,建议调试时打印,在生产环境关闭
|
||||
sql:
|
||||
@@ -141,7 +136,9 @@ ignored:
|
||||
- /buyer/article/**
|
||||
- /buyer/goods/**
|
||||
- /buyer/category/**
|
||||
- /buyer/store/**
|
||||
- /buyer/store
|
||||
- /buyer/store/get**
|
||||
- /buyer/store/label/get**
|
||||
- /buyer/connect/**
|
||||
- /buyer/members/**
|
||||
- /buyer/promotion/pintuan/**
|
||||
@@ -156,14 +153,10 @@ ignored:
|
||||
- /doc.html
|
||||
- /swagger-resources/**
|
||||
- /swagger/**
|
||||
- /**/**.js
|
||||
- /**/**.png
|
||||
- /**/**.css
|
||||
- /webjars/**
|
||||
- /v2/api-docs
|
||||
- /configuration/ui
|
||||
- /boot-admin
|
||||
statics:
|
||||
- /**/*.js
|
||||
- /**/*.css
|
||||
- /**/*.png
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
___ ___ ___ ___ ________ ________ _______ ________ _____ ______ ___ __ ________ ________ ___ __
|
||||
|\ \ |\ \|\ \ |\ \ |\ _____\\ __ \|\ ___ \ |\ __ \|\ _ \ _ \|\ \ |\ \|\ __ \|\ __ \|\ \|\ \
|
||||
\ \ \ \ \ \ \ \ \ \ \ ____________\ \ \__/\ \ \|\ \ \ __/|\ \ \|\ \ \ \\\__\ \ \ \ \ \ \ \ \ \|\ \ \ \|\ \ \ \/ /|_
|
||||
\ \ \ \ \ \ \ \ \ \ \|\____________\ \ __\\ \ _ _\ \ \_|/_\ \ __ \ \ \\|__| \ \ \ \ __\ \ \ \ \\\ \ \ _ _\ \ ___ \
|
||||
\ \ \____\ \ \ \ \____\ \ \|____________|\ \ \_| \ \ \\ \\ \ \_|\ \ \ \ \ \ \ \ \ \ \ \ \|\__\_\ \ \ \\\ \ \ \\ \\ \ \\ \ \
|
||||
\ \_______\ \__\ \_______\ \__\ \ \__\ \ \__\\ _\\ \_______\ \__\ \__\ \__\ \ \__\ \____________\ \_______\ \__\\ _\\ \__\\ \__\
|
||||
\|_______|\|__|\|_______|\|__| \|__| \|__|\|__|\|_______|\|__|\|__|\|__| \|__|\|____________|\|_______|\|__|\|__|\|__| \|__|
|
||||
|
||||
|
||||
|
||||
___ ___ ___ ___ ________ ___ ___ ________ ________
|
||||
|\ \ |\ \|\ \ |\ \ |\ ____\|\ \|\ \|\ __ \|\ __ \
|
||||
\ \ \ \ \ \ \ \ \ \ \ ____________\ \ \___|\ \ \\\ \ \ \|\ \ \ \|\ \
|
||||
\ \ \ \ \ \ \ \ \ \ \|\____________\ \_____ \ \ __ \ \ \\\ \ \ ____\
|
||||
\ \ \____\ \ \ \ \____\ \ \|____________|\|____|\ \ \ \ \ \ \ \\\ \ \ \___|
|
||||
\ \_______\ \__\ \_______\ \__\ ____\_\ \ \__\ \__\ \_______\ \__\
|
||||
\|_______|\|__|\|_______|\|__| |\_________\|__|\|__|\|_______|\|__|
|
||||
\|_________|
|
||||
|
||||
@@ -10,10 +10,10 @@ import cn.lili.modules.order.cart.service.CartService;
|
||||
import cn.lili.modules.payment.service.PaymentService;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
import org.springframework.test.context.junit.jupiter.SpringExtension;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.util.List;
|
||||
* @author paulG
|
||||
* @since 2020/11/14
|
||||
**/
|
||||
@RunWith(SpringRunner.class)
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@SpringBootTest
|
||||
class CartTest {
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@ import cn.lili.modules.goods.service.BrandService;
|
||||
import com.xkcoding.http.util.StringUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
import org.springframework.test.context.junit.jupiter.SpringExtension;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.URL;
|
||||
@@ -21,7 +21,7 @@ import java.util.List;
|
||||
* @since 2020/11/14
|
||||
**/
|
||||
@Slf4j
|
||||
@RunWith(SpringRunner.class)
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@SpringBootTest
|
||||
class FileTest {
|
||||
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
package cn.lili.buyer.test.cart;
|
||||
|
||||
import cn.lili.modules.promotion.service.MemberCouponService;
|
||||
import org.junit.Assert;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
import org.springframework.test.context.junit.jupiter.SpringExtension;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
/**
|
||||
* @author paulG
|
||||
* @since 2020/11/27
|
||||
**/
|
||||
@RunWith(SpringRunner.class)
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@SpringBootTest
|
||||
class MemberCouponTest {
|
||||
|
||||
@@ -22,7 +23,7 @@ class MemberCouponTest {
|
||||
@Test
|
||||
void receiveCoupon() {
|
||||
memberCouponService.receiveCoupon("1333318596239843328", "1326834797335306240", "1");
|
||||
Assert.assertTrue(true);
|
||||
assertTrue(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -40,10 +40,6 @@ spring:
|
||||
#amqp
|
||||
# rabbitmq:
|
||||
# host: 192.168.0.116
|
||||
jpa:
|
||||
# 自动生成表结构
|
||||
generate-ddl: true
|
||||
open-in-view: false
|
||||
# Redis
|
||||
redis:
|
||||
host: 192.168.0.116
|
||||
@@ -115,9 +111,9 @@ spring:
|
||||
# standard:
|
||||
# sharding-column: create_time
|
||||
# #分表策略
|
||||
# precise-algorithm-class-name: cn.lili.config.sharding.CreateTimeShardingTableAlgorithm
|
||||
# precise-algorithm-class-name: cn.lili.mybatis.sharding.CreateTimeShardingTableAlgorithm
|
||||
# #范围查询实现
|
||||
# range-algorithm-class-name: cn.lili.config.sharding.CreateTimeShardingTableAlgorithm
|
||||
# range-algorithm-class-name: cn.lili.mybatis.sharding.CreateTimeShardingTableAlgorithm
|
||||
props:
|
||||
#是否打印逻辑SQL语句和实际SQL语句,建议调试时打印,在生产环境关闭
|
||||
sql:
|
||||
@@ -154,14 +150,10 @@ ignored:
|
||||
- /doc.html
|
||||
- /swagger-resources/**
|
||||
- /swagger/**
|
||||
- /**/**.js
|
||||
- /**/**.png
|
||||
- /**/**.css
|
||||
- /webjars/**
|
||||
- /v2/api-docs
|
||||
- /configuration/ui
|
||||
- /boot-admin
|
||||
statics:
|
||||
- /**/*.js
|
||||
- /**/*.css
|
||||
- /**/*.png
|
||||
|
||||
@@ -7,17 +7,17 @@
|
||||
<parent>
|
||||
<groupId>cn.lili</groupId>
|
||||
<artifactId>lili-shop-parent</artifactId>
|
||||
<version>4.2.0</version>
|
||||
<version>${revision}</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<groupId>cn.lili</groupId>
|
||||
<artifactId>common-api</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>cn.lili</groupId>
|
||||
<artifactId>framework</artifactId>
|
||||
<version>4.2.0</version>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.springframework.cache.annotation.EnableCaching;
|
||||
* 基础API
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020/11/17 3:38 下午
|
||||
* @since 2020/11/17 3:38 下午
|
||||
*/
|
||||
@EnableCaching
|
||||
@SpringBootApplication
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package cn.lili.controller.common;
|
||||
|
||||
import cn.lili.common.cache.Cache;
|
||||
import cn.lili.cache.Cache;
|
||||
import cn.lili.common.enums.ResultCode;
|
||||
import cn.lili.common.exception.ServiceException;
|
||||
import cn.lili.common.security.AuthUser;
|
||||
@@ -27,7 +27,7 @@ import java.util.List;
|
||||
* 文件管理管理接口
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020/11/26 15:41
|
||||
* @since 2020/11/26 15:41
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "文件管理管理接口")
|
||||
@@ -81,6 +81,7 @@ public class FileController {
|
||||
if (file.getUserEnums().equals(authUser.getRole().name())) {
|
||||
break;
|
||||
}
|
||||
default:
|
||||
throw new ServiceException(ResultCode.USER_AUTHORITY_ERROR);
|
||||
}
|
||||
fileService.updateById(file);
|
||||
|
||||
@@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* 文件管理管理接口
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020/11/26 15:41
|
||||
* @since 2020/11/26 15:41
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "文件管理管理接口")
|
||||
|
||||
@@ -2,7 +2,7 @@ package cn.lili.controller.common;
|
||||
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.base.service.RegionService;
|
||||
import cn.lili.modules.system.service.RegionService;
|
||||
import cn.lili.modules.system.entity.dos.Region;
|
||||
import cn.lili.modules.system.entity.vo.RegionVO;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -19,7 +19,6 @@ import java.util.List;
|
||||
* 地址信息接口
|
||||
*
|
||||
* @author Chopper
|
||||
* @date: 2020/11/16 10:07 下午
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "地址信息接口")
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package cn.lili.controller.common;
|
||||
|
||||
import cn.lili.common.aop.limiter.annotation.LimitPoint;
|
||||
import cn.lili.cache.limit.annotation.LimitPoint;
|
||||
import cn.lili.common.enums.ResultCode;
|
||||
import cn.lili.common.exception.ServiceException;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.verification.enums.VerificationEnums;
|
||||
import cn.lili.common.verification.service.VerificationService;
|
||||
import cn.lili.modules.verification.enums.VerificationEnums;
|
||||
import cn.lili.modules.verification.service.VerificationService;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
* 滑块验证码接口
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020/11/26 15:41
|
||||
* @since 2020/11/26 15:41
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@@ -28,10 +28,9 @@ public class SliderImageController {
|
||||
@Autowired
|
||||
private VerificationService verificationService;
|
||||
|
||||
//一分钟同一个ip请求10次
|
||||
@LimitPoint(name = "slider_image", key = "verification")
|
||||
@GetMapping("/{verificationEnums}")
|
||||
@ApiOperation(value = "获取校验接口")
|
||||
@ApiOperation(value = "获取校验接口,一分钟同一个ip请求10次")
|
||||
public ResultMessage getSliderImage(@RequestHeader String uuid, @PathVariable VerificationEnums verificationEnums) {
|
||||
try {
|
||||
return ResultUtil.data(verificationService.createVerification(verificationEnums, uuid));
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package cn.lili.controller.common;
|
||||
|
||||
import cn.lili.common.aop.limiter.annotation.LimitPoint;
|
||||
import cn.lili.cache.limit.annotation.LimitPoint;
|
||||
import cn.lili.common.enums.ResultCode;
|
||||
import cn.lili.common.exception.ServiceException;
|
||||
import cn.lili.common.sms.SmsUtil;
|
||||
import cn.lili.modules.system.sms.SmsUtil;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.verification.enums.VerificationEnums;
|
||||
import cn.lili.common.verification.service.VerificationService;
|
||||
import cn.lili.modules.verification.enums.VerificationEnums;
|
||||
import cn.lili.modules.verification.service.VerificationService;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
@@ -19,7 +19,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
* 短信验证码接口
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020/11/26 15:41
|
||||
* @since 2020/11/26 15:41
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "短信验证码接口")
|
||||
@@ -31,14 +31,13 @@ public class SmsController {
|
||||
@Autowired
|
||||
private VerificationService verificationService;
|
||||
|
||||
//一分钟同一个ip请求1次
|
||||
@LimitPoint(name = "sms_send", key = "sms")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(paramType = "path", dataType = "String", name = "mobile", value = "手机号"),
|
||||
@ApiImplicitParam(paramType = "header", dataType = "String", name = "uuid", value = "uuid"),
|
||||
})
|
||||
@GetMapping("/{verificationEnums}/{mobile}")
|
||||
@ApiOperation(value = "发送短信验证码")
|
||||
@ApiOperation(value = "发送短信验证码,一分钟同一个ip请求1次")
|
||||
public ResultMessage getSmsCode(
|
||||
@RequestHeader String uuid,
|
||||
@PathVariable String mobile,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package cn.lili.controller.common;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.lili.common.cache.Cache;
|
||||
import cn.lili.cache.Cache;
|
||||
import cn.lili.common.enums.ResultCode;
|
||||
import cn.lili.common.exception.ServiceException;
|
||||
import cn.lili.common.security.AuthUser;
|
||||
@@ -12,7 +12,7 @@ import cn.lili.common.utils.CommonUtil;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.utils.StringUtils;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.config.properties.SystemSetting;
|
||||
import cn.lili.common.properties.SystemSettingProperties;
|
||||
import cn.lili.modules.file.entity.File;
|
||||
import cn.lili.modules.file.plugin.FileManagerPlugin;
|
||||
import cn.lili.modules.file.service.FileService;
|
||||
@@ -35,7 +35,7 @@ import java.io.InputStream;
|
||||
* 文件上传接口
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020/11/26 15:41
|
||||
* @since 2020/11/26 15:41
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@@ -53,7 +53,7 @@ public class UploadController {
|
||||
private Cache cache;
|
||||
|
||||
@Autowired
|
||||
private SystemSetting systemSetting;
|
||||
private SystemSettingProperties systemSettingProperties;
|
||||
|
||||
@ApiOperation(value = "文件上传")
|
||||
@PostMapping(value = "/file")
|
||||
@@ -100,15 +100,8 @@ public class UploadController {
|
||||
fileService.save(newFile);
|
||||
} catch (Exception e) {
|
||||
log.error("文件上传失败", e);
|
||||
throw new ServiceException(ResultCode.OSS_EXCEPTION);
|
||||
throw new ServiceException(ResultCode.OSS_EXCEPTION_ERROR);
|
||||
}
|
||||
return ResultUtil.data(result);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "返回licences")
|
||||
@PostMapping(value = "/licences")
|
||||
public ResultMessage<Object> licences() {
|
||||
return ResultUtil.data(systemSetting.getLicences());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package cn.lili.controller.security;
|
||||
|
||||
import cn.lili.common.cache.Cache;
|
||||
import cn.lili.cache.Cache;
|
||||
import cn.lili.common.security.CustomAccessDeniedHandler;
|
||||
import cn.lili.config.properties.IgnoredUrlsProperties;
|
||||
import cn.lili.common.properties.IgnoredUrlsProperties;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@@ -17,7 +17,6 @@ import org.springframework.web.cors.CorsConfigurationSource;
|
||||
*
|
||||
* @author Chopper
|
||||
* @version v4.0
|
||||
* @Description:
|
||||
* @since 2020/11/14 16:20
|
||||
*/
|
||||
@Slf4j
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"properties": [
|
||||
{
|
||||
"name": "spring.http.multipart.location",
|
||||
"type": "java.lang.String",
|
||||
"description": "Description for spring.http.multipart.location."
|
||||
}
|
||||
] }
|
||||
@@ -39,11 +39,6 @@ spring:
|
||||
# replica-set-name: mongoreplset
|
||||
cache:
|
||||
type: redis
|
||||
|
||||
jpa:
|
||||
# 自动生成表结构
|
||||
generate-ddl: true
|
||||
open-in-view: false
|
||||
# Redis
|
||||
redis:
|
||||
host: 127.0.0.1
|
||||
@@ -115,9 +110,9 @@ spring:
|
||||
# standard:
|
||||
# sharding-column: create_time
|
||||
# #分表策略
|
||||
# precise-algorithm-class-name: cn.lili.config.sharding.CreateTimeShardingTableAlgorithm
|
||||
# precise-algorithm-class-name: cn.lili.mybatis.sharding.CreateTimeShardingTableAlgorithm
|
||||
# #范围查询实现
|
||||
# range-algorithm-class-name: cn.lili.config.sharding.CreateTimeShardingTableAlgorithm
|
||||
# range-algorithm-class-name: cn.lili.mybatis.sharding.CreateTimeShardingTableAlgorithm
|
||||
props:
|
||||
#是否打印逻辑SQL语句和实际SQL语句,建议调试时打印,在生产环境关闭
|
||||
sql:
|
||||
@@ -155,14 +150,10 @@ ignored:
|
||||
- /doc.html
|
||||
- /swagger-resources/**
|
||||
- /swagger/**
|
||||
- /**/**.js
|
||||
- /**/**.png
|
||||
- /**/**.css
|
||||
- /webjars/**
|
||||
- /v2/api-docs
|
||||
- /configuration/ui
|
||||
- /boot-admin
|
||||
statics:
|
||||
- /**/*.js
|
||||
- /**/*.css
|
||||
- /**/*.png
|
||||
@@ -209,6 +200,16 @@ jasypt:
|
||||
password: lili
|
||||
|
||||
lili:
|
||||
#验证码设置
|
||||
verification-code:
|
||||
#图形验证码有效时间 秒 包含滑块验证码有效时间, 以及验证通过之后,缓存中存储的验证结果有效时间
|
||||
effectiveTime: 300
|
||||
#水印
|
||||
watermark: LILI-SHOP
|
||||
#干扰项数量 最大2 默认0
|
||||
interfereNum: 0
|
||||
#允许误差像素
|
||||
faultTolerant: 3
|
||||
#短信模版配置
|
||||
sms:
|
||||
#登录
|
||||
|
||||
@@ -37,13 +37,6 @@ spring:
|
||||
# replica-set-name: mongoreplset
|
||||
cache:
|
||||
type: redis
|
||||
#amqp
|
||||
# rabbitmq:
|
||||
# host: 192.168.0.116
|
||||
jpa:
|
||||
# 自动生成表结构
|
||||
generate-ddl: true
|
||||
open-in-view: false
|
||||
# Redis
|
||||
redis:
|
||||
host: 192.168.0.116
|
||||
@@ -115,13 +108,13 @@ spring:
|
||||
# standard:
|
||||
# sharding-column: create_time
|
||||
# #分表策略
|
||||
# precise-algorithm-class-name: cn.lili.config.sharding.CreateTimeShardingTableAlgorithm
|
||||
# precise-algorithm-class-name: cn.lili.mybatis.sharding.CreateTimeShardingTableAlgorithm
|
||||
# #范围查询实现
|
||||
# range-algorithm-class-name: cn.lili.config.sharding.CreateTimeShardingTableAlgorithm
|
||||
# range-algorithm-class-name: cn.lili.mybatis.sharding.CreateTimeShardingTableAlgorithm
|
||||
props:
|
||||
#是否打印逻辑SQL语句和实际SQL语句,建议调试时打印,在生产环境关闭
|
||||
sql:
|
||||
show: false
|
||||
show: true
|
||||
|
||||
# 忽略鉴权url
|
||||
ignored:
|
||||
@@ -144,6 +137,7 @@ ignored:
|
||||
- /buyer/promotion/pintuan/**
|
||||
- /buyer/promotion/seckill/**
|
||||
- /buyer/promotion/pointsGoods/**
|
||||
- /buyer/promotion/coupon
|
||||
- /buyer/memberEvaluation/**/goodsEvaluation
|
||||
- /buyer/memberEvaluation/**/evaluationNumber
|
||||
- /buyer/appVersion/**
|
||||
@@ -156,14 +150,11 @@ ignored:
|
||||
- /doc.html
|
||||
- /swagger-resources/**
|
||||
- /swagger/**
|
||||
- /**/**.js
|
||||
- /**/**.png
|
||||
- /**/**.css
|
||||
- /webjars/**
|
||||
- /v2/api-docs
|
||||
- /configuration/ui
|
||||
- /boot-admin
|
||||
statics:
|
||||
- /manager/promotion/seckill/init
|
||||
- /**/*.js
|
||||
- /**/*.css
|
||||
- /**/*.png
|
||||
@@ -194,9 +185,9 @@ logging:
|
||||
# 输出级别
|
||||
level:
|
||||
cn.lili: info
|
||||
org.hibernate: debug
|
||||
org.springframework: debug
|
||||
org.springframework.data.mongodb.core: debug
|
||||
# org.hibernate: debug
|
||||
# org.springframework: debug
|
||||
# org.springframework.data.mongodb.core: debug
|
||||
file:
|
||||
# 指定路径
|
||||
path: lili-logs
|
||||
@@ -209,7 +200,18 @@ jasypt:
|
||||
encryptor:
|
||||
password: lili
|
||||
|
||||
|
||||
lili:
|
||||
#验证码设置
|
||||
verification-code:
|
||||
#图形验证码有效时间 秒 包含滑块验证码有效时间, 以及验证通过之后,缓存中存储的验证结果有效时间
|
||||
effectiveTime: 300
|
||||
#水印
|
||||
watermark: LILI-SHOP
|
||||
#干扰项数量 最大2 默认0
|
||||
interfereNum: 1
|
||||
#允许误差像素
|
||||
faultTolerant: 3
|
||||
#短信模版配置
|
||||
sms:
|
||||
#登录
|
||||
@@ -225,6 +227,12 @@ lili:
|
||||
system:
|
||||
isDemoSite: false
|
||||
isTestModel: true
|
||||
# 脱敏级别:
|
||||
# 0:不做脱敏处理
|
||||
# 1:管理端用户手机号等信息脱敏
|
||||
# 2:商家端信息脱敏(为2时,表示管理端,商家端同时脱敏)
|
||||
# sensitiveLevel: 2
|
||||
|
||||
statistics:
|
||||
# 在线人数统计 X 小时。这里设置48,即统计过去48小时每小时在线人数
|
||||
onlineMember: 48
|
||||
@@ -295,6 +303,8 @@ lili:
|
||||
notice-send-group: lili_send_notice_group
|
||||
rocketmq:
|
||||
name-server: 192.168.0.116:9876
|
||||
namesrvAddr: 192.168.0.116:9876
|
||||
isVIPChannel: false
|
||||
producer:
|
||||
group: lili_group
|
||||
send-message-timeout: 30000
|
||||
|
||||
@@ -8,20 +8,21 @@
|
||||
<parent>
|
||||
<groupId>cn.lili</groupId>
|
||||
<artifactId>lili-shop-parent</artifactId>
|
||||
<version>4.2.0</version>
|
||||
<version>${revision}</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>cn.lili</groupId>
|
||||
<artifactId>framework</artifactId>
|
||||
<version>4.2.0</version>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.xuxueli</groupId>
|
||||
<artifactId>xxl-job-core</artifactId>
|
||||
<version>2.2.0</version>
|
||||
<version>${xxl-job}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
* 消费者
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020/11/16 10:03 下午
|
||||
* @since 2020/11/16 10:03 下午
|
||||
*/
|
||||
@SpringBootApplication
|
||||
public class ConsumerApplication {
|
||||
|
||||
@@ -7,7 +7,7 @@ import cn.lili.modules.order.order.entity.dos.AfterSale;
|
||||
* 售后单改变状态
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020/11/17 7:13 下午
|
||||
* @since 2020/11/17 7:13 下午
|
||||
*/
|
||||
public interface AfterSaleStatusChangeEvent {
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import cn.lili.modules.member.entity.dos.MemberEvaluation;
|
||||
* 订单状态改变事件
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020/11/17 7:13 下午
|
||||
* @since 2020/11/17 7:13 下午
|
||||
*/
|
||||
public interface GoodsCommentCompleteEvent {
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import cn.lili.modules.member.entity.dto.MemberPointMessage;
|
||||
* 会员积分改变消息
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020/11/17 7:13 下午
|
||||
* @since 2020/11/17 7:13 下午
|
||||
*/
|
||||
public interface MemberPointChangeEvent {
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import cn.lili.modules.member.entity.dos.Member;
|
||||
* 会员注册消息
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020/11/17 7:13 下午
|
||||
* @since 2020/11/17 7:13 下午
|
||||
*/
|
||||
public interface MemberRegisterEvent {
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import cn.lili.modules.member.entity.dto.MemberWithdrawalMessage;
|
||||
* 会员提现消息
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020/11/17 7:13 下午
|
||||
* @since 2020/11/17 7:13 下午
|
||||
*/
|
||||
public interface MemberWithdrawalEvent {
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import cn.lili.modules.order.order.entity.dto.OrderMessage;
|
||||
* 订单状态改变事件
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020/11/17 7:13 下午
|
||||
* @since 2020/11/17 7:13 下午
|
||||
*/
|
||||
public interface OrderStatusChangeEvent {
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import cn.lili.modules.order.cart.entity.dto.TradeDTO;
|
||||
* 订单创建消息
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2021/2/2 15:15
|
||||
* @since 2021/2/2 15:15
|
||||
*/
|
||||
public interface TradeEvent {
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import cn.lili.modules.order.order.entity.dto.OrderMessage;
|
||||
import cn.lili.modules.order.trade.entity.enums.AfterSaleStatusEnum;
|
||||
import cn.lili.timetask.handler.EveryDayExecute;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -21,15 +22,20 @@ import javax.annotation.Resource;
|
||||
* 分销订单入库
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020-07-03 11:20
|
||||
* @since 2020-07-03 11:20
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class DistributionOrderExecute implements OrderStatusChangeEvent, EveryDayExecute, AfterSaleStatusChangeEvent {
|
||||
|
||||
//分销订单
|
||||
/**
|
||||
* 分销订单
|
||||
*/
|
||||
@Autowired
|
||||
private DistributionOrderService distributionOrderService;
|
||||
//分销订单持久层
|
||||
/**
|
||||
* 分销订单持久层
|
||||
*/
|
||||
@Resource
|
||||
private DistributionOrderMapper distributionOrderMapper;
|
||||
|
||||
@@ -48,6 +54,9 @@ public class DistributionOrderExecute implements OrderStatusChangeEvent, EveryDa
|
||||
distributionOrderService.cancelOrder(orderMessage.getOrderSn());
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,6 +70,7 @@ public class DistributionOrderExecute implements OrderStatusChangeEvent, EveryDa
|
||||
.eq(DistributionOrder::getDistributionOrderStatus, DistributionOrderStatusEnum.WAIT_BILL.name())
|
||||
.le(DistributionOrder::getSettleCycle, new DateTime())
|
||||
.set(DistributionOrder::getDistributionOrderStatus, DistributionOrderStatusEnum.WAIT_CASH.name()));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,201 @@
|
||||
package cn.lili.event.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import cn.lili.cache.Cache;
|
||||
import cn.lili.cache.CachePrefix;
|
||||
import cn.lili.common.properties.RocketmqCustomProperties;
|
||||
import cn.lili.common.security.enums.UserEnums;
|
||||
import cn.lili.common.utils.SnowFlake;
|
||||
import cn.lili.event.OrderStatusChangeEvent;
|
||||
import cn.lili.event.TradeEvent;
|
||||
import cn.lili.modules.goods.entity.dos.GoodsSku;
|
||||
import cn.lili.modules.goods.service.GoodsSkuService;
|
||||
import cn.lili.modules.member.entity.enums.PointTypeEnum;
|
||||
import cn.lili.modules.member.service.MemberService;
|
||||
import cn.lili.modules.order.cart.entity.dto.TradeDTO;
|
||||
import cn.lili.modules.order.cart.entity.vo.CartVO;
|
||||
import cn.lili.modules.order.order.entity.dos.Order;
|
||||
import cn.lili.modules.order.order.entity.dos.OrderItem;
|
||||
import cn.lili.modules.order.order.entity.dto.OrderMessage;
|
||||
import cn.lili.modules.order.order.entity.dto.PriceDetailDTO;
|
||||
import cn.lili.modules.order.order.entity.enums.*;
|
||||
import cn.lili.modules.order.order.service.OrderItemService;
|
||||
import cn.lili.modules.order.order.service.OrderService;
|
||||
import cn.lili.modules.order.trade.entity.dos.OrderLog;
|
||||
import cn.lili.modules.order.trade.service.OrderLogService;
|
||||
import cn.lili.modules.promotion.service.MemberCouponService;
|
||||
import cn.lili.rocketmq.RocketmqSendCallbackBuilder;
|
||||
import cn.lili.rocketmq.tags.MqOrderTagsEnum;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.rocketmq.spring.core.RocketMQTemplate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单状态处理类
|
||||
*
|
||||
* @author Chopper
|
||||
* @since 2020-07-03 11:20
|
||||
**/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class FullDiscountExecute implements TradeEvent, OrderStatusChangeEvent {
|
||||
|
||||
|
||||
@Autowired
|
||||
private Cache cache;
|
||||
|
||||
|
||||
@Autowired
|
||||
private MemberService memberService;
|
||||
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
|
||||
@Autowired
|
||||
private OrderItemService orderItemService;
|
||||
|
||||
@Autowired
|
||||
private OrderLogService orderLogService;
|
||||
@Autowired
|
||||
private MemberCouponService memberCouponService;
|
||||
|
||||
@Autowired
|
||||
private GoodsSkuService goodsSkuService;
|
||||
|
||||
@Autowired
|
||||
private RocketmqCustomProperties rocketmqCustomProperties;
|
||||
|
||||
@Autowired
|
||||
private RocketMQTemplate rocketMQTemplate;
|
||||
|
||||
@Override
|
||||
public void orderCreate(TradeDTO tradeDTO) {
|
||||
|
||||
tradeDTO.getCartList().forEach(
|
||||
cartVO -> {
|
||||
//有满减优惠,则记录信息
|
||||
if (cartVO.getGiftList() != null && cartVO.getGiftList().size() > 0
|
||||
&& cartVO.getGiftPoint() != null && cartVO.getGiftPoint() > 0
|
||||
&& cartVO.getGiftCouponList() != null && cartVO.getGiftCouponList().size() > 0) {
|
||||
cache.put(CachePrefix.ORDER.getPrefix() + cartVO.getSn(), cartVO);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void orderChange(OrderMessage orderMessage) {
|
||||
System.out.println(CachePrefix.ORDER.getPrefix() + orderMessage.getOrderSn());
|
||||
if (orderMessage.getNewStatus().equals(OrderStatusEnum.PAID)) {
|
||||
renderGift((CartVO) cache.get(CachePrefix.ORDER.getPrefix() + orderMessage.getOrderSn()), orderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 渲染优惠券信息
|
||||
*/
|
||||
private void renderGift(CartVO cartVO, OrderMessage orderMessage) {
|
||||
//没有优惠信息则跳过
|
||||
if (cartVO == null) {
|
||||
return;
|
||||
}
|
||||
Order order = orderService.getBySn(orderMessage.getOrderSn());
|
||||
//赠送积分判定
|
||||
try {
|
||||
if (cartVO.getGiftPoint() != null && cartVO.getGiftPoint() > 0) {
|
||||
memberService.updateMemberPoint(cartVO.getGiftPoint().longValue(), PointTypeEnum.INCREASE.name(),
|
||||
order.getMemberId(), "订单满优惠赠送积分" + cartVO.getGiftPoint());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("订单赠送积分异常", e);
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
//优惠券判定
|
||||
if (cartVO.getGiftCouponList() != null && cartVO.getGiftCouponList().size() > 0) {
|
||||
cartVO.getGiftCouponList().forEach(couponId -> {
|
||||
memberCouponService.receiveCoupon(couponId, order.getMemberId(), order.getMemberName());
|
||||
});
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("订单赠送优惠券异常", e);
|
||||
}
|
||||
|
||||
try {
|
||||
//赠品潘迪ing
|
||||
if (cartVO.getGiftList() != null && cartVO.getGiftList().size() > 0) {
|
||||
generatorGiftOrder(cartVO.getGiftList(), order);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("订单赠送赠品异常", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成赠品订单
|
||||
*
|
||||
* @param skuIds 赠品sku信息
|
||||
* @param originOrder 赠品原订单信息
|
||||
*/
|
||||
private void generatorGiftOrder(List<String> skuIds, Order originOrder) {
|
||||
List<OrderItem> orderItems = new ArrayList<>();
|
||||
List<OrderLog> orderLogs = new ArrayList<>();
|
||||
Order order = new Order();
|
||||
PriceDetailDTO priceDetailDTO = new PriceDetailDTO();
|
||||
BeanUtil.copyProperties(originOrder, order, "id");
|
||||
BeanUtil.copyProperties(priceDetailDTO, order, "id");
|
||||
order.setSn(SnowFlake.createStr("G"));
|
||||
order.setOrderType(OrderPromotionTypeEnum.GIFT.name());
|
||||
order.setOrderStatus(OrderStatusEnum.UNPAID.name());
|
||||
order.setPayStatus(PayStatusEnum.PAID.name());
|
||||
order.setDeliverStatus(DeliverStatusEnum.UNDELIVERED.name());
|
||||
order.setNeedReceipt(false);
|
||||
order.setPriceDetailDTO(priceDetailDTO);
|
||||
order.setClientType(originOrder.getClientType());
|
||||
String message = "赠品订单[" + order.getSn() + "]创建";
|
||||
orderLogs.add(new OrderLog(order.getSn(), originOrder.getMemberId(), UserEnums.MEMBER.name(), originOrder.getMemberName(), message));
|
||||
|
||||
for (String skuId : skuIds) {
|
||||
GoodsSku goodsSkuByIdFromCache = goodsSkuService.getGoodsSkuByIdFromCache(skuId);
|
||||
OrderItem orderItem = new OrderItem();
|
||||
BeanUtil.copyProperties(goodsSkuByIdFromCache, orderItem, "id");
|
||||
BeanUtil.copyProperties(priceDetailDTO, orderItem, "id");
|
||||
orderItem.setAfterSaleStatus(OrderItemAfterSaleStatusEnum.NEW.name());
|
||||
orderItem.setCommentStatus(CommentStatusEnum.NEW.name());
|
||||
orderItem.setComplainStatus(OrderComplaintStatusEnum.NEW.name());
|
||||
orderItem.setNum(1);
|
||||
orderItem.setOrderSn(order.getSn());
|
||||
orderItem.setImage(goodsSkuByIdFromCache.getThumbnail());
|
||||
orderItem.setGoodsName(goodsSkuByIdFromCache.getGoodsName());
|
||||
orderItem.setSkuId(goodsSkuByIdFromCache.getId());
|
||||
orderItem.setCategoryId(goodsSkuByIdFromCache.getCategoryPath().substring(
|
||||
goodsSkuByIdFromCache.getCategoryPath().lastIndexOf(",") + 1
|
||||
));
|
||||
orderItem.setGoodsPrice(goodsSkuByIdFromCache.getPrice());
|
||||
orderItem.setPriceDetailDTO(priceDetailDTO);
|
||||
orderItems.add(orderItem);
|
||||
}
|
||||
orderService.save(order);
|
||||
orderItemService.saveBatch(orderItems);
|
||||
orderLogService.saveBatch(orderLogs);
|
||||
|
||||
|
||||
//发送订单已付款消息
|
||||
OrderMessage orderMessage = new OrderMessage();
|
||||
orderMessage.setOrderSn(order.getSn());
|
||||
orderMessage.setPaymentMethod(order.getPaymentMethod());
|
||||
orderMessage.setNewStatus(OrderStatusEnum.PAID);
|
||||
|
||||
String destination = rocketmqCustomProperties.getOrderTopic() + ":" + MqOrderTagsEnum.STATUS_CHANGE.name();
|
||||
//发送订单变更mq消息
|
||||
rocketMQTemplate.asyncSend(destination, JSONUtil.toJsonStr(orderMessage), RocketmqSendCallbackBuilder.commonCallback());
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -11,12 +11,14 @@ import org.springframework.stereotype.Service;
|
||||
* 商品SKU变化
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020-07-03 11:20
|
||||
* @since 2020-07-03 11:20
|
||||
*/
|
||||
@Service
|
||||
public class GoodsSkuExecute implements GoodsCommentCompleteEvent {
|
||||
public class GoodsSkuExecute implements GoodsCommentCompleteEvent {
|
||||
|
||||
//商品
|
||||
/**
|
||||
* 商品
|
||||
*/
|
||||
@Autowired
|
||||
private GoodsSkuService goodsSkuService;
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import cn.lili.event.MemberRegisterEvent;
|
||||
import cn.lili.event.OrderStatusChangeEvent;
|
||||
import cn.lili.modules.member.entity.dos.Member;
|
||||
import cn.lili.modules.member.entity.dos.MemberEvaluation;
|
||||
import cn.lili.modules.member.entity.enums.PointTypeEnum;
|
||||
import cn.lili.modules.member.service.MemberService;
|
||||
import cn.lili.modules.order.order.entity.dos.Order;
|
||||
import cn.lili.modules.order.order.entity.dto.OrderMessage;
|
||||
@@ -18,29 +19,35 @@ import cn.lili.modules.system.entity.enums.SettingEnum;
|
||||
import cn.lili.modules.system.service.SettingService;
|
||||
import com.google.gson.Gson;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 会员经验值
|
||||
*
|
||||
* @author Bulbasaur
|
||||
* @date: 2021/5/16 11:16 下午
|
||||
* @since 2021/5/16 11:16 下午
|
||||
*/
|
||||
@Service
|
||||
//@Service
|
||||
public class MemberExperienceExecute implements MemberRegisterEvent, GoodsCommentCompleteEvent, OrderStatusChangeEvent {
|
||||
|
||||
//配置
|
||||
/**
|
||||
* 配置
|
||||
*/
|
||||
@Autowired
|
||||
private SettingService settingService;
|
||||
//会员
|
||||
/**
|
||||
* 会员
|
||||
*/
|
||||
@Autowired
|
||||
private MemberService memberService;
|
||||
//订单
|
||||
/**
|
||||
* 订单
|
||||
*/
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
|
||||
/**
|
||||
* 会员注册赠送经验值
|
||||
*
|
||||
* @param member 会员
|
||||
*/
|
||||
@Override
|
||||
@@ -48,11 +55,12 @@ public class MemberExperienceExecute implements MemberRegisterEvent, GoodsCommen
|
||||
//获取经验值设置
|
||||
ExperienceSetting experienceSetting = getExperienceSetting();
|
||||
//赠送会员经验值
|
||||
memberService.updateMemberExperience(Long.valueOf(experienceSetting.getRegister().longValue()), true, member.getId(), "会员注册,赠送经验值" + experienceSetting.getRegister());
|
||||
memberService.updateMemberPoint(Long.valueOf(experienceSetting.getRegister().longValue()), PointTypeEnum.INCREASE.name(), member.getId(), "会员注册,赠送经验值" + experienceSetting.getRegister());
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品评价赠送经验值
|
||||
*
|
||||
* @param memberEvaluation 会员评价
|
||||
*/
|
||||
@Override
|
||||
@@ -60,32 +68,34 @@ public class MemberExperienceExecute implements MemberRegisterEvent, GoodsCommen
|
||||
//获取经验值设置
|
||||
ExperienceSetting experienceSetting = getExperienceSetting();
|
||||
//赠送会员经验值
|
||||
memberService.updateMemberExperience(Long.valueOf(experienceSetting.getComment().longValue()), true, memberEvaluation.getMemberId(), "会员评价,赠送经验值" + experienceSetting.getComment());
|
||||
memberService.updateMemberPoint(Long.valueOf(experienceSetting.getComment().longValue()), PointTypeEnum.INCREASE.name(), memberEvaluation.getMemberId(), "会员评价,赠送经验值" + experienceSetting.getComment());
|
||||
}
|
||||
|
||||
/**
|
||||
* 完成订单赠送经验值
|
||||
*
|
||||
* @param orderMessage 订单消息
|
||||
*/
|
||||
@Override
|
||||
public void orderChange(OrderMessage orderMessage) {
|
||||
if(orderMessage.getNewStatus().equals(OrderStatusEnum.COMPLETED)){
|
||||
if (orderMessage.getNewStatus().equals(OrderStatusEnum.COMPLETED)) {
|
||||
//获取经验值设置
|
||||
ExperienceSetting experienceSetting = getExperienceSetting();
|
||||
//获取订单信息
|
||||
Order order = orderService.getBySn(orderMessage.getOrderSn());
|
||||
//计算赠送经验值数量
|
||||
Double point= CurrencyUtil.mul(experienceSetting.getMoney(),order.getFlowPrice(),0);
|
||||
Double point = CurrencyUtil.mul(experienceSetting.getMoney(), order.getFlowPrice(), 0);
|
||||
//赠送会员经验值
|
||||
memberService.updateMemberExperience(point.longValue(), true, order.getMemberId(), "会员下单,赠送经验值" + point + "分");
|
||||
memberService.updateMemberPoint(point.longValue(), PointTypeEnum.INCREASE.name(), order.getMemberId(), "会员下单,赠送经验值" + point + "分");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取经验值设置
|
||||
*
|
||||
* @return 经验值设置
|
||||
*/
|
||||
private ExperienceSetting getExperienceSetting(){
|
||||
private ExperienceSetting getExperienceSetting() {
|
||||
Setting setting = settingService.get(SettingEnum.EXPERIENCE_SETTING.name());
|
||||
return new Gson().fromJson(setting.getSettingValue(), ExperienceSetting.class);
|
||||
}
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
package cn.lili.event.impl;
|
||||
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.lili.common.utils.CurrencyUtil;
|
||||
import cn.lili.common.utils.StringUtils;
|
||||
import cn.lili.event.AfterSaleStatusChangeEvent;
|
||||
import cn.lili.event.GoodsCommentCompleteEvent;
|
||||
import cn.lili.event.MemberRegisterEvent;
|
||||
import cn.lili.event.OrderStatusChangeEvent;
|
||||
import cn.lili.modules.member.entity.dos.Member;
|
||||
import cn.lili.modules.member.entity.dos.MemberEvaluation;
|
||||
import cn.lili.modules.member.entity.enums.PointTypeEnum;
|
||||
import cn.lili.modules.member.service.MemberService;
|
||||
import cn.lili.modules.order.order.entity.dos.AfterSale;
|
||||
import cn.lili.modules.order.order.entity.dos.Order;
|
||||
@@ -28,90 +31,109 @@ import org.springframework.stereotype.Service;
|
||||
* 会员积分
|
||||
*
|
||||
* @author Bulbasaur
|
||||
* @date 2020-07-03 11:20
|
||||
* @since 2020-07-03 11:20
|
||||
*/
|
||||
@Service
|
||||
public class MemberPointExecute implements MemberRegisterEvent, GoodsCommentCompleteEvent, OrderStatusChangeEvent, AfterSaleStatusChangeEvent {
|
||||
|
||||
//配置
|
||||
/**
|
||||
* 配置
|
||||
*/
|
||||
@Autowired
|
||||
private SettingService settingService;
|
||||
//会员
|
||||
/**
|
||||
* 会员
|
||||
*/
|
||||
@Autowired
|
||||
private MemberService memberService;
|
||||
//订单
|
||||
/**
|
||||
* 订单
|
||||
*/
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
|
||||
/**
|
||||
* 会员注册赠送积分
|
||||
*
|
||||
* @param member 会员
|
||||
*/
|
||||
@Override
|
||||
public void memberRegister(Member member) {
|
||||
//获取积分设置
|
||||
PointSetting pointSetting=getPointSetting();
|
||||
PointSetting pointSetting = getPointSetting();
|
||||
//赠送会员积分
|
||||
memberService.updateMemberPoint(Long.valueOf(pointSetting.getRegister().longValue()), true, member.getId(), "会员注册,赠送积分" + pointSetting.getRegister() + "分");
|
||||
memberService.updateMemberPoint(Long.valueOf(pointSetting.getRegister().longValue()), PointTypeEnum.INCREASE.name(), member.getId(), "会员注册,赠送积分" + pointSetting.getRegister() + "分");
|
||||
}
|
||||
|
||||
/**
|
||||
* 会员评价赠送积分
|
||||
*
|
||||
* @param memberEvaluation 会员评价
|
||||
*/
|
||||
@Override
|
||||
public void goodsComment(MemberEvaluation memberEvaluation) {
|
||||
//获取积分设置
|
||||
PointSetting pointSetting=getPointSetting();
|
||||
PointSetting pointSetting = getPointSetting();
|
||||
//赠送会员积分
|
||||
memberService.updateMemberPoint(Long.valueOf(pointSetting.getComment().longValue()), true, memberEvaluation.getMemberId(), "会员评价,赠送积分" + pointSetting.getComment() + "分");
|
||||
memberService.updateMemberPoint(Long.valueOf(pointSetting.getComment().longValue()), PointTypeEnum.INCREASE.name(), memberEvaluation.getMemberId(), "会员评价,赠送积分" + pointSetting.getComment() + "分");
|
||||
}
|
||||
|
||||
/**
|
||||
* 非积分订单订单完成后赠送积分
|
||||
*
|
||||
* @param orderMessage 订单消息
|
||||
*/
|
||||
@Override
|
||||
public void orderChange(OrderMessage orderMessage) {
|
||||
|
||||
if(orderMessage.getNewStatus().equals(OrderStatusEnum.COMPLETED)){
|
||||
//根据订单编号获取订单数据,如果为积分订单则跳回
|
||||
if (orderMessage.getNewStatus().equals(OrderStatusEnum.COMPLETED)) {
|
||||
Order order = orderService.getBySn(orderMessage.getOrderSn());
|
||||
if(order.getOrderPromotionType().equals(OrderPromotionTypeEnum.POINT.name())){
|
||||
//根据订单编号获取订单数据,如果订单促销类型不为空,并且订单促销类型为积分订单 则直接返回
|
||||
if (StringUtils.isNotEmpty(order.getOrderPromotionType()) && order.getOrderPromotionType().equals(OrderPromotionTypeEnum.POINTS.name())) {
|
||||
return;
|
||||
}
|
||||
//获取积分设置
|
||||
PointSetting pointSetting=getPointSetting();
|
||||
PointSetting pointSetting = getPointSetting();
|
||||
//计算赠送积分数量
|
||||
Double point=CurrencyUtil.mul(pointSetting.getMoney(),order.getFlowPrice(),0);
|
||||
Double point = CurrencyUtil.mul(pointSetting.getMoney(), order.getFlowPrice(), 0);
|
||||
//赠送会员积分
|
||||
memberService.updateMemberPoint(point.longValue(), true, order.getMemberId(), "会员下单,赠送积分" + point + "分");
|
||||
|
||||
memberService.updateMemberPoint(point.longValue(), PointTypeEnum.INCREASE.name(), order.getMemberId(), "会员下单,赠送积分" + point + "分");
|
||||
//取消订单恢复积分
|
||||
} else if (orderMessage.getNewStatus().equals(OrderStatusEnum.CANCELLED)) {
|
||||
//根据订单编号获取订单数据,如果为积分订单则跳回
|
||||
Order order = orderService.getBySn(orderMessage.getOrderSn());
|
||||
//增加对积分订单的判定,如果积分支付,取消订单则退还用户积分
|
||||
if (StringUtils.isNotEmpty(order.getOrderPromotionType()) &&
|
||||
order.getOrderPromotionType().equals(OrderPromotionTypeEnum.POINTS.name()) && order.getPriceDetailDTO().getPayPoint() != null) {
|
||||
memberService.updateMemberPoint(Convert.toLong(order.getPriceDetailDTO().getPayPoint()), PointTypeEnum.INCREASE.name(), order.getMemberId(), "订单取消,恢复积分:" + order.getPriceDetailDTO().getPayPoint() + "分");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交售后后扣除积分
|
||||
*
|
||||
* @param afterSale 售后
|
||||
*/
|
||||
@Override
|
||||
public void afterSaleStatusChange(AfterSale afterSale) {
|
||||
if (afterSale.getServiceStatus().equals(AfterSaleStatusEnum.COMPLETE.name())) {
|
||||
//获取积分设置
|
||||
PointSetting pointSetting=getPointSetting();
|
||||
PointSetting pointSetting = getPointSetting();
|
||||
//计算扣除积分数量
|
||||
Double point=CurrencyUtil.mul(pointSetting.getMoney(), afterSale.getActualRefundPrice(),0);
|
||||
Double point = CurrencyUtil.mul(pointSetting.getMoney(), afterSale.getActualRefundPrice(), 0);
|
||||
//扣除会员积分
|
||||
memberService.updateMemberPoint(point.longValue(), false, afterSale.getMemberId(), "会员退款,扣除积分" + point + "分");
|
||||
memberService.updateMemberPoint(point.longValue(), PointTypeEnum.REDUCE.name(), afterSale.getMemberId(), "会员退款,回退积分" + point + "分");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取积分设置
|
||||
*
|
||||
* @return 积分设置
|
||||
*/
|
||||
private PointSetting getPointSetting(){
|
||||
private PointSetting getPointSetting() {
|
||||
Setting setting = settingService.get(SettingEnum.POINT_SETTING.name());
|
||||
return new Gson().fromJson(setting.getSettingValue(), PointSetting.class);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import org.springframework.stereotype.Service;
|
||||
* 会员钱包创建
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020-07-03 11:20
|
||||
* @since 2020-07-03 11:20
|
||||
*/
|
||||
@Service
|
||||
public class MemberWalletExecute implements MemberRegisterEvent {
|
||||
|
||||
@@ -4,6 +4,8 @@ import cn.lili.event.*;
|
||||
import cn.lili.modules.member.entity.dto.MemberPointMessage;
|
||||
import cn.lili.modules.member.entity.dto.MemberWithdrawalMessage;
|
||||
import cn.lili.modules.member.entity.enums.MemberWithdrawalDestinationEnum;
|
||||
import cn.lili.modules.member.entity.enums.PointTypeEnum;
|
||||
import cn.lili.modules.member.entity.enums.WithdrawStatusEnum;
|
||||
import cn.lili.modules.message.entity.dto.NoticeMessageDTO;
|
||||
import cn.lili.modules.message.entity.enums.NoticeMessageNodeEnum;
|
||||
import cn.lili.modules.message.entity.enums.NoticeMessageParameterEnum;
|
||||
@@ -27,7 +29,7 @@ import java.util.Map;
|
||||
* 通知类消息实现
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020-07-03 11:20
|
||||
* @since 2020-07-03 11:20
|
||||
**/
|
||||
@Service
|
||||
public class NoticeMessageExecute implements TradeEvent, OrderStatusChangeEvent, AfterSaleStatusChangeEvent, MemberPointChangeEvent, MemberWithdrawalEvent {
|
||||
@@ -44,7 +46,7 @@ public class NoticeMessageExecute implements TradeEvent, OrderStatusChangeEvent,
|
||||
NoticeMessageDTO noticeMessageDTO = new NoticeMessageDTO();
|
||||
noticeMessageDTO.setMemberId(tradeDTO.getMemberId());
|
||||
noticeMessageDTO.setNoticeMessageNodeEnum(NoticeMessageNodeEnum.ORDER_CREATE_SUCCESS);
|
||||
Map<String, String> params = new HashMap<>();
|
||||
Map<String, String> params = new HashMap<>(2);
|
||||
params.put("goods", tradeDTO.getSkuList().get(0).getGoodsSku().getGoodsName());
|
||||
noticeMessageDTO.setParameter(params);
|
||||
//保存站内信
|
||||
@@ -58,7 +60,7 @@ public class NoticeMessageExecute implements TradeEvent, OrderStatusChangeEvent,
|
||||
NoticeMessageDTO noticeMessageDTO = new NoticeMessageDTO();
|
||||
//如果订单状态不为空
|
||||
if (orderDetailVO != null) {
|
||||
Map<String, String> params = new HashMap<>();
|
||||
Map<String, String> params = new HashMap<>(2);
|
||||
switch (orderMessage.getNewStatus()) {
|
||||
//如果订单新的状态为已取消 则发送取消订单站内信
|
||||
case CANCELLED:
|
||||
@@ -94,8 +96,12 @@ public class NoticeMessageExecute implements TradeEvent, OrderStatusChangeEvent,
|
||||
//添加站内信参数
|
||||
params.put(NoticeMessageParameterEnum.GOODS.getType(), orderDetailVO.getOrderItems().get(0).getGoodsName());
|
||||
noticeMessageDTO.setParameter(params);
|
||||
//保存站内信
|
||||
noticeMessageService.noticeMessage(noticeMessageDTO);
|
||||
|
||||
//如果有消息,则发送消息
|
||||
if (noticeMessageDTO.getNoticeMessageNodeEnum() != null) {
|
||||
//保存站内信
|
||||
noticeMessageService.noticeMessage(noticeMessageDTO);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,7 +109,7 @@ public class NoticeMessageExecute implements TradeEvent, OrderStatusChangeEvent,
|
||||
public void afterSaleStatusChange(AfterSale afterSale) {
|
||||
NoticeMessageDTO noticeMessageDTO = new NoticeMessageDTO();
|
||||
noticeMessageDTO.setMemberId(afterSale.getMemberId());
|
||||
Map<String, String> params = new HashMap<>();
|
||||
Map<String, String> params = new HashMap<>(2);
|
||||
params.put("goods", afterSale.getGoodsName());
|
||||
params.put("refuse", afterSale.getAuditRemark());
|
||||
noticeMessageDTO.setParameter(params);
|
||||
@@ -154,8 +160,8 @@ public class NoticeMessageExecute implements TradeEvent, OrderStatusChangeEvent,
|
||||
//组织站内信参数
|
||||
NoticeMessageDTO noticeMessageDTO = new NoticeMessageDTO();
|
||||
noticeMessageDTO.setMemberId(memberPointMessage.getMemberId());
|
||||
Map<String, String> params = new HashMap<>();
|
||||
if (memberPointMessage.getType()) {
|
||||
Map<String, String> params = new HashMap<>(2);
|
||||
if (memberPointMessage.getType().equals(PointTypeEnum.INCREASE.name())) {
|
||||
params.put("expenditure_points", "0");
|
||||
params.put("income_points", memberPointMessage.getPoint().toString());
|
||||
} else {
|
||||
@@ -171,25 +177,59 @@ public class NoticeMessageExecute implements TradeEvent, OrderStatusChangeEvent,
|
||||
|
||||
@Override
|
||||
public void memberWithdrawal(MemberWithdrawalMessage memberWithdrawalMessage) {
|
||||
|
||||
//如果提现到余额
|
||||
if (memberWithdrawalMessage.getDestination().equals(MemberWithdrawalDestinationEnum.WALLET.name())) {
|
||||
|
||||
//组织参数
|
||||
NoticeMessageDTO noticeMessageDTO = new NoticeMessageDTO();
|
||||
noticeMessageDTO.setMemberId(memberWithdrawalMessage.getMemberId());
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("income", memberWithdrawalMessage.getPrice().toString());
|
||||
NoticeMessageDTO noticeMessageDTO = new NoticeMessageDTO();
|
||||
noticeMessageDTO.setMemberId(memberWithdrawalMessage.getMemberId());
|
||||
//如果提现状态为申请则发送申请提现站内消息
|
||||
if (memberWithdrawalMessage.getStatus().equals(WithdrawStatusEnum.APPLY.name())) {
|
||||
noticeMessageDTO.setNoticeMessageNodeEnum(NoticeMessageNodeEnum.WALLET_WITHDRAWAL_CREATE);
|
||||
Map<String, String> params = new HashMap<>(2);
|
||||
params.put("price", memberWithdrawalMessage.getPrice().toString());
|
||||
noticeMessageDTO.setParameter(params);
|
||||
noticeMessageDTO.setNoticeMessageNodeEnum(NoticeMessageNodeEnum.WALLET_WITHDRAWAL_SUCCESS);
|
||||
//发送提现申请成功消息
|
||||
noticeMessageService.noticeMessage(noticeMessageDTO);
|
||||
}
|
||||
//如果提现状态为通过则发送审核通过站内消息
|
||||
if (memberWithdrawalMessage.getStatus().equals(WithdrawStatusEnum.VIA_AUDITING.name())) {
|
||||
//如果提现到余额
|
||||
if (memberWithdrawalMessage.getDestination().equals(MemberWithdrawalDestinationEnum.WALLET.name())) {
|
||||
//组织参数
|
||||
Map<String, String> params = new HashMap<>(2);
|
||||
params.put("income", memberWithdrawalMessage.getPrice().toString());
|
||||
noticeMessageDTO.setParameter(params);
|
||||
noticeMessageDTO.setNoticeMessageNodeEnum(NoticeMessageNodeEnum.WALLET_WITHDRAWAL_SUCCESS);
|
||||
//发送提现成功消息
|
||||
noticeMessageService.noticeMessage(noticeMessageDTO);
|
||||
params.put("income", memberWithdrawalMessage.getPrice().toString());
|
||||
params.put("expenditure", "0");
|
||||
noticeMessageDTO.setNoticeMessageNodeEnum(NoticeMessageNodeEnum.WALLET_CHANGE);
|
||||
noticeMessageDTO.setParameter(params);
|
||||
//发送余额变动消息
|
||||
noticeMessageService.noticeMessage(noticeMessageDTO);
|
||||
}
|
||||
//如果提现到微信
|
||||
if (memberWithdrawalMessage.getDestination().equals(MemberWithdrawalDestinationEnum.WECHAT.name())) {
|
||||
Map<String, String> params = new HashMap<>(2);
|
||||
params.put("income", memberWithdrawalMessage.getPrice().toString());
|
||||
noticeMessageDTO.setParameter(params);
|
||||
noticeMessageDTO.setNoticeMessageNodeEnum(NoticeMessageNodeEnum.WALLET_WITHDRAWAL_WEICHAT_SUCCESS);
|
||||
//发送提现成功消息
|
||||
noticeMessageService.noticeMessage(noticeMessageDTO);
|
||||
|
||||
params.put("income", memberWithdrawalMessage.getPrice().toString());
|
||||
params.put("expenditure", "0");
|
||||
noticeMessageDTO.setNoticeMessageNodeEnum(NoticeMessageNodeEnum.WALLET_CHANGE);
|
||||
params.put("income", "0");
|
||||
params.put("expenditure", memberWithdrawalMessage.getPrice().toString());
|
||||
noticeMessageDTO.setNoticeMessageNodeEnum(NoticeMessageNodeEnum.WALLET_CHANGE);
|
||||
noticeMessageDTO.setParameter(params);
|
||||
//发送余额变动消息
|
||||
noticeMessageService.noticeMessage(noticeMessageDTO);
|
||||
}
|
||||
}
|
||||
//如果提现状态为拒绝则发送审核拒绝站内消息
|
||||
if (memberWithdrawalMessage.getStatus().equals(WithdrawStatusEnum.FAIL_AUDITING.name())) {
|
||||
noticeMessageDTO.setNoticeMessageNodeEnum(NoticeMessageNodeEnum.WALLET_WITHDRAWAL_ERROR);
|
||||
Map<String, String> params = new HashMap<>(2);
|
||||
params.put("price", memberWithdrawalMessage.getPrice().toString());
|
||||
noticeMessageDTO.setParameter(params);
|
||||
//发送余额变动消息
|
||||
//发送提现申请成功消息
|
||||
noticeMessageService.noticeMessage(noticeMessageDTO);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ import java.util.List;
|
||||
* 订单创建发票相关处理
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020-07-03 11:20
|
||||
* @since 2020-07-03 11:20
|
||||
**/
|
||||
@Service
|
||||
public class OrderCreateReceiptExecute implements TradeEvent {
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.springframework.stereotype.Service;
|
||||
* 订单状态处理类
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020-07-03 11:20
|
||||
* @since 2020-07-03 11:20
|
||||
**/
|
||||
@Service
|
||||
public class OrderStatusHandlerExecute implements TradeEvent {
|
||||
|
||||
@@ -10,6 +10,7 @@ import cn.lili.modules.order.order.service.OrderService;
|
||||
import cn.lili.modules.payment.entity.RefundLog;
|
||||
import cn.lili.modules.payment.kit.Payment;
|
||||
import cn.lili.modules.payment.kit.enums.PaymentMethodEnum;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -17,12 +18,15 @@ import org.springframework.stereotype.Service;
|
||||
* 支付
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2021-03-13 16:58
|
||||
* @since 2021-03-13 16:58
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class PaymentExecute implements OrderStatusChangeEvent {
|
||||
|
||||
//订单
|
||||
/**
|
||||
* 订单
|
||||
*/
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
|
||||
@@ -32,11 +36,11 @@ public class PaymentExecute implements OrderStatusChangeEvent {
|
||||
switch (orderMessage.getNewStatus()) {
|
||||
case CANCELLED:
|
||||
Order order = orderService.getBySn(orderMessage.getOrderSn());
|
||||
//未付款不做处理 直接返回
|
||||
if (order.getPayStatus() == PayStatusEnum.UNPAID.name()) {
|
||||
|
||||
//如果未付款,则不去要退回相关代码执行
|
||||
if (order.getPayStatus().equals(PayStatusEnum.UNPAID.name())) {
|
||||
return;
|
||||
}
|
||||
|
||||
PaymentMethodEnum paymentMethodEnum = PaymentMethodEnum.valueOf(order.getPaymentMethod());
|
||||
//进行退款操作
|
||||
switch (paymentMethodEnum) {
|
||||
@@ -64,6 +68,9 @@ public class PaymentExecute implements OrderStatusChangeEvent {
|
||||
break;
|
||||
case BANK_TRANSFER:
|
||||
break;
|
||||
default:
|
||||
log.error("订单支付执行异常,订单编号:{}", orderMessage.getOrderSn());
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
57
consumer/src/main/java/cn/lili/event/impl/PointExecute.java
Normal file
57
consumer/src/main/java/cn/lili/event/impl/PointExecute.java
Normal file
@@ -0,0 +1,57 @@
|
||||
package cn.lili.event.impl;
|
||||
|
||||
import cn.lili.event.OrderStatusChangeEvent;
|
||||
import cn.lili.modules.member.entity.enums.PointTypeEnum;
|
||||
import cn.lili.modules.member.service.MemberService;
|
||||
import cn.lili.modules.order.order.entity.dos.Order;
|
||||
import cn.lili.modules.order.order.entity.dto.OrderMessage;
|
||||
import cn.lili.modules.order.order.entity.enums.PayStatusEnum;
|
||||
import cn.lili.modules.order.order.service.OrderService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 积分
|
||||
*
|
||||
* @author Chopper
|
||||
* @since 2021-03-13 16:58
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class PointExecute implements OrderStatusChangeEvent {
|
||||
|
||||
@Autowired
|
||||
private MemberService memberService;
|
||||
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
|
||||
@Override
|
||||
public void orderChange(OrderMessage orderMessage) {
|
||||
|
||||
switch (orderMessage.getNewStatus()) {
|
||||
case CANCELLED:
|
||||
Order order = orderService.getBySn(orderMessage.getOrderSn());
|
||||
Long point = order.getPriceDetailDTO().getPayPoint();
|
||||
if (point <= 0) {
|
||||
return;
|
||||
}
|
||||
//如果未付款,则不去要退回相关代码执行
|
||||
if (order.getPayStatus().equals(PayStatusEnum.UNPAID.name())) {
|
||||
return;
|
||||
}
|
||||
//如果他不处于连续赠送阶段,则只赠送签到积分数
|
||||
String content = "订单取消,积分返还:" + point + "分";
|
||||
//赠送会员积分
|
||||
memberService.updateMemberPoint(point, PointTypeEnum.INCREASE.name(), order.getMemberId(), content);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -16,7 +16,7 @@ import java.util.List;
|
||||
* 注册赠券活动
|
||||
*
|
||||
* @author Bulbasaur
|
||||
* @date: 2021/5/24 10:48 上午
|
||||
* @since 2021/5/24 10:48 上午
|
||||
*/
|
||||
@Component
|
||||
public class RegisteredCouponActivityExecute implements MemberRegisterEvent {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package cn.lili.event.impl;
|
||||
|
||||
import cn.lili.common.cache.Cache;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.lili.cache.Cache;
|
||||
import cn.lili.common.enums.PromotionTypeEnum;
|
||||
import cn.lili.event.OrderStatusChangeEvent;
|
||||
import cn.lili.modules.goods.entity.dos.GoodsSku;
|
||||
import cn.lili.modules.goods.service.GoodsSkuService;
|
||||
@@ -9,11 +11,14 @@ import cn.lili.modules.order.order.entity.dto.OrderMessage;
|
||||
import cn.lili.modules.order.order.entity.enums.PayStatusEnum;
|
||||
import cn.lili.modules.order.order.entity.vo.OrderDetailVO;
|
||||
import cn.lili.modules.order.order.service.OrderService;
|
||||
import cn.lili.modules.promotion.entity.dos.KanjiaActivity;
|
||||
import cn.lili.modules.promotion.entity.dos.PromotionGoods;
|
||||
import cn.lili.modules.promotion.entity.enums.PromotionTypeEnum;
|
||||
import cn.lili.modules.promotion.service.PromotionGoodsService;
|
||||
import cn.lili.modules.promotion.entity.dto.KanjiaActivityGoodsDTO;
|
||||
import cn.lili.modules.promotion.entity.vos.PointsGoodsVO;
|
||||
import cn.lili.modules.promotion.service.*;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import org.springframework.data.redis.core.script.DefaultRedisScript;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -25,32 +30,58 @@ import java.util.List;
|
||||
* 库存扣减,他表示了订单状态是否出库成功
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020-07-03 11:20
|
||||
* @since 2020-07-03 11:20
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class StockUpdateExecute implements OrderStatusChangeEvent {
|
||||
|
||||
//出库失败消息
|
||||
/**
|
||||
* 出库失败消息
|
||||
*/
|
||||
static String outOfStockMessage = "库存不足,出库失败";
|
||||
//Redis
|
||||
/**
|
||||
* Redis
|
||||
*/
|
||||
@Autowired
|
||||
private StringRedisTemplate stringRedisTemplate;
|
||||
@Autowired
|
||||
private DefaultRedisScript<Boolean> quantityScript;
|
||||
//订单
|
||||
/**
|
||||
* 订单
|
||||
*/
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
//规格商品
|
||||
/**
|
||||
* 规格商品
|
||||
*/
|
||||
@Autowired
|
||||
private GoodsSkuService goodsSkuService;
|
||||
//促销商品
|
||||
/**
|
||||
* 促销商品
|
||||
*/
|
||||
@Autowired
|
||||
private PromotionGoodsService promotionGoodsService;
|
||||
//缓存
|
||||
/**
|
||||
* 促销商品
|
||||
*/
|
||||
@Autowired
|
||||
private SeckillApplyService seckillApplyService;
|
||||
/**
|
||||
* 缓存
|
||||
*/
|
||||
@Autowired
|
||||
private Cache cache;
|
||||
|
||||
@Autowired
|
||||
private KanjiaActivityService kanjiaActivityService;
|
||||
@Autowired
|
||||
private KanjiaActivityGoodsService kanjiaActivityGoodsService;
|
||||
@Autowired
|
||||
private PointsGoodsService pointsGoodsService;
|
||||
@Autowired
|
||||
private MongoTemplate mongoTemplate;
|
||||
|
||||
@Override
|
||||
public void orderChange(OrderMessage orderMessage) {
|
||||
|
||||
@@ -67,6 +98,11 @@ public class StockUpdateExecute implements OrderStatusChangeEvent {
|
||||
values.add(Integer.toString(i));
|
||||
setPromotionStock(keys, values, orderItem);
|
||||
}
|
||||
|
||||
List<Integer> stocks = cache.multiGet(keys);
|
||||
//如果缓存中不存在存在等量的库存值,则重新写入缓存,防止缓存击穿导致无法下单
|
||||
checkStocks(stocks, order);
|
||||
|
||||
//库存扣除结果
|
||||
Boolean skuResult = stringRedisTemplate.execute(quantityScript, keys, values.toArray());
|
||||
//如果库存扣减都成功,则记录成交订单
|
||||
@@ -114,6 +150,75 @@ public class StockUpdateExecute implements OrderStatusChangeEvent {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 校验库存是否有效
|
||||
*
|
||||
* @param stocks
|
||||
*/
|
||||
private void checkStocks(List<Integer> stocks, OrderDetailVO order) {
|
||||
for (int i = 0; i < stocks.size(); i++) {
|
||||
if (null == stocks.get(i)) {
|
||||
initSkuCache(order.getOrderItems());
|
||||
initPromotionCache(order.getOrderItems());
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 缓存中sku库存值不存在时,将不存在的信息重新写入一边
|
||||
*
|
||||
* @param orderItems
|
||||
*/
|
||||
private void initSkuCache(List<OrderItem> orderItems) {
|
||||
orderItems.forEach(orderItem -> {
|
||||
//如果不存在
|
||||
if (!cache.hasKey(GoodsSkuService.getStockCacheKey(orderItem.getSkuId()))) {
|
||||
//内部会自动写入,这里不需要进行二次处理
|
||||
goodsSkuService.getStock(orderItem.getSkuId());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化促销商品缓存
|
||||
*
|
||||
* @param orderItems
|
||||
*/
|
||||
private void initPromotionCache(List<OrderItem> orderItems) {
|
||||
|
||||
//如果促销类型需要库存判定,则做对应处理
|
||||
orderItems.forEach(orderItem -> {
|
||||
if (orderItem.getPromotionType() != null) {
|
||||
//如果此促销有库存概念,则计入
|
||||
if (PromotionTypeEnum.haveStock(orderItem.getPromotionType())) {
|
||||
|
||||
PromotionTypeEnum promotionTypeEnum = PromotionTypeEnum.valueOf(orderItem.getPromotionType());
|
||||
|
||||
String cacheKey = PromotionGoodsService.getPromotionGoodsStockCacheKey(promotionTypeEnum, orderItem.getPromotionId(), orderItem.getSkuId());
|
||||
|
||||
switch (promotionTypeEnum) {
|
||||
case KANJIA:
|
||||
cache.put(cacheKey, kanjiaActivityGoodsService.getKanJiaGoodsBySku(orderItem.getSkuId()).getStock().intValue());
|
||||
return;
|
||||
case POINTS_GOODS:
|
||||
cache.put(cacheKey, pointsGoodsService.getPointsGoodsVOByMongo(orderItem.getSkuId()).getActiveStock().intValue());
|
||||
return;
|
||||
case SECKILL:
|
||||
case PINTUAN:
|
||||
cache.put(cacheKey, promotionGoodsService.getPromotionGoodsStock(promotionTypeEnum, orderItem.getPromotionId(), orderItem.getSkuId()));
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 订单出库失败
|
||||
*
|
||||
@@ -147,6 +252,12 @@ public class StockUpdateExecute implements OrderStatusChangeEvent {
|
||||
|
||||
/**
|
||||
* 同步库存和促销库存
|
||||
* <p>
|
||||
* 需修改:DB:商品库存、Sku商品库存、活动商品库存
|
||||
* 1.获取需要修改的Sku列表、活动商品列表
|
||||
* 2.写入sku商品库存,批量修改
|
||||
* 3.写入促销商品的卖出数量、剩余数量,批量修改
|
||||
* 4.调用方法修改商品库存
|
||||
*
|
||||
* @param order 订单
|
||||
*/
|
||||
@@ -164,13 +275,33 @@ public class StockUpdateExecute implements OrderStatusChangeEvent {
|
||||
//循环订单
|
||||
for (OrderItem orderItem : order.getOrderItems()) {
|
||||
skuKeys.add(GoodsSkuService.getStockCacheKey(orderItem.getSkuId()));
|
||||
|
||||
GoodsSku goodsSku = new GoodsSku();
|
||||
goodsSku.setId(orderItem.getSkuId());
|
||||
goodsSku.setGoodsId(orderItem.getGoodsId());
|
||||
//如果有促销信息
|
||||
if (null != orderItem.getPromotionType() && null != orderItem.getPromotionId()) {
|
||||
if (null != orderItem.getPromotionType() && null != orderItem.getPromotionId() && PromotionTypeEnum.haveStock(orderItem.getPromotionType())) {
|
||||
//如果促销有库存信息
|
||||
if (PromotionTypeEnum.haveStock(orderItem.getPromotionType())) {
|
||||
PromotionTypeEnum promotionTypeEnum = PromotionTypeEnum.valueOf(orderItem.getPromotionType());
|
||||
PromotionTypeEnum promotionTypeEnum = PromotionTypeEnum.valueOf(orderItem.getPromotionType());
|
||||
|
||||
//修改砍价商品库存
|
||||
if (promotionTypeEnum.equals(PromotionTypeEnum.KANJIA)) {
|
||||
KanjiaActivity kanjiaActivity = kanjiaActivityService.getById(orderItem.getPromotionId());
|
||||
KanjiaActivityGoodsDTO kanjiaActivityGoodsDTO = kanjiaActivityGoodsService.getKanjiaGoodsDetail(kanjiaActivity.getKanjiaActivityGoodsId());
|
||||
|
||||
Integer stock = Integer.parseInt(cache.get(PromotionGoodsService.getPromotionGoodsStockCacheKey(promotionTypeEnum, orderItem.getPromotionId(), orderItem.getSkuId())).toString());
|
||||
kanjiaActivityGoodsDTO.setStock(stock);
|
||||
|
||||
kanjiaActivityGoodsService.updateById(kanjiaActivityGoodsDTO);
|
||||
this.mongoTemplate.save(kanjiaActivityGoodsDTO);
|
||||
//修改积分商品库存
|
||||
} else if (promotionTypeEnum.equals(PromotionTypeEnum.POINTS_GOODS)) {
|
||||
PointsGoodsVO pointsGoodsVO = pointsGoodsService.getPointsGoodsDetail(orderItem.getPromotionId());
|
||||
Integer stock = Integer.parseInt(cache.get(PromotionGoodsService.getPromotionGoodsStockCacheKey(promotionTypeEnum, orderItem.getPromotionId(), orderItem.getSkuId())).toString());
|
||||
pointsGoodsVO.setActiveStock(stock);
|
||||
pointsGoodsService.updateById(pointsGoodsVO);
|
||||
this.mongoTemplate.save(pointsGoodsVO);
|
||||
} else {
|
||||
PromotionGoods pGoods = promotionGoodsService.getPromotionGoods(promotionTypeEnum, orderItem.getPromotionId(), orderItem.getSkuId());
|
||||
//记录需要更新的促销库存信息
|
||||
promotionKey.add(
|
||||
@@ -188,7 +319,7 @@ public class StockUpdateExecute implements OrderStatusChangeEvent {
|
||||
List skuStocks = cache.multiGet(skuKeys);
|
||||
//循环写入商品库存
|
||||
for (int i = 0; i < skuStocks.size(); i++) {
|
||||
goodsSkus.get(i).setQuantity(Integer.parseInt(skuStocks.get(i).toString()));
|
||||
goodsSkus.get(i).setQuantity(Convert.toInt(skuStocks.get(i).toString()));
|
||||
}
|
||||
//批量修改商品库存
|
||||
goodsSkuService.updateBatchById(goodsSkus);
|
||||
@@ -197,7 +328,7 @@ public class StockUpdateExecute implements OrderStatusChangeEvent {
|
||||
if (!promotionKey.isEmpty()) {
|
||||
List promotionStocks = cache.multiGet(promotionKey);
|
||||
for (int i = 0; i < promotionKey.size(); i++) {
|
||||
promotionGoods.get(i).setQuantity(Integer.parseInt(promotionStocks.get(i).toString()));
|
||||
promotionGoods.get(i).setQuantity(Convert.toInt(promotionStocks.get(i).toString()));
|
||||
Integer num = promotionGoods.get(i).getNum();
|
||||
promotionGoods.get(i).setNum((num != null ? num : 0) + order.getOrder().getGoodsNum());
|
||||
}
|
||||
@@ -232,7 +363,7 @@ public class StockUpdateExecute implements OrderStatusChangeEvent {
|
||||
List skuStocks = cache.multiGet(skuKeys);
|
||||
//循环写入商品SKU库存
|
||||
for (int i = 0; i < skuStocks.size(); i++) {
|
||||
goodsSkus.get(i).setQuantity(Integer.parseInt(skuStocks.get(i).toString()));
|
||||
goodsSkus.get(i).setQuantity(Convert.toInt(skuStocks.get(i).toString()));
|
||||
}
|
||||
log.info("订单取消,库存还原:{}", goodsSkus);
|
||||
//批量修改商品库存
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package cn.lili.event.impl;
|
||||
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import cn.lili.common.utils.CommonUtil;
|
||||
import cn.lili.event.OrderStatusChangeEvent;
|
||||
import cn.lili.modules.order.order.entity.dos.Order;
|
||||
import cn.lili.modules.order.order.entity.dos.OrderItem;
|
||||
@@ -13,7 +12,6 @@ import cn.lili.modules.order.order.service.OrderItemService;
|
||||
import cn.lili.modules.order.order.service.OrderService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@@ -21,7 +19,7 @@ import org.springframework.stereotype.Component;
|
||||
* 虚拟商品
|
||||
*
|
||||
* @author Bulbasaur
|
||||
* @date: 2021/5/29 9:17 上午
|
||||
* @since 2021/5/29 9:17 上午
|
||||
*/
|
||||
@Component
|
||||
public class VerificationOrderExecute implements OrderStatusChangeEvent {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package cn.lili.listener;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import cn.lili.common.rocketmq.tags.AfterSaleTagsEnum;
|
||||
import cn.lili.rocketmq.tags.AfterSaleTagsEnum;
|
||||
import cn.lili.event.AfterSaleStatusChangeEvent;
|
||||
import cn.lili.modules.order.order.entity.dos.AfterSale;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -24,26 +24,26 @@ import java.util.List;
|
||||
@RocketMQMessageListener(topic = "${lili.data.rocketmq.after-sale-topic}", consumerGroup = "${lili.data.rocketmq.after-sale-group}")
|
||||
public class AfterSaleMessageListener implements RocketMQListener<MessageExt> {
|
||||
|
||||
//售后订单状态
|
||||
/**
|
||||
* 售后订单状态
|
||||
*/
|
||||
@Autowired
|
||||
private List<AfterSaleStatusChangeEvent> afterSaleStatusChangeEvents;
|
||||
|
||||
@Override
|
||||
public void onMessage(MessageExt messageExt) {
|
||||
switch (AfterSaleTagsEnum.valueOf(messageExt.getTags())) {
|
||||
case AFTER_SALE_STATUS_CHANGE:
|
||||
for (AfterSaleStatusChangeEvent afterSaleStatusChangeEvent : afterSaleStatusChangeEvents) {
|
||||
try {
|
||||
AfterSale afterSale = JSONUtil.toBean(new String(messageExt.getBody()), AfterSale.class);
|
||||
afterSaleStatusChangeEvent.afterSaleStatusChange(afterSale);
|
||||
} catch (Exception e) {
|
||||
log.error("售后{},在{}业务中,状态修改事件执行异常",
|
||||
new String(messageExt.getBody()),
|
||||
afterSaleStatusChangeEvent.getClass().getName(),
|
||||
e);
|
||||
}
|
||||
if (AfterSaleTagsEnum.valueOf(messageExt.getTags()) == AfterSaleTagsEnum.AFTER_SALE_STATUS_CHANGE) {
|
||||
for (AfterSaleStatusChangeEvent afterSaleStatusChangeEvent : afterSaleStatusChangeEvents) {
|
||||
try {
|
||||
AfterSale afterSale = JSONUtil.toBean(new String(messageExt.getBody()), AfterSale.class);
|
||||
afterSaleStatusChangeEvent.afterSaleStatusChange(afterSale);
|
||||
} catch (Exception e) {
|
||||
log.error("售后{},在{}业务中,状态修改事件执行异常",
|
||||
new String(messageExt.getBody()),
|
||||
afterSaleStatusChangeEvent.getClass().getName(),
|
||||
e);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,11 +1,23 @@
|
||||
package cn.lili.listener;
|
||||
|
||||
import cn.hutool.core.text.CharSequenceUtil;
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import cn.lili.common.rocketmq.tags.GoodsTagsEnum;
|
||||
import cn.lili.event.GoodsCommentCompleteEvent;
|
||||
import cn.lili.modules.distribution.entity.dos.DistributionGoods;
|
||||
import cn.lili.modules.distribution.entity.dos.DistributionSelectedGoods;
|
||||
import cn.lili.modules.distribution.service.DistributionGoodsService;
|
||||
import cn.lili.modules.distribution.service.DistributionSelectedGoodsService;
|
||||
import cn.lili.modules.goods.entity.dos.Brand;
|
||||
import cn.lili.modules.goods.entity.dos.Category;
|
||||
import cn.lili.modules.goods.entity.dos.Goods;
|
||||
import cn.lili.modules.goods.entity.dos.GoodsSku;
|
||||
import cn.lili.modules.goods.entity.dto.GoodsCompleteMessage;
|
||||
import cn.lili.modules.goods.entity.dto.GoodsParamsDTO;
|
||||
import cn.lili.modules.goods.entity.enums.GoodsAuthEnum;
|
||||
import cn.lili.modules.goods.entity.enums.GoodsStatusEnum;
|
||||
import cn.lili.modules.goods.service.BrandService;
|
||||
import cn.lili.modules.goods.service.CategoryService;
|
||||
import cn.lili.modules.goods.service.GoodsService;
|
||||
import cn.lili.modules.goods.service.GoodsSkuService;
|
||||
import cn.lili.modules.member.entity.dos.FootPrint;
|
||||
@@ -14,7 +26,11 @@ import cn.lili.modules.member.service.FootprintService;
|
||||
import cn.lili.modules.member.service.GoodsCollectionService;
|
||||
import cn.lili.modules.search.entity.dos.EsGoodsIndex;
|
||||
import cn.lili.modules.search.service.EsGoodsIndexService;
|
||||
import cn.lili.modules.store.entity.dos.StoreGoodsLabel;
|
||||
import cn.lili.modules.store.service.StoreGoodsLabelService;
|
||||
import cn.lili.modules.store.service.StoreService;
|
||||
import cn.lili.rocketmq.tags.GoodsTagsEnum;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.rocketmq.common.message.MessageExt;
|
||||
@@ -23,6 +39,8 @@ import org.apache.rocketmq.spring.core.RocketMQListener;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -36,27 +54,67 @@ import java.util.List;
|
||||
@RocketMQMessageListener(topic = "${lili.data.rocketmq.goods-topic}", consumerGroup = "${lili.data.rocketmq.goods-group}")
|
||||
public class GoodsMessageListener implements RocketMQListener<MessageExt> {
|
||||
|
||||
//ES商品
|
||||
/**
|
||||
* ES商品
|
||||
*/
|
||||
@Autowired
|
||||
private EsGoodsIndexService goodsIndexService;
|
||||
//店铺
|
||||
/**
|
||||
* 店铺
|
||||
*/
|
||||
@Autowired
|
||||
private StoreService storeService;
|
||||
//商品
|
||||
/**
|
||||
* 商品
|
||||
*/
|
||||
@Autowired
|
||||
private GoodsService goodsService;
|
||||
//商品
|
||||
/**
|
||||
* 商品Sku
|
||||
*/
|
||||
@Autowired
|
||||
private GoodsSkuService goodsSkuService;
|
||||
//用户足迹
|
||||
/**
|
||||
* 用户足迹
|
||||
*/
|
||||
@Autowired
|
||||
private FootprintService footprintService;
|
||||
//商品收藏
|
||||
/**
|
||||
* 商品收藏
|
||||
*/
|
||||
@Autowired
|
||||
private GoodsCollectionService goodsCollectionService;
|
||||
//商品评价
|
||||
/**
|
||||
* 商品评价
|
||||
*/
|
||||
@Autowired
|
||||
private List<GoodsCommentCompleteEvent> goodsCommentCompleteEvents;
|
||||
/**
|
||||
* 分销商品
|
||||
*/
|
||||
@Autowired
|
||||
private DistributionGoodsService distributionGoodsService;
|
||||
/**
|
||||
* 分销员-商品关联表
|
||||
*/
|
||||
@Autowired
|
||||
private DistributionSelectedGoodsService distributionSelectedGoodsService;
|
||||
/**
|
||||
* 分类
|
||||
*/
|
||||
@Autowired
|
||||
private CategoryService categoryService;
|
||||
/**
|
||||
* 品牌
|
||||
*/
|
||||
@Autowired
|
||||
private BrandService brandService;
|
||||
/**
|
||||
* 店铺商品分类
|
||||
*/
|
||||
@Autowired
|
||||
private StoreGoodsLabelService storeGoodsLabelService;
|
||||
|
||||
@Override
|
||||
public void onMessage(MessageExt messageExt) {
|
||||
|
||||
@@ -68,18 +126,44 @@ public class GoodsMessageListener implements RocketMQListener<MessageExt> {
|
||||
break;
|
||||
//生成索引
|
||||
case GENERATOR_GOODS_INDEX:
|
||||
String goodsIndexJsonStr = new String(messageExt.getBody());
|
||||
List<EsGoodsIndex> goodsIndices = JSONUtil.toList(JSONUtil.parseArray(goodsIndexJsonStr), EsGoodsIndex.class);
|
||||
for (EsGoodsIndex goodsIndex : goodsIndices) {
|
||||
log.info("生成商品索引" + goodsIndex);
|
||||
this.goodsIndexService.addIndex(goodsIndex);
|
||||
try {
|
||||
String goodsJsonStr = new String(messageExt.getBody());
|
||||
Goods goods = JSONUtil.toBean(goodsJsonStr, Goods.class);
|
||||
updateGoodsIndex(goods);
|
||||
} catch (Exception e) {
|
||||
log.error("生成商品索引事件执行异常,商品信息 {}", new String(messageExt.getBody()));
|
||||
}
|
||||
break;
|
||||
case UPDATE_GOODS_INDEX:
|
||||
try {
|
||||
String goodsIdsJsonStr = new String(messageExt.getBody());
|
||||
List<Goods> goodsList = new ArrayList<>();
|
||||
for (String goodsId : JSONUtil.toList(goodsIdsJsonStr, String.class)) {
|
||||
Goods goods = goodsService.getById(goodsId);
|
||||
goodsList.add(goods);
|
||||
}
|
||||
this.updateGoodsIndex(goodsList);
|
||||
} catch (Exception e) {
|
||||
log.error("更新商品索引事件执行异常,商品信息 {}", new String(messageExt.getBody()));
|
||||
}
|
||||
break;
|
||||
case RESET_GOODS_INDEX:
|
||||
try {
|
||||
String goodsIdsJsonStr = new String(messageExt.getBody());
|
||||
List<EsGoodsIndex> goodsIndices = JSONUtil.toList(goodsIdsJsonStr, EsGoodsIndex.class);
|
||||
goodsIndexService.updateBulkIndex(goodsIndices);
|
||||
} catch (Exception e) {
|
||||
log.error("重置商品索引事件执行异常,商品信息 {}", new String(messageExt.getBody()));
|
||||
}
|
||||
break;
|
||||
//审核商品
|
||||
case GOODS_AUDIT:
|
||||
updateGoodsNum(messageExt);
|
||||
break;
|
||||
//删除商品
|
||||
case GOODS_DELETE:
|
||||
storeService.updateStoreGoodsNum(new String(messageExt.getBody()));
|
||||
deleteGoods(messageExt);
|
||||
updateGoodsNum(messageExt);
|
||||
break;
|
||||
//规格删除
|
||||
case SKU_DELETE:
|
||||
@@ -107,38 +191,204 @@ public class GoodsMessageListener implements RocketMQListener<MessageExt> {
|
||||
break;
|
||||
//购买商品完成
|
||||
case BUY_GOODS_COMPLETE:
|
||||
String goodsCompleteMessageStr = new String(messageExt.getBody());
|
||||
List<GoodsCompleteMessage> goodsCompleteMessageList = JSONUtil.toList(JSONUtil.parseArray(goodsCompleteMessageStr), GoodsCompleteMessage.class);
|
||||
for (GoodsCompleteMessage goodsCompleteMessage : goodsCompleteMessageList) {
|
||||
Goods goods = goodsService.getById(goodsCompleteMessage.getGoodsId());
|
||||
if (goods != null) {
|
||||
//更新商品购买数量
|
||||
if (goods.getBuyCount() == null) {
|
||||
goods.setBuyCount(0);
|
||||
}
|
||||
int buyCount = goods.getBuyCount() + goodsCompleteMessage.getBuyNum();
|
||||
LambdaUpdateWrapper<Goods> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
updateWrapper.eq(Goods::getId, goodsCompleteMessage.getGoodsId());
|
||||
updateWrapper.set(Goods::getBuyCount, buyCount);
|
||||
goodsService.update(updateWrapper);
|
||||
} else {
|
||||
log.error("商品Id为[" + goodsCompleteMessage.getGoodsId() + "的商品不存在,更新商品失败!");
|
||||
}
|
||||
GoodsSku goodsSku = goodsSkuService.getById(goodsCompleteMessage.getSkuId());
|
||||
if (goodsSku != null) {
|
||||
//更新商品购买数量
|
||||
if (goodsSku.getBuyCount() == null) {
|
||||
goodsSku.setBuyCount(0);
|
||||
}
|
||||
int buyCount = goodsSku.getBuyCount() + goodsCompleteMessage.getBuyNum();
|
||||
goodsSku.setBuyCount(buyCount);
|
||||
goodsSkuService.update(goodsSku);
|
||||
goodsIndexService.updateIndexBuyNum(goodsCompleteMessage.getSkuId(), buyCount);
|
||||
} else {
|
||||
log.error("商品SkuId为[" + goodsCompleteMessage.getGoodsId() + "的商品不存在,更新商品失败!");
|
||||
}
|
||||
}
|
||||
this.goodsBuyComplete(messageExt);
|
||||
break;
|
||||
default:
|
||||
log.error("商品执行异常:{}", new String(messageExt.getBody()));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新商品索引
|
||||
*
|
||||
* @param goodsList 商品列表消息
|
||||
*/
|
||||
private void updateGoodsIndex(List<Goods> goodsList) {
|
||||
List<EsGoodsIndex> goodsIndices = new ArrayList<>();
|
||||
for (Goods goods : goodsList) {
|
||||
//如果商品通过审核&&并且已上架
|
||||
List<GoodsSku> goodsSkuList = this.goodsSkuService.list(new LambdaQueryWrapper<GoodsSku>().eq(GoodsSku::getGoodsId, goods.getId()).gt(GoodsSku::getQuantity, 0));
|
||||
if (goods.getIsAuth().equals(GoodsAuthEnum.PASS.name())
|
||||
&& goods.getMarketEnable().equals(GoodsStatusEnum.UPPER.name())
|
||||
&& Boolean.FALSE.equals(goods.getDeleteFlag())) {
|
||||
goodsSkuList.forEach(goodsSku -> {
|
||||
EsGoodsIndex goodsIndex = this.settingUpGoodsIndexData(goods, goodsSku);
|
||||
goodsIndices.add(goodsIndex);
|
||||
});
|
||||
}
|
||||
//如果商品状态值不支持es搜索,那么将商品信息做下架处理
|
||||
else {
|
||||
for (GoodsSku goodsSku : goodsSkuList) {
|
||||
EsGoodsIndex esGoodsOld = goodsIndexService.findById(goodsSku.getId());
|
||||
if (esGoodsOld != null) {
|
||||
goodsIndexService.deleteIndexById(goodsSku.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
goodsIndexService.updateBulkIndex(goodsIndices);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新商品索引
|
||||
*
|
||||
* @param goods 商品消息
|
||||
*/
|
||||
private void updateGoodsIndex(Goods goods) {
|
||||
//如果商品通过审核&&并且已上架
|
||||
List<GoodsSku> goodsSkuList = this.goodsSkuService.list(new LambdaQueryWrapper<GoodsSku>().eq(GoodsSku::getGoodsId, goods.getId()));
|
||||
if (goods.getIsAuth().equals(GoodsAuthEnum.PASS.name())
|
||||
&& goods.getMarketEnable().equals(GoodsStatusEnum.UPPER.name())
|
||||
&& Boolean.FALSE.equals(goods.getDeleteFlag())) {
|
||||
this.generatorGoodsIndex(goods, goodsSkuList);
|
||||
}
|
||||
//如果商品状态值不支持es搜索,那么将商品信息做下架处理
|
||||
else {
|
||||
for (GoodsSku goodsSku : goodsSkuList) {
|
||||
EsGoodsIndex esGoodsOld = goodsIndexService.findById(goodsSku.getId());
|
||||
if (esGoodsOld != null) {
|
||||
goodsIndexService.deleteIndexById(goodsSku.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成商品索引
|
||||
*
|
||||
* @param goods 商品信息
|
||||
* @param goodsSkuList 商品sku信息
|
||||
*/
|
||||
private void generatorGoodsIndex(Goods goods, List<GoodsSku> goodsSkuList) {
|
||||
for (GoodsSku goodsSku : goodsSkuList) {
|
||||
EsGoodsIndex esGoodsOld = goodsIndexService.findById(goodsSku.getId());
|
||||
EsGoodsIndex goodsIndex = this.settingUpGoodsIndexData(goods, goodsSku);
|
||||
//如果商品库存不为0,并且es中有数据
|
||||
if (goodsSku.getQuantity() > 0 && esGoodsOld == null) {
|
||||
log.info("生成商品索引 {}", goodsIndex);
|
||||
this.goodsIndexService.addIndex(goodsIndex);
|
||||
} else if (goodsSku.getQuantity() > 0 && esGoodsOld != null) {
|
||||
goodsIndexService.updateIndex(goodsIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private EsGoodsIndex settingUpGoodsIndexData(Goods goods, GoodsSku goodsSku) {
|
||||
EsGoodsIndex goodsIndex = new EsGoodsIndex(goodsSku);
|
||||
if (goods.getParams() != null && !goods.getParams().isEmpty()) {
|
||||
List<GoodsParamsDTO> goodsParamDTOS = JSONUtil.toList(goods.getParams(), GoodsParamsDTO.class);
|
||||
goodsIndex = new EsGoodsIndex(goodsSku, goodsParamDTOS);
|
||||
}
|
||||
goodsIndex.setIsAuth(goods.getIsAuth());
|
||||
goodsIndex.setMarketEnable(goods.getMarketEnable());
|
||||
this.settingUpGoodsIndexOtherParam(goodsIndex);
|
||||
return goodsIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置商品索引的其他参数(非商品自带)
|
||||
*
|
||||
* @param goodsIndex 商品索引信息
|
||||
*/
|
||||
private void settingUpGoodsIndexOtherParam(EsGoodsIndex goodsIndex) {
|
||||
List<Category> categories = categoryService.listByIdsOrderByLevel(Arrays.asList(goodsIndex.getCategoryPath().split(",")));
|
||||
if (!categories.isEmpty()) {
|
||||
goodsIndex.setCategoryNamePath(ArrayUtil.join(categories.stream().map(Category::getName).toArray(), ","));
|
||||
}
|
||||
Brand brand = brandService.getById(goodsIndex.getBrandId());
|
||||
if (brand != null) {
|
||||
goodsIndex.setBrandName(brand.getName());
|
||||
goodsIndex.setBrandUrl(brand.getLogo());
|
||||
}
|
||||
if (goodsIndex.getStoreCategoryPath() != null && CharSequenceUtil.isNotEmpty(goodsIndex.getStoreCategoryPath())) {
|
||||
List<StoreGoodsLabel> storeGoodsLabels = storeGoodsLabelService.listByStoreIds(Arrays.asList(goodsIndex.getStoreCategoryPath().split(",")));
|
||||
if (!storeGoodsLabels.isEmpty()) {
|
||||
goodsIndex.setStoreCategoryNamePath(ArrayUtil.join(storeGoodsLabels.stream().map(StoreGoodsLabel::getLabelName).toArray(), ","));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除商品
|
||||
* 1.更新店铺的商品数量
|
||||
* 2.删除分销员-分销商品绑定关系
|
||||
* 3.删除分销商品
|
||||
*
|
||||
* @param messageExt 消息
|
||||
*/
|
||||
private void deleteGoods(MessageExt messageExt) {
|
||||
Goods goods = JSONUtil.toBean(new String(messageExt.getBody()), Goods.class);
|
||||
|
||||
//删除获取分销商品
|
||||
DistributionGoods distributionGoods = distributionGoodsService.getOne(new LambdaQueryWrapper<DistributionGoods>()
|
||||
.eq(DistributionGoods::getGoodsId, goods.getId()));
|
||||
|
||||
//删除分销商品绑定关系
|
||||
distributionSelectedGoodsService.remove(new LambdaQueryWrapper<DistributionSelectedGoods>()
|
||||
.eq(DistributionSelectedGoods::getDistributionGoodsId, distributionGoods.getId()));
|
||||
|
||||
//删除分销商品
|
||||
distributionGoodsService.removeById(distributionGoods.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商品数量
|
||||
*
|
||||
* @param messageExt 信息体
|
||||
*/
|
||||
private void updateGoodsNum(MessageExt messageExt) {
|
||||
|
||||
Goods goods;
|
||||
try {
|
||||
goods = JSONUtil.toBean(new String(messageExt.getBody()), Goods.class);
|
||||
//更新店铺商品数量
|
||||
assert goods != null;
|
||||
storeService.updateStoreGoodsNum(goods.getStoreId());
|
||||
} catch (Exception e) {
|
||||
log.error("商品MQ信息错误:{}", messageExt.toString());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品购买完成
|
||||
* 1.更新商品购买数量
|
||||
* 2.更新SKU购买数量
|
||||
* 3.更新索引购买数量
|
||||
*
|
||||
* @param messageExt 信息体
|
||||
*/
|
||||
private void goodsBuyComplete(MessageExt messageExt) {
|
||||
String goodsCompleteMessageStr = new String(messageExt.getBody());
|
||||
List<GoodsCompleteMessage> goodsCompleteMessageList = JSONUtil.toList(JSONUtil.parseArray(goodsCompleteMessageStr), GoodsCompleteMessage.class);
|
||||
for (GoodsCompleteMessage goodsCompleteMessage : goodsCompleteMessageList) {
|
||||
Goods goods = goodsService.getById(goodsCompleteMessage.getGoodsId());
|
||||
if (goods != null) {
|
||||
//更新商品购买数量
|
||||
if (goods.getBuyCount() == null) {
|
||||
goods.setBuyCount(0);
|
||||
}
|
||||
int buyCount = goods.getBuyCount() + goodsCompleteMessage.getBuyNum();
|
||||
goodsService.update(new LambdaUpdateWrapper<Goods>()
|
||||
.eq(Goods::getId, goodsCompleteMessage.getGoodsId())
|
||||
.set(Goods::getBuyCount, buyCount));
|
||||
} else {
|
||||
log.error("商品Id为[" + goodsCompleteMessage.getGoodsId() + "的商品不存在,更新商品失败!");
|
||||
}
|
||||
GoodsSku goodsSku = goodsSkuService.getById(goodsCompleteMessage.getSkuId());
|
||||
if (goodsSku != null) {
|
||||
//更新商品购买数量
|
||||
if (goodsSku.getBuyCount() == null) {
|
||||
goodsSku.setBuyCount(0);
|
||||
}
|
||||
int buyCount = goodsSku.getBuyCount() + goodsCompleteMessage.getBuyNum();
|
||||
goodsSku.setBuyCount(buyCount);
|
||||
goodsSkuService.update(goodsSku);
|
||||
goodsIndexService.updateIndex(goodsCompleteMessage.getSkuId(), new EsGoodsIndex().setBuyCount(buyCount));
|
||||
} else {
|
||||
log.error("商品SkuId为[" + goodsCompleteMessage.getGoodsId() + "的商品不存在,更新商品失败!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package cn.lili.listener;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import cn.lili.common.rocketmq.tags.MemberTagsEnum;
|
||||
import cn.lili.rocketmq.tags.MemberTagsEnum;
|
||||
import cn.lili.event.MemberPointChangeEvent;
|
||||
import cn.lili.event.MemberRegisterEvent;
|
||||
import cn.lili.event.MemberWithdrawalEvent;
|
||||
@@ -30,16 +30,24 @@ import java.util.List;
|
||||
@RocketMQMessageListener(topic = "${lili.data.rocketmq.member-topic}", consumerGroup = "${lili.data.rocketmq.member-group}")
|
||||
public class MemberMessageListener implements RocketMQListener<MessageExt> {
|
||||
|
||||
//会员签到
|
||||
/**
|
||||
* 会员签到
|
||||
*/
|
||||
@Autowired
|
||||
private MemberSignService memberSignService;
|
||||
//会员积分变化
|
||||
/**
|
||||
* 会员积分变化
|
||||
*/
|
||||
@Autowired
|
||||
private List<MemberPointChangeEvent> memberPointChangeEvents;
|
||||
//会员提现
|
||||
/**
|
||||
* 会员提现
|
||||
*/
|
||||
@Autowired
|
||||
private List<MemberWithdrawalEvent> memberWithdrawalEvents;
|
||||
//会员注册
|
||||
/**
|
||||
* 会员注册
|
||||
*/
|
||||
@Autowired
|
||||
private List<MemberRegisterEvent> memberSignEvents;
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ package cn.lili.listener;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import cn.lili.modules.message.entity.dto.NoticeMessageDTO;
|
||||
import cn.lili.modules.message.service.NoticeMessageService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.rocketmq.common.message.MessageExt;
|
||||
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
|
||||
import org.apache.rocketmq.spring.core.RocketMQListener;
|
||||
@@ -20,7 +19,9 @@ import org.springframework.stereotype.Component;
|
||||
@RocketMQMessageListener(topic = "${lili.data.rocketmq.notice-topic}", consumerGroup = "${lili.data.rocketmq.notice-group}")
|
||||
public class NoticeMessageListener implements RocketMQListener<MessageExt> {
|
||||
|
||||
//站内信
|
||||
/**
|
||||
* 站内信
|
||||
*/
|
||||
@Autowired
|
||||
private NoticeMessageService noticeMessageService;
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user