Compare commits
1092 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
33b0c2bb10 | |
|
|
d7ba8509d5 | |
|
|
7a305e8901 | |
|
|
6c25d89eb2 | |
|
|
afed250715 | |
|
|
088d8037b8 | |
|
|
b74e455f5d | |
|
|
449e36ab4a | |
|
|
870c1d604e | |
|
|
23a5de7ab4 | |
|
|
24bc7ba3a8 | |
|
|
09df694d36 | |
|
|
d9f6969bcc | |
|
|
01b414aec0 | |
|
|
845c9808fe | |
|
|
d427fbd53b | |
|
|
10ec7e09fb | |
|
|
f74f47fa40 | |
|
|
aae4ecc9f7 | |
|
|
20aebe1f4d | |
|
|
36f45f6be5 | |
|
|
b9d3d78129 | |
|
|
68cb508b4e | |
|
|
2f5d902a9b | |
|
|
7995746c5d | |
|
|
ab78aa6ac8 | |
|
|
641b5cb0a9 | |
|
|
e0626530e0 | |
|
|
912292805e | |
|
|
934871830a | |
|
|
2e4ef9a0a5 | |
|
|
aba8d9b524 | |
|
|
42775cae36 | |
|
|
08351e6260 | |
|
|
65c9667d9f | |
|
|
e84d655796 | |
|
|
1c4a054a2c | |
|
|
47fd21e1d1 | |
|
|
1d2ef2fdf5 | |
|
|
41a86cf574 | |
|
|
aa45034a86 | |
|
|
ced9197698 | |
|
|
4556bf24cd | |
|
|
c9c9ddc871 | |
|
|
261fc2d387 | |
|
|
2a6013f1dd | |
|
|
a5434fcdf7 | |
|
|
1db366a47f | |
|
|
7862b5b33a | |
|
|
bd6bbdf4f8 | |
|
|
405024b685 | |
|
|
9c5b5882e3 | |
|
|
be9abe64be | |
|
|
f64a026991 | |
|
|
b3b27a0aa7 | |
|
|
679ff0acaf | |
|
|
e7d63eed46 | |
|
|
3b27c1c591 | |
|
|
995cb95359 | |
|
|
6831a49d97 | |
|
|
cb6508a5b9 | |
|
|
b1bd7a7e89 | |
|
|
eeea82ed43 | |
|
|
ff4b651a47 | |
|
|
01d4f279aa | |
|
|
5de9575275 | |
|
|
756b088f04 | |
|
|
dbed5887a1 | |
|
|
bc073414d2 | |
|
|
06d92f7e26 | |
|
|
68261e6185 | |
|
|
ddb6573cc0 | |
|
|
c4fcf08691 | |
|
|
7be59446f2 | |
|
|
64fd381ed4 | |
|
|
586bede415 | |
|
|
98ca9d50bc | |
|
|
99b755f782 | |
|
|
57f682ab44 | |
|
|
c988a95337 | |
|
|
fef40eac6e | |
|
|
a2106c9176 | |
|
|
c06b922ed3 | |
|
|
54512eef0c | |
|
|
4f209176e4 | |
|
|
0d5a8b66ca | |
|
|
5e3caeda30 | |
|
|
2da48d1c9b | |
|
|
02a2785878 | |
|
|
0516d443bc | |
|
|
3b88f464de | |
|
|
543bee70f3 | |
|
|
5ee705cb23 | |
|
|
82d5ebe687 | |
|
|
a75164b688 | |
|
|
0a519d89b8 | |
|
|
8e308cf187 | |
|
|
d912ff5064 | |
|
|
ef09658de7 | |
|
|
66ccea37cd | |
|
|
f567bd821b | |
|
|
8b885e206e | |
|
|
e6145311ed | |
|
|
6c5940c6ea | |
|
|
77b9b0c409 | |
|
|
bd2ed5c8c6 | |
|
|
7d2965d8b8 | |
|
|
7d4788cb3a | |
|
|
f348c8b56f | |
|
|
66331f57dc | |
|
|
e093606785 | |
|
|
b6d3701806 | |
|
|
12602192de | |
|
|
260aedd6f4 | |
|
|
dc6e739f25 | |
|
|
14a2b5884b | |
|
|
920219f978 | |
|
|
090e5d320e | |
|
|
8d5642c07a | |
|
|
5dd35a9572 | |
|
|
1f3f3f1e04 | |
|
|
4ca85ef425 | |
|
|
e0b67cb3cd | |
|
|
5118027b9b | |
|
|
f2ca18953b | |
|
|
48948eb265 | |
|
|
c2f94d0409 | |
|
|
b2823c5966 | |
|
|
4982d22e5a | |
|
|
eee972193c | |
|
|
de3b435637 | |
|
|
a37fd2f9ef | |
|
|
cd3624027c | |
|
|
b583d01312 | |
|
|
648bd55e7a | |
|
|
04f844cf93 | |
|
|
763be9bc49 | |
|
|
adb0e978d0 | |
|
|
029213e068 | |
|
|
c69cc065a6 | |
|
|
54291604bd | |
|
|
5d77e0c3d5 | |
|
|
b45709cca1 | |
|
|
5406aedb76 | |
|
|
9b1f802867 | |
|
|
062a0cc2f4 | |
|
|
b401f23ec4 | |
|
|
7c572d7384 | |
|
|
8aad5da104 | |
|
|
6f6085343f | |
|
|
00e7b35926 | |
|
|
086eb3523b | |
|
|
cdeb5e003c | |
|
|
97a8a5472d | |
|
|
c07f374ed7 | |
|
|
2e9c25d8a8 | |
|
|
2d36fa1f6b | |
|
|
5eab49b844 | |
|
|
7691a967b4 | |
|
|
362c737c4b | |
|
|
bfa30e0b72 | |
|
|
0186055934 | |
|
|
c6aba2caa9 | |
|
|
1f412710e7 | |
|
|
479a286040 | |
|
|
80d990de17 | |
|
|
f7ca147e49 | |
|
|
f8797b0e79 | |
|
|
5ef762f670 | |
|
|
f6b0055bdb | |
|
|
d944a9cc82 | |
|
|
eaa08bd877 | |
|
|
921015488e | |
|
|
758e556975 | |
|
|
8888c13083 | |
|
|
34460c0f0d | |
|
|
a9ea2cdc82 | |
|
|
ce93f7593d | |
|
|
ec3d76f73d | |
|
|
c717d0f2c2 | |
|
|
b17636abbe | |
|
|
05dc070107 | |
|
|
1017b69a89 | |
|
|
b363044282 | |
|
|
c1145538dc | |
|
|
31f20090e5 | |
|
|
6630141a99 | |
|
|
09872cd71b | |
|
|
d21833b4b2 | |
|
|
f386405aaa | |
|
|
a8d59c1308 | |
|
|
07990a0a96 | |
|
|
b80ad45a1b | |
|
|
bae22532d1 | |
|
|
bd08205426 | |
|
|
b4e5eda9f7 | |
|
|
8ef801afa1 | |
|
|
93845145f3 | |
|
|
b5b1ad8b18 | |
|
|
40b63bff4d | |
|
|
dcfb79c87a | |
|
|
019bf55598 | |
|
|
7c1415663d | |
|
|
5cb7e9bdfb | |
|
|
b2a7ea1887 | |
|
|
5a90bfe202 | |
|
|
8bb27ab292 | |
|
|
3f0329a7c5 | |
|
|
6ec1e0ef7d | |
|
|
9d23c4d337 | |
|
|
3a00b85a02 | |
|
|
d5b0813c46 | |
|
|
17cbff4228 | |
|
|
a11cb5eea5 | |
|
|
d978abc2e1 | |
|
|
04fab9ef26 | |
|
|
ad8c87d313 | |
|
|
b94760f6f5 | |
|
|
46be2c0f63 | |
|
|
0afdccaa9e | |
|
|
e79e527bfd | |
|
|
ecfe7dc128 | |
|
|
edceabad0e | |
|
|
9f0bef5f52 | |
|
|
264da3c5b3 | |
|
|
2ba232f149 | |
|
|
365bb5cd5e | |
|
|
35ccf243f1 | |
|
|
fced36d732 | |
|
|
3b9de3bd56 | |
|
|
46312d855c | |
|
|
bc061518f5 | |
|
|
d54471ec3c | |
|
|
267c24e16a | |
|
|
9988723044 | |
|
|
7a9d226783 | |
|
|
7748367695 | |
|
|
8ef1894a47 | |
|
|
0e05d067a0 | |
|
|
9207ebfd03 | |
|
|
c7187fe1ab | |
|
|
3b2f2e4bbe | |
|
|
f75aae14a8 | |
|
|
ce94bd7e4e | |
|
|
763014f65a | |
|
|
24387973dc | |
|
|
25ded0b4f8 | |
|
|
d805b3d729 | |
|
|
065772c2c3 | |
|
|
e19535d71e | |
|
|
e9956b5336 | |
|
|
42563c3ce0 | |
|
|
0f097f7d86 | |
|
|
96ecaa840e | |
|
|
61b80c5a85 | |
|
|
34b7c23392 | |
|
|
201210202f | |
|
|
f0632942d5 | |
|
|
b49b7ef8af | |
|
|
dbf29b5e38 | |
|
|
7c3fd4dfe0 | |
|
|
84a2007b26 | |
|
|
35ad186a9d | |
|
|
56d8195450 | |
|
|
4ba7c7c4e7 | |
|
|
a9f1649749 | |
|
|
6b75ca5ff9 | |
|
|
edfaaa8c44 | |
|
|
e2a624e653 | |
|
|
fa85c92d08 | |
|
|
b1e7095357 | |
|
|
12beeb1b51 | |
|
|
25f856f11f | |
|
|
d2982d3528 | |
|
|
94b0a951a2 | |
|
|
537b9b408b | |
|
|
6c2c12d95d | |
|
|
4ec0f04cc5 | |
|
|
473a8eaca5 | |
|
|
824985a6ad | |
|
|
d15b17729c | |
|
|
743f59d4a3 | |
|
|
62a931145b | |
|
|
01efaac3ab | |
|
|
94e6794255 | |
|
|
b356b3594d | |
|
|
6f7459604c | |
|
|
eaace1d576 | |
|
|
db0e01ecf7 | |
|
|
bc90c47f2c | |
|
|
d2eae1734e | |
|
|
4cdc0b5738 | |
|
|
b2f01ed453 | |
|
|
d99771f8e7 | |
|
|
24a80cb24a | |
|
|
84d967ca6b | |
|
|
bc7d2430ba | |
|
|
daccee5d04 | |
|
|
d53762e777 | |
|
|
47735d6f4b | |
|
|
c2e481cd15 | |
|
|
b0898330c9 | |
|
|
8053c84331 | |
|
|
c17326ffbe | |
|
|
a77c829287 | |
|
|
e663ebc8b9 | |
|
|
8e5504da6c | |
|
|
bc587c196d | |
|
|
46ec8d47ff | |
|
|
2efd81be50 | |
|
|
d9859647b4 | |
|
|
42fcd08d00 | |
|
|
0c7d9a7c7e | |
|
|
82f7bd890e | |
|
|
4d61647e0d | |
|
|
f074f45f86 | |
|
|
5ce67b4014 | |
|
|
8fe78a48fd | |
|
|
94b4954c37 | |
|
|
351b53b432 | |
|
|
c7f68b363e | |
|
|
d1c0708526 | |
|
|
ddc95cf170 | |
|
|
6b4397dec5 | |
|
|
0d79a23ad7 | |
|
|
843408b81e | |
|
|
c5da6f1ca1 | |
|
|
844156341c | |
|
|
56cf10750d | |
|
|
af1d4faa03 | |
|
|
7425f0a4d5 | |
|
|
8aa6b1e56b | |
|
|
3dc3605097 | |
|
|
888821c0e1 | |
|
|
4ced0336e4 | |
|
|
b12f6ae823 | |
|
|
fcaf1f230b | |
|
|
b589faefab | |
|
|
29292c54ed | |
|
|
87de3f891e | |
|
|
e5224d6bc6 | |
|
|
45cf1afa48 | |
|
|
8b49d17982 | |
|
|
9129a114df | |
|
|
31e21e4705 | |
|
|
0dcc46d00d | |
|
|
312c9cc1be | |
|
|
973796f491 | |
|
|
0f7502df06 | |
|
|
dc9859b31d | |
|
|
30f21e1dd3 | |
|
|
e2a127c0d0 | |
|
|
519bedfc7c | |
|
|
d79f737665 | |
|
|
e04281d8b9 | |
|
|
eff2d6d630 | |
|
|
54acf2a0f5 | |
|
|
483af5462d | |
|
|
0417d122fb | |
|
|
74a4514c3c | |
|
|
8931ce98fa | |
|
|
cd4008d824 | |
|
|
03e0793e59 | |
|
|
ffc2568b98 | |
|
|
7de19ffb1f | |
|
|
c105c8d0ff | |
|
|
9e8d74845a | |
|
|
a6a8c330ae | |
|
|
ef7f4ebb8e | |
|
|
1a8a15193e | |
|
|
1ed5338032 | |
|
|
01405b33e9 | |
|
|
544a251a67 | |
|
|
f8c763ad9d | |
|
|
fdf551358f | |
|
|
192605ae90 | |
|
|
5e8e6661b9 | |
|
|
4c19b6c9d3 | |
|
|
347431f199 | |
|
|
da9a1dc3b8 | |
|
|
68fac45b7a | |
|
|
f87a2747bc | |
|
|
2d03914963 | |
|
|
bf5e5ec7dd | |
|
|
5468fa56de | |
|
|
1cc7188488 | |
|
|
a9d92e98c5 | |
|
|
f01c6c0e3c | |
|
|
5a2c3f4208 | |
|
|
e659d1f420 | |
|
|
afbfde52bb | |
|
|
72dca1d7c4 | |
|
|
c88b838e88 | |
|
|
958f1cfc5e | |
|
|
cab483a7b9 | |
|
|
fac0e9b046 | |
|
|
f120867e35 | |
|
|
527b5f059c | |
|
|
c918f2e5ce | |
|
|
2553a3605d | |
|
|
d3cac60125 | |
|
|
a8ab3706dd | |
|
|
10c11aef8f | |
|
|
18c1367856 | |
|
|
10b2ae2537 | |
|
|
424082ead3 | |
|
|
7c7976c197 | |
|
|
1945d3f906 | |
|
|
cc9cfceed4 | |
|
|
1c04a44278 | |
|
|
00f15ef7ee | |
|
|
6bccfb8036 | |
|
|
e86a383c8c | |
|
|
b0140e7b23 | |
|
|
70abb276bc | |
|
|
ece7e3eb0e | |
|
|
90505fd354 | |
|
|
d2ed566348 | |
|
|
0ab7e04fc8 | |
|
|
7379b1d85d | |
|
|
608fb72c78 | |
|
|
e1a5e491e5 | |
|
|
adceb75c5c | |
|
|
d335268a84 | |
|
|
7c7a42d58d | |
|
|
a0b1c60896 | |
|
|
6f50e1e134 | |
|
|
857502e26e | |
|
|
2e374dcda7 | |
|
|
080c426caa | |
|
|
4f14f8c914 | |
|
|
5a2a18992a | |
|
|
c8b2c5903a | |
|
|
e8a7ab070b | |
|
|
9fc2f9e702 | |
|
|
4d0bb753c4 | |
|
|
e74fc42cf7 | |
|
|
ee59a73d02 | |
|
|
b7e9f74912 | |
|
|
713ff653ad | |
|
|
cc4d34b6fe | |
|
|
fb7c22aacc | |
|
|
c49088def2 | |
|
|
3b182796ab | |
|
|
838265d73f | |
|
|
4cd6d6742c | |
|
|
3e3f8528f3 | |
|
|
350012f368 | |
|
|
12a5466e26 | |
|
|
4d7e108f83 | |
|
|
156428784d | |
|
|
66f1fb3da8 | |
|
|
846cbef3da | |
|
|
8c8b49adb2 | |
|
|
504fec5011 | |
|
|
42c1c1da3f | |
|
|
cee923159c | |
|
|
70d26b5c78 | |
|
|
58ef3ae818 | |
|
|
4b28ad0f1c | |
|
|
349ddf38a2 | |
|
|
3533a1c90e | |
|
|
f25141a495 | |
|
|
fac61ff581 | |
|
|
fece3c274e | |
|
|
a0d9a1f591 | |
|
|
37dc169607 | |
|
|
77f193a06b | |
|
|
4edaecf89c | |
|
|
27ffc4fa66 | |
|
|
27c0c008d1 | |
|
|
680c24d2a2 | |
|
|
99f372bf46 | |
|
|
b6792ccf99 | |
|
|
9388c7de3a | |
|
|
bd21ba9ae8 | |
|
|
105ccd7e3f | |
|
|
9f9355af39 | |
|
|
772c827118 | |
|
|
548c3a1940 | |
|
|
d855a7eeac | |
|
|
eb6e8845a0 | |
|
|
10f17d521e | |
|
|
e9de90557e | |
|
|
52656b40b9 | |
|
|
b20996355c | |
|
|
12cc56aada | |
|
|
1a9310ef83 | |
|
|
e4a03e583b | |
|
|
b9cce3bdf1 | |
|
|
e7ca92eaaf | |
|
|
780fce1416 | |
|
|
79d15b5c4e | |
|
|
81dce3ea75 | |
|
|
58a74d1b29 | |
|
|
facfa94973 | |
|
|
3c2f705bbb | |
|
|
ca3b16c677 | |
|
|
8c69aa7474 | |
|
|
869d14f158 | |
|
|
f703a40903 | |
|
|
fbb2be3755 | |
|
|
27f489fb0f | |
|
|
f3539d1899 | |
|
|
88b649ab42 | |
|
|
cd1e953583 | |
|
|
ba9482c4f6 | |
|
|
21a8fd517e | |
|
|
e838459a1b | |
|
|
f16f23ab84 | |
|
|
79e99e78a5 | |
|
|
4ae309b5c5 | |
|
|
655383fd02 | |
|
|
07c9cb349d | |
|
|
e28cb5d1f5 | |
|
|
c5d68ffffc | |
|
|
1fa1921735 | |
|
|
4c56736535 | |
|
|
185b50a84e | |
|
|
45907f107d | |
|
|
bfb9f82659 | |
|
|
66c28248b7 | |
|
|
08f01e04ea | |
|
|
29d09abd5f | |
|
|
c2ff66d937 | |
|
|
2186cd5a04 | |
|
|
3c5c0f7f47 | |
|
|
ae1a748ef2 | |
|
|
4e14710e3d | |
|
|
d1d42e8fdf | |
|
|
ffe39b3113 | |
|
|
84acdd0161 | |
|
|
e36fb3f55e | |
|
|
29277ec4eb | |
|
|
7fbabbfeec | |
|
|
dfcd29c738 | |
|
|
a8f7d019c9 | |
|
|
58b25c7e0f | |
|
|
d785bd7fa8 | |
|
|
a4ce1f0299 | |
|
|
6973d62dd6 | |
|
|
c763257ea0 | |
|
|
083f7fedcb | |
|
|
b1835e370d | |
|
|
76264b379a | |
|
|
70291911a6 | |
|
|
492fa159b9 | |
|
|
2eaa98a4bc | |
|
|
b50e76c04e | |
|
|
96f81b1b69 | |
|
|
f7663fa62c | |
|
|
c24207bce4 | |
|
|
1add18e7dd | |
|
|
808e0a43bd | |
|
|
723cf01696 | |
|
|
b1f2d56fa4 | |
|
|
1980c8e88d | |
|
|
5376962c34 | |
|
|
cb4fa67e48 | |
|
|
e9e3d8ac80 | |
|
|
5d665893f2 | |
|
|
ce001560cb | |
|
|
3121ab5adb | |
|
|
7bd4d05381 | |
|
|
8f41aa713c | |
|
|
51f60c002c | |
|
|
95c83b23d5 | |
|
|
408209950b | |
|
|
50a2773b5a | |
|
|
fe9b27bbff | |
|
|
f739b3b1a6 | |
|
|
70af101daf | |
|
|
bf735b1a31 | |
|
|
7ae3992afc | |
|
|
1208a38018 | |
|
|
a799256302 | |
|
|
a4b1beec18 | |
|
|
4ff17e7aba | |
|
|
74fee9a48e | |
|
|
f5de0d16c3 | |
|
|
ba06410d44 | |
|
|
325e982645 | |
|
|
5bf555c8a9 | |
|
|
a2ccfb0628 | |
|
|
f4bf18218f | |
|
|
9522fc1110 | |
|
|
57e4a9261b | |
|
|
5be2e74d81 | |
|
|
e55c1744ad | |
|
|
bee3d67106 | |
|
|
36d81b71d4 | |
|
|
11121d6ca2 | |
|
|
19533f37b4 | |
|
|
7285de2024 | |
|
|
5be1876d3d | |
|
|
cf9ff5c380 | |
|
|
b4f227878a | |
|
|
1b88298536 | |
|
|
86dc91cb4e | |
|
|
0447d240b2 | |
|
|
6686f0c549 | |
|
|
1db4743ac8 | |
|
|
e5f632c036 | |
|
|
90382c8f59 | |
|
|
39e8cded74 | |
|
|
4dec40c568 | |
|
|
2e6518a975 | |
|
|
1198781b61 | |
|
|
3302b8dd24 | |
|
|
7467cfa444 | |
|
|
61b92e07ba | |
|
|
efb7e64323 | |
|
|
a5c11fee41 | |
|
|
fbb586b3a4 | |
|
|
1d5c6d7f69 | |
|
|
d6d1691098 | |
|
|
094f84e92b | |
|
|
c824146e1c | |
|
|
386126cb5e | |
|
|
b2dad3b3fd | |
|
|
223585f5b9 | |
|
|
efb5281d90 | |
|
|
7877060aa0 | |
|
|
344c1ae874 | |
|
|
af74c43374 | |
|
|
4b60df1987 | |
|
|
dde33361eb | |
|
|
224cc4999c | |
|
|
4acff0f20d | |
|
|
8275b2709e | |
|
|
0ed1e068ed | |
|
|
55eb77f824 | |
|
|
f89a5f5280 | |
|
|
b06487848f | |
|
|
57269a1e92 | |
|
|
ba025f0e09 | |
|
|
faa463e396 | |
|
|
f9f69f93cd | |
|
|
46beff3cd9 | |
|
|
999126b034 | |
|
|
80edd84c4f | |
|
|
e4b9834684 | |
|
|
8f5ca9b7f3 | |
|
|
5e9d45520f | |
|
|
e745d54af6 | |
|
|
0d77408fa5 | |
|
|
056126127b | |
|
|
5042ebe490 | |
|
|
d8841522ad | |
|
|
6c2ef5d75b | |
|
|
418e834fe3 | |
|
|
b4c795e7d5 | |
|
|
0de9071813 | |
|
|
064e683a68 | |
|
|
0a14ecdf16 | |
|
|
415e6ff469 | |
|
|
82c72c9e0c | |
|
|
8e27e25936 | |
|
|
c20c9c54af | |
|
|
7b47f40fe8 | |
|
|
5b6e8caf35 | |
|
|
81a4bfdf72 | |
|
|
6b15377285 | |
|
|
1e09c75ea0 | |
|
|
69ec3f381c | |
|
|
e3a1b5bdf9 | |
|
|
5fc8bfe3e5 | |
|
|
6300940d2e | |
|
|
4cd7f05bc9 | |
|
|
6a4da2891b | |
|
|
a1293d642b | |
|
|
51480b95a8 | |
|
|
6107a37eff | |
|
|
e93e19c596 | |
|
|
49ada5c669 | |
|
|
259c18e131 | |
|
|
e3d2a9d891 | |
|
|
2a80dfece6 | |
|
|
55ead8507b | |
|
|
e3845071a3 | |
|
|
7c589b74af | |
|
|
121e25ec0f | |
|
|
21d0a29878 | |
|
|
8208f97c67 | |
|
|
551104543d | |
|
|
46f0ab568e | |
|
|
220ec46d4b | |
|
|
eacf010f15 | |
|
|
1a01ff5cce | |
|
|
1babbfdefe | |
|
|
31b20a92fd | |
|
|
6af7109afb | |
|
|
f982f82713 | |
|
|
01ba195445 | |
|
|
3873009e63 | |
|
|
f28466cfae | |
|
|
1ab55c2c46 | |
|
|
2426a8155e | |
|
|
e54aaa7c14 | |
|
|
1e54eb1456 | |
|
|
a3c9deda29 | |
|
|
871b0c5262 | |
|
|
2eff0601c7 | |
|
|
272ebd6663 | |
|
|
96bfc97675 | |
|
|
48abe51c47 | |
|
|
c946db4348 | |
|
|
0fdae37924 | |
|
|
f5d64cbb4a | |
|
|
0e23f94e80 | |
|
|
869059bf59 | |
|
|
db371bf9fb | |
|
|
039c0e9166 | |
|
|
f70ef125ed | |
|
|
099b6bed74 | |
|
|
00512ba83b | |
|
|
0abcbbec32 | |
|
|
de8199df49 | |
|
|
9e25471e1e | |
|
|
546b63e336 | |
|
|
c3597cd28e | |
|
|
d8ed96dff7 | |
|
|
bd2e79027d | |
|
|
b81e72a0cc | |
|
|
5c0b87634c | |
|
|
948932cb0a | |
|
|
4f89609f07 | |
|
|
7d5ebbfb65 | |
|
|
4a2fc4e2e0 | |
|
|
34c052902a | |
|
|
c020a64469 | |
|
|
05e1d5390c | |
|
|
6a96987857 | |
|
|
0f2eea3e13 | |
|
|
0d06185849 | |
|
|
aded35b3c1 | |
|
|
395cd4750c | |
|
|
14c437a30e | |
|
|
25e45d779d | |
|
|
e56c7c6d81 | |
|
|
f55f709fec | |
|
|
e72cc189da | |
|
|
9cd49383ff | |
|
|
e525d7e058 | |
|
|
4e76bb2736 | |
|
|
f8ac16b457 | |
|
|
df3e3604f2 | |
|
|
d7eaca4af2 | |
|
|
b4c1743a26 | |
|
|
4a6d12f3ad | |
|
|
aa880477cb | |
|
|
a262f6f6b5 | |
|
|
e4a8991205 | |
|
|
2f6bbd4dec | |
|
|
079bf18d4c | |
|
|
66dc7c8581 | |
|
|
e4b25899e5 | |
|
|
1b3158930f | |
|
|
e9fa13fdd8 | |
|
|
116ced92cb | |
|
|
510372ff46 | |
|
|
1cd6bca4ba | |
|
|
d0042e3d63 | |
|
|
e129be76e8 | |
|
|
5922665e32 | |
|
|
9fa99a28e3 | |
|
|
d0cec6c5ed | |
|
|
5a6d4ce854 | |
|
|
04c83a5213 | |
|
|
19a4c0124e | |
|
|
5215a440c9 | |
|
|
2abfc01d83 | |
|
|
35d66973bc | |
|
|
5351be915c | |
|
|
b9562194b6 | |
|
|
54e2bd1651 | |
|
|
14352a6d7b | |
|
|
2ff0216f68 | |
|
|
d3d401d2f3 | |
|
|
50dc84efd5 | |
|
|
b101bac68c | |
|
|
bdad979450 | |
|
|
48f82895e7 | |
|
|
f516dae0da | |
|
|
e35da7f608 | |
|
|
a9589edca5 | |
|
|
99e7cdf5a9 | |
|
|
a956e7b764 | |
|
|
90e8e4944e | |
|
|
6b9d488749 | |
|
|
675569c19e | |
|
|
077222c9b7 | |
|
|
8f2303d1bf | |
|
|
ec70083bd6 | |
|
|
f9b5dbad58 | |
|
|
116852ce30 | |
|
|
c9c6bb6349 | |
|
|
78ed984ef8 | |
|
|
67af4f1463 | |
|
|
a73530df84 | |
|
|
5e8601745b | |
|
|
69053261e0 | |
|
|
62c28fe2f6 | |
|
|
b1e5ae969b | |
|
|
ff27101e13 | |
|
|
7c00d0d9a0 | |
|
|
7f0056304d | |
|
|
a40431fbe7 | |
|
|
0f9c370118 | |
|
|
5c2b995d1f | |
|
|
90d5e3888b | |
|
|
d7bf0f2811 | |
|
|
be097e8b2d | |
|
|
e08f83ac6e | |
|
|
d2d5c10b0e | |
|
|
baa9c6c260 | |
|
|
0a3b50ef6f | |
|
|
8b099a2ae6 | |
|
|
7e29627bf6 | |
|
|
242427f1ee | |
|
|
c5d92f9ea6 | |
|
|
48078ad2d6 | |
|
|
7af4a48dfa | |
|
|
3b9617a03e | |
|
|
7921c21295 | |
|
|
822141899c | |
|
|
2f4fec7631 | |
|
|
c0bad61875 | |
|
|
5d15b3c309 | |
|
|
770c8e01f2 | |
|
|
1dd8dc4508 | |
|
|
f039135371 | |
|
|
2ef311f887 | |
|
|
2c99b8cd18 | |
|
|
26b3e0bc2c | |
|
|
3ebec6f0c5 | |
|
|
f2bfc718c3 | |
|
|
dc0f6eae1e | |
|
|
373fb2bdf0 | |
|
|
10290bd37b | |
|
|
901fb9af81 | |
|
|
535079c14d | |
|
|
18614278a7 | |
|
|
df4886d62c | |
|
|
ced7d4bc7d | |
|
|
efd9d78227 | |
|
|
6c480acd20 | |
|
|
260bf68c23 | |
|
|
c063c19532 | |
|
|
6096f91b6c | |
|
|
05adbeb584 | |
|
|
50e0f09be8 | |
|
|
09252dda7c | |
|
|
db545ee118 | |
|
|
fec443ce6c | |
|
|
c618c712f3 | |
|
|
98bb93516f | |
|
|
4e81e0fca1 | |
|
|
28eb1496b9 | |
|
|
81b6454557 | |
|
|
72a3057126 | |
|
|
b7fc525623 | |
|
|
f458e6f77e | |
|
|
7b91549664 | |
|
|
10373ab45f | |
|
|
a08d181e77 | |
|
|
50faef4a20 | |
|
|
782a152243 | |
|
|
5e59b19cec | |
|
|
8f002b689d | |
|
|
dfe0bb6154 | |
|
|
4bd99e7f6e | |
|
|
1cb099702a | |
|
|
37d16054c4 | |
|
|
3174c9abf3 | |
|
|
fed5b28ce2 | |
|
|
53512a0b37 | |
|
|
be701b46ec | |
|
|
8247b3b4bd | |
|
|
963920fd2a | |
|
|
0b645bd695 | |
|
|
44329cc64e | |
|
|
37be5a521e | |
|
|
d63861ac13 | |
|
|
1b9b088e43 | |
|
|
6e31bb6251 | |
|
|
4b5c272cd9 | |
|
|
5480d0eb5f | |
|
|
be4f8cbbdd | |
|
|
923c204c3c | |
|
|
b1219a114b | |
|
|
94e875008b | |
|
|
e823832cdb | |
|
|
cce10b9475 | |
|
|
68b9b1ab98 | |
|
|
e131095e45 | |
|
|
c2843ecc3d | |
|
|
a941cf56f2 | |
|
|
7b62f75cca | |
|
|
68a96b405d | |
|
|
e9297f49a1 | |
|
|
1c5fb88b38 | |
|
|
d6756ee2e3 | |
|
|
26f6af0256 | |
|
|
77f01cabdc | |
|
|
33a0722c8c | |
|
|
b0392f70e1 | |
|
|
9ea2ecf552 | |
|
|
52410b73f1 | |
|
|
a68b7ee991 | |
|
|
71bc936074 | |
|
|
297ccc0233 | |
|
|
417451f432 | |
|
|
0fe0722893 | |
|
|
a0274410a8 | |
|
|
fcc1d47a24 | |
|
|
bfd96a1d52 | |
|
|
dc176f6e46 | |
|
|
59843ce046 | |
|
|
6059797e1a | |
|
|
98145e92ec | |
|
|
8c9926c1a7 | |
|
|
73030b7d91 | |
|
|
41ee71b594 | |
|
|
979a3a6ade | |
|
|
17fc234975 | |
|
|
09c6cd178a | |
|
|
fcff40f72b | |
|
|
221ad5a8d4 | |
|
|
8558343524 | |
|
|
1df8e2cf1f | |
|
|
e48029a9a4 | |
|
|
489b3597d6 | |
|
|
2ca427f808 | |
|
|
e9711dffe3 | |
|
|
d7fe7cf40a | |
|
|
543d770d98 | |
|
|
30407b1715 | |
|
|
2e5cc6ab92 | |
|
|
b01812bce9 | |
|
|
58a3ac0ed0 | |
|
|
6863fbc100 | |
|
|
4929e467ab | |
|
|
d78a7a7ac6 | |
|
|
6ba0544243 | |
|
|
bbcd6edf20 | |
|
|
f0476f05e0 | |
|
|
48aab9eeac | |
|
|
078a986e6b | |
|
|
d272efa45f | |
|
|
29ccf35e5f | |
|
|
f9931b50ea | |
|
|
f6e473b8bb | |
|
|
98bc995b71 | |
|
|
96791306f2 | |
|
|
b4f113e811 | |
|
|
01d92b3812 | |
|
|
e16d9dfcb1 | |
|
|
64e89d5ed6 | |
|
|
28874a59f1 | |
|
|
12e7379cbf | |
|
|
a2e16bf05d | |
|
|
f8a9022064 | |
|
|
ce54b66205 | |
|
|
8381287036 | |
|
|
112206d2ec | |
|
|
16f07f2f40 | |
|
|
52dce24fb8 | |
|
|
614ffc9abf | |
|
|
532dec69e3 | |
|
|
9e26fad331 | |
|
|
c408e8e168 | |
|
|
2a6c54ba47 | |
|
|
bffa05f07f | |
|
|
91e2e0caaf | |
|
|
d981259995 | |
|
|
a9e5ad8229 | |
|
|
edadbb5662 | |
|
|
7d37e58206 | |
|
|
91751b0f32 | |
|
|
7f78921eda | |
|
|
e3e0c93502 | |
|
|
df0570860d | |
|
|
7d1571628f | |
|
|
4e5c560d95 | |
|
|
0d8aa662e4 | |
|
|
beea5e902c | |
|
|
98cf4f2f6d | |
|
|
376af15266 | |
|
|
f00ad6a46c | |
|
|
972ab851c8 | |
|
|
aa7c5d3744 | |
|
|
b9157ddc6b | |
|
|
1cb0d9c80f | |
|
|
830271a838 | |
|
|
b388b3a044 | |
|
|
049f52499e | |
|
|
d6b8919294 | |
|
|
fcfe0a2f53 | |
|
|
a90c441988 | |
|
|
d6bbe73d58 | |
|
|
2567044da8 | |
|
|
15de68b704 | |
|
|
2252f4edcb | |
|
|
ea86b42847 | |
|
|
53275cd5de | |
|
|
b5fc56c0aa | |
|
|
a74612f5a6 | |
|
|
95e37c2048 | |
|
|
e35cb8ad3c | |
|
|
635625842a | |
|
|
53fd7e24c0 | |
|
|
cf62b77128 | |
|
|
58eb528047 | |
|
|
4909ebe807 | |
|
|
fa868cce31 | |
|
|
5f2950ab72 | |
|
|
8da97add53 | |
|
|
2250bda5c1 | |
|
|
e3f68dc486 | |
|
|
ff07ab528e | |
|
|
0ec21c31e9 | |
|
|
8d73b216ef | |
|
|
2ad3ca3ef8 | |
|
|
341b54bd6b | |
|
|
89810ae9b9 | |
|
|
5643faab22 | |
|
|
c51e0ec580 | |
|
|
96f1dcb768 | |
|
|
9f6f7c2a78 | |
|
|
e1499150f9 | |
|
|
e6b8414366 | |
|
|
085ae733e2 | |
|
|
9b8ec56b96 | |
|
|
d10a9671a9 | |
|
|
7da10ca43e | |
|
|
a21e361b4e | |
|
|
e8f9af93e8 | |
|
|
fcaba6d511 | |
|
|
b13a48d5e5 | |
|
|
3807eb43ce | |
|
|
7eab45ae49 | |
|
|
89582d3bc8 | |
|
|
1de1edb537 | |
|
|
df95c09724 | |
|
|
a53e9f7ab4 | |
|
|
8e0f237e2e | |
|
|
e938911e4a | |
|
|
0c5192e86e | |
|
|
5732e6974f | |
|
|
1cfc94b22a | |
|
|
adee84544d | |
|
|
7c122565fc | |
|
|
2ec29a3825 | |
|
|
b8a60a1549 | |
|
|
d32f9705a0 | |
|
|
62ca02cdc4 | |
|
|
4a8bce3c34 | |
|
|
199e787d92 | |
|
|
7271e77b05 | |
|
|
a183d2bfec | |
|
|
fa566a7057 | |
|
|
3d9e4ee511 | |
|
|
f808912006 | |
|
|
5fe0e2a83b | |
|
|
9d8bb72a7e | |
|
|
a0930151a8 | |
|
|
441ecf38f1 | |
|
|
9bfa67d71b | |
|
|
9ec06de8cd | |
|
|
cd6d6f2e07 | |
|
|
27f7d07f27 | |
|
|
b08ff62d86 | |
|
|
7715b758f1 | |
|
|
6e03ad4997 | |
|
|
c35df24d2d | |
|
|
eb32bedc25 | |
|
|
a7de11423f | |
|
|
e53037232f | |
|
|
fd5b79d6ec | |
|
|
7f1c028fed | |
|
|
66ae922dc4 | |
|
|
0e9996bcf0 | |
|
|
d862eb43be | |
|
|
5cf796ac83 | |
|
|
220c717085 | |
|
|
8e1aa5bc19 | |
|
|
bff2ad2250 | |
|
|
260d6eb7d7 | |
|
|
b218436a1c | |
|
|
3d43f5f114 | |
|
|
9e13d1ff98 |
|
|
@ -1,7 +0,0 @@
|
|||
### IDEA ###
|
||||
.idea/*
|
||||
*.iml
|
||||
*/target/*
|
||||
*/*.iml
|
||||
/.gradle/
|
||||
/application.pid
|
||||
191
LICENSE
191
LICENSE
|
|
@ -1,191 +0,0 @@
|
|||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction, and
|
||||
distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by the copyright
|
||||
owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all other entities
|
||||
that control, are controlled by, or are under common control with that entity.
|
||||
For the purposes of this definition, "control" means (i) the power, direct or
|
||||
indirect, to cause the direction or management of such entity, whether by
|
||||
contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity exercising
|
||||
permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications, including
|
||||
but not limited to software source code, documentation source, and configuration
|
||||
files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical transformation or
|
||||
translation of a Source form, including but not limited to compiled object code,
|
||||
generated documentation, and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or Object form, made
|
||||
available under the License, as indicated by a copyright notice that is included
|
||||
in or attached to the work (an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object form, that
|
||||
is based on (or derived from) the Work and for which the editorial revisions,
|
||||
annotations, elaborations, or other modifications represent, as a whole, an
|
||||
original work of authorship. For the purposes of this License, Derivative Works
|
||||
shall not include works that remain separable from, or merely link (or bind by
|
||||
name) to the interfaces of, the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including the original version
|
||||
of the Work and any modifications or additions to that Work or Derivative Works
|
||||
thereof, that is intentionally submitted to Licensor for inclusion in the Work
|
||||
by the copyright owner or by an individual or Legal Entity authorized to submit
|
||||
on behalf of the copyright owner. For the purposes of this definition,
|
||||
"submitted" means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems, and
|
||||
issue tracking systems that are managed by, or on behalf of, the Licensor for
|
||||
the purpose of discussing and improving the Work, but excluding communication
|
||||
that is conspicuously marked or otherwise designated in writing by the copyright
|
||||
owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf
|
||||
of whom a Contribution has been received by Licensor and subsequently
|
||||
incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License.
|
||||
|
||||
Subject to the terms and conditions of this License, each Contributor hereby
|
||||
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
|
||||
irrevocable copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the Work and such
|
||||
Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License.
|
||||
|
||||
Subject to the terms and conditions of this License, each Contributor hereby
|
||||
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
|
||||
irrevocable (except as stated in this section) patent license to make, have
|
||||
made, use, offer to sell, sell, import, and otherwise transfer the Work, where
|
||||
such license applies only to those patent claims licensable by such Contributor
|
||||
that are necessarily infringed by their Contribution(s) alone or by combination
|
||||
of their Contribution(s) with the Work to which such Contribution(s) was
|
||||
submitted. If You institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work or a
|
||||
Contribution incorporated within the Work constitutes direct or contributory
|
||||
patent infringement, then any patent licenses granted to You under this License
|
||||
for that Work shall terminate as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution.
|
||||
|
||||
You may reproduce and distribute copies of the Work or Derivative Works thereof
|
||||
in any medium, with or without modifications, and in Source or Object form,
|
||||
provided that You meet the following conditions:
|
||||
|
||||
You must give any other recipients of the Work or Derivative Works a copy of
|
||||
this License; and
|
||||
You must cause any modified files to carry prominent notices stating that You
|
||||
changed the files; and
|
||||
You must retain, in the Source form of any Derivative Works that You distribute,
|
||||
all copyright, patent, trademark, and attribution notices from the Source form
|
||||
of the Work, excluding those notices that do not pertain to any part of the
|
||||
Derivative Works; and
|
||||
If the Work includes a "NOTICE" text file as part of its distribution, then any
|
||||
Derivative Works that You distribute must include a readable copy of the
|
||||
attribution notices contained within such NOTICE file, excluding those notices
|
||||
that do not pertain to any part of the Derivative Works, in at least one of the
|
||||
following places: within a NOTICE text file distributed as part of the
|
||||
Derivative Works; within the Source form or documentation, if provided along
|
||||
with the Derivative Works; or, within a display generated by the Derivative
|
||||
Works, if and wherever such third-party notices normally appear. The contents of
|
||||
the NOTICE file are for informational purposes only and do not modify the
|
||||
License. You may add Your own attribution notices within Derivative Works that
|
||||
You distribute, alongside or as an addendum to the NOTICE text from the Work,
|
||||
provided that such additional attribution notices cannot be construed as
|
||||
modifying the License.
|
||||
You may add Your own copyright statement to Your modifications and may provide
|
||||
additional or different license terms and conditions for use, reproduction, or
|
||||
distribution of Your modifications, or for any such Derivative Works as a whole,
|
||||
provided Your use, reproduction, and distribution of the Work otherwise complies
|
||||
with the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions.
|
||||
|
||||
Unless You explicitly state otherwise, any Contribution intentionally submitted
|
||||
for inclusion in the Work by You to the Licensor shall be under the terms and
|
||||
conditions of this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify the terms of
|
||||
any separate license agreement you may have executed with Licensor regarding
|
||||
such Contributions.
|
||||
|
||||
6. Trademarks.
|
||||
|
||||
This License does not grant permission to use the trade names, trademarks,
|
||||
service marks, or product names of the Licensor, except as required for
|
||||
reasonable and customary use in describing the origin of the Work and
|
||||
reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty.
|
||||
|
||||
Unless required by applicable law or agreed to in writing, Licensor provides the
|
||||
Work (and each Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
|
||||
including, without limitation, any warranties or conditions of TITLE,
|
||||
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
|
||||
solely responsible for determining the appropriateness of using or
|
||||
redistributing the Work and assume any risks associated with Your exercise of
|
||||
permissions under this License.
|
||||
|
||||
8. Limitation of Liability.
|
||||
|
||||
In no event and under no legal theory, whether in tort (including negligence),
|
||||
contract, or otherwise, unless required by applicable law (such as deliberate
|
||||
and grossly negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special, incidental,
|
||||
or consequential damages of any character arising as a result of this License or
|
||||
out of the use or inability to use the Work (including but not limited to
|
||||
damages for loss of goodwill, work stoppage, computer failure or malfunction, or
|
||||
any and all other commercial damages or losses), even if such Contributor has
|
||||
been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability.
|
||||
|
||||
While redistributing the Work or Derivative Works thereof, You may choose to
|
||||
offer, and charge a fee for, acceptance of support, warranty, indemnity, or
|
||||
other liability obligations and/or rights consistent with this License. However,
|
||||
in accepting such obligations, You may act only on Your own behalf and on Your
|
||||
sole responsibility, not on behalf of any other Contributor, and only if You
|
||||
agree to indemnify, defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason of your
|
||||
accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work
|
||||
|
||||
To apply the Apache License to your work, attach the following boilerplate
|
||||
notice, with the fields enclosed by brackets "{}" replaced with your own
|
||||
identifying information. (Don't include the brackets!) The text should be
|
||||
enclosed in the appropriate comment syntax for the file format. We also
|
||||
recommend that a file or class name and description of purpose be included on
|
||||
the same "printed page" as the copyright notice for easier identification within
|
||||
third-party archives.
|
||||
|
||||
Copyright 2019-2020 Zheng Jie
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
36
README.en.md
36
README.en.md
|
|
@ -1,36 +0,0 @@
|
|||
# cashierAdmin
|
||||
|
||||
#### Description
|
||||
{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**}
|
||||
|
||||
#### Software Architecture
|
||||
Software architecture description
|
||||
|
||||
#### Installation
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Instructions
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Contribution
|
||||
|
||||
1. Fork the repository
|
||||
2. Create Feat_xxx branch
|
||||
3. Commit your code
|
||||
4. Create Pull Request
|
||||
|
||||
|
||||
#### Gitee Feature
|
||||
|
||||
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
|
||||
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
|
||||
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
|
||||
4. The most valuable open source project [GVP](https://gitee.com/gvp)
|
||||
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
|
||||
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
||||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.annotation;
|
||||
|
||||
import cn.ysk.cashier.aspect.LimitType;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.aspect;
|
||||
|
||||
import cn.ysk.cashier.exception.BadRequestException;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.aspect;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.base;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.base;
|
||||
|
||||
import java.util.List;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.config;
|
||||
|
||||
import cn.ysk.cashier.utils.SecurityUtils;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.config;
|
||||
|
||||
import lombok.Data;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.config;
|
||||
|
||||
import cn.ysk.cashier.utils.SecurityUtils;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.config;
|
||||
|
||||
import lombok.Data;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.config;
|
||||
|
||||
import cn.hutool.core.lang.Assert;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.config;
|
||||
|
||||
import lombok.Data;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.config;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
|
|
|
|||
|
|
@ -1,20 +1,7 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.exception;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import lombok.Getter;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import static org.springframework.http.HttpStatus.BAD_REQUEST;
|
||||
|
|
@ -37,4 +24,8 @@ public class BadRequestException extends RuntimeException{
|
|||
super(msg);
|
||||
this.status = status.value();
|
||||
}
|
||||
|
||||
public BadRequestException(String template ,Object... args){
|
||||
super(StrUtil.format(template, args));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.exception;
|
||||
|
||||
import org.springframework.util.StringUtils;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.exception;
|
||||
|
||||
import org.springframework.util.StringUtils;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.exception.handler;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.exception.handler;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
|
@ -99,9 +85,9 @@ public class GlobalExceptionHandler {
|
|||
log.error(ThrowableUtil.getStackTrace(e));
|
||||
ObjectError objectError = e.getBindingResult().getAllErrors().get(0);
|
||||
String message = objectError.getDefaultMessage();
|
||||
if (objectError instanceof FieldError) {
|
||||
message = ((FieldError) objectError).getField() + ": " + message;
|
||||
}
|
||||
// if (objectError instanceof FieldError) {
|
||||
// message = ((FieldError) objectError).getField() + ": " + message;
|
||||
// }
|
||||
return buildResponseEntity(ApiError.error(message));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -74,4 +74,6 @@ public interface CacheKey {
|
|||
*/
|
||||
String PRODUCT = "PRODUCT:";
|
||||
String SONG_URL = "song:";
|
||||
|
||||
String VIPCODE = "VIPCODE:";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.utils;
|
||||
|
||||
import java.io.Closeable;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.utils;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.utils;
|
||||
|
||||
import javax.crypto.Cipher;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.utils;
|
||||
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
|
|
@ -23,9 +9,11 @@ import cn.hutool.poi.excel.ExcelUtil;
|
|||
import cn.hutool.poi.excel.ExcelWriter;
|
||||
import cn.ysk.cashier.exception.BadRequestException;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.ss.util.CellRangeAddress;
|
||||
import org.apache.poi.util.IOUtils;
|
||||
import org.apache.poi.xssf.streaming.SXSSFSheet;
|
||||
import org.apache.poi.xssf.usermodel.XSSFSheet;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
|
@ -37,10 +25,8 @@ import java.io.*;
|
|||
import java.security.MessageDigest;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
|
||||
/**
|
||||
* File工具类,扩展 hutool 工具包
|
||||
|
|
@ -237,6 +223,69 @@ public class FileUtil extends cn.hutool.core.io.FileUtil {
|
|||
IoUtil.close(out);
|
||||
}
|
||||
|
||||
public static void downloadAndMergeExcel(List<Map<String, Object>> list, List<List<Integer>> mergeData, List<String> keyList, HttpServletResponse response) throws IOException {
|
||||
String tempPath = SYS_TEM_DIR + IdUtil.fastSimpleUUID() + ".xlsx";
|
||||
|
||||
// 创建工作簿
|
||||
Workbook workbook = new XSSFWorkbook();
|
||||
// 创建工作表
|
||||
Sheet sheet = workbook.createSheet("Sheet1");
|
||||
|
||||
// 合并单元格,从第 0 行第 0 列到第 0 行第 2 列
|
||||
// sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, 2));
|
||||
|
||||
for (List<Integer> mergeDatum : mergeData) {
|
||||
sheet.addMergedRegion(new CellRangeAddress(mergeDatum.get(0), mergeDatum.get(1), mergeDatum.get(2), mergeDatum.get(3)));
|
||||
}
|
||||
|
||||
Row row0 = sheet.createRow(0);
|
||||
for (int i = 0; i < keyList.size(); i++) {
|
||||
Cell cell = row0.createCell(i);
|
||||
cell.setCellValue(keyList.get(i));
|
||||
}
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
Map<String, Object> map = list.get(i);
|
||||
Row row = sheet.createRow(i + 1);
|
||||
for (int j = 0; j < keyList.size(); j++) {
|
||||
Cell cell = row.createCell(j);
|
||||
String value = map.get(keyList.get(j)) == null ? "" : map.get(keyList.get(j)).toString();
|
||||
cell.setCellValue(value);
|
||||
|
||||
if (j == 11 && !"0".equals(value)) {
|
||||
cell.setCellValue("-" + value);
|
||||
setCellBackground(cell, IndexedColors.YELLOW, workbook);
|
||||
}
|
||||
|
||||
if (j == 12 && !"0.00".equals(value)) {
|
||||
cell.setCellValue("-" + value);
|
||||
setCellBackground(cell, IndexedColors.YELLOW, workbook);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// response为HttpServletResponse对象
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8");
|
||||
response.setHeader("Content-Disposition", "attachment;filename=file.xlsx");
|
||||
|
||||
try (FileOutputStream outputStream = new FileOutputStream(tempPath);
|
||||
ServletOutputStream out = response.getOutputStream()) {
|
||||
|
||||
workbook.write(outputStream);
|
||||
workbook.write(out);
|
||||
} catch (IOException e) {
|
||||
// 更详细的错误处理
|
||||
e.printStackTrace();
|
||||
// 可以考虑返回一个错误响应给客户端
|
||||
}
|
||||
}
|
||||
|
||||
private static void setCellBackground(Cell cell, IndexedColors color, Workbook workbook) {
|
||||
CellStyle style = workbook.createCellStyle();
|
||||
style.setFillForegroundColor(color.getIndex());
|
||||
style.setFillPattern(FillPatternType.SOLID_FOREGROUND);
|
||||
cell.setCellStyle(style);
|
||||
}
|
||||
|
||||
/**
|
||||
* 输入标题到excel
|
||||
*
|
||||
|
|
@ -270,7 +319,7 @@ public class FileUtil extends cn.hutool.core.io.FileUtil {
|
|||
}
|
||||
}
|
||||
|
||||
public static void downloadExcelAndMerge(List<Map<String, Object>> list, int colSize, HttpServletResponse response, ArrayList<Integer> mergeRowIndex) throws IOException {
|
||||
public static void downloadExcelAndMerge(ConcurrentLinkedQueue<Map<String, Object>> list, int colSize, HttpServletResponse response, List<Integer> mergeRowIndex) throws IOException {
|
||||
String tempPath = SYS_TEM_DIR + IdUtil.fastSimpleUUID() + ".xlsx";
|
||||
File file = new File(tempPath);
|
||||
ExcelWriter writer = ExcelUtil.getWriter(file);
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
|
|||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.serializer.SerializeConfig;
|
||||
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -87,6 +88,38 @@ public class JSONUtil {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
public static <T> List<T> parseJSONStrTList(String jsonStr, Class<T> clazz) {
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
try {
|
||||
// 将JSON字符串转换为List<T>
|
||||
return objectMapper.readValue(jsonStr, objectMapper.getTypeFactory().constructCollectionType(List.class, clazz));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param list 某集合
|
||||
* @param clazz 要转成的实体
|
||||
* 需要在目标实体增加注解 忽略未知属性 @JsonIgnoreProperties(ignoreUnknown = true)
|
||||
* @return
|
||||
* @param <T>
|
||||
*/
|
||||
public static <T> List<T> parseListTNewList(List<?> list, Class<T> clazz) {
|
||||
ObjectMapper objectMapper = new ObjectMapper(); // 创建JSON转换器
|
||||
try {
|
||||
// 将List<?>转换为JSON字符串
|
||||
String json = objectMapper.writeValueAsString(list);
|
||||
// 将JSON字符串转换为List<T>
|
||||
return objectMapper.readValue(json, objectMapper.getTypeFactory().constructCollectionType(List.class, clazz));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
String sss = "{\"bizData\":{\"amount\":1,\"currency\":\"cny\",\"ifCode\":\"sxfpay\",\"mchOrderNo\":\"CZ1715744291232\",\"mercNo\":\"B240510702030\",\"note\":\"等待用户付款\",\"payOrderId\":\"O1790587460614225921\",\"payType\":\"WECHAT\",\"settlementType\":\"D1\",\"state\":\"TRADE_AWAIT\",\"storeId\":\"S2405103298\",\"subject\":\"测试支付\",\"tradeFee\":0},\"code\":\"000000\",\"msg\":\"请求成功\",\"sign\":\"40710a3c293eeac3c7f4a1b0696a2bf6\",\"signType\":\"MD5\",\"timestamp\":\"20240515113813\"}";
|
||||
// TypeReference<PublicResp<MainScanResp>> typeRef = new TypeReference<PublicResp<MainScanResp>>(){};
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.utils;
|
||||
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.utils;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.utils;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
|
@ -257,6 +243,15 @@ public class RedisUtils {
|
|||
}
|
||||
}
|
||||
|
||||
public boolean setNx(String key, Object value) {
|
||||
try {
|
||||
return redisTemplate.opsForValue().setIfAbsent(key, value);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 普通缓存放入并设置时间
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.utils;
|
||||
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.utils;
|
||||
|
||||
import cn.hutool.json.JSONArray;
|
||||
|
|
@ -26,6 +12,7 @@ import org.springframework.security.core.Authentication;
|
|||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
import org.springframework.security.core.userdetails.UserDetailsService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -71,6 +58,15 @@ public class SecurityUtils {
|
|||
return new JSONObject(new JSONObject(userDetails).get("user")).get("id", Long.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取系统用户nickName
|
||||
* @return 系统用户NickName
|
||||
*/
|
||||
public static String getCurrentUserNickName() {
|
||||
UserDetails userDetails = getCurrentUser();
|
||||
return new JSONObject(new JSONObject(userDetails).get("user")).get("nickName", String.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前用户的数据权限
|
||||
* @return /
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.utils;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.utils;
|
||||
|
||||
import cn.hutool.http.HttpUtil;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.utils;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.utils;
|
||||
|
||||
import cn.hutool.json.JSONArray;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.utils;
|
||||
|
||||
import cn.hutool.core.lang.Validator;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.utils.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.utils.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.utils.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.utils.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
|
|
|
|||
|
|
@ -1,39 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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">
|
||||
<parent>
|
||||
<artifactId>eladmin</artifactId>
|
||||
<groupId>cn.ysk.cashier</groupId>
|
||||
<version>2.6</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>eladmin-generator</artifactId>
|
||||
<name>代码生成模块</name>
|
||||
|
||||
<properties>
|
||||
<configuration.version>1.10</configuration.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>cn.ysk.cashier</groupId>
|
||||
<artifactId>eladmin-common</artifactId>
|
||||
<version>2.6</version>
|
||||
</dependency>
|
||||
|
||||
<!--模板引擎-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-freemarker</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/commons-configuration/commons-configuration -->
|
||||
<dependency>
|
||||
<groupId>commons-configuration</groupId>
|
||||
<artifactId>commons-configuration</artifactId>
|
||||
<version>${configuration.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
@ -1,97 +0,0 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import cn.ysk.cashier.utils.GenUtil;
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 列的数据信息
|
||||
* @author Zheng Jie
|
||||
* @date 2019-01-02
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@NoArgsConstructor
|
||||
@Table(name = "code_column_config")
|
||||
public class ColumnInfo implements Serializable {
|
||||
|
||||
@Id
|
||||
@Column(name = "column_id")
|
||||
@ApiModelProperty(value = "ID", hidden = true)
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "表名")
|
||||
private String tableName;
|
||||
|
||||
@ApiModelProperty(value = "数据库字段名称")
|
||||
private String columnName;
|
||||
|
||||
@ApiModelProperty(value = "数据库字段类型")
|
||||
private String columnType;
|
||||
|
||||
@ApiModelProperty(value = "数据库字段键类型")
|
||||
private String keyType;
|
||||
|
||||
@ApiModelProperty(value = "字段额外的参数")
|
||||
private String extra;
|
||||
|
||||
@ApiModelProperty(value = "数据库字段描述")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(value = "是否必填")
|
||||
private Boolean notNull;
|
||||
|
||||
@ApiModelProperty(value = "是否在列表显示")
|
||||
private Boolean listShow;
|
||||
|
||||
@ApiModelProperty(value = "是否表单显示")
|
||||
private Boolean formShow;
|
||||
|
||||
@ApiModelProperty(value = "表单类型")
|
||||
private String formType;
|
||||
|
||||
@ApiModelProperty(value = "查询 1:模糊 2:精确")
|
||||
private String queryType;
|
||||
|
||||
@ApiModelProperty(value = "字典名称")
|
||||
private String dictName;
|
||||
|
||||
@ApiModelProperty(value = "日期注解")
|
||||
private String dateAnnotation;
|
||||
|
||||
public ColumnInfo(String tableName, String columnName, Boolean notNull, String columnType, String remark, String keyType, String extra) {
|
||||
this.tableName = tableName;
|
||||
this.columnName = columnName;
|
||||
this.columnType = columnType;
|
||||
this.keyType = keyType;
|
||||
this.extra = extra;
|
||||
this.notNull = notNull;
|
||||
if(GenUtil.PK.equalsIgnoreCase(keyType) && GenUtil.EXTRA.equalsIgnoreCase(extra)){
|
||||
this.notNull = false;
|
||||
}
|
||||
this.remark = remark;
|
||||
this.listShow = true;
|
||||
this.formShow = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,78 +0,0 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 代码生成配置
|
||||
* @author Zheng Jie
|
||||
* @date 2019-01-03
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@NoArgsConstructor
|
||||
@Table(name = "code_gen_config")
|
||||
public class GenConfig implements Serializable {
|
||||
|
||||
public GenConfig(String tableName) {
|
||||
this.tableName = tableName;
|
||||
}
|
||||
|
||||
@Id
|
||||
@Column(name = "config_id")
|
||||
@ApiModelProperty(value = "ID", hidden = true)
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "表名")
|
||||
private String tableName;
|
||||
|
||||
@ApiModelProperty(value = "接口名称")
|
||||
private String apiAlias;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "包路径")
|
||||
private String pack;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "模块名")
|
||||
private String moduleName;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "前端文件路径")
|
||||
private String path;
|
||||
|
||||
@ApiModelProperty(value = "前端文件路径")
|
||||
private String apiPath;
|
||||
|
||||
@ApiModelProperty(value = "作者")
|
||||
private String author;
|
||||
|
||||
@ApiModelProperty(value = "表前缀")
|
||||
private String prefix;
|
||||
|
||||
@ApiModelProperty(value = "是否覆盖")
|
||||
private Boolean cover = false;
|
||||
}
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.domain.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 表的数据信息
|
||||
* @author Zheng Jie
|
||||
* @date 2019-01-02
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class TableInfo {
|
||||
|
||||
/** 表名称 */
|
||||
private Object tableName;
|
||||
|
||||
/** 创建日期 */
|
||||
private Object createTime;
|
||||
|
||||
/** 数据库引擎 */
|
||||
private Object engine;
|
||||
|
||||
/** 编码集 */
|
||||
private Object coding;
|
||||
|
||||
/** 备注 */
|
||||
private Object remark;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.repository;
|
||||
|
||||
import cn.ysk.cashier.domain.ColumnInfo;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Zheng Jie
|
||||
* @date 2019-01-14
|
||||
*/
|
||||
public interface ColumnInfoRepository extends JpaRepository<ColumnInfo,Long> {
|
||||
|
||||
/**
|
||||
* 查询表信息
|
||||
* @param tableName 表格名
|
||||
* @return 表信息
|
||||
*/
|
||||
List<ColumnInfo> findByTableNameOrderByIdAsc(String tableName);
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.repository;
|
||||
|
||||
import cn.ysk.cashier.domain.GenConfig;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
/**
|
||||
* @author Zheng Jie
|
||||
* @date 2019-01-14
|
||||
*/
|
||||
public interface GenConfigRepository extends JpaRepository<GenConfig,Long> {
|
||||
|
||||
/**
|
||||
* 查询表配置
|
||||
* @param tableName 表名
|
||||
* @return /
|
||||
*/
|
||||
GenConfig findByTableName(String tableName);
|
||||
}
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.rest;
|
||||
|
||||
import cn.ysk.cashier.domain.GenConfig;
|
||||
import cn.ysk.cashier.service.GenConfigService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* @author Zheng Jie
|
||||
* @date 2019-01-14
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/api/genConfig")
|
||||
@Api(tags = "系统:代码生成器配置管理")
|
||||
public class GenConfigController {
|
||||
|
||||
private final GenConfigService genConfigService;
|
||||
|
||||
@ApiOperation("查询")
|
||||
@GetMapping(value = "/{tableName}")
|
||||
public ResponseEntity<Object> queryGenConfig(@PathVariable String tableName){
|
||||
return new ResponseEntity<>(genConfigService.find(tableName), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation("修改")
|
||||
public ResponseEntity<Object> updateGenConfig(@Validated @RequestBody GenConfig genConfig){
|
||||
return new ResponseEntity<>(genConfigService.update(genConfig.getTableName(), genConfig),HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,107 +0,0 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.rest;
|
||||
|
||||
import cn.ysk.cashier.domain.ColumnInfo;
|
||||
import cn.ysk.cashier.exception.BadRequestException;
|
||||
import cn.ysk.cashier.service.GenConfigService;
|
||||
import cn.ysk.cashier.service.GeneratorService;
|
||||
import cn.ysk.cashier.utils.PageUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Zheng Jie
|
||||
* @date 2019-01-02
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/api/generator")
|
||||
@Api(tags = "系统:代码生成管理")
|
||||
public class GeneratorController {
|
||||
|
||||
private final GeneratorService generatorService;
|
||||
private final GenConfigService genConfigService;
|
||||
|
||||
@Value("${generator.enabled}")
|
||||
private Boolean generatorEnabled;
|
||||
|
||||
@ApiOperation("查询数据库数据")
|
||||
@GetMapping(value = "/tables/all")
|
||||
public ResponseEntity<Object> queryAllTables(){
|
||||
return new ResponseEntity<>(generatorService.getTables(), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@ApiOperation("查询数据库数据")
|
||||
@GetMapping(value = "/tables")
|
||||
public ResponseEntity<Object> queryTables(@RequestParam(defaultValue = "") String name,
|
||||
@RequestParam(defaultValue = "0")Integer page,
|
||||
@RequestParam(defaultValue = "10")Integer size){
|
||||
int[] startEnd = PageUtil.transToStartEnd(page, size);
|
||||
return new ResponseEntity<>(generatorService.getTables(name,startEnd), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@ApiOperation("查询字段数据")
|
||||
@GetMapping(value = "/columns")
|
||||
public ResponseEntity<Object> queryColumns(@RequestParam String tableName){
|
||||
List<ColumnInfo> columnInfos = generatorService.getColumns(tableName);
|
||||
return new ResponseEntity<>(PageUtil.toPage(columnInfos,columnInfos.size()), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@ApiOperation("保存字段数据")
|
||||
@PutMapping
|
||||
public ResponseEntity<HttpStatus> saveColumn(@RequestBody List<ColumnInfo> columnInfos){
|
||||
generatorService.save(columnInfos);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@ApiOperation("同步字段数据")
|
||||
@PostMapping(value = "sync")
|
||||
public ResponseEntity<HttpStatus> syncColumn(@RequestBody List<String> tables){
|
||||
for (String table : tables) {
|
||||
generatorService.sync(generatorService.getColumns(table), generatorService.query(table));
|
||||
}
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@ApiOperation("生成代码")
|
||||
@PostMapping(value = "/{tableName}/{type}")
|
||||
public ResponseEntity<Object> generatorCode(@PathVariable String tableName, @PathVariable Integer type, HttpServletRequest request, HttpServletResponse response){
|
||||
if(!generatorEnabled && type == 0){
|
||||
throw new BadRequestException("此环境不允许生成代码,请选择预览或者下载查看!");
|
||||
}
|
||||
switch (type){
|
||||
// 生成代码
|
||||
case 0: generatorService.generator(genConfigService.find(tableName), generatorService.getColumns(tableName));
|
||||
break;
|
||||
// 预览
|
||||
case 1: return generatorService.preview(genConfigService.find(tableName), generatorService.getColumns(tableName));
|
||||
// 打包
|
||||
case 2: generatorService.download(genConfigService.find(tableName), generatorService.getColumns(tableName), request, response);
|
||||
break;
|
||||
default: throw new BadRequestException("没有这个选项");
|
||||
}
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.service;
|
||||
|
||||
import cn.ysk.cashier.domain.GenConfig;
|
||||
|
||||
/**
|
||||
* @author Zheng Jie
|
||||
* @date 2019-01-14
|
||||
*/
|
||||
public interface GenConfigService {
|
||||
|
||||
/**
|
||||
* 查询表配置
|
||||
* @param tableName 表名
|
||||
* @return 表配置
|
||||
*/
|
||||
GenConfig find(String tableName);
|
||||
|
||||
/**
|
||||
* 更新表配置
|
||||
* @param tableName 表名
|
||||
* @param genConfig 表配置
|
||||
* @return 表配置
|
||||
*/
|
||||
GenConfig update(String tableName, GenConfig genConfig);
|
||||
}
|
||||
|
|
@ -1,96 +0,0 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.service;
|
||||
|
||||
import cn.ysk.cashier.domain.GenConfig;
|
||||
import cn.ysk.cashier.domain.ColumnInfo;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Zheng Jie
|
||||
* @date 2019-01-02
|
||||
*/
|
||||
public interface GeneratorService {
|
||||
|
||||
/**
|
||||
* 查询数据库元数据
|
||||
* @param name 表名
|
||||
* @param startEnd 分页参数
|
||||
* @return /
|
||||
*/
|
||||
Object getTables(String name, int[] startEnd);
|
||||
|
||||
/**
|
||||
* 得到数据表的元数据
|
||||
* @param name 表名
|
||||
* @return /
|
||||
*/
|
||||
List<ColumnInfo> getColumns(String name);
|
||||
|
||||
/**
|
||||
* 同步表数据
|
||||
* @param columnInfos /
|
||||
* @param columnInfoList /
|
||||
*/
|
||||
void sync(List<ColumnInfo> columnInfos, List<ColumnInfo> columnInfoList);
|
||||
|
||||
/**
|
||||
* 保持数据
|
||||
* @param columnInfos /
|
||||
*/
|
||||
void save(List<ColumnInfo> columnInfos);
|
||||
|
||||
/**
|
||||
* 获取所有table
|
||||
* @return /
|
||||
*/
|
||||
Object getTables();
|
||||
|
||||
/**
|
||||
* 代码生成
|
||||
* @param genConfig 配置信息
|
||||
* @param columns 字段信息
|
||||
*/
|
||||
void generator(GenConfig genConfig, List<ColumnInfo> columns);
|
||||
|
||||
/**
|
||||
* 预览
|
||||
* @param genConfig 配置信息
|
||||
* @param columns 字段信息
|
||||
* @return /
|
||||
*/
|
||||
ResponseEntity<Object> preview(GenConfig genConfig, List<ColumnInfo> columns);
|
||||
|
||||
/**
|
||||
* 打包下载
|
||||
* @param genConfig 配置信息
|
||||
* @param columns 字段信息
|
||||
* @param request /
|
||||
* @param response /
|
||||
*/
|
||||
void download(GenConfig genConfig, List<ColumnInfo> columns, HttpServletRequest request, HttpServletResponse response);
|
||||
|
||||
/**
|
||||
* 查询数据库的表字段数据数据
|
||||
* @param table /
|
||||
* @return /
|
||||
*/
|
||||
List<ColumnInfo> query(String table);
|
||||
}
|
||||
|
|
@ -1,66 +0,0 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.service.impl;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import cn.ysk.cashier.domain.GenConfig;
|
||||
import cn.ysk.cashier.repository.GenConfigRepository;
|
||||
import cn.ysk.cashier.service.GenConfigService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* @author Zheng Jie
|
||||
* @date 2019-01-14
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class GenConfigServiceImpl implements GenConfigService {
|
||||
|
||||
private final GenConfigRepository genConfigRepository;
|
||||
|
||||
@Override
|
||||
public GenConfig find(String tableName) {
|
||||
GenConfig genConfig = genConfigRepository.findByTableName(tableName);
|
||||
if(genConfig == null){
|
||||
return new GenConfig(tableName);
|
||||
}
|
||||
return genConfig;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GenConfig update(String tableName, GenConfig genConfig) {
|
||||
String separator = File.separator;
|
||||
String[] paths;
|
||||
String symbol = "\\";
|
||||
if (symbol.equals(separator)) {
|
||||
paths = genConfig.getPath().split("\\\\");
|
||||
} else {
|
||||
paths = genConfig.getPath().split(File.separator);
|
||||
}
|
||||
StringBuilder api = new StringBuilder();
|
||||
for (String path : paths) {
|
||||
api.append(path);
|
||||
api.append(separator);
|
||||
if ("src".equals(path)) {
|
||||
api.append("api");
|
||||
break;
|
||||
}
|
||||
}
|
||||
genConfig.setApiPath(api.toString());
|
||||
return genConfigRepository.save(genConfig);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,206 +0,0 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.ZipUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import cn.ysk.cashier.domain.GenConfig;
|
||||
import cn.ysk.cashier.domain.ColumnInfo;
|
||||
import cn.ysk.cashier.domain.vo.TableInfo;
|
||||
import cn.ysk.cashier.exception.BadRequestException;
|
||||
import cn.ysk.cashier.repository.ColumnInfoRepository;
|
||||
import cn.ysk.cashier.service.GeneratorService;
|
||||
import cn.ysk.cashier.utils.FileUtil;
|
||||
import cn.ysk.cashier.utils.GenUtil;
|
||||
import cn.ysk.cashier.utils.PageUtil;
|
||||
import cn.ysk.cashier.utils.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.PersistenceContext;
|
||||
import javax.persistence.Query;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author Zheng Jie
|
||||
* @date 2019-01-02
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class GeneratorServiceImpl implements GeneratorService {
|
||||
private static final Logger log = LoggerFactory.getLogger(GeneratorServiceImpl.class);
|
||||
@PersistenceContext
|
||||
private EntityManager em;
|
||||
|
||||
private final ColumnInfoRepository columnInfoRepository;
|
||||
|
||||
private final String CONFIG_MESSAGE = "请先配置生成器";
|
||||
@Override
|
||||
public Object getTables() {
|
||||
// 使用预编译防止sql注入
|
||||
String sql = "select table_name ,create_time , engine, table_collation, table_comment from information_schema.tables " +
|
||||
"where table_schema = (select database()) " +
|
||||
"order by create_time desc";
|
||||
Query query = em.createNativeQuery(sql);
|
||||
return query.getResultList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getTables(String name, int[] startEnd) {
|
||||
// 使用预编译防止sql注入
|
||||
String sql = "select table_name ,create_time , engine, table_collation, table_comment from information_schema.tables " +
|
||||
"where table_schema = (select database()) " +
|
||||
"and table_name like :table order by create_time desc";
|
||||
Query query = em.createNativeQuery(sql);
|
||||
query.setFirstResult(startEnd[0]);
|
||||
query.setMaxResults(startEnd[1] - startEnd[0]);
|
||||
query.setParameter("table", StringUtils.isNotBlank(name) ? ("%" + name + "%") : "%%");
|
||||
List result = query.getResultList();
|
||||
List<TableInfo> tableInfos = new ArrayList<>();
|
||||
for (Object obj : result) {
|
||||
Object[] arr = (Object[]) obj;
|
||||
tableInfos.add(new TableInfo(arr[0], arr[1], arr[2], arr[3], ObjectUtil.isNotEmpty(arr[4]) ? arr[4] : "-"));
|
||||
}
|
||||
String countSql = "select count(1) from information_schema.tables " +
|
||||
"where table_schema = (select database()) and table_name like :table";
|
||||
Query queryCount = em.createNativeQuery(countSql);
|
||||
queryCount.setParameter("table", StringUtils.isNotBlank(name) ? ("%" + name + "%") : "%%");
|
||||
Object totalElements = queryCount.getSingleResult();
|
||||
return PageUtil.toPage(tableInfos, totalElements);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ColumnInfo> getColumns(String tableName) {
|
||||
List<ColumnInfo> columnInfos = columnInfoRepository.findByTableNameOrderByIdAsc(tableName);
|
||||
if (CollectionUtil.isNotEmpty(columnInfos)) {
|
||||
return columnInfos;
|
||||
} else {
|
||||
columnInfos = query(tableName);
|
||||
return columnInfoRepository.saveAll(columnInfos);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ColumnInfo> query(String tableName) {
|
||||
// 使用预编译防止sql注入
|
||||
String sql = "select column_name, is_nullable, data_type, column_comment, column_key, extra from information_schema.columns " +
|
||||
"where table_name = ? and table_schema = (select database()) order by ordinal_position";
|
||||
Query query = em.createNativeQuery(sql);
|
||||
query.setParameter(1, tableName);
|
||||
List result = query.getResultList();
|
||||
List<ColumnInfo> columnInfos = new ArrayList<>();
|
||||
for (Object obj : result) {
|
||||
Object[] arr = (Object[]) obj;
|
||||
columnInfos.add(
|
||||
new ColumnInfo(
|
||||
tableName,
|
||||
arr[0].toString(),
|
||||
"NO".equals(arr[1]),
|
||||
arr[2].toString(),
|
||||
ObjectUtil.isNotNull(arr[3]) ? arr[3].toString() : null,
|
||||
ObjectUtil.isNotNull(arr[4]) ? arr[4].toString() : null,
|
||||
ObjectUtil.isNotNull(arr[5]) ? arr[5].toString() : null)
|
||||
);
|
||||
}
|
||||
return columnInfos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sync(List<ColumnInfo> columnInfos, List<ColumnInfo> columnInfoList) {
|
||||
// 第一种情况,数据库类字段改变或者新增字段
|
||||
for (ColumnInfo columnInfo : columnInfoList) {
|
||||
// 根据字段名称查找
|
||||
List<ColumnInfo> columns = columnInfos.stream().filter(c -> c.getColumnName().equals(columnInfo.getColumnName())).collect(Collectors.toList());
|
||||
// 如果能找到,就修改部分可能被字段
|
||||
if (CollectionUtil.isNotEmpty(columns)) {
|
||||
ColumnInfo column = columns.get(0);
|
||||
column.setColumnType(columnInfo.getColumnType());
|
||||
column.setExtra(columnInfo.getExtra());
|
||||
column.setKeyType(columnInfo.getKeyType());
|
||||
if (StringUtils.isBlank(column.getRemark())) {
|
||||
column.setRemark(columnInfo.getRemark());
|
||||
}
|
||||
columnInfoRepository.save(column);
|
||||
} else {
|
||||
// 如果找不到,则保存新字段信息
|
||||
columnInfoRepository.save(columnInfo);
|
||||
}
|
||||
}
|
||||
// 第二种情况,数据库字段删除了
|
||||
for (ColumnInfo columnInfo : columnInfos) {
|
||||
// 根据字段名称查找
|
||||
List<ColumnInfo> columns = columnInfoList.stream().filter(c -> c.getColumnName().equals(columnInfo.getColumnName())).collect(Collectors.toList());
|
||||
// 如果找不到,就代表字段被删除了,则需要删除该字段
|
||||
if (CollectionUtil.isEmpty(columns)) {
|
||||
columnInfoRepository.delete(columnInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save(List<ColumnInfo> columnInfos) {
|
||||
columnInfoRepository.saveAll(columnInfos);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generator(GenConfig genConfig, List<ColumnInfo> columns) {
|
||||
if (genConfig.getId() == null) {
|
||||
throw new BadRequestException(CONFIG_MESSAGE);
|
||||
}
|
||||
try {
|
||||
GenUtil.generatorCode(columns, genConfig);
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new BadRequestException("生成失败,请手动处理已生成的文件");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseEntity<Object> preview(GenConfig genConfig, List<ColumnInfo> columns) {
|
||||
if (genConfig.getId() == null) {
|
||||
throw new BadRequestException(CONFIG_MESSAGE);
|
||||
}
|
||||
List<Map<String, Object>> genList = GenUtil.preview(columns, genConfig);
|
||||
return new ResponseEntity<>(genList, HttpStatus.OK);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void download(GenConfig genConfig, List<ColumnInfo> columns, HttpServletRequest request, HttpServletResponse response) {
|
||||
if (genConfig.getId() == null) {
|
||||
throw new BadRequestException(CONFIG_MESSAGE);
|
||||
}
|
||||
try {
|
||||
File file = new File(GenUtil.download(columns, genConfig));
|
||||
String zipPath = file.getPath() + ".zip";
|
||||
ZipUtil.zip(file.getPath(), zipPath);
|
||||
FileUtil.downloadFile(request, response, new File(zipPath), true);
|
||||
} catch (IOException e) {
|
||||
throw new BadRequestException("打包失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.utils;
|
||||
|
||||
import org.apache.commons.configuration.*;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* sql字段转java
|
||||
*
|
||||
* @author Zheng Jie
|
||||
* @date 2019-01-03
|
||||
*/
|
||||
public class ColUtil {
|
||||
private static final Logger log = LoggerFactory.getLogger(ColUtil.class);
|
||||
|
||||
/**
|
||||
* 转换mysql数据类型为java数据类型
|
||||
*
|
||||
* @param type 数据库字段类型
|
||||
* @return String
|
||||
*/
|
||||
static String cloToJava(String type) {
|
||||
Configuration config = getConfig();
|
||||
assert config != null;
|
||||
return config.getString(type, "unknowType");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取配置信息
|
||||
*/
|
||||
public static PropertiesConfiguration getConfig() {
|
||||
try {
|
||||
return new PropertiesConfiguration("generator.properties");
|
||||
} catch (ConfigurationException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,422 +0,0 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.utils;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.extra.template.*;
|
||||
import cn.ysk.cashier.domain.ColumnInfo;
|
||||
import cn.ysk.cashier.domain.GenConfig;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.Writer;
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
|
||||
import static cn.ysk.cashier.utils.FileUtil.SYS_TEM_DIR;
|
||||
|
||||
/**
|
||||
* 代码生成
|
||||
*
|
||||
* @author Zheng Jie
|
||||
* @date 2019-01-02
|
||||
*/
|
||||
@Slf4j
|
||||
@SuppressWarnings({"unchecked", "all"})
|
||||
public class GenUtil {
|
||||
|
||||
private static final String TIMESTAMP = "Timestamp";
|
||||
|
||||
private static final String BIGDECIMAL = "BigDecimal";
|
||||
|
||||
public static final String PK = "PRI";
|
||||
|
||||
public static final String EXTRA = "auto_increment";
|
||||
|
||||
/**
|
||||
* 获取后端代码模板名称
|
||||
*
|
||||
* @return List
|
||||
*/
|
||||
private static List<String> getAdminTemplateNames() {
|
||||
List<String> templateNames = new ArrayList<>();
|
||||
templateNames.add("Entity");
|
||||
templateNames.add("Dto");
|
||||
templateNames.add("Mapper");
|
||||
templateNames.add("Controller");
|
||||
templateNames.add("QueryCriteria");
|
||||
templateNames.add("Service");
|
||||
templateNames.add("ServiceImpl");
|
||||
templateNames.add("Repository");
|
||||
return templateNames;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取前端代码模板名称
|
||||
*
|
||||
* @return List
|
||||
*/
|
||||
private static List<String> getFrontTemplateNames() {
|
||||
List<String> templateNames = new ArrayList<>();
|
||||
templateNames.add("index");
|
||||
templateNames.add("api");
|
||||
return templateNames;
|
||||
}
|
||||
|
||||
public static List<Map<String, Object>> preview(List<ColumnInfo> columns, GenConfig genConfig) {
|
||||
Map<String, Object> genMap = getGenMap(columns, genConfig);
|
||||
List<Map<String, Object>> genList = new ArrayList<>();
|
||||
// 获取后端模版
|
||||
List<String> templates = getAdminTemplateNames();
|
||||
TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("template", TemplateConfig.ResourceMode.CLASSPATH));
|
||||
for (String templateName : templates) {
|
||||
Map<String, Object> map = new HashMap<>(1);
|
||||
Template template = engine.getTemplate("generator/admin/" + templateName + ".ftl");
|
||||
map.put("content", template.render(genMap));
|
||||
map.put("name", templateName);
|
||||
genList.add(map);
|
||||
}
|
||||
// 获取前端模版
|
||||
templates = getFrontTemplateNames();
|
||||
for (String templateName : templates) {
|
||||
Map<String, Object> map = new HashMap<>(1);
|
||||
Template template = engine.getTemplate("generator/front/" + templateName + ".ftl");
|
||||
map.put(templateName, template.render(genMap));
|
||||
map.put("content", template.render(genMap));
|
||||
map.put("name", templateName);
|
||||
genList.add(map);
|
||||
}
|
||||
return genList;
|
||||
}
|
||||
|
||||
public static String download(List<ColumnInfo> columns, GenConfig genConfig) throws IOException {
|
||||
// 拼接的路径:/tmpeladmin-gen-temp/,这个路径在Linux下需要root用户才有权限创建,非root用户会权限错误而失败,更改为: /tmp/eladmin-gen-temp/
|
||||
// String tempPath =SYS_TEM_DIR + "eladmin-gen-temp" + File.separator + genConfig.getTableName() + File.separator;
|
||||
String tempPath = SYS_TEM_DIR + "eladmin-gen-temp" + File.separator + genConfig.getTableName() + File.separator;
|
||||
Map<String, Object> genMap = getGenMap(columns, genConfig);
|
||||
TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("template", TemplateConfig.ResourceMode.CLASSPATH));
|
||||
// 生成后端代码
|
||||
List<String> templates = getAdminTemplateNames();
|
||||
for (String templateName : templates) {
|
||||
Template template = engine.getTemplate("generator/admin/" + templateName + ".ftl");
|
||||
String filePath = getAdminFilePath(templateName, genConfig, genMap.get("className").toString(), tempPath + "eladmin" + File.separator);
|
||||
assert filePath != null;
|
||||
File file = new File(filePath);
|
||||
// 如果非覆盖生成
|
||||
if (!genConfig.getCover() && FileUtil.exist(file)) {
|
||||
continue;
|
||||
}
|
||||
// 生成代码
|
||||
genFile(file, template, genMap);
|
||||
}
|
||||
// 生成前端代码
|
||||
templates = getFrontTemplateNames();
|
||||
for (String templateName : templates) {
|
||||
Template template = engine.getTemplate("generator/front/" + templateName + ".ftl");
|
||||
String path = tempPath + "eladmin-web" + File.separator;
|
||||
String apiPath = path + "src" + File.separator + "api" + File.separator;
|
||||
String srcPath = path + "src" + File.separator + "views" + File.separator + genMap.get("changeClassName").toString() + File.separator;
|
||||
String filePath = getFrontFilePath(templateName, apiPath, srcPath, genMap.get("changeClassName").toString());
|
||||
assert filePath != null;
|
||||
File file = new File(filePath);
|
||||
// 如果非覆盖生成
|
||||
if (!genConfig.getCover() && FileUtil.exist(file)) {
|
||||
continue;
|
||||
}
|
||||
// 生成代码
|
||||
genFile(file, template, genMap);
|
||||
}
|
||||
return tempPath;
|
||||
}
|
||||
|
||||
public static void generatorCode(List<ColumnInfo> columnInfos, GenConfig genConfig) throws IOException {
|
||||
Map<String, Object> genMap = getGenMap(columnInfos, genConfig);
|
||||
TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("template", TemplateConfig.ResourceMode.CLASSPATH));
|
||||
// 生成后端代码
|
||||
List<String> templates = getAdminTemplateNames();
|
||||
for (String templateName : templates) {
|
||||
Template template = engine.getTemplate("generator/admin/" + templateName + ".ftl");
|
||||
String rootPath = System.getProperty("user.dir");
|
||||
String filePath = getAdminFilePath(templateName, genConfig, genMap.get("className").toString(), rootPath);
|
||||
|
||||
assert filePath != null;
|
||||
File file = new File(filePath);
|
||||
|
||||
// 如果非覆盖生成
|
||||
if (!genConfig.getCover() && FileUtil.exist(file)) {
|
||||
continue;
|
||||
}
|
||||
// 生成代码
|
||||
genFile(file, template, genMap);
|
||||
}
|
||||
|
||||
// 生成前端代码
|
||||
templates = getFrontTemplateNames();
|
||||
for (String templateName : templates) {
|
||||
Template template = engine.getTemplate("generator/front/" + templateName + ".ftl");
|
||||
String filePath = getFrontFilePath(templateName, genConfig.getApiPath(), genConfig.getPath(), genMap.get("changeClassName").toString());
|
||||
|
||||
assert filePath != null;
|
||||
File file = new File(filePath);
|
||||
|
||||
// 如果非覆盖生成
|
||||
if (!genConfig.getCover() && FileUtil.exist(file)) {
|
||||
continue;
|
||||
}
|
||||
// 生成代码
|
||||
genFile(file, template, genMap);
|
||||
}
|
||||
}
|
||||
|
||||
// 获取模版数据
|
||||
private static Map<String, Object> getGenMap(List<ColumnInfo> columnInfos, GenConfig genConfig) {
|
||||
// 存储模版字段数据
|
||||
Map<String, Object> genMap = new HashMap<>(16);
|
||||
// 接口别名
|
||||
genMap.put("apiAlias", genConfig.getApiAlias());
|
||||
// 包名称
|
||||
genMap.put("package", genConfig.getPack());
|
||||
// 模块名称
|
||||
genMap.put("moduleName", genConfig.getModuleName());
|
||||
// 作者
|
||||
genMap.put("author", genConfig.getAuthor());
|
||||
// 创建日期
|
||||
genMap.put("date", LocalDate.now().toString());
|
||||
// 表名
|
||||
genMap.put("tableName", genConfig.getTableName());
|
||||
// 大写开头的类名
|
||||
String className = StringUtils.toCapitalizeCamelCase(genConfig.getTableName());
|
||||
// 小写开头的类名
|
||||
String changeClassName = StringUtils.toCamelCase(genConfig.getTableName());
|
||||
// 判断是否去除表前缀
|
||||
if (StringUtils.isNotEmpty(genConfig.getPrefix())) {
|
||||
className = StringUtils.toCapitalizeCamelCase(StrUtil.removePrefix(genConfig.getTableName(), genConfig.getPrefix()));
|
||||
changeClassName = StringUtils.toCamelCase(StrUtil.removePrefix(genConfig.getTableName(), genConfig.getPrefix()));
|
||||
changeClassName = StringUtils.uncapitalize(changeClassName);
|
||||
}
|
||||
// 保存类名
|
||||
genMap.put("className", className);
|
||||
// 保存小写开头的类名
|
||||
genMap.put("changeClassName", changeClassName);
|
||||
// 存在 Timestamp 字段
|
||||
genMap.put("hasTimestamp", false);
|
||||
// 查询类中存在 Timestamp 字段
|
||||
genMap.put("queryHasTimestamp", false);
|
||||
// 存在 BigDecimal 字段
|
||||
genMap.put("hasBigDecimal", false);
|
||||
// 查询类中存在 BigDecimal 字段
|
||||
genMap.put("queryHasBigDecimal", false);
|
||||
// 是否需要创建查询
|
||||
genMap.put("hasQuery", false);
|
||||
// 自增主键
|
||||
genMap.put("auto", false);
|
||||
// 存在字典
|
||||
genMap.put("hasDict", false);
|
||||
// 存在日期注解
|
||||
genMap.put("hasDateAnnotation", false);
|
||||
// 保存字段信息
|
||||
List<Map<String, Object>> columns = new ArrayList<>();
|
||||
// 保存查询字段的信息
|
||||
List<Map<String, Object>> queryColumns = new ArrayList<>();
|
||||
// 存储字典信息
|
||||
List<String> dicts = new ArrayList<>();
|
||||
// 存储 between 信息
|
||||
List<Map<String, Object>> betweens = new ArrayList<>();
|
||||
// 存储不为空的字段信息
|
||||
List<Map<String, Object>> isNotNullColumns = new ArrayList<>();
|
||||
|
||||
for (ColumnInfo column : columnInfos) {
|
||||
Map<String, Object> listMap = new HashMap<>(16);
|
||||
// 字段描述
|
||||
listMap.put("remark", column.getRemark());
|
||||
// 字段类型
|
||||
listMap.put("columnKey", column.getKeyType());
|
||||
// 主键类型
|
||||
String colType = ColUtil.cloToJava(column.getColumnType());
|
||||
// 小写开头的字段名
|
||||
String changeColumnName = StringUtils.toCamelCase(column.getColumnName());
|
||||
// 大写开头的字段名
|
||||
String capitalColumnName = StringUtils.toCapitalizeCamelCase(column.getColumnName());
|
||||
if (PK.equals(column.getKeyType())) {
|
||||
// 存储主键类型
|
||||
genMap.put("pkColumnType", colType);
|
||||
// 存储小写开头的字段名
|
||||
genMap.put("pkChangeColName", changeColumnName);
|
||||
// 存储大写开头的字段名
|
||||
genMap.put("pkCapitalColName", capitalColumnName);
|
||||
}
|
||||
// 是否存在 Timestamp 类型的字段
|
||||
if (TIMESTAMP.equals(colType)) {
|
||||
genMap.put("hasTimestamp", true);
|
||||
}
|
||||
// 是否存在 BigDecimal 类型的字段
|
||||
if (BIGDECIMAL.equals(colType)) {
|
||||
genMap.put("hasBigDecimal", true);
|
||||
}
|
||||
// 主键是否自增
|
||||
if (EXTRA.equals(column.getExtra())) {
|
||||
genMap.put("auto", true);
|
||||
}
|
||||
// 主键存在字典
|
||||
if (StringUtils.isNotBlank(column.getDictName())) {
|
||||
genMap.put("hasDict", true);
|
||||
if(!dicts.contains(column.getDictName()))
|
||||
dicts.add(column.getDictName());
|
||||
}
|
||||
|
||||
// 存储字段类型
|
||||
listMap.put("columnType", colType);
|
||||
// 存储字原始段名称
|
||||
listMap.put("columnName", column.getColumnName());
|
||||
// 不为空
|
||||
listMap.put("istNotNull", column.getNotNull());
|
||||
// 字段列表显示
|
||||
listMap.put("columnShow", column.getListShow());
|
||||
// 表单显示
|
||||
listMap.put("formShow", column.getFormShow());
|
||||
// 表单组件类型
|
||||
listMap.put("formType", StringUtils.isNotBlank(column.getFormType()) ? column.getFormType() : "Input");
|
||||
// 小写开头的字段名称
|
||||
listMap.put("changeColumnName", changeColumnName);
|
||||
//大写开头的字段名称
|
||||
listMap.put("capitalColumnName", capitalColumnName);
|
||||
// 字典名称
|
||||
listMap.put("dictName", column.getDictName());
|
||||
// 日期注解
|
||||
listMap.put("dateAnnotation", column.getDateAnnotation());
|
||||
if (StringUtils.isNotBlank(column.getDateAnnotation())) {
|
||||
genMap.put("hasDateAnnotation", true);
|
||||
}
|
||||
// 添加非空字段信息
|
||||
if (column.getNotNull()) {
|
||||
isNotNullColumns.add(listMap);
|
||||
}
|
||||
// 判断是否有查询,如有则把查询的字段set进columnQuery
|
||||
if (!StringUtils.isBlank(column.getQueryType())) {
|
||||
// 查询类型
|
||||
listMap.put("queryType", column.getQueryType());
|
||||
// 是否存在查询
|
||||
genMap.put("hasQuery", true);
|
||||
if (TIMESTAMP.equals(colType)) {
|
||||
// 查询中存储 Timestamp 类型
|
||||
genMap.put("queryHasTimestamp", true);
|
||||
}
|
||||
if (BIGDECIMAL.equals(colType)) {
|
||||
// 查询中存储 BigDecimal 类型
|
||||
genMap.put("queryHasBigDecimal", true);
|
||||
}
|
||||
if ("between".equalsIgnoreCase(column.getQueryType())) {
|
||||
betweens.add(listMap);
|
||||
} else {
|
||||
// 添加到查询列表中
|
||||
queryColumns.add(listMap);
|
||||
}
|
||||
}
|
||||
// 添加到字段列表中
|
||||
columns.add(listMap);
|
||||
}
|
||||
// 保存字段列表
|
||||
genMap.put("columns", columns);
|
||||
// 保存查询列表
|
||||
genMap.put("queryColumns", queryColumns);
|
||||
// 保存字段列表
|
||||
genMap.put("dicts", dicts);
|
||||
// 保存查询列表
|
||||
genMap.put("betweens", betweens);
|
||||
// 保存非空字段信息
|
||||
genMap.put("isNotNullColumns", isNotNullColumns);
|
||||
return genMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 定义后端文件路径以及名称
|
||||
*/
|
||||
private static String getAdminFilePath(String templateName, GenConfig genConfig, String className, String rootPath) {
|
||||
String projectPath = rootPath + File.separator + genConfig.getModuleName();
|
||||
String packagePath = projectPath + File.separator + "src" + File.separator + "main" + File.separator + "java" + File.separator;
|
||||
if (!ObjectUtils.isEmpty(genConfig.getPack())) {
|
||||
packagePath += genConfig.getPack().replace(".", File.separator) + File.separator;
|
||||
}
|
||||
|
||||
if ("Entity".equals(templateName)) {
|
||||
return packagePath + "domain" + File.separator + className + ".java";
|
||||
}
|
||||
|
||||
if ("Controller".equals(templateName)) {
|
||||
return packagePath + "rest" + File.separator + className + "Controller.java";
|
||||
}
|
||||
|
||||
if ("Service".equals(templateName)) {
|
||||
return packagePath + "service" + File.separator + className + "Service.java";
|
||||
}
|
||||
|
||||
if ("ServiceImpl".equals(templateName)) {
|
||||
return packagePath + "service" + File.separator + "impl" + File.separator + className + "ServiceImpl.java";
|
||||
}
|
||||
|
||||
if ("Dto".equals(templateName)) {
|
||||
return packagePath + "service" + File.separator + "dto" + File.separator + className + "Dto.java";
|
||||
}
|
||||
|
||||
if ("QueryCriteria".equals(templateName)) {
|
||||
return packagePath + "service" + File.separator + "dto" + File.separator + className + "QueryCriteria.java";
|
||||
}
|
||||
|
||||
if ("Mapper".equals(templateName)) {
|
||||
return packagePath + "service" + File.separator + "mapstruct" + File.separator + className + "Mapper.java";
|
||||
}
|
||||
|
||||
if ("Repository".equals(templateName)) {
|
||||
return packagePath + "repository" + File.separator + className + "Repository.java";
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 定义前端文件路径以及名称
|
||||
*/
|
||||
private static String getFrontFilePath(String templateName, String apiPath, String path, String apiName) {
|
||||
|
||||
if ("api".equals(templateName)) {
|
||||
return apiPath + File.separator + apiName + ".js";
|
||||
}
|
||||
|
||||
if ("index".equals(templateName)) {
|
||||
return path + File.separator + "index.vue";
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private static void genFile(File file, Template template, Map<String, Object> map) throws IOException {
|
||||
// 生成目标文件
|
||||
Writer writer = null;
|
||||
try {
|
||||
FileUtil.touch(file);
|
||||
writer = new FileWriter(file);
|
||||
template.render(map, writer);
|
||||
} catch (TemplateException | IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
} finally {
|
||||
assert writer != null;
|
||||
writer.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.aspect;
|
||||
|
||||
import cn.ysk.cashier.domain.Log;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.domain;
|
||||
|
||||
import lombok.Getter;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.repository;
|
||||
|
||||
import cn.ysk.cashier.domain.Log;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.service;
|
||||
|
||||
import cn.ysk.cashier.service.dto.LogQueryCriteria;
|
||||
|
|
@ -67,6 +53,13 @@ public interface LogService {
|
|||
@Async
|
||||
void save(String username, String browser, String ip, ProceedingJoinPoint joinPoint, Log log,Integer shopId);
|
||||
|
||||
/**
|
||||
* @param description 描述
|
||||
* @param method 方法
|
||||
* @param param 入参
|
||||
*/
|
||||
void save(String description,String method,Integer shopId,String param);
|
||||
|
||||
/**
|
||||
* 查询异常详情
|
||||
* @param id 日志ID
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.service.impl;
|
||||
|
||||
import cn.hutool.core.lang.Dict;
|
||||
|
|
@ -40,6 +26,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Method;
|
||||
|
|
@ -96,8 +83,7 @@ public class LogServiceImpl implements LogService {
|
|||
String value = SpelUtil.generateKeyBySpEL(split[1], joinPoint);
|
||||
// 描述
|
||||
log.setDescription(split[0] + ":" + value);
|
||||
}
|
||||
if (split.length == 3) {
|
||||
} else if (split.length == 3) {
|
||||
// String v1 = SpelUtil.generateKeyBySpEL(split[1], joinPoint);
|
||||
String v2 = SpelUtil.generateKeyBySpEL(split[2], joinPoint);
|
||||
if (methodName.contains("createOutAndONOperate")) {
|
||||
|
|
@ -135,6 +121,25 @@ public class LogServiceImpl implements LogService {
|
|||
logRepository.save(log);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void save(String description,String method,Integer shopId,String param) {
|
||||
Log log = new Log();
|
||||
HttpServletRequest request = RequestHolder.getHttpServletRequest();
|
||||
log.setUsername(SecurityUtils.getCurrentUsername());
|
||||
log.setLogType("INFO");
|
||||
log.setBrowser(StringUtils.getBrowser(request));
|
||||
log.setRequestIp(StringUtils.getIp(request));
|
||||
log.setAddress(StringUtils.getCityInfo(log.getRequestIp()));
|
||||
log.setShopId(shopId);
|
||||
|
||||
log.setDescription(description);
|
||||
log.setMethod(method);
|
||||
log.setParams(param);
|
||||
logRepository.save(log);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据方法和传入的参数获取请求参数
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.service.mapstruct;
|
||||
|
||||
import cn.ysk.cashier.base.BaseMapper;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.service.mapstruct;
|
||||
|
||||
import cn.ysk.cashier.base.BaseMapper;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,15 @@
|
|||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-validation</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>p6spy</groupId>
|
||||
<artifactId>p6spy</artifactId>
|
||||
<version>3.8.2</version>
|
||||
</dependency>
|
||||
<!-- 代码生成模块 -->
|
||||
<dependency>
|
||||
<groupId>cn.ysk.cashier</groupId>
|
||||
|
|
@ -98,11 +106,13 @@
|
|||
<version>6.1.4</version>
|
||||
</dependency>
|
||||
|
||||
<!--
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>2.1.4</version>
|
||||
</dependency>
|
||||
-->
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.baomidou</groupId>-->
|
||||
|
|
@ -112,12 +122,12 @@
|
|||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-generator</artifactId>
|
||||
<version>3.5.3.1</version>
|
||||
<version>3.5.7</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
<version>3.5.3.1</version>
|
||||
<version>3.5.7</version>
|
||||
</dependency>
|
||||
|
||||
<!-- zxing生成二维码 -->
|
||||
|
|
@ -140,6 +150,13 @@
|
|||
<version>2.0.21</version>
|
||||
</dependency>
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>org.springframework</groupId>-->
|
||||
<!-- <artifactId>spring-context-indexer</artifactId>-->
|
||||
<!-- <version>5.2.0.RELEASE</version>-->
|
||||
<!-- <optional>true</optional>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
|
||||
</dependencies>
|
||||
<profiles>
|
||||
|
|
@ -150,9 +167,15 @@
|
|||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>pro</id>
|
||||
<id>pre</id>
|
||||
<properties>
|
||||
<env>pro</env>
|
||||
<env>pre</env>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>prod</id>
|
||||
<properties>
|
||||
<env>prod</env>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
|
|
|||
|
|
@ -1,23 +1,10 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import cn.ysk.cashier.annotation.rest.AnonymousGetMapping;
|
||||
import cn.ysk.cashier.utils.SpringContextHolder;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.context.ApplicationPidFileWriter;
|
||||
|
|
@ -36,8 +23,9 @@ import org.springframework.web.bind.annotation.RestController;
|
|||
@EnableAsync
|
||||
@RestController
|
||||
@Api(hidden = true)
|
||||
@SpringBootApplication
|
||||
@EnableTransactionManagement
|
||||
@SpringBootApplication
|
||||
@MapperScan("cn.ysk.cashier.mybatis.mapper")
|
||||
@EnableJpaAuditing(auditorAwareRef = "auditorAware")
|
||||
public class AppRun {
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ public class AppApiMethodAspect {
|
|||
"cn.ysk.cashier.controller.* " +
|
||||
"|| cn.ysk.cashier.controller.*.* " +
|
||||
"|| cn.ysk.cashier.mnt.rest.* " +
|
||||
"|| cn.ysk.cashier.cons.rest.* " +
|
||||
"|| cn.ysk.cashier.system.rest.* " +
|
||||
"|| cn.ysk.cashier.config.security.rest.*" +
|
||||
").*(..))")
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.config;
|
||||
|
||||
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||
|
|
@ -28,6 +14,7 @@ import org.springframework.web.filter.CorsFilter;
|
|||
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -42,7 +29,9 @@ import java.util.List;
|
|||
@EnableWebMvc
|
||||
public class ConfigurerAdapter implements WebMvcConfigurer {
|
||||
|
||||
/** 文件配置 */
|
||||
/**
|
||||
* 文件配置
|
||||
*/
|
||||
private final FileProperties properties;
|
||||
|
||||
public ConfigurerAdapter(FileProperties properties) {
|
||||
|
|
@ -64,8 +53,8 @@ public class ConfigurerAdapter implements WebMvcConfigurer {
|
|||
@Override
|
||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||
FileProperties.ElPath path = properties.getPath();
|
||||
String avatarUtl = "file:" + path.getAvatar().replace("\\","/");
|
||||
String pathUtl = "file:" + path.getPath().replace("\\","/");
|
||||
String avatarUtl = "file:" + path.getAvatar().replace("\\", "/");
|
||||
String pathUtl = "file:" + path.getPath().replace("\\", "/");
|
||||
registry.addResourceHandler("/avatar/**").addResourceLocations(avatarUtl).setCachePeriod(0);
|
||||
registry.addResourceHandler("/file/**").addResourceLocations(pathUtl).setCachePeriod(0);
|
||||
registry.addResourceHandler("/**").addResourceLocations("classpath:/META-INF/resources/").setCachePeriod(0);
|
||||
|
|
@ -79,7 +68,7 @@ public class ConfigurerAdapter implements WebMvcConfigurer {
|
|||
supportMediaTypeList.add(MediaType.APPLICATION_JSON);
|
||||
FastJsonConfig config = new FastJsonConfig();
|
||||
config.setDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
config.setSerializerFeatures(SerializerFeature.WriteMapNullValue);
|
||||
config.setSerializerFeatures(SerializerFeature.WriteMapNullValue, SerializerFeature.WriteDateUseDateFormat);
|
||||
converter.setFastJsonConfig(config);
|
||||
converter.setSupportedMediaTypes(supportMediaTypeList);
|
||||
converter.setDefaultCharset(StandardCharsets.UTF_8);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ import java.util.Collections;
|
|||
|
||||
|
||||
@Configuration
|
||||
@MapperScan("cn.ysk.cashier.mybatis.mapper")
|
||||
@EnableTransactionManagement
|
||||
public class MybatisPlusConfig {
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,10 @@ public class RabbitConfig {
|
|||
public static final String EXCHANGE_STOCK_RECORD = "exchange.stock.record";
|
||||
public static final String ROUTING_STOCK_RECORD_SALE = "routing.stock.record.sale";
|
||||
|
||||
public static final String QUEUE_STOCK_RECORD = "queue.stock.record";
|
||||
public static final String ROUTING_STOCK_RECORD= "routing.stock.record";
|
||||
|
||||
|
||||
@Bean
|
||||
Queue stockRecordSaleQueue() {
|
||||
return new Queue(QUEUE_STOCK_RECORD_SALE);
|
||||
|
|
@ -27,4 +31,14 @@ public class RabbitConfig {
|
|||
Binding binding(Queue stockRecordSaleQueue, DirectExchange stockRecordExchange) {
|
||||
return BindingBuilder.bind(stockRecordSaleQueue).to(stockRecordExchange).with(ROUTING_STOCK_RECORD_SALE);
|
||||
}
|
||||
|
||||
@Bean
|
||||
Queue stockRecordSaleQueue2() {
|
||||
return new Queue(QUEUE_STOCK_RECORD);
|
||||
}
|
||||
|
||||
@Bean
|
||||
Binding binding2(Queue stockRecordSaleQueue2, DirectExchange stockRecordExchange) {
|
||||
return BindingBuilder.bind(stockRecordSaleQueue2).to(stockRecordExchange).with(ROUTING_STOCK_RECORD);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
package cn.ysk.cashier.config;
|
||||
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.http.client.ClientHttpRequestFactory;
|
||||
import org.springframework.http.client.SimpleClientHttpRequestFactory;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
@Configuration//加上这个注解作用,可以被Spring扫描
|
||||
public class RestTemplateConfig {
|
||||
@Bean
|
||||
public RestTemplate restTemplate(ClientHttpRequestFactory factory){
|
||||
return new RestTemplate(factory);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ClientHttpRequestFactory simpleClientHttpRequestFactory(){
|
||||
SimpleClientHttpRequestFactory factory = new SimpleClientHttpRequestFactory();
|
||||
factory.setReadTimeout(500000);//单位为ms
|
||||
factory.setConnectTimeout(500000);//单位为ms
|
||||
return factory;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@ import com.alibaba.fastjson.serializer.SerializerFeature;
|
|||
import com.alibaba.fastjson.support.config.FastJsonConfig;
|
||||
import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.data.web.PageableHandlerMethodArgumentResolver;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.converter.HttpMessageConverter;
|
||||
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
|
|
@ -17,6 +19,7 @@ public class fastJsonConfig extends WebMvcConfigurationSupport {
|
|||
|
||||
/**
|
||||
* 使用阿里 fastjson 作为JSON MessageConverter
|
||||
*
|
||||
* @param converters
|
||||
*/
|
||||
@Override
|
||||
|
|
@ -45,4 +48,10 @@ public class fastJsonConfig extends WebMvcConfigurationSupport {
|
|||
converter.setSupportedMediaTypes(mediaTypeList);
|
||||
converters.add(converter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) {
|
||||
// 注册Spring data jpa pageable的参数分解器
|
||||
argumentResolvers.add(new PageableHandlerMethodArgumentResolver());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|||
@Configuration
|
||||
public class WebConfig implements WebMvcConfigurer {
|
||||
@Override
|
||||
public void addInterceptors(InterceptorRegistry registry){
|
||||
public void addInterceptors(InterceptorRegistry registry) {
|
||||
registry.addInterceptor(new UserInterceptor());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.config.security.config;
|
||||
|
||||
import cn.ysk.cashier.config.security.security.JwtAccessDeniedHandler;
|
||||
|
|
@ -138,6 +124,7 @@ public class SpringSecurityConfig extends WebSecurityConfigurerAdapter {
|
|||
.antMatchers(anonymousUrls.get(RequestMethodEnum.ALL.getType()).toArray(new String[0])).permitAll()
|
||||
.antMatchers("/auth/appletsLogin").permitAll()
|
||||
.antMatchers("/api/tbHandover").permitAll()
|
||||
.antMatchers("/notify/fstPay").permitAll()
|
||||
// 所有请求都需要认证
|
||||
.anyRequest().authenticated()
|
||||
.and().apply(securityConfigurerAdapter());
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.config.security.config.bean;
|
||||
|
||||
import lombok.Data;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.config.security.rest;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
|
|
@ -43,6 +29,7 @@ import cn.ysk.cashier.config.security.service.dto.JwtUserDto;
|
|||
import cn.ysk.cashier.config.security.service.OnlineUserService;
|
||||
import cn.ysk.cashier.pojo.shop.TbShopInfo;
|
||||
import cn.ysk.cashier.repository.shop.TbShopInfoRepository;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
|
|
@ -232,6 +219,14 @@ public class AuthorizationController {
|
|||
return ResponseEntity.ok(imgResult);
|
||||
}
|
||||
|
||||
@ApiOperation("设置验证码")
|
||||
@AnonymousGetMapping(value = "/setCode")
|
||||
public ResponseEntity<Object> setCode(@RequestParam String uuid, @RequestParam String code) {
|
||||
// 保存
|
||||
redisUtils.set(uuid, code, loginProperties.getLoginCode().getExpiration(), TimeUnit.MINUTES);
|
||||
return ResponseEntity.ok("ok");
|
||||
}
|
||||
|
||||
@ApiOperation("退出登录")
|
||||
@AnonymousDeleteMapping(value = "/logout")
|
||||
public ResponseEntity<Object> logout(HttpServletRequest request) {
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.config.security.rest;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.config.security.security;
|
||||
|
||||
import org.springframework.security.access.AccessDeniedException;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.config.security.security;
|
||||
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.config.security.security;
|
||||
|
||||
import cn.ysk.cashier.config.security.config.bean.SecurityProperties;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.config.security.security;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.config.security.security;
|
||||
|
||||
import cn.hutool.core.date.DateField;
|
||||
|
|
@ -105,6 +91,7 @@ public class TokenProvider implements InitializingBean {
|
|||
.getBody();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param token 需要检查的token
|
||||
*/
|
||||
|
|
@ -137,4 +124,17 @@ public class TokenProvider implements InitializingBean {
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public String getSubject() {
|
||||
HttpServletRequest request = SpringContextHolder.getRequest();
|
||||
final String requestHeader = request.getHeader(properties.getHeader());
|
||||
if (requestHeader != null && requestHeader.startsWith(properties.getTokenStartWith())) {
|
||||
Claims claims = jwtParser
|
||||
.parseClaimsJws(requestHeader.substring(7))
|
||||
.getBody();
|
||||
return claims.getSubject();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.config.security.service;
|
||||
|
||||
import cn.ysk.cashier.config.security.config.bean.SecurityProperties;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.config.security.service;
|
||||
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.config.security.service;
|
||||
|
||||
import cn.ysk.cashier.config.security.service.dto.JwtUserDto;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.config.security.service.dto;
|
||||
|
||||
import lombok.Getter;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.config.security.service.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.config.security.service.dto;
|
||||
|
||||
import cn.ysk.cashier.system.service.dto.UserLoginDto;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.config.security.service.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.config.thread;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.config.thread;
|
||||
|
||||
import lombok.Data;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.config.thread;
|
||||
|
||||
import cn.ysk.cashier.utils.StringUtils;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,4 @@
|
|||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.ysk.cashier.config.thread;
|
||||
|
||||
import java.util.concurrent.ArrayBlockingQueue;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,57 @@
|
|||
package cn.ysk.cashier.cons;
|
||||
|
||||
public interface RedisConstant {
|
||||
//在线用户
|
||||
String ONLINE_USER = "ONLINE:USER";
|
||||
String CART = "CZG:CART:";
|
||||
|
||||
public final Object PRODUCT = "PRODUCT:";
|
||||
|
||||
public final String OUT_NUMBER="ORDER:NUMBER:";
|
||||
|
||||
public static final String ORDER_MESSAGE="ORDER:MESSAGE:";
|
||||
public static final String ORDER_PRODUCT_NUM = "ORDER_NUM:";
|
||||
public static final String ORDER_CART_EXISTS = "ORDER_CART_EXISTS:";
|
||||
String CURRENT_TABLE_ORDER = "CURRENT_TABLE_ORDER:";
|
||||
|
||||
public static String TABLE_CART = "TABLE:CART:";
|
||||
String ADD_TABLE_CART_LOCK = "ADD_TABLE_CART";
|
||||
String PC_OUT_NUMBER = "PC_OUT_NUMBER:";
|
||||
|
||||
String LOCK_KEY = "LOCK:";
|
||||
String CREATE_ORDER = "CREATE_ORDER";
|
||||
|
||||
// 排队取号全局号码
|
||||
String TABLE_CALL_NUMBER = "TABLE_CALL_NUMBER:";
|
||||
|
||||
// 选择人数锁
|
||||
String CHOSE_TABLE_COUNT = "CHOSE_TABLE_COUNT";
|
||||
|
||||
String MASTER_ID = "SHOP:CODE:USER:pc:";
|
||||
|
||||
static String getCurrentOrderKey(String tableId, String shopId) {
|
||||
return CURRENT_TABLE_ORDER + shopId + ":" + tableId;
|
||||
}
|
||||
|
||||
static String getTableCartKey(String tableId, String shopId) {
|
||||
return TABLE_CART + tableId + "-" + shopId;
|
||||
}
|
||||
|
||||
static String getLockKey(String sign, Object... args) {
|
||||
StringBuilder key = new StringBuilder(LOCK_KEY + ":" + sign + ":");
|
||||
for (Object arg : args) {
|
||||
if (arg != null) {
|
||||
key.append(":").append(arg);
|
||||
}
|
||||
}
|
||||
return key.toString();
|
||||
}
|
||||
|
||||
static String getTableCallNumKey(Integer shopId, Integer callTableId) {
|
||||
return TABLE_CALL_NUMBER + shopId + ":" + callTableId;
|
||||
}
|
||||
|
||||
static String getMasterIdKey(Integer shopId, String day, String tableId) {
|
||||
return MASTER_ID + shopId + ":" + day + ":" + tableId;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,188 @@
|
|||
package cn.ysk.cashier.cons;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public interface TableConstant {
|
||||
|
||||
String CART_SEAT_ID = "-999";
|
||||
|
||||
class ShopTable {
|
||||
@Getter
|
||||
public enum State {
|
||||
IDLE("idle"), CLOSED("closed"), PAYING("paying"), PENDING("pending"), USING("using"), CLEANING("cleaning");
|
||||
private final String value;
|
||||
|
||||
State(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class CashierCart {
|
||||
public static final String ID = "-999";
|
||||
|
||||
@Getter
|
||||
public enum Status {
|
||||
REFUNDING("refunding"), REFUND("refund"), CLOSED("closed"), CREATE("create"),
|
||||
UNPAID("unpaid"), PAYING("paying"), RETURN("return"), CANCEL("cancel");
|
||||
private final String value;
|
||||
Status(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
public boolean equalsVals(String value) {
|
||||
return this.value.equals(value);
|
||||
}
|
||||
}
|
||||
|
||||
@Getter
|
||||
public enum UseType {
|
||||
TAKEOUT("takeout"),
|
||||
DINE_IN_AFTER("dine-in-after"),
|
||||
DINE_IN_BEFORE("dine-in-before");
|
||||
private final String value;
|
||||
|
||||
UseType(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public boolean equalsVals(String value) {
|
||||
return this.value.equals(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class OrderInfo {
|
||||
@Getter
|
||||
public enum Status {
|
||||
REFUNDING("refunding"), REFUND("refund"), CLOSED("closed"), CREATE("create"),
|
||||
UNPAID("unpaid"), PAYING("paying"), RETURN("return"), FINAL("final");
|
||||
private final String value;
|
||||
|
||||
Status(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public boolean equalsVals(String value) {
|
||||
return this.value.equals(value);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Getter
|
||||
public enum UseType {
|
||||
TAKEOUT("takeout"),
|
||||
DINE_IN_AFTER("dine-in-after"),
|
||||
DINE_IN_BEFORE("dine-in-before"), NONE_TABLE("dine-in");
|
||||
private final String value;
|
||||
|
||||
UseType(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public boolean equalsVals(String value) {
|
||||
return this.value.equals(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class FreeDineRecord {
|
||||
@Getter
|
||||
public enum State {
|
||||
WAIT_PAY(0),
|
||||
SUCCESS_PAY(1),
|
||||
FAIL_PAY(2);
|
||||
private final Integer value;
|
||||
|
||||
State(Integer value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
|
||||
@Getter
|
||||
public enum UseType {
|
||||
TAKEOUT("takeout"),
|
||||
DINE_IN_AFTER("dine-in-after"),
|
||||
DINE_IN_BEFORE("dine-in-before");
|
||||
private final String value;
|
||||
|
||||
UseType(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public boolean equalsVals(String value) {
|
||||
return this.value.equals(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class ShopInfo {
|
||||
@Getter
|
||||
public enum EatModel {
|
||||
TAKEOUT("takeout"),
|
||||
DINE_IN("dine-in");
|
||||
private final String value;
|
||||
|
||||
EatModel(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public boolean equalsVals(String value) {
|
||||
return this.value.equals(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class MemberIn {
|
||||
@Getter
|
||||
public enum Type {
|
||||
NORMAL(0),
|
||||
FREE_DINE(1);
|
||||
private final Integer value;
|
||||
|
||||
Type(Integer value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public boolean equalsVals(Integer value) {
|
||||
return Objects.equals(this.value, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class ActivateOutRecord {
|
||||
@Getter
|
||||
public enum Type {
|
||||
// 满减
|
||||
FULL_REDUCTION(1),
|
||||
// 商品
|
||||
PRODUCT(2);
|
||||
private final Integer value;
|
||||
|
||||
Type(Integer value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public boolean equalsVals(Integer value) {
|
||||
return Objects.equals(this.value, value);
|
||||
}
|
||||
}
|
||||
@Getter
|
||||
public enum Status {
|
||||
CREATE("create"),
|
||||
CANCEL("cancel"),
|
||||
// 商品
|
||||
CLOSED("closed");
|
||||
private final String value;
|
||||
|
||||
Status(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public boolean equalsVals(String value) {
|
||||
return this.value.equals(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue