Compare commits
550 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9616c27efa | ||
|
|
0b5f830d7c | ||
|
|
d0f952bd68 | ||
|
|
2876a39ff5 | ||
|
|
6bcf6da165 | ||
|
|
9fe633d228 | ||
|
|
b32bf41443 | ||
|
|
e4e073b6f0 | ||
|
|
e960ee2f40 | ||
|
|
a689bb83ee | ||
|
|
0940d9aec8 | ||
|
|
c5da640432 | ||
|
|
a5f924841a | ||
|
|
fda3b5b1cc | ||
|
|
10b8f83737 | ||
|
|
ea5da365c7 | ||
|
|
f6eb72332b | ||
|
|
fcb401c89b | ||
|
|
2b0dc1d0a3 | ||
|
|
a0139b84e1 | ||
|
|
6cb511ba10 | ||
|
|
7483f19fc6 | ||
|
|
f8d2ab5e17 | ||
|
|
9cd591efe3 | ||
|
|
e655fdf67f | ||
|
|
9aa253b56f | ||
|
|
1d5a2008e1 | ||
|
|
1f1b534b13 | ||
|
|
5c78711d8e | ||
|
|
191709e983 | ||
|
|
da6a17cd61 | ||
|
|
acb88a6b2a | ||
|
|
96b5b50ee0 | ||
|
|
6639ec8971 | ||
|
|
9aa7a6dcf3 | ||
|
|
4dc183cdf5 | ||
|
|
bbe3399c90 | ||
|
|
29e43d299a | ||
|
|
a4ee4df71b | ||
|
|
64dbe6708a | ||
|
|
f375a9f9db | ||
|
|
15a8800b15 | ||
|
|
77e526c22f | ||
|
|
f235f66c19 | ||
|
|
1b44bedf42 | ||
|
|
40e16c4d1b | ||
|
|
0c383ac7e9 | ||
|
|
0ec2688f17 | ||
|
|
346550182f | ||
|
|
24568e0f00 | ||
|
|
64f2f4668b | ||
|
|
f4e1d891a7 | ||
|
|
3972e0231c | ||
|
|
039e85d5e5 | ||
|
|
936397c59f | ||
|
|
23ddca6f82 | ||
|
|
286214d9c3 | ||
|
|
6d0dd09b5b | ||
|
|
38469d42ef | ||
|
|
696bfe0a2c | ||
|
|
3de2b9834d | ||
|
|
d5fdc47936 | ||
|
|
27e82423f0 | ||
|
|
576b5b213e | ||
|
|
145406be32 | ||
|
|
a65f0ad384 | ||
|
|
5051fc7b0b | ||
|
|
7164036d4c | ||
|
|
cb0a9121e5 | ||
|
|
96e779eb28 | ||
|
|
27397f1602 | ||
|
|
2d1cfde76b | ||
|
|
007d69a887 | ||
|
|
f3965cecd5 | ||
|
|
4fb170e5c7 | ||
|
|
8e1ade5423 | ||
|
|
0b081c2d85 | ||
|
|
ab1e9f806f | ||
|
|
e961711dcb | ||
|
|
90185d8c32 | ||
|
|
68ef46195c | ||
|
|
0c234e78af | ||
|
|
ca1851570b | ||
|
|
cf0d1378c8 | ||
|
|
b13a5d5f2a | ||
|
|
575458afb3 | ||
|
|
b2d4b7bb23 | ||
|
|
def6247e9f | ||
|
|
6409d0dc2d | ||
|
|
f253ae9c31 | ||
|
|
b93d10eeea | ||
|
|
801f1cbd4c | ||
|
|
f8260c3b29 | ||
|
|
9e74c15413 | ||
|
|
65e7f9750a | ||
|
|
62804941c2 | ||
|
|
05818baf7a | ||
|
|
1c28e0bd5f | ||
|
|
0460e219f9 | ||
|
|
eec3611218 | ||
|
|
87f637099c | ||
|
|
5f0241768d | ||
|
|
60b4ab5c5b | ||
|
|
bbed7afdcb | ||
|
|
459a736ebc | ||
|
|
bdbc620515 | ||
|
|
3c905ffd8b | ||
|
|
20d32b1f8f | ||
|
|
f57a373d47 | ||
|
|
77a714e64c | ||
|
|
4a3c978e07 | ||
|
|
a4d458bace | ||
|
|
b0843aa744 | ||
|
|
eddcbc2ecb | ||
|
|
62fd1f3012 | ||
|
|
23264d5d9b | ||
|
|
cc7d2c0c82 | ||
|
|
9bed8e57df | ||
|
|
ad35168876 | ||
|
|
ec8d511e9e | ||
|
|
d2cab9f4a1 | ||
|
|
c1ca4764f0 | ||
|
|
366d1b8846 | ||
|
|
7a8dd54e5c | ||
|
|
37393bb7f8 | ||
|
|
3904bfd91d | ||
|
|
f720e00132 | ||
|
|
f723c11a84 | ||
|
|
643e8c8157 | ||
|
|
11f9ddaeb6 | ||
|
|
5d96d434d6 | ||
|
|
ad1f086e4d | ||
|
|
3fa3991cfa | ||
|
|
9a6102e887 | ||
|
|
e23d3a48cc | ||
|
|
ddd7c336cf | ||
|
|
ee79b19d20 | ||
|
|
383cbc0b53 | ||
|
|
e8d9556a4b | ||
|
|
5958f06986 | ||
|
|
0c4aef307a | ||
|
|
20436653af | ||
|
|
814533a2c2 | ||
|
|
d4ca3d5817 | ||
|
|
194d0b6ac2 | ||
|
|
832b065a46 | ||
|
|
fa443a091f | ||
|
|
31c2f555fc | ||
|
|
74e5e86eff | ||
|
|
a318eb82c7 | ||
|
|
6465dc2b73 | ||
|
|
082d241c8f | ||
|
|
5a6012530e | ||
|
|
35e4538160 | ||
|
|
125bb372ed | ||
|
|
92e56d7153 | ||
|
|
c8272ec90d | ||
|
|
b6d01cb850 | ||
|
|
5e1eb3e03b | ||
|
|
f4c94bd8d6 | ||
|
|
8484d3f810 | ||
|
|
07f5fbca47 | ||
|
|
68d03196af | ||
|
|
a9ef62dfb0 | ||
|
|
9f6d33f6e8 | ||
|
|
ff158fd0e4 | ||
|
|
4de5e616e5 | ||
|
|
b6db829b04 | ||
|
|
821aa74669 | ||
|
|
c3221a6fff | ||
|
|
cbbfbae772 | ||
|
|
c65fd99b15 | ||
|
|
4d49d3c77a | ||
|
|
aad32a4a1f | ||
|
|
ec912efa01 | ||
|
|
bf2fdc2761 | ||
|
|
168c630a13 | ||
|
|
e7563203fe | ||
|
|
9bf1dbe030 | ||
|
|
dbcee40b93 | ||
|
|
2af334d793 | ||
|
|
f9a8675942 | ||
|
|
521a6174fe | ||
|
|
c85bc7b8ea | ||
|
|
825e44b353 | ||
|
|
ed840a95a1 | ||
|
|
ef31d6af83 | ||
|
|
b1e70ebf12 | ||
|
|
3af0031214 | ||
|
|
b648aa94b3 | ||
|
|
0e864043a6 | ||
|
|
eb25827937 | ||
|
|
f4a07b2911 | ||
|
|
cdfeb5dbdc | ||
|
|
40bc890870 | ||
|
|
18874e3755 | ||
|
|
a3d2b84ecb | ||
|
|
5f16a5c791 | ||
|
|
f086a58096 | ||
|
|
dfcf71aec7 | ||
|
|
f2e8d03f80 | ||
|
|
0736f1c550 | ||
|
|
bdd1195d20 | ||
|
|
e5511d5c09 | ||
|
|
7634801f7c | ||
|
|
1db86f2865 | ||
|
|
626e58b515 | ||
|
|
787617f504 | ||
|
|
3fb4e488bb | ||
|
|
c5187a63b9 | ||
|
|
e5f725cf16 | ||
|
|
3d56c9cc81 | ||
|
|
0ae1ae5df4 | ||
|
|
c0c530adad | ||
|
|
e962a594ba | ||
|
|
0ac7900948 | ||
|
|
6748b2911a | ||
|
|
3e4152fd9b | ||
|
|
7dfffd60b8 | ||
|
|
3ba4d24041 | ||
|
|
e99d0f45fd | ||
|
|
351745d31f | ||
|
|
bfa960d803 | ||
|
|
7572e8d56f | ||
|
|
82e773243f | ||
|
|
795440850b | ||
|
|
6adcb46f29 | ||
|
|
6cd31e630c | ||
|
|
23b3e72579 | ||
|
|
bda7a12c2a | ||
|
|
e8f44ef6f2 | ||
|
|
e4047fbd30 | ||
|
|
7dcdb43acf | ||
|
|
9f75e1fae8 | ||
|
|
78c0de664c | ||
|
|
efc4b37782 | ||
|
|
6253590326 | ||
|
|
f0b43ddd32 | ||
|
|
51e7b4f15d | ||
|
|
0ef244b373 | ||
|
|
97a1502eb2 | ||
|
|
2536e3b9f6 | ||
|
|
7aed7254a0 | ||
|
|
44e061f321 | ||
|
|
a9ddcfeb95 | ||
|
|
822e332aaa | ||
|
|
c3fbad7dbf | ||
|
|
07348357d0 | ||
|
|
947fc457f2 | ||
|
|
b719e96838 | ||
|
|
cafeb1f20f | ||
|
|
9ae798a11a | ||
|
|
d188068b10 | ||
|
|
abb4b8cb66 | ||
|
|
ef8615cfe5 | ||
|
|
ee0cb6d225 | ||
|
|
0da8f7f8f6 | ||
|
|
f8b44d9f9b | ||
|
|
b55f5ab6ae | ||
|
|
90e550934d | ||
|
|
ff757d2151 | ||
|
|
a3f838d8e6 | ||
|
|
d9d19f8cbd | ||
|
|
036ad6defb | ||
|
|
520c09b801 | ||
|
|
f850e4adaa | ||
|
|
450041bb02 | ||
|
|
2e99c26654 | ||
|
|
2e5f383db4 | ||
|
|
357b214192 | ||
|
|
c301c55905 | ||
|
|
1764e6956b | ||
|
|
a7509e1125 | ||
|
|
9ec3322574 | ||
|
|
3658f027bb | ||
|
|
9a04bb2d71 | ||
|
|
343e5e332c | ||
|
|
28a6cf1cb1 | ||
|
|
e2777b2f0a | ||
|
|
d8da258898 | ||
|
|
8616854e00 | ||
|
|
7b98d1d9d0 | ||
|
|
b8b14df39b | ||
|
|
8ddf622d0f | ||
|
|
00ffd246a9 | ||
|
|
ac86715062 | ||
|
|
2c8df21671 | ||
|
|
d16cf44f4a | ||
|
|
6d3fbd7cf0 | ||
|
|
f9f723c47a | ||
|
|
3ac28ac218 | ||
|
|
ece66ba16a | ||
|
|
f24019d306 | ||
|
|
ea80777ef6 | ||
|
|
f7ab6dc6ae | ||
|
|
a8698fbd1a | ||
|
|
62b5162c7e | ||
|
|
aa9466b8d1 | ||
|
|
70b12dfd3e | ||
|
|
0912872de2 | ||
|
|
9016090c67 | ||
|
|
79e4386d1e | ||
|
|
5e4973fae5 | ||
|
|
4228ac4570 | ||
|
|
152dbac29d | ||
|
|
2241e90798 | ||
|
|
613a808cec | ||
|
|
af52a68abc | ||
|
|
9c2738399e | ||
|
|
385a4ae618 | ||
|
|
b0d39324ef | ||
|
|
c224ad568e | ||
|
|
6184ba9b82 | ||
|
|
bea807c7b4 | ||
|
|
323bc6b775 | ||
|
|
7c87d13ba2 | ||
|
|
3e10c891ab | ||
|
|
643d966740 | ||
|
|
94968799c3 | ||
|
|
30d53fa41e | ||
|
|
00805d6a49 | ||
|
|
0e7665f59d | ||
|
|
96cc2bd37f | ||
|
|
71e51b3b6f | ||
|
|
5f90e422e6 | ||
|
|
b65cdfc1fb | ||
|
|
a3c597b3c5 | ||
|
|
db587fda30 | ||
|
|
7170e3a16a | ||
|
|
61aa3ca3d2 | ||
|
|
96f57b7df8 | ||
|
|
d16df738d3 | ||
|
|
9ae0921f69 | ||
|
|
5dd1c95294 | ||
|
|
404fecd83c | ||
|
|
a4fb3db3cd | ||
|
|
92d64db0b7 | ||
|
|
033ec0fd61 | ||
|
|
dc36274212 | ||
|
|
817587522b | ||
|
|
58648c3ece | ||
|
|
16f314bd80 | ||
|
|
f8408030a9 | ||
|
|
c276b1595c | ||
|
|
71cc57959b | ||
|
|
dbd35c18b5 | ||
|
|
1e868c2335 | ||
|
|
59461175d9 | ||
|
|
aee5d4be2e | ||
|
|
e9c18935c5 | ||
|
|
b80aa48735 | ||
|
|
c32999aa03 | ||
|
|
56d486e010 | ||
|
|
d83f82a340 | ||
|
|
2f49292672 | ||
|
|
c09b6061fc | ||
|
|
1d14a0adb5 | ||
|
|
840a2eabdb | ||
|
|
f2be8e6abd | ||
|
|
71fb4b2b2b | ||
|
|
3cabf0a32c | ||
|
|
8416fd49ae | ||
|
|
3a15c2eaa7 | ||
|
|
e0eb76e120 | ||
|
|
8a29ce048d | ||
|
|
d43b679f8d | ||
|
|
74abc4b360 | ||
|
|
f1c0207a3d | ||
|
|
f61f98d288 | ||
|
|
3727b67a23 | ||
|
|
dae52cd68f | ||
|
|
805197c127 | ||
|
|
aca627e137 | ||
|
|
1b6a650ba4 | ||
|
|
7d43279b49 | ||
|
|
a843081663 | ||
|
|
2765dd8fd9 | ||
|
|
0e7c703dfd | ||
|
|
f9112c4b39 | ||
|
|
1707563118 | ||
|
|
803bd32f4b | ||
|
|
31728300e1 | ||
|
|
1d317998af | ||
|
|
078af06b63 | ||
|
|
155d98e8b9 | ||
|
|
3c6d6e67bd | ||
|
|
4dc5950191 | ||
|
|
4b3935339e | ||
|
|
e218738fda | ||
|
|
dc4c529c2c | ||
|
|
617cf98bc0 | ||
|
|
7aa2c05d92 | ||
|
|
505f3fcf96 | ||
|
|
920d095fda | ||
|
|
2369b61243 | ||
|
|
89420f5c1e | ||
|
|
6f13218564 | ||
|
|
5cd0c9a205 | ||
|
|
2fbdfb293a | ||
|
|
9fd75c65e1 | ||
|
|
9fda721bd4 | ||
|
|
8854a97547 | ||
|
|
c1d84a7130 | ||
|
|
0ff0f266d4 | ||
|
|
93d9b217ca | ||
|
|
725e65cffb | ||
|
|
3dd61f47fc | ||
|
|
05eee7fca5 | ||
|
|
0ae97b71dd | ||
|
|
3dbc340e6d | ||
|
|
d877a24dec | ||
|
|
c4feaa1546 | ||
|
|
5eded10d19 | ||
|
|
65f6cf3b54 | ||
|
|
f216957cb4 | ||
|
|
8ba0212f37 | ||
|
|
8982db255d | ||
|
|
f0f343aa23 | ||
|
|
5fe7459e6e | ||
|
|
b98e01b261 | ||
|
|
27efe772ab | ||
|
|
a44f06b3e8 | ||
|
|
8ddd39d6e5 | ||
|
|
c5f5128b1b | ||
|
|
10c3e90f54 | ||
|
|
14ce522539 | ||
|
|
6770f058d5 | ||
|
|
c85caab197 | ||
|
|
58ce721674 | ||
|
|
ec020535e2 | ||
|
|
af9ffd1cbf | ||
|
|
956a6e465a | ||
|
|
af37386821 | ||
|
|
9baafd55be | ||
|
|
394ee27525 | ||
|
|
7e58b98e74 | ||
|
|
a2fd6dd8d1 | ||
|
|
afd5eba986 | ||
|
|
585e2c4ccc | ||
|
|
44e36f0bcd | ||
|
|
a535b5c54c | ||
|
|
adf353790b | ||
|
|
57594f3f07 | ||
|
|
036ad56093 | ||
|
|
bc8885c5b8 | ||
|
|
dd1bf2eec0 | ||
|
|
ab0b7f1591 | ||
|
|
5872049391 | ||
|
|
676c432ded | ||
|
|
234f355661 | ||
|
|
61914d04f0 | ||
|
|
f42f7c7ba1 | ||
|
|
c61bcfa5c1 | ||
|
|
18f6e279d2 | ||
|
|
fe9a5fb71d | ||
|
|
961703a3b2 | ||
|
|
8382101520 | ||
|
|
8de80d2e8e | ||
|
|
cc3bd71610 | ||
|
|
db90d83951 | ||
|
|
64e9e1bfeb | ||
|
|
7da2d6a16b | ||
|
|
744d882831 | ||
|
|
2bf232b5fd | ||
|
|
6e653519d8 | ||
|
|
6e58b1e1e6 | ||
|
|
ebe4a01448 | ||
|
|
123626dbba | ||
|
|
6c95a784f8 | ||
|
|
15c6b74829 | ||
|
|
e630420910 | ||
|
|
3cc4fbb377 | ||
|
|
7907f16359 | ||
|
|
d838f7f3f0 | ||
|
|
ead6a72dec | ||
|
|
55c9a63301 | ||
|
|
099708390d | ||
|
|
dea2881aa8 | ||
|
|
76c253041a | ||
|
|
7cf180fda0 | ||
|
|
b03fdd3bbe | ||
|
|
0d5be1372c | ||
|
|
5cee705d63 | ||
|
|
ec132009ef | ||
|
|
7cd07a8503 | ||
|
|
9ec208fd9e | ||
|
|
cf5ce47f32 | ||
|
|
b90ee161b5 | ||
|
|
e28d26556a | ||
|
|
eb6e29fb33 | ||
|
|
c8ac7159cf | ||
|
|
b91927bfde | ||
|
|
5d6ea5b48d | ||
|
|
cbacab6bdf | ||
|
|
d041e7b5b4 | ||
|
|
0440ecea23 | ||
|
|
cdeebc7afb | ||
|
|
5181a19f29 | ||
|
|
e2f5b6031a | ||
|
|
acf2e56ffc | ||
|
|
95095f35c0 | ||
|
|
50c08c0e01 | ||
|
|
f4cd51120b | ||
|
|
a550e4051d | ||
|
|
d432b0a183 | ||
|
|
444b617c63 | ||
|
|
87c82ce4d3 | ||
|
|
bdf0f65963 | ||
|
|
794a932340 | ||
|
|
504941eafb | ||
|
|
7fafdc087e | ||
|
|
c8b2e87570 | ||
|
|
81ce0f4682 | ||
|
|
87e5404aa8 | ||
|
|
2f31946a17 | ||
|
|
a23b8ac642 | ||
|
|
071f8c9d56 | ||
|
|
76fcf84043 | ||
|
|
d9b1d78c61 | ||
|
|
c8de423e7c | ||
|
|
a4648ac40f | ||
|
|
af5c0a4641 | ||
|
|
ff24c95d02 | ||
|
|
ac936caf17 | ||
|
|
be1c9772ad | ||
|
|
50b52f07c6 | ||
|
|
57a5c5a0f1 | ||
|
|
4f4704ab50 | ||
|
|
505366d9bc | ||
|
|
c5e8afd841 | ||
|
|
1de4dea1fb | ||
|
|
6fb9afd411 | ||
|
|
a2d896c9b2 | ||
|
|
e5e809ed72 | ||
|
|
d4c9b0f147 | ||
|
|
ac60f27814 | ||
|
|
42ce0814ae | ||
|
|
f3f3d3f936 | ||
|
|
8c3bc6e06e | ||
|
|
6dfde467b4 | ||
|
|
e0e5106eed | ||
|
|
9cee1093f4 | ||
|
|
a3d73bf7ad | ||
|
|
1f7dff38fc | ||
|
|
f7fc9a1299 | ||
|
|
6ef7a98d81 | ||
|
|
31a16b77df | ||
|
|
3459169885 | ||
|
|
8ae04e7ee6 | ||
|
|
a3564c746c |
4
.gitignore
vendored
4
.gitignore
vendored
@@ -10,8 +10,8 @@ target
|
||||
.factorypath
|
||||
|
||||
log/
|
||||
logs/
|
||||
*.factorypath
|
||||
*.log
|
||||
lili-shop/src/main/java/cn/lili/generator/CodeGenerator.java
|
||||
lili-logs
|
||||
|
||||
@@ -19,7 +19,6 @@ lili-logs
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
@@ -28,7 +27,6 @@ lili-logs
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### NetBeans ###
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
## PS:数据库位置
|
||||
|
||||
点击跳转 https://gitee.com/beijing_hongye_huicheng/docker/tree/master/init/mysql 这里有与tag版本一致的sql,根据tag获取sql,如果使用master代码,则需要在lilishop项目根目录的update-sql目录中,获取对应的升级sql。
|
||||
|
||||
|
||||
使用master分支代码时,可能会无法运行,执行完初始化sql之后需要执行当前目录下'versiontXXXXtoMASTER.sql'。
|
||||
2
DB/version4.2.2to4.2.3.sql
Normal file
2
DB/version4.2.2to4.2.3.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
/** 新增店铺客服字段 **/
|
||||
ALTER TABLE li_store ADD merchant_euid varchar(255) COMMENT '客服标识';
|
||||
2
DB/version4.2.3to4.2.4.sql
Normal file
2
DB/version4.2.3to4.2.4.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
/** 新增已退货数量 **/
|
||||
ALTER TABLE li_order_item ADD return_goods_number int DEFAULT 0 COMMENT '退货数量 ';
|
||||
64
DB/version4.2.3toMASTER.sql
Normal file
64
DB/version4.2.3toMASTER.sql
Normal file
@@ -0,0 +1,64 @@
|
||||
/** 新增已退货数量 **/
|
||||
ALTER TABLE li_order_item ADD return_goods_number int DEFAULT 0 COMMENT '退货数量 ';
|
||||
|
||||
|
||||
-- 促销重构sql
|
||||
ALTER TABLE li_coupon DROP COLUMN promotion_status;
|
||||
|
||||
ALTER TABLE li_coupon_activity DROP COLUMN promotion_status;
|
||||
ALTER TABLE li_coupon_activity ADD `scope_id` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '范围关联的ID';
|
||||
ALTER TABLE li_coupon_activity ADD `scope_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT 'PORTION_GOODS' COMMENT '关联范围类型';
|
||||
|
||||
ALTER TABLE li_full_discount DROP COLUMN promotion_status;
|
||||
ALTER TABLE li_full_discount ADD `scope_id` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '范围关联的ID';
|
||||
ALTER TABLE li_full_discount ADD `scope_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT 'PORTION_GOODS' COMMENT '关联范围类型';
|
||||
|
||||
ALTER TABLE li_kanjia_activity_goods DROP COLUMN promotion_status;
|
||||
ALTER TABLE li_kanjia_activity_goods ADD `scope_id` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '范围关联的ID';
|
||||
ALTER TABLE li_kanjia_activity_goods ADD `scope_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT 'PORTION_GOODS' COMMENT '关联范围类型';
|
||||
ALTER TABLE li_kanjia_activity_goods ADD `goods_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL;
|
||||
|
||||
ALTER TABLE li_pintuan DROP COLUMN promotion_status;
|
||||
ALTER TABLE li_pintuan ADD `scope_id` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '范围关联的ID';
|
||||
ALTER TABLE li_pintuan ADD `scope_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT 'PORTION_GOODS' COMMENT '关联范围类型';
|
||||
|
||||
ALTER TABLE li_points_goods DROP COLUMN promotion_status;
|
||||
ALTER TABLE li_points_goods ADD `scope_id` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '范围关联的ID';
|
||||
ALTER TABLE li_points_goods ADD `scope_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT 'PORTION_GOODS' COMMENT '关联范围类型';
|
||||
ALTER TABLE li_points_goods ADD `original_price` double(10,2) DEFAULT NULL COMMENT '原价';
|
||||
ALTER TABLE li_points_goods ADD `thumbnail` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '缩略图';
|
||||
ALTER TABLE li_points_goods ADD `goods_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '商品编号';
|
||||
ALTER TABLE li_points_goods ADD `goods_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '货品名称';
|
||||
|
||||
ALTER TABLE li_promotion_goods DROP COLUMN promotion_status;
|
||||
ALTER TABLE li_promotion_goods ADD `scope_id` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '范围关联的ID';
|
||||
ALTER TABLE li_promotion_goods ADD `scope_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT 'PORTION_GOODS' COMMENT '关联范围类型';
|
||||
ALTER TABLE li_promotion_goods ADD `original_price` double(10,2) DEFAULT NULL COMMENT '原价';
|
||||
ALTER TABLE li_promotion_goods ADD `points` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '兑换积分';
|
||||
ALTER TABLE li_promotion_goods ADD `goods_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '商品编号';
|
||||
|
||||
ALTER TABLE li_seckill DROP COLUMN promotion_status;
|
||||
ALTER TABLE li_seckill ADD `scope_id` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '范围关联的ID';
|
||||
ALTER TABLE li_seckill ADD `scope_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT 'PORTION_GOODS' COMMENT '关联范围类型';
|
||||
|
||||
ALTER TABLE li_full_discount RENAME COLUMN is_coupon TO coupon_flag;
|
||||
ALTER TABLE li_full_discount RENAME COLUMN is_free_freight TO free_freight_flag;
|
||||
ALTER TABLE li_full_discount RENAME COLUMN is_full_minus TO full_minus_flag;
|
||||
ALTER TABLE li_full_discount RENAME COLUMN is_full_rate TO full_rate_flag;
|
||||
ALTER TABLE li_full_discount RENAME COLUMN is_gift TO gift_flag;
|
||||
ALTER TABLE li_full_discount RENAME COLUMN is_point TO point_flag;
|
||||
|
||||
ALTER TABLE li_member_coupon RENAME COLUMN is_platform TO platform_flag;
|
||||
|
||||
ALTER TABLE li_goods RENAME COLUMN is_auth TO auth_flag;
|
||||
|
||||
ALTER TABLE li_goods_sku RENAME COLUMN is_promotion TO promotion_flag;
|
||||
ALTER TABLE li_goods_sku RENAME COLUMN is_auth TO auth_flag;
|
||||
|
||||
|
||||
-- 增加会员表索引
|
||||
ALTER TABLE li_member ADD INDEX query_mobile (`mobile`) COMMENT 'query_member';
|
||||
-- 会员签到唯一索引 惠券查询索引
|
||||
ALTER TABLE li_member_sign ADD INDEX query_create_time (`create_time`) COMMENT 'query_create_time';
|
||||
ALTER TABLE li_member_sign ADD INDEX query_member_id (`member_id`) COMMENT 'query_member_id';
|
||||
ALTER TABLE li_member_sign add unique uk_member_day (member_id, create_time) COMMENT 'uk_member_day';
|
||||
151
README.md
151
README.md
@@ -1,18 +1,21 @@
|
||||
## 🔥 Lilishop B2B2C商城系统
|
||||
## Lilishop B2B2C商城系统
|
||||
|
||||
##### 🌹 开源不易,如有帮助请点Star
|
||||
##### 开源不易,如有帮助请点Star
|
||||
|
||||
|
||||
|
||||
#### 欢迎交流需求,交流业务,交流技术
|
||||
#### 欢迎交流需求,交流业务,交流技术(基础问题自行解决,进群先看文档后提问)
|
||||
|
||||
|
||||
##### 交流 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>
|
||||
|
||||
|
||||
##### 商城 公众号/小程序体验,扫描二维码
|
||||
##### 体验 公众号/小程序/APP 体验,扫描二维码
|
||||
|
||||

|
||||
|
||||
@@ -20,144 +23,88 @@
|
||||

|
||||
|
||||
|
||||
### 🔥 商城介绍
|
||||
### 商城介绍
|
||||
**官网**:https://pickmall.cn
|
||||
|
||||
Lilishop 商城系统 基于SpringBoot 研发,B2B2C多用户商城系统,前端使用 Vue、uniapp开发 **系统全端全部代码开源**
|
||||
Lilishop商城系统支持商家入驻,后端基于SpringBoot 研发,前端使用 Vue、uniapp开发, **系统全端全部代码开源**
|
||||
|
||||
业务兼容O2O商城/B2B商城/B2B2C商城/F2B2C商城/S2B2C商城。支持小程序商城、H5商城、APP商城、 PC商城。
|
||||
商城前后端分离,支持分布式部署,支持Docker,各个API独立,并且有独立的消费者。
|
||||
|
||||
### 商城 API/消费者 聚合版
|
||||
api不需要单独部署,只需启动一个jar包就可以正常运转 如有需要,可以点击跳转
|
||||
https://gitee.com/beijing_hongye_huicheng/lilishop-simplify
|
||||
|
||||
|
||||
商城前后端分离、支持分布式部署。
|
||||
|
||||
商城包含 会员模块、**第三方登录模块**、**第三方支付模块**、**楼层装修模块**、订单模块、分销模块、文章模块、系统设置模块、流量分析模块
|
||||
|
||||
商城包含各种中间件、搜索引擎、多级缓存、分布式事务、分布式任务调度等,支持Docker,支持k8s。是一款高性能,支持高并发的商城系统。
|
||||
|
||||
|
||||
|
||||
### ☃️ 帮助文档
|
||||
### 商城 开发/使用/常见问题 帮助文档
|
||||
|
||||
https://docs.pickmall.cn
|
||||
|
||||
### 💧 项目链接(gitee)
|
||||
### 项目地址
|
||||
|
||||
**Java后台**:https://gitee.com/beijing_hongye_huicheng/lilishop.git
|
||||
gitee : https://gitee.com/beijing_hongye_huicheng
|
||||
|
||||
**Vue后台前端**: https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
|
||||
github 镜像: https://github.com/lilishop?tab=repositories
|
||||
|
||||
**Uni-app**:https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
|
||||
商城UI 项目下3个文件夹
|
||||
buyer:买家PC端,seller:商家端,manager:后台管理端
|
||||
|
||||
**docker一键部署**:https://gitee.com/beijing_hongye_huicheng/docker.git
|
||||
|
||||
### 💧 项目链接(github)
|
||||
### 演示地址
|
||||
PS:手机验证码为 ‘111111’
|
||||
|
||||
**Java后台**:https://github.com/hongyehuicheng/lilishop.git
|
||||
**平台管理端**:https://admin-b2b2c.pickmall.cn 账号:admin/123456
|
||||
|
||||
**Vue后台前端**: https://github.com/hongyehuicheng/lilishop-ui.git
|
||||
**店铺管理端**:https://store-b2b2c.pickmall.cn 账号:13011111111/111111
|
||||
|
||||
**Uni-app**:https://github.com/hongyehuicheng/lilishop-uniapp.git
|
||||
**商城PC页面**:https://pc-b2b2c.pickmall.cn
|
||||
|
||||
**docker一键部署**:https://github.com/hongyehuicheng/docker.git
|
||||
|
||||
### 💧 演示地址(手机验证码为 ‘111111’)
|
||||
|
||||
**运营后台**:https://admin-b2b2c.pickmall.cn 账号:admin/123456
|
||||
|
||||
**店铺后台**:https://store-b2b2c.pickmall.cn 账号:13011111111/111111
|
||||
|
||||
**PC**:https://pc-b2b2c.pickmall.cn
|
||||
|
||||
**WAP**:https://m-b2b2c.pickmall.cn
|
||||
|
||||
**小程序/公众号**:扫描二维码
|
||||
**商城 小程序/公众号/APP**:扫描二维码
|
||||
|
||||

|
||||
|
||||
### 🚙 3行命令搭建本地运行环境
|
||||
### 快速部署本地商城
|
||||
|
||||
温馨提示:由于服务中间件较多,如果笔记本环境启动内存没有32g可能无法启动成功(macbookpro 2020 16g内存启动无法成功),台式机在16g内存、AMD 3700x 的ubuntu系统成功运行。
|
||||
[点击跳转](https://docs.pickmall.cn/deploy/%E8%BF%90%E8%A1%8C%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87.html)
|
||||
|
||||
**商城数据库**
|
||||
使用docker-compose部署数据库,自动初始化数据库,不需要手动下载等操作
|
||||
|
||||
如果手动部署,才需要获取sql [点击跳转](https://gitee.com/beijing_hongye_huicheng/docker/tree/master/init/mysql) (PS:这里有与tag版本一致的sql,如果是历史版本,则docker项目也切换至历史版本获取sql即可,历史版本升级则根据java相聚的根目录DB目录下的升级sql,按需执行)。
|
||||
|
||||
|
||||
|
||||
##### docker环境安装 [点击跳转](https://docs.pickmall.cn/deploy/%E4%B8%80%E9%94%AE%E9%83%A8%E7%BD%B2.html)
|
||||
### 功能列表
|
||||
|
||||
|
||||
|
||||
##### 下载docker-compose脚本
|
||||
`git clone https://gitee.com/beijing_hongye_huicheng/docker.git `
|
||||
#### 平台管理端功能
|
||||
|
||||
##### 部署基础环境
|
||||
`docker-compose up -d`
|
||||
|
||||
##### 部署应用
|
||||
`docker-compose -f docker-compose-application.yml up -d`
|
||||

|
||||
|
||||
|
||||
|
||||
PS:单独部署的话,点击跳转 https://gitee.com/beijing_hongye_huicheng/docker/tree/master/init/mysql 这里有与tag版本一致的sql,根据tag获取sql,如果使用master代码,则需要在lilishop项目根目录的update-sql目录中,获取对应的升级sql。
|
||||
|
||||
##### 商城 API/UI 地址
|
||||
|
||||
| API | 地址 |
|
||||
| -------------- | --------------- |
|
||||
| 商城买家API | http://127.0.0.1:8888 |
|
||||
| 商城商家API | http://127.0.0.1:8889 |
|
||||
| 商城管理端API | http://127.0.0.1:8887 |
|
||||
| 商城基础API | http://127.0.0.1:8890 |
|
||||
|
||||
| 前端演示 | 地址 |
|
||||
| -------------- | --------------- |
|
||||
| 商城PC端 | http://127.0.0.1:10000 |
|
||||
| 商城WAP端 | http://127.0.0.1:10001 |
|
||||
| 商城卖家端 | http://127.0.0.1:10002 |
|
||||
| 商城管理端 | http://127.0.0.1:10003 |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### ⚾️ 功能列表
|
||||
|
||||
|
||||
|
||||
#### 🥎 商城平台功能
|
||||
|
||||

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

|
||||
|
||||
|
||||
### 商城前端功能展示
|
||||
|
||||
|
||||
|
||||
### 🧩 商城前端功能展示
|
||||
|
||||
|
||||
|
||||
#### ⚽️ 商城移动端
|
||||
#### 商城移动端
|
||||
|
||||
<img src="https://pickmall.cn/assets/imgs/other/app.gif" alt="移动端功能展示" style="zoom:50%;" />
|
||||
|
||||
|
||||
|
||||
#### ⚽️ 商城管理端
|
||||
#### 平台管理端
|
||||
|
||||

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

|
||||

