Compare commits
560 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e34b4172b8 | ||
|
|
30d6ab64f8 | ||
|
|
2e8c40bcf3 | ||
|
|
f2385c3ace | ||
|
|
a45355b125 | ||
|
|
b3bb771066 | ||
|
|
068c6b986e | ||
|
|
18e2c89891 | ||
|
|
7b485753a6 | ||
|
|
8556d27173 | ||
|
|
d677aabbf4 | ||
|
|
aaa0748409 | ||
|
|
57ee156798 | ||
|
|
5ae4d8b4fa | ||
|
|
681327274c | ||
|
|
6ab2888fd0 | ||
|
|
80a0e0e8c7 | ||
|
|
80773e2d58 | ||
|
|
065bcc8a55 | ||
|
|
9398413999 | ||
|
|
cf623f6756 | ||
|
|
1b316baac6 | ||
|
|
4fc1d0e346 | ||
|
|
159fe37120 | ||
|
|
6f9486f065 | ||
|
|
94da71336a | ||
|
|
8c5ce396b2 | ||
|
|
0063820fdf | ||
|
|
fe80edebbd | ||
|
|
6b59c1e643 | ||
|
|
1b52381c71 | ||
|
|
763519876e | ||
|
|
cede181bc0 | ||
|
|
cb776eb4c0 | ||
|
|
8ed4f6eb3c | ||
|
|
9cf97f3203 | ||
|
|
2a984b8c56 | ||
|
|
22ecf48168 | ||
|
|
89422b2736 | ||
|
|
bcd4bf4ff1 | ||
|
|
a263bc6301 | ||
|
|
27ae773e20 | ||
|
|
085b61c2ab | ||
|
|
c7682680ee | ||
|
|
a301432a87 | ||
|
|
526de18a42 | ||
|
|
c940bf6cb2 | ||
|
|
a7643a6b93 | ||
|
|
24f6b9e80f | ||
|
|
d349616957 | ||
|
|
f7c9ba820d | ||
|
|
f99f59963a | ||
|
|
caaf9c74f3 | ||
|
|
076f47f5c4 | ||
|
|
f0e4e4c2bc | ||
|
|
c87fe45dfa | ||
|
|
49fd03df7f | ||
|
|
6deed61311 | ||
|
|
6311767320 | ||
|
|
2463d1b5bb | ||
|
|
9d41ae3cae | ||
|
|
2be8bf27bf | ||
|
|
2d052ffb1a | ||
|
|
88ab071ac7 | ||
|
|
bda72da679 | ||
|
|
95e5ef2d33 | ||
|
|
48a294e7c6 | ||
|
|
794fa63302 | ||
|
|
cdb8e851a8 | ||
|
|
f8ee3a8d15 | ||
|
|
76ab997922 | ||
|
|
97e7a130f1 | ||
|
|
2a96ad4af7 | ||
|
|
e1aee4a744 | ||
|
|
ecfe1524d4 | ||
|
|
42ea2dc986 | ||
|
|
230e2e7407 | ||
|
|
92639ba309 | ||
|
|
19b3225312 | ||
|
|
e56c20469d | ||
|
|
a28eceaf61 | ||
|
|
1925c6d33c | ||
|
|
fcac4002b1 | ||
|
|
ed3a2ae9fc | ||
|
|
4955d2135b | ||
|
|
9f1dacc1d4 | ||
|
|
f0765a6627 | ||
|
|
a31a9fdfbd | ||
|
|
fd2d0724a7 | ||
|
|
82d7389092 | ||
|
|
a53eb3cfde | ||
|
|
bd048d725c | ||
|
|
8e275613e1 | ||
|
|
fc869a34e0 | ||
|
|
48c84acb7c | ||
|
|
40d40a344e | ||
|
|
d31257ba76 | ||
|
|
f0a80338da | ||
|
|
6b5ca5b337 | ||
|
|
61f9d7812d | ||
|
|
d5eeafc554 | ||
|
|
2175433444 | ||
|
|
cfbb1a1519 | ||
|
|
1302ca6de4 | ||
|
|
239b520939 | ||
|
|
56d9dbee5b | ||
|
|
41decf1fa1 | ||
|
|
1d2cb5737d | ||
|
|
a2496b267a | ||
|
|
178544fe2d | ||
|
|
9e3b9c8f38 | ||
|
|
b439d8283f | ||
|
|
fb48bce38d | ||
|
|
b189fbe238 | ||
|
|
26c1c97442 | ||
|
|
ee8f5b6e1e | ||
|
|
6755515b1f | ||
|
|
074036c0b5 | ||
|
|
c7d0820eed | ||
|
|
97c0fdbf1d | ||
|
|
a962939db8 | ||
|
|
a9802710ef | ||
|
|
aaaa0b1ebf | ||
|
|
f34d10146a | ||
|
|
b875cbdda4 | ||
|
|
d80a3f7f48 | ||
|
|
259946e78f | ||
|
|
9c24adf77d | ||
|
|
4c47d4aba2 | ||
|
|
7f9061cfc5 | ||
|
|
085dad2107 | ||
|
|
055a7fffdb | ||
|
|
6cea6af59b | ||
|
|
6f0f8106e0 | ||
|
|
c9a0ce7985 | ||
|
|
b40533c553 | ||
|
|
e2fff23080 | ||
|
|
72482ee395 | ||
|
|
5366034556 | ||
|
|
484e2a2318 | ||
|
|
0873fba7df | ||
|
|
4aa6f864f0 | ||
|
|
183b2ba30c | ||
|
|
071f15347e | ||
|
|
71ed58e665 | ||
|
|
50c7e20ba6 | ||
|
|
876b801fa1 | ||
|
|
bd42b88b71 | ||
|
|
b2dfb3abe2 | ||
|
|
164f726222 | ||
|
|
24cdf5cf00 | ||
|
|
93cb9da558 | ||
|
|
66c6bfa0fb | ||
|
|
edd93a6ad4 | ||
|
|
ea1626a2ef | ||
|
|
1f3b7f21bb | ||
|
|
e6fe055cd5 | ||
|
|
1422b6fdbc | ||
|
|
cfb70eff8a | ||
|
|
dfe6085432 | ||
|
|
b8e8db0e36 | ||
|
|
fb2e41422b | ||
|
|
f3db8f2e45 | ||
|
|
6bc2c0adf1 | ||
|
|
df75e08d22 | ||
|
|
b2ccdad483 | ||
|
|
3d6eb7b4fa | ||
|
|
96cfb8a8ce | ||
|
|
4a4672c80a | ||
|
|
a0c1cd1019 | ||
|
|
ed20d1abbb | ||
|
|
0ebb9c01f8 | ||
|
|
dd3176f841 | ||
|
|
a910a97719 | ||
|
|
cdf8ab3a3c | ||
|
|
074e4ed5b7 | ||
|
|
9e43d186d7 | ||
|
|
8b61d40ff8 | ||
|
|
f9b3001eb3 | ||
|
|
f1ec44869d | ||
|
|
72341acb57 | ||
|
|
fa696e6c11 | ||
|
|
b30909942a | ||
|
|
7c64e1f11d | ||
|
|
d1c6988d0f | ||
|
|
efe0bd4bad | ||
|
|
7523481be0 | ||
|
|
23182106b9 | ||
|
|
515ffbcf0a | ||
|
|
8f52a1e2a2 | ||
|
|
bdd9045fc1 | ||
|
|
518616483b | ||
|
|
817f662cb7 | ||
|
|
01419cde15 | ||
|
|
118efe0833 | ||
|
|
46911004db | ||
|
|
b87190d135 | ||
|
|
39e22f5561 | ||
|
|
02dd37c87f | ||
|
|
7db7afad4a | ||
|
|
25582e2958 | ||
|
|
3c5609545b | ||
|
|
061d924d46 | ||
|
|
49af6777ee | ||
|
|
e9d9a95cb4 | ||
|
|
7e70e7d6cd | ||
|
|
ebb48c7d0f | ||
|
|
e0d464906e | ||
|
|
9189a6d433 | ||
|
|
b3f6bad6f8 | ||
|
|
105162aa89 | ||
|
|
51c4161f68 | ||
|
|
488d9352f3 | ||
|
|
56b800e4ff | ||
|
|
03864ca1a9 | ||
|
|
94c87f5645 | ||
|
|
dadf48ac25 | ||
|
|
a47bfcc5fd | ||
|
|
1798916bf9 | ||
|
|
5af1238e02 | ||
|
|
a62db61221 | ||
|
|
8104947aec | ||
|
|
d5f9fbf99d | ||
|
|
d3910bb931 | ||
|
|
7cac57bd79 | ||
|
|
07874ca210 | ||
|
|
0267597b20 | ||
|
|
1cc939f457 | ||
|
|
b12245bb94 | ||
|
|
006ec15000 | ||
|
|
4f4593e5f7 | ||
|
|
58ff71a863 | ||
|
|
7d8a31c55a | ||
|
|
29e6637399 | ||
|
|
d61fc41465 | ||
|
|
1cc692a3c9 | ||
|
|
a2a1bed3e0 | ||
|
|
557366a3ec | ||
|
|
80c8b4b4d4 | ||
|
|
9dd6bc2d6f | ||
|
|
9c1db92824 | ||
|
|
e3172c28b7 | ||
|
|
b0b3747760 | ||
|
|
e8af34995b | ||
|
|
9f17dcafbb | ||
|
|
347877cdad | ||
|
|
8f1541c338 | ||
|
|
89f3e8f980 | ||
|
|
e945f93032 | ||
|
|
4f9841d443 | ||
|
|
c73204a828 | ||
|
|
b2681d443d | ||
|
|
05a1d880c5 | ||
|
|
7b13ae13ad | ||
|
|
ecb330cc57 | ||
|
|
af5e866853 | ||
|
|
007b145c2e | ||
|
|
201943994b | ||
|
|
b17f3c08b7 | ||
|
|
c46c59e4a1 | ||
|
|
0bdb39797d | ||
|
|
71061ad861 | ||
|
|
f14875e679 | ||
|
|
e8a1f6a02f | ||
|
|
036035f51b | ||
|
|
104b6c2f5d | ||
|
|
7dffd7dcb9 | ||
|
|
63f1f0df21 | ||
|
|
dda955219a | ||
|
|
5d6e99dc8a | ||
|
|
b61a5e8f7b | ||
|
|
d9018ef317 | ||
|
|
9993b9bbf6 | ||
|
|
03fd9b222a | ||
|
|
3d7cfb1c63 | ||
|
|
ca6e45fb92 | ||
|
|
e9950652a6 | ||
|
|
cddc6571f7 | ||
|
|
708ba929f0 | ||
|
|
6e820d745c | ||
|
|
ae9e0e27ff | ||
|
|
3485c5a5dd | ||
|
|
62ac16b705 | ||
|
|
048ca0e64a | ||
|
|
d413de75d3 | ||
|
|
4f8d4f7a74 | ||
|
|
a0619abfc4 | ||
|
|
5e950b9766 | ||
|
|
1f02818692 | ||
|
|
c0a370ad47 | ||
|
|
a502420c5f | ||
|
|
b4aef1461c | ||
|
|
54b40c35f4 | ||
|
|
a33e053bc7 | ||
|
|
ae93661763 | ||
|
|
349bee7405 | ||
|
|
c286d05ad8 | ||
|
|
49b2c2f7a3 | ||
|
|
b469fcfee3 | ||
|
|
5e6fde594b | ||
|
|
5d598d9034 | ||
|
|
8181f2602a | ||
|
|
3e74697215 | ||
|
|
fac10debd5 | ||
|
|
74941f7243 | ||
|
|
621b2e322c | ||
|
|
948b67558a | ||
|
|
dcf48db2ac | ||
|
|
072d31e8df | ||
|
|
25240f445d | ||
|
|
279b473793 | ||
|
|
959e24f51b | ||
|
|
c720d53389 | ||
|
|
335d3f7ff1 | ||
|
|
16608d4950 | ||
|
|
7b6a150bd2 | ||
|
|
1f21d80dc0 | ||
|
|
76c8a23721 | ||
|
|
08933ad92f | ||
|
|
06d0fb5b86 | ||
|
|
05c3c8a80c | ||
|
|
41796774dc | ||
|
|
4594752470 | ||
|
|
d818b396c4 | ||
|
|
cf7b333662 | ||
|
|
7cc0a90acf | ||
|
|
f9eed2f2ab | ||
|
|
f8ff163aee | ||
|
|
38ad5bb394 | ||
|
|
b2fb415ab5 | ||
|
|
4c03676a3e | ||
|
|
efce977bd6 | ||
|
|
071974c74b | ||
|
|
7f202506b5 | ||
|
|
a9c9886210 | ||
|
|
e18b62da6e | ||
|
|
59c6dedd35 | ||
|
|
a673db222e | ||
|
|
1cb72a5bdd | ||
|
|
c1e45242a7 | ||
|
|
efe9a1a6e4 | ||
|
|
e91f0e7ee4 | ||
|
|
3716691366 | ||
|
|
675830045d | ||
|
|
9294f77163 | ||
|
|
864701adfb | ||
|
|
81f47a7fb6 | ||
|
|
a56ceca3c5 | ||
|
|
bc670d263d | ||
|
|
36068d7197 | ||
|
|
4ebe0d4f43 | ||
|
|
9f01078fe0 | ||
|
|
b07fc790e5 | ||
|
|
ab2bb11eee | ||
|
|
919367162b | ||
|
|
ec4d91b37f | ||
|
|
799aa8f90c | ||
|
|
cfbd1d68ee | ||
|
|
4cf8c4e81f | ||
|
|
87bde2c53f | ||
|
|
2aaf677605 | ||
|
|
fad7c4a39d | ||
|
|
fc464c0564 | ||
|
|
53c28359bb | ||
|
|
4737cc5ae8 | ||
|
|
97845bbaf5 | ||
|
|
8f516f7be7 | ||
|
|
5c164f89cc | ||
|
|
da28859398 | ||
|
|
25f8b103bf | ||
|
|
8b0513aece | ||
|
|
b95712aef3 | ||
|
|
917d9437b6 | ||
|
|
123388d059 | ||
|
|
226d66c22e | ||
|
|
d8f09b6039 | ||
|
|
fae4dcaae2 | ||
|
|
b957df648b | ||
|
|
a21f4800ab | ||
|
|
4abf2205c1 | ||
|
|
0c652eac63 | ||
|
|
3fef330707 | ||
|
|
c2abc4e2e4 | ||
|
|
d48e5a05a6 | ||
|
|
72471168d7 | ||
|
|
08a2f7dfcd | ||
|
|
ceb61318f0 | ||
|
|
11778a632a | ||
|
|
f3e11fd368 | ||
|
|
69fdd4b756 | ||
|
|
507a6e6525 | ||
|
|
82a9c6dbf7 | ||
|
|
21d66f719d | ||
|
|
c793c47d45 | ||
|
|
a81faf4ba4 | ||
|
|
e60d47163e | ||
|
|
e7215cec9e | ||
|
|
f7e6789e23 | ||
|
|
4af58aea4a | ||
|
|
4d379d6006 | ||
|
|
519ccb7ddd | ||
|
|
79ccab6869 | ||
|
|
ccac5226d5 | ||
|
|
674e585eff | ||
|
|
7e1b7f2725 | ||
|
|
256f2ba480 | ||
|
|
72f63e7e31 | ||
|
|
606f9d2ccf | ||
|
|
0261b7e9ab | ||
|
|
71abf32d82 | ||
|
|
f6030cc918 | ||
|
|
f7ba021799 | ||
|
|
f506fa86cc | ||
|
|
1a0130dd1a | ||
|
|
6f746e3aff | ||
|
|
36a3a0a0e1 | ||
|
|
323e1cd6eb | ||
|
|
06fb54c65c | ||
|
|
07d4a2cda9 | ||
|
|
53e753c3ef | ||
|
|
8d8cffca71 | ||
|
|
352a19b91c | ||
|
|
74972eaa37 | ||
|
|
5ee07ec34d | ||
|
|
61104b9cd3 | ||
|
|
032ecc4a3e | ||
|
|
7337cf6fa5 | ||
|
|
967852f84d | ||
|
|
17734e7a3d | ||
|
|
b8398ac1d1 | ||
|
|
0a3696ac56 | ||
|
|
8e0b77c232 | ||
|
|
88efc2da38 | ||
|
|
48f9398e72 | ||
|
|
b147bbef3d | ||
|
|
013e8f8f70 | ||
|
|
98907b33aa | ||
|
|
49003f4d9a | ||
|
|
46c869ca8a | ||
|
|
f92756c103 | ||
|
|
57c3fa04db | ||
|
|
30d8d34976 | ||
|
|
c49f968d82 | ||
|
|
894a75beb3 | ||
|
|
cb7e1cc03e | ||
|
|
9e1837e89c | ||
|
|
475f96d00a | ||
|
|
96854ca00c | ||
|
|
0bf6aab43b | ||
|
|
856aee6c18 | ||
|
|
0f2ed23b02 | ||
|
|
10b4d0b16b | ||
|
|
7f44b29fbc | ||
|
|
a66c6e5504 | ||
|
|
255d5a4550 | ||
|
|
6df2b92bc6 | ||
|
|
8c38c9e145 | ||
|
|
501b9777b5 | ||
|
|
8fc18458c2 | ||
|
|
457793b4d2 | ||
|
|
4bb00bc006 | ||
|
|
1a0515361e | ||
|
|
2df8df1a0d | ||
|
|
96a9a32079 | ||
|
|
5d6b475e09 | ||
|
|
cb3eca29d8 | ||
|
|
bdb62de868 | ||
|
|
b416e56b98 | ||
|
|
1728be9c36 | ||
|
|
ea85710c05 | ||
|
|
e1af67beb3 | ||
|
|
d9de601e8a | ||
|
|
3c568a7d42 | ||
|
|
5080cf65c7 | ||
|
|
eefca656c6 | ||
|
|
3a63f87807 | ||
|
|
d71628adfe | ||
|
|
585fc96bca | ||
|
|
28b1820bfa | ||
|
|
85e74014b1 | ||
|
|
cc12cecc2a | ||
|
|
197a7bcc43 | ||
|
|
613f397c33 | ||
|
|
a3bd0f2c0b | ||
|
|
bda297b90d | ||
|
|
8ddba831f0 | ||
|
|
5218702005 | ||
|
|
fbabd2f340 | ||
|
|
a38bc6b534 | ||
|
|
73aa36fc69 | ||
|
|
d627fca7d6 | ||
|
|
06325a7ce1 | ||
|
|
903b779ebe | ||
|
|
0e3d582d13 | ||
|
|
cd17f3d755 | ||
|
|
8543a228fd | ||
|
|
b97c8e7fda | ||
|
|
1346614a30 | ||
|
|
0eec40673f | ||
|
|
602678e2b9 | ||
|
|
d6393e39f7 | ||
|
|
b3f22866b5 | ||
|
|
51d2880392 | ||
|
|
ede7a37e37 | ||
|
|
8373303651 | ||
|
|
f3ccabe253 | ||
|
|
ba6bb56e81 | ||
|
|
73124f016d | ||
|
|
32ca2e4298 | ||
|
|
1cc7486b0a | ||
|
|
26b58442c5 | ||
|
|
20de17bef1 | ||
|
|
54e04be768 | ||
|
|
49b517f1ab | ||
|
|
fc71d2d1ca | ||
|
|
340b5b7248 | ||
|
|
cfd292ef18 | ||
|
|
f7ea17a9cf | ||
|
|
096ab34ae8 | ||
|
|
e72b35c7eb | ||
|
|
9141f21cf8 | ||
|
|
65d9efef94 | ||
|
|
c5b19db662 | ||
|
|
f6a50cc43a | ||
|
|
a13260b8c6 | ||
|
|
66c0200457 | ||
|
|
e244883165 | ||
|
|
92367c9020 | ||
|
|
e78ea60644 | ||
|
|
29f73eaaa1 | ||
|
|
22c004a892 | ||
|
|
ef0507cf1d | ||
|
|
9df9e33ce1 | ||
|
|
52a2caaa6d | ||
|
|
0b6aa9e857 | ||
|
|
3b078cfd6b | ||
|
|
67b746998f | ||
|
|
52f62f0c1d | ||
|
|
ca23b5ab33 | ||
|
|
5a14790ec2 | ||
|
|
67542eebfb | ||
|
|
88c62bc238 | ||
|
|
0c4ed91335 | ||
|
|
74dbb611ab | ||
|
|
07e72c7e72 | ||
|
|
2c0700c10e | ||
|
|
191cee25a4 | ||
|
|
1b4fad72ed | ||
|
|
3fce0dba48 | ||
|
|
706346338b | ||
|
|
aee846764b | ||
|
|
391b35ef1f | ||
|
|
9364841cf4 | ||
|
|
0d7b44fe51 | ||
|
|
47734cfca6 | ||
|
|
a272e53519 | ||
|
|
710fe1998b | ||
|
|
31c76c08b8 | ||
|
|
7d5e609f7b | ||
|
|
4d2cb2d1dc |
189783
DB/lilishop.sql
189783
DB/lilishop.sql
File diff suppressed because one or more lines are too long
@@ -1,2 +0,0 @@
|
||||
/** 店铺--默认页面是否开启**/
|
||||
ALTER TABLE li_store ADD page_show bit(1) DEFAULT NULL COMMENT '默认页面是否开启';
|
||||
@@ -365,8 +365,8 @@ INSERT INTO `li_menu` VALUES (1367049611578966016, 'admin', '2021-03-03 09:50:01
|
||||
INSERT INTO `li_menu` VALUES (1367049712657498112, 'admin', '2021-03-03 09:50:25', b'0', 'admin', '2021-12-02 20:22:04', 'null', 'promotions/pintuan/pintuan', 'md-alert', 2, 'promotions/pintuan', '1367049214198022144', 'promotions/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', '/manager/other/pageData*');
|
||||
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', '/manager/other/pageData*');
|
||||
INSERT INTO `li_menu` VALUES (1367050530030878720, 'admin', '2021-03-03 09:53:40', b'0', 'admin', '2021-03-04 01:05:57', 'null', 'page-decoration/floorList', 'md-alert', 2, 'pcFloor', '1367050320584114176', 'pcFloor', 0.00, 'PC端', 'null', '/manager/other/pageData*');
|
||||
INSERT INTO `li_menu` VALUES (1367050673312497664, 'admin', '2021-03-03 09:54:14', b'0', 'admin', '2021-03-04 01:06:04', 'null', 'page-decoration/wap/wapList', 'md-aperture', 2, 'wapList', '1367050320584114176', 'wapList', 1.00, '移动端', 'null', '/manager/other/pageData*');
|
||||
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/other/articleCategory*');
|
||||
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/other/article*,/manager/other/articleCategory*');
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
/** 增加签到日期 **/
|
||||
ALTER TABLE li_member_sign
|
||||
ADD day int DEFAULT NULL COMMENT '签到日 ';
|
||||
ALTER TABLE li_member_sign
|
||||
DROP INDEX uk_member_day;
|
||||
ALTER TABLE li_member_sign
|
||||
add unique uk_member_day (member_id, day) COMMENT 'uk_member_day';
|
||||
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for li_hot_words_history
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `li_hot_words_history`;
|
||||
CREATE TABLE `li_hot_words_history`
|
||||
(
|
||||
`id` bigint NOT NULL COMMENT 'ID',
|
||||
`create_time` datetime(6) DEFAULT NULL COMMENT '创建时间',
|
||||
`keywords` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '热词',
|
||||
`score` int DEFAULT NULL COMMENT '热词分数',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb3 COLLATE = utf8_bin COMMENT '热词历史表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of li_hot_words_history
|
||||
-- ----------------------------
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for li_wholesale
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `li_wholesale`;
|
||||
CREATE TABLE `li_wholesale`
|
||||
(
|
||||
`id` bigint NOT NULL,
|
||||
`create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
|
||||
`create_time` datetime(6) DEFAULT NULL,
|
||||
`delete_flag` bit(1) DEFAULT NULL,
|
||||
`update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
|
||||
`update_time` datetime(6) DEFAULT NULL,
|
||||
`price` decimal(10, 2) DEFAULT NULL COMMENT '价格',
|
||||
`goods_id` bigint DEFAULT NULL COMMENT '商品id',
|
||||
`sku_id` bigint DEFAULT NULL COMMENT '商品skuId',
|
||||
`num` int DEFAULT NULL COMMENT '起购量',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT '批发规则表';
|
||||
|
||||
ALTER TABLE li_wholesale
|
||||
ADD template_id bigint DEFAULT NULL COMMENT '商品模版id';
|
||||
91
DB/version4.2.5to4.3.sql
Normal file
91
DB/version4.2.5to4.3.sql
Normal file
@@ -0,0 +1,91 @@
|
||||
|
||||
/** 优惠券活动增加领取周期字段 **/
|
||||
ALTER TABLE li_coupon_activity ADD coupon_frequency_enum varchar(255) COMMENT '领取周期';
|
||||
-- 会员优惠券标识
|
||||
CREATE TABLE `li_member_coupon_sign` (
|
||||
`id` bigint NOT NULL,
|
||||
`coupon_activity_Id` bigint NULL DEFAULT NULL COMMENT '优惠券活动id',
|
||||
`member_id` bigint NULL DEFAULT NULL COMMENT '会员id',
|
||||
`invalid_time` datetime NULL DEFAULT NULL COMMENT '过期时间',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = DYNAMIC;
|
||||
|
||||
/**
|
||||
IM聊天
|
||||
*/
|
||||
CREATE TABLE `li_im_talk` (
|
||||
`id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '创建者',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`delete_flag` bit(1) DEFAULT NULL COMMENT '删除标志',
|
||||
`update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '修改者',
|
||||
`update_time` datetime(6) DEFAULT NULL COMMENT '修改时间',
|
||||
`user_id1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '用户1Id',
|
||||
`user_id2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '用户2Id',
|
||||
`name1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '用户1名称',
|
||||
`name2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '用户2名称',
|
||||
`face1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '用户1头像',
|
||||
`face2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '用户2头像',
|
||||
`top1` bit(1) DEFAULT NULL COMMENT '用户1置顶标识',
|
||||
`top2` bit(1) DEFAULT NULL COMMENT '用户2置顶标识',
|
||||
`disable1` bit(1) DEFAULT NULL COMMENT '用户1禁用标识',
|
||||
`disable2` bit(1) DEFAULT NULL COMMENT '用户2禁用标识',
|
||||
`store_flag1` bit(1) DEFAULT NULL COMMENT '用户1店铺标识',
|
||||
`store_flag2` bit(1) DEFAULT NULL COMMENT '用户2店铺标识',
|
||||
`last_talk_time` datetime DEFAULT NULL COMMENT '最后聊天时间',
|
||||
`last_talk_message` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '最后的消息',
|
||||
`last_message_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '最后消息类型',
|
||||
`talk_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '聊天Id',
|
||||
`tenant_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '坐席Id',
|
||||
`tenant_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '坐席名称',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
|
||||
/**
|
||||
IM消息
|
||||
*/
|
||||
CREATE TABLE `li_im_message` (
|
||||
`id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '创建者',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`delete_flag` bit(1) DEFAULT NULL COMMENT '删除标识',
|
||||
`update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '修改者',
|
||||
`update_time` datetime(6) DEFAULT NULL COMMENT '修改标识',
|
||||
`from_user` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '发送用户Id',
|
||||
`to_user` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '接收用户Id',
|
||||
`is_read` bit(1) DEFAULT NULL COMMENT '已读标识',
|
||||
`message_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '聊天类型',
|
||||
`text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '聊天内容',
|
||||
`talk_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '聊天Id',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
订单增加自提信息
|
||||
*/
|
||||
ALTER TABLE li_order ADD `store_address_path` varchar(255) DEFAULT NULL;
|
||||
ALTER TABLE li_order ADD `store_address_center` varchar(255) DEFAULT NULL;
|
||||
ALTER TABLE li_order ADD `store_address_mobile` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL;
|
||||
|
||||
/**
|
||||
店铺是否开启自提
|
||||
*/
|
||||
ALTER TABLE li_store ADD `self_pick_flag` bit(1) DEFAULT NULL;
|
||||
/**
|
||||
历史足迹增加店铺Id
|
||||
*/
|
||||
ALTER TABLE li_foot_print ADD `store_id` varchar(255) DEFAULT NULL COMMENT '店铺ID';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
用户提现申请增加字段
|
||||
*/
|
||||
ALTER TABLE li_member_withdraw_apply ADD `real_name` varchar(255) DEFAULT NULL;
|
||||
ALTER TABLE li_member_withdraw_apply ADD `connect_number` varchar(255) DEFAULT NULL;
|
||||
ALTER TABLE li_member_withdraw_apply ADD `error_message` text DEFAULT NULL;
|
||||
183
DB/version4.3toMASTER.sql
Normal file
183
DB/version4.3toMASTER.sql
Normal file
@@ -0,0 +1,183 @@
|
||||
CREATE TABLE `li_file_directory`
|
||||
(
|
||||
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||||
`create_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者',
|
||||
`update_time` datetime NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者',
|
||||
`delete_flag` tinyint(1) NULL DEFAULT 0 COMMENT '删除标志 true/false 删除/未删除',
|
||||
`directory_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '文件目录类型',
|
||||
`directory_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '拥有者名称',
|
||||
`owner_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '拥有者id',
|
||||
`parent_id` bigint NULL DEFAULT NULL COMMENT '父分类ID',
|
||||
`level` int NULL DEFAULT NULL COMMENT '层级',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB
|
||||
AUTO_INCREMENT = 1698937596963311619
|
||||
CHARACTER SET = utf8mb4
|
||||
COLLATE = utf8mb4_0900_ai_ci COMMENT = '文件夹'
|
||||
ROW_FORMAT = DYNAMIC;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
ALTER TABLE li_file
|
||||
ADD file_directory_id varchar(255) COMMENT '文件夹ID';
|
||||
|
||||
/**
|
||||
订单包裹
|
||||
*/
|
||||
CREATE TABLE `li_order_package` (
|
||||
`id` bigint NOT NULL COMMENT 'ID',
|
||||
`create_by` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '创建者',
|
||||
`create_time` datetime(6) DEFAULT NULL COMMENT '创建时间',
|
||||
`delete_flag` bit(1) DEFAULT NULL COMMENT '是否删除',
|
||||
`update_by` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '修改者',
|
||||
`update_time` datetime(6) DEFAULT NULL COMMENT '修改时间',
|
||||
`package_no` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '包裹单号',
|
||||
`order_sn` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '订单编号',
|
||||
`logistics_no` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '发货单号',
|
||||
`logistics_code` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '物流公司CODE',
|
||||
`logistics_name` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '物流公司名称',
|
||||
`consignee_mobile` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '收件人手机',
|
||||
`status` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '状态',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/**
|
||||
分包货物
|
||||
*/
|
||||
CREATE TABLE `li_order_package_item` (
|
||||
`id` bigint NOT NULL COMMENT 'ID',
|
||||
`create_by` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '创建者',
|
||||
`create_time` datetime(6) DEFAULT NULL COMMENT '创建时间',
|
||||
`delete_flag` bit(1) DEFAULT NULL COMMENT '是否删除',
|
||||
`update_by` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '修改者',
|
||||
`update_time` datetime(6) DEFAULT NULL COMMENT '修改时间',
|
||||
`package_no` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '包裹单号',
|
||||
`order_sn` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '订单编号',
|
||||
`order_item_sn` varchar(255) COLLATE utf8mb3_bin DEFAULT NULL COMMENT '子订单编号',
|
||||
`deliver_number` int DEFAULT NULL COMMENT '发货数量',
|
||||
`logistics_time` datetime(6) DEFAULT NULL COMMENT '发货时间',
|
||||
`goods_name` varchar(255) COLLATE utf8mb3_bin DEFAULT NULL,
|
||||
`thumbnail` varchar(255) COLLATE utf8mb3_bin DEFAULT NULL,
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/*
|
||||
订单货物增加发货数量
|
||||
*/
|
||||
ALTER TABLE li_order_item ADD `deliver_number` int DEFAULT NULL COMMENT '发货数量';
|
||||
|
||||
ALTER TABLE li_goods_sku ADD `alert_quantity` int DEFAULT NULL COMMENT '预警库存';
|
||||
|
||||
/*
|
||||
sku增加预警库存
|
||||
*/
|
||||
ALTER TABLE li_goods_sku ADD `alert_quantity` int DEFAULT NULL COMMENT '预警库存';
|
||||
/*
|
||||
增加库存预警菜单
|
||||
*/
|
||||
INSERT INTO `lilishop`.`li_store_menu`(`id`, `create_by`, `create_time`, `delete_flag`, `update_by`, `update_time`, `description`, `front_route`, `icon`, `level`, `name`, `parent_id`, `path`, `sort_order`, `title`, `permission`) VALUES (1349237928434098177, NULL, '2022-01-11 22:35:45.000000', b'0', NULL, '2022-01-11 22:37:05', NULL, 'goods/goods-seller/alertQuantity', 'ios-american-football', 2, 'alert-goods-quantity', '1348810864748945408', 'alert-goods-quantity', '1.14', '库存预警', NULL);
|
||||
|
||||
/**
|
||||
交易唤醒表,增加交易流水详情
|
||||
*/
|
||||
ALTER TABLE li_order_item ADD `is_refund` varchar(255) DEFAULT NULL COMMENT '是否退款';
|
||||
|
||||
/**
|
||||
交易表增加订单状态字段
|
||||
*/
|
||||
ALTER TABLE li_order_item ADD `refund_price` decimal(10,2) DEFAULT NULL COMMENT '退款金额';
|
||||
|
||||
/**
|
||||
结算单表,增加砍价/积分退款金额字段
|
||||
*/
|
||||
ALTER TABLE li_bill ADD `point_refund_settlement_price` decimal(10,2) DEFAULT NULL COMMENT '退货积分补贴返还';
|
||||
ALTER TABLE li_bill ADD `kanjia_refund_settlement_price` decimal(10,2) DEFAULT NULL COMMENT '退货砍价补贴返还';
|
||||
|
||||
UPDATE li_bill b
|
||||
SET b.point_refund_settlement_price =IFNULL((
|
||||
SELECT
|
||||
SUM( point_settlement_price )
|
||||
FROM
|
||||
li_store_flow sf
|
||||
WHERE
|
||||
sf.flow_type = 'REFUND'
|
||||
AND sf.store_id=b.store_id
|
||||
AND sf.create_time BETWEEN b.start_time
|
||||
AND b.end_time),0)
|
||||
|
||||
UPDATE li_bill b
|
||||
SET b.kanjia_refund_settlement_price =IFNULL((
|
||||
SELECT
|
||||
SUM( kanjia_settlement_price )
|
||||
FROM
|
||||
li_store_flow sf
|
||||
WHERE
|
||||
sf.flow_type = 'REFUND'
|
||||
AND sf.store_id=b.store_id
|
||||
AND sf.create_time BETWEEN b.start_time
|
||||
AND b.end_time),0);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
交易唤醒表,增加交易流水详情
|
||||
*/
|
||||
ALTER TABLE li_order_item ADD `is_refund` varchar(255) DEFAULT NULL COMMENT '是否退款';
|
||||
|
||||
/**
|
||||
交易表增加订单状态字段
|
||||
*/
|
||||
ALTER TABLE li_order_item ADD `refund_price` decimal(10,2) DEFAULT NULL COMMENT '退款金额';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
文件表增加拥有者名称
|
||||
*/
|
||||
ALTER TABLE li_file ADD `owner_name` varchar(255) DEFAULT NULL COMMENT '拥有者名称';
|
||||
|
||||
/**
|
||||
初始化文件拥有者名称
|
||||
*/
|
||||
UPDATE li_file f JOIN li_store s ON f.owner_id = s.id
|
||||
SET f.owner_name = s.store_name
|
||||
WHERE user_enums = 'STORE';
|
||||
|
||||
UPDATE li_file f JOIN li_admin_user a ON f.owner_id = a.id
|
||||
SET f.owner_name = a.nick_name
|
||||
WHERE user_enums = 'MANAGER';
|
||||
|
||||
UPDATE li_file f JOIN li_member m ON f.owner_id = m.id
|
||||
SET f.owner_name = m.nick_name
|
||||
WHERE user_enums = 'MEMBER';
|
||||
|
||||
ALTER TABLE `li_order`
|
||||
ADD COLUMN `seller_remark` varchar(255) NULL COMMENT '商家订单备注' AFTER `remark`;
|
||||
|
||||
|
||||
ALTER TABLE `li_distribution_cash`
|
||||
ADD COLUMN `name` varchar(255) NULL COMMENT '会员姓名';
|
||||
ALTER TABLE `li_distribution_cash`
|
||||
ADD COLUMN `id_number` varchar(255) NULL COMMENT '身份证号' ;
|
||||
ALTER TABLE `li_distribution_cash`
|
||||
ADD COLUMN `settlement_bank_account_name` varchar(255) NULL COMMENT '结算银行开户行名称' ;
|
||||
ALTER TABLE `li_distribution_cash`
|
||||
ADD COLUMN `settlement_bank_account_num` varchar(255) NULL COMMENT '结算银行开户账号' ;
|
||||
ALTER TABLE `li_distribution_cash`
|
||||
ADD COLUMN `settlement_bank_branch_name` varchar(255) NULL COMMENT '结算银行开户支行名称' ;
|
||||
|
||||
ALTER TABLE `li_distribution` ADD `distribution_order_price` decimal(10,2) DEFAULT NULL COMMENT '分销订单金额';
|
||||
|
||||
ALTER TABLE `li_distribution_order` ADD `refund_num` int DEFAULT NULL COMMENT '退款商品数量';
|
||||
|
||||
ALTER TABLE `li_store_flow` ADD `bill_time` datetime(6) DEFAULT NULL COMMENT '结算时间';
|
||||
ALTER TABLE `li_store_flow` ADD `full_refund` bit(1) DEFAULT NULL COMMENT '是否全部退款';
|
||||
ALTER TABLE `li_store_flow` ADD `profit_sharing_status` varchar(255) NULL COMMENT '分账状态';
|
||||
ALTER TABLE `li_store_flow` ADD `profit_sharing` varchar(255) NULL COMMENT '分账详情';
|
||||
|
||||
|
||||
|
||||
INSERT INTO `lilishop`.`li_setting` (`id`, `create_by`, `create_time`, `delete_flag`, `update_by`, `update_time`, `setting_value`) VALUES ('CONNECT_SETTING', 'admin', '2024-07-07 13:55:38.686000', b'0', NULL, NULL, '{\"callbackUrl\":\"https://buyer-api.pickmall.cn\",\"pc\":\"https://pc-b2b2c.pickmall.cn\",\"wap\":\"https://m-b2b2c.pickmall.cn\"}');
|
||||
UPDATE `lilishop`.`li_setting` SET `create_by` = 'admin', `create_time` = '2021-01-23 02:18:03.299000', `delete_flag` = b'0', `update_by` = 'admin', `update_time` = '2024-07-07 13:53:44.732000', `setting_value` = '{\"accessKeyId\":\"test\",\"tencentSdkAppId\":\"null\",\"registerTemplateCode\":\"SMS_205755298\",\"huaweiSender\":\"null\",\"signName\":\"lili\",\"tencentSecretId\":\"null\",\"huaweiAppKey\":\"null\",\"isTestModel\":\"true\",\"tencentSecretKey\":\"null\",\"type\":\"ALI\",\"accessSecret\":\"test\",\"tencentSignName\":\"null\",\"huaweiSignature\":\"null\",\"payPasswordTemplateCode\":\"SMS_205755301\",\"walletPasswordTemplateCode\":\"SMS_205755297\",\"findPasswordTemplateCode\":\"SMS_205755301\",\"huaweiAppSecret\":\"null\",\"loginTemplateCode\":\"SMS_205755300\"}' WHERE `id` = 'SMS_SETTING';
|
||||
820
LICENSE
820
LICENSE
@@ -1,6 +1,5 @@
|
||||
<<<<<<< HEAD
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
@@ -8,17 +7,15 @@
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
software for all its users.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
@@ -27,44 +24,34 @@ them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
@@ -73,7 +60,7 @@ modification follow.
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
@@ -550,35 +537,45 @@ to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
the GNU Affero General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Program specifies that a certain numbered version of the GNU Affero General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
GNU Affero General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
versions of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
@@ -636,716 +633,29 @@ the "copyright" line and a pointer to where the full notice is found.
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
If your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a "Source" link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for the
|
||||
specific requirements.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
=======
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
>>>>>>> ae0c4aea12996d3d72eca7c6ccdc97922373e4d7
|
||||
|
||||
100
README.md
100
README.md
@@ -1,29 +1,4 @@
|
||||
## Lilishop B2B2C商城系统
|
||||
|
||||
#### 欢迎交流需求,交流业务,交流技术(基础问题自行解决,其他问题先看文档后提问)
|
||||
|
||||
#### 不用削尖脑袋往老群里加,老群活跃度较低,很多潜水党,新群相对而言活跃一些 :tw-1f606: :tw-1f606: :tw-1f606: :tw-1f606: :tw-1f606: :tw-1f606:
|
||||
|
||||
|
||||
##### 交流 qq 1群 961316482(已满)
|
||||
<a target="_blank" href="https://qm.qq.com/cgi-bin/qm/qr?k=BAhURE3DG2YWhQk6kRxVapbLykqMoPS8&jump_from=webapi"><img border="0" src="https://pub.idqqimg.com/wpa/images/group.png" alt="Lilishop交流群" title="Lilishop交流群">点击快捷加群</a>
|
||||
|
||||
##### 交流 qq 2群 875294241(已满)
|
||||
|
||||
<a target="_blank" href="https://qm.qq.com/cgi-bin/qm/qr?k=_lrekOvr5k2p5uTn5GRidI-chKEmpCX3&jump_from=webapi"><img border="0" src="https://pub.idqqimg.com/wpa/images/group.png" alt="Lilishop交流群2群" title="Lilishop交流群2群">点击快捷加群</a>
|
||||
|
||||
|
||||
##### 交流 qq 3群 263785057
|
||||
|
||||
<a target="_blank" href="https://qm.qq.com/cgi-bin/qm/qr?k=VUogkDvaso4zLTFH8nxFPDRKq0EthUn1&jump_from=webapi"><img border="0" src="//pub.idqqimg.com/wpa/images/group.png" alt="Lilishop交流群3群" title="Lilishop交流群3群">点击快捷加群</a>
|
||||
|
||||
|
||||
##### 体验 公众号/小程序/APP 体验,扫描二维码
|
||||
|
||||

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

|
||||
## Lilishop 商城系统
|
||||
|
||||
|
||||
### 商城介绍
|
||||
@@ -41,6 +16,32 @@ https://gitee.com/beijing_hongye_huicheng/lilishop-simplify
|
||||
|
||||
https://docs.pickmall.cn
|
||||
|
||||
|
||||
#### 欢迎交流需求,交流业务,交流技术(基础问题自行解决,其他问题先看文档后提问)
|
||||
|
||||
#### 不用削尖脑袋往老群里加,老群活跃度较低,很多潜水党,新群相对而言活跃一些 :tw-1f606: :tw-1f606: :tw-1f606: :tw-1f606: :tw-1f606: :tw-1f606:
|
||||
|
||||
#### 开发新手或者不熟悉的同学在群内提问或新开Issue提问前,请先阅读[【提问的智慧】](https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/master/README-zh_CN.md),并确保已查阅过 [【在线文档】](https://docs.pickmall.cn/) ,避免浪费大家的宝贵时间;
|
||||
|
||||
##### 交流 qq 1群 961316482(已满)
|
||||
##### 交流 qq 2群 875294241(已满)
|
||||
##### 交流 qq 3群 263785057(已满)
|
||||
##### 交流 qq 4群 674617534(已满)
|
||||
##### 交流 qq 5群 594675235(已满)
|
||||
##### 交流 qq 6群 917026848(已满)
|
||||
##### 交流 qq 7群 936344822
|
||||
|
||||
##### 体验 公众号/小程序/APP 体验,扫描二维码
|
||||
|
||||

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

|
||||
|
||||
|
||||
#### PS: **演示站点所有环境均部署master分支。如果有演示站点问题,可以反馈,如果演示站点没问题本地运行有问题,需自行处理**
|
||||
|
||||
|
||||
### 项目地址
|
||||
|
||||
gitee : https://gitee.com/beijing_hongye_huicheng
|
||||
@@ -62,7 +63,7 @@ PS:手机验证码为 ‘111111’
|
||||
|
||||
**商城 小程序/公众号/APP**:扫描二维码
|
||||
|
||||

|
||||

|
||||
|
||||
### 快速本地部署
|
||||
|
||||
@@ -80,25 +81,47 @@ PS:手机验证码为 ‘111111’
|
||||
|
||||
|
||||
#### 平台管理端功能
|
||||
|
||||
|
||||

|
||||
| 模块 <img width=80/> | 功能 |
|
||||
|--------------------|-----------------------------------------------------------------|
|
||||
| 首页 | 平台基础信息统计、待办事项 |
|
||||
| 会员 | 会员列表、评价列表、积分历史、会员资金、会员充值 |
|
||||
| 订单 | 商品订单、虚拟订单、订单售后、订单投诉、售后原因维护、收款流水、退款流水 |
|
||||
| 商品 | 商品列表、商品审核、商品分类、商品品牌、商品规格、商品计量单位 |
|
||||
| 促销 | 优惠券、券活动(每日&每月&每周&邀新 赠券)、秒杀活动、砍价活动、拼团活动、积分商品 |
|
||||
| 店铺 | 店铺管理、店铺审核、店铺结算、店铺对账 |
|
||||
| 运营 | 楼层装修、分销商管理、文章管理、意见反馈、站内信、短信、搜索热词管理 |
|
||||
| 统计 | 会员统计、订单统计、流量统计、商品销量统计 |
|
||||
| 设置 | 菜单管理、角色管理、部门管理、管理员管理、系统设置、行政地区管理、OSS管理、联合登陆、支付、物流公司、敏感词、验证码资源 |
|
||||
|
||||
|
||||
|
||||
#### 卖家功能
|
||||
|
||||

|
||||
|
||||
| 模块 <img width=80/> | 功能 |
|
||||
|----|-------------------------------|
|
||||
| 首页 | 店铺基础信息统计、待办事项、店铺公告 |
|
||||
| 商品 | 商品发布、商品列表、商品模板、店铺分类 |
|
||||
| 订单 | 商品订单、虚拟订单、订单评价、订单投诉、退款申请、退货申请 |
|
||||
| 财务 | 店铺对账、店铺结算、发票管理 |
|
||||
| 促销 | 优惠券、满额优惠、秒杀、拼团 、分销商品、分校订单 |
|
||||
| 统计 |单统计、流量统计、商品销量统计 |
|
||||
|
||||
| 设置 | 配送公司、物流模板、店铺设置、店铺自提设置、PC装修、移动端装修、店员管理、部门管理、角色管理 |
|
||||
| 消息 | 站内信 |
|
||||
|
||||
|
||||
### 商城前端功能展示
|
||||
|
||||
#### 商城移动端
|
||||
|
||||
<img src="https://pickmall.cn/assets/imgs/other/app.gif" alt="移动端功能展示" style="zoom:50%;" />
|
||||
<img src="https://static.pickmall.cn/images/other/app.gif" alt="移动端功能展示" style="zoom:50%;" />
|
||||
|
||||
#### 平台管理端
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
### 技术选型
|
||||
@@ -168,6 +191,15 @@ PS:手机验证码为 ‘111111’
|
||||
|
||||
### 交流群
|
||||
|
||||
##### 官方qq 1群 961316482(已满)
|
||||
##### 官方qq 2群 875294241(已满)
|
||||
##### 官网qq 3群 263785057
|
||||
##### 交流 qq 1群 961316482(已满)
|
||||
##### 交流 qq 2群 875294241(已满)
|
||||
##### 交流 qq 3群 263785057(已满)
|
||||
##### 交流 qq 4群 674617534(已满)
|
||||
##### 交流 qq 5群 594675235(已满)
|
||||
|
||||
### 附录
|
||||
有人有自己的学习视频、学习记录文档、希望宣传关联开源项目等均可以私聊仓库所有者。
|
||||
|
||||
类似:
|
||||
|
||||
清晨敲代码同学的分析: https://blog.csdn.net/vaevaevae233/category_12103567.html
|
||||
@@ -54,22 +54,22 @@ public class DistributionGoodsBuyerController {
|
||||
@PreventDuplicateSubmissions
|
||||
@ApiOperation(value = "选择分销商品")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "distributionGoodsId", value = "分销ID", required = true, dataType = "String", paramType = "path"),
|
||||
@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,Boolean checked) {
|
||||
Boolean result=false;
|
||||
if(checked){
|
||||
result=distributionSelectedGoodsService.add(distributionGoodsId);
|
||||
}else {
|
||||
result=distributionSelectedGoodsService.delete(distributionGoodsId);
|
||||
@NotNull(message = "分销商品不能为空") @PathVariable("distributionGoodsId") String distributionGoodsId, Boolean checked) {
|
||||
Boolean result = false;
|
||||
if (checked) {
|
||||
result = distributionSelectedGoodsService.add(distributionGoodsId);
|
||||
} else {
|
||||
result = distributionSelectedGoodsService.delete(distributionGoodsId);
|
||||
}
|
||||
//判断操作结果
|
||||
if(result){
|
||||
if (result) {
|
||||
return ResultUtil.success(ResultCode.SUCCESS);
|
||||
}else{
|
||||
} else {
|
||||
throw new ServiceException(ResultCode.ERROR);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import cn.lili.common.exception.ServiceException;
|
||||
import cn.lili.common.vo.PageVO;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.goods.entity.dos.Goods;
|
||||
import cn.lili.modules.goods.entity.dos.GoodsSku;
|
||||
import cn.lili.modules.goods.entity.dto.GoodsSearchParams;
|
||||
import cn.lili.modules.goods.entity.vos.GoodsVO;
|
||||
import cn.lili.modules.goods.service.GoodsService;
|
||||
@@ -18,14 +19,13 @@ import cn.lili.modules.search.service.HotWordsService;
|
||||
import cn.lili.modules.statistics.aop.PageViewPoint;
|
||||
import cn.lili.modules.statistics.aop.enums.PageViewEnum;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
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;
|
||||
@@ -102,12 +102,17 @@ public class GoodsBuyerController {
|
||||
return ResultUtil.data(goodsService.queryByParams(goodsSearchParams));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取商品sku列表")
|
||||
@GetMapping("/sku")
|
||||
public ResultMessage<List<GoodsSku>> getSkuByPage(GoodsSearchParams goodsSearchParams) {
|
||||
return ResultUtil.data(goodsSkuService.getGoodsSkuByList(goodsSearchParams));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "从ES中获取商品信息")
|
||||
@GetMapping("/es")
|
||||
public ResultMessage<SearchPage<EsGoodsIndex>> getGoodsByPageFromEs(EsGoodsSearchDTO goodsSearchParams, PageVO pageVO) {
|
||||
public ResultMessage<Page<EsGoodsIndex>> getGoodsByPageFromEs(EsGoodsSearchDTO goodsSearchParams, PageVO pageVO) {
|
||||
pageVO.setNotConvert(true);
|
||||
SearchPage<EsGoodsIndex> esGoodsIndices = goodsSearchService.searchGoods(goodsSearchParams, pageVO);
|
||||
return ResultUtil.data(esGoodsIndices);
|
||||
return ResultUtil.data(goodsSearchService.searchGoodsByPage(goodsSearchParams, pageVO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "从ES中获取相关商品品牌名称,分类名称及属性")
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
package cn.lili.controller.member;
|
||||
|
||||
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.dto.FootPrintQueryParams;
|
||||
import cn.lili.modules.member.service.FootprintService;
|
||||
import cn.lili.modules.search.entity.dos.EsGoodsIndex;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.catalina.User;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -35,8 +38,9 @@ public class FootprintController {
|
||||
|
||||
@ApiOperation(value = "分页获取")
|
||||
@GetMapping
|
||||
public ResultMessage<IPage<EsGoodsIndex>> getByPage(PageVO page) {
|
||||
return ResultUtil.data(footprintService.footPrintPage(page));
|
||||
public ResultMessage<IPage<EsGoodsIndex>> getByPage(FootPrintQueryParams params) {
|
||||
params.setMemberId(UserContext.getCurrentUser().getId());
|
||||
return ResultUtil.data(footprintService.footPrintPage(params));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "根据id删除")
|
||||
@@ -61,4 +65,10 @@ public class FootprintController {
|
||||
return ResultUtil.data(footprintService.getFootprintNum());
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/history")
|
||||
@ApiOperation(value = "获取会员的历史足迹")
|
||||
public ResultMessage<IPage<EsGoodsIndex>> getMemberHistory(FootPrintQueryParams params) {
|
||||
return ResultUtil.data(footprintService.footPrintPage(params));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,6 +68,8 @@ public class MemberAddressBuyerController {
|
||||
@ApiOperation(value = "修改会员收件地址")
|
||||
@PutMapping
|
||||
public ResultMessage<MemberAddress> editShippingAddress(@Valid MemberAddress shippingAddress) {
|
||||
OperationalJudgment.judgment(memberAddressService.getById(shippingAddress.getId()));
|
||||
shippingAddress.setMemberId(Objects.requireNonNull(UserContext.getCurrentUser()).getId());
|
||||
return ResultUtil.data(memberAddressService.updateMemberAddress(shippingAddress));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
package cn.lili.controller.member;
|
||||
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.vo.PageVO;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.member.service.GoodsCollectionService;
|
||||
import cn.lili.modules.member.service.StoreCollectionService;
|
||||
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.*;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 买家端,会员收藏接口
|
||||
*
|
||||
* @author Chopper
|
||||
* @since 2020/11/17 2:32 下午
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,会员收藏接口")
|
||||
@RequestMapping("/buyer/member/collection")
|
||||
public class MemberCollectionController {
|
||||
|
||||
/**
|
||||
* 会员商品收藏
|
||||
*/
|
||||
@Autowired
|
||||
private GoodsCollectionService goodsCollectionService;
|
||||
/**
|
||||
* 会员店铺
|
||||
*/
|
||||
@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 (goods.equals(type)) {
|
||||
return ResultUtil.data(goodsCollectionService.goodsCollection(page));
|
||||
}
|
||||
return ResultUtil.data(storeCollectionService.storeCollection(page));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "添加会员收藏")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "type", value = "类型", dataType = "String", paramType = "path", example = "GOODS:商品,STORE:店铺"),
|
||||
@ApiImplicitParam(name = "num", value = "值", dataType = "Long", paramType = "path")
|
||||
})
|
||||
@PostMapping("/add/{type}/{id}")
|
||||
public ResultMessage<Object> addGoodsCollection(@PathVariable String type,
|
||||
@NotNull(message = "值不能为空") @PathVariable String id) {
|
||||
if (goods.equals(type)) {
|
||||
return ResultUtil.data(goodsCollectionService.addGoodsCollection(id));
|
||||
}
|
||||
return ResultUtil.data(storeCollectionService.addStoreCollection(id));
|
||||
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除会员收藏")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "type", value = "类型", dataType = "String", paramType = "path", example = "GOODS:商品,STORE:店铺"),
|
||||
@ApiImplicitParam(name = "num", value = "值", dataType = "Long", paramType = "path")
|
||||
})
|
||||
@DeleteMapping(value = "/delete/{type}/{id}")
|
||||
public ResultMessage<Object> deleteGoodsCollection(@PathVariable String type,
|
||||
@NotNull(message = "值不能为空") @PathVariable String id) {
|
||||
if (goods.equals(type)) {
|
||||
return ResultUtil.data(goodsCollectionService.deleteGoodsCollection(id));
|
||||
}
|
||||
return ResultUtil.data(storeCollectionService.deleteStoreCollection(id));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询会员是否收藏")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "type", value = "类型", dataType = "String", paramType = "path", example = "GOODS:商品,STORE:店铺"),
|
||||
@ApiImplicitParam(name = "id", value = "值", dataType = "String", paramType = "path")
|
||||
})
|
||||
@GetMapping(value = "/isCollection/{type}/{id}")
|
||||
public ResultMessage<Boolean> isCollection(@PathVariable String type,
|
||||
@NotNull(message = "值不能为空") @PathVariable String id) {
|
||||
if (goods.equals(type)) {
|
||||
return ResultUtil.data(this.goodsCollectionService.isCollection(id));
|
||||
}
|
||||
return ResultUtil.data(this.storeCollectionService.isCollection(id));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package cn.lili.controller.member;
|
||||
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.vo.PageVO;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.member.service.GoodsCollectionService;
|
||||
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.*;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 买家端,会员收藏接口
|
||||
*
|
||||
* @author Chopper
|
||||
* @since 2020/11/17 2:32 下午
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,会员商品收藏接口")
|
||||
@RequestMapping("/buyer/member/collection")
|
||||
public class MemberCollectionGoodsController {
|
||||
|
||||
/**
|
||||
* 会员商品收藏
|
||||
*/
|
||||
@Autowired
|
||||
private GoodsCollectionService goodsCollectionService;
|
||||
|
||||
@ApiOperation(value = "查询会员收藏列表")
|
||||
@GetMapping("/GOODS")
|
||||
public ResultMessage<Object> goodsList(PageVO page) {
|
||||
return ResultUtil.data(goodsCollectionService.goodsCollection(page));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "添加会员收藏")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "num", value = "值", dataType = "Long", paramType = "path")
|
||||
})
|
||||
@PostMapping("/add/GOODS/{id}")
|
||||
public ResultMessage<Object> addGoodsCollection(@NotNull(message = "值不能为空") @PathVariable String id) {
|
||||
return ResultUtil.data(goodsCollectionService.addGoodsCollection(id));
|
||||
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除会员收藏")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "type", value = "类型", dataType = "String", paramType = "path", example = "GOODS:商品,STORE:店铺"),
|
||||
@ApiImplicitParam(name = "num", value = "值", dataType = "Long", paramType = "path")
|
||||
})
|
||||
@DeleteMapping(value = "/delete/GOODS/{id}")
|
||||
public ResultMessage<Object> deleteGoodsCollection(@NotNull(message = "值不能为空") @PathVariable String id) {
|
||||
return ResultUtil.data(goodsCollectionService.deleteGoodsCollection(id));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询会员是否收藏")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "type", value = "类型", dataType = "String", paramType = "path", example = "GOODS:商品,STORE:店铺"),
|
||||
@ApiImplicitParam(name = "id", value = "值", dataType = "String", paramType = "path")
|
||||
})
|
||||
@GetMapping(value = "/isCollection/GOODS/{id}")
|
||||
public ResultMessage<Boolean> isCollection(@NotNull(message = "值不能为空") @PathVariable String id) {
|
||||
return ResultUtil.data(this.goodsCollectionService.isCollection(id));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package cn.lili.controller.member;
|
||||
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.vo.PageVO;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.member.service.StoreCollectionService;
|
||||
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.*;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 买家端,会员收藏接口
|
||||
*
|
||||
* @author Chopper
|
||||
* @since 2020/11/17 2:32 下午
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,会员店铺收藏接口")
|
||||
@RequestMapping("/buyer/member/storeCollection")
|
||||
public class MemberCollectionStoreController {
|
||||
|
||||
/**
|
||||
* 会员店铺
|
||||
*/
|
||||
@Autowired
|
||||
private StoreCollectionService storeCollectionService;
|
||||
|
||||
@ApiOperation(value = "查询会员收藏列表")
|
||||
@GetMapping("/STORE")
|
||||
public ResultMessage<Object> goodsList(PageVO page) {
|
||||
return ResultUtil.data(storeCollectionService.storeCollection(page));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "添加会员收藏")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "num", value = "值", dataType = "Long", paramType = "path")
|
||||
})
|
||||
@PostMapping("/add/STORE/{id}")
|
||||
public ResultMessage<Object> addGoodsCollection(@NotNull(message = "值不能为空") @PathVariable String id) {
|
||||
return ResultUtil.data(storeCollectionService.addStoreCollection(id));
|
||||
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除会员收藏")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "num", value = "值", dataType = "Long", paramType = "path")
|
||||
})
|
||||
@DeleteMapping(value = "/delete/STORE/{id}")
|
||||
public ResultMessage<Object> deleteGoodsCollection(@NotNull(message = "值不能为空") @PathVariable String id) {
|
||||
return ResultUtil.data(storeCollectionService.deleteStoreCollection(id));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询会员是否收藏")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "id", value = "值", dataType = "String", paramType = "path")
|
||||
})
|
||||
@GetMapping(value = "/isCollection/STORE/{id}")
|
||||
public ResultMessage<Boolean> isCollection(@NotNull(message = "值不能为空") @PathVariable String id) {
|
||||
return ResultUtil.data(this.storeCollectionService.isCollection(id));
|
||||
}
|
||||
}
|
||||
@@ -189,20 +189,38 @@ public class CartController {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "选择自提地址")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "storeAddressId", value = "自提地址id ", required = true, paramType = "query"),
|
||||
@ApiImplicitParam(name = "way", value = "购物车类型 ", paramType = "query")
|
||||
})
|
||||
@GetMapping("/storeAddress")
|
||||
public ResultMessage<Object> shippingSelfPickAddress(@NotNull(message = "自提地址ID不能为空") String storeAddressId,
|
||||
String way) {
|
||||
try {
|
||||
cartService.shippingSelfAddress(storeAddressId, way);
|
||||
return ResultUtil.success();
|
||||
} catch (ServiceException se) {
|
||||
log.error(ResultCode.SHIPPING_NOT_APPLY.message(), se);
|
||||
throw new ServiceException(ResultCode.SHIPPING_NOT_APPLY);
|
||||
} catch (Exception e) {
|
||||
log.error(ResultCode.CART_ERROR.message(), e);
|
||||
throw new ServiceException(ResultCode.CART_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "选择配送方式")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "shippingMethod", value = "配送方式:SELF_PICK_UP(自提)," +
|
||||
"LOCAL_TOWN_DELIVERY(同城配送)," +
|
||||
"LOGISTICS(物流) ", required = true, paramType = "query"),
|
||||
@ApiImplicitParam(name = "selleId", value = "店铺id", paramType = "query"),
|
||||
@ApiImplicitParam(name = "way", value = "购物车类型 ", paramType = "query")
|
||||
})
|
||||
@GetMapping("/shippingMethod")
|
||||
@PutMapping("/shippingMethod")
|
||||
public ResultMessage<Object> shippingMethod(@NotNull(message = "配送方式不能为空") String shippingMethod,
|
||||
String selleId,
|
||||
String way) {
|
||||
try {
|
||||
cartService.shippingMethod(selleId, shippingMethod, way);
|
||||
cartService.shippingMethod( shippingMethod, way);
|
||||
return ResultUtil.success();
|
||||
} catch (ServiceException se) {
|
||||
log.error(se.getMsg(), se);
|
||||
@@ -213,6 +231,21 @@ public class CartController {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取用户可选择的物流方式")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "way", value = "购物车类型 ", paramType = "query")
|
||||
})
|
||||
@GetMapping("/shippingMethodList")
|
||||
public ResultMessage<Object> shippingMethodList(String way) {
|
||||
try {
|
||||
return ResultUtil.data(cartService.shippingMethodList(way));
|
||||
}
|
||||
catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return ResultUtil.error(ResultCode.ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "选择发票")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "way", value = "购物车购买:CART/立即购买:BUY_NOW/拼团购买:PINTUAN / 积分购买:POINT ", required = true, paramType = "query"),
|
||||
|
||||
@@ -9,11 +9,14 @@ import cn.lili.common.security.OperationalJudgment;
|
||||
import cn.lili.common.security.context.UserContext;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.order.order.entity.dos.Order;
|
||||
import cn.lili.modules.order.order.entity.dos.OrderPackage;
|
||||
import cn.lili.modules.order.order.entity.dto.OrderSearchParams;
|
||||
import cn.lili.modules.order.order.entity.enums.OrderStatusEnum;
|
||||
import cn.lili.modules.order.order.entity.vo.OrderDetailVO;
|
||||
import cn.lili.modules.order.order.entity.vo.OrderSimpleVO;
|
||||
import cn.lili.modules.order.order.service.OrderPackageService;
|
||||
import cn.lili.modules.order.order.service.OrderService;
|
||||
import cn.lili.modules.system.entity.vo.Traces;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
@@ -44,6 +47,9 @@ public class OrderBuyerController {
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
|
||||
@Autowired
|
||||
private OrderPackageService orderPackageService;
|
||||
|
||||
@ApiOperation(value = "查询会员订单列表")
|
||||
@GetMapping
|
||||
public ResultMessage<IPage<OrderSimpleVO>> queryMineOrder(OrderSearchParams orderSearchParams) {
|
||||
@@ -116,6 +122,16 @@ public class OrderBuyerController {
|
||||
return ResultUtil.data(orderService.getTraces(orderSn));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询地图版物流踪迹")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "orderSn", value = "订单编号", required = true, dataType = "String", paramType = "path")
|
||||
})
|
||||
@PostMapping(value = "/getMapTraces/{orderSn}")
|
||||
public ResultMessage<Object> getMapTraces(@NotBlank(message = "订单编号不能为空") @PathVariable String orderSn) {
|
||||
OperationalJudgment.judgment(orderService.getBySn(orderSn));
|
||||
return ResultUtil.data(orderService.getMapTraces(orderSn));
|
||||
}
|
||||
|
||||
|
||||
@PreventDuplicateSubmissions
|
||||
@ApiOperation(value = "开票")
|
||||
@@ -128,5 +144,21 @@ public class OrderBuyerController {
|
||||
return ResultUtil.data(orderService.invoice(orderSn));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询物流踪迹")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "orderSn", value = "订单编号", required = true, dataType = "String", paramType = "path")
|
||||
})
|
||||
@GetMapping(value = "/getTracesList/{orderSn}")
|
||||
public ResultMessage<Object> getTracesList(@NotBlank(message = "订单编号不能为空") @PathVariable String orderSn) {
|
||||
return ResultUtil.data(orderPackageService.getOrderPackageVOList(orderSn));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查看包裹列表")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "orderSn", value = "订单编号", required = true, dataType = "String", paramType = "path")
|
||||
})
|
||||
@GetMapping(value = "/getPackage/{orderSn}")
|
||||
public ResultMessage<Object> getPackage(@NotBlank(message = "订单编号不能为空") @PathVariable String orderSn) {
|
||||
return ResultUtil.data(orderPackageService.getOrderPackageVOList(orderSn));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ 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.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@@ -26,6 +27,7 @@ import javax.validation.constraints.Min;
|
||||
@RestController
|
||||
@Api(tags = "买家端,预存款充值记录接口")
|
||||
@RequestMapping("/buyer/trade/recharge")
|
||||
@Validated
|
||||
public class RechargeTradeBuyerController {
|
||||
|
||||
@Autowired
|
||||
@@ -37,7 +39,10 @@ public class RechargeTradeBuyerController {
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "price", value = "充值金额", required = true, dataType = "double", paramType = "query")
|
||||
})
|
||||
public ResultMessage<Recharge> create(@Max(value = 10000, message = "充值金额单次最多允许充值10000元") @Min(value = 1, message = "充值金额单次最少充值金额为1元") Double price) {
|
||||
public ResultMessage<Recharge> create(
|
||||
@Max(value = 10000, message = "充值金额单次最多允许充值10000元")
|
||||
@Min(value = 1, message = "充值金额单次最少充值金额为1元")
|
||||
Double price) {
|
||||
Recharge recharge = this.rechargeService.recharge(price);
|
||||
return ResultUtil.data(recharge);
|
||||
}
|
||||
|
||||
@@ -47,6 +47,16 @@ public class PageBuyerController {
|
||||
return ResultUtil.data(pageDataVO);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取店铺首页")
|
||||
@GetMapping("/getStore")
|
||||
public ResultMessage<PageDataVO> getShopPage(@RequestParam String clientType,String storeId) {
|
||||
PageDataDTO pageDataDTO = new PageDataDTO(PageEnum.STORE.name());
|
||||
pageDataDTO.setPageClientType(clientType);
|
||||
pageDataDTO.setNum(storeId);
|
||||
PageDataVO pageDataVO=pageService.getPageData(pageDataDTO);
|
||||
return ResultUtil.data(pageDataVO);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取页面数据")
|
||||
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "String", paramType = "path")
|
||||
@GetMapping("/get/{id}")
|
||||
|
||||
@@ -3,6 +3,8 @@ package cn.lili.controller.passport;
|
||||
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.security.enums.UserEnums;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.member.entity.dos.Member;
|
||||
@@ -26,7 +28,6 @@ import org.springframework.web.context.request.async.DeferredResult;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
|
||||
@@ -94,7 +95,7 @@ public class MemberBuyerController {
|
||||
deferredResult.setResult(new ResponseEntity<>(ResultUtil.error(ResultCode.ERROR), HttpStatus.OK));
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
}, Executors.newCachedThreadPool());
|
||||
});
|
||||
return deferredResult;
|
||||
}
|
||||
|
||||
@@ -153,6 +154,32 @@ public class MemberBuyerController {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "绑定手机号")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "username", value = "用户名", required = true, paramType = "query"),
|
||||
@ApiImplicitParam(name = "mobile", value = "手机号", required = true, paramType = "query"),
|
||||
@ApiImplicitParam(name = "code", value = "验证码", required = true, paramType = "query"),
|
||||
})
|
||||
@PostMapping("/bindMobile")
|
||||
public ResultMessage<Object> bindMobile(@NotNull(message = "用户名不能为空") @RequestParam String username,
|
||||
@NotNull(message = "手机号为空") @RequestParam String mobile,
|
||||
@NotNull(message = "验证码为空") @RequestParam String code,
|
||||
@RequestHeader String uuid) {
|
||||
if (smsUtil.verifyCode(mobile, VerificationEnums.BIND_MOBILE, uuid, code)) {
|
||||
Member member = memberService.findByUsername(username);
|
||||
Member memberByMobile = memberService.findByMobile(mobile);
|
||||
if (member == null) {
|
||||
throw new ServiceException(ResultCode.USER_NOT_EXIST);
|
||||
}
|
||||
if(memberByMobile != null){
|
||||
throw new ServiceException(ResultCode.USER_MOBILE_REPEATABLE_ERROR);
|
||||
}
|
||||
return ResultUtil.data(memberService.changeMobile(member.getId(), mobile));
|
||||
} else {
|
||||
throw new ServiceException(ResultCode.VERIFICATION_SMS_CHECKED_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "注册用户")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "username", value = "用户名", required = true, paramType = "query"),
|
||||
@@ -249,12 +276,9 @@ public class MemberBuyerController {
|
||||
}
|
||||
|
||||
@ApiOperation(value = "注销账号")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "password", value = "密码", required = true, paramType = "query")
|
||||
})
|
||||
@PutMapping("/cancellation")
|
||||
public ResultMessage<Member> cancellation(@NotNull(message = "密码不能为空") @RequestParam String password) {
|
||||
memberService.cancellation(password);
|
||||
public ResultMessage<Member> cancellation() {
|
||||
memberService.cancellation();
|
||||
return ResultUtil.success();
|
||||
}
|
||||
|
||||
@@ -264,4 +288,18 @@ public class MemberBuyerController {
|
||||
return ResultUtil.data(this.memberService.refreshToken(refreshToken));
|
||||
}
|
||||
|
||||
@GetMapping("/getImUser")
|
||||
@ApiOperation(value = "获取用户信息")
|
||||
public ResultMessage<Member> getImUser() {
|
||||
AuthUser authUser = UserContext.getCurrentUser();
|
||||
return ResultUtil.data(memberService.getById(authUser.getId()));
|
||||
}
|
||||
|
||||
@GetMapping("/getImUserDetail/{memberId}")
|
||||
@ApiImplicitParam(name = "memberId", value = "店铺Id", required = true, dataType = "String", paramType = "path")
|
||||
@ApiOperation(value = "获取用户信息")
|
||||
public ResultMessage<Member> getImUserDetail(@PathVariable String memberId) {
|
||||
return ResultUtil.data(memberService.getById(memberId));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ public class ConnectBuyerWebController {
|
||||
|
||||
|
||||
@GetMapping("/login/web/{type}")
|
||||
@ApiOperation(value = "WEB信任登录授权")
|
||||
@ApiOperation(value = "WEB信任登录授权,包含PC、WAP")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "type", value = "登录方式:QQ,微信,微信_PC",
|
||||
allowableValues = "QQ,WECHAT,WECHAT_PC", paramType = "path")
|
||||
@@ -75,25 +75,13 @@ public class ConnectBuyerWebController {
|
||||
return connectUtil.getResult(state);
|
||||
}
|
||||
|
||||
@GetMapping("/register/auto")
|
||||
@ApiOperation(value = "WEB信任登录授权")
|
||||
public ResultMessage<Token> webAuthorize() {
|
||||
Token token = memberService.autoRegister();
|
||||
return ResultUtil.data(token);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "unionID登录")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "openId", value = "openid", required = true, paramType = "query"),
|
||||
@ApiImplicitParam(name = "type", value = "联合类型", required = true,
|
||||
allowableValues = "WECHAT,QQ,ALIPAY,WEIBO,APPLE", paramType = "query"),
|
||||
@ApiImplicitParam(name = "uniAccessToken", value = "联合登陆返回的accessToken", required = true, paramType = "query")
|
||||
})
|
||||
@GetMapping("/app/login")
|
||||
public ResultMessage<Token> unionLogin(ConnectAuthUser authUser, @RequestHeader("uuid") String uuid) {
|
||||
@ApiOperation(value = "APP-unionID登录")
|
||||
@PostMapping("/app/login")
|
||||
public ResultMessage<Token> unionLogin(@RequestBody ConnectAuthUser authUser, @RequestHeader("uuid") String uuid) {
|
||||
try {
|
||||
return ResultUtil.data(connectService.appLoginCallback(authUser, uuid));
|
||||
return ResultUtil.data(connectService.unionLoginCallback(authUser, uuid));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error("unionID登录错误", e);
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -7,11 +7,14 @@ 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.MemberCoupon;
|
||||
import cn.lili.modules.promotion.entity.dto.CouponActivityTrigger;
|
||||
import cn.lili.modules.promotion.entity.dto.search.CouponSearchParams;
|
||||
import cn.lili.modules.promotion.entity.dto.search.MemberCouponSearchParams;
|
||||
import cn.lili.modules.promotion.entity.enums.CouponActivityTypeEnum;
|
||||
import cn.lili.modules.promotion.entity.enums.CouponGetEnum;
|
||||
import cn.lili.modules.promotion.entity.enums.PromotionsStatusEnum;
|
||||
import cn.lili.modules.promotion.entity.vos.CouponVO;
|
||||
import cn.lili.modules.promotion.service.CouponActivityService;
|
||||
import cn.lili.modules.promotion.service.CouponService;
|
||||
import cn.lili.modules.promotion.service.MemberCouponService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -26,6 +29,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
@@ -45,12 +49,39 @@ public class CouponBuyerController {
|
||||
@Autowired
|
||||
private CouponService couponService;
|
||||
|
||||
/**
|
||||
* 优惠券活动
|
||||
*/
|
||||
@Autowired
|
||||
private CouponActivityService couponActivityService;
|
||||
|
||||
/**
|
||||
* 会员优惠券
|
||||
*/
|
||||
@Autowired
|
||||
private MemberCouponService memberCouponService;
|
||||
|
||||
@GetMapping("/activity")
|
||||
@ApiOperation(value = "自动领取优惠券")
|
||||
public ResultMessage<List<MemberCoupon>> activity() {
|
||||
if (UserContext.getCurrentUser() == null) {
|
||||
return ResultUtil.success();
|
||||
}
|
||||
List<MemberCoupon> memberCouponList = couponActivityService.trigger(
|
||||
CouponActivityTrigger.builder()
|
||||
.couponActivityTypeEnum(CouponActivityTypeEnum.AUTO_COUPON)
|
||||
.nickName(UserContext.getCurrentUser().getNickName())
|
||||
.userId(UserContext.getCurrentUser().getId())
|
||||
.build());
|
||||
memberCouponList.addAll(couponActivityService.trigger(
|
||||
CouponActivityTrigger.builder()
|
||||
.couponActivityTypeEnum(CouponActivityTypeEnum.SPECIFY)
|
||||
.nickName(UserContext.getCurrentUser().getNickName())
|
||||
.userId(UserContext.getCurrentUser().getId())
|
||||
.build()));
|
||||
return ResultUtil.data(memberCouponList);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@ApiOperation(value = "获取可领取优惠券列表")
|
||||
public ResultMessage<IPage<CouponVO>> getCouponList(CouponSearchParams queryParam, PageVO page) {
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
package cn.lili.controller.store;
|
||||
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.security.OperationalJudgment;
|
||||
import cn.lili.common.security.context.UserContext;
|
||||
import cn.lili.common.vo.PageVO;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.store.entity.dos.StoreAddress;
|
||||
import cn.lili.modules.store.service.StoreAddressService;
|
||||
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;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 买家端,商家地址(自提点)接口
|
||||
*
|
||||
* @author chc
|
||||
* @since 2022/6/2114:46
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,商家地址(自提点)接口")
|
||||
@RequestMapping("/buyer/store/address")
|
||||
public class StoreAddressBuyerController {
|
||||
|
||||
/**
|
||||
* 店铺自提点
|
||||
*/
|
||||
@Autowired
|
||||
private StoreAddressService storeAddressService;
|
||||
|
||||
@ApiOperation(value = "获取商家自提点分页")
|
||||
@ApiImplicitParam(name = "storeId", value = "店铺Id", required = true, dataType = "String", paramType = "path")
|
||||
@GetMapping("/page/{storeId}")
|
||||
public ResultMessage<IPage<StoreAddress>> get(PageVO pageVo,@PathVariable String storeId) {
|
||||
return ResultUtil.data(storeAddressService.getStoreAddress(storeId, pageVo));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取商家自提点信息")
|
||||
@ApiImplicitParam(name = "id", value = "自提点ID", required = true, paramType = "path")
|
||||
@GetMapping("/{id}")
|
||||
public ResultMessage<StoreAddress> get(@PathVariable String id) {
|
||||
StoreAddress address = OperationalJudgment.judgment(storeAddressService.getById(id));
|
||||
return ResultUtil.data(address);
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,13 @@
|
||||
package cn.lili.controller.store;
|
||||
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.security.AuthUser;
|
||||
import cn.lili.common.security.context.UserContext;
|
||||
import cn.lili.common.vo.PageVO;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.goods.entity.vos.StoreGoodsLabelVO;
|
||||
import cn.lili.modules.goods.service.StoreGoodsLabelService;
|
||||
import cn.lili.modules.store.entity.dos.Store;
|
||||
import cn.lili.modules.store.entity.dto.StoreBankDTO;
|
||||
import cn.lili.modules.store.entity.dto.StoreCompanyDTO;
|
||||
import cn.lili.modules.store.entity.dto.StoreOtherInfoDTO;
|
||||
@@ -57,6 +59,20 @@ public class StoreBuyerController {
|
||||
return ResultUtil.data(storeService.findByConditionPage(entity, page));
|
||||
}
|
||||
|
||||
@GetMapping("/store")
|
||||
@ApiOperation(value = "im-获取店铺信息")
|
||||
public ResultMessage<Store> getStoreUser() {
|
||||
AuthUser authUser = UserContext.getCurrentUser();
|
||||
return ResultUtil.data(storeService.getById(authUser.getStoreId()));
|
||||
}
|
||||
|
||||
@GetMapping("/store/{storeId}")
|
||||
@ApiImplicitParam(name = "storeId", value = "店铺Id", required = true, dataType = "String", paramType = "path")
|
||||
@ApiOperation(value = "im-店铺ID获取店铺信息")
|
||||
public ResultMessage<Store> getStoreUserDetail(@PathVariable String storeId) {
|
||||
return ResultUtil.data(storeService.getById(storeId));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "通过id获取店铺信息")
|
||||
@ApiImplicitParam(name = "id", value = "店铺ID", required = true, paramType = "path")
|
||||
@GetMapping(value = "/get/detail/{id}")
|
||||
|
||||
@@ -9,22 +9,28 @@ import cn.lili.common.security.context.UserContext;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.member.entity.dos.Member;
|
||||
import cn.lili.modules.member.service.MemberService;
|
||||
import cn.lili.modules.system.entity.dos.Setting;
|
||||
import cn.lili.modules.system.entity.dto.WithdrawalSetting;
|
||||
import cn.lili.modules.system.entity.enums.SettingEnum;
|
||||
import cn.lili.modules.system.entity.vo.WithdrawalSettingVO;
|
||||
import cn.lili.modules.system.service.SettingService;
|
||||
import cn.lili.modules.verification.entity.enums.VerificationEnums;
|
||||
import cn.lili.modules.verification.service.VerificationService;
|
||||
import cn.lili.modules.wallet.entity.dos.MemberWallet;
|
||||
import cn.lili.modules.wallet.entity.vo.MemberWalletVO;
|
||||
import cn.lili.modules.wallet.service.MemberWalletService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.google.gson.Gson;
|
||||
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.security.crypto.bcrypt.BCryptPasswordEncoder;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.Pattern;
|
||||
|
||||
/**
|
||||
@@ -36,6 +42,7 @@ import javax.validation.constraints.Pattern;
|
||||
@RestController
|
||||
@Api(tags = "买家端,会员余额接口")
|
||||
@RequestMapping("/buyer/wallet/wallet")
|
||||
@Validated
|
||||
public class MemberWalletBuyerController {
|
||||
|
||||
/**
|
||||
@@ -54,6 +61,9 @@ public class MemberWalletBuyerController {
|
||||
@Autowired
|
||||
private VerificationService verificationService;
|
||||
|
||||
@Autowired
|
||||
private SettingService settingService;
|
||||
|
||||
@GetMapping
|
||||
@ApiOperation(value = "查询会员预存款余额")
|
||||
public ResultMessage<MemberWalletVO> get() {
|
||||
@@ -64,6 +74,31 @@ public class MemberWalletBuyerController {
|
||||
throw new ServiceException(ResultCode.USER_NOT_LOGIN);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/withdrawalSettingVO")
|
||||
@ApiOperation(value = "获取提现设置VO")
|
||||
public ResultMessage<Object> minPrice() {
|
||||
Setting setting = settingService.get(SettingEnum.WITHDRAWAL_SETTING.name());
|
||||
WithdrawalSetting withdrawalSetting = new Gson().fromJson(setting.getSettingValue(), WithdrawalSetting.class);
|
||||
|
||||
WithdrawalSettingVO withdrawalSettingVO = new WithdrawalSettingVO();
|
||||
withdrawalSettingVO.setMinPrice(withdrawalSetting.getMinPrice());
|
||||
withdrawalSettingVO.setFee(withdrawalSetting.getFee());
|
||||
withdrawalSettingVO.setType(withdrawalSetting.getType());
|
||||
return ResultUtil.data(withdrawalSettingVO);
|
||||
}
|
||||
|
||||
@PreventDuplicateSubmissions
|
||||
@PostMapping(value = "/withdrawal")
|
||||
@ApiOperation(value = "会员中心余额提现")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "price", value = "提现金额", required = true, dataType = "double", paramType = "query"),
|
||||
@ApiImplicitParam(name = "realName", value = "真实姓名", required = true, dataType = "String", paramType = "query"),
|
||||
@ApiImplicitParam(name = "connectNumber", value = "第三方登录账号", required = true, dataType = "String", paramType = "query")
|
||||
})
|
||||
public ResultMessage<Boolean> withdrawal(@Max(value = 9999, message = "充值金额单次最多允许提现9999元") Double price, @RequestParam String realName, @RequestParam String connectNumber) {
|
||||
return ResultUtil.data(memberWalletService.applyWithdrawal(price, realName, connectNumber));
|
||||
}
|
||||
|
||||
@PostMapping(value = "/set-password")
|
||||
@ApiOperation(value = "设置支付密码")
|
||||
@ApiImplicitParams({
|
||||
@@ -120,15 +155,4 @@ public class MemberWalletBuyerController {
|
||||
return memberWalletService.checkPassword();
|
||||
}
|
||||
|
||||
|
||||
@PreventDuplicateSubmissions
|
||||
@PostMapping(value = "/withdrawal")
|
||||
@ApiOperation(value = "会员中心余额提现")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "price", value = "提现金额", required = true, dataType = "double", paramType = "query")
|
||||
})
|
||||
public ResultMessage<Boolean> withdrawal(@Max(value = 9999, message = "充值金额单次最多允许提现9999元") @Min(value = 1, message = "充值金额单次最少提现金额为1元") Double price) {
|
||||
return ResultUtil.data(memberWalletService.applyWithdrawal(price));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ public class BuyerAuthenticationFilter extends BasicAuthenticationFilter {
|
||||
AuthUser authUser = new Gson().fromJson(json, AuthUser.class);
|
||||
|
||||
//校验redis中是否有权限
|
||||
if (cache.hasKey(CachePrefix.ACCESS_TOKEN.getPrefix(UserEnums.MEMBER) + jwt)) {
|
||||
if (cache.hasKey(CachePrefix.ACCESS_TOKEN.getPrefix(UserEnums.MEMBER,authUser.getId()) + jwt)) {
|
||||
//构造返回信息
|
||||
List<GrantedAuthority> auths = new ArrayList<>();
|
||||
auths.add(new SimpleGrantedAuthority("ROLE_" + authUser.getRole().name()));
|
||||
|
||||
@@ -213,18 +213,6 @@ lili:
|
||||
lbs:
|
||||
key: 4BYBZ-7MT6S-PUAOA-6BNWL-FJUD7-UUFXT
|
||||
sk: zhNKVrJK6UPOhqIjn8AQvG37b9sz6
|
||||
#域名
|
||||
domain:
|
||||
pc: https://pc-b2b2c.pickmall.cn
|
||||
wap: https://m-b2b2c.pickmall.cn
|
||||
store: https://store-b2b2c.pickmall.cn
|
||||
admin: https://admin-b2b2c.pickmall.cn
|
||||
#api地址
|
||||
api:
|
||||
buyer: https://buyer-api.pickmall.cn
|
||||
common: https://common-api.pickmall.cn
|
||||
manager: https://admin-api.pickmall.cn
|
||||
store: https://store-api.pickmall.cn
|
||||
|
||||
# jwt 细节设定
|
||||
jwt-setting:
|
||||
@@ -265,6 +253,8 @@ lili:
|
||||
order-group: lili_order_group
|
||||
member-topic: lili_member_topic
|
||||
member-group: lili_member_group
|
||||
store-topic: lili_store_topic
|
||||
store-group: lili_store_group
|
||||
other-topic: lili_other_topic
|
||||
other-group: lili_other_group
|
||||
notice-topic: lili_notice_topic
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
package cn.lili.controller.common;
|
||||
|
||||
import cn.lili.cache.Cache;
|
||||
import cn.lili.common.context.ThreadContextHolder;
|
||||
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.security.enums.UserEnums;
|
||||
import cn.lili.common.vo.PageVO;
|
||||
import cn.lili.common.utils.ResponseUtil;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.common.vo.SearchVO;
|
||||
import cn.lili.modules.file.entity.File;
|
||||
import cn.lili.modules.file.entity.dto.FileOwnerDTO;
|
||||
import cn.lili.modules.file.service.FileService;
|
||||
@@ -43,10 +43,14 @@ public class FileController {
|
||||
@ApiOperation(value = "获取自己的图片资源")
|
||||
@GetMapping
|
||||
@ApiImplicitParam(name = "title", value = "名称模糊匹配")
|
||||
public ResultMessage<IPage<File>> getFileList(@RequestHeader String accessToken, File file, SearchVO searchVO, PageVO pageVo) {
|
||||
public ResultMessage<IPage<File>> getFileList(@RequestHeader String accessToken, FileOwnerDTO fileOwnerDTO) {
|
||||
|
||||
AuthUser authUser = UserContext.getAuthUser(cache, accessToken);
|
||||
FileOwnerDTO fileOwnerDTO = new FileOwnerDTO();
|
||||
if (authUser == null) {
|
||||
ResponseUtil.output(ThreadContextHolder.getHttpResponse(), 403, ResponseUtil.resultMap(false,
|
||||
403, "登录已失效,请重新登录"));
|
||||
return null;
|
||||
}
|
||||
//只有买家才写入自己id
|
||||
if (authUser.getRole().equals(UserEnums.MEMBER)) {
|
||||
fileOwnerDTO.setOwnerId(authUser.getId());
|
||||
@@ -55,7 +59,7 @@ public class FileController {
|
||||
fileOwnerDTO.setOwnerId(authUser.getStoreId());
|
||||
}
|
||||
fileOwnerDTO.setUserEnums(authUser.getRole().name());
|
||||
return ResultUtil.data(fileService.customerPageOwner(fileOwnerDTO, file, searchVO, pageVo));
|
||||
return ResultUtil.data(fileService.customerPageOwner(fileOwnerDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "文件重命名")
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
package cn.lili.controller.common;
|
||||
|
||||
import cn.lili.common.enums.ResultCode;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.security.context.UserContext;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.file.entity.FileDirectory;
|
||||
import cn.lili.modules.file.entity.dto.FileDirectoryDTO;
|
||||
import cn.lili.modules.file.service.FileDirectoryService;
|
||||
import cn.lili.modules.file.service.FileService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 文件目录管理接口
|
||||
*
|
||||
* @author Chopper
|
||||
* @since 2020/11/26 15:41
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "文件目录管理接口")
|
||||
@RequestMapping("/common/resource/fileDirectory")
|
||||
@RequiredArgsConstructor
|
||||
public class FileDirectoryController {
|
||||
|
||||
private final FileDirectoryService fileDirectoryService;
|
||||
private final FileService fileService;
|
||||
|
||||
@ApiOperation(value = "获取文件目录列表")
|
||||
@GetMapping
|
||||
public ResultMessage<List<FileDirectoryDTO>> getSceneFileList() {
|
||||
return ResultUtil.data(fileDirectoryService.getFileDirectoryList(UserContext.getCurrentUser().getId()));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "添加文件目录")
|
||||
@PostMapping
|
||||
public ResultMessage<FileDirectory> addSceneFileList(@RequestBody @Valid FileDirectory fileDirectory) {
|
||||
fileDirectory.setDirectoryType(UserContext.getCurrentUser().getRole().name());
|
||||
fileDirectory.setOwnerId(UserContext.getCurrentUser().getId());
|
||||
fileDirectoryService.save(fileDirectory);
|
||||
return ResultUtil.data(fileDirectory);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改文件目录")
|
||||
@PutMapping
|
||||
public ResultMessage<FileDirectory> editSceneFileList(@RequestBody @Valid FileDirectory fileDirectory) {
|
||||
fileDirectory.setDirectoryType(UserContext.getCurrentUser().getRole().name());
|
||||
fileDirectory.setOwnerId(UserContext.getCurrentUser().getId());
|
||||
fileDirectoryService.updateById(fileDirectory);
|
||||
return ResultUtil.data(fileDirectory);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除文件目录")
|
||||
@DeleteMapping("/{id}")
|
||||
public ResultMessage<Object> deleteSceneFileList(@PathVariable String id) {
|
||||
//检测文件夹下是否包含图片
|
||||
if(fileService.countByDirectory(id)){
|
||||
return ResultUtil.error(ResultCode.FILE_DIRECTORY_NOT_EMPTY);
|
||||
}
|
||||
//删除目录
|
||||
fileDirectoryService.removeById(id);
|
||||
return ResultUtil.success();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package cn.lili.controller.common;
|
||||
|
||||
import cn.hutool.core.text.CharSequenceUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.lili.cache.Cache;
|
||||
import cn.lili.common.enums.ResultCode;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
@@ -12,7 +13,6 @@ import cn.lili.common.utils.Base64DecodeMultipartFile;
|
||||
import cn.lili.common.utils.CommonUtil;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.file.entity.File;
|
||||
import cn.lili.modules.file.plugin.FilePlugin;
|
||||
import cn.lili.modules.file.plugin.FilePluginFactory;
|
||||
import cn.lili.modules.file.service.FileService;
|
||||
import cn.lili.modules.system.entity.dos.Setting;
|
||||
@@ -22,10 +22,7 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.InputStream;
|
||||
@@ -56,24 +53,30 @@ public class UploadController {
|
||||
@PostMapping(value = "/file")
|
||||
public ResultMessage<Object> upload(MultipartFile file,
|
||||
String base64,
|
||||
@RequestHeader String accessToken) {
|
||||
@RequestHeader String accessToken, @RequestParam String directoryPath) {
|
||||
|
||||
if(StrUtil.isBlank(directoryPath)){
|
||||
directoryPath = "default";
|
||||
}
|
||||
|
||||
AuthUser authUser = UserContext.getAuthUser(cache, accessToken);
|
||||
//如果用户未登录,则无法上传图片
|
||||
if (authUser == null) {
|
||||
throw new ServiceException(ResultCode.USER_AUTHORITY_ERROR);
|
||||
}
|
||||
if (file == null) {
|
||||
throw new ServiceException(ResultCode.FILE_NOT_EXIST_ERROR);
|
||||
}
|
||||
Setting setting = settingService.get(SettingEnum.OSS_SETTING.name());
|
||||
if (setting == null || CharSequenceUtil.isBlank(setting.getSettingValue())) {
|
||||
throw new ServiceException(ResultCode.OSS_NOT_EXIST);
|
||||
}
|
||||
if (file == null || CharSequenceUtil.isEmpty(file.getContentType())) {
|
||||
if (CharSequenceUtil.isEmpty(file.getContentType())) {
|
||||
throw new ServiceException(ResultCode.IMAGE_FILE_EXT_ERROR);
|
||||
}
|
||||
|
||||
|
||||
if (!CharSequenceUtil.containsAny(file.getContentType().toLowerCase(), "image")) {
|
||||
if (!CharSequenceUtil.containsAny(Objects.requireNonNull(file.getContentType()).toLowerCase(), "image", "video")) {
|
||||
throw new ServiceException(ResultCode.FILE_TYPE_NOT_SUPPORT);
|
||||
}
|
||||
|
||||
@@ -87,6 +90,12 @@ public class UploadController {
|
||||
try {
|
||||
InputStream inputStream = file.getInputStream();
|
||||
//上传至第三方云服务或服务器
|
||||
String scene = UserContext.getCurrentUser().getRole().name();
|
||||
if (StrUtil.equalsAny(UserContext.getCurrentUser().getRole().name(), UserEnums.MEMBER.name(), UserEnums.STORE.name(), UserEnums.SEAT.name())) {
|
||||
scene = scene + "/" + authUser.getId();
|
||||
}
|
||||
fileKey = scene + "/" + directoryPath + "/" + fileKey;
|
||||
//上传至第三方云服务或服务器
|
||||
result = filePluginFactory.filePlugin().inputStreamUpload(inputStream, fileKey);
|
||||
//保存数据信息至数据库
|
||||
newFile.setName(file.getOriginalFilename());
|
||||
@@ -99,8 +108,19 @@ public class UploadController {
|
||||
//如果是店铺,则记录店铺id
|
||||
if (authUser.getRole().equals(UserEnums.STORE)) {
|
||||
newFile.setOwnerId(authUser.getStoreId());
|
||||
newFile.setOwnerName(authUser.getStoreName());
|
||||
} else {
|
||||
newFile.setOwnerId(authUser.getId());
|
||||
newFile.setOwnerName(authUser.getNickName());
|
||||
}
|
||||
|
||||
//存储文件目录
|
||||
if (StrUtil.isNotEmpty(directoryPath)) {
|
||||
if (directoryPath.indexOf("/") > 0) {
|
||||
newFile.setFileDirectoryId(directoryPath.substring(directoryPath.lastIndexOf("/") + 1));
|
||||
} else {
|
||||
newFile.setFileDirectoryId(directoryPath);
|
||||
}
|
||||
}
|
||||
fileService.save(newFile);
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -190,18 +190,6 @@ lili:
|
||||
interfereNum: 0
|
||||
#允许误差像素
|
||||
faultTolerant: 3
|
||||
#短信模版配置
|
||||
sms:
|
||||
#登录
|
||||
LOGIN: SMS_205755300
|
||||
#注册
|
||||
REGISTER: SMS_205755298
|
||||
#找回密码
|
||||
FIND_USER: SMS_205755301
|
||||
#设置密码
|
||||
UPDATE_PASSWORD: SMS_205755297
|
||||
#支付密码
|
||||
WALLET_PASSWORD: SMS_205755301
|
||||
system:
|
||||
isTestModel: true
|
||||
statistics:
|
||||
|
||||
@@ -24,13 +24,13 @@ spring:
|
||||
boot:
|
||||
admin:
|
||||
client:
|
||||
url: http://192.168.0.116:8000
|
||||
url: http://127.0.0.1:8000
|
||||
cache:
|
||||
type: redis
|
||||
# Redis
|
||||
redis:
|
||||
host: 127.0.0.1
|
||||
port: 6379
|
||||
host: 192.168.31.100
|
||||
port: 30379
|
||||
password: lilishop
|
||||
lettuce:
|
||||
pool:
|
||||
@@ -60,7 +60,7 @@ spring:
|
||||
default-datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://127.0.0.1:3306/lilishop?useUnicode=true&characterEncoding=utf-8&useSSL=false&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
url: jdbc:mysql://192.168.31.100:30306/lilishop?useUnicode=true&characterEncoding=utf-8&useSSL=false&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: lilishop
|
||||
maxActive: 50
|
||||
@@ -209,21 +209,8 @@ lili:
|
||||
interfereNum: 1
|
||||
#允许误差像素
|
||||
faultTolerant: 3
|
||||
#短信模版配置
|
||||
sms:
|
||||
#登录
|
||||
LOGIN: SMS_205755300
|
||||
#注册
|
||||
REGISTER: SMS_205755298
|
||||
#找回密码
|
||||
FIND_USER: SMS_205755301
|
||||
#设置密码
|
||||
UPDATE_PASSWORD: SMS_205755297
|
||||
#支付密码
|
||||
WALLET_PASSWORD: SMS_205755301
|
||||
system:
|
||||
isDemoSite: false
|
||||
isTestModel: true
|
||||
# 脱敏级别:
|
||||
# 0:不做脱敏处理
|
||||
# 1:管理端用户手机号等信息脱敏
|
||||
@@ -241,16 +228,16 @@ lili:
|
||||
sk: zhNKVrJK6UPOhqIjn8AQvG37b9sz6
|
||||
#域名
|
||||
domain:
|
||||
pc: http://192.168.0.116:8888
|
||||
wap: http://192.168.0.116:8888
|
||||
seller: http://192.168.0.116:8888
|
||||
admin: http://192.168.0.116:8888
|
||||
pc: http://127.0.0.1:8888
|
||||
wap: http://127.0.0.1:8888
|
||||
seller: http://127.0.0.1:8888
|
||||
admin: http://127.0.0.1:8888
|
||||
#api地址
|
||||
api:
|
||||
buyer: https://z171l91606.51mypc.cn
|
||||
base: http://192.168.0.116:8888
|
||||
manager: http://192.168.0.116:8888
|
||||
seller: http://192.168.0.116:8888
|
||||
base: http://127.0.0.1:8888
|
||||
manager: http://127.0.0.1:8888
|
||||
seller: http://127.0.0.1:8888
|
||||
|
||||
# jwt 细节设定
|
||||
jwt-setting:
|
||||
@@ -269,7 +256,7 @@ lili:
|
||||
data:
|
||||
elasticsearch:
|
||||
cluster-name: elasticsearch
|
||||
cluster-nodes: 127.0.0.1:9200
|
||||
cluster-nodes: 192.168.31.100:30920
|
||||
index:
|
||||
number-of-replicas: 0
|
||||
number-of-shards: 3
|
||||
@@ -280,28 +267,28 @@ lili:
|
||||
# password: LiLiShopES
|
||||
|
||||
logstash:
|
||||
server: 127.0.0.1:4560
|
||||
server: 192.168.31.100:30560
|
||||
rocketmq:
|
||||
promotion-topic: lili_promotion_topic
|
||||
promotion-group: lili_promotion_group
|
||||
msg-ext-topic: lili_msg_topic
|
||||
msg-ext-group: lili_msg_group
|
||||
goods-topic: lili_goods_topic
|
||||
goods-group: lili_goods_group
|
||||
order-topic: lili_order_topic
|
||||
order-group: lili_order_group
|
||||
member-topic: lili_member_topic
|
||||
member-group: lili_member_group
|
||||
other-topic: lili_other_topic
|
||||
other-group: lili_other_group
|
||||
notice-topic: lili_notice_topic
|
||||
notice-group: lili_notice_group
|
||||
notice-send-topic: lili_send_notice_topic
|
||||
notice-send-group: lili_send_notice_group
|
||||
after-sale-topic: lili_after_sale_topic
|
||||
after-sale-group: lili_after_sale_group
|
||||
promotion-topic: shop_lili_promotion_topic
|
||||
promotion-group: shop_lili_promotion_group
|
||||
msg-ext-topic: shop_lili_msg_topic
|
||||
msg-ext-group: shop_lili_msg_group
|
||||
goods-topic: shop_lili_goods_topic
|
||||
goods-group: shop_lili_goods_group
|
||||
order-topic: shop_lili_order_topic
|
||||
order-group: shop_lili_order_group
|
||||
member-topic: shop_lili_member_topic
|
||||
member-group: shop_lili_member_group
|
||||
other-topic: shop_lili_other_topic
|
||||
other-group: shop_lili_other_group
|
||||
notice-topic: shop_lili_notice_topic
|
||||
notice-group: shop_lili_notice_group
|
||||
notice-send-topic: shop_lili_send_notice_topic
|
||||
notice-send-group: shop_lili_send_notice_group
|
||||
after-sale-topic: shop_lili_after_sale_topic
|
||||
after-sale-group: shop_lili_after_sale_group
|
||||
rocketmq:
|
||||
name-server: 127.0.0.1:9876
|
||||
name-server: 192.168.31.100:30876
|
||||
isVIPChannel: false
|
||||
producer:
|
||||
group: lili_group
|
||||
@@ -310,7 +297,7 @@ rocketmq:
|
||||
xxl:
|
||||
job:
|
||||
admin:
|
||||
addresses: http://127.0.0.1:9001/xxl-job-admin
|
||||
addresses: http://192.168.31.100:30001/xxl-job-admin
|
||||
executor:
|
||||
appname: xxl-job-executor-lilishop
|
||||
address:
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package cn.lili.event;
|
||||
|
||||
import cn.lili.modules.connect.entity.dto.ConnectAuthUser;
|
||||
import cn.lili.modules.member.entity.dos.Member;
|
||||
|
||||
/**
|
||||
* 会员联合登录消息
|
||||
*
|
||||
* @author Chopper
|
||||
* @since 2020/11/17 7:13 下午
|
||||
*/
|
||||
public interface MemberConnectLoginEvent {
|
||||
|
||||
/**
|
||||
* 会员联合登录
|
||||
*
|
||||
* @param member 会员
|
||||
* @param authUser 第三方登录
|
||||
*/
|
||||
void memberConnectLogin(Member member, ConnectAuthUser authUser);
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package cn.lili.event;
|
||||
|
||||
import cn.lili.modules.member.entity.dos.Member;
|
||||
|
||||
/**
|
||||
* @author chc
|
||||
* @since 2022/6/2114:46
|
||||
*/
|
||||
public interface MemberInfoChangeEvent {
|
||||
|
||||
/**
|
||||
* 会员信息更改消息
|
||||
*
|
||||
* @param member 会员信息
|
||||
*/
|
||||
void memberInfoChange(Member member);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package cn.lili.event;
|
||||
|
||||
|
||||
import cn.lili.modules.store.entity.dos.Store;
|
||||
|
||||
/**
|
||||
* @author chc
|
||||
* @since 2022/6/2114:46
|
||||
*/
|
||||
public interface StoreSettingChangeEvent {
|
||||
|
||||
/**
|
||||
* 店铺信息更改消息
|
||||
*
|
||||
* @param store 店铺信息
|
||||
*/
|
||||
void storeSettingChange(Store store);
|
||||
}
|
||||
@@ -1,23 +1,24 @@
|
||||
package cn.lili.event.impl;
|
||||
|
||||
import cn.hutool.core.date.DateField;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import cn.lili.event.AfterSaleStatusChangeEvent;
|
||||
import cn.lili.event.OrderStatusChangeEvent;
|
||||
import cn.lili.modules.distribution.entity.dos.DistributionOrder;
|
||||
import cn.lili.modules.distribution.entity.enums.DistributionOrderStatusEnum;
|
||||
import cn.lili.modules.distribution.mapper.DistributionOrderMapper;
|
||||
import cn.lili.modules.distribution.service.DistributionOrderService;
|
||||
import cn.lili.modules.order.aftersale.entity.dos.AfterSale;
|
||||
import cn.lili.modules.order.order.entity.dto.OrderMessage;
|
||||
import cn.lili.modules.order.trade.entity.enums.AfterSaleStatusEnum;
|
||||
import cn.lili.modules.system.entity.dos.Setting;
|
||||
import cn.lili.modules.system.entity.dto.DistributionSetting;
|
||||
import cn.lili.modules.system.entity.enums.SettingEnum;
|
||||
import cn.lili.modules.system.service.SettingService;
|
||||
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;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 分销订单入库
|
||||
*
|
||||
@@ -26,26 +27,21 @@ import javax.annotation.Resource;
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class DistributionOrderExecute implements OrderStatusChangeEvent, EveryDayExecute, AfterSaleStatusChangeEvent {
|
||||
public class DistributionOrderExecute implements OrderStatusChangeEvent, AfterSaleStatusChangeEvent {
|
||||
|
||||
/**
|
||||
* 分销订单
|
||||
*/
|
||||
@Autowired
|
||||
private DistributionOrderService distributionOrderService;
|
||||
/**
|
||||
* 分销订单持久层
|
||||
*/
|
||||
@Resource
|
||||
private DistributionOrderMapper distributionOrderMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public void orderChange(OrderMessage orderMessage) {
|
||||
|
||||
switch (orderMessage.getNewStatus()) {
|
||||
//订单带校验/订单代发货,则记录分销信息
|
||||
//订单带校验/订单代发货/待自提,则记录分销信息
|
||||
case TAKE:
|
||||
case STAY_PICKED_UP:
|
||||
case UNDELIVERED: {
|
||||
//记录分销订单
|
||||
distributionOrderService.calculationDistribution(orderMessage.getOrderSn());
|
||||
@@ -62,23 +58,10 @@ public class DistributionOrderExecute implements OrderStatusChangeEvent, EveryDa
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
//计算分销提佣
|
||||
distributionOrderMapper.rebate(DistributionOrderStatusEnum.WAIT_BILL.name(), new DateTime());
|
||||
|
||||
//修改分销订单状态
|
||||
distributionOrderService.update(new LambdaUpdateWrapper<DistributionOrder>()
|
||||
.eq(DistributionOrder::getDistributionOrderStatus, DistributionOrderStatusEnum.WAIT_BILL.name())
|
||||
.le(DistributionOrder::getSettleCycle, new DateTime())
|
||||
.set(DistributionOrder::getDistributionOrderStatus, DistributionOrderStatusEnum.WAIT_CASH.name()));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterSaleStatusChange(AfterSale afterSale) {
|
||||
if (afterSale.getServiceStatus().equals(AfterSaleStatusEnum.COMPLETE.name())) {
|
||||
distributionOrderService.refundOrder(afterSale.getSn());
|
||||
distributionOrderService.refundOrder(afterSale);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ public class FullDiscountExecute implements TradeEvent, OrderStatusChangeEvent {
|
||||
searchParams.setOrderPromotionType(OrderPromotionTypeEnum.GIFT.name());
|
||||
List<Order> orders = orderService.queryListByParams(searchParams);
|
||||
if (orders != null && !orders.isEmpty()) {
|
||||
orderService.systemCancel(orders.get(0).getSn(),"主订单取消,赠送订单字段自动取消");
|
||||
orderService.systemCancel(orders.get(0).getSn(),"主订单取消,赠送订单字段自动取消",true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,22 @@
|
||||
package cn.lili.event.impl;
|
||||
|
||||
|
||||
import cn.lili.cache.Cache;
|
||||
import cn.lili.cache.CachePrefix;
|
||||
import cn.lili.event.GoodsCommentCompleteEvent;
|
||||
import cn.lili.event.StoreSettingChangeEvent;
|
||||
import cn.lili.modules.goods.entity.dos.GoodsSku;
|
||||
import cn.lili.modules.goods.entity.dto.GoodsSearchParams;
|
||||
import cn.lili.modules.goods.service.GoodsService;
|
||||
import cn.lili.modules.goods.service.GoodsSkuService;
|
||||
import cn.lili.modules.member.entity.dos.MemberEvaluation;
|
||||
import cn.lili.modules.store.entity.dos.Store;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品SKU变化
|
||||
*
|
||||
@@ -14,7 +24,7 @@ import org.springframework.stereotype.Service;
|
||||
* @since 2020-07-03 11:20
|
||||
*/
|
||||
@Service
|
||||
public class GoodsSkuExecute implements GoodsCommentCompleteEvent {
|
||||
public class GoodsSkuExecute implements GoodsCommentCompleteEvent, StoreSettingChangeEvent {
|
||||
|
||||
/**
|
||||
* 商品
|
||||
@@ -22,9 +32,26 @@ public class GoodsSkuExecute implements GoodsCommentCompleteEvent {
|
||||
@Autowired
|
||||
private GoodsSkuService goodsSkuService;
|
||||
|
||||
@Autowired
|
||||
private GoodsService goodsService;
|
||||
|
||||
@Autowired
|
||||
private Cache cache;
|
||||
|
||||
@Override
|
||||
public void goodsComment(MemberEvaluation memberEvaluation) {
|
||||
goodsSkuService.updateGoodsSkuCommentNum(memberEvaluation.getSkuId());
|
||||
goodsService.updateGoodsCommentNum(memberEvaluation.getGoodsId(), memberEvaluation.getSkuId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void storeSettingChange(Store store) {
|
||||
//修改数据后,清除商品索引
|
||||
GoodsSearchParams goodsSearchParams = new GoodsSearchParams();
|
||||
goodsSearchParams.setStoreId(store.getId());
|
||||
List<String> goodsSkuKeys = new ArrayList<>();
|
||||
for (GoodsSku goodsSku : goodsSkuService.getGoodsSkuByList(goodsSearchParams)) {
|
||||
goodsSkuKeys.add(CachePrefix.GOODS_SKU.getPrefix()+goodsSku.getId());
|
||||
}
|
||||
cache.multiDel(goodsSkuKeys);
|
||||
}
|
||||
}
|
||||
|
||||
60
consumer/src/main/java/cn/lili/event/impl/ImTalkExecute.java
Normal file
60
consumer/src/main/java/cn/lili/event/impl/ImTalkExecute.java
Normal file
@@ -0,0 +1,60 @@
|
||||
package cn.lili.event.impl;
|
||||
|
||||
import cn.lili.event.MemberInfoChangeEvent;
|
||||
import cn.lili.event.StoreSettingChangeEvent;
|
||||
import cn.lili.modules.im.entity.dos.ImTalk;
|
||||
import cn.lili.modules.im.service.ImTalkService;
|
||||
import cn.lili.modules.member.entity.dos.Member;
|
||||
import cn.lili.modules.store.entity.dos.Store;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Im对话消息
|
||||
*
|
||||
* @author chc
|
||||
* @since 2022/6/2114:46
|
||||
*/
|
||||
@Service
|
||||
public class ImTalkExecute implements MemberInfoChangeEvent, StoreSettingChangeEvent {
|
||||
|
||||
@Autowired
|
||||
private ImTalkService imTalkService;
|
||||
|
||||
@Override
|
||||
public void memberInfoChange(Member member) {
|
||||
//当与UserId1相等时
|
||||
List<ImTalk> imTalkList1 = imTalkService.list(new LambdaQueryWrapper<ImTalk>().eq(ImTalk::getUserId1, member.getId()));
|
||||
for (ImTalk imTalk : imTalkList1) {
|
||||
imTalk.setName1(member.getNickName());
|
||||
imTalk.setFace1(member.getFace());
|
||||
}
|
||||
imTalkService.updateBatchById(imTalkList1);
|
||||
List<ImTalk> imTalkList2 = imTalkService.list(new LambdaQueryWrapper<ImTalk>().eq(ImTalk::getUserId2, member.getId()));
|
||||
for (ImTalk imTalk : imTalkList2) {
|
||||
imTalk.setName2(member.getNickName());
|
||||
imTalk.setFace2(member.getFace());
|
||||
}
|
||||
imTalkService.updateBatchById(imTalkList2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void storeSettingChange(Store store) {
|
||||
//当与UserId1相等时
|
||||
List<ImTalk> imTalkList1 = imTalkService.list(new LambdaQueryWrapper<ImTalk>().eq(ImTalk::getUserId1, store.getId()));
|
||||
for (ImTalk imTalk : imTalkList1) {
|
||||
imTalk.setName1(store.getStoreName());
|
||||
imTalk.setFace1(store.getStoreLogo());
|
||||
}
|
||||
imTalkService.updateBatchById(imTalkList1);
|
||||
List<ImTalk> imTalkList2 = imTalkService.list(new LambdaQueryWrapper<ImTalk>().eq(ImTalk::getUserId2, store.getId()));
|
||||
for (ImTalk imTalk : imTalkList2) {
|
||||
imTalk.setName2(store.getStoreName());
|
||||
imTalk.setFace2(store.getStoreLogo());
|
||||
}
|
||||
imTalkService.updateBatchById(imTalkList2);
|
||||
}
|
||||
}
|
||||
@@ -1,25 +1,58 @@
|
||||
package cn.lili.event.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.lili.common.enums.ClientTypeEnum;
|
||||
import cn.lili.event.MemberConnectLoginEvent;
|
||||
import cn.lili.event.MemberLoginEvent;
|
||||
import cn.lili.modules.connect.entity.dto.ConnectAuthUser;
|
||||
import cn.lili.modules.connect.entity.enums.ConnectEnum;
|
||||
import cn.lili.modules.connect.entity.enums.SourceEnum;
|
||||
import cn.lili.modules.connect.service.ConnectService;
|
||||
import cn.lili.modules.member.entity.dos.Member;
|
||||
import cn.lili.modules.member.service.MemberService;
|
||||
import cn.lili.modules.system.service.SettingService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 会员自身业务
|
||||
* 会员登录,会员第三方登录
|
||||
*
|
||||
* @author Chopper
|
||||
* @version v1.0
|
||||
* 2022-01-11 11:08
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class MemberExecute implements MemberLoginEvent {
|
||||
public class MemberExecute implements MemberLoginEvent, MemberConnectLoginEvent {
|
||||
@Autowired
|
||||
private MemberService memberService;
|
||||
@Autowired
|
||||
private ConnectService connectService;
|
||||
@Autowired
|
||||
private SettingService settingService;
|
||||
|
||||
@Override
|
||||
public void memberLogin(Member member) {
|
||||
memberService.updateMemberLoginTime(member.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void memberConnectLogin(Member member, ConnectAuthUser authUser) {
|
||||
//保存UnionID
|
||||
if (StrUtil.isNotBlank(authUser.getToken().getUnionId())) {
|
||||
connectService.loginBindUser(member.getId(), authUser.getToken().getUnionId(), authUser.getSource().name());
|
||||
}
|
||||
//保存OpenID
|
||||
if (StrUtil.isNotBlank(authUser.getUuid())) {
|
||||
SourceEnum sourceEnum = SourceEnum.getSourceEnum(authUser.getSource(), authUser.getType());
|
||||
connectService.loginBindUser(member.getId(), authUser.getUuid(), sourceEnum.name());
|
||||
}
|
||||
//保存手机号,判断用户是否存手机号,如果不存在则保存手机号
|
||||
if (StrUtil.isNotBlank(authUser.getPhone())&&StrUtil.isBlank(member.getMobile())) {
|
||||
memberService.changeMobile(member.getId(),member.getMobile());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ import cn.lili.modules.order.aftersale.entity.dos.AfterSale;
|
||||
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.OrderPromotionTypeEnum;
|
||||
import cn.lili.modules.order.order.entity.enums.OrderStatusEnum;
|
||||
import cn.lili.modules.order.order.entity.enums.PayStatusEnum;
|
||||
import cn.lili.modules.order.order.service.OrderService;
|
||||
import cn.lili.modules.order.trade.entity.enums.AfterSaleStatusEnum;
|
||||
@@ -134,12 +135,16 @@ public class MemberPointExecute implements MemberRegisterEvent, GoodsCommentComp
|
||||
@Override
|
||||
public void afterSaleStatusChange(AfterSale afterSale) {
|
||||
if (afterSale.getServiceStatus().equals(AfterSaleStatusEnum.COMPLETE.name())) {
|
||||
Order order = orderService.getBySn(afterSale.getOrderSn());
|
||||
//获取积分设置
|
||||
PointSetting pointSetting = getPointSetting();
|
||||
if (pointSetting.getConsumer() == 0 || !OrderStatusEnum.COMPLETED.name().equals(order.getOrderStatus())) {
|
||||
return;
|
||||
}
|
||||
//计算扣除积分数量
|
||||
Double point = CurrencyUtil.mul(pointSetting.getMoney(), afterSale.getActualRefundPrice(), 0);
|
||||
Double point = CurrencyUtil.mul(pointSetting.getConsumer(), afterSale.getActualRefundPrice(), 0);
|
||||
//扣除会员积分
|
||||
memberService.updateMemberPoint(point.longValue(), PointTypeEnum.REDUCE.name(), afterSale.getMemberId(), "会员退款,回退积分" + point + "分");
|
||||
memberService.updateMemberPoint(point.longValue(), PointTypeEnum.REDUCE.name(), afterSale.getMemberId(), "会员退款,回退消费赠送积分" + point + "分");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
package cn.lili.event.impl;
|
||||
|
||||
|
||||
import cn.lili.event.MemberRegisterEvent;
|
||||
import cn.lili.modules.member.entity.dos.Member;
|
||||
import cn.lili.event.MemberWithdrawalEvent;
|
||||
import cn.lili.modules.wallet.entity.dto.MemberWalletUpdateDTO;
|
||||
import cn.lili.modules.wallet.entity.dto.MemberWithdrawalMessage;
|
||||
import cn.lili.modules.wallet.entity.enums.DepositServiceTypeEnum;
|
||||
import cn.lili.modules.wallet.entity.enums.WithdrawStatusEnum;
|
||||
import cn.lili.modules.wallet.service.MemberWalletService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -14,14 +17,35 @@ import org.springframework.stereotype.Service;
|
||||
* @since 2020-07-03 11:20
|
||||
*/
|
||||
@Service
|
||||
public class MemberWalletExecute implements MemberRegisterEvent {
|
||||
public class MemberWalletExecute implements MemberWithdrawalEvent {
|
||||
|
||||
@Autowired
|
||||
private MemberWalletService memberWalletService;
|
||||
|
||||
@Override
|
||||
public void memberRegister(Member member) {
|
||||
// 有些情况下,会同时创建一个member_id的两条数据
|
||||
// memberWalletService.save(member.getId(),member.getUsername());
|
||||
public void memberWithdrawal(MemberWithdrawalMessage memberWithdrawalMessage) {
|
||||
switch (WithdrawStatusEnum.valueOf(memberWithdrawalMessage.getStatus())) {
|
||||
case VIA_AUDITING:
|
||||
memberWalletService.withdrawal(memberWithdrawalMessage.getMemberWithdrawApplyId());
|
||||
break;
|
||||
case SUCCESS:
|
||||
//提现成功扣减冻结金额
|
||||
memberWalletService.reduceFrozen(
|
||||
new MemberWalletUpdateDTO(memberWithdrawalMessage.getPrice(), memberWithdrawalMessage.getMemberId(), "提现成功,余额提现",
|
||||
DepositServiceTypeEnum.WALLET_WITHDRAWAL.name()));
|
||||
break;
|
||||
case ERROR:
|
||||
//需要从冻结金额扣减到余额
|
||||
memberWalletService.increaseWithdrawal(new MemberWalletUpdateDTO(memberWithdrawalMessage.getPrice(),
|
||||
memberWithdrawalMessage.getMemberId(), "第三方提现失败,提现金额解冻到余额", DepositServiceTypeEnum.WALLET_WITHDRAWAL.name()));
|
||||
break;
|
||||
case FAIL_AUDITING:
|
||||
//需要从冻结金额扣减到余额
|
||||
memberWalletService.increaseWithdrawal(new MemberWalletUpdateDTO(memberWithdrawalMessage.getPrice(),
|
||||
memberWithdrawalMessage.getMemberId(), "审核拒绝,提现金额解冻到余额", DepositServiceTypeEnum.WALLET_WITHDRAWAL.name()));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,6 @@ import cn.lili.modules.order.order.service.OrderService;
|
||||
import cn.lili.modules.order.trade.entity.enums.AfterSaleStatusEnum;
|
||||
import cn.lili.modules.order.trade.entity.enums.AfterSaleTypeEnum;
|
||||
import cn.lili.modules.wallet.entity.dto.MemberWithdrawalMessage;
|
||||
import cn.lili.modules.wallet.entity.enums.MemberWithdrawalDestinationEnum;
|
||||
import cn.lili.modules.wallet.entity.enums.WithdrawStatusEnum;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -59,7 +58,7 @@ public class NoticeMessageExecute implements TradeEvent, OrderStatusChangeEvent,
|
||||
OrderDetailVO orderDetailVO = orderService.queryDetail(orderMessage.getOrderSn());
|
||||
NoticeMessageDTO noticeMessageDTO = new NoticeMessageDTO();
|
||||
//如果订单状态不为空
|
||||
if (orderDetailVO != null) {
|
||||
if (orderDetailVO != null && orderDetailVO.getOrderItems() != null && !orderDetailVO.getOrderItems().isEmpty()) {
|
||||
Map<String, String> params = new HashMap<>(2);
|
||||
switch (orderMessage.getNewStatus()) {
|
||||
//如果订单新的状态为已取消 则发送取消订单站内信
|
||||
@@ -179,60 +178,30 @@ public class NoticeMessageExecute implements TradeEvent, OrderStatusChangeEvent,
|
||||
public void memberWithdrawal(MemberWithdrawalMessage memberWithdrawalMessage) {
|
||||
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);
|
||||
//发送提现申请成功消息
|
||||
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);
|
||||
Map<String, String> params = new HashMap<>(2);
|
||||
switch (WithdrawStatusEnum.valueOf(memberWithdrawalMessage.getStatus())) {
|
||||
case APPLY:
|
||||
//如果提现状态为申请则发送申请提现站内消息
|
||||
noticeMessageDTO.setNoticeMessageNodeEnum(NoticeMessageNodeEnum.WALLET_WITHDRAWAL_CREATE);
|
||||
break;
|
||||
case FAIL_AUDITING:
|
||||
noticeMessageDTO.setNoticeMessageNodeEnum(NoticeMessageNodeEnum.WALLET_WITHDRAWAL_AUDIT_ERROR);
|
||||
break;
|
||||
case SUCCESS:
|
||||
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", "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);
|
||||
break;
|
||||
case ERROR:
|
||||
noticeMessageDTO.setNoticeMessageNodeEnum(NoticeMessageNodeEnum.WALLET_WITHDRAWAL_ERROR);
|
||||
break;
|
||||
case VIA_AUDITING:
|
||||
noticeMessageDTO.setNoticeMessageNodeEnum(NoticeMessageNodeEnum.WALLET_WITHDRAWAL_AUDIT_SUCCESS);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
params.put("price", memberWithdrawalMessage.getPrice().toString());
|
||||
noticeMessageDTO.setParameter(params);
|
||||
//发送提现申请消息
|
||||
noticeMessageService.noticeMessage(noticeMessageDTO);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,23 @@
|
||||
package cn.lili.event.impl;
|
||||
|
||||
import cn.lili.common.utils.CurrencyUtil;
|
||||
import cn.lili.event.AfterSaleStatusChangeEvent;
|
||||
import cn.lili.event.TradeEvent;
|
||||
import cn.lili.modules.order.aftersale.entity.dos.AfterSale;
|
||||
import cn.lili.modules.order.cart.entity.dto.TradeDTO;
|
||||
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.enums.RefundStatusEnum;
|
||||
import cn.lili.modules.order.order.service.OrderItemService;
|
||||
import cn.lili.modules.order.order.service.OrderService;
|
||||
import cn.lili.modules.order.order.service.TradeService;
|
||||
import cn.lili.modules.order.trade.entity.enums.AfterSaleStatusEnum;
|
||||
import cn.lili.modules.payment.entity.enums.PaymentMethodEnum;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单状态处理类
|
||||
*
|
||||
@@ -14,11 +25,15 @@ import org.springframework.stereotype.Service;
|
||||
* @since 2020-07-03 11:20
|
||||
**/
|
||||
@Service
|
||||
public class OrderStatusHandlerExecute implements TradeEvent {
|
||||
public class OrderStatusHandlerExecute implements TradeEvent, AfterSaleStatusChangeEvent {
|
||||
|
||||
|
||||
@Autowired
|
||||
private TradeService tradeService;
|
||||
@Autowired
|
||||
private OrderItemService orderItemService;
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
|
||||
@Override
|
||||
public void orderCreate(TradeDTO tradeDTO) {
|
||||
@@ -28,4 +43,35 @@ public class OrderStatusHandlerExecute implements TradeEvent {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterSaleStatusChange(AfterSale afterSale) {
|
||||
Order order = orderService.getBySn(afterSale.getOrderSn());
|
||||
OrderItem orderItem = orderItemService.getBySn(afterSale.getOrderItemSn());
|
||||
|
||||
if (afterSale.getServiceStatus().equals(AfterSaleStatusEnum.COMPLETE.name())) {
|
||||
if (orderItem.getReturnGoodsNumber().equals(orderItem.getNum())) {
|
||||
orderItem.setIsRefund(RefundStatusEnum.ALL_REFUND.name());
|
||||
} else {
|
||||
orderItem.setIsRefund(RefundStatusEnum.PART_REFUND.name());
|
||||
}
|
||||
orderItem.setRefundPrice(CurrencyUtil.add(afterSale.getActualRefundPrice(), orderItem.getRefundPrice()));
|
||||
orderItemService.updateByAfterSale(orderItem);
|
||||
|
||||
//循环订单货物,判断是否已经全部售后
|
||||
List<OrderItem> orderItems = orderItemService.getByOrderSn(afterSale.getOrderSn());
|
||||
// 总退货数量
|
||||
int returnCount = 0;
|
||||
// 总购买数量
|
||||
int deliverCount = 0;
|
||||
for (OrderItem item : orderItems) {
|
||||
returnCount += item.getReturnGoodsNumber();
|
||||
deliverCount += item.getNum();
|
||||
}
|
||||
if (returnCount == deliverCount) {
|
||||
orderService.systemCancel(afterSale.getOrderSn(),"订单货物全部退款",false);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import cn.lili.modules.order.order.entity.dto.OrderMessage;
|
||||
import cn.lili.modules.order.order.entity.enums.OrderStatusEnum;
|
||||
import cn.lili.modules.order.order.entity.enums.PayStatusEnum;
|
||||
import cn.lili.modules.order.order.service.OrderService;
|
||||
import cn.lili.modules.order.order.service.StoreFlowService;
|
||||
import cn.lili.modules.payment.entity.RefundLog;
|
||||
import cn.lili.modules.payment.kit.Payment;
|
||||
import cn.lili.modules.payment.entity.enums.PaymentMethodEnum;
|
||||
@@ -30,6 +31,8 @@ public class PaymentExecute implements OrderStatusChangeEvent {
|
||||
*/
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
@Autowired
|
||||
private StoreFlowService storeFlowService;
|
||||
|
||||
@Override
|
||||
public void orderChange(OrderMessage orderMessage) {
|
||||
@@ -60,6 +63,8 @@ public class PaymentExecute implements OrderStatusChangeEvent {
|
||||
.refundReason("订单取消")
|
||||
.build();
|
||||
payment.refund(refundLog);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
package cn.lili.event.impl;
|
||||
|
||||
import cn.hutool.core.text.CharSequenceUtil;
|
||||
import cn.lili.cache.Cache;
|
||||
import cn.lili.cache.CachePrefix;
|
||||
import cn.lili.event.MemberRegisterEvent;
|
||||
import cn.lili.modules.member.entity.dos.Member;
|
||||
import cn.lili.modules.promotion.entity.dos.CouponActivity;
|
||||
import cn.lili.modules.member.service.MemberService;
|
||||
import cn.lili.modules.promotion.entity.dto.CouponActivityTrigger;
|
||||
import cn.lili.modules.promotion.entity.enums.CouponActivityTypeEnum;
|
||||
import cn.lili.modules.promotion.entity.enums.PromotionsStatusEnum;
|
||||
import cn.lili.modules.promotion.service.CouponActivityService;
|
||||
import cn.lili.modules.promotion.tools.PromotionTools;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 注册赠券活动
|
||||
*
|
||||
@@ -25,6 +24,12 @@ public class RegisteredCouponActivityExecute implements MemberRegisterEvent {
|
||||
@Autowired
|
||||
private CouponActivityService couponActivityService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private MemberService memberService;
|
||||
@Autowired
|
||||
private Cache cache;
|
||||
|
||||
/**
|
||||
* 获取进行中的注册赠券的优惠券活动
|
||||
* 发送注册赠券
|
||||
@@ -33,9 +38,22 @@ public class RegisteredCouponActivityExecute implements MemberRegisterEvent {
|
||||
*/
|
||||
@Override
|
||||
public void memberRegister(Member member) {
|
||||
List<CouponActivity> couponActivities = couponActivityService.list(new QueryWrapper<CouponActivity>()
|
||||
.eq("coupon_activity_type", CouponActivityTypeEnum.REGISTERED.name())
|
||||
.and(PromotionTools.queryPromotionStatus(PromotionsStatusEnum.START)));
|
||||
couponActivityService.registered(couponActivities, member);
|
||||
//用户注册赠券
|
||||
couponActivityService.trigger(CouponActivityTrigger.builder()
|
||||
.nickName(member.getNickName())
|
||||
.userId(member.getId())
|
||||
.couponActivityTypeEnum(CouponActivityTypeEnum.REGISTERED)
|
||||
.build());
|
||||
//邀请人赠券
|
||||
String memberId = (String) cache.get(CachePrefix.INVITER.getPrefix() + member.getId());
|
||||
if (CharSequenceUtil.isNotEmpty(memberId)) {
|
||||
//邀请人
|
||||
Member inviter = memberService.getById(memberId);
|
||||
couponActivityService.trigger(CouponActivityTrigger.builder()
|
||||
.nickName(inviter.getNickName())
|
||||
.userId(inviter.getId())
|
||||
.couponActivityTypeEnum(CouponActivityTypeEnum.INVITE_NEW)
|
||||
.build());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -95,7 +96,7 @@ public class StockUpdateExecute implements OrderStatusChangeEvent {
|
||||
keys.add(GoodsSkuService.getStockCacheKey(orderItem.getSkuId()));
|
||||
int i = -orderItem.getNum();
|
||||
values.add(Integer.toString(i));
|
||||
setPromotionStock(keys, values, orderItem);
|
||||
setPromotionStock(keys, values, orderItem, true);
|
||||
}
|
||||
|
||||
List<Integer> stocks = cache.multiGet(keys);
|
||||
@@ -133,6 +134,7 @@ public class StockUpdateExecute implements OrderStatusChangeEvent {
|
||||
keys.add(GoodsSkuService.getStockCacheKey(orderItem.getSkuId()));
|
||||
int i = orderItem.getNum();
|
||||
values.add(Integer.toString(i));
|
||||
setPromotionStock(keys, values, orderItem, false);
|
||||
}
|
||||
//批量脚本执行库存回退
|
||||
Boolean skuResult = stringRedisTemplate.execute(quantityScript, keys, values.toArray());
|
||||
@@ -189,28 +191,33 @@ public class StockUpdateExecute implements OrderStatusChangeEvent {
|
||||
//如果促销类型需要库存判定,则做对应处理
|
||||
orderItems.forEach(orderItem -> {
|
||||
if (orderItem.getPromotionType() != null) {
|
||||
//如果此促销有库存概念,则计入
|
||||
if (PromotionTypeEnum.haveStock(orderItem.getPromotionType())) {
|
||||
String[] skuPromotions = orderItem.getPromotionType().split(",");
|
||||
for (int i = 0; i < skuPromotions.length; i++) {
|
||||
int currentIndex = i;
|
||||
//如果此促销有库存概念,则计入
|
||||
Arrays.stream(PromotionTypeEnum.haveStockPromotion).filter(promotionTypeEnum -> promotionTypeEnum.name().equals(skuPromotions[currentIndex]))
|
||||
.findFirst()
|
||||
.ifPresent(promotionTypeEnum -> {
|
||||
String promotionId = orderItem.getPromotionId().split(",")[currentIndex];
|
||||
String cacheKey = PromotionGoodsService.getPromotionGoodsStockCacheKey(promotionTypeEnum, promotionId, orderItem.getSkuId());
|
||||
|
||||
PromotionTypeEnum promotionTypeEnum = PromotionTypeEnum.valueOf(orderItem.getPromotionType());
|
||||
|
||||
String cacheKey = PromotionGoodsService.getPromotionGoodsStockCacheKey(promotionTypeEnum, orderItem.getPromotionId(), orderItem.getSkuId());
|
||||
|
||||
switch (promotionTypeEnum) {
|
||||
case KANJIA:
|
||||
cache.put(cacheKey, kanjiaActivityGoodsService.getKanjiaGoodsBySkuId(orderItem.getSkuId()).getStock());
|
||||
return;
|
||||
case POINTS_GOODS:
|
||||
cache.put(cacheKey, pointsGoodsService.getPointsGoodsDetailBySkuId(orderItem.getSkuId()).getActiveStock());
|
||||
return;
|
||||
case SECKILL:
|
||||
case PINTUAN:
|
||||
cache.put(cacheKey, promotionGoodsService.getPromotionGoodsStock(promotionTypeEnum, orderItem.getPromotionId(), orderItem.getSkuId()));
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
switch (promotionTypeEnum) {
|
||||
case KANJIA:
|
||||
cache.put(cacheKey, kanjiaActivityGoodsService.getKanjiaGoodsBySkuId(orderItem.getSkuId()).getStock());
|
||||
return;
|
||||
case POINTS_GOODS:
|
||||
cache.put(cacheKey, pointsGoodsService.getPointsGoodsDetailBySkuId(orderItem.getSkuId()).getActiveStock());
|
||||
return;
|
||||
case SECKILL:
|
||||
case PINTUAN:
|
||||
cache.put(cacheKey, promotionGoodsService.getPromotionGoodsStock(promotionTypeEnum, promotionId, orderItem.getSkuId()));
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -222,7 +229,7 @@ public class StockUpdateExecute implements OrderStatusChangeEvent {
|
||||
* @param orderSn 失败入库订单信息
|
||||
*/
|
||||
private void errorOrder(String orderSn) {
|
||||
orderService.systemCancel(orderSn, outOfStockMessage);
|
||||
orderService.systemCancel(orderSn, outOfStockMessage, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -233,16 +240,20 @@ public class StockUpdateExecute implements OrderStatusChangeEvent {
|
||||
* @param values 缓存value值
|
||||
* @param sku 购物车信息
|
||||
*/
|
||||
private void setPromotionStock(List<String> keys, List<String> values, OrderItem sku) {
|
||||
private void setPromotionStock(List<String> keys, List<String> values, OrderItem sku, boolean deduction) {
|
||||
if (sku.getPromotionType() != null) {
|
||||
//如果此促销有库存概念,则计入
|
||||
if (!PromotionTypeEnum.haveStock(sku.getPromotionType())) {
|
||||
return;
|
||||
String[] skuPromotions = sku.getPromotionType().split(",");
|
||||
for (int i = 0; i < skuPromotions.length; i++) {
|
||||
int currentIndex = i;
|
||||
Arrays.stream(PromotionTypeEnum.haveStockPromotion).filter(promotionTypeEnum -> promotionTypeEnum.name().equals(skuPromotions[currentIndex]))
|
||||
.findFirst()
|
||||
.ifPresent(promotionTypeEnum -> {
|
||||
keys.add(PromotionGoodsService.getPromotionGoodsStockCacheKey(promotionTypeEnum, sku.getPromotionId().split(",")[currentIndex], sku.getSkuId()));
|
||||
int num = deduction ? -sku.getNum() : sku.getNum();
|
||||
values.add(Integer.toString(num));
|
||||
});
|
||||
}
|
||||
PromotionTypeEnum promotionTypeEnum = PromotionTypeEnum.valueOf(sku.getPromotionType());
|
||||
keys.add(PromotionGoodsService.getPromotionGoodsStockCacheKey(promotionTypeEnum, sku.getPromotionId(), sku.getSkuId()));
|
||||
int i = -sku.getNum();
|
||||
values.add(Integer.toString(i));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -277,41 +288,51 @@ public class StockUpdateExecute implements OrderStatusChangeEvent {
|
||||
goodsSku.setId(orderItem.getSkuId());
|
||||
goodsSku.setGoodsId(orderItem.getGoodsId());
|
||||
//如果有促销信息
|
||||
if (null != orderItem.getPromotionType() && null != orderItem.getPromotionId() && PromotionTypeEnum.haveStock(orderItem.getPromotionType())) {
|
||||
if (null != orderItem.getPromotionType() && null != orderItem.getPromotionId()) {
|
||||
//如果促销有库存信息
|
||||
PromotionTypeEnum promotionTypeEnum = PromotionTypeEnum.valueOf(orderItem.getPromotionType());
|
||||
String[] skuPromotions = orderItem.getPromotionType().split(",");
|
||||
for (int i = 0; i < skuPromotions.length; i++) {
|
||||
int currentIndex = i;
|
||||
Arrays.stream(PromotionTypeEnum.haveStockPromotion).filter(promotionTypeEnum -> promotionTypeEnum.name().equals(skuPromotions[currentIndex]))
|
||||
.findFirst()
|
||||
.ifPresent(promotionTypeEnum -> {
|
||||
//修改砍价商品库存
|
||||
String promotionId = orderItem.getPromotionId().split(",")[currentIndex];
|
||||
|
||||
//修改砍价商品库存
|
||||
if (promotionTypeEnum.equals(PromotionTypeEnum.KANJIA)) {
|
||||
KanjiaActivity kanjiaActivity = kanjiaActivityService.getById(orderItem.getPromotionId());
|
||||
KanjiaActivityGoodsDTO kanjiaActivityGoodsDTO = kanjiaActivityGoodsService.getKanjiaGoodsDetail(kanjiaActivity.getKanjiaActivityGoodsId());
|
||||
//修改砍价商品库存
|
||||
if (promotionTypeEnum.equals(PromotionTypeEnum.KANJIA)) {
|
||||
KanjiaActivity kanjiaActivity = kanjiaActivityService.getById(promotionId);
|
||||
KanjiaActivityGoodsDTO kanjiaActivityGoodsDTO = kanjiaActivityGoodsService.getKanjiaGoodsDetail(kanjiaActivity.getKanjiaActivityGoodsId());
|
||||
|
||||
Integer stock = Integer.parseInt(cache.get(PromotionGoodsService.getPromotionGoodsStockCacheKey(promotionTypeEnum, orderItem.getPromotionId(), orderItem.getSkuId())).toString());
|
||||
kanjiaActivityGoodsDTO.setStock(stock);
|
||||
Integer stock = Integer.parseInt(cache.get(PromotionGoodsService.getPromotionGoodsStockCacheKey(promotionTypeEnum, promotionId, orderItem.getSkuId())).toString());
|
||||
kanjiaActivityGoodsDTO.setStock(stock);
|
||||
|
||||
kanjiaActivityGoodsService.updateById(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);
|
||||
} else {
|
||||
PromotionGoodsSearchParams searchParams = new PromotionGoodsSearchParams();
|
||||
searchParams.setPromotionType(promotionTypeEnum.name());
|
||||
searchParams.setPromotionId(orderItem.getPromotionId());
|
||||
searchParams.setSkuId(orderItem.getSkuId());
|
||||
PromotionGoods pGoods = promotionGoodsService.getPromotionsGoods(searchParams);
|
||||
//记录需要更新的促销库存信息
|
||||
promotionKey.add(
|
||||
PromotionGoodsService.getPromotionGoodsStockCacheKey(
|
||||
promotionTypeEnum,
|
||||
orderItem.getPromotionId(), orderItem.getSkuId())
|
||||
);
|
||||
if (pGoods != null) {
|
||||
promotionGoods.add(pGoods);
|
||||
}
|
||||
kanjiaActivityGoodsService.updateById(kanjiaActivityGoodsDTO);
|
||||
//修改积分商品库存
|
||||
} else if (promotionTypeEnum.equals(PromotionTypeEnum.POINTS_GOODS)) {
|
||||
PointsGoodsVO pointsGoodsVO = pointsGoodsService.getPointsGoodsDetail(promotionId);
|
||||
Integer stock = Integer.parseInt(cache.get(PromotionGoodsService.getPromotionGoodsStockCacheKey(promotionTypeEnum, promotionId, orderItem.getSkuId())).toString());
|
||||
pointsGoodsVO.setActiveStock(stock);
|
||||
pointsGoodsService.updateById(pointsGoodsVO);
|
||||
} else {
|
||||
PromotionGoodsSearchParams searchParams = new PromotionGoodsSearchParams();
|
||||
searchParams.setPromotionType(promotionTypeEnum.name());
|
||||
searchParams.setPromotionId(promotionId);
|
||||
searchParams.setSkuId(orderItem.getSkuId());
|
||||
PromotionGoods pGoods = promotionGoodsService.getPromotionsGoods(searchParams);
|
||||
//记录需要更新的促销库存信息
|
||||
promotionKey.add(
|
||||
PromotionGoodsService.getPromotionGoodsStockCacheKey(
|
||||
promotionTypeEnum,
|
||||
promotionId, orderItem.getSkuId())
|
||||
);
|
||||
if (pGoods != null) {
|
||||
promotionGoods.add(pGoods);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
goodsSkus.add(goodsSku);
|
||||
}
|
||||
@@ -322,8 +343,6 @@ public class StockUpdateExecute implements OrderStatusChangeEvent {
|
||||
for (int i = 0; i < skuStocks.size(); i++) {
|
||||
goodsSkus.get(i).setQuantity(Convert.toInt(skuStocks.get(i).toString()));
|
||||
}
|
||||
//批量修改商品库存
|
||||
goodsSkuService.updateBatchById(goodsSkus);
|
||||
|
||||
//促销库存处理
|
||||
if (!promotionKey.isEmpty()) {
|
||||
@@ -336,7 +355,7 @@ public class StockUpdateExecute implements OrderStatusChangeEvent {
|
||||
promotionGoodsService.updatePromotionGoodsStock(promotionGoods);
|
||||
}
|
||||
//商品库存,包含sku库存集合,批量更新商品库存相关
|
||||
goodsSkuService.updateGoodsStuck(goodsSkus);
|
||||
goodsSkuService.updateGoodsStock(goodsSkus);
|
||||
|
||||
log.info("订单确认,库存同步:商品信息--{};促销信息---{}", goodsSkus, promotionGoods);
|
||||
|
||||
@@ -353,6 +372,69 @@ public class StockUpdateExecute implements OrderStatusChangeEvent {
|
||||
List<GoodsSku> goodsSkus = new ArrayList<>();
|
||||
//sku库存key 集合
|
||||
List<String> skuKeys = new ArrayList<>();
|
||||
//促销商品
|
||||
List<PromotionGoods> promotionGoods = new ArrayList<>();
|
||||
//促销库存key 集合
|
||||
List<String> promotionKey = new ArrayList<>();
|
||||
|
||||
//循环订单
|
||||
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()) {
|
||||
|
||||
//如果促销有库存信息
|
||||
String[] skuPromotions = orderItem.getPromotionType().split(",");
|
||||
for (int i = 0; i < skuPromotions.length; i++) {
|
||||
int currentIndex = i;
|
||||
Arrays.stream(PromotionTypeEnum.haveStockPromotion).filter(promotionTypeEnum -> promotionTypeEnum.name().equals(skuPromotions[currentIndex]))
|
||||
.findFirst()
|
||||
.ifPresent(promotionTypeEnum -> {
|
||||
//修改砍价商品库存
|
||||
String promotionId = orderItem.getPromotionId().split(",")[currentIndex];
|
||||
//修改砍价商品库存
|
||||
if (promotionTypeEnum.equals(PromotionTypeEnum.KANJIA)) {
|
||||
KanjiaActivity kanjiaActivity = kanjiaActivityService.getById(promotionId);
|
||||
KanjiaActivityGoodsDTO kanjiaActivityGoodsDTO = kanjiaActivityGoodsService.getKanjiaGoodsDetail(kanjiaActivity.getKanjiaActivityGoodsId());
|
||||
|
||||
Integer stock = Integer.parseInt(cache.get(PromotionGoodsService.getPromotionGoodsStockCacheKey(promotionTypeEnum, promotionId, orderItem.getSkuId())).toString());
|
||||
kanjiaActivityGoodsDTO.setStock(stock);
|
||||
|
||||
kanjiaActivityGoodsService.updateById(kanjiaActivityGoodsDTO);
|
||||
//修改积分商品库存
|
||||
} else if (promotionTypeEnum.equals(PromotionTypeEnum.POINTS_GOODS)) {
|
||||
PointsGoodsVO pointsGoodsVO = pointsGoodsService.getPointsGoodsDetail(promotionId);
|
||||
Integer stock = Integer.parseInt(cache.get(PromotionGoodsService.getPromotionGoodsStockCacheKey(promotionTypeEnum, promotionId, orderItem.getSkuId())).toString());
|
||||
pointsGoodsVO.setActiveStock(stock);
|
||||
pointsGoodsService.updateById(pointsGoodsVO);
|
||||
} else {
|
||||
PromotionGoodsSearchParams searchParams = new PromotionGoodsSearchParams();
|
||||
searchParams.setPromotionType(promotionTypeEnum.name());
|
||||
searchParams.setPromotionId(promotionId);
|
||||
searchParams.setSkuId(orderItem.getSkuId());
|
||||
PromotionGoods pGoods = promotionGoodsService.getPromotionsGoods(searchParams);
|
||||
//记录需要更新的促销库存信息
|
||||
promotionKey.add(
|
||||
PromotionGoodsService.getPromotionGoodsStockCacheKey(
|
||||
promotionTypeEnum,
|
||||
promotionId, orderItem.getSkuId())
|
||||
);
|
||||
if (pGoods != null) {
|
||||
promotionGoods.add(pGoods);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
goodsSkus.add(goodsSku);
|
||||
}
|
||||
|
||||
//循环订单
|
||||
for (OrderItem orderItem : order.getOrderItems()) {
|
||||
skuKeys.add(GoodsSkuService.getStockCacheKey(orderItem.getSkuId()));
|
||||
@@ -367,10 +449,19 @@ public class StockUpdateExecute implements OrderStatusChangeEvent {
|
||||
for (int i = 0; i < skuStocks.size(); i++) {
|
||||
goodsSkus.get(i).setQuantity(Convert.toInt(skuStocks.get(i).toString()));
|
||||
}
|
||||
//促销库存处理
|
||||
if (!promotionKey.isEmpty()) {
|
||||
List promotionStocks = cache.multiGet(promotionKey);
|
||||
for (int i = 0; i < promotionKey.size(); i++) {
|
||||
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());
|
||||
}
|
||||
promotionGoodsService.updatePromotionGoodsStock(promotionGoods);
|
||||
}
|
||||
log.info("订单取消,库存还原:{}", goodsSkus);
|
||||
//批量修改商品库存
|
||||
goodsSkuService.updateBatchById(goodsSkus);
|
||||
goodsSkuService.updateGoodsStuck(goodsSkus);
|
||||
goodsSkuService.updateGoodsStock(goodsSkus);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
206
consumer/src/main/java/cn/lili/event/impl/StoreChangeEvent.java
Normal file
206
consumer/src/main/java/cn/lili/event/impl/StoreChangeEvent.java
Normal file
@@ -0,0 +1,206 @@
|
||||
package cn.lili.event.impl;
|
||||
|
||||
import cn.lili.event.StoreSettingChangeEvent;
|
||||
import cn.lili.modules.distribution.service.DistributionGoodsService;
|
||||
import cn.lili.modules.distribution.service.DistributionOrderService;
|
||||
import cn.lili.modules.goods.service.DraftGoodsService;
|
||||
import cn.lili.modules.member.service.MemberEvaluationService;
|
||||
import cn.lili.modules.message.service.StoreMessageService;
|
||||
import cn.lili.modules.order.aftersale.service.AfterSaleService;
|
||||
import cn.lili.modules.order.order.service.OrderComplaintService;
|
||||
import cn.lili.modules.order.order.service.OrderService;
|
||||
import cn.lili.modules.order.order.service.ReceiptService;
|
||||
import cn.lili.modules.order.order.service.StoreFlowService;
|
||||
import cn.lili.modules.promotion.service.*;
|
||||
import cn.lili.modules.store.entity.dos.Store;
|
||||
import cn.lili.modules.store.service.BillService;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author ftyy
|
||||
* @description: 店铺名称修改同步对应场景
|
||||
* @date 2023/4/24
|
||||
*/
|
||||
@Service
|
||||
public class StoreChangeEvent implements StoreSettingChangeEvent {
|
||||
/**
|
||||
* 优惠券活动表
|
||||
*/
|
||||
@Autowired
|
||||
private CouponActivityService couponActivityService;
|
||||
|
||||
/**
|
||||
* 砍价活动商品
|
||||
*/
|
||||
@Autowired
|
||||
private KanjiaActivityGoodsService kanjiaActivityGoodsService;
|
||||
|
||||
/**
|
||||
* 积分商品
|
||||
*/
|
||||
@Autowired
|
||||
private PointsGoodsService pointsGoodsService;
|
||||
|
||||
/**
|
||||
* 促销商品
|
||||
*/
|
||||
@Autowired
|
||||
private PromotionGoodsService promotionGoodsService;
|
||||
|
||||
/**
|
||||
* 秒杀活动活动
|
||||
*/
|
||||
@Autowired
|
||||
private SeckillService seckillService;
|
||||
|
||||
/**
|
||||
* 优惠券
|
||||
*/
|
||||
@Autowired
|
||||
private CouponService couponService;
|
||||
|
||||
/**
|
||||
* 满优惠活动
|
||||
*/
|
||||
@Autowired
|
||||
private FullDiscountService fullDiscountService;
|
||||
|
||||
/**
|
||||
* 拼团
|
||||
*/
|
||||
@Autowired
|
||||
private PintuanService pintuanService;
|
||||
|
||||
/**
|
||||
* 秒杀活动
|
||||
*/
|
||||
@Autowired
|
||||
private SeckillApplyService seckillApplyService;
|
||||
/**
|
||||
* 订单
|
||||
*/
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
|
||||
/**
|
||||
* 店铺流水
|
||||
*/
|
||||
@Autowired
|
||||
private StoreFlowService storeFlowService;
|
||||
|
||||
/**
|
||||
* 售后
|
||||
*/
|
||||
@Autowired
|
||||
private AfterSaleService afterSaleService;
|
||||
|
||||
/**
|
||||
* 订单投诉
|
||||
*/
|
||||
@Autowired
|
||||
private OrderComplaintService orderComplaintService;
|
||||
/**
|
||||
* 发票
|
||||
*/
|
||||
@Autowired
|
||||
private ReceiptService receiptService;
|
||||
|
||||
/**
|
||||
* 会员优惠券
|
||||
*/
|
||||
@Autowired
|
||||
private MemberCouponService memberCouponService;
|
||||
|
||||
/**
|
||||
* 店铺消息
|
||||
*/
|
||||
@Autowired
|
||||
private StoreMessageService storeMessageService;
|
||||
|
||||
/**
|
||||
* 会员评价
|
||||
*/
|
||||
@Autowired
|
||||
private MemberEvaluationService memberEvaluationService;
|
||||
|
||||
/**
|
||||
* 结算单
|
||||
*/
|
||||
@Autowired
|
||||
private BillService billService;
|
||||
/**
|
||||
* 分销商品
|
||||
*/
|
||||
@Autowired
|
||||
private DistributionGoodsService distributionGoodsService;
|
||||
/**
|
||||
* 分销订单
|
||||
*/
|
||||
@Autowired
|
||||
private DistributionOrderService distributionOrderService;
|
||||
|
||||
/**
|
||||
* 草稿商品
|
||||
*/
|
||||
@Autowired
|
||||
private DraftGoodsService draftGoodsService;
|
||||
|
||||
|
||||
/**
|
||||
* 店铺名称修改 同步更新相关店铺名称
|
||||
*
|
||||
* @param store 店铺信息
|
||||
*/
|
||||
@Override
|
||||
public void storeSettingChange(Store store) {
|
||||
|
||||
UpdateWrapper updateWrapper = new UpdateWrapper<>()
|
||||
.eq("store_id", store.getId())
|
||||
.set("store_name", store.getStoreName());
|
||||
|
||||
//修改会员优惠券中店铺名称
|
||||
memberCouponService.update(updateWrapper);
|
||||
//修改优惠券活动中店铺名称
|
||||
couponActivityService.update(updateWrapper);
|
||||
//修改砍价活动商品中店铺名称
|
||||
kanjiaActivityGoodsService.update(updateWrapper);
|
||||
//修改积分商品中店铺名称
|
||||
pointsGoodsService.update(updateWrapper);
|
||||
//修改促销商品中店铺名称
|
||||
promotionGoodsService.update(updateWrapper);
|
||||
//修改秒杀活动活动中店铺名称
|
||||
seckillService.update(updateWrapper);
|
||||
//修改优惠券中店铺名称
|
||||
couponService.update(updateWrapper);
|
||||
//修改满优惠活动中店铺名称
|
||||
fullDiscountService.update(updateWrapper);
|
||||
//修改拼团中店铺名称
|
||||
pintuanService.update(updateWrapper);
|
||||
//修改秒杀活动中店铺名称
|
||||
seckillApplyService.update(updateWrapper);
|
||||
//修改发票中店铺名称
|
||||
receiptService.update(updateWrapper);
|
||||
//修改订单中的店铺名称
|
||||
orderService.update(updateWrapper);
|
||||
//修改店铺流水中店铺名称
|
||||
storeFlowService.update(updateWrapper);
|
||||
//修改售后中店铺名称
|
||||
afterSaleService.update(updateWrapper);
|
||||
//修改订单投诉中店铺名称
|
||||
orderComplaintService.update(updateWrapper);
|
||||
//修改店铺消息中的店铺名称
|
||||
storeMessageService.update(updateWrapper);
|
||||
//修改会员评价中店铺名称
|
||||
memberEvaluationService.update(updateWrapper);
|
||||
//修改结算单中店铺名称
|
||||
billService.update(updateWrapper);
|
||||
//修改分销订单中店铺名称
|
||||
distributionOrderService.update(updateWrapper);
|
||||
//修改分销商品中店铺名称
|
||||
distributionGoodsService.update(updateWrapper);
|
||||
//修改草稿商品中店铺名称
|
||||
draftGoodsService.update(updateWrapper);
|
||||
}
|
||||
}
|
||||
@@ -31,7 +31,7 @@ public class VerificationOrderExecute implements OrderStatusChangeEvent {
|
||||
@Override
|
||||
public void orderChange(OrderMessage orderMessage) {
|
||||
//订单状态为待核验,添加订单添加核验码
|
||||
if (orderMessage.getNewStatus().equals(OrderStatusEnum.TAKE)) {
|
||||
if (orderMessage.getNewStatus().equals(OrderStatusEnum.TAKE) || orderMessage.getNewStatus().equals(OrderStatusEnum.STAY_PICKED_UP)) {
|
||||
//获取订单信息
|
||||
Order order = orderService.getBySn(orderMessage.getOrderSn());
|
||||
//获取随机数,判定是否存在
|
||||
@@ -43,7 +43,7 @@ public class VerificationOrderExecute implements OrderStatusChangeEvent {
|
||||
//修改虚拟订单货物可以进行售后、投诉
|
||||
orderItemService.update(new LambdaUpdateWrapper<OrderItem>().eq(OrderItem::getOrderSn, orderMessage.getOrderSn())
|
||||
.set(OrderItem::getAfterSaleStatus, OrderItemAfterSaleStatusEnum.NOT_APPLIED)
|
||||
.set(OrderItem::getCommentStatus, OrderComplaintStatusEnum.NO_APPLY));
|
||||
.set(OrderItem::getComplainStatus, OrderComplaintStatusEnum.COMPLETE));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
package cn.lili.event.impl;
|
||||
|
||||
import cn.lili.event.OrderStatusChangeEvent;
|
||||
import cn.lili.modules.order.order.entity.dto.OrderMessage;
|
||||
import cn.lili.modules.wechat.service.WechatMPService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service ;
|
||||
|
||||
/**
|
||||
* 微信小程序执行器
|
||||
*
|
||||
* @author Chopper
|
||||
* @version v1.0 2021-04-19 14:25
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class WechatMPExecute implements OrderStatusChangeEvent {
|
||||
|
||||
@Autowired
|
||||
private WechatMPService wechatMPService;
|
||||
|
||||
|
||||
/**
|
||||
* 订单已发货、待提货、待核验状态 如果是微信小程序的订单则进行 订单发货信息录入
|
||||
*
|
||||
* @param orderMessage 订单消息
|
||||
*/
|
||||
@Override
|
||||
public void orderChange(OrderMessage orderMessage) {
|
||||
|
||||
switch (orderMessage.getNewStatus()) {
|
||||
case TAKE:
|
||||
case STAY_PICKED_UP:
|
||||
case DELIVERED:
|
||||
try {
|
||||
wechatMPService.uploadShippingInfo(orderMessage.getOrderSn());
|
||||
} catch (Exception e) {
|
||||
log.error("发货信息录入失败", e);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -39,9 +39,9 @@ public class WechatMessageExecute implements OrderStatusChangeEvent, TradeEvent
|
||||
public void orderChange(OrderMessage orderMessage) {
|
||||
|
||||
switch (orderMessage.getNewStatus()) {
|
||||
case PAID:
|
||||
case UNDELIVERED:
|
||||
case DELIVERED:
|
||||
case STAY_PICKED_UP:
|
||||
case COMPLETED:
|
||||
try {
|
||||
wechatMessageUtil.sendWechatMessage(orderMessage.getOrderSn());
|
||||
|
||||
@@ -8,6 +8,7 @@ import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import cn.lili.common.aop.annotation.RetryOperation;
|
||||
import cn.lili.common.exception.RetryException;
|
||||
import cn.lili.common.vo.PageVO;
|
||||
import cn.lili.event.GoodsCommentCompleteEvent;
|
||||
import cn.lili.modules.distribution.entity.dos.DistributionGoods;
|
||||
import cn.lili.modules.distribution.entity.dto.DistributionGoodsSearchParams;
|
||||
@@ -33,6 +34,8 @@ import cn.lili.modules.promotion.service.PromotionService;
|
||||
import cn.lili.modules.search.entity.dos.EsGoodsIndex;
|
||||
import cn.lili.modules.search.service.EsGoodsIndexService;
|
||||
import cn.lili.rocketmq.tags.GoodsTagsEnum;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.rocketmq.common.message.MessageExt;
|
||||
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
|
||||
@@ -54,6 +57,8 @@ import java.util.stream.Collectors;
|
||||
@RocketMQMessageListener(topic = "${lili.data.rocketmq.goods-topic}", consumerGroup = "${lili.data.rocketmq.goods-group}")
|
||||
public class GoodsMessageListener implements RocketMQListener<MessageExt> {
|
||||
|
||||
private static final int BATCH_SIZE = 10;
|
||||
|
||||
/**
|
||||
* ES商品
|
||||
*/
|
||||
@@ -175,10 +180,8 @@ public class GoodsMessageListener implements RocketMQListener<MessageExt> {
|
||||
try {
|
||||
String updateIndexFieldsJsonStr = new String(messageExt.getBody());
|
||||
JSONObject updateIndexFields = JSONUtil.parseObj(updateIndexFieldsJsonStr);
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String, Object> queryFields = updateIndexFields.get("queryFields", Map.class);
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String, Object> updateFields = updateIndexFields.get("updateFields", Map.class);
|
||||
@SuppressWarnings("unchecked") Map<String, Object> queryFields = updateIndexFields.get("queryFields", Map.class);
|
||||
@SuppressWarnings("unchecked") Map<String, Object> updateFields = updateIndexFields.get("updateFields", Map.class);
|
||||
goodsIndexService.updateIndex(queryFields, updateFields);
|
||||
} catch (Exception e) {
|
||||
log.error("更新商品索引事件执行异常,商品信息: " + new String(messageExt.getBody()), e);
|
||||
@@ -231,6 +234,12 @@ public class GoodsMessageListener implements RocketMQListener<MessageExt> {
|
||||
log.error("删除店铺商品索引事件执行异常,商品信息: " + new String(messageExt.getBody()), e);
|
||||
}
|
||||
break;
|
||||
//同步商品分类名称
|
||||
case CATEGORY_GOODS_NAME:
|
||||
//分类ID
|
||||
String id = new String(messageExt.getBody());
|
||||
goodsService.categoryGoodsName(id);
|
||||
break;
|
||||
//商品评价
|
||||
case GOODS_COMMENT_COMPLETE:
|
||||
MemberEvaluation memberEvaluation = JSONUtil.toBean(new String(messageExt.getBody()), MemberEvaluation.class);
|
||||
@@ -238,10 +247,7 @@ public class GoodsMessageListener implements RocketMQListener<MessageExt> {
|
||||
try {
|
||||
goodsCommentCompleteEvent.goodsComment(memberEvaluation);
|
||||
} catch (Exception e) {
|
||||
log.error("评价{},在{}业务中,状态修改事件执行异常",
|
||||
new String(messageExt.getBody()),
|
||||
goodsCommentCompleteEvent.getClass().getName(),
|
||||
e);
|
||||
log.error("评价{},在{}业务中,状态修改事件执行异常", new String(messageExt.getBody()), goodsCommentCompleteEvent.getClass().getName(), e);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -260,26 +266,45 @@ public class GoodsMessageListener implements RocketMQListener<MessageExt> {
|
||||
log.info("更新商品索引促销信息: {}", promotionsJsonStr);
|
||||
JSONObject jsonObject = JSONUtil.parseObj(promotionsJsonStr);
|
||||
// 转换为详细的促销信息(注:促销信息必须继承自 BasePromotions,且必须保证派生类存在与sdk包下)
|
||||
BasePromotions promotions = (BasePromotions) jsonObject.get("promotions",
|
||||
ClassLoaderUtil.loadClass(jsonObject.get("promotionsType").toString()));
|
||||
BasePromotions promotions = (BasePromotions) jsonObject.get("promotions", ClassLoaderUtil.loadClass(jsonObject.get("promotionsType").toString()));
|
||||
// 获取促销唯一key,由 促销类型 + 促销id 组成
|
||||
String esPromotionKey = jsonObject.get("esPromotionKey").toString();
|
||||
if (PromotionsScopeTypeEnum.PORTION_GOODS.name().equals(promotions.getScopeType())) {
|
||||
PromotionGoodsSearchParams searchParams = new PromotionGoodsSearchParams();
|
||||
searchParams.setPromotionId(promotions.getId());
|
||||
List<PromotionGoods> promotionGoodsList = this.promotionGoodsService.listFindAll(searchParams);
|
||||
List<String> skuIds = promotionGoodsList.stream().map(PromotionGoods::getSkuId).collect(Collectors.toList());
|
||||
// 更新商品索引促销信息(删除原索引中相关的促销信息,更新索引中促销信息)
|
||||
this.goodsIndexService.deleteEsGoodsPromotionByPromotionKey(skuIds, esPromotionKey);
|
||||
this.goodsIndexService.updateEsGoodsIndexByList(promotionGoodsList, promotions, esPromotionKey);
|
||||
for (int i = 0; ; i++) {
|
||||
PromotionGoodsSearchParams searchParams = new PromotionGoodsSearchParams();
|
||||
searchParams.setPromotionId(promotions.getId());
|
||||
PageVO pageVO = new PageVO();
|
||||
pageVO.setPageNumber(i);
|
||||
pageVO.setPageSize(BATCH_SIZE);
|
||||
Page<PromotionGoods> promotionGoodsPage = this.promotionGoodsService.pageFindAll(searchParams, pageVO);
|
||||
if (promotionGoodsPage == null || promotionGoodsPage.getRecords().isEmpty()) {
|
||||
break;
|
||||
}
|
||||
List<String> skuIds = promotionGoodsPage.getRecords().stream().map(PromotionGoods::getSkuId).collect(Collectors.toList());
|
||||
// 更新商品索引促销信息(删除原索引中相关的促销信息,更新索引中促销信息)
|
||||
this.goodsIndexService.deleteEsGoodsPromotionByPromotionKey(skuIds, esPromotionKey);
|
||||
this.goodsIndexService.updateEsGoodsIndexByList(promotionGoodsPage.getRecords(), promotions, esPromotionKey);
|
||||
}
|
||||
|
||||
} else if (PromotionsScopeTypeEnum.PORTION_GOODS_CATEGORY.name().equals(promotions.getScopeType())) {
|
||||
GoodsSearchParams searchParams = new GoodsSearchParams();
|
||||
searchParams.setCategoryPath(promotions.getScopeId());
|
||||
List<GoodsSku> goodsSkuByList = this.goodsSkuService.getGoodsSkuByList(searchParams);
|
||||
List<String> skuIds = goodsSkuByList.stream().map(GoodsSku::getId).collect(Collectors.toList());
|
||||
// 更新商品索引促销信息(删除原索引中相关的促销信息,更新索引中促销信息)
|
||||
this.goodsIndexService.deleteEsGoodsPromotionByPromotionKey(skuIds, esPromotionKey);
|
||||
this.goodsIndexService.updateEsGoodsIndexPromotions(skuIds, promotions, esPromotionKey);
|
||||
for (int i = 0; ; i++) {
|
||||
GoodsSearchParams searchParams = new GoodsSearchParams();
|
||||
searchParams.setCategoryPath(promotions.getScopeId());
|
||||
searchParams.setPageNumber(i);
|
||||
searchParams.setPageSize(BATCH_SIZE);
|
||||
if (CharSequenceUtil.isNotEmpty(promotions.getStoreId()) && !"0".equals(promotions.getStoreId())){
|
||||
searchParams.setStoreId(promotions.getStoreId());
|
||||
}
|
||||
IPage<GoodsSku> goodsSkuByPage = this.goodsSkuService.getGoodsSkuByPage(searchParams);
|
||||
if (goodsSkuByPage == null || goodsSkuByPage.getRecords().isEmpty()) {
|
||||
break;
|
||||
}
|
||||
List<String> skuIds = goodsSkuByPage.getRecords().stream().map(GoodsSku::getId).collect(Collectors.toList());
|
||||
// 更新商品索引促销信息(删除原索引中相关的促销信息,更新索引中促销信息)
|
||||
this.goodsIndexService.deleteEsGoodsPromotionByPromotionKey(skuIds, esPromotionKey);
|
||||
this.goodsIndexService.updateEsGoodsIndexPromotions(skuIds, promotions, esPromotionKey);
|
||||
}
|
||||
|
||||
} else if (PromotionsScopeTypeEnum.ALL.name().equals(promotions.getScopeType())) {
|
||||
this.goodsIndexService.updateEsGoodsIndexAllByList(promotions, esPromotionKey);
|
||||
}
|
||||
@@ -321,26 +346,32 @@ public class GoodsMessageListener implements RocketMQListener<MessageExt> {
|
||||
* @param goods 商品消息
|
||||
*/
|
||||
private void updateGoodsIndex(Goods goods) {
|
||||
//如果商品通过审核&&并且已上架
|
||||
GoodsSearchParams searchParams = new GoodsSearchParams();
|
||||
searchParams.setGoodsId(goods.getId());
|
||||
List<GoodsSku> goodsSkuList = this.goodsSkuService.getGoodsSkuByList(searchParams);
|
||||
log.info("goods:{}", goods);
|
||||
log.info("goodsSkuList:{}", goodsSkuList);
|
||||
if (goods.getAuthFlag().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());
|
||||
for (int i = 1; ; i++) {
|
||||
//如果商品通过审核&&并且已上架
|
||||
GoodsSearchParams searchParams = new GoodsSearchParams();
|
||||
searchParams.setGoodsId(goods.getId());
|
||||
searchParams.setPageNumber(i);
|
||||
searchParams.setPageSize(BATCH_SIZE);
|
||||
searchParams.setGeQuantity(0);
|
||||
IPage<GoodsSku> goodsSkuByPage = this.goodsSkuService.getGoodsSkuByPage(searchParams);
|
||||
if (goodsSkuByPage == null || goodsSkuByPage.getRecords().isEmpty()) {
|
||||
break;
|
||||
}
|
||||
log.info("goods:{}", goods);
|
||||
log.info("goodsSkuList:{}", goodsSkuByPage.getRecords());
|
||||
if (goods.getAuthFlag().equals(GoodsAuthEnum.PASS.name()) && goods.getMarketEnable().equals(GoodsStatusEnum.UPPER.name()) && Boolean.FALSE.equals(goods.getDeleteFlag())) {
|
||||
this.generatorGoodsIndex(goods, goodsSkuByPage.getRecords());
|
||||
} else {
|
||||
//如果商品状态值不支持es搜索,那么将商品信息做下架处理
|
||||
for (GoodsSku goodsSku : goodsSkuByPage.getRecords()) {
|
||||
EsGoodsIndex esGoodsOld = goodsIndexService.findById(goodsSku.getId());
|
||||
if (esGoodsOld != null) {
|
||||
goodsIndexService.deleteIndexById(goodsSku.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -354,13 +385,14 @@ public class GoodsMessageListener implements RocketMQListener<MessageExt> {
|
||||
List<EsGoodsIndex> esGoodsIndices = new ArrayList<>();
|
||||
for (GoodsSku goodsSku : goodsSkuList) {
|
||||
EsGoodsIndex goodsIndex = this.settingUpGoodsIndexData(goods, goodsSku);
|
||||
goodsIndex.setSkuSource(skuSource--);
|
||||
log.info("goodsSku:{}", goodsSku);
|
||||
//如果商品库存不为0,并且es中有数据
|
||||
if (goodsSku.getQuantity() > 0) {
|
||||
log.info("生成商品索引 {}", goodsIndex);
|
||||
esGoodsIndices.add(goodsIndex);
|
||||
skuSource--;
|
||||
if (skuSource <= 0) {
|
||||
skuSource = 1;
|
||||
}
|
||||
goodsIndex.setSkuSource(skuSource);
|
||||
log.info("goodsSku:{}", goodsSku);
|
||||
log.info("生成商品索引 {}", goodsIndex);
|
||||
esGoodsIndices.add(goodsIndex);
|
||||
}
|
||||
this.goodsIndexService.deleteIndex(MapUtil.builder(new HashMap<String, Object>()).put("goodsId", goods.getId()).build());
|
||||
this.goodsIndexService.addIndex(esGoodsIndices);
|
||||
@@ -463,11 +495,9 @@ public class GoodsMessageListener implements RocketMQListener<MessageExt> {
|
||||
}
|
||||
int buyCount = goodsSku.getBuyCount() + goodsCompleteMessage.getBuyNum();
|
||||
goodsSku.setBuyCount(buyCount);
|
||||
goodsSkuService.update(goodsSku);
|
||||
goodsSkuService.updateGoodsSkuBuyCount(goodsSku.getId(), buyCount);
|
||||
|
||||
this.goodsIndexService.updateIndex(
|
||||
MapUtil.builder(new HashMap<String, Object>()).put("id", goodsCompleteMessage.getSkuId()).build(),
|
||||
MapUtil.builder(new HashMap<String, Object>()).put("buyCount", buyCount).build());
|
||||
this.goodsIndexService.updateIndex(MapUtil.builder(new HashMap<String, Object>()).put("id", goodsCompleteMessage.getSkuId()).build(), MapUtil.builder(new HashMap<String, Object>()).put("buyCount", buyCount).build());
|
||||
|
||||
} else {
|
||||
log.error("商品SkuId为[" + goodsCompleteMessage.getGoodsId() + "的商品不存在,更新商品失败!");
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
package cn.lili.listener;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import cn.lili.event.MemberLoginEvent;
|
||||
import cn.lili.event.MemberPointChangeEvent;
|
||||
import cn.lili.event.MemberRegisterEvent;
|
||||
import cn.lili.event.MemberWithdrawalEvent;
|
||||
import cn.lili.event.*;
|
||||
import cn.lili.event.impl.ImTalkExecute;
|
||||
import cn.lili.modules.connect.entity.dto.MemberConnectLoginMessage;
|
||||
import cn.lili.modules.member.entity.dos.Member;
|
||||
import cn.lili.modules.member.entity.dos.MemberSign;
|
||||
import cn.lili.modules.member.entity.dto.MemberPointMessage;
|
||||
@@ -57,7 +56,10 @@ public class MemberMessageListener implements RocketMQListener<MessageExt> {
|
||||
*/
|
||||
@Autowired
|
||||
private List<MemberLoginEvent> memberLoginEvents;
|
||||
|
||||
@Autowired
|
||||
private List<MemberInfoChangeEvent> memberInfoChangeEvents;
|
||||
@Autowired
|
||||
private List<MemberConnectLoginEvent> memberConnectLoginEvents;
|
||||
|
||||
@Override
|
||||
public void onMessage(MessageExt messageExt) {
|
||||
@@ -76,7 +78,7 @@ public class MemberMessageListener implements RocketMQListener<MessageExt> {
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
//用户登录
|
||||
case MEMBER_LOGIN:
|
||||
|
||||
for (MemberLoginEvent memberLoginEvent : memberLoginEvents) {
|
||||
@@ -110,6 +112,20 @@ public class MemberMessageListener implements RocketMQListener<MessageExt> {
|
||||
}
|
||||
}
|
||||
break;
|
||||
//会员信息更改
|
||||
case MEMBER_INFO_EDIT:
|
||||
for (MemberInfoChangeEvent memberInfoChangeEvent : memberInfoChangeEvents) {
|
||||
try {
|
||||
Member member = JSONUtil.toBean(new String(messageExt.getBody()), Member.class);
|
||||
memberInfoChangeEvent.memberInfoChange(member);
|
||||
} catch (Exception e) {
|
||||
log.error("会员{},在{}业务中,提现事件执行异常",
|
||||
new String(messageExt.getBody()),
|
||||
memberInfoChangeEvent.getClass().getName(),
|
||||
e);
|
||||
}
|
||||
}
|
||||
break;
|
||||
//会员提现
|
||||
case MEMBER_WITHDRAWAL:
|
||||
for (MemberWithdrawalEvent memberWithdrawalEvent : memberWithdrawalEvents) {
|
||||
@@ -124,6 +140,20 @@ public class MemberMessageListener implements RocketMQListener<MessageExt> {
|
||||
}
|
||||
}
|
||||
break;
|
||||
//用户第三方登录
|
||||
case MEMBER_CONNECT_LOGIN:
|
||||
for (MemberConnectLoginEvent memberConnectLoginEvent : memberConnectLoginEvents) {
|
||||
try {
|
||||
MemberConnectLoginMessage memberConnectLoginMessage = JSONUtil.toBean(new String(messageExt.getBody()), MemberConnectLoginMessage.class);
|
||||
memberConnectLoginEvent.memberConnectLogin(memberConnectLoginMessage.getMember(), memberConnectLoginMessage.getConnectAuthUser());
|
||||
} catch (Exception e) {
|
||||
log.error("会员{},在{}业务中,状态修改事件执行异常",
|
||||
new String(messageExt.getBody()),
|
||||
memberConnectLoginEvent.getClass().getName(),
|
||||
e);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
package cn.lili.listener;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import cn.lili.event.MemberRegisterEvent;
|
||||
import cn.lili.event.StoreSettingChangeEvent;
|
||||
import cn.lili.modules.member.entity.dos.Member;
|
||||
import cn.lili.modules.store.entity.dos.Store;
|
||||
import cn.lili.rocketmq.tags.StoreTagsEnum;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.rocketmq.common.message.MessageExt;
|
||||
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
|
||||
import org.apache.rocketmq.spring.core.RocketMQListener;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 店铺消息
|
||||
* @author chc
|
||||
* @since 2022/6/2114:46
|
||||
*/
|
||||
@Component
|
||||
@Slf4j
|
||||
@RocketMQMessageListener(topic = "${lili.data.rocketmq.store-topic}", consumerGroup = "${lili.data.rocketmq.store-group}")
|
||||
public class StoreMessageListener implements RocketMQListener<MessageExt> {
|
||||
@Autowired
|
||||
private List<StoreSettingChangeEvent> storeSettingChangeEventList;
|
||||
|
||||
@Override
|
||||
public void onMessage(MessageExt messageExt) {
|
||||
switch (StoreTagsEnum.valueOf(messageExt.getTags())){
|
||||
//修改店铺
|
||||
case EDIT_STORE_SETTING:
|
||||
for (StoreSettingChangeEvent storeSettingChangeEvent : storeSettingChangeEventList) {
|
||||
try {
|
||||
Store store = JSONUtil.toBean(new String(messageExt.getBody()), Store.class);
|
||||
storeSettingChangeEvent.storeSettingChange(store);
|
||||
} catch (Exception e) {
|
||||
log.error("会员{},在{}业务中,状态修改事件执行异常",
|
||||
new String(messageExt.getBody()),
|
||||
storeSettingChangeEvent.getClass().getName(),
|
||||
e);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
package cn.lili.timetask.handler.impl.bill;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.lili.modules.store.entity.dto.StoreSettlementDay;
|
||||
import cn.lili.modules.store.service.BillService;
|
||||
import cn.lili.modules.store.service.StoreDetailService;
|
||||
import cn.lili.timetask.handler.EveryDayExecute;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 店铺结算执行
|
||||
*
|
||||
* @author Bulbasaur
|
||||
* @since 2021/2/18 3:45 下午
|
||||
*/
|
||||
@Component
|
||||
public class BillExecute implements EveryDayExecute {
|
||||
|
||||
/**
|
||||
* 结算单
|
||||
*/
|
||||
@Autowired
|
||||
private BillService billService;
|
||||
/**
|
||||
* 店铺详情
|
||||
*/
|
||||
@Autowired
|
||||
private StoreDetailService storeDetailService;
|
||||
|
||||
/**
|
||||
* 1.查询今日待结算的商家
|
||||
* 2.查询商家上次结算日期,生成本次结算单
|
||||
* 3.记录商家结算日
|
||||
*/
|
||||
@Override
|
||||
public void execute() {
|
||||
|
||||
//获取当前天数
|
||||
int day = DateUtil.date().dayOfMonth();
|
||||
|
||||
//获取待结算商家列表
|
||||
List<StoreSettlementDay> storeList = storeDetailService.getSettlementStore(day);
|
||||
|
||||
//获取当前时间
|
||||
DateTime endTime = DateUtil.date();
|
||||
//批量商家结算
|
||||
for (StoreSettlementDay storeSettlementDay : storeList) {
|
||||
|
||||
//生成结算单
|
||||
billService.createBill(storeSettlementDay.getStoreId(), storeSettlementDay.getSettlementDay(), endTime);
|
||||
|
||||
//修改店铺结算时间
|
||||
storeDetailService.updateSettlementDay(storeSettlementDay.getStoreId(), endTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,14 +3,12 @@ package cn.lili.timetask.handler.impl.goods;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.lili.modules.goods.mapper.GoodsMapper;
|
||||
import cn.lili.modules.member.entity.dos.MemberEvaluation;
|
||||
import cn.lili.modules.member.mapper.MemberEvaluationMapper;
|
||||
import cn.lili.modules.goods.service.GoodsService;
|
||||
import cn.lili.modules.member.service.MemberEvaluationService;
|
||||
import cn.lili.timetask.handler.EveryDayExecute;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -25,13 +23,13 @@ public class GoodsExecute implements EveryDayExecute {
|
||||
/**
|
||||
* 会员评价
|
||||
*/
|
||||
@Resource
|
||||
private MemberEvaluationMapper memberEvaluationMapper;
|
||||
@Autowired
|
||||
private MemberEvaluationService memberEvaluationService;
|
||||
/**
|
||||
* 商品
|
||||
*/
|
||||
@Resource
|
||||
private GoodsMapper goodsMapper;
|
||||
@Autowired
|
||||
private GoodsService goodsService;
|
||||
|
||||
/**
|
||||
* 查询已上架的商品的评价数量并赋值
|
||||
@@ -40,12 +38,10 @@ public class GoodsExecute implements EveryDayExecute {
|
||||
public void execute() {
|
||||
|
||||
//查询上次统计到本次的评价数量
|
||||
List<Map<String, Object>> list = memberEvaluationMapper.memberEvaluationNum(
|
||||
new QueryWrapper<MemberEvaluation>()
|
||||
.between("create_time", DateUtil.yesterday(), new DateTime()));
|
||||
List<Map<String, Object>> list = memberEvaluationService.memberEvaluationNum(DateUtil.yesterday(), new DateTime());
|
||||
|
||||
for (Map<String, Object> map : list) {
|
||||
goodsMapper.addGoodsCommentNum(Convert.toInt(map.get("num").toString()), map.get("goods_id").toString());
|
||||
goodsService.addGoodsCommentNum(Convert.toInt(map.get("num").toString()), map.get("goods_id").toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ public class CancelOrderTaskExecute implements EveryMinuteExecute {
|
||||
List<Order> list = orderService.list(queryWrapper);
|
||||
List<String> cancelSnList = list.stream().map(Order::getSn).collect(Collectors.toList());
|
||||
for (String sn : cancelSnList) {
|
||||
orderService.systemCancel(sn, "超时未支付自动取消");
|
||||
orderService.systemCancel(sn, "超时未支付自动取消",false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,34 +5,37 @@ import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import cn.lili.common.enums.ResultCode;
|
||||
import cn.lili.common.exception.ServiceException;
|
||||
import cn.lili.modules.distribution.service.DistributionOrderService;
|
||||
import cn.lili.modules.member.entity.dto.MemberEvaluationDTO;
|
||||
import cn.lili.modules.member.entity.enums.EvaluationGradeEnum;
|
||||
import cn.lili.modules.member.service.MemberEvaluationService;
|
||||
import cn.lili.modules.order.aftersale.service.AfterSaleService;
|
||||
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.OrderItemOperationDTO;
|
||||
import cn.lili.modules.order.order.entity.enums.CommentStatusEnum;
|
||||
import cn.lili.modules.order.order.entity.enums.OrderComplaintStatusEnum;
|
||||
import cn.lili.modules.order.order.entity.enums.OrderItemAfterSaleStatusEnum;
|
||||
import cn.lili.modules.order.order.entity.enums.OrderStatusEnum;
|
||||
import cn.lili.modules.order.order.mapper.OrderItemMapper;
|
||||
import cn.lili.modules.order.order.service.OrderItemService;
|
||||
import cn.lili.modules.order.order.service.OrderService;
|
||||
import cn.lili.modules.order.order.service.StoreFlowService;
|
||||
import cn.lili.modules.store.entity.dto.StoreSettlementDay;
|
||||
import cn.lili.modules.store.service.BillService;
|
||||
import cn.lili.modules.store.service.StoreDetailService;
|
||||
import cn.lili.modules.system.entity.dos.Setting;
|
||||
import cn.lili.modules.system.entity.dto.OrderSetting;
|
||||
import cn.lili.modules.system.entity.enums.SettingEnum;
|
||||
import cn.lili.modules.system.service.SettingService;
|
||||
import cn.lili.timetask.handler.EveryDayExecute;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.messaging.handler.annotation.SendTo;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* @author paulG
|
||||
@@ -53,8 +56,6 @@ public class OrderEveryDayTaskExecute implements EveryDayExecute {
|
||||
*/
|
||||
@Autowired
|
||||
private OrderItemService orderItemService;
|
||||
@Resource
|
||||
private OrderItemMapper orderItemMapper;
|
||||
/**
|
||||
* 设置
|
||||
*/
|
||||
@@ -67,7 +68,21 @@ public class OrderEveryDayTaskExecute implements EveryDayExecute {
|
||||
private MemberEvaluationService memberEvaluationService;
|
||||
|
||||
@Autowired
|
||||
private AfterSaleService afterSaleService;
|
||||
private DistributionOrderService distributionOrderService;
|
||||
|
||||
@Autowired
|
||||
private StoreFlowService storeFlowService;
|
||||
|
||||
/**
|
||||
* 结算单
|
||||
*/
|
||||
@Autowired
|
||||
private BillService billService;
|
||||
/**
|
||||
* 店铺详情
|
||||
*/
|
||||
@Autowired
|
||||
private StoreDetailService storeDetailService;
|
||||
|
||||
/**
|
||||
* 执行每日任务
|
||||
@@ -82,14 +97,46 @@ public class OrderEveryDayTaskExecute implements EveryDayExecute {
|
||||
throw new ServiceException(ResultCode.ORDER_SETTING_ERROR);
|
||||
}
|
||||
|
||||
//自动确认收货
|
||||
completedOrder(orderSetting);
|
||||
//自动好评
|
||||
memberEvaluation(orderSetting);
|
||||
//关闭允许售后申请
|
||||
closeAfterSale(orderSetting);
|
||||
//关闭允许投诉
|
||||
closeComplaint(orderSetting);
|
||||
try {
|
||||
//自动确认收货
|
||||
completedOrder(orderSetting);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
try {
|
||||
//自动好评
|
||||
memberEvaluation(orderSetting);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
try {
|
||||
//关闭允许售后申请
|
||||
this.closeAfterSale(orderSetting);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
try {
|
||||
//关闭允许投诉
|
||||
closeComplaint(orderSetting);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
|
||||
//修改分账状态
|
||||
try {
|
||||
storeFlowService.updateProfitSharingStatus();
|
||||
} catch (Exception e) {
|
||||
log.error("修改分账状态失败", e);
|
||||
}
|
||||
|
||||
//生成店铺结算单
|
||||
try {
|
||||
createBill();
|
||||
} catch (Exception e) {
|
||||
log.error("生成店铺结算单", e);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -99,7 +146,6 @@ public class OrderEveryDayTaskExecute implements EveryDayExecute {
|
||||
*/
|
||||
private void completedOrder(OrderSetting orderSetting) {
|
||||
|
||||
|
||||
//订单自动收货时间 = 当前时间 - 自动收货时间天数
|
||||
DateTime receiveTime = DateUtil.offsetDay(DateUtil.date(), -orderSetting.getAutoReceive());
|
||||
LambdaQueryWrapper<Order> queryWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -109,12 +155,16 @@ public class OrderEveryDayTaskExecute implements EveryDayExecute {
|
||||
queryWrapper.le(Order::getLogisticsTime, receiveTime);
|
||||
List<Order> list = orderService.list(queryWrapper);
|
||||
|
||||
//判断是否有符合条件的订单,进行订单完成处理
|
||||
if (!list.isEmpty()) {
|
||||
List<String> receiveSnList = list.stream().map(Order::getSn).collect(Collectors.toList());
|
||||
for (String orderSn : receiveSnList) {
|
||||
orderService.systemComplete(orderSn);
|
||||
try {
|
||||
//判断是否有符合条件的订单,进行订单完成处理
|
||||
if (!list.isEmpty()) {
|
||||
List<String> receiveSnList = list.stream().map(Order::getSn).collect(Collectors.toList());
|
||||
for (String orderSn : receiveSnList) {
|
||||
orderService.systemComplete(orderSn);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,10 +178,10 @@ public class OrderEveryDayTaskExecute implements EveryDayExecute {
|
||||
DateTime receiveTime = DateUtil.offsetDay(DateUtil.date(), -orderSetting.getAutoEvaluation());
|
||||
|
||||
//订单完成时间 <= 订单自动好评时间
|
||||
QueryWrapper queryWrapper = new QueryWrapper();
|
||||
queryWrapper.le("o.complete_time", receiveTime);
|
||||
queryWrapper.eq("oi.comment_status", CommentStatusEnum.UNFINISHED.name());
|
||||
List<OrderItem> orderItems = orderItemMapper.waitOperationOrderItem(queryWrapper);
|
||||
OrderItemOperationDTO orderItemOperationDTO =
|
||||
OrderItemOperationDTO.builder().receiveTime(receiveTime).commentStatus(CommentStatusEnum.UNFINISHED.name())
|
||||
.build();
|
||||
List<OrderItem> orderItems = orderItemService.waitOperationOrderItem(orderItemOperationDTO);
|
||||
|
||||
//判断是否有符合条件的订单,进行自动评价处理
|
||||
if (!orderItems.isEmpty()) {
|
||||
@@ -146,40 +196,31 @@ public class OrderEveryDayTaskExecute implements EveryDayExecute {
|
||||
memberEvaluationDTO.setDescriptionScore(5);
|
||||
memberEvaluationDTO.setServiceScore(5);
|
||||
|
||||
memberEvaluationService.addMemberEvaluation(memberEvaluationDTO, false);
|
||||
try {
|
||||
memberEvaluationService.addMemberEvaluation(memberEvaluationDTO, false);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 关闭允许售后申请
|
||||
*
|
||||
* @param orderSetting 订单设置
|
||||
*/
|
||||
private void closeAfterSale(OrderSetting orderSetting) {
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void closeAfterSale(OrderSetting orderSetting) {
|
||||
//订单关闭售后申请时间 = 当前时间 - 自动关闭售后申请天数
|
||||
DateTime receiveTime = DateUtil.offsetDay(DateUtil.date(), -orderSetting.getCloseAfterSale());
|
||||
|
||||
// OrderItemOperationDTO build = OrderItemOperationDTO.builder().receiveTime(receiveTime)
|
||||
// .afterSaleStatus(OrderItemAfterSaleStatusEnum.NOT_APPLIED.name()).build();
|
||||
// List<OrderItem> orderItems = orderItemService.waitOperationOrderItem(build);
|
||||
//关闭售后订单=未售后订单+小于订单关闭售后申请时间
|
||||
QueryWrapper queryWrapper = new QueryWrapper();
|
||||
queryWrapper.le("o.complete_time", receiveTime);
|
||||
queryWrapper.eq("oi.after_sale_status", OrderItemAfterSaleStatusEnum.NOT_APPLIED.name());
|
||||
List<OrderItem> orderItems = orderItemMapper.waitOperationOrderItem(queryWrapper);
|
||||
|
||||
//判断是否有符合条件的订单,关闭允许售后申请处理
|
||||
if (!orderItems.isEmpty()) {
|
||||
|
||||
//获取订单货物ID
|
||||
List<String> orderItemIdList = orderItems.stream().map(OrderItem::getId).collect(Collectors.toList());
|
||||
|
||||
//修改订单售后状态
|
||||
LambdaUpdateWrapper<OrderItem> lambdaUpdateWrapper = new LambdaUpdateWrapper<OrderItem>()
|
||||
.set(OrderItem::getAfterSaleStatus, OrderItemAfterSaleStatusEnum.EXPIRED.name())
|
||||
.in(OrderItem::getId, orderItemIdList);
|
||||
orderItemService.update(lambdaUpdateWrapper);
|
||||
}
|
||||
orderItemService.expiredAfterSaleStatus(receiveTime);
|
||||
|
||||
}
|
||||
|
||||
@@ -190,14 +231,17 @@ public class OrderEveryDayTaskExecute implements EveryDayExecute {
|
||||
*/
|
||||
private void closeComplaint(OrderSetting orderSetting) {
|
||||
|
||||
//为0则不限制
|
||||
if (orderSetting.getCloseComplaint() == null || orderSetting.getCloseComplaint() == 0) {
|
||||
return;
|
||||
}
|
||||
//订单关闭交易投诉申请时间 = 当前时间 - 自动关闭交易投诉申请天数
|
||||
DateTime receiveTime = DateUtil.offsetDay(DateUtil.date(), -orderSetting.getCloseComplaint());
|
||||
|
||||
//关闭售后订单=未售后订单+小于订单关闭售后申请时间
|
||||
QueryWrapper queryWrapper = new QueryWrapper();
|
||||
queryWrapper.le("o.complete_time", receiveTime);
|
||||
queryWrapper.eq("oi.complain_status", OrderComplaintStatusEnum.NO_APPLY.name());
|
||||
List<OrderItem> orderItems = orderItemMapper.waitOperationOrderItem(queryWrapper);
|
||||
OrderItemOperationDTO build = OrderItemOperationDTO.builder().receiveTime(receiveTime)
|
||||
.complainStatus(OrderComplaintStatusEnum.NO_APPLY.name()).build();
|
||||
List<OrderItem> orderItems = orderItemService.waitOperationOrderItem(build);
|
||||
|
||||
//判断是否有符合条件的订单,关闭允许售后申请处理
|
||||
if (!orderItems.isEmpty()) {
|
||||
@@ -206,12 +250,37 @@ public class OrderEveryDayTaskExecute implements EveryDayExecute {
|
||||
List<String> orderItemIdList = orderItems.stream().map(OrderItem::getId).collect(Collectors.toList());
|
||||
|
||||
//修改订单投诉状态
|
||||
LambdaUpdateWrapper<OrderItem> lambdaUpdateWrapper = new LambdaUpdateWrapper<OrderItem>()
|
||||
.set(OrderItem::getComplainStatus, OrderItemAfterSaleStatusEnum.EXPIRED.name())
|
||||
.in(OrderItem::getId, orderItemIdList);
|
||||
LambdaUpdateWrapper<OrderItem> lambdaUpdateWrapper =
|
||||
new LambdaUpdateWrapper<OrderItem>().set(OrderItem::getComplainStatus,
|
||||
OrderItemAfterSaleStatusEnum.EXPIRED.name()).in(OrderItem::getId, orderItemIdList);
|
||||
orderItemService.update(lambdaUpdateWrapper);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 1.查询今日待结算的商家
|
||||
* 2.查询商家上次结算日期,生成本次结算单
|
||||
* 3.记录商家结算日
|
||||
*/
|
||||
private void createBill() {
|
||||
//获取当前天数
|
||||
int day = DateUtil.date().dayOfMonth();
|
||||
|
||||
//获取待结算商家列表
|
||||
List<StoreSettlementDay> storeList = storeDetailService.getSettlementStore(day);
|
||||
|
||||
//获取当前时间
|
||||
DateTime endTime = DateUtil.date();
|
||||
//批量商家结算
|
||||
for (StoreSettlementDay storeSettlementDay : storeList) {
|
||||
|
||||
//生成结算单
|
||||
billService.createBill(storeSettlementDay.getStoreId(), storeSettlementDay.getSettlementDay(), endTime);
|
||||
|
||||
//修改店铺结算时间
|
||||
storeDetailService.updateSettlementDay(storeSettlementDay.getStoreId(), endTime);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
package cn.lili.timetask.handler.impl.promotion;
|
||||
|
||||
import cn.lili.common.enums.PromotionTypeEnum;
|
||||
import cn.lili.modules.promotion.entity.dos.Seckill;
|
||||
import cn.lili.modules.promotion.service.MemberCouponSignService;
|
||||
import cn.lili.modules.promotion.service.SeckillService;
|
||||
import cn.lili.modules.promotion.tools.PromotionTools;
|
||||
import cn.lili.modules.search.service.EsGoodsIndexService;
|
||||
import cn.lili.modules.system.entity.dos.Setting;
|
||||
import cn.lili.modules.system.entity.dto.SeckillSetting;
|
||||
import cn.lili.modules.system.entity.enums.SettingEnum;
|
||||
import cn.lili.modules.system.service.SettingService;
|
||||
import cn.lili.timetask.handler.EveryDayExecute;
|
||||
import com.google.gson.Gson;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 促销活动每日定时器
|
||||
*
|
||||
* @author Chopper
|
||||
* @since 2021/3/18 3:23 下午
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class MemberCouponSignEverydayExecute implements EveryDayExecute {
|
||||
|
||||
@Autowired
|
||||
private MemberCouponSignService memberCouponSignService;
|
||||
|
||||
/**
|
||||
* 将已过期的促销活动置为结束
|
||||
*/
|
||||
@Override
|
||||
public void execute() {
|
||||
try {
|
||||
memberCouponSignService.clean();
|
||||
} catch (Exception e) {
|
||||
log.error("清除领取优惠券标记异常", e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -72,6 +72,7 @@ public class PromotionEverydayExecute implements EveryDayExecute {
|
||||
log.info("生成秒杀活动设置:{}", seckillSetting);
|
||||
for (int i = 1; i <= SeckillService.PRE_CREATION; i++) {
|
||||
Seckill seckill = new Seckill(i, seckillSetting.getHours(), seckillSetting.getSeckillRule());
|
||||
seckill.setApplyEndTime(null);
|
||||
|
||||
//如果已经存在促销,则不再次保存
|
||||
if (seckillService.list(
|
||||
|
||||
@@ -72,7 +72,8 @@ public class OnlineMemberStatistics implements EveryHourExecute {
|
||||
calendar.set(Calendar.MINUTE, 0);
|
||||
calendar.set(Calendar.SECOND, 0);
|
||||
calendar.set(Calendar.MILLISECOND, 0);
|
||||
onlineMemberVOS.add(new OnlineMemberVO(calendar.getTime(), cache.keys(CachePrefix.ACCESS_TOKEN.getPrefix(UserEnums.MEMBER) + "*").size(), lastNum.get()));
|
||||
onlineMemberVOS.add(new OnlineMemberVO(calendar.getTime(), cache.keys(CachePrefix.ACCESS_TOKEN.getPrefix(UserEnums.MEMBER) + "*").size(),
|
||||
lastNum.get()));
|
||||
|
||||
//写入缓存
|
||||
cache.put(CachePrefix.ONLINE_MEMBER.getPrefix(), onlineMemberVOS);
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package cn.lili.timetask.handler.impl.store;
|
||||
|
||||
import cn.lili.common.enums.SwitchEnum;
|
||||
import cn.lili.modules.member.entity.dos.MemberEvaluation;
|
||||
import cn.lili.modules.member.entity.vo.StoreRatingVO;
|
||||
import cn.lili.modules.member.mapper.MemberEvaluationMapper;
|
||||
import cn.lili.modules.member.service.MemberEvaluationService;
|
||||
import cn.lili.modules.store.entity.dos.Store;
|
||||
import cn.lili.modules.store.entity.enums.StoreStatusEnum;
|
||||
import cn.lili.modules.store.service.StoreService;
|
||||
@@ -14,7 +13,6 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -33,8 +31,8 @@ public class StoreRatingExecute implements EveryDayExecute {
|
||||
/**
|
||||
* 会员评价
|
||||
*/
|
||||
@Resource
|
||||
private MemberEvaluationMapper memberEvaluationMapper;
|
||||
@Autowired
|
||||
private MemberEvaluationService memberEvaluationService;
|
||||
|
||||
|
||||
@Override
|
||||
@@ -43,10 +41,7 @@ public class StoreRatingExecute implements EveryDayExecute {
|
||||
List<Store> storeList = storeService.list(new LambdaQueryWrapper<Store>().eq(Store::getStoreDisable, StoreStatusEnum.OPEN.name()));
|
||||
for (Store store : storeList) {
|
||||
//店铺所有开启的评价
|
||||
LambdaQueryWrapper<MemberEvaluation> lambdaQueryWrapper = Wrappers.lambdaQuery();
|
||||
lambdaQueryWrapper.eq(MemberEvaluation::getStoreId, store.getId());
|
||||
lambdaQueryWrapper.eq(MemberEvaluation::getStatus, SwitchEnum.OPEN.name());
|
||||
StoreRatingVO storeRatingVO = memberEvaluationMapper.getStoreRatingVO(lambdaQueryWrapper);
|
||||
StoreRatingVO storeRatingVO = memberEvaluationService.getStoreRatingVO(store.getId(), SwitchEnum.OPEN.name());
|
||||
|
||||
if (storeRatingVO != null) {
|
||||
//保存评分
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
package cn.lili.trigger.executor;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import cn.lili.modules.promotion.service.CouponActivityService;
|
||||
import cn.lili.trigger.TimeTriggerExecutor;
|
||||
import cn.lili.trigger.message.CouponActivityMessage;
|
||||
import cn.lili.trigger.model.TimeExecuteConstant;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 优惠券活动精准发圈延时触发
|
||||
*
|
||||
* @author Bulbasaur
|
||||
* @since 2021/6/1 5:02 下午
|
||||
*/
|
||||
@Slf4j
|
||||
@Component(TimeExecuteConstant.COUPON_ACTIVITY_EXECUTOR)
|
||||
public class CouponActivityTriggerExecutor implements TimeTriggerExecutor {
|
||||
|
||||
|
||||
@Autowired
|
||||
private CouponActivityService couponActivityService;
|
||||
|
||||
@Override
|
||||
public void execute(Object object) {
|
||||
CouponActivityMessage couponActivityMessage = JSONUtil.toBean(JSONUtil.parseObj(object), CouponActivityMessage.class);
|
||||
couponActivityService.specifyCoupon(couponActivityMessage.getCouponActivityId());
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package cn.lili.trigger.executor;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import cn.lili.modules.order.order.service.OrderService;
|
||||
import cn.lili.modules.promotion.entity.dos.Pintuan;
|
||||
import cn.lili.modules.promotion.service.PintuanService;
|
||||
import cn.lili.trigger.TimeTriggerExecutor;
|
||||
import cn.lili.trigger.message.PintuanOrderMessage;
|
||||
import cn.lili.trigger.model.TimeExecuteConstant;
|
||||
@@ -25,6 +26,8 @@ public class PromotionTimeTriggerExecutor implements TimeTriggerExecutor {
|
||||
*/
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
@Autowired
|
||||
private PintuanService pintuanService;
|
||||
|
||||
|
||||
@Override
|
||||
@@ -36,7 +39,7 @@ public class PromotionTimeTriggerExecutor implements TimeTriggerExecutor {
|
||||
//拼团订单自动处理
|
||||
orderService.agglomeratePintuanOrder(pintuanOrderMessage.getPintuanId(), pintuanOrderMessage.getOrderSn());
|
||||
}
|
||||
Pintuan pintuan = JSONUtil.toBean(JSONUtil.parseObj(object), Pintuan.class);
|
||||
Pintuan pintuan = pintuanService.getById(pintuanOrderMessage.getPintuanId());
|
||||
if (pintuan != null && pintuan.getId() != null) {
|
||||
this.orderService.checkFictitiousOrder(pintuan.getId(), pintuan.getRequiredNum(), pintuan.getFictitious());
|
||||
}
|
||||
|
||||
@@ -260,6 +260,8 @@ lili:
|
||||
order-group: lili_order_group
|
||||
member-topic: lili_member_topic
|
||||
member-group: lili_member_group
|
||||
store-topic: lili_store_topic
|
||||
store-group: lili_store_group
|
||||
other-topic: lili_other_topic
|
||||
other-group: lili_other_group
|
||||
notice-topic: lili_notice_topic
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
package cn.lili.buyer.test.cart;
|
||||
|
||||
import cn.lili.common.utils.DateUtil;
|
||||
import cn.lili.timetask.handler.impl.statistics.OnlineMemberStatistics;
|
||||
import org.junit.jupiter.api.Test;
|
||||
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.junit.jupiter.SpringExtension;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* 订单库存扣减
|
||||
*/
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@SpringBootTest
|
||||
class OnlineTest {
|
||||
|
||||
@Autowired
|
||||
private OnlineMemberStatistics onlineMemberStatistics;
|
||||
|
||||
//订单支付,库存扣减单元测试
|
||||
@Test
|
||||
void everyHour() {
|
||||
onlineMemberStatistics.execute();
|
||||
}
|
||||
|
||||
//订单支付,库存扣减单元测试
|
||||
@Test
|
||||
void customSetting() {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.set(Calendar.MINUTE, 0);
|
||||
calendar.set(Calendar.SECOND, 0);
|
||||
calendar.set(Calendar.MILLISECOND, 0);
|
||||
|
||||
calendar.set(Calendar.HOUR_OF_DAY, calendar.get(Calendar.HOUR_OF_DAY) - 48 );
|
||||
//循环填充数据
|
||||
for (int i = 0; i < 48; i++) {
|
||||
calendar.set(Calendar.HOUR_OF_DAY, calendar.get(Calendar.HOUR_OF_DAY) + 1);
|
||||
System.out.println(DateUtil.toString(calendar.getTime(),""));
|
||||
Random random = new Random();
|
||||
onlineMemberStatistics.execute(calendar.getTime(), random.nextInt(1000000));
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.set(Calendar.MINUTE, 0);
|
||||
calendar.set(Calendar.SECOND, 0);
|
||||
calendar.set(Calendar.MILLISECOND, 0);
|
||||
|
||||
calendar.set(Calendar.HOUR_OF_DAY, calendar.get(Calendar.HOUR_OF_DAY) - 48 - 1);
|
||||
//循环填充数据
|
||||
for (int i = 0; i < 48; i++) {
|
||||
calendar.set(Calendar.HOUR_OF_DAY, calendar.get(Calendar.HOUR_OF_DAY) + 1);
|
||||
System.out.println(calendar.getTime().getTime());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
50
docs/diagram/OrderComplaintBuyerController.uml
Normal file
50
docs/diagram/OrderComplaintBuyerController.uml
Normal file
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Diagram>
|
||||
<ID>JAVA</ID>
|
||||
<OriginalElement>cn.lili.controller.order.OrderComplaintBuyerController</OriginalElement>
|
||||
<nodes>
|
||||
<node x="-377.0" y="-206.0">cn.lili.modules.order.order.service.OrderComplaintCommunicationService</node>
|
||||
<node x="-927.5" y="123.5">cn.lili.controller.order.OrderComplaintStoreController</node>
|
||||
<node x="-378.0" y="607.0">cn.lili.modules.order.order.service.OrderComplaintService</node>
|
||||
<node x="311.5" y="111.0">cn.lili.controller.order.OrderComplaintBuyerController</node>
|
||||
<node x="-308.0" y="123.5">cn.lili.controller.order.OrderComplaintManagerController</node>
|
||||
</nodes>
|
||||
<notes />
|
||||
<edges>
|
||||
<edge source="cn.lili.controller.order.OrderComplaintStoreController" target="cn.lili.modules.order.order.service.OrderComplaintCommunicationService" relationship="TO_ONE">
|
||||
<point x="278.0" y="-84.5" />
|
||||
<point x="-330.0" y="38.5" />
|
||||
</edge>
|
||||
<edge source="cn.lili.controller.order.OrderComplaintStoreController" target="cn.lili.modules.order.order.service.OrderComplaintService" relationship="TO_ONE">
|
||||
<point x="262.0" y="84.5" />
|
||||
<point x="-300.0" y="-119.0" />
|
||||
</edge>
|
||||
<edge source="cn.lili.controller.order.OrderComplaintBuyerController" target="cn.lili.modules.order.order.service.OrderComplaintCommunicationService" relationship="TO_ONE">
|
||||
<point x="-286.0" y="-73.0" />
|
||||
<point x="345.0" y="38.5" />
|
||||
</edge>
|
||||
<edge source="cn.lili.controller.order.OrderComplaintBuyerController" target="cn.lili.modules.order.order.service.OrderComplaintService" relationship="TO_ONE">
|
||||
<point x="0.0" y="73.0" />
|
||||
<point x="606.5" y="726.0" />
|
||||
<point x="307.5" y="0.0" />
|
||||
</edge>
|
||||
<edge source="cn.lili.controller.order.OrderComplaintManagerController" target="cn.lili.modules.order.order.service.OrderComplaintCommunicationService" relationship="TO_ONE">
|
||||
<point x="-11.5" y="-84.5" />
|
||||
<point x="0.0" y="38.5" />
|
||||
</edge>
|
||||
<edge source="cn.lili.controller.order.OrderComplaintManagerController" target="cn.lili.modules.order.order.service.OrderComplaintService" relationship="TO_ONE">
|
||||
<point x="-57.5" y="84.5" />
|
||||
<point x="0.0" y="-119.0" />
|
||||
</edge>
|
||||
</edges>
|
||||
<settings layout="Hierarchic" zoom="1.0" showDependencies="true" x="-13.0" y="319.65625" />
|
||||
<SelectedNodes />
|
||||
<Categories>
|
||||
<Category>Inner Classes</Category>
|
||||
<Category>Methods</Category>
|
||||
<Category>Properties</Category>
|
||||
</Categories>
|
||||
<SCOPE>All</SCOPE>
|
||||
<VISIBILITY>private</VISIBILITY>
|
||||
</Diagram>
|
||||
|
||||
20
docs/uml/AfterSaleRefundGodos.puml
Normal file
20
docs/uml/AfterSaleRefundGodos.puml
Normal file
@@ -0,0 +1,20 @@
|
||||
@startuml
|
||||
'https://plantuml.com/sequence-diagram
|
||||
|
||||
actor user
|
||||
actor seller
|
||||
actor manager
|
||||
|
||||
user --> 平台: 申请售后
|
||||
seller -> 平台: 审核售后申请
|
||||
activate 平台
|
||||
平台 -> 平台: 更新售后状态
|
||||
return 售后审核响应
|
||||
|
||||
user -> 平台: 填写物流信息
|
||||
seller->平台: 确认收货
|
||||
activate 平台
|
||||
平台 -> 平台: 自动退款
|
||||
return 售后审核响应
|
||||
平台 -> user: 售后结束
|
||||
@enduml
|
||||
16
docs/uml/AfterSaleRefundMoney.puml
Normal file
16
docs/uml/AfterSaleRefundMoney.puml
Normal file
@@ -0,0 +1,16 @@
|
||||
@startuml
|
||||
'https://plantuml.com/sequence-diagram
|
||||
|
||||
actor user
|
||||
actor seller
|
||||
actor manager
|
||||
|
||||
user --> 平台: 申请售后
|
||||
seller -> 平台: 审核售后申请
|
||||
activate 平台
|
||||
平台 -> 平台: 通过审核,自动退款
|
||||
manager --> 平台: 审核阶段可介入操作
|
||||
return 售后审核响应
|
||||
|
||||
user -> 平台: 查询售后结果
|
||||
@enduml
|
||||
21
docs/uml/Complaint.puml
Normal file
21
docs/uml/Complaint.puml
Normal file
@@ -0,0 +1,21 @@
|
||||
@startuml
|
||||
'https://plantuml.com/sequence-diagram
|
||||
|
||||
actor user
|
||||
actor seller
|
||||
actor manager
|
||||
|
||||
activate 平台
|
||||
user -> 平台: 输入原因,发起投诉
|
||||
user --> 平台: 多次输出对话
|
||||
seller --> 平台: 多次输出对话
|
||||
manager --> 平台: 多次输出对话
|
||||
manager -> 平台: 根据各方意见,仲裁投诉结果
|
||||
activate 平台
|
||||
平台->平台: 仲裁结果,更新状态
|
||||
|
||||
平台 -> seller: 根据平台仲裁结果进行处理
|
||||
平台 -> user: 根据平台仲裁结果进行处理
|
||||
deactivate 平台
|
||||
|
||||
@enduml
|
||||
@@ -51,7 +51,6 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
@@ -434,8 +433,41 @@
|
||||
<artifactId>minio</artifactId>
|
||||
<version>${minio.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>com.huaweicloud</groupId>
|
||||
<artifactId>esdk-obs-java</artifactId>
|
||||
<version>${huaweicloud-obs.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.qcloud</groupId>
|
||||
<artifactId>cos_api</artifactId>
|
||||
<version>${cos.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.tencentcloudapi</groupId>
|
||||
<artifactId>tencentcloud-sdk-java</artifactId>
|
||||
<version>${tencentcloud.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.kuaidi100-api</groupId>
|
||||
<artifactId>sdk</artifactId>
|
||||
<version>${kuaidi100-api.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.qiyuesuo.sdk</groupId>
|
||||
<artifactId>SDK</artifactId>
|
||||
<version>2.1.7</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/src/main/resources/maven-repository/SF-CSIM-EXPRESS-SDK-V2.1.7.jar</systemPath>
|
||||
</dependency>
|
||||
<!-- netty-resolver-dns-native-macos -->
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-resolver-dns-native-macos</artifactId>
|
||||
<version>4.1.90.Final</version>
|
||||
<scope>runtime</scope>
|
||||
<classifier>osx-aarch_64</classifier>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
|
||||
@@ -208,6 +208,10 @@ public enum CachePrefix {
|
||||
* 促销活动
|
||||
*/
|
||||
PROMOTION,
|
||||
/**
|
||||
* 当前优惠券活动
|
||||
*/
|
||||
CURRENT_COUPON_ACTIVITY,
|
||||
/**
|
||||
* 促销活动
|
||||
*/
|
||||
@@ -236,6 +240,10 @@ public enum CachePrefix {
|
||||
* 积分商品缓存key前缀
|
||||
*/
|
||||
STORE_ID_EXCHANGE,
|
||||
/**
|
||||
* 会员领取标记
|
||||
*/
|
||||
MEMBER_COUPON_SIGN,
|
||||
|
||||
|
||||
//================交易=================
|
||||
@@ -441,6 +449,10 @@ public enum CachePrefix {
|
||||
* 分销员
|
||||
*/
|
||||
DISTRIBUTION,
|
||||
/**
|
||||
* 邀请人
|
||||
*/
|
||||
INVITER,
|
||||
|
||||
/**
|
||||
* 找回手机
|
||||
@@ -503,12 +515,11 @@ public enum CachePrefix {
|
||||
|
||||
/**
|
||||
* 扫码登录
|
||||
*
|
||||
* @param str
|
||||
* @return
|
||||
*/
|
||||
QR_CODE_LOGIN_SESSION
|
||||
|
||||
;
|
||||
QR_CODE_LOGIN_SESSION;
|
||||
|
||||
|
||||
public static String removePrefix(String str) {
|
||||
@@ -544,4 +555,16 @@ public enum CachePrefix {
|
||||
public String getPrefix(UserEnums user) {
|
||||
return "{" + this.name() + "_" + user.name() + "}_";
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取缓存key值 + 用户端 +自定义前缀
|
||||
* 例如:三端都有用户体系,需要分别登录,如果用户名一致,则redis中的权限可能会冲突出错
|
||||
*
|
||||
* @param user 角色
|
||||
* @param customPrefix 自定义前缀
|
||||
* @return 缓存key值
|
||||
*/
|
||||
public String getPrefix(UserEnums user, String customPrefix) {
|
||||
return "{" + this.name() + "_" + user.name() + "}_" + customPrefix + "_";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@ public class RedisCache implements Cache {
|
||||
public Long counter(Object key) {
|
||||
HyperLogLogOperations<Object, Object> operations = redisTemplate.opsForHyperLogLog();
|
||||
|
||||
//add 方法对应 PFADD 命令
|
||||
//add 方法对应 PFCOUNT 命令
|
||||
return operations.size(key);
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ public class LimitInterceptor {
|
||||
assert count != null;
|
||||
log.info("限制请求{}, 当前请求{},缓存key{}", limitCount, count.intValue(), key);
|
||||
//如果缓存里没有值,或者他的值小于限制频率
|
||||
if (count.intValue() >= limitCount) {
|
||||
if (count.intValue() > limitCount) {
|
||||
throw new ServiceException(ResultCode.LIMIT_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,12 @@ public @interface PreventDuplicateSubmissions {
|
||||
|
||||
|
||||
/**
|
||||
* 过期时间
|
||||
* 过期时间 默认3秒,即3秒内无法重复点击。
|
||||
*/
|
||||
long expire() default 3;
|
||||
/**
|
||||
* 用户间隔离,默认false。
|
||||
* 如果为true则全局限制,为true需要用户登录状态,否则则是全局隔离
|
||||
*/
|
||||
boolean userIsolation() default false;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,19 @@
|
||||
package cn.lili.common.aop.interceptor;
|
||||
|
||||
/**
|
||||
* 防重复提交业务
|
||||
*
|
||||
* @author Chopper
|
||||
* @version v1.0
|
||||
* 2022-01-25 09:20
|
||||
*/
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import cn.lili.cache.Cache;
|
||||
import cn.lili.common.aop.annotation.PreventDuplicateSubmissions;
|
||||
import cn.lili.common.enums.ResultCode;
|
||||
import cn.lili.common.exception.ServiceException;
|
||||
import cn.lili.common.security.AuthUser;
|
||||
import cn.lili.common.security.context.UserContext;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.aspectj.lang.annotation.Aspect;
|
||||
@@ -15,13 +25,6 @@ import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* 防重复提交业务
|
||||
*
|
||||
* @author Chopper
|
||||
* @version v1.0
|
||||
* 2022-01-25 09:20
|
||||
*/
|
||||
@Aspect
|
||||
@Component
|
||||
@Slf4j
|
||||
@@ -35,9 +38,11 @@ public class PreventDuplicateSubmissionsInterceptor {
|
||||
public void interceptor(PreventDuplicateSubmissions preventDuplicateSubmissions) {
|
||||
|
||||
try {
|
||||
Long count = cache.incr(getParams(), preventDuplicateSubmissions.expire());
|
||||
//如果超过2或者设置的参数,则表示重复提交了
|
||||
if (count.intValue() >= 2) {
|
||||
String redisKey = getParams(preventDuplicateSubmissions.userIsolation());
|
||||
Long count = cache.incr(redisKey, preventDuplicateSubmissions.expire());
|
||||
log.debug("防重复提交:params-{},value-{}", redisKey, count);
|
||||
//如果超过0或者设置的参数,则表示重复提交了
|
||||
if (count.intValue() > 0) {
|
||||
throw new ServiceException(ResultCode.LIMIT_ERROR);
|
||||
}
|
||||
}
|
||||
@@ -55,12 +60,33 @@ public class PreventDuplicateSubmissionsInterceptor {
|
||||
/**
|
||||
* 获取表单参数
|
||||
*
|
||||
* @return
|
||||
* @param userIsolation 用户是否隔离
|
||||
* @return 计数器key
|
||||
*/
|
||||
private String getParams() {
|
||||
private String getParams(Boolean userIsolation) {
|
||||
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
//拼接请求地址
|
||||
stringBuilder.append(request.getRequestURI());
|
||||
|
||||
//参数不为空则拼接参数
|
||||
if (!request.getParameterMap().isEmpty()) {
|
||||
stringBuilder.append(JSONUtil.toJsonStr(request.getParameterMap()));
|
||||
}
|
||||
//用户隔离设置为开启,则选择当前用回顾
|
||||
if (userIsolation) {
|
||||
AuthUser authUser = UserContext.getCurrentUser();
|
||||
//用户为空则发出警告,但不拼接,否则拼接用户id
|
||||
if (authUser == null) {
|
||||
log.warn("user isolation settings are on,but current user is null");
|
||||
}
|
||||
// 不为空则拼接用户id
|
||||
else {
|
||||
stringBuilder.append(authUser.getId());
|
||||
}
|
||||
}
|
||||
//请求地址
|
||||
return request.getRequestURI() + UserContext.getCurrentUser().getId() + UserContext.getCurrentUser().getUsername();
|
||||
return stringBuilder.toString();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ public enum ClientTypeEnum {
|
||||
*/
|
||||
UNKNOWN("未知");
|
||||
|
||||
private final String clientName;
|
||||
private String clientName;
|
||||
|
||||
ClientTypeEnum(String des) {
|
||||
this.clientName = des;
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
package cn.lili.common.enums;
|
||||
|
||||
|
||||
import cn.lili.common.utils.StringUtils;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.EnumSet;
|
||||
|
||||
/**
|
||||
* 促销分类枚举
|
||||
*
|
||||
@@ -23,7 +28,12 @@ public enum PromotionTypeEnum {
|
||||
/**
|
||||
* 有促销库存的活动类型
|
||||
*/
|
||||
static final PromotionTypeEnum[] haveStockPromotion = new PromotionTypeEnum[]{PINTUAN, SECKILL, KANJIA, POINTS_GOODS};
|
||||
public static final PromotionTypeEnum[] haveStockPromotion = new PromotionTypeEnum[]{PINTUAN, SECKILL, KANJIA, POINTS_GOODS};
|
||||
|
||||
/**
|
||||
* 有独立促销库存的活动类型
|
||||
*/
|
||||
public static final PromotionTypeEnum[] haveIndependanceStockPromotion = new PromotionTypeEnum[]{SECKILL};
|
||||
|
||||
private final String description;
|
||||
|
||||
@@ -47,4 +57,28 @@ public enum PromotionTypeEnum {
|
||||
return description;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断促销类型是否有效
|
||||
* @param typeEnumValue
|
||||
* @return
|
||||
*/
|
||||
public static boolean isValid(String typeEnumValue) {
|
||||
if (StringUtils.isBlank(typeEnumValue)) {
|
||||
return false;
|
||||
}
|
||||
return Arrays.stream(PromotionTypeEnum.values()).anyMatch(c -> c.name().equals(typeEnumValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断订单类型是否可售后
|
||||
* POINTS\KANJIA 两种促销类型的订单不可进行售后
|
||||
* @return true 可售后 false 不可售后
|
||||
*/
|
||||
public static boolean isCanAfterSale(String promotionType) {
|
||||
if (!isValid(promotionType)) {
|
||||
return true;
|
||||
}
|
||||
EnumSet<PromotionTypeEnum> noAfterSale = EnumSet.of(PromotionTypeEnum.KANJIA, PromotionTypeEnum.POINTS_GOODS);
|
||||
return !noAfterSale.contains(PromotionTypeEnum.valueOf(promotionType));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,10 +37,12 @@ public enum ResultCode {
|
||||
LIMIT_ERROR(1003, "访问过于频繁,请稍后再试"),
|
||||
ILLEGAL_REQUEST_ERROR(1004, "非法请求,请重新刷新页面操作"),
|
||||
IMAGE_FILE_EXT_ERROR(1005, "不支持图片格式"),
|
||||
FILE_NOT_EXIST_ERROR(1011, "上传文件不能为空"),
|
||||
FILE_TYPE_NOT_SUPPORT(1010, "不支持上传的文件类型!"),
|
||||
PLATFORM_NOT_SUPPORTED_IM(1006, "平台未开启IM"),
|
||||
STORE_NOT_SUPPORTED_IM(1007, "店铺未开启IM"),
|
||||
UNINITIALIZED_PASSWORD(1008, "非初始化密码,无法进行初始化设置"),
|
||||
FILE_DIRECTORY_NOT_EMPTY(1012, "文件夹下有文件,请删除所有文件后删除文件夹!"),
|
||||
/**
|
||||
* 分类
|
||||
*/
|
||||
@@ -80,12 +82,15 @@ public enum ResultCode {
|
||||
|
||||
HAVE_INVALID_SALES_MODEL(11023, "批发规则存在小于等于0的无效数据!"),
|
||||
MUST_HAVE_GOODS_SKU_VALUE(11024, "规格值不能为空!"),
|
||||
DO_NOT_MATCH_WHOLESALE(11025, "批发商品购买数量不能低于起拍量!"),
|
||||
GOODS_NOT_ERROR(11026, "商品不存在"),
|
||||
|
||||
GOODS_PARAMS_ERROR(11013, "商品参数错误,刷新后重试"),
|
||||
PHYSICAL_GOODS_NEED_TEMP(11014, "实物商品需选择配送模板"),
|
||||
VIRTUAL_GOODS_NOT_NEED_TEMP(11015, "虚拟商品无需选择配送模板"),
|
||||
GOODS_NOT_EXIST_STORE(11017, "当前用户无权操作此商品"),
|
||||
GOODS_TYPE_ERROR(11016, "需选择商品类型"),
|
||||
GOODS_STOCK_IMPORT_ERROR(11018, "导入商品库存失败,请检查表格数据"),
|
||||
|
||||
/**
|
||||
* 参数
|
||||
@@ -146,6 +151,8 @@ public enum ResultCode {
|
||||
CLERK_ALREADY_EXIT_ERROR(20030, "店员已经存在"),
|
||||
CLERK_DISABLED_ERROR(20031, "店员已禁用"),
|
||||
CLERK_CURRENT_SUPPER(20032, "无法删除当前登录店员"),
|
||||
CANT_EDIT_CLERK_SHOPKEEPER(20033, "无法在店员管理编辑店员信息"),
|
||||
USER_MOBILE_REPEATABLE_ERROR(20034, "该手机号已存在"),
|
||||
/**
|
||||
* 权限
|
||||
*/
|
||||
@@ -169,6 +176,7 @@ public enum ResultCode {
|
||||
DISTRIBUTION_RETREAT_ERROR(22004, "分销员清退失败"),
|
||||
DISTRIBUTION_CASH_NOT_EXIST(22005, "分销员提现记录不存在"),
|
||||
DISTRIBUTION_GOODS_DOUBLE(22006, "不能重复添加分销商品"),
|
||||
DISTRIBUTION_EDIT_ERROR(22007, "修改分销员失败"),
|
||||
|
||||
/**
|
||||
* 购物车
|
||||
@@ -191,6 +199,7 @@ public enum ResultCode {
|
||||
ORDER_NOT_USER(31007, "非当前会员的订单"),
|
||||
ORDER_TAKE_ERROR(31008, "当前订单无法核销"),
|
||||
MEMBER_ADDRESS_NOT_EXIST(31009, "订单无收货地址,请先配置收货地址"),
|
||||
STORE_ADDRESS_NOT_EXIST(31009, "订单没有自提地址,请先选择自提地址"),
|
||||
ORDER_DELIVER_NUM_ERROR(31010, "没有待发货的订单"),
|
||||
ORDER_NOT_SUPPORT_DISTRIBUTION(31011, "购物车中包含不支持配送的商品,请重新选择收货地址,或者重新选择商品"),
|
||||
ORDER_NOT_EXIST_VALID(31041, "购物车中无有效商品,请检查购物车内商品,或者重新选择商品"),
|
||||
@@ -198,6 +207,9 @@ public enum ResultCode {
|
||||
ORDER_BATCH_DELIVER_ERROR(31013, "批量发货,文件读取失败"),
|
||||
ORDER_ITEM_NOT_EXIST(31014, "当前订单项不存在!"),
|
||||
POINT_NOT_ENOUGH(31015, "当前会员积分不足购买当前积分商品!"),
|
||||
ORDER_LABEL_ORDER_ERROR(31016, "订单不能打印电子面单"),
|
||||
ORDER_PRICE_ERROR(31017,"订单金额不能小于等于0"),
|
||||
ORDER_PACKAGE_NOT_EXIST(31017, "当前订单包裹不存在!"),
|
||||
|
||||
|
||||
/**
|
||||
@@ -216,7 +228,7 @@ public enum ResultCode {
|
||||
PAY_POINT_ENOUGH(32010, "积分不足,不能兑换"),
|
||||
PAY_NOT_EXIST_ORDER(32011, "支付订单不存在"),
|
||||
CAN_NOT_RECHARGE_WALLET(32012, "不能使用余额进行充值"),
|
||||
|
||||
RECHARGE_PRICE_ERROR(32013, "充值金额错误"),
|
||||
|
||||
/**
|
||||
* 售后
|
||||
@@ -252,9 +264,10 @@ public enum ResultCode {
|
||||
WALLET_WITHDRAWAL_FROZEN_AMOUNT_INSUFFICIENT(34006, "冻结金额不足,无法处理提现申请请求!"),
|
||||
WALLET_ERROR_INSUFFICIENT(34003, "零钱提现失败!"),
|
||||
WALLET_REMARK_ERROR(34004, "请填写审核备注!"),
|
||||
WALLET_EXIT_ERROR(34000, "钱包已存在,无法重复创建"),
|
||||
WALLET_APPLY_ERROR(34005, "提现申请异常!"),
|
||||
|
||||
WALLET_EXIT_ERROR(34005, "钱包已存在,无法重复创建"),
|
||||
WALLET_APPLY_ERROR(34006, "提现申请异常!"),
|
||||
WALLET_APPLY_MIN_PRICE_ERROR(34007, "提现最低提现金额错误!"),
|
||||
WALLET_WITHDRAWAL_AMOUNT_ERROR(34008, "申请提现金额异常!"),
|
||||
/**
|
||||
* 评价
|
||||
*/
|
||||
@@ -278,6 +291,7 @@ public enum ResultCode {
|
||||
PROMOTION_ACTIVITY_GOODS_ERROR(40009, "当前活动已经开始无法添加商品"),
|
||||
PROMOTION_ACTIVITY_ERROR(400010, "当前促销活动不存在"),
|
||||
PROMOTION_LOG_EXIST(40011, "活动已参加,已发重复参加"),
|
||||
APPLY_END_TIME_ERROR(40012, "参与截至时间不能小于当前时间,不能大于活动开始时间"),
|
||||
|
||||
/**
|
||||
* 优惠券
|
||||
@@ -299,6 +313,7 @@ public enum ResultCode {
|
||||
COUPON_SCOPE_ERROR(41014, "指定商品范围关联id无效!"),
|
||||
COUPON_MEMBER_NOT_EXIST(41015, "没有当前会员优惠券"),
|
||||
COUPON_MEMBER_STATUS_ERROR(41016, "当前会员优惠券已过期/作废无法变更状态!"),
|
||||
COUPON_RANGE_ERROR(41017, "优惠券使用时间范围错误"),
|
||||
|
||||
SPECIAL_CANT_USE(41019, "特殊商品不能使用优惠券,不能使用"),
|
||||
|
||||
@@ -306,7 +321,7 @@ public enum ResultCode {
|
||||
COUPON_DELETE_ERROR(41021, "删除优惠券失败"),
|
||||
COUPON_ACTIVITY_NOT_EXIST(41022, "当前优惠券活动不存在"),
|
||||
COUPON_ACTIVITY_SAVE_ERROR(41023, "保存优惠券活动失败"),
|
||||
COUPON_ACTIVITY_MAX_NUM(41024, "优惠券活动赠券数量最多为3"),
|
||||
COUPON_ACTIVITY_MAX_NUM(41024, "优惠券活动赠券数量最多为5"),
|
||||
|
||||
COUPON_DO_NOT_RECEIVER(41030, "当前优惠券不允许主动领取"),
|
||||
|
||||
@@ -371,6 +386,7 @@ public enum ResultCode {
|
||||
COUPON_ACTIVITY_ITEM_ERROR(46003, "优惠券活动必须指定优惠券,不能为空"),
|
||||
COUPON_ACTIVITY_ITEM_MUST_NUM_ERROR(46004, "优惠券活动最多指定10个优惠券"),
|
||||
COUPON_ACTIVITY_ITEM_NUM_ERROR(46005, "赠券数量必须大于0"),
|
||||
COUPON_ACTIVITY_ITEM_NUM_MAX_VALUE_2(46006, "赠券数量最大为2"),
|
||||
|
||||
/**
|
||||
* 其他促销
|
||||
@@ -405,7 +421,10 @@ public enum ResultCode {
|
||||
STORE_NOT_OPEN(50004, "该会员未开通店铺"),
|
||||
STORE_NOT_LOGIN_ERROR(50005, "未登录店铺"),
|
||||
STORE_CLOSE_ERROR(50006, "店铺关闭,请联系管理员"),
|
||||
STORE_DELIVER_GOODS_ADDRESS(50007,"请填写商家发货地址"),
|
||||
FREIGHT_TEMPLATE_NOT_EXIST(50010, "当前模版不存在"),
|
||||
STORE_STATUS_ERROR(50011, "店铺在申请中或审核中,请勿重复操作"),
|
||||
STORE_DELIVER_ADDRESS_EXIST(50012,"请填写发货地址"),
|
||||
|
||||
/**
|
||||
* 结算单
|
||||
@@ -441,6 +460,7 @@ public enum ResultCode {
|
||||
ALIPAY_EXCEPTION(70003, "支付宝支付错误,请稍后重试"),
|
||||
ALIPAY_PARAMS_EXCEPTION(70004, "支付宝参数异常"),
|
||||
LOGISTICS_NOT_SETTING(70005, "您还未配置快递查询"),
|
||||
LOGISTICS_CHECK_SETTING(70005, "操作失败,请检查您的快递鸟配置"),
|
||||
ORDER_SETTING_ERROR(70006, "系统订单配置异常"),
|
||||
ALI_SMS_SETTING_ERROR(70007, "您还未配置阿里云短信"),
|
||||
SMS_SIGN_EXIST_ERROR(70008, "短信签名已存在"),
|
||||
@@ -480,6 +500,15 @@ public enum ResultCode {
|
||||
WECHAT_MP_MESSAGE_TMPL_ERROR(80306, "未能获取到微信模版消息id"),
|
||||
WECHAT_ERROR(80307, "微信接口异常"),
|
||||
APP_VERSION_EXIST(80307, "APP版本已存在"),
|
||||
APP_VERSION_PARAM_ERROR(80308, "添加APP版本参数异常"),
|
||||
// 未选择APP类型
|
||||
APP_VERSION_TYPE_ERROR(80308, "请选择有效的APP类型"),
|
||||
|
||||
/**
|
||||
* IM
|
||||
*/
|
||||
IM_MESSAGE_ADD_ERROR(80400,"IM消息发送错误"),
|
||||
IM_MESSAGE_EDIT_ERROR(80400,"IM消息更新错误"),
|
||||
|
||||
/**
|
||||
* 其他
|
||||
@@ -490,8 +519,10 @@ public enum ResultCode {
|
||||
CONNECT_NOT_EXIST(90000, "登录方式不存在!"),
|
||||
ELASTICSEARCH_INDEX_INIT_ERROR(90003, "索引初始化失败!"),
|
||||
PURCHASE_ORDER_DEADLINE_ERROR(90004, "供求单,已超过报名截止时间"),
|
||||
USER_ADD_ERROR(90005, "用户添加失败"),
|
||||
INDEX_BUILDING(90005, "索引正在生成");
|
||||
|
||||
|
||||
private final Integer code;
|
||||
private final String message;
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.ConstraintViolationException;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 异常处理
|
||||
@@ -59,6 +60,18 @@ public class GlobalControllerExceptionHandler {
|
||||
message += ":" + serviceException.getMsg();
|
||||
}
|
||||
|
||||
// 对一些特殊异常处理,不再打印error级别的日志
|
||||
assert serviceException.getResultCode() != null;
|
||||
if (serviceException.getResultCode().equals(ResultCode.DEMO_SITE_EXCEPTION)) {
|
||||
log.debug("[DEMO_SITE_EXCEPTION]:{}", serviceException.getResultCode().message(), e);
|
||||
return ResultUtil.error(code, message);
|
||||
}
|
||||
if (serviceException.getResultCode().equals(ResultCode.USER_AUTH_EXPIRED)) {
|
||||
log.debug("403 :{}", serviceException.getResultCode().message(), e);
|
||||
return ResultUtil.error(code, message);
|
||||
}
|
||||
|
||||
|
||||
log.error("全局异常[ServiceException]:{}-{}", serviceException.getResultCode().code(), serviceException.getResultCode().message(), e);
|
||||
return ResultUtil.error(code, message);
|
||||
|
||||
@@ -100,7 +113,8 @@ public class GlobalControllerExceptionHandler {
|
||||
// protected ResponseEntity<Object> handleExceptionInternal(Exception ex, Object body, HttpHeaders headers, HttpStatus status, WebRequest request) {
|
||||
// if (ex instanceof MethodArgumentNotValidException) {
|
||||
// MethodArgumentNotValidException exception = (MethodArgumentNotValidException) ex;
|
||||
// return new ResponseEntity<>(new ResultUtil<>().setErrorMsg(exception.getBindingResult().getAllErrors().get(0).getDefaultMessage()), status);
|
||||
// return new ResponseEntity<>(new ResultUtil<>().setErrorMsg(exception.getBindingResult().getAllErrors().get(0).getDefaultMessage()),
|
||||
// status);
|
||||
// }
|
||||
// if (ex instanceof MethodArgumentTypeMismatchException) {
|
||||
// MethodArgumentTypeMismatchException exception = (MethodArgumentTypeMismatchException) ex;
|
||||
@@ -126,10 +140,18 @@ public class GlobalControllerExceptionHandler {
|
||||
|
||||
BindException exception = (BindException) e;
|
||||
List<FieldError> fieldErrors = exception.getBindingResult().getFieldErrors();
|
||||
for (FieldError error : fieldErrors) {
|
||||
return ResultUtil.error(ResultCode.PARAMS_ERROR.code(), error.getDefaultMessage());
|
||||
// 错误消息处理
|
||||
try {
|
||||
if (!fieldErrors.isEmpty()) {
|
||||
return ResultUtil.error(ResultCode.PARAMS_ERROR.code(),
|
||||
fieldErrors.stream()
|
||||
.map(FieldError::getDefaultMessage) // 获取每个对象的名称字段
|
||||
.collect(Collectors.joining(", ")));
|
||||
}
|
||||
return ResultUtil.error(ResultCode.PARAMS_ERROR);
|
||||
} catch (Exception ex) {
|
||||
return ResultUtil.error(ResultCode.PARAMS_ERROR);
|
||||
}
|
||||
return ResultUtil.error(ResultCode.PARAMS_ERROR);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
package cn.lili.common.fulu.core;
|
||||
|
||||
/**
|
||||
* @Auther: chenYing
|
||||
* @Date: 2019/8/26 0026 15:08
|
||||
*/
|
||||
public interface MethodConst {
|
||||
//卡密下单接口method方法
|
||||
String OPEN_API_CARD_ORDER_ADD = "fulu.order.card.add";
|
||||
// 根据话费查询归属地和城市编码,面值,城市等信息
|
||||
String OPEN_API_CHECK_PHONE = "fulu.mobile.info.get";
|
||||
// 直充下单接口method方法
|
||||
String OPEN_API_DIRECT_ORDER_ADD = "fulu.order.direct.add";
|
||||
// 获取商品信息接口method方法
|
||||
String OPEN_API_GOODS_GET = "fulu.goods.info.get";
|
||||
// 获取商品模板信息接口method方法
|
||||
String OPEN_API_GOODS_TEMPLATE_GET = "fulu.goods.template.get";
|
||||
// 查单接口method方法
|
||||
String OPEN_API_ORDER_GET = "fulu.order.info.get";
|
||||
// 话费下单接口method方法
|
||||
String OPEN_API_PHONE_ORDER_ADD = "fulu.order.mobile.add";
|
||||
// 流量下单接口method方法
|
||||
String OPEN_API_TRAFFIC_ORDER_ADD = "fulu.order.data.add";
|
||||
// 获取用户信息接口method方法
|
||||
String OPEN_API_USER_INFO_GET = "fulu.user.info.get";
|
||||
//获取商品列表method方法
|
||||
String OPEN_API_GOODS_LIST = "fulu.goods.list.get";
|
||||
|
||||
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
package cn.lili.common.fulu.core.http;
|
||||
|
||||
|
||||
import cn.lili.common.fulu.core.utils.HttpUtil;
|
||||
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
/**
|
||||
* @Auther: chenYing
|
||||
* @Date: 2019/8/19 0019 16:16
|
||||
*/
|
||||
public class FuluClient implements IFuluClient {
|
||||
private static volatile ExecutorService executor;
|
||||
private String url;
|
||||
|
||||
public FuluClient() {
|
||||
this.url = "http://openapi.fulu.com/api/getway";
|
||||
}
|
||||
|
||||
public FuluClient(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建线程池
|
||||
*/
|
||||
private static void createThreadPool() {
|
||||
if (executor == null) {
|
||||
synchronized (FuluClient.class) {
|
||||
if (executor == null) {
|
||||
executor = Executors.newCachedThreadPool();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String send(final String postData) {
|
||||
String result = HttpUtil.sendPostJson(this.url, postData);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Future<String> sendAsync(final String postData) {
|
||||
createThreadPool();
|
||||
return executor.submit(new Callable<String>() {
|
||||
@Override
|
||||
public String call() throws Exception {
|
||||
String result = HttpUtil.sendPostJson(url, postData);
|
||||
return result;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
package cn.lili.common.fulu.core.http;
|
||||
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
/**
|
||||
* @Auther: chenYing
|
||||
* @Date: 2019/8/19 0019 16:15
|
||||
*/
|
||||
public interface IFuluClient {
|
||||
/**
|
||||
* 同步请求openapi2.0
|
||||
*
|
||||
* @param postData
|
||||
* @return String
|
||||
*/
|
||||
String send(final String postData);
|
||||
|
||||
|
||||
/**
|
||||
* 异步请求openapi2.0
|
||||
*
|
||||
* @param postData
|
||||
* @return Future<String>
|
||||
*/
|
||||
Future<String> sendAsync(final String postData);
|
||||
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package cn.lili.common.fulu.core.utils;
|
||||
|
||||
import javax.crypto.Cipher;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
import java.security.Security;
|
||||
|
||||
/**
|
||||
* @Auther: chenYing
|
||||
* @Date: 2019/8/27 0027 17:38
|
||||
*/
|
||||
public class CardUtil {
|
||||
private static final String ALGORITHM = "AES/ECB/PKCS7Padding";
|
||||
|
||||
|
||||
private CardUtil() {
|
||||
}
|
||||
|
||||
public static String cardDecode(String str, byte[] key) {
|
||||
byte[] bytes = org.apache.commons.codec.binary.Base64.decodeBase64(str);
|
||||
String result = null;
|
||||
try {
|
||||
Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());
|
||||
Cipher cipher = Cipher.getInstance(ALGORITHM, "BC");
|
||||
SecretKeySpec keySpec = new SecretKeySpec(key, "AES");
|
||||
cipher.init(Cipher.DECRYPT_MODE, keySpec);
|
||||
byte[] decoded = cipher.doFinal(bytes);
|
||||
result = new String(decoded, "UTF-8");
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e.getMessage(), e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static String cardEncode(String str, byte[] key) {
|
||||
byte[] result = null;
|
||||
try {
|
||||
Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());
|
||||
Cipher cipher = Cipher.getInstance(ALGORITHM, "BC");
|
||||
SecretKeySpec keySpec = new SecretKeySpec(key, "AES");
|
||||
cipher.init(Cipher.ENCRYPT_MODE, keySpec);
|
||||
result = cipher.doFinal(str.getBytes("UTF-8"));
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e.getMessage(), e);
|
||||
}
|
||||
return new String(org.apache.commons.codec.binary.Base64.encodeBase64(result));
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package cn.lili.common.fulu.core.utils;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Auther: chenYing
|
||||
* @Date: 2019/8/19 0019 15:17
|
||||
*/
|
||||
public class DateFormatUtil {
|
||||
private static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";
|
||||
|
||||
private DateFormatUtil() {
|
||||
}
|
||||
|
||||
public static String currentDateTime() {
|
||||
return new SimpleDateFormat(DATE_FORMAT).format(new Date());
|
||||
}
|
||||
}
|
||||
@@ -1,206 +0,0 @@
|
||||
package cn.lili.common.fulu.core.utils;
|
||||
|
||||
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.apache.http.NameValuePair;
|
||||
import org.apache.http.client.HttpClient;
|
||||
import org.apache.http.client.entity.UrlEncodedFormEntity;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.impl.client.DefaultHttpClient;
|
||||
import org.apache.http.message.BasicNameValuePair;
|
||||
import org.apache.http.protocol.HTTP;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.PrintWriter;
|
||||
import java.net.*;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author cheny
|
||||
*/
|
||||
public class HttpUtil {
|
||||
private static Logger log = LoggerFactory.getLogger(HttpUtil.class);
|
||||
|
||||
public final static int CONNECT_TIMEOUT = 10000;
|
||||
public final static int READ_TIMEOUT = 10000;
|
||||
|
||||
private static final String ENCODING_GBK = "GBK";
|
||||
|
||||
/**
|
||||
* POST请求,json字符串形式数据
|
||||
*
|
||||
* @param url 请求地址
|
||||
* @param param 请求的json数据
|
||||
* @return response body
|
||||
* @throws Exception
|
||||
*/
|
||||
public static String sendPostJson(String url, String param) {
|
||||
return sendPostWithHeads(url, param, "application/json", null);
|
||||
}
|
||||
|
||||
private static String sendPostWithHeads(String url, String param, String contentType, Map<String, String> heads) {
|
||||
PrintWriter out = null;
|
||||
BufferedReader in = null;
|
||||
StringBuilder result = new StringBuilder();
|
||||
HttpURLConnection conn = null;
|
||||
|
||||
try {
|
||||
URL realUrl = new URL(url);
|
||||
// 打开和URL之间的连接
|
||||
conn = (HttpURLConnection) realUrl.openConnection();
|
||||
// 设置通用的请求属性
|
||||
conn.setRequestMethod("POST");// 提交模式
|
||||
conn.setConnectTimeout(CONNECT_TIMEOUT);// 连接超时 单位毫秒
|
||||
conn.setReadTimeout(READ_TIMEOUT);// 读取超时 单位毫秒
|
||||
if (contentType != null && !contentType.isEmpty()) {
|
||||
conn.setRequestProperty("Content-Type", contentType);
|
||||
}
|
||||
conn.setRequestProperty("accept", "*/*");
|
||||
conn.setRequestProperty("connection", "Keep-Alive");
|
||||
conn.setRequestProperty("user-agent",
|
||||
"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36");
|
||||
|
||||
// 添加头信息
|
||||
if (heads != null && !heads.isEmpty()) {
|
||||
for (String key : heads.keySet()) {
|
||||
conn.setRequestProperty(key, heads.get(key));
|
||||
}
|
||||
}
|
||||
|
||||
// 发送POST请求必须设置如下两行
|
||||
conn.setDoOutput(true);
|
||||
conn.setDoInput(true);
|
||||
// 获取URLConnection对象对应的输出流
|
||||
out = new PrintWriter(conn.getOutputStream());
|
||||
// 发送请求参数
|
||||
out.print(param);
|
||||
// flush输出流的缓冲
|
||||
out.flush();
|
||||
// 定义BufferedReader输入流来读取URL的响应
|
||||
in = new BufferedReader(new InputStreamReader(conn.getInputStream(), "UTF-8"));
|
||||
String line;
|
||||
while ((line = in.readLine()) != null) {
|
||||
result.append(line);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new RuntimeException("send POST request exception :" + e.getMessage(), e);
|
||||
} finally {
|
||||
try {
|
||||
if (out != null) {
|
||||
out.close();
|
||||
}
|
||||
if (in != null) {
|
||||
in.close();
|
||||
}
|
||||
if (conn != null) {
|
||||
conn.disconnect();
|
||||
}
|
||||
} catch (Exception e2) {
|
||||
throw new RuntimeException("close Connection exception :" + e2.getMessage(), e2);
|
||||
}
|
||||
}
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* POST请求,String字符串形式数据
|
||||
*
|
||||
* @param url
|
||||
* @param paramXmlStr
|
||||
* @return
|
||||
*/
|
||||
public static String sendPostXmlStr(String url, String paramXmlStr) {
|
||||
String tmpparamXmlStr = "";
|
||||
try {
|
||||
tmpparamXmlStr = URLEncoder.encode(paramXmlStr, ENCODING_GBK);
|
||||
tmpparamXmlStr = sendPostWithHeads(url, tmpparamXmlStr, "application/xml", null);
|
||||
tmpparamXmlStr = URLDecoder.decode(tmpparamXmlStr,ENCODING_GBK);
|
||||
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
log.error("post请求URL数据转码报错,{}", e.getMessage());
|
||||
}
|
||||
return tmpparamXmlStr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* POST请求,String字符串形式数据
|
||||
*
|
||||
* @param url
|
||||
* @param paramXmlStr
|
||||
* @return
|
||||
*/
|
||||
public static String sendPostXmlUrlencode(String url, String paramXmlStr) {
|
||||
String tmpparamXmlStr = "";
|
||||
Map<String, String> rspMap = new LinkedHashMap<>();
|
||||
rspMap.put("req", paramXmlStr);
|
||||
|
||||
try {
|
||||
tmpparamXmlStr = URLEncoder.encode(paramXmlStr, ENCODING_GBK);
|
||||
tmpparamXmlStr = doPostMapParams(url, rspMap);
|
||||
tmpparamXmlStr = URLDecoder.decode(tmpparamXmlStr,ENCODING_GBK);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
log.error("post请求URL数据转码报错,{}", e.getMessage());
|
||||
}
|
||||
return tmpparamXmlStr;
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送POST请求
|
||||
* @param url String对象为 目的地址
|
||||
* @param parameters 请求参数,Map类型。
|
||||
* @return 远程响应结果
|
||||
*/
|
||||
public static String doPostMapParams(String url, Map<String, String> parameters) {
|
||||
|
||||
BufferedReader in = null;
|
||||
try {
|
||||
// 定义HttpClient
|
||||
HttpClient client = new DefaultHttpClient();
|
||||
// 实例化HTTP方法
|
||||
HttpPost request = new HttpPost();
|
||||
request.setURI(new URI(url));
|
||||
|
||||
//设置参数
|
||||
List<NameValuePair> nvps = new ArrayList<NameValuePair>();
|
||||
for (Iterator iter = parameters.keySet().iterator(); iter.hasNext();) {
|
||||
String name = (String) iter.next();
|
||||
String value = String.valueOf(parameters.get(name));
|
||||
nvps.add(new BasicNameValuePair(name, value));
|
||||
}
|
||||
request.setEntity(new UrlEncodedFormEntity(nvps, HTTP.UTF_8));
|
||||
|
||||
HttpResponse response = client.execute(request);
|
||||
int code = response.getStatusLine().getStatusCode();
|
||||
if(code == 200){ //请求成功
|
||||
in = new BufferedReader(new InputStreamReader(response.getEntity()
|
||||
.getContent(),"UTF-8"));
|
||||
StringBuffer sb = new StringBuffer("");
|
||||
String line = "";
|
||||
String NL = System.getProperty("line.separator");
|
||||
while ((line = in.readLine()) != null) {
|
||||
sb.append(line + NL);
|
||||
}
|
||||
|
||||
in.close();
|
||||
return sb.toString();
|
||||
}else{
|
||||
System.out.println("状态码:" + code);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
package cn.lili.common.fulu.core.utils;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
|
||||
public class JSONUtil {
|
||||
private static Gson gson = new Gson();
|
||||
|
||||
/**
|
||||
* 将 JSON 字符串转为 Java 对象
|
||||
*/
|
||||
public static <T> T fromJSON(String json, Class<T> type) {
|
||||
T obj;
|
||||
try {
|
||||
obj = gson.fromJson(json, type);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* json字符串转list或者map
|
||||
*/
|
||||
public static <T> T fromJSON(String json, TypeToken<T> typeToken) {
|
||||
return gson.fromJson(json, typeToken.getType());
|
||||
}
|
||||
|
||||
/**
|
||||
* 将 Java 对象转为 JSON 字符串
|
||||
*/
|
||||
public static <T> String toJSON(T obj) {
|
||||
String jsonStr;
|
||||
try {
|
||||
jsonStr = gson.toJson(obj);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return jsonStr;
|
||||
}
|
||||
}
|
||||
@@ -1,342 +0,0 @@
|
||||
package cn.lili.common.fulu.core.utils;
|
||||
|
||||
import cn.lili.common.fulu.core.MethodConst;
|
||||
import cn.lili.common.fulu.model.*;
|
||||
import cn.lili.common.fulu.sdk.DefaultOpenApiClient;
|
||||
import cn.lili.modules.store.entity.dto.FuLuConfigureDTO;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.concurrent.*;
|
||||
|
||||
public class Test {
|
||||
private final static String APP_KEY = "lzHi7ewuTkplx2ePX0eQzN65TIFRk1zFClcoj1Jim/MHmu0X7ZqxMtSLENhvr1xD";
|
||||
private final static Logger LOGGER = LoggerFactory.getLogger(Test.class);
|
||||
private final static String SYS_SECRET = "9da68b0f8bcb470e84c3d30e343727e2";
|
||||
private final static String URL = "http://openapi.fulu.com/api/getway";
|
||||
|
||||
// private final static String APP_KEY = "i4esv1l+76l/7NQCL3QudG90Fq+YgVfFGJAWgT+7qO1Bm9o/adG/1iwO2qXsAXNB";
|
||||
// private final static Logger LOGGER = LoggerFactory.getLogger(Test.class);
|
||||
// private final static String SYS_SECRET = "0a091b3aa4324435aab703142518a8f7";
|
||||
// private final static String URL = "http://pre.openapi.fulu.com/api/getway";
|
||||
|
||||
private static String repeat(String ch, int num) {
|
||||
StringBuilder str = new StringBuilder();
|
||||
for (int i = 0; i < num; i++) {
|
||||
str.append(ch);
|
||||
}
|
||||
return str.toString();
|
||||
}
|
||||
|
||||
private static void waitFor(Future<String> future) throws Exception {
|
||||
while (!future.isDone()) {
|
||||
TimeUnit.MILLISECONDS.sleep(500);
|
||||
}
|
||||
LOGGER.info("excuteAsync:\n{}", future.get());
|
||||
}
|
||||
|
||||
/**
|
||||
* 卡密下单
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public static void cardOrderAddTest(FuLuConfigureDTO fuLuConfigureDTO, Integer productId, Integer buyNum,String orderSn) throws Exception {
|
||||
LOGGER.info("\n卡密下单{}", repeat("=", 100));
|
||||
DefaultOpenApiClient client =
|
||||
new DefaultOpenApiClient(URL, fuLuConfigureDTO.getAppMerchantKey(), fuLuConfigureDTO.getAppSecretKey(), MethodConst.OPEN_API_CARD_ORDER_ADD);
|
||||
InputCardOrderDto dto = new InputCardOrderDto();
|
||||
dto.setProductId(productId);
|
||||
dto.setCustomerOrderNo(orderSn);
|
||||
dto.setBuyNum(buyNum);
|
||||
|
||||
client.setBizObject(dto);
|
||||
LOGGER.info("excute:\n{}\n{}", client.excute(), repeat("-", 100));
|
||||
dto.setCustomerOrderNo(UUID.randomUUID().toString());
|
||||
waitFor(client.excuteAsync());
|
||||
}
|
||||
|
||||
/**
|
||||
* 直充下单
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public static void directOrderAddTest(FuLuConfigureDTO fuLuConfigureDTO, Integer productId, Integer buyNum,String qrCode,String orderSn) throws Exception {
|
||||
LOGGER.info("\n直充下单{}", repeat("=", 100));
|
||||
DefaultOpenApiClient client =
|
||||
new DefaultOpenApiClient(URL, fuLuConfigureDTO.getAppMerchantKey(), fuLuConfigureDTO.getAppSecretKey(), MethodConst.OPEN_API_DIRECT_ORDER_ADD);
|
||||
InputDirectOrderDto dto = new InputDirectOrderDto();
|
||||
dto.setProductId(productId);
|
||||
dto.setBuyNum(buyNum);
|
||||
client.setBizObject(dto);
|
||||
int count = 1;
|
||||
|
||||
for (String chargeAccount : Arrays.asList(qrCode)) {
|
||||
dto.setChargeAccount(chargeAccount);
|
||||
dto.setCustomerOrderNo(orderSn);
|
||||
|
||||
LOGGER.info("excute:\n{}\n{}", client.excute(), repeat("-", 100));
|
||||
if (count++ >= 3) {
|
||||
waitFor(client.excuteAsync());
|
||||
} else {
|
||||
LOGGER.info("excuteAsync:\n{}\n{}", client.excuteAsync().get(), repeat("-", 100));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 手机号归属地
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public void matchPhoneProducGetTest(FuLuConfigureDTO fuLuConfigureDTO) throws Exception {
|
||||
LOGGER.info("\n手机号归属地{}", repeat("=", 100));
|
||||
DefaultOpenApiClient client = new DefaultOpenApiClient(URL, fuLuConfigureDTO.getAppMerchantKey(), fuLuConfigureDTO.getAppSecretKey(), MethodConst.OPEN_API_CHECK_PHONE);
|
||||
InputMatchPhoneProductListDto dto = new InputMatchPhoneProductListDto();
|
||||
dto.setFaceValue(50D);
|
||||
|
||||
int count = 1;
|
||||
for (String phone : Arrays.asList("15972368779", "13971553804")) {
|
||||
dto.setPhone(phone);
|
||||
|
||||
client.setBizObject(dto);
|
||||
|
||||
LOGGER.info("excute:\n{}\n{}", client.excute(), repeat("-", 100));
|
||||
if (count++ >= 2) {
|
||||
waitFor(client.excuteAsync());
|
||||
} else {
|
||||
LOGGER.info("excuteAsync:\n{}\n{}", client.excuteAsync().get(), repeat("-", 100));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单查单
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public void orderInfoGetTest(FuLuConfigureDTO fuLuConfigureDTO) throws Exception {
|
||||
LOGGER.info("\n订单查单{}", repeat("=", 100));
|
||||
DefaultOpenApiClient client = new DefaultOpenApiClient(URL, fuLuConfigureDTO.getAppMerchantKey(), fuLuConfigureDTO.getAppSecretKey(), MethodConst.OPEN_API_ORDER_GET);
|
||||
InputOrderGetDto dto = new InputOrderGetDto();
|
||||
client.setBizObject(dto);
|
||||
int count = 1;
|
||||
|
||||
for (String customerOrderNo : Arrays
|
||||
.asList("0d19f8e4-5af3-490d-a8d8-47fd457da7de", "31b6b96b-a21e-4bc4-bc0c-6e77a2ffb698")) {
|
||||
dto.setCustomerOrderNo(customerOrderNo);
|
||||
|
||||
LOGGER.info("excute:\n{}\n{}", client.excute(), repeat("-", 100));
|
||||
if (count++ >= 2) {
|
||||
Future<String> future = client.excuteAsync();
|
||||
waitFor(future);
|
||||
Map<String, String> result = JSONUtil.fromJSON(future.get(), new TypeToken<Map>() {
|
||||
});
|
||||
Map<String, Object> resultMap = JSONUtil.fromJSON(result.get("result"), new TypeToken<Map<String, Object>>() {
|
||||
});
|
||||
|
||||
List<Map<String, String>> cardList = (List<Map<String, String>>) resultMap.get("cards");
|
||||
StringBuilder decodeStr = new StringBuilder();
|
||||
for (Map<String, String> map : cardList) {
|
||||
decodeStr.append("card_number:").append(map.get("card_number")).append(";desc_card_number:")
|
||||
.append(CardUtil.cardDecode(map.get("card_number"), SYS_SECRET.getBytes("UTF-8")));
|
||||
decodeStr.append(" card_pwd:").append(map.get("card_pwd")).append(";card_pwd:")
|
||||
.append(CardUtil.cardDecode(map.get("card_pwd"), SYS_SECRET.getBytes("UTF-8")));
|
||||
decodeStr.append("\n");
|
||||
}
|
||||
|
||||
System.out.println(decodeStr.toString());
|
||||
System.out.println(CardUtil.cardEncode("CD10002502019061217430016421", SYS_SECRET.getBytes("UTF-8")));
|
||||
} else {
|
||||
LOGGER.info("excuteAsync:\n{}\n{}", client.excuteAsync().get(), repeat("-", 100));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 话费下单
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public void phoneOrderAddTest(FuLuConfigureDTO fuLuConfigureDTO) throws Exception {
|
||||
LOGGER.info("\n话费下单{}", repeat("=", 100));
|
||||
DefaultOpenApiClient client =
|
||||
new DefaultOpenApiClient(URL, fuLuConfigureDTO.getAppMerchantKey(), fuLuConfigureDTO.getAppSecretKey(), MethodConst.OPEN_API_PHONE_ORDER_ADD);
|
||||
InputPhoneOrderDto dto = new InputPhoneOrderDto();
|
||||
dto.setChargeValue(Double.valueOf(50));
|
||||
int count = 1;
|
||||
|
||||
for (String chargePhone : Arrays.asList("15972368779", "13971553804")) {
|
||||
dto.setCustomerOrderNo(UUID.randomUUID().toString());
|
||||
dto.setChargePhone(chargePhone);
|
||||
client.setBizObject(dto);
|
||||
|
||||
LOGGER.info("excute:\n{}\n{}", client.excute(), repeat("-", 100));
|
||||
dto.setCustomerOrderNo(UUID.randomUUID().toString());
|
||||
if (count++ >= 2) {
|
||||
waitFor(client.excuteAsync());
|
||||
} else {
|
||||
LOGGER.info("excuteAsync:\n{}\n{}", client.excuteAsync().get(), repeat("-", 100));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获得商品信息
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public static Map<String, Object> productInfoGetTest(FuLuConfigureDTO fuLuConfigureDTO,String productIdS) throws Exception {
|
||||
LOGGER.info("\n获得商品信息{}", repeat("=", 100));
|
||||
DefaultOpenApiClient client = new DefaultOpenApiClient(URL, fuLuConfigureDTO.getAppMerchantKey(), fuLuConfigureDTO.getAppSecretKey(), MethodConst.OPEN_API_GOODS_GET);
|
||||
InputProductDto dto = new InputProductDto();
|
||||
int count = 1;
|
||||
Map<String, Object> maps = new HashMap();
|
||||
for (String productId : Arrays.asList(productIdS)) {
|
||||
dto.setProductId(productId);
|
||||
client.setBizObject(dto);
|
||||
maps = (Map) JSON.parse(client.excute());
|
||||
LOGGER.info("excute:\n{}\n{}", client.excute(), repeat("-", 100));
|
||||
if (count++ >= 10) {
|
||||
waitFor(client.excuteAsync());
|
||||
} else {
|
||||
LOGGER.info("excuteAsync:\n{}\n{}", client.excuteAsync().get(), repeat("-", 100));
|
||||
}
|
||||
}
|
||||
return maps;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得商品模板信息
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public void productTemplateGetTest(FuLuConfigureDTO fuLuConfigureDTO) throws Exception {
|
||||
LOGGER.info("\n获得商品模板信息{}", repeat("=", 100));
|
||||
DefaultOpenApiClient client =
|
||||
new DefaultOpenApiClient(URL, fuLuConfigureDTO.getAppMerchantKey(), fuLuConfigureDTO.getAppSecretKey(), MethodConst.OPEN_API_GOODS_TEMPLATE_GET);
|
||||
InputProductTemplateDto dto = new InputProductTemplateDto();
|
||||
dto.setTemplateId("e1dac0ea-dc86-4c9d-a778-c9e19203ecb8");
|
||||
client.setBizObject(dto);
|
||||
LOGGER.info("excute:\n{}\n{}", client.excute(), repeat("-", 100));
|
||||
waitFor(client.excuteAsync());
|
||||
}
|
||||
|
||||
/**
|
||||
* 流量下单
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public void trafficOrderAddTest(FuLuConfigureDTO fuLuConfigureDTO) throws Exception {
|
||||
LOGGER.info("\n流量下单{}", repeat("=", 100));
|
||||
DefaultOpenApiClient client =
|
||||
new DefaultOpenApiClient(URL, fuLuConfigureDTO.getAppMerchantKey(), fuLuConfigureDTO.getAppSecretKey(), MethodConst.OPEN_API_TRAFFIC_ORDER_ADD);
|
||||
InputTrafficOrderDto dto = new InputTrafficOrderDto();
|
||||
dto.setChargeValue(Double.valueOf(1024));
|
||||
dto.setPacketKind(4);
|
||||
|
||||
int count = 1;
|
||||
for (String chargePhone : Arrays.asList("15972368779", "13971553804")) {
|
||||
client.setBizObject(dto);
|
||||
dto.setChargePhone(chargePhone);
|
||||
dto.setCustomerOrderNo(UUID.randomUUID().toString());
|
||||
|
||||
LOGGER.info("excute:\n{}\n{}", client.excute(), repeat("-", 100));
|
||||
dto.setCustomerOrderNo(UUID.randomUUID().toString());
|
||||
if (count++ >= 2) {
|
||||
waitFor(client.excuteAsync());
|
||||
} else {
|
||||
LOGGER.info("excuteAsync:\n{}\n{}", client.excuteAsync().get(), repeat("-", 100));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户信息
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public static void userInfoGetTest(FuLuConfigureDTO fuLuConfigureDTO) throws Exception {
|
||||
LOGGER.info("\n用户信息{}", repeat("=", 100));
|
||||
DefaultOpenApiClient client =
|
||||
new DefaultOpenApiClient(URL, fuLuConfigureDTO.getAppMerchantKey(), fuLuConfigureDTO.getAppSecretKey(), MethodConst.OPEN_API_USER_INFO_GET);
|
||||
InputUserDto dto = new InputUserDto();
|
||||
client.setBizObject(dto);
|
||||
|
||||
LOGGER.info("excute:\n{}\n{}", client.excute(), repeat("-", 100));
|
||||
waitFor(client.excuteAsync());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 用户信息:高并发场景
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public static void userInfoGetTest2(FuLuConfigureDTO fuLuConfigureDTO) throws Exception {
|
||||
LOGGER.info("\n用户信息:高并发场景{}", repeat("=", 100));
|
||||
Executor executor = Executors.newCachedThreadPool();
|
||||
|
||||
final int count = 10;
|
||||
final CountDownLatch downLatch = new CountDownLatch(count);
|
||||
|
||||
for (int i = 0; i < count; ++i) {
|
||||
executor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
String name = Thread.currentThread().getName();
|
||||
LOGGER.info("\n线程名:{}{}", name, repeat("+", 100));
|
||||
|
||||
DefaultOpenApiClient client =
|
||||
new DefaultOpenApiClient(URL, fuLuConfigureDTO.getAppMerchantKey(), fuLuConfigureDTO.getAppSecretKey(), MethodConst.OPEN_API_USER_INFO_GET);
|
||||
InputUserDto dto = new InputUserDto();
|
||||
client.setBizObject(dto);
|
||||
|
||||
LOGGER.info("\n线程名:{}\n{}\n{}", name, client.excute(), repeat("+", 100));
|
||||
waitFor(client.excuteAsync());
|
||||
} catch (Exception ex) {
|
||||
LOGGER.error(ex.getMessage(), ex);
|
||||
} finally {
|
||||
downLatch.countDown();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
downLatch.await();
|
||||
}
|
||||
|
||||
|
||||
/* 获得商品信息列表
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public static String getGoodsInfoList(FuLuConfigureDTO fuLuConfigureDTO) throws Exception {
|
||||
LOGGER.info("\n获得商品信息{}", repeat("=", 100));
|
||||
DefaultOpenApiClient client = new DefaultOpenApiClient(URL, fuLuConfigureDTO.getAppMerchantKey(), fuLuConfigureDTO.getAppSecretKey(), MethodConst.OPEN_API_GOODS_LIST);
|
||||
InputProductDto dto = new InputProductDto();
|
||||
client.setBizObject(dto);
|
||||
return client.excute().toString();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
// productInfoGetTest();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,159 +0,0 @@
|
||||
package cn.lili.common.fulu.model;
|
||||
|
||||
import cn.lili.common.fulu.core.utils.DateFormatUtil;
|
||||
import cn.lili.common.fulu.core.utils.JSONUtil;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Auther: chenYing
|
||||
* @Date: 2019/8/19 0019 10:49
|
||||
*/
|
||||
public class CommonRequest implements Serializable {
|
||||
private static final long serialVersionUID = 2L;
|
||||
|
||||
@SerializedName(value = "app_auth_token")
|
||||
private String appAuthToken = "";
|
||||
@SerializedName(value = "app_key")
|
||||
private String appKey;
|
||||
@SerializedName(value = "biz_content")
|
||||
private String bizContent = "{}";
|
||||
private transient Map<String, Object> bizContentMap = Collections.emptyMap();
|
||||
private String charset;
|
||||
private String format;
|
||||
private String method;
|
||||
private String sign;
|
||||
@SerializedName(value = "sign_type")
|
||||
private String signType;
|
||||
private String timestamp;
|
||||
private String version;
|
||||
|
||||
public CommonRequest() {
|
||||
format = "json";
|
||||
version = "2.0";
|
||||
charset = "utf-8";
|
||||
signType = "md5";
|
||||
// timestamp = "2019-08-20 13:59:38";
|
||||
timestamp = DateFormatUtil.currentDateTime();
|
||||
}
|
||||
|
||||
|
||||
public String getAppAuthToken() {
|
||||
return appAuthToken;
|
||||
}
|
||||
|
||||
public void setAppAuthToken(String appAuthToken) {
|
||||
this.appAuthToken = appAuthToken;
|
||||
}
|
||||
|
||||
public String getAppKey() {
|
||||
return appKey;
|
||||
}
|
||||
|
||||
public void setAppKey(String appKey) {
|
||||
this.appKey = appKey;
|
||||
}
|
||||
|
||||
public String getBizContent() {
|
||||
if (!bizContentMap.isEmpty()) {
|
||||
bizContent = JSONUtil.toJSON(bizContentMap);
|
||||
}
|
||||
return bizContent;
|
||||
}
|
||||
|
||||
/**
|
||||
* 直接将变量以json格式保存
|
||||
*
|
||||
* @param bizContent bizContent
|
||||
*/
|
||||
public void setBizContent(String bizContent) {
|
||||
if (bizContent != null && !"".equals(bizContent.trim())) {
|
||||
Map<String, Object> dataMap = JSONUtil.fromJSON(bizContent, new TypeToken<Map<String, Object>>() {
|
||||
});
|
||||
|
||||
if (bizContentMap.isEmpty()) {
|
||||
bizContentMap = new HashMap<String, Object>();
|
||||
}
|
||||
bizContentMap.putAll(dataMap);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public String getCharset() {
|
||||
return charset;
|
||||
}
|
||||
|
||||
public void setCharset(String charset) {
|
||||
this.charset = charset;
|
||||
}
|
||||
|
||||
public String getFormat() {
|
||||
return format;
|
||||
}
|
||||
|
||||
public void setFormat(String format) {
|
||||
this.format = format;
|
||||
}
|
||||
|
||||
public String getMethod() {
|
||||
return method;
|
||||
}
|
||||
|
||||
public void setMethod(String method) {
|
||||
this.method = method;
|
||||
}
|
||||
|
||||
public String getSign() {
|
||||
return sign;
|
||||
}
|
||||
|
||||
public void setSign(String sign) {
|
||||
this.sign = sign;
|
||||
}
|
||||
|
||||
public String getSignType() {
|
||||
return signType;
|
||||
}
|
||||
|
||||
public void setSignType(String signType) {
|
||||
this.signType = signType;
|
||||
}
|
||||
|
||||
public String getTimestamp() {
|
||||
return timestamp;
|
||||
}
|
||||
|
||||
public void setTimestamp(String timestamp) {
|
||||
this.timestamp = timestamp;
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(String version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
/**
|
||||
* 以key:value形式保存,程序会转换为json格式
|
||||
*
|
||||
* @param key key
|
||||
* @param value value
|
||||
*/
|
||||
public void setBizContent(String key, Object value) {
|
||||
if (bizContentMap.isEmpty()) {
|
||||
bizContentMap = new HashMap<String, Object>();
|
||||
}
|
||||
bizContentMap.put(key, value);
|
||||
}
|
||||
|
||||
protected Object getBizContentValue(String key) {
|
||||
return bizContentMap.get(key);
|
||||
}
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
package cn.lili.common.fulu.model;
|
||||
|
||||
/**
|
||||
* 卡密订单input dto
|
||||
*
|
||||
* @Auther: chenYing
|
||||
* @Date: 2019/8/19 0019 15:35
|
||||
*/
|
||||
public class InputCardOrderDto extends CommonRequest {
|
||||
public InputCardOrderDto() {
|
||||
super();
|
||||
setMethod("fulu.order.card.add");
|
||||
}
|
||||
|
||||
/**
|
||||
* 购买数量
|
||||
*
|
||||
* @return Integer
|
||||
*/
|
||||
public Integer getBuyNum() {
|
||||
Object value = getBizContentValue("buy_num");
|
||||
return value != null ? Integer.valueOf(value.toString()) : null;
|
||||
}
|
||||
|
||||
public void setBuyNum(Integer buyNum) {
|
||||
setBizContent("buy_num", buyNum);
|
||||
}
|
||||
|
||||
/**
|
||||
* 外部订单号
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public String getCustomerOrderNo() {
|
||||
Object value = getBizContentValue("customer_order_no");
|
||||
return value != null ? String.valueOf(value) : null;
|
||||
}
|
||||
|
||||
public void setCustomerOrderNo(String customerOrderNo) {
|
||||
setBizContent("customer_order_no", customerOrderNo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品编号
|
||||
*
|
||||
* @return Integer
|
||||
*/
|
||||
public Integer getProductId() {
|
||||
Object value = getBizContentValue("product_id");
|
||||
return value != null ? Integer.valueOf(value.toString()) : null;
|
||||
}
|
||||
|
||||
public void setProductId(Integer productId) {
|
||||
setBizContent("product_id", productId);
|
||||
}
|
||||
}
|
||||
@@ -1,213 +0,0 @@
|
||||
package cn.lili.common.fulu.model;
|
||||
|
||||
/**
|
||||
* 直充商品订单input dto
|
||||
*
|
||||
* @Auther: chenYing
|
||||
* @Date: 2019/8/19 0019 15:39
|
||||
*/
|
||||
public class InputDirectOrderDto extends CommonRequest {
|
||||
|
||||
public InputDirectOrderDto() {
|
||||
super();
|
||||
setMethod("fulu.order.direct.add");
|
||||
}
|
||||
|
||||
/**
|
||||
* 购买数量
|
||||
*
|
||||
* @return Integer
|
||||
*/
|
||||
public Integer getBuyNum() {
|
||||
Object value = getBizContentValue("buy_num");
|
||||
return value != null ? Integer.valueOf(value.toString()) : null;
|
||||
}
|
||||
|
||||
public void setBuyNum(Integer buyNum) {
|
||||
setBizContent("buy_num", buyNum);
|
||||
}
|
||||
|
||||
/**
|
||||
* 充值账号
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public String getChargeAccount() {
|
||||
Object value = getBizContentValue("charge_account");
|
||||
return value != null ? String.valueOf(value) : null;
|
||||
}
|
||||
|
||||
public void setChargeAccount(String chargeAccount) {
|
||||
setBizContent("charge_account", chargeAccount);
|
||||
}
|
||||
|
||||
/**
|
||||
* 充值游戏名称
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public String getChargeGameName() {
|
||||
Object value = getBizContentValue("charge_game_name");
|
||||
return value != null ? String.valueOf(value) : null;
|
||||
}
|
||||
|
||||
public void setChargeGameName(String chargeGameName) {
|
||||
setBizContent("charge_game_name", chargeGameName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 充值游戏区
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public String getChargeGameRegion() {
|
||||
Object value = getBizContentValue("charge_game_region");
|
||||
return value != null ? String.valueOf(value) : null;
|
||||
}
|
||||
|
||||
public void setChargeGameRegion(String chargeGameRegion) {
|
||||
setBizContent("charge_game_region", chargeGameRegion);
|
||||
}
|
||||
|
||||
/**
|
||||
* 充值游戏角色
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public String getChargeGameRole() {
|
||||
Object value = getBizContentValue("charge_game_role");
|
||||
return value != null ? String.valueOf(value) : null;
|
||||
}
|
||||
|
||||
public void setChargeGameRole(String chargeGameRole) {
|
||||
setBizContent("charge_game_role", chargeGameRole);
|
||||
}
|
||||
|
||||
/**
|
||||
* 充值游戏服
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public String getChargeGameSrv() {
|
||||
Object value = getBizContentValue("charge_game_srv");
|
||||
return value != null ? String.valueOf(value) : null;
|
||||
}
|
||||
|
||||
public void setChargeGameSrv(String chargeGameSrv) {
|
||||
setBizContent("charge_game_srv", chargeGameSrv);
|
||||
}
|
||||
|
||||
/**
|
||||
* 下单真实Ip,区域商品要传
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public String getChargeIp() {
|
||||
Object value = getBizContentValue("charge_ip");
|
||||
return value != null ? String.valueOf(value) : null;
|
||||
}
|
||||
|
||||
public void setChargeIp(String chargeIp) {
|
||||
setBizContent("charge_ip", chargeIp);
|
||||
}
|
||||
|
||||
/**
|
||||
* 充值密码,部分游戏类要传
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public String getChargePassword() {
|
||||
Object value = getBizContentValue("charge_password");
|
||||
return value != null ? String.valueOf(value) : null;
|
||||
}
|
||||
|
||||
public void setChargePassword(String chargePassword) {
|
||||
setBizContent("charge_password", chargePassword);
|
||||
}
|
||||
|
||||
/**
|
||||
* 充值类型
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public String getChargeType() {
|
||||
Object value = getBizContentValue("charge_type");
|
||||
return value != null ? String.valueOf(value) : null;
|
||||
}
|
||||
|
||||
public void setChargeType(String chargeType) {
|
||||
setBizContent("charge_type", chargeType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 联系QQ
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public String getContactQq() {
|
||||
Object value = getBizContentValue("contact_qq");
|
||||
return value != null ? String.valueOf(value) : null;
|
||||
}
|
||||
|
||||
public void setContactQq(String contactQq) {
|
||||
setBizContent("contact_qq", contactQq);
|
||||
}
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public String getContactTel() {
|
||||
Object value = getBizContentValue("contact_tel");
|
||||
return value != null ? String.valueOf(value) : null;
|
||||
}
|
||||
|
||||
public void setContactTel(String contactTel) {
|
||||
setBizContent("contact_tel", contactTel);
|
||||
}
|
||||
|
||||
/**
|
||||
* 外部订单号
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public String getCustomerOrderNo() {
|
||||
Object value = getBizContentValue("customer_order_no");
|
||||
return value != null ? String.valueOf(value) : null;
|
||||
}
|
||||
|
||||
public void setCustomerOrderNo(String customerOrderNo) {
|
||||
setBizContent("customer_order_no", customerOrderNo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品编号
|
||||
*
|
||||
* @return Integer
|
||||
*/
|
||||
public Integer getProductId() {
|
||||
Object value = getBizContentValue("product_id");
|
||||
return value != null ? Integer.valueOf(value.toString()) : null;
|
||||
}
|
||||
|
||||
public void setProductId(Integer productId) {
|
||||
setBizContent("product_id", productId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 剩余数量
|
||||
*
|
||||
* @return Integer
|
||||
*/
|
||||
public Integer getRemainingNumber() {
|
||||
Object value = getBizContentValue("remaining_number");
|
||||
return value != null ? Integer.valueOf(value.toString()) : null;
|
||||
}
|
||||
|
||||
public void setRemainingNumber(Integer remainingNumber) {
|
||||
setBizContent("remaining_number", remainingNumber);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
package cn.lili.common.fulu.model;
|
||||
|
||||
/**
|
||||
* 手机号归属地input dto
|
||||
*
|
||||
* @Auther: chenYing
|
||||
* @Date: 2019/8/19 0019 16:08
|
||||
*/
|
||||
public class InputMatchPhoneProductListDto extends CommonRequest {
|
||||
|
||||
public InputMatchPhoneProductListDto() {
|
||||
super();
|
||||
setMethod("fulu.mobile.info.get");
|
||||
}
|
||||
|
||||
/**
|
||||
* 面值
|
||||
*
|
||||
* @return Double
|
||||
*/
|
||||
public Double getFaceValue() {
|
||||
Object value = getBizContentValue("face_value");
|
||||
return value != null ? Double.valueOf(value.toString()) : null;
|
||||
}
|
||||
|
||||
public void setFaceValue(Double faceValue) {
|
||||
setBizContent("face_value", faceValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public String getPhone() {
|
||||
Object value = getBizContentValue("phone");
|
||||
return value != null ? String.valueOf(value) : null;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
setBizContent("phone", phone);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
package cn.lili.common.fulu.model;
|
||||
|
||||
/**
|
||||
* 订单查单input dto
|
||||
*
|
||||
* @Auther: chenYing
|
||||
* @Date: 2019/8/19 0019 15:23
|
||||
*/
|
||||
public class InputOrderGetDto extends CommonRequest {
|
||||
|
||||
public InputOrderGetDto() {
|
||||
super();
|
||||
setMethod("fulu.order.info.get");
|
||||
}
|
||||
|
||||
/**
|
||||
* 外部订单号
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public String getCustomerOrderNo() {
|
||||
Object value = getBizContentValue("customer_order_no");
|
||||
return value != null ? String.valueOf(value) : null;
|
||||
}
|
||||
|
||||
public void setCustomerOrderNo(String customerOrderNo) {
|
||||
setBizContent("customer_order_no", customerOrderNo);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,57 +0,0 @@
|
||||
package cn.lili.common.fulu.model;
|
||||
|
||||
/**
|
||||
* 话费订单input dto
|
||||
*
|
||||
* @Auther: chenYing
|
||||
* @Date: 2019/8/19 0019 15:31
|
||||
*/
|
||||
public class InputPhoneOrderDto extends CommonRequest {
|
||||
|
||||
public InputPhoneOrderDto() {
|
||||
super();
|
||||
setMethod("fulu.order.mobile.add");
|
||||
}
|
||||
|
||||
/**
|
||||
* 充值手机号
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public String getChargePhone() {
|
||||
Object value = getBizContentValue("charge_phone");
|
||||
return value != null ? String.valueOf(value) : null;
|
||||
}
|
||||
|
||||
public void setChargePhone(String chargePhone) {
|
||||
setBizContent("charge_phone", chargePhone);
|
||||
}
|
||||
|
||||
/**
|
||||
* 充值数额
|
||||
*
|
||||
* @return Double
|
||||
*/
|
||||
public Double getChargeValue() {
|
||||
Object value = getBizContentValue("charge_value");
|
||||
return value != null ? Double.valueOf(value.toString()) : null;
|
||||
}
|
||||
|
||||
public void setChargeValue(Double chargeValue) {
|
||||
setBizContent("charge_value", chargeValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* 外部订单号
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public String getCustomerOrderNo() {
|
||||
Object value = getBizContentValue("customer_order_no");
|
||||
return value != null ? String.valueOf(value) : null;
|
||||
}
|
||||
|
||||
public void setCustomerOrderNo(String customerOrderNo) {
|
||||
setBizContent("customer_order_no", customerOrderNo);
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
package cn.lili.common.fulu.model;
|
||||
|
||||
/**
|
||||
* 商品信息input dto
|
||||
*
|
||||
* @Auther: chenYing
|
||||
* @Date: 2019/8/19 0019 16:04
|
||||
*/
|
||||
public class InputProductDto extends CommonRequest {
|
||||
|
||||
public InputProductDto() {
|
||||
super();
|
||||
setMethod("fulu.goods.info.get");
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品编号
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public String getProductId() {
|
||||
Object value = getBizContentValue("product_id");
|
||||
return value != null ? String.valueOf(value) : null;
|
||||
}
|
||||
|
||||
public void setProductId(String productId) {
|
||||
setBizContent("product_id", productId);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
package cn.lili.common.fulu.model;
|
||||
|
||||
/**
|
||||
* 商品模板信息input dto
|
||||
*
|
||||
* @Auther: chenYing
|
||||
* @Date: 2019/8/19 0019 16:01
|
||||
*/
|
||||
public class InputProductTemplateDto extends CommonRequest {
|
||||
|
||||
public InputProductTemplateDto() {
|
||||
super();
|
||||
setMethod("fulu.goods.template.get");
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品模板编号
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public String getTemplateId() {
|
||||
Object value = getBizContentValue("template_id");
|
||||
return value != null ? String.valueOf(value) : null;
|
||||
}
|
||||
|
||||
public void setTemplateId(String templateId) {
|
||||
setBizContent("template_id", templateId);
|
||||
}
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
package cn.lili.common.fulu.model;
|
||||
|
||||
/**
|
||||
* 流量订单input dto
|
||||
*
|
||||
* @Auther: chenYing
|
||||
* @Date: 2019/8/19 0019 13:50
|
||||
*/
|
||||
public class InputTrafficOrderDto extends CommonRequest {
|
||||
|
||||
public InputTrafficOrderDto() {
|
||||
super();
|
||||
setMethod("fulu.order.data.add");
|
||||
}
|
||||
|
||||
/**
|
||||
* 充值手机号
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public String getChargePhone() {
|
||||
Object value = getBizContentValue("charge_phone");
|
||||
return value != null ? String.valueOf(value) : null;
|
||||
}
|
||||
|
||||
public void setChargePhone(String chargePhone) {
|
||||
setBizContent("charge_phone", chargePhone);
|
||||
}
|
||||
|
||||
/**
|
||||
* 充值数额(M)
|
||||
*
|
||||
* @return Double
|
||||
*/
|
||||
public Double getChargeValue() {
|
||||
Object value = getBizContentValue("charge_value");
|
||||
return value != null ? Double.valueOf(value.toString()) : null;
|
||||
}
|
||||
|
||||
public void setChargeValue(Double chargeValue) {
|
||||
setBizContent("charge_value", chargeValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* 外部订单号
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public String getCustomerOrderNo() {
|
||||
Object value = getBizContentValue("customer_order_no");
|
||||
return value != null ? String.valueOf(value) : null;
|
||||
}
|
||||
|
||||
public void setCustomerOrderNo(String customerOrderNo) {
|
||||
setBizContent("customer_order_no", customerOrderNo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 流量性质 1:小时 2:日 3:7天 4:月 5:季度 6:半年 7:年
|
||||
*
|
||||
* @return Integer
|
||||
*/
|
||||
public Integer getPacketKind() {
|
||||
Object value = getBizContentValue("packet_kind");
|
||||
return value != null ? Integer.valueOf(value.toString()) : null;
|
||||
}
|
||||
|
||||
public void setPacketKind(Integer packetKind) {
|
||||
setBizContent("packet_kind", packetKind);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
package cn.lili.common.fulu.model;
|
||||
|
||||
/**
|
||||
* 用户信息input dto
|
||||
*
|
||||
* @Auther: chenYing
|
||||
* @Date: 2019/8/19 0019 16:06
|
||||
*/
|
||||
public class InputUserDto extends CommonRequest {
|
||||
|
||||
public InputUserDto() {
|
||||
super();
|
||||
setMethod("fulu.user.info.get");
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
package cn.lili.common.fulu.model.response;
|
||||
|
||||
/**
|
||||
* 响应对象
|
||||
*
|
||||
* @Auther: chenYing
|
||||
* @Date: 2019/8/19 0019 15:06
|
||||
*/
|
||||
public class DefaultClientResponse {
|
||||
private String code;
|
||||
private String message;
|
||||
private String result;
|
||||
private String sign;
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public String getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(String result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public String getSign() {
|
||||
return sign;
|
||||
}
|
||||
|
||||
public void setSign(String sign) {
|
||||
this.sign = sign;
|
||||
}
|
||||
}
|
||||
@@ -1,129 +0,0 @@
|
||||
package cn.lili.common.fulu.sdk;
|
||||
|
||||
import cn.lili.common.fulu.core.http.FuluClient;
|
||||
import cn.lili.common.fulu.core.http.IFuluClient;
|
||||
import cn.lili.common.fulu.core.utils.JSONUtil;
|
||||
import cn.lili.common.fulu.model.CommonRequest;
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
/**
|
||||
* 默认OpenApi客户请求实现
|
||||
*
|
||||
* @Auther: chenYing
|
||||
* @Date: 2019/8/19 0019 16:45
|
||||
*/
|
||||
public class DefaultOpenApiClient implements IDefaultOpenApiClient {
|
||||
/**
|
||||
* 商户AppKey
|
||||
*/
|
||||
private String appKey;
|
||||
/**
|
||||
* 业务参数
|
||||
*/
|
||||
private CommonRequest bizContent;
|
||||
/**
|
||||
* http请求
|
||||
*/
|
||||
private IFuluClient fuluClient;
|
||||
/**
|
||||
* 方法
|
||||
*/
|
||||
private String method;
|
||||
/**
|
||||
* 应用秘钥
|
||||
*/
|
||||
private String sysSecret;
|
||||
|
||||
// public DefaultOpenApiClient(String url, String appKey, String sysSecret) {
|
||||
// this.appKey = appKey;
|
||||
// this.sysSecret = sysSecret;
|
||||
//
|
||||
// if (url == null || "".equals(url.trim())) {
|
||||
// this.fuluClient = new FuluClient();
|
||||
// } else {
|
||||
// this.fuluClient = new FuluClient(url);
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* 如果url没改变,可以使用这个构造
|
||||
*
|
||||
* @param appKey appKey
|
||||
* @param sysSecret sysSecret
|
||||
*/
|
||||
// public DefaultOpenApiClient(String appKey, String sysSecret) {
|
||||
// this.appKey = appKey;
|
||||
// this.fuluClient = new FuluClient();
|
||||
// this.sysSecret = sysSecret;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 使用public void setBizContent(String bizContent)此方法,method不能为空,必填
|
||||
* 或者使用其它构造,调用fulu.sup.open.api.model.CommonRequest的setMethod也可以
|
||||
*
|
||||
* @param url url
|
||||
* @param appKey appKey
|
||||
* @param sysSecret sysSecret
|
||||
* @param method method
|
||||
*/
|
||||
public DefaultOpenApiClient(String url, String appKey, String sysSecret, String method) {
|
||||
this.appKey = appKey;
|
||||
this.sysSecret = sysSecret;
|
||||
this.method = method;
|
||||
|
||||
if (url == null || "".equals(url.trim())) {
|
||||
this.fuluClient = new FuluClient();
|
||||
} else {
|
||||
this.fuluClient = new FuluClient(url);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String excute() {
|
||||
doSign();
|
||||
return fuluClient.send(JSONUtil.toJSON(this.bizContent));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Future<String> excuteAsync() {
|
||||
doSign();
|
||||
return fuluClient.sendAsync(JSONUtil.toJSON(this.bizContent));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBizContent(String bizContent) {
|
||||
this.bizContent = new CommonRequest();
|
||||
this.bizContent.setBizContent(bizContent);
|
||||
this.bizContent.setAppKey(this.appKey);
|
||||
this.bizContent.setMethod(this.method);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBizObject(CommonRequest bizModel) {
|
||||
this.bizContent = bizModel;
|
||||
this.bizContent.setAppKey(this.appKey);
|
||||
|
||||
if (method != null && !"".equals(method)) {
|
||||
this.bizContent.setMethod(this.method);
|
||||
}
|
||||
}
|
||||
|
||||
private void doSign() {
|
||||
if (bizContent.getMethod() == null || "".equals(bizContent.getMethod().trim())) {
|
||||
throw new RuntimeException("param \"method\" can not blank!");
|
||||
}
|
||||
|
||||
this.bizContent.setSign(null);
|
||||
this.bizContent.getBizContent();
|
||||
String json = JSONUtil.toJSON(this.bizContent);
|
||||
char[] charArray = json.toCharArray();
|
||||
Arrays.sort(charArray);
|
||||
String signStr = new String(charArray);
|
||||
signStr = String.format("%s%s", signStr, sysSecret);
|
||||
this.bizContent.setSign(DigestUtils.md5Hex(signStr));
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user