|
||||
|
||||
##### 🕹 后台技术选型
|
||||
##### 后台技术选型
|
||||
|
||||
| 说明 | 框架 | 说明 | |
|
||||
| -------------- | --------------- | -------------- | ------------- |
|
||||
@@ -171,7 +118,7 @@ PS:单独部署的话,点击跳转 https://gitee.com/beijing_hongye_huicheng/d
|
||||
| 短信 | 阿里云短信 | 认证 | JWT |
|
||||
| 日志处理 | Log4j | 接口规范 | RESTful |
|
||||
|
||||
##### 🖥 前端-运营后台、店铺后台
|
||||
##### 前端-运营后台、店铺后台
|
||||
|
||||
| 说明 | 框架 | 说明 | 框架 |
|
||||
| ---------- | ---------- | ---------- | ------- |
|
||||
@@ -181,23 +128,23 @@ PS:单独部署的话,点击跳转 https://gitee.com/beijing_hongye_huicheng/d
|
||||
| 基础UI库 | iView | UI界面基于 | iView |
|
||||
| 网络请求 | axios | | |
|
||||
|
||||
##### 📱前端-移动端
|
||||
##### 前端-移动端
|
||||
|
||||
| 说明 | 架构 | 说明 | 架构 |
|
||||
| --------- | ------- | -------- | ------- |
|
||||
| 基础UI库 | uViewui | 基础框架 | uni-app |
|
||||
| CSS预处理 | scss | 地图引擎 | amap |
|
||||
|
||||
### 🌟 版本升级
|
||||
### 版本升级
|
||||
|
||||
```
|
||||
商城后续会持续版本升级,修复bug,完善功能,覆盖更多业务场景 o2o/b2b/s2b2b2c/跨境电商
|
||||
|
||||
后续会考虑推出微服务商城系统/中台商城等
|
||||
后续会考虑推出微服务商城系统/商城中台等
|
||||
```
|
||||
|
||||
|
||||
### ⚠️ 开源须知
|
||||
### 开源须知
|
||||
1.仅允许用于个人学习研究使用.
|
||||
|
||||
2.禁止将本开源的代码和资源进行任何形式任何名义的出售.
|
||||
@@ -207,7 +154,7 @@ PS:单独部署的话,点击跳转 https://gitee.com/beijing_hongye_huicheng/d
|
||||
4.限制商用,如果需要商业使用请联系我们。QQ3409056806.
|
||||
|
||||
|
||||
### 🐧 交流群
|
||||
### 交流群
|
||||
|
||||
##### 官方qq 1群 961316482(已满)
|
||||
##### 官方qq 2群 875294241
|
||||
|
||||
@@ -27,6 +27,11 @@
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-security</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.logstash.logback</groupId>
|
||||
<artifactId>logstash-logback-encoder</artifactId>
|
||||
<version>${logstash-logback-encoder}</version>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>org.springframework.boot</groupId>-->
|
||||
<!-- <artifactId>spring-boot-starter-mail</artifactId>-->
|
||||
|
||||
@@ -4,9 +4,10 @@
|
||||
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
|
||||
<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>
|
||||
<!--应用名称-->
|
||||
<property name="APP_NAME" value="seller-api"/>
|
||||
<springProperty scope="context" name="APP_NAME" source="spring.application.name"/>
|
||||
<!--日志文件保存路径-->
|
||||
<property name="LOG_FILE_PATH" value="lili-logs"/>
|
||||
<springProperty scope="context" name="LOG_FILE_PATH" source="logging.file.path"/>
|
||||
<springProperty scope="context" name="LOGSTASH_SERVER" source="lili.data.logstash.server"/>
|
||||
<contextName>${APP_NAME}</contextName>
|
||||
|
||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
@@ -22,7 +23,7 @@
|
||||
<!--输出到elk的LOGSTASH-->
|
||||
<appender name="LOGSTASH" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
|
||||
<!-- 配置elk日志收集 配饰的是 LOGSTASH 的地址-->
|
||||
<destination>127.0.0.1:4560</destination>
|
||||
<destination>${LOGSTASH_SERVER}</destination>
|
||||
<encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder">
|
||||
<providers>
|
||||
<timestamp>
|
||||
@@ -1,4 +1,4 @@
|
||||
package cn.lili.controller.other.distribution;
|
||||
package cn.lili.controller.distribution;
|
||||
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
@@ -24,7 +24,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,分销员接口")
|
||||
@RequestMapping("/buyer/distribution")
|
||||
@RequestMapping("/buyer/distribution/distribution")
|
||||
public class DistributionBuyerController {
|
||||
|
||||
/**
|
||||
@@ -1,5 +1,6 @@
|
||||
package cn.lili.controller.other.distribution;
|
||||
package cn.lili.controller.distribution;
|
||||
|
||||
import cn.lili.common.aop.annotation.PreventDuplicateSubmissions;
|
||||
import cn.lili.common.enums.ResultCode;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.exception.ServiceException;
|
||||
@@ -13,6 +14,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.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -33,6 +35,7 @@ import javax.validation.constraints.NotNull;
|
||||
@RestController
|
||||
@Api(tags = "买家端,分销商品佣金提现接口")
|
||||
@RequestMapping("/buyer/distribution/cash")
|
||||
@Validated
|
||||
public class DistributionCashBuyerController {
|
||||
|
||||
/**
|
||||
@@ -47,15 +50,16 @@ public class DistributionCashBuyerController {
|
||||
private DistributionCashService distributorCashService;
|
||||
|
||||
|
||||
@PreventDuplicateSubmissions
|
||||
@ApiOperation(value = "分销员提现")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "price", value = "申请金额", required = true, paramType = "query", dataType = "double")
|
||||
})
|
||||
@PostMapping
|
||||
public ResultMessage<Object> cash(@Max(value = 1000, message = "提现金额单次最多允许提现1000元")
|
||||
public ResultMessage<Object> cash(@Validated @Max(value = 9999, message = "提现金额单次最多允许提现9999元")
|
||||
@Min(value = 1, message = "提现金额单次最少提现金额为1元")
|
||||
@NotNull @ApiIgnore Double price) {
|
||||
if (distributionCashService.cash(price)) {
|
||||
if (Boolean.TRUE.equals(distributionCashService.cash(price))) {
|
||||
return ResultUtil.success();
|
||||
}
|
||||
throw new ServiceException(ResultCode.ERROR);
|
||||
@@ -1,5 +1,6 @@
|
||||
package cn.lili.controller.other.distribution;
|
||||
package cn.lili.controller.distribution;
|
||||
|
||||
import cn.lili.common.aop.annotation.PreventDuplicateSubmissions;
|
||||
import cn.lili.common.enums.ResultCode;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.exception.ServiceException;
|
||||
@@ -29,7 +30,7 @@ import javax.validation.constraints.NotNull;
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,分销商品接口")
|
||||
@RequestMapping("/buyer/distributionGoods")
|
||||
@RequestMapping("/buyer/distribution/goods")
|
||||
public class DistributionGoodsBuyerController {
|
||||
|
||||
/**
|
||||
@@ -50,6 +51,7 @@ public class DistributionGoodsBuyerController {
|
||||
return ResultUtil.data(distributionGoodsService.goodsPage(distributionGoodsSearchParams));
|
||||
}
|
||||
|
||||
@PreventDuplicateSubmissions
|
||||
@ApiOperation(value = "选择分销商品")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "distributionGoodsId", value = "分销ID", required = true, dataType = "String", paramType = "path"),
|
||||
@@ -1,4 +1,4 @@
|
||||
package cn.lili.controller.other.distribution;
|
||||
package cn.lili.controller.distribution;
|
||||
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
@@ -25,7 +25,7 @@ import java.util.List;
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,商品分类接口")
|
||||
@RequestMapping("/buyer/category")
|
||||
@RequestMapping("/buyer/goods/category")
|
||||
public class CategoryBuyerController {
|
||||
/**
|
||||
* 商品分类
|
||||
|
||||
@@ -43,7 +43,7 @@ import java.util.Map;
|
||||
@Slf4j
|
||||
@Api(tags = "买家端,商品接口")
|
||||
@RestController
|
||||
@RequestMapping("/buyer/goods")
|
||||
@RequestMapping("/buyer/goods/goods")
|
||||
public class GoodsBuyerController {
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.util.List;
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,浏览历史接口")
|
||||
@RequestMapping("/buyer/footprint")
|
||||
@RequestMapping("/buyer/member/footprint")
|
||||
public class FootprintController {
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
package cn.lili.controller.member;
|
||||
|
||||
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.member.entity.dos.MemberAddress;
|
||||
import cn.lili.modules.promotion.service.MemberAddressService;
|
||||
import cn.lili.modules.member.service.MemberAddressService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
@@ -14,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
/**
|
||||
@@ -24,7 +26,7 @@ import javax.validation.Valid;
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,会员地址接口")
|
||||
@RequestMapping("/buyer/memberAddress")
|
||||
@RequestMapping("/buyer/member/address")
|
||||
public class MemberAddressBuyerController {
|
||||
|
||||
/**
|
||||
@@ -56,7 +58,7 @@ public class MemberAddressBuyerController {
|
||||
@PostMapping
|
||||
public ResultMessage<MemberAddress> addShippingAddress(@Valid MemberAddress shippingAddress) {
|
||||
//添加会员地址
|
||||
shippingAddress.setMemberId(UserContext.getCurrentUser().getId());
|
||||
shippingAddress.setMemberId(Objects.requireNonNull(UserContext.getCurrentUser()).getId());
|
||||
if(shippingAddress.getIsDefault()==null){
|
||||
shippingAddress.setIsDefault(false);
|
||||
}
|
||||
@@ -66,11 +68,6 @@ public class MemberAddressBuyerController {
|
||||
@ApiOperation(value = "修改会员收件地址")
|
||||
@PutMapping
|
||||
public ResultMessage<MemberAddress> editShippingAddress(@Valid MemberAddress shippingAddress) {
|
||||
//修改会员地址
|
||||
shippingAddress.setMemberId(UserContext.getCurrentUser().getId());
|
||||
if(shippingAddress.getIsDefault()==null){
|
||||
shippingAddress.setIsDefault(false);
|
||||
}
|
||||
return ResultUtil.data(memberAddressService.updateMemberAddress(shippingAddress));
|
||||
}
|
||||
|
||||
@@ -78,6 +75,7 @@ public class MemberAddressBuyerController {
|
||||
@ApiImplicitParam(name = "id", value = "会员地址ID", dataType = "String", paramType = "path")
|
||||
@DeleteMapping(value = "/delById/{id}")
|
||||
public ResultMessage<Object> delShippingAddressById(@PathVariable String id) {
|
||||
OperationalJudgment.judgment(memberAddressService.getById(id));
|
||||
memberAddressService.removeMemberAddress(id);
|
||||
return ResultUtil.success();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package cn.lili.controller.member;
|
||||
|
||||
import cn.lili.common.aop.annotation.PreventDuplicateSubmissions;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.enums.SwitchEnum;
|
||||
import cn.lili.common.security.context.UserContext;
|
||||
@@ -28,7 +29,7 @@ import javax.validation.constraints.NotNull;
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,会员商品评价接口")
|
||||
@RequestMapping("/buyer/memberEvaluation")
|
||||
@RequestMapping("/buyer/member/evaluation")
|
||||
public class MemberEvaluationBuyerController {
|
||||
|
||||
/**
|
||||
@@ -37,10 +38,11 @@ public class MemberEvaluationBuyerController {
|
||||
@Autowired
|
||||
private MemberEvaluationService memberEvaluationService;
|
||||
|
||||
@PreventDuplicateSubmissions
|
||||
@ApiOperation(value = "添加会员评价")
|
||||
@PostMapping
|
||||
public ResultMessage<MemberEvaluationDTO> save(@Valid MemberEvaluationDTO memberEvaluationDTO) {
|
||||
return ResultUtil.data(memberEvaluationService.addMemberEvaluation(memberEvaluationDTO));
|
||||
return ResultUtil.data(memberEvaluationService.addMemberEvaluation(memberEvaluationDTO, true));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查看会员评价详情")
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package cn.lili.controller.member;
|
||||
|
||||
import cn.lili.common.aop.annotation.PreventDuplicateSubmissions;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.member.entity.dos.MemberSign;
|
||||
@@ -27,6 +28,8 @@ public class MemberSignBuyerController {
|
||||
@Autowired
|
||||
private MemberSignService memberSignService;
|
||||
|
||||
|
||||
@PreventDuplicateSubmissions
|
||||
@PostMapping
|
||||
@ApiOperation(value = "会员签到")
|
||||
public ResultMessage<Boolean> memberSign() {
|
||||
|
||||
@@ -1,57 +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.system.entity.dos.ServiceNotice;
|
||||
import cn.lili.modules.system.service.ServiceNoticeService;
|
||||
import cn.lili.mybatis.util.PageUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
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;
|
||||
|
||||
|
||||
/**
|
||||
* 买家端,会员站服务消息接口
|
||||
*
|
||||
* @author Chopper
|
||||
* @since 2020/11/17 2:31 下午
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/service/notice")
|
||||
@Api(tags = "买家端,会员站服务消息接口")
|
||||
public class ServiceNoticeBuyerController {
|
||||
|
||||
/**
|
||||
* 服务消息
|
||||
*/
|
||||
@Autowired
|
||||
private ServiceNoticeService serviceNoticeService;
|
||||
|
||||
@ApiOperation(value = "获取消息详情")
|
||||
@ApiImplicitParam(name = "id", value = "商品ID", required = true, dataType = "Long", paramType = "path")
|
||||
@GetMapping(value = "/{id}")
|
||||
public ResultMessage<ServiceNotice> get(@PathVariable String id) {
|
||||
ServiceNotice serviceNotice = serviceNoticeService.getById(id);
|
||||
return ResultUtil.data(serviceNotice);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "分页获取服务消息")
|
||||
@GetMapping
|
||||
@ApiImplicitParam(name = "storeId", value = "商家id,默认为-1,代表平台消息,如果查询某商家发布的消息,传递商家id即可", dataType = "int", paramType = "query")
|
||||
public ResultMessage<IPage<ServiceNotice>> getByPage(PageVO page, String storeId) {
|
||||
ServiceNotice serviceNotice = new ServiceNotice();
|
||||
if (storeId == null) {
|
||||
storeId = "-1";
|
||||
}
|
||||
serviceNotice.setStoreId(storeId);
|
||||
IPage<ServiceNotice> data = serviceNoticeService.page(PageUtil.initPage(page));
|
||||
return ResultUtil.data(data);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package cn.lili.controller.member;
|
||||
package cn.lili.controller.message;
|
||||
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.security.context.UserContext;
|
||||
@@ -23,7 +23,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,会员站内消息接口")
|
||||
@RequestMapping("/buyer/member/message")
|
||||
@RequestMapping("/buyer/message/member")
|
||||
public class MemberMessageBuyerController {
|
||||
|
||||
/**
|
||||
@@ -1,17 +1,19 @@
|
||||
package cn.lili.controller.trade;
|
||||
package cn.lili.controller.order;
|
||||
|
||||
import cn.lili.common.aop.annotation.PreventDuplicateSubmissions;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.security.OperationalJudgment;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.order.order.entity.dos.AfterSale;
|
||||
import cn.lili.modules.order.order.entity.dos.AfterSaleReason;
|
||||
import cn.lili.modules.order.order.entity.dto.AfterSaleDTO;
|
||||
import cn.lili.modules.order.order.entity.vo.AfterSaleApplyVO;
|
||||
import cn.lili.modules.order.order.entity.vo.AfterSaleSearchParams;
|
||||
import cn.lili.modules.order.order.entity.vo.AfterSaleVO;
|
||||
import cn.lili.modules.order.order.service.AfterSaleLogService;
|
||||
import cn.lili.modules.order.order.service.AfterSaleReasonService;
|
||||
import cn.lili.modules.order.order.service.AfterSaleService;
|
||||
import cn.lili.modules.order.trade.entity.dos.AfterSaleLog;
|
||||
import cn.lili.modules.order.aftersale.entity.dos.AfterSale;
|
||||
import cn.lili.modules.order.aftersale.entity.dos.AfterSaleLog;
|
||||
import cn.lili.modules.order.aftersale.entity.dos.AfterSaleReason;
|
||||
import cn.lili.modules.order.aftersale.entity.dto.AfterSaleDTO;
|
||||
import cn.lili.modules.order.aftersale.entity.vo.AfterSaleApplyVO;
|
||||
import cn.lili.modules.order.aftersale.entity.vo.AfterSaleSearchParams;
|
||||
import cn.lili.modules.order.aftersale.entity.vo.AfterSaleVO;
|
||||
import cn.lili.modules.order.aftersale.service.AfterSaleLogService;
|
||||
import cn.lili.modules.order.aftersale.service.AfterSaleReasonService;
|
||||
import cn.lili.modules.order.aftersale.service.AfterSaleService;
|
||||
import cn.lili.modules.store.entity.dto.StoreAfterSaleAddressDTO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -34,7 +36,7 @@ import java.util.List;
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,售后管理接口")
|
||||
@RequestMapping("/buyer/afterSale")
|
||||
@RequestMapping("/buyer/order/afterSale")
|
||||
public class AfterSaleBuyerController {
|
||||
|
||||
/**
|
||||
@@ -57,7 +59,8 @@ public class AfterSaleBuyerController {
|
||||
@ApiImplicitParam(name = "sn", value = "售后单号", required = true, paramType = "path")
|
||||
@GetMapping(value = "/get/{sn}")
|
||||
public ResultMessage<AfterSaleVO> get(@NotNull(message = "售后单号") @PathVariable("sn") String sn) {
|
||||
return ResultUtil.data(afterSaleService.getAfterSale(sn));
|
||||
AfterSaleVO afterSale = OperationalJudgment.judgment(afterSaleService.getAfterSale(sn));
|
||||
return ResultUtil.data(afterSale);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "分页获取售后服务")
|
||||
@@ -75,6 +78,7 @@ public class AfterSaleBuyerController {
|
||||
return ResultUtil.data(afterSaleService.getAfterSaleVO(sn));
|
||||
}
|
||||
|
||||
@PreventDuplicateSubmissions
|
||||
@PostMapping(value = "/save/{orderItemSn}")
|
||||
@ApiImplicitParam(name = "orderItemSn", value = "订单货物编号", required = true, paramType = "query")
|
||||
@ApiOperation(value = "申请售后")
|
||||
@@ -95,10 +99,11 @@ public class AfterSaleBuyerController {
|
||||
public ResultMessage<AfterSale> delivery(@NotNull(message = "售后编号不能为空") @PathVariable("afterSaleSn") String afterSaleSn,
|
||||
@NotNull(message = "发货单号不能为空") @RequestParam String logisticsNo,
|
||||
@NotNull(message = "请选择物流公司") @RequestParam String logisticsId,
|
||||
@NotNull(message = "请选择发货时间") @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date mDeliverTime) {
|
||||
@NotNull(message = "请选择发货时间") @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date mDeliverTime) {
|
||||
return ResultUtil.data(afterSaleService.buyerDelivery(afterSaleSn, logisticsNo, logisticsId, mDeliverTime));
|
||||
}
|
||||
|
||||
@PreventDuplicateSubmissions
|
||||
@ApiOperation(value = "售后,取消售后")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "afterSaleSn", value = "售后sn", required = true, dataType = "String", paramType = "path")
|
||||
@@ -1,8 +1,9 @@
|
||||
package cn.lili.controller.trade;
|
||||
package cn.lili.controller.order;
|
||||
|
||||
import cn.lili.common.aop.annotation.PreventDuplicateSubmissions;
|
||||
import cn.lili.common.enums.ResultCode;
|
||||
import cn.lili.common.exception.ServiceException;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.exception.ServiceException;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.order.cart.entity.dto.TradeDTO;
|
||||
import cn.lili.modules.order.cart.entity.enums.CartTypeEnum;
|
||||
@@ -235,6 +236,7 @@ public class CartController {
|
||||
}
|
||||
|
||||
|
||||
@PreventDuplicateSubmissions
|
||||
@ApiOperation(value = "创建交易")
|
||||
@PostMapping(value = "/create/trade", consumes = "application/json", produces = "application/json")
|
||||
public ResultMessage<Object> crateTrade(@RequestBody TradeParams tradeParams) {
|
||||
@@ -246,7 +248,7 @@ public class CartController {
|
||||
throw se;
|
||||
} catch (Exception e) {
|
||||
log.error(ResultCode.ORDER_ERROR.message(), e);
|
||||
throw new ServiceException(ResultCode.ORDER_ERROR);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,12 @@
|
||||
package cn.lili.controller.trade;
|
||||
package cn.lili.controller.order;
|
||||
|
||||
import cn.lili.common.aop.annotation.PreventDuplicateSubmissions;
|
||||
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.OperationalJudgment;
|
||||
import cn.lili.common.security.context.UserContext;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.order.order.entity.dos.Order;
|
||||
import cn.lili.modules.order.order.entity.dto.OrderSearchParams;
|
||||
@@ -23,6 +25,7 @@ import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 买家端,订单接口
|
||||
@@ -32,7 +35,7 @@ import javax.validation.constraints.NotNull;
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,订单接口")
|
||||
@RequestMapping("/buyer/orders")
|
||||
@RequestMapping("/buyer/order/order")
|
||||
public class OrderBuyerController {
|
||||
|
||||
/**
|
||||
@@ -44,7 +47,7 @@ public class OrderBuyerController {
|
||||
@ApiOperation(value = "查询会员订单列表")
|
||||
@GetMapping
|
||||
public ResultMessage<IPage<OrderSimpleVO>> queryMineOrder(OrderSearchParams orderSearchParams) {
|
||||
AuthUser currentUser = UserContext.getCurrentUser();
|
||||
AuthUser currentUser = Objects.requireNonNull(UserContext.getCurrentUser());
|
||||
orderSearchParams.setMemberId(currentUser.getId());
|
||||
return ResultUtil.data(orderService.queryByParams(orderSearchParams));
|
||||
}
|
||||
@@ -55,9 +58,12 @@ public class OrderBuyerController {
|
||||
})
|
||||
@GetMapping(value = "/{orderSn}")
|
||||
public ResultMessage<OrderDetailVO> detail(@NotNull(message = "订单编号不能为空") @PathVariable("orderSn") String orderSn) {
|
||||
return ResultUtil.data(orderService.queryDetail(orderSn));
|
||||
OrderDetailVO orderDetailVO = orderService.queryDetail(orderSn);
|
||||
OperationalJudgment.judgment(orderDetailVO.getOrder());
|
||||
return ResultUtil.data(orderDetailVO);
|
||||
}
|
||||
|
||||
@PreventDuplicateSubmissions
|
||||
@ApiOperation(value = "确认收货")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "orderSn", value = "订单编号", required = true, paramType = "path")
|
||||
@@ -76,6 +82,7 @@ public class OrderBuyerController {
|
||||
return ResultUtil.success();
|
||||
}
|
||||
|
||||
@PreventDuplicateSubmissions
|
||||
@ApiOperation(value = "取消订单")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "orderSn", value = "订单编号", required = true, dataType = "String", paramType = "path"),
|
||||
@@ -87,12 +94,14 @@ public class OrderBuyerController {
|
||||
return ResultUtil.success();
|
||||
}
|
||||
|
||||
@PreventDuplicateSubmissions
|
||||
@ApiOperation(value = "删除订单")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "orderSn", value = "订单编号", required = true, dataType = "String", paramType = "path")
|
||||
})
|
||||
@DeleteMapping(value = "/{orderSn}")
|
||||
public ResultMessage<Object> deleteOrder(@PathVariable String orderSn) {
|
||||
OperationalJudgment.judgment(orderService.getBySn(orderSn));
|
||||
orderService.deleteOrder(orderSn);
|
||||
return ResultUtil.success();
|
||||
}
|
||||
@@ -103,16 +112,19 @@ public class OrderBuyerController {
|
||||
})
|
||||
@PostMapping(value = "/getTraces/{orderSn}")
|
||||
public ResultMessage<Object> getTraces(@NotBlank(message = "订单编号不能为空") @PathVariable String orderSn) {
|
||||
OperationalJudgment.judgment(orderService.getBySn(orderSn));
|
||||
return ResultUtil.data(orderService.getTraces(orderSn));
|
||||
}
|
||||
|
||||
|
||||
@PreventDuplicateSubmissions
|
||||
@ApiOperation(value = "开票")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "orderSn", value = "订单编号", required = true, dataType = "String", paramType = "path")
|
||||
})
|
||||
@PostMapping(value = "/receipt/{orderSn}")
|
||||
public ResultMessage<Object> invoice(@NotBlank(message = "订单编号不能为空") @PathVariable String orderSn) {
|
||||
OperationalJudgment.judgment(orderService.getBySn(orderSn));
|
||||
return ResultUtil.data(orderService.invoice(orderSn));
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package cn.lili.controller.trade;
|
||||
package cn.lili.controller.order;
|
||||
|
||||
import cn.lili.common.aop.annotation.PreventDuplicateSubmissions;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.security.AuthUser;
|
||||
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;
|
||||
@@ -22,6 +24,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 买家端,交易投诉接口
|
||||
@@ -31,7 +34,7 @@ import javax.validation.Valid;
|
||||
**/
|
||||
@RestController
|
||||
@Api(tags = "买家端,交易投诉接口")
|
||||
@RequestMapping("/buyer/complain")
|
||||
@RequestMapping("/buyer/order/complain")
|
||||
public class OrderComplaintBuyerController {
|
||||
|
||||
/**
|
||||
@@ -51,17 +54,20 @@ public class OrderComplaintBuyerController {
|
||||
@ApiImplicitParam(name = "id", value = "投诉单ID", required = true, paramType = "path")
|
||||
@GetMapping(value = "/{id}")
|
||||
public ResultMessage<OrderComplaintVO> get(@PathVariable String id) {
|
||||
return ResultUtil.data(orderComplaintService.getOrderComplainById(id));
|
||||
OrderComplaintVO orderComplaintVO = OperationalJudgment.judgment(orderComplaintService.getOrderComplainById(id));
|
||||
return ResultUtil.data(orderComplaintVO);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "分页获取")
|
||||
@GetMapping
|
||||
public ResultMessage<IPage<OrderComplaint>> get(OrderComplaintSearchParams searchParams, PageVO pageVO) {
|
||||
searchParams.setMemberId(UserContext.getCurrentUser().getId());
|
||||
AuthUser currentUser = Objects.requireNonNull(UserContext.getCurrentUser());
|
||||
searchParams.setMemberId(currentUser.getId());
|
||||
return ResultUtil.data(orderComplaintService.getOrderComplainByPage(searchParams, pageVO));
|
||||
|
||||
}
|
||||
|
||||
@PreventDuplicateSubmissions
|
||||
@ApiOperation(value = "添加交易投诉")
|
||||
@PostMapping
|
||||
public ResultMessage<OrderComplaint> add(@Valid OrderComplaintDTO orderComplaintDTO) {
|
||||
@@ -75,12 +81,13 @@ public class OrderComplaintBuyerController {
|
||||
})
|
||||
@PostMapping("/communication")
|
||||
public ResultMessage<OrderComplaintCommunicationVO> addCommunication(@RequestParam String complainId, @RequestParam String content) {
|
||||
AuthUser currentUser = UserContext.getCurrentUser();
|
||||
AuthUser currentUser = Objects.requireNonNull(UserContext.getCurrentUser());
|
||||
OrderComplaintCommunicationVO communicationVO = new OrderComplaintCommunicationVO(complainId, content, CommunicationOwnerEnum.BUYER.name(), currentUser.getId(), currentUser.getNickName());
|
||||
orderComplaintCommunicationService.addCommunication(communicationVO);
|
||||
return ResultUtil.data(communicationVO);
|
||||
}
|
||||
|
||||
@PreventDuplicateSubmissions
|
||||
@ApiOperation(value = "取消售后")
|
||||
@ApiImplicitParam(name = "id", value = "投诉单ID", required = true, paramType = "path")
|
||||
@PutMapping(value = "/status/{id}")
|
||||
@@ -1,5 +1,6 @@
|
||||
package cn.lili.controller.trade;
|
||||
package cn.lili.controller.order;
|
||||
|
||||
import cn.lili.common.aop.annotation.PreventDuplicateSubmissions;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.vo.PageVO;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
@@ -41,6 +42,7 @@ public class ReceiptBuyerController {
|
||||
return ResultUtil.data(this.receiptService.getReceiptData(searchParams, pageVO));
|
||||
}
|
||||
|
||||
@PreventDuplicateSubmissions
|
||||
@ApiOperation(value = "保存发票信息")
|
||||
@PostMapping
|
||||
public ResultMessage<Receipt> save(@Valid Receipt receipt) {
|
||||
@@ -1,15 +1,15 @@
|
||||
package cn.lili.controller.trade;
|
||||
package cn.lili.controller.order;
|
||||
|
||||
import cn.lili.common.aop.annotation.PreventDuplicateSubmissions;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.order.trade.entity.dos.Recharge;
|
||||
import cn.lili.modules.order.trade.service.RechargeService;
|
||||
import cn.lili.modules.wallet.entity.dos.Recharge;
|
||||
import cn.lili.modules.wallet.service.RechargeService;
|
||||
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.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@@ -26,12 +26,12 @@ import javax.validation.constraints.Min;
|
||||
@RestController
|
||||
@Api(tags = "买家端,预存款充值记录接口")
|
||||
@RequestMapping("/buyer/trade/recharge")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class RechargeTradeBuyerController {
|
||||
|
||||
@Autowired
|
||||
private RechargeService rechargeService;
|
||||
|
||||
@PreventDuplicateSubmissions
|
||||
@PostMapping
|
||||
@ApiOperation(value = "创建余额充值订单")
|
||||
@ApiImplicitParams({
|
||||
@@ -25,7 +25,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,APP版本")
|
||||
@RequestMapping("/buyer/appVersion")
|
||||
@RequestMapping("/buyer/other/appVersion")
|
||||
public class AppVersionBuyerController {
|
||||
|
||||
@Autowired
|
||||
|
||||
@@ -29,7 +29,7 @@ import java.util.List;
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,文章接口")
|
||||
@RequestMapping("/buyer/article")
|
||||
@RequestMapping("/buyer/other/article")
|
||||
public class ArticleBuyerController {
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package cn.lili.controller.other;
|
||||
|
||||
import cn.lili.common.aop.annotation.PreventDuplicateSubmissions;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.security.context.UserContext;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
@@ -12,6 +13,8 @@ import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 买家端,意见反馈接口
|
||||
*
|
||||
@@ -20,7 +23,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,意见反馈接口")
|
||||
@RequestMapping("/buyer/feedback")
|
||||
@RequestMapping("/buyer/other/feedback")
|
||||
public class FeedbackBuyerController {
|
||||
|
||||
/**
|
||||
@@ -29,9 +32,10 @@ public class FeedbackBuyerController {
|
||||
@Autowired
|
||||
private FeedbackService feedbackService;
|
||||
|
||||
@PreventDuplicateSubmissions
|
||||
@ApiOperation(value = "添加意见反馈")
|
||||
@PostMapping()
|
||||
public ResultMessage<Object> save(Feedback feedback) {
|
||||
public ResultMessage<Object> save(@Valid Feedback feedback) {
|
||||
feedback.setUserName(UserContext.getCurrentUser().getNickName());
|
||||
feedbackService.save(feedback);
|
||||
return ResultUtil.success();
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.util.List;
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,物流公司接口")
|
||||
@RequestMapping("/buyer/logistics")
|
||||
@RequestMapping("/buyer/other/logistics")
|
||||
public class LogisticsBuyerController {
|
||||
|
||||
@Autowired
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,页面接口")
|
||||
@RequestMapping("/buyer/pageData")
|
||||
@RequestMapping("/buyer/other/pageData")
|
||||
public class PageBuyerController {
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,12 +1,18 @@
|
||||
package cn.lili.controller.purchase;
|
||||
package cn.lili.controller.other.purchase;
|
||||
|
||||
import cn.lili.common.aop.annotation.PreventDuplicateSubmissions;
|
||||
import cn.lili.common.enums.ResultCode;
|
||||
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.goods.entity.dos.GoodsUnit;
|
||||
import cn.lili.modules.goods.service.GoodsUnitService;
|
||||
import cn.lili.modules.purchase.entity.dos.PurchaseOrder;
|
||||
import cn.lili.modules.purchase.entity.params.PurchaseOrderSearchParams;
|
||||
import cn.lili.modules.purchase.entity.vos.PurchaseOrderVO;
|
||||
import cn.lili.modules.purchase.service.PurchaseOrderService;
|
||||
import cn.lili.mybatis.util.PageUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
@@ -24,7 +30,7 @@ import javax.validation.constraints.NotNull;
|
||||
*/
|
||||
@Api(tags = "买家端,采购接口")
|
||||
@RestController
|
||||
@RequestMapping("/buyer/purchase")
|
||||
@RequestMapping("/buyer/other/purchase/purchase")
|
||||
public class PurchaseBuyerController {
|
||||
|
||||
/**
|
||||
@@ -33,9 +39,21 @@ public class PurchaseBuyerController {
|
||||
@Autowired
|
||||
private PurchaseOrderService purchaseOrderService;
|
||||
|
||||
@Autowired
|
||||
private GoodsUnitService goodsUnitService;
|
||||
|
||||
|
||||
@ApiOperation(value = "分页获取商品计量单位")
|
||||
@GetMapping("/goodsUnit")
|
||||
public ResultMessage<IPage<GoodsUnit>> goodsUnitPage(PageVO pageVO) {
|
||||
return ResultUtil.data(goodsUnitService.page(PageUtil.initPage(pageVO)));
|
||||
}
|
||||
|
||||
|
||||
@PreventDuplicateSubmissions
|
||||
@ApiOperation(value = "添加采购单")
|
||||
@PostMapping
|
||||
public ResultMessage<PurchaseOrderVO> addPurchaseOrderVO(PurchaseOrderVO purchaseOrderVO) {
|
||||
public ResultMessage<PurchaseOrderVO> addPurchaseOrderVO(@RequestBody PurchaseOrderVO purchaseOrderVO) {
|
||||
return ResultUtil.data(purchaseOrderService.addPurchaseOrder(purchaseOrderVO));
|
||||
}
|
||||
|
||||
@@ -59,12 +77,13 @@ public class PurchaseBuyerController {
|
||||
return ResultUtil.data(purchaseOrderService.page(purchaseOrderSearchParams));
|
||||
}
|
||||
|
||||
@PreventDuplicateSubmissions
|
||||
@ApiOperation(value = "关闭采购单")
|
||||
@ApiImplicitParam(name = "id", value = "采购单ID", required = true, dataType = "Long", paramType = "path")
|
||||
@PutMapping("/{id}")
|
||||
public ResultMessage<Object> close(@NotNull @PathVariable String id) {
|
||||
purchaseOrderService.close(id);
|
||||
return ResultUtil.success();
|
||||
return ResultUtil.success(ResultCode.SUCCESS);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,9 +1,14 @@
|
||||
package cn.lili.controller.purchase;
|
||||
package cn.lili.controller.other.purchase;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.lili.common.enums.ResultCode;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.purchase.entity.dos.PurchaseOrder;
|
||||
import cn.lili.modules.purchase.entity.dos.PurchaseQuoted;
|
||||
import cn.lili.modules.purchase.entity.vos.PurchaseQuotedVO;
|
||||
import cn.lili.modules.purchase.service.PurchaseOrderService;
|
||||
import cn.lili.modules.purchase.service.PurchaseQuotedService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
@@ -22,7 +27,7 @@ import java.util.List;
|
||||
*/
|
||||
@Api(tags = "买家端,采购报价接口")
|
||||
@RestController
|
||||
@RequestMapping("/buyer/purchaseQuoted")
|
||||
@RequestMapping("/buyer/other/purchase/purchaseQuoted")
|
||||
public class PurchaseQuotedController {
|
||||
|
||||
/**
|
||||
@@ -30,10 +35,19 @@ public class PurchaseQuotedController {
|
||||
*/
|
||||
@Autowired
|
||||
private PurchaseQuotedService purchaseQuotedService;
|
||||
/**
|
||||
* 采购单
|
||||
*/
|
||||
@Autowired
|
||||
private PurchaseOrderService purchaseOrderService;
|
||||
|
||||
@ApiOperation(value = "添加采购单报价")
|
||||
@PostMapping
|
||||
public ResultMessage<PurchaseQuoted> addPurchaseOrderVO(PurchaseQuotedVO purchaseQuotedVO) {
|
||||
public ResultMessage<PurchaseQuoted> addPurchaseOrderVO(@RequestBody PurchaseQuotedVO purchaseQuotedVO) {
|
||||
PurchaseOrder purchaseOrder=purchaseOrderService.getById(purchaseQuotedVO.getPurchaseOrderId());
|
||||
if(DateUtil.compare(purchaseOrder.getDeadline(),new DateTime())< 0){
|
||||
ResultUtil.error(ResultCode.PURCHASE_ORDER_DEADLINE_ERROR);
|
||||
}
|
||||
return ResultUtil.data(purchaseQuotedService.addPurchaseQuoted(purchaseQuotedVO));
|
||||
}
|
||||
|
||||
@@ -3,12 +3,13 @@ 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.enums.UserEnums;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.member.entity.dos.Member;
|
||||
import cn.lili.modules.member.entity.dto.MemberEditDTO;
|
||||
import cn.lili.modules.member.service.MemberService;
|
||||
import cn.lili.modules.system.sms.SmsUtil;
|
||||
import cn.lili.modules.verification.enums.VerificationEnums;
|
||||
import cn.lili.modules.sms.SmsUtil;
|
||||
import cn.lili.modules.verification.entity.enums.VerificationEnums;
|
||||
import cn.lili.modules.verification.service.VerificationService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
@@ -27,7 +28,7 @@ import javax.validation.constraints.NotNull;
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,会员接口")
|
||||
@RequestMapping("/buyer/members")
|
||||
@RequestMapping("/buyer/passport/member")
|
||||
public class MemberBuyerController {
|
||||
|
||||
@Autowired
|
||||
@@ -47,11 +48,15 @@ public class MemberBuyerController {
|
||||
public ResultMessage<Object> userLogin(@NotNull(message = "用户名不能为空") @RequestParam String username,
|
||||
@NotNull(message = "密码不能为空") @RequestParam String password,
|
||||
@RequestHeader String uuid) {
|
||||
if (verificationService.check(uuid, VerificationEnums.LOGIN)) {
|
||||
return ResultUtil.data(this.memberService.usernameLogin(username, password));
|
||||
} else {
|
||||
throw new ServiceException(ResultCode.VERIFICATION_ERROR);
|
||||
}
|
||||
verificationService.check(uuid, VerificationEnums.LOGIN);
|
||||
return ResultUtil.data(this.memberService.usernameLogin(username, password));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "注销接口")
|
||||
@PostMapping("/logout")
|
||||
public ResultMessage<Object> logout() {
|
||||
this.memberService.logout(UserEnums.MEMBER);
|
||||
return ResultUtil.success();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "短信登录接口")
|
||||
@@ -66,7 +71,7 @@ public class MemberBuyerController {
|
||||
if (smsUtil.verifyCode(mobile, VerificationEnums.LOGIN, uuid, code)) {
|
||||
return ResultUtil.data(memberService.mobilePhoneLogin(mobile));
|
||||
} else {
|
||||
throw new ServiceException(ResultCode.VERIFICATION_SMS_ERROR);
|
||||
throw new ServiceException(ResultCode.VERIFICATION_SMS_CHECKED_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,12 +89,12 @@ public class MemberBuyerController {
|
||||
@RequestHeader String uuid,
|
||||
@NotNull(message = "验证码不能为空") @RequestParam String code) {
|
||||
|
||||
boolean result = smsUtil.verifyCode(mobilePhone, VerificationEnums.REGISTER, uuid, code);
|
||||
if (result) {
|
||||
if (smsUtil.verifyCode(mobilePhone, VerificationEnums.REGISTER, uuid, code)) {
|
||||
return ResultUtil.data(memberService.register(username, password, mobilePhone));
|
||||
} else {
|
||||
throw new ServiceException(ResultCode.VERIFICATION_SMS_ERROR);
|
||||
throw new ServiceException(ResultCode.VERIFICATION_SMS_CHECKED_ERROR);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取当前登录用户接口")
|
||||
@@ -111,11 +116,11 @@ public class MemberBuyerController {
|
||||
//校验短信验证码是否正确
|
||||
if (smsUtil.verifyCode(mobile, VerificationEnums.FIND_USER, uuid, code)) {
|
||||
//校验是否通过手机号可获取会员,存在则将会员信息存入缓存,有效时间3分钟
|
||||
if (memberService.findByMobile(uuid, mobile)) {
|
||||
return ResultUtil.success();
|
||||
}
|
||||
memberService.findByMobile(uuid, mobile);
|
||||
return ResultUtil.success();
|
||||
} else {
|
||||
throw new ServiceException(ResultCode.VERIFICATION_SMS_CHECKED_ERROR);
|
||||
}
|
||||
throw new ServiceException(ResultCode.VERIFICATION_ERROR);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改密码")
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.util.List;
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,app/小程序 联合登录")
|
||||
@RequestMapping("/buyer/connect/bind")
|
||||
@RequestMapping("/buyer/passport/connect/bind")
|
||||
public class ConnectBuyerBindController {
|
||||
|
||||
@Autowired
|
||||
|
||||
@@ -2,16 +2,16 @@ package cn.lili.controller.passport.connect;
|
||||
|
||||
|
||||
import cn.lili.common.enums.ResultCode;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.exception.ServiceException;
|
||||
import cn.lili.common.security.token.Token;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.utils.UuidUtils;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.connect.entity.dto.AuthCallback;
|
||||
import cn.lili.modules.connect.entity.dto.ConnectAuthUser;
|
||||
import cn.lili.modules.connect.request.AuthRequest;
|
||||
import cn.lili.modules.connect.service.ConnectService;
|
||||
import cn.lili.modules.connect.util.ConnectUtil;
|
||||
import cn.lili.modules.connect.util.UuidUtils;
|
||||
import cn.lili.modules.member.service.MemberService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
@@ -33,7 +33,7 @@ import java.io.IOException;
|
||||
@Slf4j
|
||||
@RestController
|
||||
@Api(tags = "买家端,web联合登录")
|
||||
@RequestMapping("/buyer/connect")
|
||||
@RequestMapping("/buyer/passport/connect/connect")
|
||||
public class ConnectBuyerWebController {
|
||||
|
||||
@Autowired
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package cn.lili.controller.passport.connect;
|
||||
|
||||
import cn.lili.common.security.token.Token;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.security.token.Token;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.connect.entity.dto.WechatMPLoginParams;
|
||||
import cn.lili.modules.connect.service.ConnectService;
|
||||
import cn.lili.modules.message.entity.dos.WechatMPMessage;
|
||||
import cn.lili.modules.message.service.ShortLinkService;
|
||||
import cn.lili.modules.message.service.WechatMPMessageService;
|
||||
import cn.lili.modules.message.util.WechatMpCodeUtil;
|
||||
import cn.lili.modules.wechat.entity.dos.WechatMPMessage;
|
||||
import cn.lili.modules.wechat.service.WechatMPMessageService;
|
||||
import cn.lili.modules.wechat.util.WechatMpCodeUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -26,7 +26,7 @@ import java.util.List;
|
||||
* @since 2021/2/19 09:28
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/buyer/mini-program")
|
||||
@RequestMapping("/buyer/passport/connect/miniProgram")
|
||||
@Api(tags = "买家端,小程序登录接口")
|
||||
public class MiniProgramBuyerController {
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ import cn.lili.common.exception.ServiceException;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.payment.kit.CashierSupport;
|
||||
import cn.lili.modules.payment.kit.dto.PayParam;
|
||||
import cn.lili.modules.payment.kit.enums.PaymentClientEnum;
|
||||
import cn.lili.modules.payment.kit.enums.PaymentMethodEnum;
|
||||
import cn.lili.modules.payment.entity.enums.PaymentClientEnum;
|
||||
import cn.lili.modules.payment.entity.enums.PaymentMethodEnum;
|
||||
import cn.lili.modules.payment.kit.params.dto.CashierParam;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
@@ -30,7 +30,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
@Slf4j
|
||||
@RestController
|
||||
@Api(tags = "买家端,收银台接口")
|
||||
@RequestMapping("/buyer/cashier")
|
||||
@RequestMapping("/buyer/payment/cashier")
|
||||
public class CashierController {
|
||||
|
||||
@Autowired
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
package cn.lili.controller.payment;
|
||||
|
||||
import cn.lili.modules.payment.kit.RefundSupport;
|
||||
import cn.lili.modules.payment.kit.enums.PaymentMethodEnum;
|
||||
import cn.lili.modules.payment.entity.enums.PaymentMethodEnum;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -21,7 +20,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||
*/
|
||||
@Api(tags = "买家端,退款回调")
|
||||
@RestController
|
||||
@RequestMapping("/buyer/cashier/refund")
|
||||
@RequestMapping("/buyer/payment/cashierRefund")
|
||||
public class CashierRefundController {
|
||||
|
||||
@Autowired
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
package cn.lili.controller.member;
|
||||
package cn.lili.controller.promotion;
|
||||
|
||||
import cn.lili.common.enums.ResultCode;
|
||||
import cn.lili.common.security.context.UserContext;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.security.AuthUser;
|
||||
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.promotion.entity.dos.MemberCoupon;
|
||||
import cn.lili.modules.promotion.entity.vos.CouponSearchParams;
|
||||
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.CouponGetEnum;
|
||||
import cn.lili.modules.promotion.entity.enums.PromotionsStatusEnum;
|
||||
import cn.lili.modules.promotion.entity.vos.CouponVO;
|
||||
import cn.lili.modules.promotion.service.CouponService;
|
||||
import cn.lili.modules.promotion.service.MemberCouponService;
|
||||
@@ -22,6 +26,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 买家端,买家优惠券接口
|
||||
@@ -49,21 +54,25 @@ public class CouponBuyerController {
|
||||
@GetMapping
|
||||
@ApiOperation(value = "获取可领取优惠券列表")
|
||||
public ResultMessage<IPage<CouponVO>> getCouponList(CouponSearchParams queryParam, PageVO page) {
|
||||
IPage<CouponVO> canUseCoupons = couponService.getCanReceiveCoupons(queryParam, page);
|
||||
queryParam.setPromotionStatus(PromotionsStatusEnum.START.name());
|
||||
queryParam.setGetType(CouponGetEnum.FREE.name());
|
||||
IPage<CouponVO> canUseCoupons = couponService.pageVOFindAll(queryParam, page);
|
||||
return ResultUtil.data(canUseCoupons);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取当前会员的优惠券列表")
|
||||
@GetMapping("/getCoupons")
|
||||
public ResultMessage<IPage<MemberCoupon>> getCoupons(CouponSearchParams param, PageVO pageVo) {
|
||||
param.setMemberId(UserContext.getCurrentUser().getId());
|
||||
public ResultMessage<IPage<MemberCoupon>> getCoupons(MemberCouponSearchParams param, PageVO pageVo) {
|
||||
AuthUser currentUser = Objects.requireNonNull(UserContext.getCurrentUser());
|
||||
param.setMemberId(currentUser.getId());
|
||||
return ResultUtil.data(memberCouponService.getMemberCoupons(param, pageVo));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取当前会员的对于当前商品可使用的优惠券列表")
|
||||
@GetMapping("/canUse")
|
||||
public ResultMessage<IPage<MemberCoupon>> getCouponsByCanUse(CouponSearchParams param, Double totalPrice, PageVO pageVo) {
|
||||
param.setMemberId(UserContext.getCurrentUser().getId());
|
||||
public ResultMessage<IPage<MemberCoupon>> getCouponsByCanUse(MemberCouponSearchParams param, Double totalPrice, PageVO pageVo) {
|
||||
AuthUser currentUser = Objects.requireNonNull(UserContext.getCurrentUser());
|
||||
param.setMemberId(currentUser.getId());
|
||||
return ResultUtil.data(memberCouponService.getMemberCouponsByCanUse(param, totalPrice, pageVo));
|
||||
}
|
||||
|
||||
@@ -79,8 +88,8 @@ public class CouponBuyerController {
|
||||
})
|
||||
@GetMapping("/receive/{couponId}")
|
||||
public ResultMessage<Object> receiveCoupon(@NotNull(message = "优惠券ID不能为空") @PathVariable("couponId") String couponId) {
|
||||
memberCouponService.checkCouponLimit(couponId, UserContext.getCurrentUser().getId());
|
||||
memberCouponService.receiveCoupon(couponId, UserContext.getCurrentUser().getId(), UserContext.getCurrentUser().getNickName());
|
||||
AuthUser currentUser = Objects.requireNonNull(UserContext.getCurrentUser());
|
||||
memberCouponService.receiveBuyerCoupon(couponId, currentUser.getId(), currentUser.getNickName());
|
||||
return ResultUtil.success();
|
||||
}
|
||||
|
||||
@@ -90,7 +99,7 @@ public class CouponBuyerController {
|
||||
})
|
||||
@GetMapping(value = "/get/{id}")
|
||||
public ResultMessage<MemberCoupon> get(@NotNull(message = "优惠券ID不能为空") @PathVariable("id") String id) {
|
||||
MemberCoupon memberCoupon = memberCouponService.getById(id);
|
||||
MemberCoupon memberCoupon = OperationalJudgment.judgment(memberCouponService.getById(id));
|
||||
return ResultUtil.data(memberCoupon);
|
||||
}
|
||||
|
||||
@@ -1,16 +1,20 @@
|
||||
package cn.lili.controller.promotion;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.core.text.CharSequenceUtil;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.security.context.UserContext;
|
||||
import cn.lili.common.vo.PageVO;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.promotion.entity.dos.KanjiaActivity;
|
||||
import cn.lili.modules.promotion.entity.dos.KanjiaActivityLog;
|
||||
import cn.lili.modules.promotion.entity.dto.KanJiaActivityLogQuery;
|
||||
import cn.lili.modules.promotion.entity.dto.KanjiaActivityQuery;
|
||||
import cn.lili.modules.promotion.entity.enums.PromotionStatusEnum;
|
||||
import cn.lili.modules.promotion.entity.vos.kanjia.*;
|
||||
import cn.lili.modules.promotion.entity.dto.search.KanJiaActivityLogQuery;
|
||||
import cn.lili.modules.promotion.entity.dto.search.KanjiaActivityGoodsParams;
|
||||
import cn.lili.modules.promotion.entity.dto.search.KanjiaActivityQuery;
|
||||
import cn.lili.modules.promotion.entity.dto.search.KanjiaActivitySearchParams;
|
||||
import cn.lili.modules.promotion.entity.enums.PromotionsStatusEnum;
|
||||
import cn.lili.modules.promotion.entity.vos.kanjia.KanjiaActivityGoodsListVO;
|
||||
import cn.lili.modules.promotion.entity.vos.kanjia.KanjiaActivityGoodsVO;
|
||||
import cn.lili.modules.promotion.entity.vos.kanjia.KanjiaActivityVO;
|
||||
import cn.lili.modules.promotion.service.KanjiaActivityGoodsService;
|
||||
import cn.lili.modules.promotion.service.KanjiaActivityLogService;
|
||||
import cn.lili.modules.promotion.service.KanjiaActivityService;
|
||||
@@ -52,9 +56,9 @@ public class KanjiaGoodsActivityBuyerController {
|
||||
@ApiOperation(value = "分页获取砍价商品")
|
||||
public ResultMessage<IPage<KanjiaActivityGoodsListVO>> kanjiaActivityGoodsPage(KanjiaActivityGoodsParams kanjiaActivityGoodsParams, PageVO page) {
|
||||
// 会员端查询到的肯定是已经开始的活动商品
|
||||
kanjiaActivityGoodsParams.setPromotionStatus(PromotionStatusEnum.START.name());
|
||||
kanjiaActivityGoodsParams.setStartTime(System.currentTimeMillis());
|
||||
kanjiaActivityGoodsParams.setEndTime(System.currentTimeMillis());
|
||||
kanjiaActivityGoodsParams.setPromotionStatus(PromotionsStatusEnum.START.name());
|
||||
// kanjiaActivityGoodsParams.setStartTime(System.currentTimeMillis());
|
||||
// kanjiaActivityGoodsParams.setEndTime(System.currentTimeMillis());
|
||||
return ResultUtil.data(kanJiaActivityGoodsService.kanjiaGoodsVOPage(kanjiaActivityGoodsParams, page));
|
||||
}
|
||||
|
||||
@@ -75,7 +79,7 @@ public class KanjiaGoodsActivityBuyerController {
|
||||
@ApiOperation(value = "获取砍价活动")
|
||||
public ResultMessage<KanjiaActivityVO> getKanJiaActivity(KanjiaActivitySearchParams kanjiaActivitySearchParams) {
|
||||
//如果是非被邀请关系则填写会员ID
|
||||
if (StrUtil.isEmpty(kanjiaActivitySearchParams.getKanjiaActivityId())) {
|
||||
if (CharSequenceUtil.isEmpty(kanjiaActivitySearchParams.getKanjiaActivityId())) {
|
||||
kanjiaActivitySearchParams.setMemberId(UserContext.getCurrentUser().getId());
|
||||
}
|
||||
return ResultUtil.data(kanJiaActivityService.getKanjiaActivityVO(kanjiaActivitySearchParams));
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
package cn.lili.controller.promotion;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.lili.common.enums.PromotionTypeEnum;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.vo.PageVO;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.promotion.entity.dto.PromotionGoodsDTO;
|
||||
import cn.lili.modules.promotion.entity.enums.PromotionStatusEnum;
|
||||
import cn.lili.common.enums.PromotionTypeEnum;
|
||||
import cn.lili.modules.promotion.entity.dos.PromotionGoods;
|
||||
import cn.lili.modules.promotion.entity.dto.search.PromotionGoodsSearchParams;
|
||||
import cn.lili.modules.promotion.entity.enums.PromotionsStatusEnum;
|
||||
import cn.lili.modules.promotion.entity.vos.PintuanMemberVO;
|
||||
import cn.lili.modules.promotion.entity.vos.PintuanShareVO;
|
||||
import cn.lili.modules.promotion.entity.vos.PromotionGoodsSearchParams;
|
||||
import cn.lili.modules.promotion.service.PintuanService;
|
||||
import cn.lili.modules.promotion.service.PromotionGoodsService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -40,14 +39,13 @@ public class PintuanBuyerController {
|
||||
|
||||
@ApiOperation(value = "获取拼团商品")
|
||||
@GetMapping
|
||||
public ResultMessage<IPage<PromotionGoodsDTO>> getPintuanCategory(String goodsName, String categoryPath, PageVO pageVo) {
|
||||
public ResultMessage<IPage<PromotionGoods>> getPintuanCategory(String goodsName, String categoryPath, PageVO pageVo) {
|
||||
PromotionGoodsSearchParams searchParams = new PromotionGoodsSearchParams();
|
||||
searchParams.setGoodsName(goodsName);
|
||||
searchParams.setPromotionType(PromotionTypeEnum.PINTUAN.name());
|
||||
searchParams.setPromotionStatus(PromotionStatusEnum.START.name());
|
||||
searchParams.setPromotionStatus(PromotionsStatusEnum.START.name());
|
||||
searchParams.setCategoryPath(categoryPath);
|
||||
searchParams.setEndTime(DateUtil.date().getTime());
|
||||
return ResultUtil.data(promotionGoodsService.getPromotionGoods(searchParams, pageVo));
|
||||
return ResultUtil.data(promotionGoodsService.pageFindAll(searchParams, pageVo));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -3,8 +3,10 @@ package cn.lili.controller.promotion;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.vo.PageVO;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.promotion.entity.dos.PointsGoods;
|
||||
import cn.lili.modules.promotion.entity.dos.PointsGoodsCategory;
|
||||
import cn.lili.modules.promotion.entity.vos.PointsGoodsSearchParams;
|
||||
import cn.lili.modules.promotion.entity.dto.search.PointsGoodsSearchParams;
|
||||
import cn.lili.modules.promotion.entity.enums.PromotionsStatusEnum;
|
||||
import cn.lili.modules.promotion.entity.vos.PointsGoodsVO;
|
||||
import cn.lili.modules.promotion.service.PointsGoodsCategoryService;
|
||||
import cn.lili.modules.promotion.service.PointsGoodsService;
|
||||
@@ -35,8 +37,9 @@ public class PointsGoodsBuyerController {
|
||||
|
||||
@GetMapping
|
||||
@ApiOperation(value = "分页获取积分商品")
|
||||
public ResultMessage<IPage<PointsGoodsVO>> getPointsGoodsPage(PointsGoodsSearchParams searchParams, PageVO page) {
|
||||
IPage<PointsGoodsVO> pointsGoodsByPage = pointsGoodsService.getPointsGoodsByPage(searchParams, page);
|
||||
public ResultMessage<IPage<PointsGoods>> getPointsGoodsPage(PointsGoodsSearchParams searchParams, PageVO page) {
|
||||
searchParams.setPromotionStatus(PromotionsStatusEnum.START.name());
|
||||
IPage<PointsGoods> pointsGoodsByPage = pointsGoodsService.pageFindAll(searchParams, page);
|
||||
return ResultUtil.data(pointsGoodsByPage);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,12 +4,13 @@ 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.goods.entity.vos.StoreGoodsLabelVO;
|
||||
import cn.lili.modules.goods.service.StoreGoodsLabelService;
|
||||
import cn.lili.modules.store.entity.dto.StoreBankDTO;
|
||||
import cn.lili.modules.store.entity.dto.StoreCompanyDTO;
|
||||
import cn.lili.modules.store.entity.dto.StoreOtherInfoDTO;
|
||||
import cn.lili.modules.store.entity.vos.*;
|
||||
import cn.lili.modules.store.service.StoreDetailService;
|
||||
import cn.lili.modules.store.service.StoreGoodsLabelService;
|
||||
import cn.lili.modules.store.service.StoreService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -30,7 +31,7 @@ import java.util.List;
|
||||
* @since 2020/11/17 2:32 下午
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/buyer/store")
|
||||
@RequestMapping("/buyer/store/store")
|
||||
@Api(tags = "买家端,店铺接口")
|
||||
public class StoreBuyerController {
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package cn.lili.controller.member;
|
||||
package cn.lili.controller.wallet;
|
||||
|
||||
|
||||
import cn.lili.common.aop.annotation.PreventDuplicateSubmissions;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.security.context.UserContext;
|
||||
import cn.lili.common.vo.PageVO;
|
||||
@@ -23,7 +24,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,会员发票接口")
|
||||
@RequestMapping("/buyer/member/receipt")
|
||||
@RequestMapping("/buyer/wallet/receipt")
|
||||
public class MemberReceiptController {
|
||||
|
||||
@Autowired
|
||||
@@ -35,6 +36,7 @@ public class MemberReceiptController {
|
||||
return ResultUtil.data(memberReceiptService.getPage(memberReceiptVO, page));
|
||||
}
|
||||
|
||||
@PreventDuplicateSubmissions
|
||||
@ApiOperation(value = "新增会员发票")
|
||||
@PostMapping
|
||||
public ResultMessage<Object> add(MemberReceiptAddVO memberReceiptAddVO) {
|
||||
@@ -1,5 +1,6 @@
|
||||
package cn.lili.controller.member;
|
||||
package cn.lili.controller.wallet;
|
||||
|
||||
import cn.lili.common.aop.annotation.PreventDuplicateSubmissions;
|
||||
import cn.lili.common.enums.ResultCode;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.exception.ServiceException;
|
||||
@@ -7,12 +8,12 @@ import cn.lili.common.security.AuthUser;
|
||||
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.entity.dos.MemberWallet;
|
||||
import cn.lili.modules.member.entity.vo.MemberWalletVO;
|
||||
import cn.lili.modules.member.service.MemberService;
|
||||
import cn.lili.modules.member.service.MemberWalletService;
|
||||
import cn.lili.modules.verification.enums.VerificationEnums;
|
||||
import cn.lili.modules.verification.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 io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
@@ -34,7 +35,7 @@ import javax.validation.constraints.Pattern;
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,会员余额接口")
|
||||
@RequestMapping("/buyer/members/wallet")
|
||||
@RequestMapping("/buyer/wallet/wallet")
|
||||
public class MemberWalletBuyerController {
|
||||
|
||||
/**
|
||||
@@ -120,12 +121,13 @@ public class MemberWalletBuyerController {
|
||||
}
|
||||
|
||||
|
||||
@PreventDuplicateSubmissions
|
||||
@PostMapping(value = "/withdrawal")
|
||||
@ApiOperation(value = "会员中心余额提现")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "price", value = "提现金额", required = true, dataType = "double", paramType = "query")
|
||||
})
|
||||
public ResultMessage<Boolean> withdrawal(@Max(value = 1000, message = "充值金额单次最多允许提现1000元") @Min(value = 1, message = "充值金额单次最少提现金额为1元") Double price) {
|
||||
public ResultMessage<Boolean> withdrawal(@Max(value = 9999, message = "充值金额单次最多允许提现9999元") @Min(value = 1, message = "充值金额单次最少提现金额为1元") Double price) {
|
||||
return ResultUtil.data(memberWalletService.applyWithdrawal(price));
|
||||
}
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
package cn.lili.controller.member;
|
||||
package cn.lili.controller.wallet;
|
||||
|
||||
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.security.context.UserContext;
|
||||
import cn.lili.common.vo.PageVO;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.member.entity.dos.MemberWithdrawApply;
|
||||
import cn.lili.modules.member.entity.vo.MemberWithdrawApplyQueryVO;
|
||||
import cn.lili.modules.member.service.MemberWithdrawApplyService;
|
||||
import cn.lili.modules.wallet.entity.dos.MemberWithdrawApply;
|
||||
import cn.lili.modules.wallet.entity.vo.MemberWithdrawApplyQueryVO;
|
||||
import cn.lili.modules.wallet.service.MemberWithdrawApplyService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@@ -27,7 +26,6 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RestController
|
||||
@Api(tags = "买家端,余额提现记录接口")
|
||||
@RequestMapping("/buyer/member/withdrawApply")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class MemberWithdrawApplyBuyerController {
|
||||
@Autowired
|
||||
private MemberWithdrawApplyService memberWithdrawApplyService;
|
||||
@@ -1,17 +1,16 @@
|
||||
package cn.lili.controller.member;
|
||||
package cn.lili.controller.wallet;
|
||||
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.security.context.UserContext;
|
||||
import cn.lili.common.vo.PageVO;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.order.trade.entity.dos.Recharge;
|
||||
import cn.lili.modules.order.trade.entity.vo.RechargeQueryVO;
|
||||
import cn.lili.modules.order.trade.service.RechargeService;
|
||||
import cn.lili.modules.wallet.entity.dos.Recharge;
|
||||
import cn.lili.modules.wallet.service.RechargeService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@@ -24,8 +23,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "买家端,预存款充值记录接口")
|
||||
@RequestMapping("/buyer/member/recharge")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@RequestMapping("/buyer/wallet/recharge")
|
||||
public class RechargeBuyerController {
|
||||
|
||||
@Autowired
|
||||
@@ -1,12 +1,12 @@
|
||||
package cn.lili.controller.trade;
|
||||
package cn.lili.controller.wallet;
|
||||
|
||||
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.order.trade.entity.dos.WalletLog;
|
||||
import cn.lili.modules.order.trade.service.WalletLogService;
|
||||
import cn.lili.modules.wallet.entity.dos.WalletLog;
|
||||
import cn.lili.modules.wallet.service.WalletLogService;
|
||||
import cn.lili.mybatis.util.PageUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -3,12 +3,19 @@ server:
|
||||
|
||||
servlet:
|
||||
context-path: /
|
||||
|
||||
tomcat:
|
||||
uri-encoding: UTF-8
|
||||
threads:
|
||||
min-spare: 50
|
||||
max: 1000
|
||||
#
|
||||
# tomcat:
|
||||
# #最大链接数,默认不设置,默认是10000
|
||||
# max-connections: 6500
|
||||
# #最大等待队列长度,允许HTTP请求缓存到请求队列的最大个数,默认不限制
|
||||
# accept-count: 1000
|
||||
# threads:
|
||||
# #最少闲置
|
||||
# min-spare: 50
|
||||
# #最大线程数 ,默认是200
|
||||
# max: 800
|
||||
netty:
|
||||
connection-timeout:
|
||||
|
||||
# 与Spring Boot 2一样,默认情况下,大多数端点都不通过http公开,我们公开了所有端点。对于生产,您应该仔细选择要公开的端点。
|
||||
management:
|
||||
@@ -22,6 +29,8 @@ management:
|
||||
exposure:
|
||||
include: '*'
|
||||
spring:
|
||||
application:
|
||||
name: buyer-api
|
||||
# 要在其中注册的Spring Boot Admin Server的URL。
|
||||
boot:
|
||||
admin:
|
||||
@@ -41,17 +50,6 @@ spring:
|
||||
#关闭jackson 对json做解析
|
||||
fail-on-empty-beans: false
|
||||
|
||||
# mongodb
|
||||
data:
|
||||
mongodb:
|
||||
host: 127.0.0.1
|
||||
port: 27017
|
||||
database: lilishop
|
||||
username: root
|
||||
password: lilishop
|
||||
authentication-database: admin
|
||||
# replica-set-name: mongoreplset
|
||||
|
||||
# Redis
|
||||
redis:
|
||||
host: 127.0.0.1
|
||||
@@ -78,10 +76,10 @@ spring:
|
||||
url: jdbc:mysql://127.0.0.1:3306/lilishop?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: lilishop
|
||||
maxActive: 20
|
||||
initialSize: 5
|
||||
maxActive: 50
|
||||
initialSize: 10
|
||||
maxWait: 60000
|
||||
minIdle: 5
|
||||
minIdle: 10
|
||||
timeBetweenEvictionRunsMillis: 60000
|
||||
minEvictableIdleTimeMillis: 300000
|
||||
validationQuery: SELECT 1 FROM DUAL
|
||||
@@ -130,23 +128,23 @@ ignored:
|
||||
- /MP_verify_qSyvBPhDsPdxvOhC.txt
|
||||
- /weixin/**
|
||||
- /source/**
|
||||
- /buyer/mini-program/**
|
||||
- /buyer/cashier/**
|
||||
- /buyer/pageData/**
|
||||
- /buyer/article/**
|
||||
- /buyer/payment/cashier/**
|
||||
- /buyer/payment/cashierRefund/**
|
||||
- /buyer/other/pageData/**
|
||||
- /buyer/other/article/**
|
||||
- /buyer/goods/**
|
||||
- /buyer/category/**
|
||||
- /buyer/store
|
||||
- /buyer/store/get**
|
||||
- /buyer/store/label/get**
|
||||
- /buyer/connect/**
|
||||
- /buyer/store/**
|
||||
- /buyer/passport/connect/**
|
||||
- /buyer/members/**
|
||||
- /buyer/passport/member/**
|
||||
- /buyer/passport/member/refresh/**
|
||||
- /buyer/promotion/pintuan/**
|
||||
- /buyer/promotion/seckill/**
|
||||
- /buyer/promotion/pointsGoods/**
|
||||
- /buyer/memberEvaluation/**/goodsEvaluation
|
||||
- /buyer/memberEvaluation/**/evaluationNumber
|
||||
- /buyer/appVersion/**
|
||||
- /buyer/promotion/coupon
|
||||
- /buyer/member/evaluation/**/goodsEvaluation
|
||||
- /buyer/member/evaluation/**/evaluationNumber
|
||||
- /buyer/other/appVersion/**
|
||||
- /buyer/broadcast/studio/**
|
||||
- /druid/**
|
||||
- /swagger-ui.html
|
||||
@@ -184,19 +182,20 @@ mybatis-plus:
|
||||
|
||||
# 日志
|
||||
logging:
|
||||
config: classpath:logback-spring.xml
|
||||
# 输出级别
|
||||
level:
|
||||
cn.lili: debug
|
||||
org.hibernate: debug
|
||||
root: info
|
||||
# org.springframework: debug
|
||||
# org.springframework.data.mongodb.core: debug
|
||||
file:
|
||||
# 指定路径
|
||||
path: lili-logs
|
||||
# 最大保存天数
|
||||
max-history: 7
|
||||
# 每个文件最大大小
|
||||
max-size: 5MB
|
||||
logback:
|
||||
rollingpolicy:
|
||||
# 最大保存天数
|
||||
max-history: 7
|
||||
# 每个文件最大大小
|
||||
max-file-size: 5MB
|
||||
#加密参数
|
||||
jasypt:
|
||||
encryptor:
|
||||
|
||||
@@ -4,9 +4,10 @@
|
||||
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
|
||||
<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>
|
||||
<!--应用名称-->
|
||||
<property name="APP_NAME" value="consumer"/>
|
||||
<springProperty scope="context" name="APP_NAME" source="spring.application.name"/>
|
||||
<!--日志文件保存路径-->
|
||||
<property name="LOG_FILE_PATH" value="lili-logs"/>
|
||||
<springProperty scope="context" name="LOG_FILE_PATH" source="logging.file.path"/>
|
||||
<springProperty scope="context" name="LOGSTASH_SERVER" source="lili.data.logstash.server"/>
|
||||
<contextName>${APP_NAME}</contextName>
|
||||
|
||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
@@ -22,7 +23,7 @@
|
||||
<!--输出到elk的LOGSTASH-->
|
||||
<appender name="LOGSTASH" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
|
||||
<!-- 配置elk日志收集 配饰的是 LOGSTASH 的地址-->
|
||||
<destination>192.168.0.116:4560</destination>
|
||||
<destination>${LOGSTASH_SERVER}</destination>
|
||||
<encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder">
|
||||
<providers>
|
||||
<timestamp>
|
||||
@@ -1,40 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE configuration>
|
||||
<configuration>
|
||||
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
|
||||
<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>
|
||||
<!--应用名称-->
|
||||
<property name="APP_NAME" value="buyer-api"/>
|
||||
<!--日志文件保存路径-->
|
||||
<property name="LOG_FILE_PATH" value="lili-logs"/>
|
||||
<contextName>${APP_NAME}</contextName>
|
||||
|
||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>${LOG_FILE_PATH}/${APP_NAME}-%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<maxHistory>30</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${FILE_LOG_PATTERN}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!--输出到elk的LOGSTASH-->
|
||||
<appender name="LOGSTASH" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
|
||||
<destination>127.0.0.1:4560</destination>
|
||||
<encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder">
|
||||
<providers>
|
||||
<timestamp>
|
||||
<timeZone>UTC</timeZone>
|
||||
</timestamp>
|
||||
</providers>
|
||||
<!--自定义字段 区分项目-->
|
||||
<customFields>{"appName":"${APP_NAME}"}</customFields>
|
||||
</encoder>
|
||||
</appender>
|
||||
<root level="INFO">
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
<appender-ref ref="FILE"/>
|
||||
<appender-ref ref="LOGSTASH"/>
|
||||
</root>
|
||||
</configuration>
|
||||
@@ -25,16 +25,6 @@ spring:
|
||||
admin:
|
||||
client:
|
||||
url: http://192.168.0.116:8000
|
||||
# mongodb
|
||||
data:
|
||||
mongodb:
|
||||
host: 192.168.0.116
|
||||
port: 27017
|
||||
database: lilishop
|
||||
username: root
|
||||
password: lilishop
|
||||
authentication-database: admin
|
||||
# replica-set-name: mongoreplset
|
||||
cache:
|
||||
type: redis
|
||||
#amqp
|
||||
@@ -186,7 +176,6 @@ logging:
|
||||
cn.lili: info
|
||||
# org.hibernate: debug
|
||||
# org.springframework: debug
|
||||
# org.springframework.data.mongodb.core: debug
|
||||
file:
|
||||
# 指定路径
|
||||
path: lili-logs
|
||||
@@ -250,7 +239,8 @@ lili:
|
||||
# account:
|
||||
# username: elastic
|
||||
# password: LiLiShopES
|
||||
|
||||
logstash:
|
||||
server: 127.0.0.1:4560
|
||||
rocketmq:
|
||||
promotion-topic: lili_promotion_topic
|
||||
promotion-group: lili_promotion_group
|
||||
|
||||
@@ -2,11 +2,11 @@ package cn.lili.controller.common;
|
||||
|
||||
import cn.lili.cache.Cache;
|
||||
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.enums.ResultUtil;
|
||||
import cn.lili.common.vo.PageVO;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.common.vo.SearchVO;
|
||||
@@ -30,8 +30,8 @@ import java.util.List;
|
||||
* @since 2020/11/26 15:41
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "文件管理管理接口")
|
||||
@RequestMapping("/common/file")
|
||||
@Api(tags = "文件管理接口")
|
||||
@RequestMapping("/common/common/file")
|
||||
public class FileController {
|
||||
|
||||
@Autowired
|
||||
@@ -78,9 +78,7 @@ public class FileController {
|
||||
}
|
||||
throw new ServiceException(ResultCode.USER_AUTHORITY_ERROR);
|
||||
case MANAGER:
|
||||
if (file.getUserEnums().equals(authUser.getRole().name())) {
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new ServiceException(ResultCode.USER_AUTHORITY_ERROR);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
package cn.lili.controller.common;
|
||||
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import cn.lili.common.enums.ResultCode;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.exception.ServiceException;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.system.entity.dos.Setting;
|
||||
import cn.lili.modules.system.entity.dto.ImSetting;
|
||||
import cn.lili.modules.system.entity.enums.SettingEnum;
|
||||
import cn.lili.modules.system.service.SettingService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* IM控制器
|
||||
*
|
||||
* @author Chopper
|
||||
* @version v1.0
|
||||
* 2021-09-16 15:32
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/common/common/IM")
|
||||
@Api(tags = "IM 中心")
|
||||
public class IMController {
|
||||
|
||||
@Autowired
|
||||
private SettingService settingService;
|
||||
|
||||
@ApiOperation(value = "获取IM接口前缀")
|
||||
@GetMapping
|
||||
public ResultMessage<String> getUrl() {
|
||||
String imUrl;
|
||||
try {
|
||||
Setting imSettingVal = settingService.get(SettingEnum.IM_SETTING.name());
|
||||
ImSetting imSetting = JSONUtil.toBean(imSettingVal.getSettingValue(), ImSetting.class);
|
||||
imUrl = imSetting.getHttpUrl() + "?tenant_id=" + imSetting.getTenantId()+"&merchant_euid=";
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException(ResultCode.PLATFORM_NOT_SUPPORTED_IM);
|
||||
}
|
||||
return ResultUtil.data(imUrl);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package cn.lili.controller.member;
|
||||
package cn.lili.controller.common;
|
||||
|
||||
import cn.lili.common.utils.IpHelper;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
@@ -19,8 +19,8 @@ import javax.servlet.http.HttpServletRequest;
|
||||
* @since 2020-02-25 14:10:16
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "管理端,IP接口")
|
||||
@RequestMapping("/manager/common/ip")
|
||||
@Api(tags = "获取IP信息以及天气")
|
||||
@RequestMapping("/common/common/ip")
|
||||
public class IpInfoManagerController {
|
||||
@Autowired
|
||||
private IpHelper ipHelper;
|
||||
@@ -19,8 +19,8 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* @since 2020/11/26 15:41
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "文件管理管理接口")
|
||||
@RequestMapping("/common/logo")
|
||||
@Api(tags = "文件管理接口")
|
||||
@RequestMapping("/common/common/logo")
|
||||
public class LogoController {
|
||||
|
||||
@Autowired
|
||||
|
||||
@@ -22,7 +22,7 @@ import java.util.List;
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "地址信息接口")
|
||||
@RequestMapping("/common/region")
|
||||
@RequestMapping("/common/common/region")
|
||||
public class RegionController {
|
||||
|
||||
@Autowired
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
package cn.lili.controller.common;
|
||||
|
||||
import cn.lili.cache.limit.annotation.LimitPoint;
|
||||
import cn.lili.common.enums.ResultCode;
|
||||
import cn.lili.common.exception.ServiceException;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.modules.verification.enums.VerificationEnums;
|
||||
import cn.lili.modules.verification.service.VerificationService;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.verification.entity.enums.VerificationEnums;
|
||||
import cn.lili.modules.verification.service.VerificationService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -21,7 +19,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/common/slider")
|
||||
@RequestMapping("/common/common/slider")
|
||||
@Api(tags = "滑块验证码接口")
|
||||
public class SliderImageController {
|
||||
|
||||
@@ -32,14 +30,8 @@ public class SliderImageController {
|
||||
@GetMapping("/{verificationEnums}")
|
||||
@ApiOperation(value = "获取校验接口,一分钟同一个ip请求10次")
|
||||
public ResultMessage getSliderImage(@RequestHeader String uuid, @PathVariable VerificationEnums verificationEnums) {
|
||||
try {
|
||||
return ResultUtil.data(verificationService.createVerification(verificationEnums, uuid));
|
||||
} catch (ServiceException e) {
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
log.error("获取校验接口错误", e);
|
||||
throw new ServiceException(ResultCode.VERIFICATION_EXIST);
|
||||
}
|
||||
return ResultUtil.data(verificationService.createVerification(verificationEnums, uuid));
|
||||
|
||||
}
|
||||
|
||||
@LimitPoint(name = "slider_image", key = "verification_pre_check", limit = 600)
|
||||
|
||||
@@ -2,12 +2,11 @@ package cn.lili.controller.common;
|
||||
|
||||
import cn.lili.cache.limit.annotation.LimitPoint;
|
||||
import cn.lili.common.enums.ResultCode;
|
||||
import cn.lili.common.exception.ServiceException;
|
||||
import cn.lili.modules.system.sms.SmsUtil;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.modules.verification.enums.VerificationEnums;
|
||||
import cn.lili.modules.verification.service.VerificationService;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.sms.SmsUtil;
|
||||
import cn.lili.modules.verification.entity.enums.VerificationEnums;
|
||||
import cn.lili.modules.verification.service.VerificationService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
@@ -23,7 +22,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "短信验证码接口")
|
||||
@RequestMapping("/common/sms")
|
||||
@RequestMapping("/common/common/sms")
|
||||
public class SmsController {
|
||||
|
||||
@Autowired
|
||||
@@ -42,11 +41,8 @@ public class SmsController {
|
||||
@RequestHeader String uuid,
|
||||
@PathVariable String mobile,
|
||||
@PathVariable VerificationEnums verificationEnums) {
|
||||
if (verificationService.check(uuid, verificationEnums)) {
|
||||
smsUtil.sendSmsCode(mobile, verificationEnums, uuid);
|
||||
return ResultUtil.success(ResultCode.VERIFICATION_SEND_SUCCESS);
|
||||
} else {
|
||||
throw new ServiceException(ResultCode.VERIFICATION_SMS_EXPIRED_ERROR);
|
||||
}
|
||||
verificationService.check(uuid, verificationEnums);
|
||||
smsUtil.sendSmsCode(mobile, verificationEnums, uuid);
|
||||
return ResultUtil.success(ResultCode.VERIFICATION_SEND_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
package cn.lili.controller.common;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.core.text.CharSequenceUtil;
|
||||
import cn.lili.cache.Cache;
|
||||
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.utils.Base64DecodeMultipartFile;
|
||||
import cn.lili.common.utils.CommonUtil;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.utils.StringUtils;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.common.properties.SystemSettingProperties;
|
||||
import cn.lili.modules.file.entity.File;
|
||||
import cn.lili.modules.file.plugin.FileManagerPlugin;
|
||||
import cn.lili.modules.file.service.FileService;
|
||||
@@ -30,6 +28,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 文件上传接口
|
||||
@@ -40,7 +39,7 @@ import java.io.InputStream;
|
||||
@Slf4j
|
||||
@RestController
|
||||
@Api(tags = "文件上传接口")
|
||||
@RequestMapping("/common/upload")
|
||||
@RequestMapping("/common/common/upload")
|
||||
public class UploadController {
|
||||
|
||||
@Autowired
|
||||
@@ -52,9 +51,6 @@ public class UploadController {
|
||||
@Autowired
|
||||
private Cache cache;
|
||||
|
||||
@Autowired
|
||||
private SystemSettingProperties systemSettingProperties;
|
||||
|
||||
@ApiOperation(value = "文件上传")
|
||||
@PostMapping(value = "/file")
|
||||
public ResultMessage<Object> upload(MultipartFile file,
|
||||
@@ -68,16 +64,24 @@ public class UploadController {
|
||||
throw new ServiceException(ResultCode.USER_AUTHORITY_ERROR);
|
||||
}
|
||||
Setting setting = settingService.get(SettingEnum.OSS_SETTING.name());
|
||||
if (setting == null || StrUtil.isBlank(setting.getSettingValue())) {
|
||||
if (setting == null || CharSequenceUtil.isBlank(setting.getSettingValue())) {
|
||||
throw new ServiceException(ResultCode.OSS_NOT_EXIST);
|
||||
}
|
||||
if (file == null || CharSequenceUtil.isEmpty(file.getContentType())) {
|
||||
throw new ServiceException(ResultCode.IMAGE_FILE_EXT_ERROR);
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(base64)) {
|
||||
|
||||
if (!CharSequenceUtil.containsAny(file.getContentType().toLowerCase(), "image")) {
|
||||
throw new ServiceException(ResultCode.FILE_TYPE_NOT_SUPPORT);
|
||||
}
|
||||
|
||||
if (CharSequenceUtil.isNotBlank(base64)) {
|
||||
//base64上传
|
||||
file = Base64DecodeMultipartFile.base64Convert(base64);
|
||||
}
|
||||
String result = "";
|
||||
String fileKey = CommonUtil.rename(file.getOriginalFilename());
|
||||
String result;
|
||||
String fileKey = CommonUtil.rename(Objects.requireNonNull(file.getOriginalFilename()));
|
||||
File newFile = new File();
|
||||
try {
|
||||
InputStream inputStream = file.getInputStream();
|
||||
|
||||
@@ -22,21 +22,13 @@ management:
|
||||
exposure:
|
||||
include: '*'
|
||||
spring:
|
||||
application:
|
||||
name: common-api
|
||||
# 要在其中注册的Spring Boot Admin Server的URL。
|
||||
boot:
|
||||
admin:
|
||||
client:
|
||||
url: http://127.0.0.1:8000
|
||||
# mongodb
|
||||
data:
|
||||
mongodb:
|
||||
host: 127.0.0.1
|
||||
port: 27017
|
||||
database: lilishop
|
||||
username: root
|
||||
password: lilishop
|
||||
authentication-database: admin
|
||||
# replica-set-name: mongoreplset
|
||||
cache:
|
||||
type: redis
|
||||
# Redis
|
||||
@@ -127,24 +119,8 @@ ignored:
|
||||
- /MP_verify_qSyvBPhDsPdxvOhC.txt
|
||||
- /weixin/**
|
||||
- /source/**
|
||||
- /buyer/mini-program/**
|
||||
- /buyer/cashier/**
|
||||
- /buyer/pageData/**
|
||||
- /buyer/article/**
|
||||
- /buyer/goods/**
|
||||
- /buyer/category/**
|
||||
- /buyer/shop/**
|
||||
- /buyer/connect/**
|
||||
- /buyer/members/smsLogin
|
||||
- /buyer/members/refresh/*
|
||||
- /buyer/members/refresh**
|
||||
- /buyer/promotion/pintuan
|
||||
- /buyer/promotion/seckill
|
||||
- /buyer/memberEvaluation/**/goodsEvaluation
|
||||
- /buyer/memberEvaluation/**/evaluationNumber
|
||||
- /store/login/**
|
||||
- /manager/user/login
|
||||
- /manager/user/refresh/**
|
||||
- /common/common/slider/**
|
||||
- /common/common/sms/**
|
||||
- /druid/**
|
||||
- /swagger-ui.html
|
||||
- /doc.html
|
||||
@@ -181,19 +157,21 @@ mybatis-plus:
|
||||
|
||||
# 日志
|
||||
logging:
|
||||
config: classpath:logback-spring.xml
|
||||
# 输出级别
|
||||
level:
|
||||
cn.lili: info
|
||||
root: info
|
||||
# org.hibernate: debug
|
||||
# org.springframework: debug
|
||||
# org.springframework.data.mongodb.core: debug
|
||||
file:
|
||||
# 指定路径
|
||||
path: lili-logs
|
||||
# 最大保存天数
|
||||
max-history: 7
|
||||
# 每个文件最大大小
|
||||
max-size: 5MB
|
||||
logback:
|
||||
rollingpolicy:
|
||||
# 最大保存天数
|
||||
max-history: 7
|
||||
# 每个文件最大大小
|
||||
max-file-size: 5MB
|
||||
#加密参数
|
||||
jasypt:
|
||||
encryptor:
|
||||
@@ -272,7 +250,8 @@ lili:
|
||||
# account:
|
||||
# username: elastic
|
||||
# password: LiLiShopES
|
||||
|
||||
logstash:
|
||||
server: 127.0.0.1:4560
|
||||
rocketmq:
|
||||
promotion-topic: lili_promotion_topic
|
||||
promotion-group: lili_promotion_group
|
||||
|
||||
@@ -4,9 +4,10 @@
|
||||
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
|
||||
<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>
|
||||
<!--应用名称-->
|
||||
<property name="APP_NAME" value="common-api"/>
|
||||
<springProperty scope="context" name="APP_NAME" source="spring.application.name"/>
|
||||
<!--日志文件保存路径-->
|
||||
<property name="LOG_FILE_PATH" value="lili-logs"/>
|
||||
<springProperty scope="context" name="LOG_FILE_PATH" source="logging.file.path"/>
|
||||
<springProperty scope="context" name="LOGSTASH_SERVER" source="lili.data.logstash.server"/>
|
||||
<contextName>${APP_NAME}</contextName>
|
||||
|
||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
@@ -22,7 +23,7 @@
|
||||
<!--输出到elk的LOGSTASH-->
|
||||
<appender name="LOGSTASH" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
|
||||
<!-- 配置elk日志收集 配饰的是 LOGSTASH 的地址-->
|
||||
<destination>127.0.0.1:4560</destination>
|
||||
<destination>${LOGSTASH_SERVER}</destination>
|
||||
<encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder">
|
||||
<providers>
|
||||
<timestamp>
|
||||
@@ -28,8 +28,7 @@ spring:
|
||||
# mongodb
|
||||
data:
|
||||
mongodb:
|
||||
host: 192.168.0.116
|
||||
port: 27017
|
||||
uri: 192.168.0.116:27017
|
||||
database: lilishop
|
||||
username: root
|
||||
password: lilishop
|
||||
@@ -73,8 +72,8 @@ spring:
|
||||
url: jdbc:mysql://192.168.0.116:3306/lilishop?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: lilishop
|
||||
maxActive: 20
|
||||
initialSize: 5
|
||||
maxActive: 50
|
||||
initialSize: 20
|
||||
maxWait: 60000
|
||||
minIdle: 5
|
||||
timeBetweenEvictionRunsMillis: 60000
|
||||
@@ -125,33 +124,38 @@ ignored:
|
||||
- /MP_verify_qSyvBPhDsPdxvOhC.txt
|
||||
- /weixin/**
|
||||
- /source/**
|
||||
- /buyer/mini-program/**
|
||||
- /buyer/cashier/**
|
||||
- /buyer/pageData/**
|
||||
- /buyer/article/**
|
||||
- /store/passport/login/**
|
||||
- /store/passport/login/refresh/**
|
||||
- /common/common/slider/**
|
||||
- /common/common/sms/**
|
||||
- /buyer/payment/cashier/**
|
||||
- /buyer/other/pageData/**
|
||||
- /buyer/other/article/**
|
||||
- /buyer/goods/**
|
||||
- /buyer/category/**
|
||||
- /buyer/store/**
|
||||
- /buyer/connect/**
|
||||
- /buyer/passport/connect/**
|
||||
- /buyer/members/**
|
||||
- /buyer/passport/member/**
|
||||
- /buyer/passport/member/refresh/**
|
||||
- /buyer/promotion/pintuan/**
|
||||
- /buyer/promotion/seckill/**
|
||||
- /buyer/promotion/pointsGoods/**
|
||||
- /buyer/promotion/coupon
|
||||
- /buyer/memberEvaluation/**/goodsEvaluation
|
||||
- /buyer/memberEvaluation/**/evaluationNumber
|
||||
- /buyer/appVersion/**
|
||||
- /buyer/member/evaluation/**/goodsEvaluation
|
||||
- /buyer/member/evaluation/**/evaluationNumber
|
||||
- /buyer/other/appVersion/**
|
||||
- /buyer/broadcast/studio/**
|
||||
- /store/login/**
|
||||
- /manager/user/login
|
||||
- /manager/user/refresh/**
|
||||
- /manager/passport/user/login
|
||||
- /manager/passport/user/refresh/**
|
||||
- /manager/other/elasticsearch
|
||||
- /manager/other/customWords
|
||||
- /druid/**
|
||||
- /swagger-ui.html
|
||||
- /doc.html
|
||||
- /swagger-resources/**
|
||||
- /swagger/**
|
||||
- /webjars/**
|
||||
- /v2/api-docs
|
||||
- /v2/api-docs**
|
||||
- /configuration/ui
|
||||
- /boot-admin
|
||||
- /manager/promotion/seckill/init
|
||||
@@ -162,9 +166,9 @@ ignored:
|
||||
|
||||
# Swagger界面内容配置
|
||||
swagger:
|
||||
title: lili API接口文档
|
||||
description: lili Api Documentation
|
||||
version: 1.0.0
|
||||
title: lilishop API接口文档
|
||||
description: lilishop Api Documentation
|
||||
version: 4.2.2
|
||||
termsOfServiceUrl: https://pickmall.cn
|
||||
contact:
|
||||
name: lili
|
||||
@@ -190,11 +194,13 @@ logging:
|
||||
# org.springframework.data.mongodb.core: debug
|
||||
file:
|
||||
# 指定路径
|
||||
path: lili-logs
|
||||
# 最大保存天数
|
||||
max-history: 7
|
||||
# 每个文件最大大小
|
||||
max-size: 5MB
|
||||
path: logs
|
||||
logback:
|
||||
rollingpolicy:
|
||||
# 最大保存天数
|
||||
max-history: 7
|
||||
# 每个文件最大大小
|
||||
max-file-size: 5MB
|
||||
#加密参数
|
||||
jasypt:
|
||||
encryptor:
|
||||
@@ -227,11 +233,11 @@ lili:
|
||||
system:
|
||||
isDemoSite: false
|
||||
isTestModel: true
|
||||
# 脱敏级别:
|
||||
# 0:不做脱敏处理
|
||||
# 1:管理端用户手机号等信息脱敏
|
||||
# 2:商家端信息脱敏(为2时,表示管理端,商家端同时脱敏)
|
||||
# sensitiveLevel: 2
|
||||
# 脱敏级别:
|
||||
# 0:不做脱敏处理
|
||||
# 1:管理端用户手机号等信息脱敏
|
||||
# 2:商家端信息脱敏(为2时,表示管理端,商家端同时脱敏)
|
||||
sensitiveLevel: 1
|
||||
|
||||
statistics:
|
||||
# 在线人数统计 X 小时。这里设置48,即统计过去48小时每小时在线人数
|
||||
@@ -303,7 +309,6 @@ lili:
|
||||
notice-send-group: lili_send_notice_group
|
||||
rocketmq:
|
||||
name-server: 192.168.0.116:9876
|
||||
namesrvAddr: 192.168.0.116:9876
|
||||
isVIPChannel: false
|
||||
producer:
|
||||
group: lili_group
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
|
||||
#Thu Dec 24 11:13:34 CST 2020
|
||||
xxl-job-admin-2.3.0-SNAPSHOT.pom>=
|
||||
xxl-job-admin-2.3.0-SNAPSHOT.jar>=
|
||||
@@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<metadata modelVersion="1.1.0">
|
||||
<groupId>com.xuxueli</groupId>
|
||||
<artifactId>xxl-job-admin</artifactId>
|
||||
<version>2.3.0-SNAPSHOT</version>
|
||||
<versioning>
|
||||
<snapshot>
|
||||
<localCopy>true</localCopy>
|
||||
</snapshot>
|
||||
<lastUpdated>20201224031334</lastUpdated>
|
||||
<snapshotVersions>
|
||||
<snapshotVersion>
|
||||
<extension>jar</extension>
|
||||
<value>2.3.0-SNAPSHOT</value>
|
||||
<updated>20201224031334</updated>
|
||||
</snapshotVersion>
|
||||
<snapshotVersion>
|
||||
<extension>pom</extension>
|
||||
<value>2.3.0-SNAPSHOT</value>
|
||||
<updated>20201224031334</updated>
|
||||
</snapshotVersion>
|
||||
</snapshotVersions>
|
||||
</versioning>
|
||||
</metadata>
|
||||
Binary file not shown.
@@ -1,113 +0,0 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.xuxueli</groupId>
|
||||
<artifactId>xxl-job</artifactId>
|
||||
<version>2.3.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>xxl-job-admin</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>${spring-boot.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- starter-web:spring-webmvc + autoconfigure + logback + yaml + tomcat -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<!-- starter-test:junit + spring-test + mockito -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- freemarker-starter -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-freemarker</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- mail-starter -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-mail</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- starter-actuator -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- mybatis-starter:mybatis + mybatis-spring + hikari(default) -->
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>${mybatis-spring-boot-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- mysql -->
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>${mysql-connector-java.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- xxl-job-core -->
|
||||
<dependency>
|
||||
<groupId>com.xuxueli</groupId>
|
||||
<artifactId>xxl-job-core</artifactId>
|
||||
<version>${project.parent.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>${spring-boot.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- docker -->
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>0.4.13</version>
|
||||
<configuration>
|
||||
<!-- made of '[a-z0-9-_.]' -->
|
||||
<imageName>${project.artifactId}:${project.version}</imageName>
|
||||
<dockerDirectory>${project.basedir}</dockerDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<targetPath>/</targetPath>
|
||||
<directory>${project.build.directory}</directory>
|
||||
<include>${project.build.finalName}.jar</include>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<metadata>
|
||||
<groupId>com.xuxueli</groupId>
|
||||
<artifactId>xxl-job-admin</artifactId>
|
||||
<versioning>
|
||||
<versions>
|
||||
<version>2.3.0-SNAPSHOT</version>
|
||||
</versions>
|
||||
<lastUpdated>20201224031334</lastUpdated>
|
||||
</versioning>
|
||||
</metadata>
|
||||
@@ -1,4 +0,0 @@
|
||||
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
|
||||
#Thu Dec 24 11:13:30 CST 2020
|
||||
xxl-job-core-2.3.0-SNAPSHOT.pom>=
|
||||
xxl-job-core-2.3.0-SNAPSHOT.jar>=
|
||||
@@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<metadata modelVersion="1.1.0">
|
||||
<groupId>com.xuxueli</groupId>
|
||||
<artifactId>xxl-job-core</artifactId>
|
||||
<version>2.3.0-SNAPSHOT</version>
|
||||
<versioning>
|
||||
<snapshot>
|
||||
<localCopy>true</localCopy>
|
||||
</snapshot>
|
||||
<lastUpdated>20201224031330</lastUpdated>
|
||||
<snapshotVersions>
|
||||
<snapshotVersion>
|
||||
<extension>jar</extension>
|
||||
<value>2.3.0-SNAPSHOT</value>
|
||||
<updated>20201224031330</updated>
|
||||
</snapshotVersion>
|
||||
<snapshotVersion>
|
||||
<extension>pom</extension>
|
||||
<value>2.3.0-SNAPSHOT</value>
|
||||
<updated>20201224031330</updated>
|
||||
</snapshotVersion>
|
||||
</snapshotVersions>
|
||||
</versioning>
|
||||
</metadata>
|
||||
@@ -1,6 +0,0 @@
|
||||
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
|
||||
#Thu Dec 24 20:01:24 CST 2020
|
||||
maven-metadata-maven-central.xml/@default-maven-central-http\://central.maven.org/maven2/.lastUpdated=1608811283852
|
||||
maven-metadata-aliyun.xml.error=
|
||||
maven-metadata-maven-central.xml.error=Could not transfer metadata com.xuxueli\:xxl-job-core\:2.3.0-SNAPSHOT/maven-metadata.xml from/to maven-central (http\://central.maven.org/maven2/)\: Transfer failed for http\://central.maven.org/maven2/com/xuxueli/xxl-job-core/2.3.0-SNAPSHOT/maven-metadata.xml
|
||||
maven-metadata-aliyun.xml.lastUpdated=1608811284126
|
||||
Binary file not shown.
@@ -1,64 +0,0 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.xuxueli</groupId>
|
||||
<artifactId>xxl-job</artifactId>
|
||||
<version>2.3.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>xxl-job-core</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>${project.artifactId}</name>
|
||||
<description>A distributed task scheduling framework.</description>
|
||||
<url>https://www.xuxueli.com/</url>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- ********************** embed server: netty + gson ********************** -->
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-all</artifactId>
|
||||
<version>${netty-all.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>${gson.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- ********************** plugin ********************** -->
|
||||
<!-- groovy-all -->
|
||||
<dependency>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<artifactId>groovy</artifactId>
|
||||
<version>${groovy.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- spring-context -->
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- ********************** base ********************** -->
|
||||
<!-- slf4j -->
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>${slf4j-api.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- javax.annotation-api -->
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
<version>${javax.annotation-api.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<metadata>
|
||||
<groupId>com.xuxueli</groupId>
|
||||
<artifactId>xxl-job-core</artifactId>
|
||||
<versioning>
|
||||
<versions>
|
||||
<version>2.3.0-SNAPSHOT</version>
|
||||
</versions>
|
||||
<lastUpdated>20201224031330</lastUpdated>
|
||||
</versioning>
|
||||
</metadata>
|
||||
@@ -1,3 +0,0 @@
|
||||
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
|
||||
#Thu Dec 24 11:13:27 CST 2020
|
||||
xxl-job-2.3.0-SNAPSHOT.pom>=
|
||||
@@ -1,19 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<metadata modelVersion="1.1.0">
|
||||
<groupId>com.xuxueli</groupId>
|
||||
<artifactId>xxl-job</artifactId>
|
||||
<version>2.3.0-SNAPSHOT</version>
|
||||
<versioning>
|
||||
<snapshot>
|
||||
<localCopy>true</localCopy>
|
||||
</snapshot>
|
||||
<lastUpdated>20201224031327</lastUpdated>
|
||||
<snapshotVersions>
|
||||
<snapshotVersion>
|
||||
<extension>pom</extension>
|
||||
<value>2.3.0-SNAPSHOT</value>
|
||||
<updated>20201224031327</updated>
|
||||
</snapshotVersion>
|
||||
</snapshotVersions>
|
||||
</versioning>
|
||||
</metadata>
|
||||
@@ -1,6 +0,0 @@
|
||||
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
|
||||
#Thu Dec 24 20:01:24 CST 2020
|
||||
maven-metadata-maven-central.xml/@default-maven-central-http\://central.maven.org/maven2/.lastUpdated=1608811284134
|
||||
maven-metadata-aliyun.xml.error=
|
||||
maven-metadata-maven-central.xml.error=Could not transfer metadata com.xuxueli\:xxl-job\:2.3.0-SNAPSHOT/maven-metadata.xml from/to maven-central (http\://central.maven.org/maven2/)\: Transfer failed for http\://central.maven.org/maven2/com/xuxueli/xxl-job/2.3.0-SNAPSHOT/maven-metadata.xml
|
||||
maven-metadata-aliyun.xml.lastUpdated=1608811284273
|
||||
@@ -1,145 +0,0 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.xuxueli</groupId>
|
||||
<artifactId>xxl-job</artifactId>
|
||||
<version>2.3.0-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>${project.artifactId}</name>
|
||||
<description>A distributed task scheduling framework.</description>
|
||||
<url>https://www.xuxueli.com/</url>
|
||||
|
||||
<modules>
|
||||
<module>xxl-job-core</module>
|
||||
<module>xxl-job-admin</module>
|
||||
<module>xxl-job-executor-samples</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<maven.test.skip>true</maven.test.skip>
|
||||
|
||||
<netty-all.version>4.1.54.Final</netty-all.version>
|
||||
<gson.version>2.8.6</gson.version>
|
||||
|
||||
<spring.version>5.3.1</spring.version>
|
||||
<spring-boot.version>2.4.0</spring-boot.version>
|
||||
|
||||
<mybatis-spring-boot-starter.version>2.1.4</mybatis-spring-boot-starter.version>
|
||||
<mysql-connector-java.version>8.0.22</mysql-connector-java.version>
|
||||
|
||||
<slf4j-api.version>1.7.30</slf4j-api.version>
|
||||
<junit.version>5.7.0</junit.version>
|
||||
<javax.annotation-api.version>1.3.2</javax.annotation-api.version>
|
||||
|
||||
<groovy.version>3.0.7</groovy.version>
|
||||
|
||||
<maven-source-plugin.version>3.2.1</maven-source-plugin.version>
|
||||
<maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version>
|
||||
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
|
||||
<maven-war-plugin.version>3.3.1</maven-war-plugin.version>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
<name>GNU General Public License version 3</name>
|
||||
<url>https://opensource.org/licenses/GPL-3.0</url>
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
<scm>
|
||||
<tag>master</tag>
|
||||
<url>https://github.com/xuxueli/xxl-job.git</url>
|
||||
<connection>scm:git:https://github.com/xuxueli/xxl-job.git</connection>
|
||||
<developerConnection>scm:git:git@github.com:xuxueli/xxl-job.git</developerConnection>
|
||||
</scm>
|
||||
<developers>
|
||||
<developer>
|
||||
<id>XXL</id>
|
||||
<name>xuxueli</name>
|
||||
<email>931591021@qq.com</email>
|
||||
<url>https://github.com/xuxueli</url>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
<profiles>
|
||||
|
||||
<profile>
|
||||
<id>release</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- Source -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>${maven-source-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>jar-no-fork</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- Javadoc -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>${maven-javadoc-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<doclint>none</doclint>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- GPG -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-gpg-plugin</artifactId>
|
||||
<version>${maven-gpg-plugin.version}</version>
|
||||
<configuration>
|
||||
<useAgent>false</useAgent>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>sign</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<distributionManagement>
|
||||
<snapshotRepository>
|
||||
<id>oss</id>
|
||||
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
|
||||
</snapshotRepository>
|
||||
<repository>
|
||||
<id>oss</id>
|
||||
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
</project>
|
||||
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<metadata>
|
||||
<groupId>com.xuxueli</groupId>
|
||||
<artifactId>xxl-job</artifactId>
|
||||
<versioning>
|
||||
<versions>
|
||||
<version>2.3.0-SNAPSHOT</version>
|
||||
</versions>
|
||||
<lastUpdated>20201224031327</lastUpdated>
|
||||
</versioning>
|
||||
</metadata>
|
||||
@@ -1,5 +0,0 @@
|
||||
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
|
||||
#Sat Apr 04 19:56:05 CST 2020
|
||||
xxl-rpc-core-1.2.1.pom>aliyun=
|
||||
xxl-rpc-core-1.2.1-sources.jar>aliyun=
|
||||
xxl-rpc-core-1.2.1.jar>aliyun=
|
||||
Binary file not shown.
@@ -1,5 +0,0 @@
|
||||
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
|
||||
#Sat Apr 04 19:56:05 CST 2020
|
||||
http\://central.maven.org/maven2/.error=Could not transfer artifact com.xuxueli\:xxl-rpc-core\:jar\:sources\:1.2.1 from/to maven-central (http\://central.maven.org/maven2/)\: central.maven.org
|
||||
@default-maven-central-http\://central.maven.org/maven2/.lastUpdated=1586001364931
|
||||
http\://maven.aliyun.com/nexus/content/groups/public/.lastUpdated=1586001365245
|
||||
@@ -1,2 +0,0 @@
|
||||
|
||||
33b53883ecf6e77b8b4eafe3506e213e83b2c80a
|
||||
Binary file not shown.
@@ -1 +0,0 @@
|
||||
27f8d667b1ede36b219f36af75b493b0e6143288
|
||||
@@ -1,143 +0,0 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.xuxueli</groupId>
|
||||
<artifactId>xxl-rpc</artifactId>
|
||||
<version>1.2.1</version>
|
||||
</parent>
|
||||
<artifactId>xxl-rpc-core</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>${project.artifactId}</name>
|
||||
<description>A high performance, distributed RPC framework.</description>
|
||||
<url>http://www.xuxueli.com/</url>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- ********************** base ********************** -->
|
||||
|
||||
<!-- slf4j -->
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>${slf4j-api.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
<version>${slf4j-api.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- ********************** serialize (hessian default) ********************** -->
|
||||
|
||||
<!-- hessian -->
|
||||
<dependency>
|
||||
<groupId>com.caucho</groupId>
|
||||
<artifactId>hessian</artifactId>
|
||||
<version>${hessian.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- protostuff + objenesis (provided) -->
|
||||
<dependency>
|
||||
<groupId>io.protostuff</groupId>
|
||||
<artifactId>protostuff-core</artifactId>
|
||||
<version>${protostuff.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.protostuff</groupId>
|
||||
<artifactId>protostuff-runtime</artifactId>
|
||||
<version>${protostuff.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.objenesis</groupId>
|
||||
<artifactId>objenesis</artifactId>
|
||||
<version>${objenesis.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- jackson (provided) -->
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>${jackson.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- ********************** registry (local default) ********************** -->
|
||||
|
||||
<!-- zookeeper (provided) -->
|
||||
<dependency>
|
||||
<groupId>org.apache.zookeeper</groupId>
|
||||
<artifactId>zookeeper</artifactId>
|
||||
<version>${zookeeper.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- ********************** net (jetty default) ********************** -->
|
||||
|
||||
<!-- jetty (javax.servlet-api:3.1.0;) -->
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-server</artifactId>
|
||||
<version>${jetty-server.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-client</artifactId>
|
||||
<version>${jetty-server.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- netty (commons-pool2) -->
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-all</artifactId>
|
||||
<version>${netty.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!-- mina (commons-pool2) -->
|
||||
<dependency>
|
||||
<groupId>org.apache.mina</groupId>
|
||||
<artifactId>mina-core</artifactId>
|
||||
<version>2.0.19</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!-- commons-pool2 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-pool2</artifactId>
|
||||
<version>${commons-pool2.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- ********************** other ********************** -->
|
||||
|
||||
<!-- spring -->
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-beans</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-core</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -1,2 +0,0 @@
|
||||
|
||||
bed5b85e402f8fccf7109a3d5944f45dd5cae342
|
||||
@@ -1,3 +0,0 @@
|
||||
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
|
||||
#Mon Mar 02 16:06:40 CST 2020
|
||||
xxl-rpc-1.2.1.pom>aliyun=
|
||||
@@ -1,151 +0,0 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.xuxueli</groupId>
|
||||
<artifactId>xxl-rpc</artifactId>
|
||||
<version>1.2.1</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>${project.artifactId}</name>
|
||||
<description>A high performance, distributed RPC framework.</description>
|
||||
<url>http://www.xuxueli.com/</url>
|
||||
|
||||
<modules>
|
||||
<module>xxl-rpc-core</module>
|
||||
<!--<module>xxl-rpc-samples</module>-->
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
|
||||
<maven.compiler.source>1.7</maven.compiler.source>
|
||||
<maven.compiler.target>1.7</maven.compiler.target>
|
||||
|
||||
<maven.test.skip>true</maven.test.skip>
|
||||
|
||||
|
||||
<javax.servlet-api.version>3.1.0</javax.servlet-api.version>
|
||||
<javax.servlet.jsp-api.version>2.3.3</javax.servlet.jsp-api.version>
|
||||
|
||||
<slf4j-api.version>1.7.25</slf4j-api.version>
|
||||
<junit.version>4.12</junit.version>
|
||||
|
||||
|
||||
<netty.version>4.1.29.Final</netty.version>
|
||||
<mina.version>2.0.19</mina.version>
|
||||
<jetty-server.version>9.2.26.v20180806</jetty-server.version>
|
||||
|
||||
<commons-pool2.version>2.6.0</commons-pool2.version>
|
||||
|
||||
|
||||
<hessian.version>4.0.51</hessian.version>
|
||||
|
||||
<protostuff.version>1.6.0</protostuff.version>
|
||||
<objenesis.version>2.6</objenesis.version>
|
||||
|
||||
<jackson.version>2.9.6</jackson.version>
|
||||
|
||||
|
||||
<zookeeper.version>3.4.13</zookeeper.version>
|
||||
|
||||
|
||||
<spring.version>4.3.19.RELEASE</spring.version>
|
||||
<spring-boot.version>1.5.16.RELEASE</spring-boot.version>
|
||||
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
<name>GNU General Public License version 3</name>
|
||||
<url>https://opensource.org/licenses/GPL-3.0</url>
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
<scm>
|
||||
<tag>master</tag>
|
||||
<url>https://github.com/xuxueli/xxl-rpc.git</url>
|
||||
<connection>scm:git:https://github.com/xuxueli/xxl-rpc.git</connection>
|
||||
<developerConnection>scm:git:git@github.com:xuxueli/xxl-rpc.git</developerConnection>
|
||||
</scm>
|
||||
<developers>
|
||||
<developer>
|
||||
<id>XXL</id>
|
||||
<name>xuxueli</name>
|
||||
<email>931591021@qq.com</email>
|
||||
<url>https://github.com/xuxueli</url>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>release</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- Source -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>3.0.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>jar-no-fork</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- Javadoc -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- GPG -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-gpg-plugin</artifactId>
|
||||
<version>1.6</version>
|
||||
<configuration>
|
||||
<useAgent>false</useAgent>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>sign</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<distributionManagement>
|
||||
<snapshotRepository>
|
||||
<id>oss</id>
|
||||
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
|
||||
</snapshotRepository>
|
||||
<repository>
|
||||
<id>oss</id>
|
||||
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
</project>
|
||||
@@ -1 +0,0 @@
|
||||
370f4c4f20b218942fba34d939cbc625025e1e30
|
||||
@@ -1,7 +1,7 @@
|
||||
package cn.lili.event;
|
||||
|
||||
|
||||
import cn.lili.modules.order.order.entity.dos.AfterSale;
|
||||
import cn.lili.modules.order.aftersale.entity.dos.AfterSale;
|
||||
|
||||
/**
|
||||
* 售后单改变状态
|
||||
|
||||
19
consumer/src/main/java/cn/lili/event/MemberLoginEvent.java
Normal file
19
consumer/src/main/java/cn/lili/event/MemberLoginEvent.java
Normal file
@@ -0,0 +1,19 @@
|
||||
package cn.lili.event;
|
||||
|
||||
import cn.lili.modules.member.entity.dos.Member;
|
||||
|
||||
/**
|
||||
* 会员登录消息
|
||||
*
|
||||
* @author Chopper
|
||||
* @since 2020/11/17 7:13 下午
|
||||
*/
|
||||
public interface MemberLoginEvent {
|
||||
|
||||
/**
|
||||
* 会员登录
|
||||
*
|
||||
* @param member 会员
|
||||
*/
|
||||
void memberLogin(Member member);
|
||||
}
|
||||
@@ -11,7 +11,7 @@ import cn.lili.modules.member.entity.dos.Member;
|
||||
public interface MemberRegisterEvent {
|
||||
|
||||
/**
|
||||
* 会员登录
|
||||
* 会员注册
|
||||
*
|
||||
* @param member 会员
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package cn.lili.event;
|
||||
|
||||
import cn.lili.modules.member.entity.dto.MemberWithdrawalMessage;
|
||||
import cn.lili.modules.wallet.entity.dto.MemberWithdrawalMessage;
|
||||
|
||||
/**
|
||||
* 会员提现消息
|
||||
|
||||
@@ -7,7 +7,7 @@ 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.order.entity.dos.AfterSale;
|
||||
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.timetask.handler.EveryDayExecute;
|
||||
@@ -44,9 +44,11 @@ public class DistributionOrderExecute implements OrderStatusChangeEvent, EveryDa
|
||||
public void orderChange(OrderMessage orderMessage) {
|
||||
|
||||
switch (orderMessage.getNewStatus()) {
|
||||
case PAID: {
|
||||
//订单带校验/订单代发货,则记录分销信息
|
||||
case TAKE:
|
||||
case UNDELIVERED: {
|
||||
//记录分销订单
|
||||
distributionOrderService.payOrder(orderMessage.getOrderSn());
|
||||
distributionOrderService.calculationDistribution(orderMessage.getOrderSn());
|
||||
break;
|
||||
}
|
||||
case CANCELLED: {
|
||||
|
||||
@@ -10,6 +10,7 @@ import cn.lili.common.utils.SnowFlake;
|
||||
import cn.lili.event.OrderStatusChangeEvent;
|
||||
import cn.lili.event.TradeEvent;
|
||||
import cn.lili.modules.goods.entity.dos.GoodsSku;
|
||||
import cn.lili.modules.goods.entity.enums.GoodsTypeEnum;
|
||||
import cn.lili.modules.goods.service.GoodsSkuService;
|
||||
import cn.lili.modules.member.entity.enums.PointTypeEnum;
|
||||
import cn.lili.modules.member.service.MemberService;
|
||||
@@ -26,7 +27,7 @@ import cn.lili.modules.order.trade.entity.dos.OrderLog;
|
||||
import cn.lili.modules.order.trade.service.OrderLogService;
|
||||
import cn.lili.modules.promotion.service.MemberCouponService;
|
||||
import cn.lili.rocketmq.RocketmqSendCallbackBuilder;
|
||||
import cn.lili.rocketmq.tags.MqOrderTagsEnum;
|
||||
import cn.lili.rocketmq.tags.OrderTagsEnum;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.rocketmq.spring.core.RocketMQTemplate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -34,6 +35,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 订单状态处理类
|
||||
@@ -79,10 +81,10 @@ public class FullDiscountExecute implements TradeEvent, OrderStatusChangeEvent {
|
||||
tradeDTO.getCartList().forEach(
|
||||
cartVO -> {
|
||||
//有满减优惠,则记录信息
|
||||
if (cartVO.getGiftList() != null && cartVO.getGiftList().size() > 0
|
||||
&& cartVO.getGiftPoint() != null && cartVO.getGiftPoint() > 0
|
||||
&& cartVO.getGiftCouponList() != null && cartVO.getGiftCouponList().size() > 0) {
|
||||
cache.put(CachePrefix.ORDER.getPrefix() + cartVO.getSn(), cartVO);
|
||||
if ((cartVO.getGiftList() != null && !cartVO.getGiftList().isEmpty())
|
||||
|| (cartVO.getGiftPoint() != null && cartVO.getGiftPoint() > 0)
|
||||
|| (cartVO.getGiftCouponList() != null && !cartVO.getGiftCouponList().isEmpty())) {
|
||||
cache.put(CachePrefix.ORDER.getPrefix() + cartVO.getSn(), JSONUtil.toJsonStr(cartVO));
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -90,9 +92,10 @@ public class FullDiscountExecute implements TradeEvent, OrderStatusChangeEvent {
|
||||
|
||||
@Override
|
||||
public void orderChange(OrderMessage orderMessage) {
|
||||
System.out.println(CachePrefix.ORDER.getPrefix() + orderMessage.getOrderSn());
|
||||
//如果订单已支付
|
||||
if (orderMessage.getNewStatus().equals(OrderStatusEnum.PAID)) {
|
||||
renderGift((CartVO) cache.get(CachePrefix.ORDER.getPrefix() + orderMessage.getOrderSn()), orderMessage);
|
||||
log.debug("满减活动,订单状态操作 {}", CachePrefix.ORDER.getPrefix() + orderMessage.getOrderSn());
|
||||
renderGift(JSONUtil.toBean(cache.getString(CachePrefix.ORDER.getPrefix() + orderMessage.getOrderSn()), CartVO.class), orderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,10 +121,8 @@ public class FullDiscountExecute implements TradeEvent, OrderStatusChangeEvent {
|
||||
|
||||
try {
|
||||
//优惠券判定
|
||||
if (cartVO.getGiftCouponList() != null && cartVO.getGiftCouponList().size() > 0) {
|
||||
cartVO.getGiftCouponList().forEach(couponId -> {
|
||||
memberCouponService.receiveCoupon(couponId, order.getMemberId(), order.getMemberName());
|
||||
});
|
||||
if (cartVO.getGiftCouponList() != null && !cartVO.getGiftCouponList().isEmpty()) {
|
||||
cartVO.getGiftCouponList().forEach(couponId -> memberCouponService.receiveCoupon(couponId, order.getMemberId(), order.getMemberName()));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("订单赠送优惠券异常", e);
|
||||
@@ -129,7 +130,7 @@ public class FullDiscountExecute implements TradeEvent, OrderStatusChangeEvent {
|
||||
|
||||
try {
|
||||
//赠品潘迪ing
|
||||
if (cartVO.getGiftList() != null && cartVO.getGiftList().size() > 0) {
|
||||
if (cartVO.getGiftList() != null && !cartVO.getGiftList().isEmpty()) {
|
||||
generatorGiftOrder(cartVO.getGiftList(), order);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@@ -144,58 +145,96 @@ public class FullDiscountExecute implements TradeEvent, OrderStatusChangeEvent {
|
||||
* @param originOrder 赠品原订单信息
|
||||
*/
|
||||
private void generatorGiftOrder(List<String> skuIds, Order originOrder) {
|
||||
//获取赠品列表
|
||||
List<GoodsSku> goodsSkus = goodsSkuService.getGoodsSkuByIdFromCache(skuIds);
|
||||
|
||||
//赠品判定
|
||||
if (goodsSkus == null || goodsSkus.isEmpty()) {
|
||||
log.error("赠品不存在:{}", skuIds);
|
||||
return;
|
||||
}
|
||||
|
||||
//赠品分类,分为实体商品/虚拟商品/电子卡券
|
||||
List<GoodsSku> physicalSkus = goodsSkus.stream().filter(goodsSku -> goodsSku.getGoodsType().equals(GoodsTypeEnum.PHYSICAL_GOODS.name())).collect(Collectors.toList());
|
||||
List<GoodsSku> virtualSkus = goodsSkus.stream().filter(goodsSku -> goodsSku.getGoodsType().equals(GoodsTypeEnum.VIRTUAL_GOODS.name())).collect(Collectors.toList());
|
||||
List<GoodsSku> eCouponSkus = goodsSkus.stream().filter(goodsSku -> goodsSku.getGoodsType().equals(GoodsTypeEnum.E_COUPON.name())).collect(Collectors.toList());
|
||||
|
||||
//如果赠品不为空,则生成对应的赠品订单
|
||||
if (!physicalSkus.isEmpty()) {
|
||||
giftOrderHandler(physicalSkus, originOrder, OrderTypeEnum.NORMAL);
|
||||
}
|
||||
if (!virtualSkus.isEmpty()) {
|
||||
giftOrderHandler(virtualSkus, originOrder, OrderTypeEnum.VIRTUAL);
|
||||
}
|
||||
if (!eCouponSkus.isEmpty()) {
|
||||
giftOrderHandler(eCouponSkus, originOrder, OrderTypeEnum.E_COUPON);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 赠品订单处理
|
||||
*
|
||||
* @param skuList 赠品列表
|
||||
* @param originOrder 原始订单
|
||||
* @param orderTypeEnum 订单类型
|
||||
*/
|
||||
private void giftOrderHandler(List<GoodsSku> skuList, Order originOrder, OrderTypeEnum orderTypeEnum) {
|
||||
//初始化订单对象/订单日志/自订单
|
||||
Order order = new Order();
|
||||
List<OrderItem> orderItems = new ArrayList<>();
|
||||
List<OrderLog> orderLogs = new ArrayList<>();
|
||||
Order order = new Order();
|
||||
//初始化价格详情
|
||||
PriceDetailDTO priceDetailDTO = new PriceDetailDTO();
|
||||
//复制通用属性
|
||||
BeanUtil.copyProperties(originOrder, order, "id");
|
||||
BeanUtil.copyProperties(priceDetailDTO, order, "id");
|
||||
//生成订单参数
|
||||
order.setSn(SnowFlake.createStr("G"));
|
||||
order.setOrderType(OrderPromotionTypeEnum.GIFT.name());
|
||||
order.setOrderPromotionType(OrderPromotionTypeEnum.GIFT.name());
|
||||
order.setOrderStatus(OrderStatusEnum.UNPAID.name());
|
||||
order.setPayStatus(PayStatusEnum.PAID.name());
|
||||
order.setDeliverStatus(DeliverStatusEnum.UNDELIVERED.name());
|
||||
order.setOrderType(orderTypeEnum.name());
|
||||
order.setNeedReceipt(false);
|
||||
order.setPriceDetailDTO(priceDetailDTO);
|
||||
order.setClientType(originOrder.getClientType());
|
||||
//订单日志
|
||||
String message = "赠品订单[" + order.getSn() + "]创建";
|
||||
orderLogs.add(new OrderLog(order.getSn(), originOrder.getMemberId(), UserEnums.MEMBER.name(), originOrder.getMemberName(), message));
|
||||
|
||||
for (String skuId : skuIds) {
|
||||
GoodsSku goodsSkuByIdFromCache = goodsSkuService.getGoodsSkuByIdFromCache(skuId);
|
||||
//生成子订单
|
||||
for (GoodsSku goodsSku : skuList) {
|
||||
OrderItem orderItem = new OrderItem();
|
||||
BeanUtil.copyProperties(goodsSkuByIdFromCache, orderItem, "id");
|
||||
BeanUtil.copyProperties(goodsSku, orderItem, "id");
|
||||
BeanUtil.copyProperties(priceDetailDTO, orderItem, "id");
|
||||
orderItem.setAfterSaleStatus(OrderItemAfterSaleStatusEnum.NEW.name());
|
||||
orderItem.setCommentStatus(CommentStatusEnum.NEW.name());
|
||||
orderItem.setComplainStatus(OrderComplaintStatusEnum.NEW.name());
|
||||
orderItem.setNum(1);
|
||||
orderItem.setOrderSn(order.getSn());
|
||||
orderItem.setImage(goodsSkuByIdFromCache.getThumbnail());
|
||||
orderItem.setGoodsName(goodsSkuByIdFromCache.getGoodsName());
|
||||
orderItem.setSkuId(goodsSkuByIdFromCache.getId());
|
||||
orderItem.setCategoryId(goodsSkuByIdFromCache.getCategoryPath().substring(
|
||||
goodsSkuByIdFromCache.getCategoryPath().lastIndexOf(",") + 1
|
||||
orderItem.setImage(goodsSku.getThumbnail());
|
||||
orderItem.setGoodsName(goodsSku.getGoodsName());
|
||||
orderItem.setSkuId(goodsSku.getId());
|
||||
orderItem.setCategoryId(goodsSku.getCategoryPath().substring(
|
||||
goodsSku.getCategoryPath().lastIndexOf(",") + 1
|
||||
));
|
||||
orderItem.setGoodsPrice(goodsSkuByIdFromCache.getPrice());
|
||||
orderItem.setGoodsPrice(goodsSku.getPrice());
|
||||
orderItem.setPriceDetailDTO(priceDetailDTO);
|
||||
orderItems.add(orderItem);
|
||||
}
|
||||
//保存订单
|
||||
orderService.save(order);
|
||||
orderItemService.saveBatch(orderItems);
|
||||
orderLogService.saveBatch(orderLogs);
|
||||
|
||||
|
||||
//发送订单已付款消息
|
||||
//发送订单已付款消息(PS:不在这里处理逻辑是因为期望加交给消费者统一处理库存等等问题)
|
||||
OrderMessage orderMessage = new OrderMessage();
|
||||
orderMessage.setOrderSn(order.getSn());
|
||||
orderMessage.setPaymentMethod(order.getPaymentMethod());
|
||||
orderMessage.setNewStatus(OrderStatusEnum.PAID);
|
||||
|
||||
String destination = rocketmqCustomProperties.getOrderTopic() + ":" + MqOrderTagsEnum.STATUS_CHANGE.name();
|
||||
String destination = rocketmqCustomProperties.getOrderTopic() + ":" + OrderTagsEnum.STATUS_CHANGE.name();
|
||||
//发送订单变更mq消息
|
||||
rocketMQTemplate.asyncSend(destination, JSONUtil.toJsonStr(orderMessage), RocketmqSendCallbackBuilder.commonCallback());
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
25
consumer/src/main/java/cn/lili/event/impl/MemberExecute.java
Normal file
25
consumer/src/main/java/cn/lili/event/impl/MemberExecute.java
Normal file
@@ -0,0 +1,25 @@
|
||||
package cn.lili.event.impl;
|
||||
|
||||
import cn.lili.event.MemberLoginEvent;
|
||||
import cn.lili.modules.member.entity.dos.Member;
|
||||
import cn.lili.modules.member.service.MemberService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 会员自身业务
|
||||
*
|
||||
* @author Chopper
|
||||
* @version v1.0
|
||||
* 2022-01-11 11:08
|
||||
*/
|
||||
@Service
|
||||
public class MemberExecute implements MemberLoginEvent {
|
||||
@Autowired
|
||||
private MemberService memberService;
|
||||
|
||||
@Override
|
||||
public void memberLogin(Member member) {
|
||||
memberService.updateMemberLoginTime(member.getId());
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package cn.lili.event.impl;
|
||||
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.lili.common.utils.CurrencyUtil;
|
||||
import cn.lili.common.utils.StringUtils;
|
||||
import cn.lili.event.AfterSaleStatusChangeEvent;
|
||||
@@ -12,11 +11,11 @@ import cn.lili.modules.member.entity.dos.Member;
|
||||
import cn.lili.modules.member.entity.dos.MemberEvaluation;
|
||||
import cn.lili.modules.member.entity.enums.PointTypeEnum;
|
||||
import cn.lili.modules.member.service.MemberService;
|
||||
import cn.lili.modules.order.order.entity.dos.AfterSale;
|
||||
import cn.lili.modules.order.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;
|
||||
import cn.lili.modules.system.entity.dos.Setting;
|
||||
@@ -62,7 +61,7 @@ public class MemberPointExecute implements MemberRegisterEvent, GoodsCommentComp
|
||||
//获取积分设置
|
||||
PointSetting pointSetting = getPointSetting();
|
||||
//赠送会员积分
|
||||
memberService.updateMemberPoint(Long.valueOf(pointSetting.getRegister().longValue()), PointTypeEnum.INCREASE.name(), member.getId(), "会员注册,赠送积分" + pointSetting.getRegister() + "分");
|
||||
memberService.updateMemberPoint(pointSetting.getRegister().longValue(), PointTypeEnum.INCREASE.name(), member.getId(), "会员注册,赠送积分" + pointSetting.getRegister() + "分");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -75,7 +74,7 @@ public class MemberPointExecute implements MemberRegisterEvent, GoodsCommentComp
|
||||
//获取积分设置
|
||||
PointSetting pointSetting = getPointSetting();
|
||||
//赠送会员积分
|
||||
memberService.updateMemberPoint(Long.valueOf(pointSetting.getComment().longValue()), PointTypeEnum.INCREASE.name(), memberEvaluation.getMemberId(), "会员评价,赠送积分" + pointSetting.getComment() + "分");
|
||||
memberService.updateMemberPoint(pointSetting.getComment().longValue(), PointTypeEnum.INCREASE.name(), memberEvaluation.getMemberId(), "会员评价,赠送积分" + pointSetting.getComment() + "分");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -86,30 +85,47 @@ public class MemberPointExecute implements MemberRegisterEvent, GoodsCommentComp
|
||||
@Override
|
||||
public void orderChange(OrderMessage orderMessage) {
|
||||
|
||||
if (orderMessage.getNewStatus().equals(OrderStatusEnum.COMPLETED)) {
|
||||
Order order = orderService.getBySn(orderMessage.getOrderSn());
|
||||
//根据订单编号获取订单数据,如果订单促销类型不为空,并且订单促销类型为积分订单 则直接返回
|
||||
if (StringUtils.isNotEmpty(order.getOrderPromotionType()) && order.getOrderPromotionType().equals(OrderPromotionTypeEnum.POINTS.name())) {
|
||||
return;
|
||||
switch (orderMessage.getNewStatus()) {
|
||||
case CANCELLED: {
|
||||
Order order = orderService.getBySn(orderMessage.getOrderSn());
|
||||
Long point = order.getPriceDetailDTO().getPayPoint();
|
||||
if (point <= 0) {
|
||||
return;
|
||||
}
|
||||
//如果未付款,则不去要退回相关代码执行
|
||||
if (order.getPayStatus().equals(PayStatusEnum.UNPAID.name())) {
|
||||
return;
|
||||
}
|
||||
String content = "订单取消,积分返还:" + point + "分";
|
||||
//赠送会员积分
|
||||
memberService.updateMemberPoint(point, PointTypeEnum.INCREASE.name(), order.getMemberId(), content);
|
||||
break;
|
||||
}
|
||||
//获取积分设置
|
||||
PointSetting pointSetting = getPointSetting();
|
||||
//计算赠送积分数量
|
||||
Double point = CurrencyUtil.mul(pointSetting.getMoney(), order.getFlowPrice(), 0);
|
||||
//赠送会员积分
|
||||
memberService.updateMemberPoint(point.longValue(), PointTypeEnum.INCREASE.name(), order.getMemberId(), "会员下单,赠送积分" + point + "分");
|
||||
//取消订单恢复积分
|
||||
} else if (orderMessage.getNewStatus().equals(OrderStatusEnum.CANCELLED)) {
|
||||
//根据订单编号获取订单数据,如果为积分订单则跳回
|
||||
Order order = orderService.getBySn(orderMessage.getOrderSn());
|
||||
//增加对积分订单的判定,如果积分支付,取消订单则退还用户积分
|
||||
if (StringUtils.isNotEmpty(order.getOrderPromotionType()) &&
|
||||
order.getOrderPromotionType().equals(OrderPromotionTypeEnum.POINTS.name()) && order.getPriceDetailDTO().getPayPoint() != null) {
|
||||
memberService.updateMemberPoint(Convert.toLong(order.getPriceDetailDTO().getPayPoint()), PointTypeEnum.INCREASE.name(), order.getMemberId(), "订单取消,恢复积分:" + order.getPriceDetailDTO().getPayPoint() + "分");
|
||||
case COMPLETED: {
|
||||
Order order = orderService.getBySn(orderMessage.getOrderSn());
|
||||
//如果是积分订单 则直接返回
|
||||
if (StringUtils.isNotEmpty(order.getOrderPromotionType())
|
||||
&& order.getOrderPromotionType().equals(OrderPromotionTypeEnum.POINTS.name())) {
|
||||
return;
|
||||
}
|
||||
//获取积分设置
|
||||
PointSetting pointSetting = getPointSetting();
|
||||
if (pointSetting.getConsumer() == 0) {
|
||||
return;
|
||||
}
|
||||
//计算赠送积分数量
|
||||
Double point = CurrencyUtil.mul(pointSetting.getConsumer(), order.getFlowPrice(), 0);
|
||||
//赠送会员积分
|
||||
memberService.updateMemberPoint(point.longValue(), PointTypeEnum.INCREASE.name(), order.getMemberId(), "会员下单,赠送积分" + point + "分");
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 提交售后后扣除积分
|
||||
*
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user