Compare commits
652 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
15ba083de2 | ||
![]() |
9a9dbf0e97 | ||
![]() |
3c3919545a | ||
![]() |
2980c6e3eb | ||
![]() |
09cb5b6433 | ||
![]() |
90390dfdfa | ||
![]() |
d1b6534886 | ||
![]() |
972b386d93 | ||
![]() |
fc4b677b00 | ||
![]() |
5c03b97775 | ||
![]() |
500f0a72ce | ||
![]() |
73e30a4f37 | ||
![]() |
120cbc9123 | ||
![]() |
e5b711409c | ||
![]() |
69b93ca75a | ||
![]() |
6489047a7d | ||
![]() |
1c6a77806b | ||
![]() |
cd919daf64 | ||
![]() |
d2636a7787 | ||
![]() |
f3e0ca27d9 | ||
![]() |
e2a9b2d3e5 | ||
![]() |
3201288036 | ||
![]() |
b845d62e8b | ||
![]() |
bf37095259 | ||
![]() |
5d90760c39 | ||
![]() |
882660a3a7 | ||
![]() |
e90fc607f0 | ||
![]() |
ec8b356ba6 | ||
![]() |
c61811a622 | ||
![]() |
a49b1431e5 | ||
![]() |
2af0e40fe7 | ||
![]() |
f63d4e20b9 | ||
![]() |
2505d61b08 | ||
![]() |
fc509837a1 | ||
![]() |
66d6825657 | ||
![]() |
c58eb12896 | ||
![]() |
81d89ba350 | ||
![]() |
0cbf35f7f0 | ||
![]() |
4a86bd23d8 | ||
![]() |
41cdc951e1 | ||
![]() |
66ebb71b8a | ||
![]() |
c64bb81cae | ||
![]() |
e52d7d33be | ||
![]() |
19cb2b69f1 | ||
![]() |
80cdfbf36e | ||
![]() |
10ba70e107 | ||
![]() |
75928525ca | ||
![]() |
fa62ace6af | ||
![]() |
95bb9744c1 | ||
![]() |
848fcdf329 | ||
![]() |
d10b4595a2 | ||
![]() |
e4be51b14a | ||
![]() |
4d53944771 | ||
![]() |
124576005a | ||
![]() |
7c42632a50 | ||
![]() |
40e52c3856 | ||
![]() |
feeaac729c | ||
![]() |
2598c033a9 | ||
![]() |
6b6d676a6b | ||
![]() |
79311ecc71 | ||
![]() |
27c30279a1 | ||
![]() |
d8d81e835f | ||
![]() |
72d18b056b | ||
![]() |
1f08a2725e | ||
![]() |
e01acfb18e | ||
![]() |
41e4283f99 | ||
![]() |
c1884c3196 | ||
![]() |
d30bf0601c | ||
![]() |
075dd83b5f | ||
![]() |
d6775a5619 | ||
![]() |
073d860a78 | ||
![]() |
c761f5258a | ||
![]() |
d64555697f | ||
![]() |
b1d6baaad8 | ||
![]() |
d6a6a01252 | ||
![]() |
a207412e8c | ||
![]() |
9c452ee612 | ||
![]() |
167baed952 | ||
![]() |
8dc40224cc | ||
![]() |
252b218c42 | ||
![]() |
9be08aae63 | ||
![]() |
121fd0652d | ||
![]() |
9882142a46 | ||
![]() |
822f4e8192 | ||
![]() |
4efb6c0847 | ||
![]() |
8eba07c736 | ||
![]() |
9a9f7058ae | ||
![]() |
bcceac5df2 | ||
![]() |
38614abe76 | ||
![]() |
f56450c6b7 | ||
![]() |
f7268e7ce4 | ||
![]() |
fe552aedcd | ||
![]() |
a3e8ee2b41 | ||
![]() |
7d367c367c | ||
![]() |
9724a522e9 | ||
![]() |
ca4290204c | ||
![]() |
fff6fedcfa | ||
![]() |
1bebd5ef8e | ||
![]() |
8e0415a8fe | ||
![]() |
5036971f55 | ||
![]() |
d3c5906cfa | ||
![]() |
cfd8cd57cf | ||
![]() |
fad3a030e9 | ||
![]() |
02a0ab6d6d | ||
![]() |
fee6d00ecf | ||
![]() |
b72aa7b268 | ||
![]() |
38ac5270d6 | ||
![]() |
433056d5ea | ||
![]() |
250c56f90c | ||
![]() |
c0380aaf6a | ||
![]() |
eda8418797 | ||
![]() |
69dba93ae5 | ||
![]() |
3d09088029 | ||
![]() |
1b2dc570de | ||
![]() |
f564137f05 | ||
![]() |
63900da8c2 | ||
![]() |
170c0dbcfc | ||
![]() |
9626b5e971 | ||
![]() |
e1e749d8a4 | ||
![]() |
5856c93035 | ||
![]() |
f749b9db06 | ||
![]() |
5e959d310a | ||
![]() |
c414e0eb62 | ||
![]() |
2ce2287146 | ||
![]() |
9edf88b37a | ||
![]() |
7e31efcfe2 | ||
![]() |
ab420e4120 | ||
![]() |
7b7f285034 | ||
![]() |
46056a16b4 | ||
![]() |
f34f28f576 | ||
![]() |
f1f602c131 | ||
![]() |
f736e0a1c4 | ||
![]() |
969f9d0327 | ||
![]() |
2579e8549e | ||
![]() |
ba74c587b7 | ||
![]() |
fc3aa2047c | ||
![]() |
ec378d75de | ||
![]() |
e03a1a8bb3 | ||
![]() |
78fe38d687 | ||
![]() |
a6b70491e3 | ||
![]() |
8b31b65ac1 | ||
![]() |
bc400cf646 | ||
![]() |
4f5964f287 | ||
![]() |
3cb7aba37e | ||
![]() |
c844c7ef19 | ||
![]() |
b267b2c347 | ||
![]() |
08a35704e9 | ||
![]() |
986d1328e0 | ||
![]() |
4a8129bffa | ||
![]() |
833ac54a2f | ||
![]() |
7bf9a85263 | ||
![]() |
7df42db2e2 | ||
![]() |
e3c31c353a | ||
![]() |
c06a96b768 | ||
![]() |
e7d0024eb0 | ||
![]() |
d44d4da428 | ||
![]() |
471175b406 | ||
![]() |
62cc1206f7 | ||
![]() |
a7a98d153c | ||
![]() |
41c6aa9147 | ||
![]() |
63b7ee096a | ||
![]() |
cff4391f2d | ||
![]() |
a7feb9279f | ||
![]() |
4bf5b04d54 | ||
![]() |
c5fad966d2 | ||
![]() |
1cc2e09185 | ||
![]() |
1467ab6530 | ||
![]() |
3ac2b9973c | ||
![]() |
053007ef9e | ||
![]() |
33d8dbef45 | ||
![]() |
30f160446e | ||
![]() |
4f770b24a4 | ||
![]() |
bc41aa70d1 | ||
![]() |
f540c8a37c | ||
![]() |
20e34e35a3 | ||
![]() |
cfcc2c6762 | ||
![]() |
fe0886d122 | ||
![]() |
de4df784ea | ||
![]() |
b1d42becc3 | ||
![]() |
878a0ef638 | ||
![]() |
c0bebb7755 | ||
![]() |
32ccb8bd84 | ||
![]() |
4c169cbc58 | ||
![]() |
0d1a8c627b | ||
![]() |
5dcf763f08 | ||
![]() |
fcbb99941c | ||
![]() |
efcff7333e | ||
![]() |
128ee67925 | ||
![]() |
28cb66b971 | ||
![]() |
bfe7cf01eb | ||
![]() |
5e43efc555 | ||
![]() |
67df00264a | ||
![]() |
424ddb23e4 | ||
![]() |
2cef84bdc8 | ||
![]() |
152453106a | ||
![]() |
55d8977108 | ||
![]() |
3f19760678 | ||
![]() |
cd42846bec | ||
![]() |
855bb214be | ||
![]() |
f0395c450f | ||
![]() |
5151112912 | ||
![]() |
37ec560687 | ||
![]() |
f966fae060 | ||
![]() |
fd4adf2cea | ||
![]() |
2bc45ad467 | ||
![]() |
c671c23e87 | ||
![]() |
d5c35c23dc | ||
![]() |
09d0634694 | ||
![]() |
1044e1ac72 | ||
![]() |
0bac283864 | ||
![]() |
251bd08508 | ||
![]() |
2dd4450302 | ||
![]() |
448aa21e33 | ||
![]() |
d649b93017 | ||
![]() |
bb02c8eccc | ||
![]() |
40d5eb4a07 | ||
![]() |
cb3b172ecc | ||
![]() |
470d1a3a35 | ||
![]() |
9f65c46c82 | ||
![]() |
ae9186f4b4 | ||
![]() |
6441883855 | ||
![]() |
1e2bcf9aca | ||
![]() |
61672e0180 | ||
![]() |
eb2ab3cc4d | ||
![]() |
c2ccfa3bd6 | ||
![]() |
4890cf05de | ||
![]() |
f2f36bd617 | ||
![]() |
2177aea2bd | ||
![]() |
b85b33c373 | ||
![]() |
db9bae05b0 | ||
![]() |
8e3d7663bb | ||
![]() |
24e083b3ae | ||
![]() |
0773a4c4d7 | ||
![]() |
352a67c530 | ||
![]() |
b0c25ea9f4 | ||
![]() |
8d59384904 | ||
![]() |
2b630ef3f2 | ||
![]() |
bdcf00d8a0 | ||
![]() |
f39bfdab89 | ||
![]() |
fe1271a6f7 | ||
![]() |
510917c5ed | ||
![]() |
d45213fe2a | ||
![]() |
b757e1fccb | ||
![]() |
e7e3b18704 | ||
![]() |
fffd023d31 | ||
![]() |
9bc9b2ac6b | ||
![]() |
dc11dfc215 | ||
![]() |
4bc8dc65b4 | ||
![]() |
638b8b1dd4 | ||
![]() |
14097b4120 | ||
![]() |
fd53bf3296 | ||
![]() |
16c2590483 | ||
![]() |
add08b1ecd | ||
![]() |
ab6ec2f0ed | ||
![]() |
933bb7c6a6 | ||
![]() |
c5e2df943c | ||
![]() |
117914d92b | ||
![]() |
06887bff16 | ||
![]() |
cee7e50720 | ||
![]() |
6aca4ae9fd | ||
![]() |
36d01371bb | ||
![]() |
e9efff7076 | ||
![]() |
928b7dbe23 | ||
![]() |
afa0d623db | ||
![]() |
1c266988c5 | ||
![]() |
06fa85a353 | ||
![]() |
f8a0d1778a | ||
![]() |
8bcdb8600c | ||
![]() |
678e2def97 | ||
![]() |
4ba064d8b3 | ||
![]() |
cb2ba6da2f | ||
![]() |
9d6a046939 | ||
![]() |
7d0b381dff | ||
![]() |
a25dd9370c | ||
![]() |
4e8092653c | ||
![]() |
a6fbbc7172 | ||
![]() |
0f2031d0db | ||
![]() |
cd8277cf16 | ||
![]() |
eeb665739a | ||
![]() |
ec876d54a4 | ||
![]() |
fcd44d8b0d | ||
![]() |
4be5b73dbc | ||
![]() |
c6a6ad4965 | ||
![]() |
2a6566d8d6 | ||
![]() |
2860108a7d | ||
![]() |
c612133f22 | ||
![]() |
9c32ba400c | ||
![]() |
2678ff0a8b | ||
![]() |
6edfd5ac76 | ||
![]() |
e487e31961 | ||
![]() |
6f0c2943c7 | ||
![]() |
e6142b5308 | ||
![]() |
5437775172 | ||
![]() |
7c62b1a211 | ||
![]() |
54e7c10a06 | ||
![]() |
991ce2105b | ||
![]() |
e12c17360a | ||
![]() |
cc9a2199b1 | ||
![]() |
ec978c4441 | ||
![]() |
531629634b | ||
![]() |
fe7a68c41e | ||
![]() |
fcf13bb67c | ||
![]() |
c2db893fb8 | ||
![]() |
e3b86b3d7a | ||
![]() |
43ae3c8124 | ||
![]() |
d839adedff | ||
![]() |
34a0f0ea9d | ||
![]() |
21376c80a8 | ||
![]() |
72c465be86 | ||
![]() |
5332e543d2 | ||
![]() |
348762ae6a | ||
![]() |
1425f7dfcc | ||
![]() |
8e18a63d34 | ||
![]() |
676e4f29d9 | ||
![]() |
adc6076deb | ||
![]() |
2de81e438a | ||
![]() |
5a4392dc4e | ||
![]() |
0765f481ff | ||
![]() |
c9b9eced07 | ||
![]() |
cf7a434f0c | ||
![]() |
519a4a16fc | ||
![]() |
5022ed2533 | ||
![]() |
f0963c3941 | ||
![]() |
f049bd7530 | ||
![]() |
93e02b36dd | ||
![]() |
23eda6b1a9 | ||
![]() |
a4d31f9c45 | ||
![]() |
f9b6eef4d2 | ||
![]() |
0b4a4793d9 | ||
![]() |
94c115a142 | ||
![]() |
db3c713122 | ||
![]() |
aac6cc7bf8 | ||
![]() |
3acb56f880 | ||
![]() |
a3d8e8726a | ||
![]() |
9b26c3e98a | ||
![]() |
bacf741f77 | ||
![]() |
9922e2fcf2 | ||
![]() |
6cdcde692b | ||
![]() |
70fe3d31bd | ||
![]() |
e01b33bc78 | ||
![]() |
1781e76e19 | ||
![]() |
902f2ecbad | ||
![]() |
f46090243f | ||
![]() |
842cb6bd6b | ||
![]() |
5efb4c26cd | ||
![]() |
33ab2e9633 | ||
![]() |
2809254a07 | ||
![]() |
fe651b42ec | ||
![]() |
8e9cb110c7 | ||
![]() |
9f0cd04fa6 | ||
![]() |
3f6a5f06fa | ||
![]() |
64a1d1f0f6 | ||
![]() |
4e7f5489a5 | ||
![]() |
95ce628cce | ||
![]() |
7d620d1679 | ||
![]() |
8c7db2af70 | ||
![]() |
24c03cf176 | ||
![]() |
d2a8f3f253 | ||
![]() |
62b720a5d0 | ||
![]() |
c4950e1b13 | ||
![]() |
e863b60300 | ||
![]() |
8d27d1146b | ||
![]() |
8999b7db3b | ||
![]() |
645fd7624b | ||
![]() |
8a3488f3d1 | ||
![]() |
9734eacf01 | ||
![]() |
4d37e9f8f0 | ||
![]() |
abe161669c | ||
![]() |
9860a7d552 | ||
![]() |
a5b8b9b67e | ||
![]() |
fc6a768058 | ||
![]() |
e931414b55 | ||
![]() |
8a10568b24 | ||
![]() |
749cb5d762 | ||
![]() |
2630ad8eaa | ||
![]() |
2017b03169 | ||
![]() |
77f06e79c4 | ||
![]() |
b083795ad6 | ||
![]() |
1ab15dd1f9 | ||
![]() |
14a7d637b3 | ||
![]() |
5415a85cc0 | ||
![]() |
bb11acb15f | ||
![]() |
55a6ec78e4 | ||
![]() |
1031b78f64 | ||
![]() |
b93ce4d1b2 | ||
![]() |
4d7ee1769f | ||
![]() |
2a90038080 | ||
![]() |
19b574fd4b | ||
![]() |
e43039b0c6 | ||
![]() |
2607f13abe | ||
![]() |
5bf3045544 | ||
![]() |
bcdc117e59 | ||
![]() |
5eef27da6e | ||
![]() |
cfbef058b5 | ||
![]() |
ed33ff9f04 | ||
![]() |
db54147697 | ||
![]() |
f8b34d5b6d | ||
![]() |
509e11a7b0 | ||
![]() |
066f57e5c5 | ||
![]() |
72c8b24604 | ||
![]() |
513c23efbb | ||
![]() |
7833aa5d0e | ||
![]() |
7bc36a09fb | ||
![]() |
38221a3e2e | ||
![]() |
490f907ada | ||
![]() |
c4003396a5 | ||
![]() |
a031c1d564 | ||
![]() |
9804e781f4 | ||
![]() |
d1c95c4d8a | ||
![]() |
f45224f224 | ||
![]() |
863ab6f33a | ||
![]() |
d574a99dfc | ||
![]() |
dffd175ccf | ||
![]() |
430f1369be | ||
![]() |
d8bbc71543 | ||
![]() |
167692b04d | ||
![]() |
c84a9dd67e | ||
![]() |
1294506a95 | ||
![]() |
df91c3ceff | ||
![]() |
e47d5afcfa | ||
![]() |
dc7a434380 | ||
![]() |
a0c7692c3c | ||
![]() |
ff7b9d9d26 | ||
![]() |
930c5ec490 | ||
![]() |
69a6aa251b | ||
![]() |
2d40e4bc14 | ||
![]() |
4c56a07c4e | ||
![]() |
d2420212a6 | ||
![]() |
00f968657c | ||
![]() |
7ef86c14c0 | ||
![]() |
4b2af44ee3 | ||
![]() |
9a5f085369 | ||
![]() |
67aaf28832 | ||
![]() |
d556eae556 | ||
![]() |
08103685f1 | ||
![]() |
054c237b1f | ||
![]() |
e8368bb7fd | ||
![]() |
df141f2982 | ||
![]() |
671c41bf82 | ||
![]() |
bcc2ff0f5b | ||
![]() |
d49ce4c81f | ||
![]() |
cea1589e79 | ||
![]() |
f1424aa61e | ||
![]() |
4b5c185608 | ||
![]() |
21fbe91e39 | ||
![]() |
5376ed69b1 | ||
![]() |
ff21fdc5df | ||
![]() |
d0290b88ad | ||
![]() |
aad85337ce | ||
![]() |
d1a20bf259 | ||
![]() |
5430cc292e | ||
![]() |
08cfe71646 | ||
![]() |
be0b47ecb7 | ||
![]() |
c916b30fa1 | ||
![]() |
f94435d592 | ||
![]() |
a92acff99b | ||
![]() |
abf61bfdea | ||
![]() |
b99f364d92 | ||
![]() |
1801250516 | ||
![]() |
a55c0cfca5 | ||
![]() |
9d97c0ccb4 | ||
![]() |
a7254e0f05 | ||
![]() |
52631a0af8 | ||
![]() |
712067979c | ||
![]() |
91e98a5e62 | ||
![]() |
b365b40273 | ||
![]() |
62ca36dede | ||
![]() |
72dc28a639 | ||
![]() |
ac1ced7459 | ||
![]() |
098c5b4723 | ||
![]() |
a582a6e726 | ||
![]() |
fba230c2b2 | ||
![]() |
619a7b73c3 | ||
![]() |
8278b65777 | ||
![]() |
986cb72421 | ||
![]() |
b0855cc626 | ||
![]() |
f9b15fe70d | ||
![]() |
2334e177c5 | ||
![]() |
3fbd394653 | ||
![]() |
0f792c64e7 | ||
![]() |
e9385219c2 | ||
![]() |
eda2b11dad | ||
![]() |
98dfa48ced | ||
![]() |
e9ba4ac705 | ||
![]() |
450ca8f907 | ||
![]() |
c99115abe7 | ||
![]() |
814c2db65c | ||
![]() |
4b95146c98 | ||
![]() |
8795a4cdeb | ||
![]() |
df9b06843f | ||
![]() |
1ce2c09f47 | ||
![]() |
a231582637 | ||
![]() |
d29b0beb9b | ||
![]() |
ade55d89a4 | ||
![]() |
cc78025f80 | ||
![]() |
6cd9b3bf7e | ||
![]() |
535d3c9c01 | ||
![]() |
0cb4823b5b | ||
![]() |
7c8fe2fc50 | ||
![]() |
ccb56b3b99 | ||
![]() |
0d8f10cf1f | ||
![]() |
002aea34ae | ||
![]() |
3f412f26fc | ||
![]() |
e8a65d45c6 | ||
![]() |
e9b93ffe80 | ||
![]() |
2da6a746e4 | ||
![]() |
86ef156de4 | ||
![]() |
11936dee44 | ||
![]() |
07fe12483a | ||
![]() |
55ee2fcad7 | ||
![]() |
d12912080e | ||
![]() |
f108d478a8 | ||
![]() |
6c4908e70e | ||
![]() |
b66d845354 | ||
![]() |
7991d68586 | ||
![]() |
1c5544fc9d | ||
![]() |
dfde260ebb | ||
![]() |
444ba79822 | ||
![]() |
f0fcf4798e | ||
![]() |
6069a387ea | ||
![]() |
b32ac09ddf | ||
![]() |
b18cd457c8 | ||
![]() |
e2b76ee0e5 | ||
![]() |
42ce5c75fd | ||
![]() |
d405f4df25 | ||
![]() |
7d6f205dc0 | ||
![]() |
f958137dd1 | ||
![]() |
bab046f10c | ||
![]() |
a829e8d083 | ||
![]() |
3f90e79d8a | ||
![]() |
00f59fdc75 | ||
![]() |
480b17507f | ||
![]() |
cfdf04981a | ||
![]() |
6a7761313e | ||
![]() |
8e0569ee54 | ||
![]() |
89f51fe568 | ||
![]() |
19f554176c | ||
![]() |
9dc7d2d197 | ||
![]() |
91c0c423c0 | ||
![]() |
3368a995ca | ||
![]() |
e969dbe8b7 | ||
![]() |
e46a27b937 | ||
![]() |
c84e19e14e | ||
![]() |
848913bf2f | ||
![]() |
2fc1ef519d | ||
![]() |
0ff7f2ef74 | ||
![]() |
fef0562523 | ||
![]() |
1bc4bdac0c | ||
![]() |
baab642d28 | ||
![]() |
b784bf3e12 | ||
![]() |
d0a59f7ef1 | ||
![]() |
f0b7583404 | ||
![]() |
13a9405082 | ||
![]() |
30732428f1 | ||
![]() |
e9e73c402b | ||
![]() |
9bbeb93b2e | ||
![]() |
3c3f46ee4e | ||
![]() |
6265e4a736 | ||
![]() |
abf2f697fb | ||
![]() |
6f8e8acae0 | ||
![]() |
26798a8816 | ||
![]() |
b369b363b6 | ||
![]() |
87d8b55b41 | ||
![]() |
461c6a0007 | ||
![]() |
38f1d6428f | ||
![]() |
b7a90c2c12 | ||
![]() |
08d72fe9ca | ||
![]() |
592f706cd8 | ||
![]() |
6cadafb3f1 | ||
![]() |
bba5ea7a42 | ||
![]() |
a1105ffdc7 | ||
![]() |
2c60a3aafa | ||
![]() |
1a721ceb5f | ||
![]() |
9d8cdb2670 | ||
![]() |
aa77eb029f | ||
![]() |
696e94a1a3 | ||
![]() |
396f3a6dff | ||
![]() |
56864db484 | ||
![]() |
4cfa959d98 | ||
![]() |
1b336c7df6 | ||
![]() |
65abc667b0 | ||
![]() |
c186d279ba | ||
![]() |
a4948d27d2 | ||
![]() |
cc56a66332 | ||
![]() |
1b835e058f | ||
![]() |
0d2ae6be56 | ||
![]() |
f26c17cff0 | ||
![]() |
8aa45406fd | ||
![]() |
ae9e9b3de0 | ||
![]() |
83ce39f700 | ||
![]() |
722eaf3513 | ||
![]() |
e82c37f2c5 | ||
![]() |
742125ed99 | ||
![]() |
31c4a52858 | ||
![]() |
0050b1e46d | ||
![]() |
8cead0869e | ||
![]() |
8dbd6143bf | ||
![]() |
038c0b87b9 | ||
![]() |
c3aa2acddf | ||
![]() |
b336655a51 | ||
![]() |
cba9c609d7 | ||
![]() |
de21034186 | ||
![]() |
0e209d9cfc | ||
![]() |
68c98db147 | ||
![]() |
55e5ca4644 | ||
![]() |
30ad7c43b8 | ||
![]() |
d16185f87d | ||
![]() |
7da46d1cfb | ||
![]() |
93351e1716 | ||
![]() |
c89accbf06 | ||
![]() |
2df46a7c2d | ||
![]() |
65843d55a0 | ||
![]() |
dd2d8a2ba9 | ||
![]() |
a19f92ff2c | ||
![]() |
1a9440824c | ||
![]() |
fcf1c228c5 | ||
![]() |
72b64dc526 | ||
![]() |
4acada62d3 | ||
![]() |
75633aa84b | ||
![]() |
bac30d47b7 | ||
![]() |
20628987c9 | ||
![]() |
1b0aaec9ab | ||
![]() |
72438ed5f6 | ||
![]() |
60f5898c9a | ||
![]() |
f4a5a139b5 | ||
![]() |
44f357cea4 | ||
![]() |
3a77cc239b | ||
![]() |
ab19228ca6 | ||
![]() |
436781507e | ||
![]() |
6dc65234ef | ||
![]() |
6e3aa8a752 | ||
![]() |
1ed6656bbb | ||
![]() |
5193de7c56 | ||
![]() |
79da36ac04 | ||
![]() |
23d8da7479 | ||
![]() |
6690b9b120 | ||
![]() |
c06d6e53f6 | ||
![]() |
7ca756a234 | ||
![]() |
24f4fd4fee | ||
![]() |
81126b2b4b | ||
![]() |
d194e14780 | ||
![]() |
711a074059 | ||
![]() |
ee8dcd0888 | ||
![]() |
5133cd0fdf | ||
![]() |
0effbc513c | ||
![]() |
60b528e80e | ||
![]() |
8070afc807 | ||
![]() |
1bb10d007e | ||
![]() |
e8b3f355e6 | ||
![]() |
b8ff47e832 | ||
![]() |
00e15a5c2c | ||
![]() |
df3cd34b30 |
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.sql linguist-language=java
|
30
.github/workflows/maven.yml
vendored
Normal file
30
.github/workflows/maven.yml
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
|
||||
|
||||
name: Java CI with Maven
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
# pull_request:
|
||||
# branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
java: [ '8', '11', '17' ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up JDK ${{ matrix.Java }}
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: ${{ matrix.java }}
|
||||
distribution: 'temurin'
|
||||
cache: maven
|
||||
- name: Build with Maven
|
||||
run: mvn -B package --file pom.xml -Dmaven.test.skip=true
|
51
.github/workflows/yudao-ui-admin.yml
vendored
Normal file
51
.github/workflows/yudao-ui-admin.yml
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
name: yudao-ui-admin CI
|
||||
|
||||
# 在master分支发生push事件时触发。
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
# pull_request:
|
||||
# branches: [ master ]
|
||||
env: # 设置环境变量
|
||||
TZ: Asia/Shanghai # 时区(设置时区可使页面中的`最近更新时间`使用时区时间)
|
||||
WORK_DIR: yudao-ui-admin #工作目录
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
working-directory: yudao-ui-admin
|
||||
|
||||
jobs:
|
||||
build: # 自定义名称
|
||||
runs-on: ubuntu-latest # 运行在虚拟机环境ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [14.x, 16.x]
|
||||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
||||
|
||||
steps:
|
||||
- name: Checkout # 步骤1
|
||||
uses: actions/checkout@v2 # 使用的动作。格式:userName/repoName。作用:检出仓库,获取源码。 官方actions库:https://github.com/actions
|
||||
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v2.0.1
|
||||
with:
|
||||
version: 6.15.1
|
||||
|
||||
- name: Set node version to ${{ matrix.node_version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node_version }}
|
||||
cache: "yarn"
|
||||
cache-dependency-path: yudao-ui-admin/yarn.lock
|
||||
|
||||
- name: Install deps
|
||||
run: node --version && yarn --version && yarn install
|
||||
|
||||
- name: Build
|
||||
run: yarn build:prod
|
||||
|
||||
# 查看 workflow 的文档来获取更多信息
|
||||
# @see https://github.com/crazy-max/ghaction-github-pages
|
||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@@ -42,3 +42,6 @@ nbdist/
|
||||
!*/build/*.java
|
||||
!*/build/*.html
|
||||
!*/build/*.xml
|
||||
|
||||
### JRebel ###
|
||||
rebel.xml
|
||||
|
211
README.md
211
README.md
@@ -1,25 +1,56 @@
|
||||
## 平台简介
|
||||
**严肃声明:现在、未来都不会有商业版本,所有功能全部开源!**
|
||||
|
||||
**拒绝虚假开源,售卖商业版,程序员不骗程序员!!**
|
||||
|
||||
**「我喜欢写代码,乐此不疲」**
|
||||
**「我喜欢做开源,以此为乐」**
|
||||
|
||||
## 🐯 平台简介
|
||||
|
||||
**芋道**,一套**全部开源**的**企业级**的快速开发平台,毫无保留给个人及企业免费使用。
|
||||
|
||||
> 有任何问题,或者想要的功能,可以在 _Issues_ 中提给艿艿。
|
||||
|
||||
* 前端采用 [vue-element-admin](https://github.com/PanJiaChen/vue-element-admin)。
|
||||
* 后端采用 Spring Boot、MySQL、Redis。
|
||||
* 权限认证使用 Spring Security & Token,支持多终端认证系统。
|
||||
* 支持加载动态权限菜单,多方式轻松权限控制。
|
||||
* 高效率开发,使用代码生成器可以一键生成前后端代码。
|
||||
* 前端采用 [vue-element-admin](https://github.com/PanJiaChen/vue-element-admin) ,正在支持 Vue 3 + ElementUI Plus 最新方案。
|
||||
* 后端采用 Spring Boot、MySQL + MyBatis Plus、Redis + Redisson。
|
||||
* 权限认证使用 Spring Security & Token & Redis,支持多终端、多种用户的认证系统。
|
||||
* 支持加载动态权限菜单,按钮级别权限控制,本地缓存提升性能。
|
||||
* 支持 SaaS 多租户系统,可自定义每个租户的权限,提供透明化的多租户底层封装。
|
||||
* 工作流使用 Activiti ,支持动态表单、在线设计流程、多种任务分配方式。
|
||||
* 高效率开发,使用代码生成器可以一键生成前后端代码 + 单元测试 + Swagger 接口文档 + Validator 参数校验。
|
||||
* 集成微信小程序、微信公众号、企业微信、钉钉等三方登陆,集成支付宝、微信等支付与退款。
|
||||
* 集成阿里云、腾讯云、云片等短信渠道,集成阿里云、腾讯云、七牛云等云存储服务。
|
||||
|
||||
## 内置功能
|
||||
| 项目名 | 说明 | 传说门 |
|
||||
| ---- |------------------------| ---- |
|
||||
| `ruoyi-vue-pro` | Spring Boot 多模块 | **[Gitee](https://gitee.com/zhijiantianya/ruoyi-vue-pro)** [Github](https://github.com/YunaiV/ruoyi-vue-pro) |
|
||||
| `ruoyi-vue-cloud` | Spring Cloud 微服务 | **[Gitee](https://gitee.com/zhijiantianya/ruoyi-vue-cloud)** [Github](https://github.com/YunaiV/onemall) |
|
||||
| `Spring-Boot-Labs` | Spring Boot & Cloud 入门 | **[Gitee](https://gitee.com/zhijiantianya/SpringBoot-Labs)** [Github](https://github.com/YunaiV/SpringBoot-Labs) |
|
||||
|
||||
分成三种内置功能:
|
||||
## 🐶 在线体验
|
||||
|
||||
演示地址:<http://dashboard.yudao.iocoder.cn>
|
||||
* 账号密码:admin/admin123
|
||||
|
||||
文档地址:<http://www.iocoder.cn/categories/Yudao/>
|
||||
* [《如何搭建环境》](http://www.iocoder.cn/categories/Yudao/?yudao)
|
||||
|
||||
> 未来会补充文档和视频,方便胖友冲冲冲!
|
||||
|
||||
## 🐼 内置功能
|
||||
|
||||
分成多种内置功能:
|
||||
* 系统功能
|
||||
* 工作流程
|
||||
* 支付系统
|
||||
* 商城系统
|
||||
* 基础设施
|
||||
* 研发工具
|
||||
|
||||
> 友情提示:本项目基于 RuoYi-Vue 修改,**重构优化**后端的代码,**美化**前端的界面。
|
||||
>
|
||||
> 额外新增的功能,我们使用 🚀 标记。
|
||||
>
|
||||
> * 额外新增的功能,我们使用 🚀 标记。
|
||||
> * 重新实现的功能,我们使用 ⭐️ 标记。
|
||||
|
||||
🙂 所有功能,都通过 **单元测试** 保证高质量。
|
||||
|
||||
@@ -28,28 +59,65 @@
|
||||
| | 功能 | 描述 |
|
||||
| --- | --- | --- |
|
||||
| | 用户管理 | 用户是系统操作者,该功能主要完成系统用户配置 |
|
||||
| | 在线用户 | 当前系统中活跃用户状态监控,支持手动踢下线 |
|
||||
| ⭐️ | 在线用户 | 当前系统中活跃用户状态监控,支持手动踢下线 |
|
||||
| | 角色管理 | 角色菜单权限分配、设置角色按机构进行数据范围权限划分 |
|
||||
| | 菜单管理 | 配置系统菜单,操作权限,按钮权限标识等 |
|
||||
| | 菜单管理 | 配置系统菜单、操作权限、按钮权限标识等,本地缓存提供性能 |
|
||||
| | 部门管理 | 配置系统组织机构(公司、部门、小组),树结构展现支持数据权限 |
|
||||
| | 岗位管理 | 配置系统用户所属担任职务 |
|
||||
| 🚀 | 租户管理 | 配置系统租户,支持 SaaS 场景下的多租户功能 |
|
||||
| 🚀 | 租户套餐 | 配置租户套餐,自定每个租户的菜单、操作、按钮的权限 |
|
||||
| | 字典管理 | 对系统中经常使用的一些较为固定的数据进行维护 |
|
||||
| 🚀 | 短信管理 | 短信渠道、短息模板、短信日志,对接阿里云、云片等主流短信平台 |
|
||||
| 🚀 | 操作日志 | 系统正常操作日志记录和查询,集成 Swagger 生成日志内容 |
|
||||
| | 登录日志 | 系统登录日志记录查询,包含登录异常 |
|
||||
| ⭐️ | 登录日志 | 系统登录日志记录查询,包含登录异常 |
|
||||
| 🚀 | 错误码管理 | 系统所有错误码的管理,可在线修改错误提示,无需重启服务 |
|
||||
| | 通知公告 | 系统通知公告信息发布维护 |
|
||||
|
||||
### 工作流程
|
||||
|
||||
| | 功能 | 描述 |
|
||||
| --- | --- | --- |
|
||||
| 🚀 | 流程模型 | 配置工作流的流程模型,支持文件导入与在线设计流程图,提供 7 种任务分配规则 |
|
||||
| 🚀 | 流程表单 | 拖动表单元素生成相应的工作流表单,覆盖 Element UI 所有的表单组件 |
|
||||
| 🚀 | 用户分组 | 自定义用户分组,可用于工作流的审批分组 |
|
||||
| 🚀 | 我的流程 | 查看我发起的工作流程,支持新建、取消流程等操作,高亮流程图、审批时间线 |
|
||||
| 🚀 | 待办任务 | 查看自己【未】审批的工作任务,支持通过、不通过、转发、委派、退回等操作 |
|
||||
| 🚀 | 已办任务 | 查看自己【已】审批的工作任务,未来会支持回退操作 |
|
||||
| 🚀 | OA 请假 | 作为业务自定义接入工作流的使用示例,只需创建请求对应的工作流程,即可进行审批 |
|
||||
|
||||
### 支付系统
|
||||
|
||||
| | 功能 | 描述 |
|
||||
| --- | --- | --- |
|
||||
| 🚀 | 商户信息 | 管理商户信息,支持 Saas 场景下的多商户功能 |
|
||||
| 🚀 | 应用信息 | 配置商户的应用信息,对接支付宝、微信等多个支付渠道 |
|
||||
| 🚀 | 支付订单 | 查看用户发起的支付宝、微信等的【支付】订单 |
|
||||
| 🚀 | 退款订单 | 查看用户发起的支付宝、微信等的【退款】订单 |
|
||||
|
||||
ps:核心功能已经实现,正在对接微信小程序中...
|
||||
|
||||
### 商城系统
|
||||
|
||||
正在开发中,大体计划如下:
|
||||
* 2022 Q2 => 完成对 <https://github.com/YunaiV/onemall> 的迁移,作为 onemall 的 Spring Boot 单体版本。
|
||||
* 2022 Q4 => 完成对 <https://github.com/YunaiV/onemall>> 的重构,作为 onemall 的 Spring Cloud 微服务版本。
|
||||
|
||||
### 会员中心
|
||||
|
||||
正在开发中,大体计划如下:
|
||||
* 2021 Q1 =》完成对 <https://github.com/YunaiV/onemall> 的迁移
|
||||
|
||||
### 基础设施
|
||||
|
||||
| | 功能 | 描述 |
|
||||
| --- | --- | --- |
|
||||
| 🚀 | 配置管理 | 对系统动态配置常用参数,支持 SpringBoot 加载 |
|
||||
| | 定时任务 | 在线(添加、修改、删除)任务调度包含执行结果日志 |
|
||||
| ⭐️ | 定时任务 | 在线(添加、修改、删除)任务调度包含执行结果日志 |
|
||||
| 🚀 | 文件服务 | 支持本地文件存储,同时支持兼容 Amazon S3 协议的云服务、开源组件 |
|
||||
| 🚀 | API 日志 | 包括 RESTful API 访问日志、异常日志两部分,方便排查 API 相关的问题 |
|
||||
| | MySQL 监控 | 监视当前系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈 |
|
||||
| | Redis 监控 |监控 Redis 数据库的使用情况,使用的 Redis Key 管理 |
|
||||
| | Redis 监控 | 监控 Redis 数据库的使用情况,使用的 Redis Key 管理 |
|
||||
| 🚀 | 消息队列 | 基于 Redis 实现消息队列,Stream 提供集群消费,Pub/Sub 提供广播消费 |
|
||||
| 🚀 |Java 监控 | 基于 Spring Boot Admin 实现 Java 应用的监控 |
|
||||
| 🚀 | 链路追踪 | 接入 SkyWalking 组件,实现链路追踪 |
|
||||
| 🚀 | 日志中心 | 接入 SkyWalking 组件,实现日志中心 |
|
||||
@@ -66,72 +134,66 @@
|
||||
| 🚀 | 代码生成 |前后端代码的生成(Java、Vue、SQL、单元测试),支持 CRUD 下载 |
|
||||
| 🚀 | 系统接口 | 基于 Swagger 自动生成相关的 RESTful API 接口文档 |
|
||||
| 🚀 | 数据库文档 | 基于 Screw 自动生成数据库文档,支持导出 Word、HTML、MD 格式 |
|
||||
| | 表单构建 | 拖动表单元素生成相应的 HTML 代码 |
|
||||
| | 表单构建 | 拖动表单元素生成相应的 HTML 代码,支持导出 JSON、Vue 文件 |
|
||||
|
||||
## 在线体验
|
||||
## 🐨 技术栈
|
||||
|
||||
演示地址:<http://dashboard.yudao.iocoder.cn>
|
||||
* 账号密码:admin/admin123
|
||||
|
||||
文档地址:<http://www.iocoder.cn/categories/Yudao/>
|
||||
* [《如何搭建环境》](http://www.iocoder.cn/categories/Yudao/?yudao)
|
||||
|
||||
> 未来会补充文档和视频,方便胖友冲冲冲!
|
||||
|
||||
## 技术栈
|
||||
|
||||
| 项目 | 说明 |
|
||||
| --- | --- |
|
||||
| `yudao-dependencies` | Maven 依赖版本管理 |
|
||||
| `yudao-framework` | Java 框架拓展 |
|
||||
| `yudao-admin-server` | 管理后台的服务端 |
|
||||
| `yudao-admin-ui` | 管理后台的 UI 界面 |
|
||||
| `yudao-user-server` | 用户前台的服务端 |
|
||||
| `yudao-user-ui` | 用户前台的 UI 界面 |
|
||||
| `yudao-core-service` | 公共服务,提供共享逻辑 |
|
||||
|
||||
> 友情提示:`yudao-admin-server` 和 `yudao-user-server` 会存在需要复用的逻辑,通过 `yudao-core-service` 实现。
|
||||
| 项目 | 说明 |
|
||||
|-----------------------|--------------------|
|
||||
| `yudao-dependencies` | Maven 依赖版本管理 |
|
||||
| `yudao-framework` | Java 框架拓展 |
|
||||
| `yudao-server` | 管理后台 + 用户 APP 的服务端 |
|
||||
| `yudao-admin-ui` | 管理后台的 UI 界面 |
|
||||
| `yudao-user-ui` | 用户 APP 的 UI 界面 |
|
||||
| `yudao-module-system` | 系统功能的 Module 模块 |
|
||||
| `yudao-module-member` | 会员中心的 Module 模块 |
|
||||
| `yudao-module-infra` | 基础设施的 Module 模块 |
|
||||
| `yudao-module-tool` | 研发工具的 Module 模块 |
|
||||
| `yudao-module-bpm` | 工作流程的 Module 模块 |
|
||||
| `yudao-module-pay` | 支付系统的 Module 模块 |
|
||||
|
||||
### 后端
|
||||
|
||||
| 框架 | 说明 | 版本 | 学习指南 |
|
||||
| --- | --- | --- | --- |
|
||||
| [Spring Boot](https://spring.io/projects/spring-boot) | 应用开发框架 | 2.4.5 | [文档](https://github.com/YunaiV/SpringBoot-Labs) |
|
||||
| [MySQL](https://www.mysql.com/cn/) | 数据库服务器 | 5.7 | |
|
||||
| [Druid](https://github.com/alibaba/druid) | JDBC 连接池、监控组件 | 1.2.4 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) |
|
||||
| [MyBatis Plus](https://mp.baomidou.com/) | MyBatis 增强工具包 | 3.4.1 | [文档](http://www.iocoder.cn/Spring-Boot/MyBatis/?yudao) |
|
||||
| [Dynamic Datasource](https://dynamic-datasource.com/) | 动态数据源 | 3.3.2 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) |
|
||||
| [Redis](https://redis.io/) | key-value 数据库 | 5.0 | |
|
||||
| [Redisson](https://github.com/redisson/redisson) | Redis 客户端 | 3.1.46 | [文档](http://www.iocoder.cn/Spring-Boot/Redis/?yudao) |
|
||||
| [Spring MVC](https://github.com/spring-projects/spring-framework/tree/master/spring-webmvc) | MVC 框架 | 5.4.6 | [文档](http://www.iocoder.cn/SpringMVC/MVC/?yudao) |
|
||||
| [Spring Security](https://github.com/spring-projects/spring-security) | Spring 安全框架 | 5.4.6 | [文档](http://www.iocoder.cn/Spring-Boot/Spring-Security/?yudao) |
|
||||
| [Hibernate Validator](https://github.com/hibernate/hibernate-validator) | 参数校验组件 | 6.1.7 | [文档](http://www.iocoder.cn/Spring-Boot/Validation/?yudao) |
|
||||
| [Quartz](https://github.com/quartz-scheduler) | 任务调度组件 | 2.3.2 | [文档](http://www.iocoder.cn/Spring-Boot/Job/?yudao) |
|
||||
| [Knife4j](https://gitee.com/xiaoym/knife4j) | Swagger 增强 UI 实现 | 3.0.2 | [文档](http://www.iocoder.cn/Spring-Boot/Swagger/?yudao) |
|
||||
| [Resilience4j](https://github.com/resilience4j/resilience4j) | 服务保障组件 | 1.7.0 | [文档](http://www.iocoder.cn/Spring-Boot/Resilience4j/?yudao) |
|
||||
| [SkyWalking](https://skywalking.apache.org/) | 分布式应用追踪系统 | 8.5.0 | [文档](http://www.iocoder.cn/Spring-Boot/SkyWalking/?yudao) |
|
||||
| [Spring Boot Admin](https://github.com/codecentric/spring-boot-admin) | Spring Boot 监控平台 | 2.3.1 | [文档](http://www.iocoder.cn/Spring-Boot/Admin/?yudao) |
|
||||
| [Jackson](https://github.com/FasterXML/jackson) | JSON 工具库 | 2.11.4 | |
|
||||
| [MapStruct](https://mapstruct.org/) | Java Bean 转换 | 1.4.1 | [文档](http://www.iocoder.cn/Spring-Boot/MapStruct/?yudao) |
|
||||
| [Lombok](https://projectlombok.org/) | 消除冗长的 Java 代码 | 1.16.14 | [文档](http://www.iocoder.cn/Spring-Boot/Lombok/?yudao) |
|
||||
| [JUnit](https://junit.org/junit5/) | Java 单元测试框架 | 5.7.1 | - |
|
||||
| [Mockito](https://github.com/mockito/mockito) | Java Mock 框架 | 3.6.28 | - |
|
||||
| 框架 | 说明 | 版本 | 学习指南 |
|
||||
| --- | --- |----------| --- |
|
||||
| [Spring Boot](https://spring.io/projects/spring-boot) | 应用开发框架 | 2.5.10 | [文档](https://github.com/YunaiV/SpringBoot-Labs) |
|
||||
| [MySQL](https://www.mysql.com/cn/) | 数据库服务器 | 5.7 | |
|
||||
| [Druid](https://github.com/alibaba/druid) | JDBC 连接池、监控组件 | 1.2.8 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) |
|
||||
| [MyBatis Plus](https://mp.baomidou.com/) | MyBatis 增强工具包 | 3.5.1 | [文档](http://www.iocoder.cn/Spring-Boot/MyBatis/?yudao) |
|
||||
| [Dynamic Datasource](https://dynamic-datasource.com/) | 动态数据源 | 3.5.0 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) |
|
||||
| [Redis](https://redis.io/) | key-value 数据库 | 5.0 | |
|
||||
| [Redisson](https://github.com/redisson/redisson) | Redis 客户端 | 3.16.8 | [文档](http://www.iocoder.cn/Spring-Boot/Redis/?yudao) |
|
||||
| [Spring MVC](https://github.com/spring-projects/spring-framework/tree/master/spring-webmvc) | MVC 框架 | 5.3.16 | [文档](http://www.iocoder.cn/SpringMVC/MVC/?yudao) |
|
||||
| [Spring Security](https://github.com/spring-projects/spring-security) | Spring 安全框架 | 5.5.5 | [文档](http://www.iocoder.cn/Spring-Boot/Spring-Security/?yudao) |
|
||||
| [Hibernate Validator](https://github.com/hibernate/hibernate-validator) | 参数校验组件 | 6.2.2 | [文档](http://www.iocoder.cn/Spring-Boot/Validation/?yudao) |
|
||||
| [Activiti](https://github.com/Activiti/Activiti) | 工作流引擎 | 7.1.0.M6 | [文档](TODO) |
|
||||
| [Quartz](https://github.com/quartz-scheduler) | 任务调度组件 | 2.3.2 | [文档](http://www.iocoder.cn/Spring-Boot/Job/?yudao) |
|
||||
| [Knife4j](https://gitee.com/xiaoym/knife4j) | Swagger 增强 UI 实现 | 3.0.2 | [文档](http://www.iocoder.cn/Spring-Boot/Swagger/?yudao) |
|
||||
| [Resilience4j](https://github.com/resilience4j/resilience4j) | 服务保障组件 | 1.7.0 | [文档](http://www.iocoder.cn/Spring-Boot/Resilience4j/?yudao) |
|
||||
| [SkyWalking](https://skywalking.apache.org/) | 分布式应用追踪系统 | 8.5.0 | [文档](http://www.iocoder.cn/Spring-Boot/SkyWalking/?yudao) |
|
||||
| [Spring Boot Admin](https://github.com/codecentric/spring-boot-admin) | Spring Boot 监控平台 | 2.4.2 | [文档](http://www.iocoder.cn/Spring-Boot/Admin/?yudao) |
|
||||
| [Jackson](https://github.com/FasterXML/jackson) | JSON 工具库 | 2.12.6 | |
|
||||
| [MapStruct](https://mapstruct.org/) | Java Bean 转换 | 1.4.1 | [文档](http://www.iocoder.cn/Spring-Boot/MapStruct/?yudao) |
|
||||
| [Lombok](https://projectlombok.org/) | 消除冗长的 Java 代码 | 1.16.14 | [文档](http://www.iocoder.cn/Spring-Boot/Lombok/?yudao) |
|
||||
| [JUnit](https://junit.org/junit5/) | Java 单元测试框架 | 5.7.2 | - |
|
||||
| [Mockito](https://github.com/mockito/mockito) | Java Mock 框架 | 3.9.0 | - |
|
||||
|
||||
### 前端
|
||||
|
||||
| 框架 | 说明 | 版本 |
|
||||
| --- | --- | --- |
|
||||
| [Vue](https://cn.vuejs.org/index.html) | JavaScript 框架 | 2.6.12 |
|
||||
| [Vue Element Admin](https://ant.design/docs/react/introduce-cn) | 后台前端解决方案 | - |
|
||||
| [Vue Element Admin](https://panjiachen.github.io/vue-element-admin-site/zh/) | 后台前端解决方案 | - |
|
||||
|
||||
## 演示图
|
||||
## 🐷 演示图
|
||||
|
||||
### 系统功能
|
||||
|
||||
| 模块 | biu | biu | biu |
|
||||
| --- | --- | --- | --- |
|
||||
| 登录 & 首页 |  |  |  |
|
||||
| 模块 | biu | biu | biu |
|
||||
| --- | --- |------------------------------------------------------------------| --- |
|
||||
| 登录 & 首页 |  |  |  |
|
||||
| 用户 |  |  | - |
|
||||
| 租户 & 套餐 |  |  | - |
|
||||
| 部门 & 岗位 |  |  | - |
|
||||
| 菜单 & 角色 |  |  | - |
|
||||
| 审计日志 |  |  | - |
|
||||
@@ -139,6 +201,23 @@
|
||||
| 字典 |  |  | - |
|
||||
| 错误码 & 通知 |  |  | - |
|
||||
|
||||
### 工作流程
|
||||
|
||||
| 模块 | biu | biu | biu |
|
||||
| --- | --- | --- | --- |
|
||||
| 流程模型 |  |  |  |
|
||||
| 表单 & 分组 |  |  | - |
|
||||
| 我的流程 |  |  |  |
|
||||
| 待办 & 已办 |  |  |  |
|
||||
| OA 请假 |  |  |  |
|
||||
|
||||
### 支付系统
|
||||
|
||||
| 模块 | biu | biu | biu |
|
||||
| --- | --- | --- | --- |
|
||||
| 商家 & 应用 |  |  |  |
|
||||
| 支付 & 退款 |  |  | --- |
|
||||
|
||||
### 基础设施
|
||||
|
||||
| 模块 | biu | biu | biu |
|
||||
@@ -153,5 +232,5 @@
|
||||
|
||||
| 模块 | biu | biu | biu |
|
||||
| --- | --- | --- | --- |
|
||||
| 代码生成 |  |  |  |
|
||||
| 代码生成 |  |  | - |
|
||||
| 文档 |  |  | - |
|
||||
|
@@ -1,7 +1,11 @@
|
||||
{
|
||||
"local": {
|
||||
"baseUrl": "http://127.0.0.1:48080/api",
|
||||
"userServerUrl": "http://127.0.0.1:28080/api",
|
||||
"token": "test1"
|
||||
"baseUrl": "http://127.0.0.1:48080/admin-api",
|
||||
"token": "test1",
|
||||
"adminTenentId": "1",
|
||||
|
||||
"appApi": "http://127.0.0.1:48080/app-api",
|
||||
"appToken": "test1",
|
||||
"appTenentId": "1"
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
config.stopBubbling = true
|
||||
lombok.tostring.callsuper=true
|
||||
lombok.equalsandhashcode.callsuper=true
|
||||
lombok.tostring.callsuper=CALL
|
||||
lombok.equalsandhashcode.callsuper=CALL
|
||||
lombok.accessors.chain=true
|
||||
|
44
pom.xml
44
pom.xml
@@ -10,22 +10,32 @@
|
||||
<modules>
|
||||
<module>yudao-dependencies</module>
|
||||
<module>yudao-framework</module>
|
||||
<module>yudao-admin-server</module>
|
||||
<module>yudao-user-server</module>
|
||||
<module>yudao-core-service</module>
|
||||
<!-- Server 主项目 -->
|
||||
<module>yudao-server</module>
|
||||
<!-- 各种 module 拓展 -->
|
||||
<module>yudao-module-member</module>
|
||||
<module>yudao-module-bpm</module>
|
||||
<module>yudao-module-system</module>
|
||||
<module>yudao-module-infra</module>
|
||||
<module>yudao-module-tool</module>
|
||||
<module>yudao-module-pay</module>
|
||||
</modules>
|
||||
|
||||
<name>${artifactId}</name>
|
||||
<name>${project.artifactId}</name>
|
||||
<description>芋道项目基础脚手架</description>
|
||||
<url>https://github.com/YunaiV/ruoyi-vue-pro</url>
|
||||
|
||||
<properties>
|
||||
<revision>1.1.0-snapshot</revision>
|
||||
<revision>1.6.0-snapshot</revision>
|
||||
<!-- Maven 相关 -->
|
||||
<java.version>1.8</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version>
|
||||
<maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
|
||||
<!-- 看看咋放到 bom 里 -->
|
||||
<lombok.version>1.18.20</lombok.version>
|
||||
<mapstruct.version>1.4.1.Final</mapstruct.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
@@ -51,6 +61,26 @@
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>${maven-surefire-plugin.version}</version>
|
||||
</plugin>
|
||||
<!-- maven-compiler-plugin 插件,解决 Lombok + MapStruct 组合 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${maven-compiler-plugin.version}</version>
|
||||
<configuration>
|
||||
<annotationProcessorPaths>
|
||||
<path>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>${lombok.version}</version>
|
||||
</path>
|
||||
<path>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<artifactId>mapstruct-processor</artifactId>
|
||||
<version>${mapstruct.version}</version>
|
||||
</path>
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
@@ -58,9 +88,9 @@
|
||||
<!-- 使用 aliyun 的 Maven 源,提升下载速度 -->
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>aliyun</id>
|
||||
<id>aliyunmaven</id>
|
||||
<name>aliyun</name>
|
||||
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
|
||||
<url>https://maven.aliyun.com/repository/public</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
|
4380
sql/bpm-activiti.sql
Normal file
4380
sql/bpm-activiti.sql
Normal file
File diff suppressed because one or more lines are too long
1517
sql/bpm-flowable.sql
Normal file
1517
sql/bpm-flowable.sql
Normal file
File diff suppressed because one or more lines are too long
187
sql/quartz.sql
187
sql/quartz.sql
@@ -1,17 +1,17 @@
|
||||
/*
|
||||
Navicat Premium Data Transfer
|
||||
|
||||
Source Server : local-mysql001
|
||||
Source Server : 127.0.0.1
|
||||
Source Server Type : MySQL
|
||||
Source Server Version : 50718
|
||||
Source Server Version : 80026
|
||||
Source Host : localhost:3306
|
||||
Source Schema : ruoyi-vue-pro
|
||||
|
||||
Target Server Type : MySQL
|
||||
Target Server Version : 50718
|
||||
Target Server Version : 80026
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 03/05/2021 12:01:37
|
||||
Date: 05/02/2022 00:50:30
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
@@ -22,14 +22,14 @@ SET FOREIGN_KEY_CHECKS = 0;
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `QRTZ_BLOB_TRIGGERS`;
|
||||
CREATE TABLE `QRTZ_BLOB_TRIGGERS` (
|
||||
`SCHED_NAME` varchar(120) NOT NULL,
|
||||
`TRIGGER_NAME` varchar(190) NOT NULL,
|
||||
`TRIGGER_GROUP` varchar(190) NOT NULL,
|
||||
`SCHED_NAME` varchar(120) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`TRIGGER_NAME` varchar(190) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`TRIGGER_GROUP` varchar(190) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`BLOB_DATA` blob,
|
||||
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
|
||||
KEY `SCHED_NAME` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
|
||||
CONSTRAINT `qrtz_blob_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of QRTZ_BLOB_TRIGGERS
|
||||
@@ -42,11 +42,11 @@ COMMIT;
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `QRTZ_CALENDARS`;
|
||||
CREATE TABLE `QRTZ_CALENDARS` (
|
||||
`SCHED_NAME` varchar(120) NOT NULL,
|
||||
`CALENDAR_NAME` varchar(190) NOT NULL,
|
||||
`SCHED_NAME` varchar(120) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`CALENDAR_NAME` varchar(190) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`CALENDAR` blob NOT NULL,
|
||||
PRIMARY KEY (`SCHED_NAME`,`CALENDAR_NAME`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of QRTZ_CALENDARS
|
||||
@@ -59,20 +59,21 @@ COMMIT;
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `QRTZ_CRON_TRIGGERS`;
|
||||
CREATE TABLE `QRTZ_CRON_TRIGGERS` (
|
||||
`SCHED_NAME` varchar(120) NOT NULL,
|
||||
`TRIGGER_NAME` varchar(190) NOT NULL,
|
||||
`TRIGGER_GROUP` varchar(190) NOT NULL,
|
||||
`CRON_EXPRESSION` varchar(120) NOT NULL,
|
||||
`TIME_ZONE_ID` varchar(80) DEFAULT NULL,
|
||||
`SCHED_NAME` varchar(120) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`TRIGGER_NAME` varchar(190) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`TRIGGER_GROUP` varchar(190) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`CRON_EXPRESSION` varchar(120) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`TIME_ZONE_ID` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
|
||||
CONSTRAINT `qrtz_cron_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of QRTZ_CRON_TRIGGERS
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `QRTZ_CRON_TRIGGERS` VALUES ('schedulerName', 'sysUserSessionTimeoutJob', 'DEFAULT', '0 * * * * ? *', 'Asia/Shanghai');
|
||||
INSERT INTO `QRTZ_CRON_TRIGGERS` VALUES ('schedulerName', 'payNotifyJob', 'DEFAULT', '* * * * * ?', 'Asia/Shanghai');
|
||||
INSERT INTO `QRTZ_CRON_TRIGGERS` VALUES ('schedulerName', 'userSessionTimeoutJob', 'DEFAULT', '0 * * * * ? *', 'Asia/Shanghai');
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
@@ -80,19 +81,19 @@ COMMIT;
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `QRTZ_FIRED_TRIGGERS`;
|
||||
CREATE TABLE `QRTZ_FIRED_TRIGGERS` (
|
||||
`SCHED_NAME` varchar(120) NOT NULL,
|
||||
`ENTRY_ID` varchar(95) NOT NULL,
|
||||
`TRIGGER_NAME` varchar(190) NOT NULL,
|
||||
`TRIGGER_GROUP` varchar(190) NOT NULL,
|
||||
`INSTANCE_NAME` varchar(190) NOT NULL,
|
||||
`FIRED_TIME` bigint(13) NOT NULL,
|
||||
`SCHED_TIME` bigint(13) NOT NULL,
|
||||
`PRIORITY` int(11) NOT NULL,
|
||||
`STATE` varchar(16) NOT NULL,
|
||||
`JOB_NAME` varchar(190) DEFAULT NULL,
|
||||
`JOB_GROUP` varchar(190) DEFAULT NULL,
|
||||
`IS_NONCONCURRENT` varchar(1) DEFAULT NULL,
|
||||
`REQUESTS_RECOVERY` varchar(1) DEFAULT NULL,
|
||||
`SCHED_NAME` varchar(120) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`ENTRY_ID` varchar(95) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`TRIGGER_NAME` varchar(190) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`TRIGGER_GROUP` varchar(190) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`INSTANCE_NAME` varchar(190) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`FIRED_TIME` bigint NOT NULL,
|
||||
`SCHED_TIME` bigint NOT NULL,
|
||||
`PRIORITY` int NOT NULL,
|
||||
`STATE` varchar(16) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`JOB_NAME` varchar(190) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`JOB_GROUP` varchar(190) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`IS_NONCONCURRENT` varchar(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`REQUESTS_RECOVERY` varchar(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
PRIMARY KEY (`SCHED_NAME`,`ENTRY_ID`),
|
||||
KEY `IDX_QRTZ_FT_TRIG_INST_NAME` (`SCHED_NAME`,`INSTANCE_NAME`),
|
||||
KEY `IDX_QRTZ_FT_INST_JOB_REQ_RCVRY` (`SCHED_NAME`,`INSTANCE_NAME`,`REQUESTS_RECOVERY`),
|
||||
@@ -100,7 +101,7 @@ CREATE TABLE `QRTZ_FIRED_TRIGGERS` (
|
||||
KEY `IDX_QRTZ_FT_JG` (`SCHED_NAME`,`JOB_GROUP`),
|
||||
KEY `IDX_QRTZ_FT_T_G` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
|
||||
KEY `IDX_QRTZ_FT_TG` (`SCHED_NAME`,`TRIGGER_GROUP`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of QRTZ_FIRED_TRIGGERS
|
||||
@@ -113,26 +114,27 @@ COMMIT;
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `QRTZ_JOB_DETAILS`;
|
||||
CREATE TABLE `QRTZ_JOB_DETAILS` (
|
||||
`SCHED_NAME` varchar(120) NOT NULL,
|
||||
`JOB_NAME` varchar(190) NOT NULL,
|
||||
`JOB_GROUP` varchar(190) NOT NULL,
|
||||
`DESCRIPTION` varchar(250) DEFAULT NULL,
|
||||
`JOB_CLASS_NAME` varchar(250) NOT NULL,
|
||||
`IS_DURABLE` varchar(1) NOT NULL,
|
||||
`IS_NONCONCURRENT` varchar(1) NOT NULL,
|
||||
`IS_UPDATE_DATA` varchar(1) NOT NULL,
|
||||
`REQUESTS_RECOVERY` varchar(1) NOT NULL,
|
||||
`SCHED_NAME` varchar(120) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`JOB_NAME` varchar(190) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`JOB_GROUP` varchar(190) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`DESCRIPTION` varchar(250) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`JOB_CLASS_NAME` varchar(250) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`IS_DURABLE` varchar(1) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`IS_NONCONCURRENT` varchar(1) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`IS_UPDATE_DATA` varchar(1) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`REQUESTS_RECOVERY` varchar(1) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`JOB_DATA` blob,
|
||||
PRIMARY KEY (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`),
|
||||
KEY `IDX_QRTZ_J_REQ_RECOVERY` (`SCHED_NAME`,`REQUESTS_RECOVERY`),
|
||||
KEY `IDX_QRTZ_J_GRP` (`SCHED_NAME`,`JOB_GROUP`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of QRTZ_JOB_DETAILS
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `QRTZ_JOB_DETAILS` VALUES ('schedulerName', 'sysUserSessionTimeoutJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000037400104A4F425F48414E444C45525F4E414D457400187379735573657253657373696F6E54696D656F75744A6F627800);
|
||||
INSERT INTO `QRTZ_JOB_DETAILS` VALUES ('schedulerName', 'payNotifyJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000000000000057400104A4F425F48414E444C45525F4E414D4574000C7061794E6F746966794A6F627800);
|
||||
INSERT INTO `QRTZ_JOB_DETAILS` VALUES ('schedulerName', 'userSessionTimeoutJob', 'DEFAULT', NULL, 'cn.iocoder.yudao.framework.quartz.core.handler.JobHandlerInvoker', '0', '1', '1', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000027400064A4F425F49447372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B0200007870000000000000000D7400104A4F425F48414E444C45525F4E414D457400157573657253657373696F6E54696D656F75744A6F627800);
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
@@ -140,10 +142,10 @@ COMMIT;
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `QRTZ_LOCKS`;
|
||||
CREATE TABLE `QRTZ_LOCKS` (
|
||||
`SCHED_NAME` varchar(120) NOT NULL,
|
||||
`LOCK_NAME` varchar(40) NOT NULL,
|
||||
`SCHED_NAME` varchar(120) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`LOCK_NAME` varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
PRIMARY KEY (`SCHED_NAME`,`LOCK_NAME`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of QRTZ_LOCKS
|
||||
@@ -158,10 +160,10 @@ COMMIT;
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `QRTZ_PAUSED_TRIGGER_GRPS`;
|
||||
CREATE TABLE `QRTZ_PAUSED_TRIGGER_GRPS` (
|
||||
`SCHED_NAME` varchar(120) NOT NULL,
|
||||
`TRIGGER_GROUP` varchar(190) NOT NULL,
|
||||
`SCHED_NAME` varchar(120) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`TRIGGER_GROUP` varchar(190) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_GROUP`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of QRTZ_PAUSED_TRIGGER_GRPS
|
||||
@@ -174,18 +176,18 @@ COMMIT;
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `QRTZ_SCHEDULER_STATE`;
|
||||
CREATE TABLE `QRTZ_SCHEDULER_STATE` (
|
||||
`SCHED_NAME` varchar(120) NOT NULL,
|
||||
`INSTANCE_NAME` varchar(190) NOT NULL,
|
||||
`LAST_CHECKIN_TIME` bigint(13) NOT NULL,
|
||||
`CHECKIN_INTERVAL` bigint(13) NOT NULL,
|
||||
`SCHED_NAME` varchar(120) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`INSTANCE_NAME` varchar(190) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`LAST_CHECKIN_TIME` bigint NOT NULL,
|
||||
`CHECKIN_INTERVAL` bigint NOT NULL,
|
||||
PRIMARY KEY (`SCHED_NAME`,`INSTANCE_NAME`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of QRTZ_SCHEDULER_STATE
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `QRTZ_SCHEDULER_STATE` VALUES ('schedulerName', 'Yunai1620010117445', 1620010210071, 15000);
|
||||
INSERT INTO `QRTZ_SCHEDULER_STATE` VALUES ('schedulerName', 'Yunai.local1635571630493', 1635572537879, 15000);
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
@@ -193,15 +195,15 @@ COMMIT;
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `QRTZ_SIMPLE_TRIGGERS`;
|
||||
CREATE TABLE `QRTZ_SIMPLE_TRIGGERS` (
|
||||
`SCHED_NAME` varchar(120) NOT NULL,
|
||||
`TRIGGER_NAME` varchar(190) NOT NULL,
|
||||
`TRIGGER_GROUP` varchar(190) NOT NULL,
|
||||
`REPEAT_COUNT` bigint(7) NOT NULL,
|
||||
`REPEAT_INTERVAL` bigint(12) NOT NULL,
|
||||
`TIMES_TRIGGERED` bigint(10) NOT NULL,
|
||||
`SCHED_NAME` varchar(120) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`TRIGGER_NAME` varchar(190) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`TRIGGER_GROUP` varchar(190) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`REPEAT_COUNT` bigint NOT NULL,
|
||||
`REPEAT_INTERVAL` bigint NOT NULL,
|
||||
`TIMES_TRIGGERED` bigint NOT NULL,
|
||||
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
|
||||
CONSTRAINT `qrtz_simple_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of QRTZ_SIMPLE_TRIGGERS
|
||||
@@ -214,23 +216,23 @@ COMMIT;
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `QRTZ_SIMPROP_TRIGGERS`;
|
||||
CREATE TABLE `QRTZ_SIMPROP_TRIGGERS` (
|
||||
`SCHED_NAME` varchar(120) NOT NULL,
|
||||
`TRIGGER_NAME` varchar(190) NOT NULL,
|
||||
`TRIGGER_GROUP` varchar(190) NOT NULL,
|
||||
`STR_PROP_1` varchar(512) DEFAULT NULL,
|
||||
`STR_PROP_2` varchar(512) DEFAULT NULL,
|
||||
`STR_PROP_3` varchar(512) DEFAULT NULL,
|
||||
`INT_PROP_1` int(11) DEFAULT NULL,
|
||||
`INT_PROP_2` int(11) DEFAULT NULL,
|
||||
`LONG_PROP_1` bigint(20) DEFAULT NULL,
|
||||
`LONG_PROP_2` bigint(20) DEFAULT NULL,
|
||||
`SCHED_NAME` varchar(120) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`TRIGGER_NAME` varchar(190) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`TRIGGER_GROUP` varchar(190) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`STR_PROP_1` varchar(512) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`STR_PROP_2` varchar(512) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`STR_PROP_3` varchar(512) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`INT_PROP_1` int DEFAULT NULL,
|
||||
`INT_PROP_2` int DEFAULT NULL,
|
||||
`LONG_PROP_1` bigint DEFAULT NULL,
|
||||
`LONG_PROP_2` bigint DEFAULT NULL,
|
||||
`DEC_PROP_1` decimal(13,4) DEFAULT NULL,
|
||||
`DEC_PROP_2` decimal(13,4) DEFAULT NULL,
|
||||
`BOOL_PROP_1` varchar(1) DEFAULT NULL,
|
||||
`BOOL_PROP_2` varchar(1) DEFAULT NULL,
|
||||
`BOOL_PROP_1` varchar(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`BOOL_PROP_2` varchar(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
|
||||
CONSTRAINT `qrtz_simprop_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of QRTZ_SIMPROP_TRIGGERS
|
||||
@@ -243,21 +245,21 @@ COMMIT;
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `QRTZ_TRIGGERS`;
|
||||
CREATE TABLE `QRTZ_TRIGGERS` (
|
||||
`SCHED_NAME` varchar(120) NOT NULL,
|
||||
`TRIGGER_NAME` varchar(190) NOT NULL,
|
||||
`TRIGGER_GROUP` varchar(190) NOT NULL,
|
||||
`JOB_NAME` varchar(190) NOT NULL,
|
||||
`JOB_GROUP` varchar(190) NOT NULL,
|
||||
`DESCRIPTION` varchar(250) DEFAULT NULL,
|
||||
`NEXT_FIRE_TIME` bigint(13) DEFAULT NULL,
|
||||
`PREV_FIRE_TIME` bigint(13) DEFAULT NULL,
|
||||
`PRIORITY` int(11) DEFAULT NULL,
|
||||
`TRIGGER_STATE` varchar(16) NOT NULL,
|
||||
`TRIGGER_TYPE` varchar(8) NOT NULL,
|
||||
`START_TIME` bigint(13) NOT NULL,
|
||||
`END_TIME` bigint(13) DEFAULT NULL,
|
||||
`CALENDAR_NAME` varchar(190) DEFAULT NULL,
|
||||
`MISFIRE_INSTR` smallint(2) DEFAULT NULL,
|
||||
`SCHED_NAME` varchar(120) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`TRIGGER_NAME` varchar(190) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`TRIGGER_GROUP` varchar(190) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`JOB_NAME` varchar(190) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`JOB_GROUP` varchar(190) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`DESCRIPTION` varchar(250) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`NEXT_FIRE_TIME` bigint DEFAULT NULL,
|
||||
`PREV_FIRE_TIME` bigint DEFAULT NULL,
|
||||
`PRIORITY` int DEFAULT NULL,
|
||||
`TRIGGER_STATE` varchar(16) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`TRIGGER_TYPE` varchar(8) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`START_TIME` bigint NOT NULL,
|
||||
`END_TIME` bigint DEFAULT NULL,
|
||||
`CALENDAR_NAME` varchar(190) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`MISFIRE_INSTR` smallint DEFAULT NULL,
|
||||
`JOB_DATA` blob,
|
||||
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
|
||||
KEY `IDX_QRTZ_T_J` (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`),
|
||||
@@ -273,13 +275,14 @@ CREATE TABLE `QRTZ_TRIGGERS` (
|
||||
KEY `IDX_QRTZ_T_NFT_ST_MISFIRE` (`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`,`TRIGGER_STATE`),
|
||||
KEY `IDX_QRTZ_T_NFT_ST_MISFIRE_GRP` (`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`,`TRIGGER_GROUP`,`TRIGGER_STATE`),
|
||||
CONSTRAINT `qrtz_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`) REFERENCES `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of QRTZ_TRIGGERS
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `QRTZ_TRIGGERS` VALUES ('schedulerName', 'sysUserSessionTimeoutJob', 'DEFAULT', 'sysUserSessionTimeoutJob', 'DEFAULT', NULL, 1620010260000, 1620010200000, 5, 'WAITING', 'CRON', 1613649236000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D707400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B0200007870000007D074000F4A4F425F52455452595F434F554E547371007E0009000000037800);
|
||||
INSERT INTO `QRTZ_TRIGGERS` VALUES ('schedulerName', 'payNotifyJob', 'DEFAULT', 'payNotifyJob', 'DEFAULT', NULL, 1635572540000, 1635572539000, 5, 'WAITING', 'CRON', 1635294882000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D707400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000074000F4A4F425F52455452595F434F554E5471007E000B7800);
|
||||
INSERT INTO `QRTZ_TRIGGERS` VALUES ('schedulerName', 'userSessionTimeoutJob', 'DEFAULT', 'userSessionTimeoutJob', 'DEFAULT', NULL, 1643993400000, -1, 5, 'WAITING', 'CRON', 1643993386000, 0, NULL, 0, 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000037400114A4F425F48414E444C45525F504152414D707400124A4F425F52455452595F494E54455256414C737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B0200007870000007D074000F4A4F425F52455452595F434F554E547371007E0009000000037800);
|
||||
COMMIT;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
File diff suppressed because one or more lines are too long
@@ -1,155 +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>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>yudao-admin-server</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>yudao-admin-server</name>
|
||||
<description>管理后台 Server,提供其 API 接口</description>
|
||||
<url>https://github.com/YunaiV/ruoyi-vue-pro</url>
|
||||
|
||||
<dependencies>
|
||||
<!-- 业务组件 -->
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-core-service</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-spring-boot-starter-biz-operatelog</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-spring-boot-starter-biz-dict</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-spring-boot-starter-biz-sms</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Web 相关 -->
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<!-- spring boot 配置所需依赖 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-spring-boot-starter-security</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- DB 相关 -->
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-spring-boot-starter-mybatis</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-spring-boot-starter-redis</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Config 配置中心相关 -->
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-spring-boot-starter-config</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Job 定时任务相关 -->
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-spring-boot-starter-job</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 消息队列相关 -->
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-spring-boot-starter-mq</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 服务保障相关 -->
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-spring-boot-starter-protection</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 监控相关 -->
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-spring-boot-starter-monitor</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>de.codecentric</groupId>
|
||||
<artifactId>spring-boot-admin-starter-server</artifactId> <!-- 实现 Spring Boot Admin Server 服务端 -->
|
||||
</dependency>
|
||||
|
||||
<!-- Test 测试相关 -->
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- 工具类相关 -->
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-spring-boot-starter-excel</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.velocity</groupId>
|
||||
<artifactId>velocity-engine-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.smallbun.screw</groupId>
|
||||
<artifactId>screw-core</artifactId> <!-- 实现数据库文档 -->
|
||||
</dependency>
|
||||
|
||||
<!-- TODO 后续看情况,进行调整 -->
|
||||
<dependency>
|
||||
<groupId>com.xkcoding.justauth</groupId>
|
||||
<artifactId>justauth-spring-boot-starter</artifactId>
|
||||
<version>1.4.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<!-- 设置构建的 jar 包名 -->
|
||||
<finalName>${artifactId}</finalName>
|
||||
<plugins>
|
||||
<!-- 打包 -->
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<fork>true</fork>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal> <!-- 将引入的 jar 打入其中 -->
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
@@ -1,14 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SuppressWarnings("SpringComponentScan") // 忽略 IDEA 无法识别 ${yudao.info.base-package} 和 ${yudao.core-service.base-package}
|
||||
@SpringBootApplication(scanBasePackages = {"${yudao.info.base-package}", "${yudao.core-service.base-package}"})
|
||||
public class AdminServerApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(AdminServerApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
@@ -1,9 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.framework.async.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
|
||||
@Configuration
|
||||
@EnableAsync
|
||||
public class AsyncConfiguration {
|
||||
}
|
@@ -1,4 +0,0 @@
|
||||
/**
|
||||
* 异步执行,基于 Spring @Async 实现
|
||||
*/
|
||||
package cn.iocoder.yudao.adminserver.framework.async;
|
@@ -1,4 +0,0 @@
|
||||
/**
|
||||
* 使用 Spring Boot Admin 实现简单的监控平台
|
||||
*/
|
||||
package cn.iocoder.yudao.adminserver.framework.monitor;
|
@@ -1,6 +0,0 @@
|
||||
/**
|
||||
* 属于整个 yudao-admin-server 的 framework 封装
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
package cn.iocoder.yudao.adminserver.framework;
|
@@ -1,39 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.framework.security;
|
||||
|
||||
import cn.iocoder.yudao.framework.web.config.WebProperties;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.security.config.Customizer;
|
||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||
import org.springframework.security.config.annotation.web.configurers.ExpressionUrlAuthorizationConfigurer;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@Configuration
|
||||
public class SecurityConfiguration {
|
||||
|
||||
@Resource
|
||||
private WebProperties webProperties;
|
||||
|
||||
@Value("${spring.boot.admin.context-path:''}")
|
||||
private String adminSeverContextPath;
|
||||
|
||||
@Bean
|
||||
public Customizer<ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry> authorizeRequestsCustomizer() {
|
||||
return registry -> {
|
||||
// 通用的接口,可匿名访问 TODO 芋艿:需要抽象出去
|
||||
registry.antMatchers(api("/system/captcha/**")).anonymous();
|
||||
// Spring Boot Admin Server 的安全配置 TODO 芋艿:需要抽象出去
|
||||
registry.antMatchers(adminSeverContextPath).anonymous()
|
||||
.antMatchers(adminSeverContextPath + "/**").anonymous();
|
||||
// 短信回调 API
|
||||
registry.antMatchers(api("/system/sms/callback/**")).anonymous();
|
||||
};
|
||||
}
|
||||
|
||||
private String api(String url) {
|
||||
return webProperties.getApiPrefix() + url;
|
||||
}
|
||||
|
||||
}
|
@@ -1,105 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.config;
|
||||
|
||||
import cn.iocoder.yudao.coreservice.modules.infra.dal.dataobject.config.InfConfigDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo.*;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.convert.config.InfConfigConvert;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.service.config.InfConfigService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static cn.iocoder.yudao.adminserver.modules.infra.enums.InfErrorCodeConstants.CONFIG_GET_VALUE_ERROR_IF_SENSITIVE;
|
||||
|
||||
@Api(tags = "参数配置")
|
||||
@RestController
|
||||
@RequestMapping("/infra/config")
|
||||
@Validated
|
||||
public class InfConfigController {
|
||||
|
||||
@Resource
|
||||
private InfConfigService configService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@ApiOperation("创建参数配置")
|
||||
@PreAuthorize("@ss.hasPermission('infra:config:create')")
|
||||
public CommonResult<Long> createConfig(@Valid @RequestBody InfConfigCreateReqVO reqVO) {
|
||||
return success(configService.createConfig(reqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@ApiOperation("修改参数配置")
|
||||
@PreAuthorize("@ss.hasPermission('infra:config:update')")
|
||||
public CommonResult<Boolean> updateConfig(@Valid @RequestBody InfConfigUpdateReqVO reqVO) {
|
||||
configService.updateConfig(reqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@ApiOperation("删除参数配置")
|
||||
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
|
||||
@PreAuthorize("@ss.hasPermission('infra:config:delete')")
|
||||
public CommonResult<Boolean> deleteConfig(@RequestParam("id") Long id) {
|
||||
configService.deleteConfig(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/get")
|
||||
@ApiOperation("获得参数配置")
|
||||
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
|
||||
@PreAuthorize("@ss.hasPermission('infra:config:query')")
|
||||
public CommonResult<InfConfigRespVO> getConfig(@RequestParam("id") Long id) {
|
||||
return success(InfConfigConvert.INSTANCE.convert(configService.getConfig(id)));
|
||||
}
|
||||
|
||||
@GetMapping(value = "/get-value-by-key")
|
||||
@ApiOperation(value = "根据参数键名查询参数值", notes = "敏感配置,不允许返回给前端")
|
||||
@ApiImplicitParam(name = "key", value = "参数键", required = true, example = "yunai.biz.username", dataTypeClass = String.class)
|
||||
public CommonResult<String> getConfigKey(@RequestParam("key") String key) {
|
||||
InfConfigDO config = configService.getConfigByKey(key);
|
||||
if (config == null) {
|
||||
return null;
|
||||
}
|
||||
if (config.getSensitive()) {
|
||||
throw exception(CONFIG_GET_VALUE_ERROR_IF_SENSITIVE);
|
||||
}
|
||||
return success(config.getValue());
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@ApiOperation("获取参数配置分页")
|
||||
@PreAuthorize("@ss.hasPermission('infra:config:query')")
|
||||
public CommonResult<PageResult<InfConfigRespVO>> getConfigPage(@Valid InfConfigPageReqVO reqVO) {
|
||||
PageResult<InfConfigDO> page = configService.getConfigPage(reqVO);
|
||||
return success(InfConfigConvert.INSTANCE.convertPage(page));
|
||||
}
|
||||
|
||||
@GetMapping("/export")
|
||||
@ApiOperation("导出参数配置")
|
||||
@PreAuthorize("@ss.hasPermission('infra:config:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportSysConfig(@Valid InfConfigExportReqVO reqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
List<InfConfigDO> list = configService.getConfigList(reqVO);
|
||||
// 拼接数据
|
||||
List<InfConfigExcelVO> datas = InfConfigConvert.INSTANCE.convertList(list);
|
||||
// 输出
|
||||
ExcelUtils.write(response, "参数配置.xls", "数据", InfConfigExcelVO.class, datas);
|
||||
}
|
||||
|
||||
}
|
@@ -1,40 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
/**
|
||||
* 参数配置 Base VO,提供给添加、修改、详细的子 VO 使用
|
||||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
|
||||
*/
|
||||
@Data
|
||||
public class InfConfigBaseVO {
|
||||
|
||||
@ApiModelProperty(value = "参数分组", required = true, example = "biz")
|
||||
@NotEmpty(message = "参数分组不能为空")
|
||||
@Size(max = 50, message = "参数名称不能超过50个字符")
|
||||
private String group;
|
||||
|
||||
@ApiModelProperty(value = "参数名称", required = true, example = "数据库名")
|
||||
@NotBlank(message = "参数名称不能为空")
|
||||
@Size(max = 100, message = "参数名称不能超过100个字符")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "参数键值", required = true, example = "1024")
|
||||
@NotBlank(message = "参数键值不能为空")
|
||||
@Size(max = 500, message = "参数键值长度不能超过500个字符")
|
||||
private String value;
|
||||
|
||||
@ApiModelProperty(value = "是否敏感", required = true, example = "true")
|
||||
@NotNull(message = "是否敏感不能为空")
|
||||
private Boolean sensitive;
|
||||
|
||||
@ApiModelProperty(value = "备注", example = "备注一下很帅气!")
|
||||
private String remark;
|
||||
|
||||
}
|
@@ -1,21 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
@ApiModel("参数配置创建 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class InfConfigCreateReqVO extends InfConfigBaseVO {
|
||||
|
||||
@ApiModelProperty(value = "参数键名", required = true, example = "yunai.db.username")
|
||||
@NotBlank(message = "参数键名长度不能为空")
|
||||
@Size(max = 100, message = "参数键名长度不能超过100个字符")
|
||||
private String key;
|
||||
|
||||
}
|
@@ -1,46 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||
import cn.iocoder.yudao.adminserver.modules.system.enums.SysDictTypeConstants;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 参数配置 Excel 导出响应 VO
|
||||
*/
|
||||
@Data
|
||||
public class InfConfigExcelVO {
|
||||
|
||||
@ExcelProperty("参数配置序号")
|
||||
private Long id;
|
||||
|
||||
@ExcelProperty("参数键名")
|
||||
private String key;
|
||||
|
||||
@ExcelProperty("参数分组")
|
||||
private String group;
|
||||
|
||||
@ExcelProperty("参数名称")
|
||||
private String name;
|
||||
|
||||
@ExcelProperty("参数键值")
|
||||
private String value;
|
||||
|
||||
@ExcelProperty(value = "参数类型", converter = DictConvert.class)
|
||||
@DictFormat(SysDictTypeConstants.CONFIG_TYPE)
|
||||
private Integer type;
|
||||
|
||||
@ExcelProperty(value = "是否敏感", converter = DictConvert.class)
|
||||
@DictFormat(SysDictTypeConstants.BOOLEAN_STRING)
|
||||
private Boolean sensitive;
|
||||
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
@@ -1,33 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@ApiModel("参数配置导出 Request VO")
|
||||
@Data
|
||||
public class InfConfigExportReqVO {
|
||||
|
||||
@ApiModelProperty(value = "参数名称", example = "模糊匹配")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "参数键名", example = "yunai.db.username", notes = "模糊匹配")
|
||||
private String key;
|
||||
|
||||
@ApiModelProperty(value = "参数类型", example = "1", notes = "参见 SysConfigTypeEnum 枚举")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "开始时间", example = "2020-10-24 00:00:00")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private Date beginTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间", example = "2020-10-24 23:59:59")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private Date endTime;
|
||||
|
||||
}
|
@@ -1,38 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@ApiModel("参数配置分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class InfConfigPageReqVO extends PageParam {
|
||||
|
||||
@ApiModelProperty(value = "参数名称", example = "模糊匹配")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "参数键名", example = "yunai.db.username", notes = "模糊匹配")
|
||||
private String key;
|
||||
|
||||
@ApiModelProperty(value = "参数类型", example = "1", notes = "参见 SysConfigTypeEnum 枚举")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "开始时间", example = "2020-10-24 00:00:00")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private Date beginTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间", example = "2020-10-24 23:59:59")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private Date endTime;
|
||||
|
||||
}
|
@@ -1,31 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.util.Date;
|
||||
|
||||
@ApiModel("参数配置信息 Response VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class InfConfigRespVO extends InfConfigBaseVO {
|
||||
|
||||
@ApiModelProperty(value = "参数配置序号", required = true, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "参数键名", required = true, example = "yunai.db.username")
|
||||
@NotBlank(message = "参数键名长度不能为空")
|
||||
@Size(max = 100, message = "参数键名长度不能超过100个字符")
|
||||
private String key;
|
||||
|
||||
@ApiModelProperty(value = "参数类型", required = true, example = "1", notes = "参见 SysConfigTypeEnum 枚举")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "创建时间", required = true, example = "时间戳格式")
|
||||
private Date createTime;
|
||||
|
||||
}
|
@@ -1,21 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@ApiModel("参数配置创建 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class InfConfigUpdateReqVO extends InfConfigBaseVO {
|
||||
|
||||
@ApiModelProperty(value = "参数配置序号", required = true, example = "1024")
|
||||
@NotNull(message = "参数配置编号不能为空")
|
||||
private Long id;
|
||||
|
||||
}
|
@@ -1,155 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.doc;
|
||||
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils;
|
||||
import cn.smallbun.screw.core.Configuration;
|
||||
import cn.smallbun.screw.core.engine.EngineConfig;
|
||||
import cn.smallbun.screw.core.engine.EngineFileType;
|
||||
import cn.smallbun.screw.core.engine.EngineTemplateType;
|
||||
import cn.smallbun.screw.core.execute.DocumentationExecute;
|
||||
import cn.smallbun.screw.core.process.ProcessConfig;
|
||||
import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DataSourceProperty;
|
||||
import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceProperties;
|
||||
import com.zaxxer.hikari.HikariConfig;
|
||||
import com.zaxxer.hikari.HikariDataSource;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
|
||||
@Api(tags = "数据库文档")
|
||||
@RestController
|
||||
@RequestMapping("/infra/db-doc")
|
||||
public class InfDbDocController {
|
||||
|
||||
@Resource
|
||||
private DynamicDataSourceProperties dynamicDataSourceProperties;
|
||||
|
||||
private static final String FILE_OUTPUT_DIR = System.getProperty("java.io.tmpdir") + File.separator
|
||||
+ "db-doc";
|
||||
private static final String DOC_FILE_NAME = "数据库文档";
|
||||
private static final String DOC_VERSION = "1.0.0";
|
||||
private static final String DOC_DESCRIPTION = "文档描述";
|
||||
|
||||
@GetMapping("/export-html")
|
||||
@ApiOperation("导出 html 格式的数据文档")
|
||||
@ApiImplicitParam(name = "deleteFile", value = "是否删除在服务器本地生成的数据库文档", example = "true", dataTypeClass = Boolean.class)
|
||||
public void exportHtml(@RequestParam(defaultValue = "true") Boolean deleteFile,
|
||||
HttpServletResponse response) throws IOException {
|
||||
doExportFile(EngineFileType.HTML, deleteFile, response);
|
||||
}
|
||||
|
||||
@GetMapping("/export-word")
|
||||
@ApiOperation("导出 word 格式的数据文档")
|
||||
@ApiImplicitParam(name = "deleteFile", value = "是否删除在服务器本地生成的数据库文档", example = "true", dataTypeClass = Boolean.class)
|
||||
public void exportWord(@RequestParam(defaultValue = "true") Boolean deleteFile,
|
||||
HttpServletResponse response) throws IOException {
|
||||
doExportFile(EngineFileType.WORD, deleteFile, response);
|
||||
}
|
||||
|
||||
@GetMapping("/export-markdown")
|
||||
@ApiOperation("导出 markdown 格式的数据文档")
|
||||
@ApiImplicitParam(name = "deleteFile", value = "是否删除在服务器本地生成的数据库文档", example = "true", dataTypeClass = Boolean.class)
|
||||
public void exportMarkdown(@RequestParam(defaultValue = "true") Boolean deleteFile,
|
||||
HttpServletResponse response) throws IOException {
|
||||
doExportFile(EngineFileType.MD, deleteFile, response);
|
||||
}
|
||||
|
||||
private void doExportFile(EngineFileType fileOutputType, Boolean deleteFile,
|
||||
HttpServletResponse response) throws IOException {
|
||||
String docFileName = DOC_FILE_NAME + "_" + IdUtil.fastSimpleUUID();
|
||||
String filePath = doExportFile(fileOutputType, docFileName);
|
||||
String downloadFileName = DOC_FILE_NAME + fileOutputType.getFileSuffix(); //下载后的文件名
|
||||
try {
|
||||
// 读取,返回
|
||||
ServletUtils.writeAttachment(response, downloadFileName, FileUtil.readBytes(filePath));
|
||||
} finally {
|
||||
handleDeleteFile(deleteFile, filePath);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 输出文件,返回文件路径
|
||||
*
|
||||
* @param fileOutputType 文件类型
|
||||
* @param fileName 文件名, 无需 ".docx" 等文件后缀
|
||||
* @return 生成的文件所在路径
|
||||
*/
|
||||
private String doExportFile(EngineFileType fileOutputType, String fileName) {
|
||||
try (HikariDataSource dataSource = buildDataSource()) {
|
||||
// 创建 screw 的配置
|
||||
Configuration config = Configuration.builder()
|
||||
.version(DOC_VERSION) // 版本
|
||||
.description(DOC_DESCRIPTION) // 描述
|
||||
.dataSource(dataSource) // 数据源
|
||||
.engineConfig(buildEngineConfig(fileOutputType, fileName)) // 引擎配置
|
||||
.produceConfig(buildProcessConfig()) // 处理配置
|
||||
.build();
|
||||
|
||||
// 执行 screw,生成数据库文档
|
||||
new DocumentationExecute(config).execute();
|
||||
|
||||
return FILE_OUTPUT_DIR + File.separator + fileName + fileOutputType.getFileSuffix();
|
||||
}
|
||||
}
|
||||
|
||||
private void handleDeleteFile(Boolean deleteFile, String filePath) {
|
||||
if (!deleteFile) {
|
||||
return;
|
||||
}
|
||||
FileUtil.del(filePath);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建数据源
|
||||
*/
|
||||
// TODO 芋艿:screw 暂时不支持 druid,尴尬
|
||||
private HikariDataSource buildDataSource() {
|
||||
// 获得 DataSource 数据源,目前只支持首个
|
||||
String primary = dynamicDataSourceProperties.getPrimary();
|
||||
DataSourceProperty dataSourceProperty = dynamicDataSourceProperties.getDatasource().get(primary);
|
||||
// 创建 HikariConfig 配置类
|
||||
HikariConfig hikariConfig = new HikariConfig();
|
||||
hikariConfig.setJdbcUrl(dataSourceProperty.getUrl());
|
||||
hikariConfig.setUsername(dataSourceProperty.getUsername());
|
||||
hikariConfig.setPassword(dataSourceProperty.getPassword());
|
||||
hikariConfig.addDataSourceProperty("useInformationSchema", "true"); // 设置可以获取 tables remarks 信息
|
||||
// 创建数据源
|
||||
return new HikariDataSource(hikariConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建 screw 的引擎配置
|
||||
*/
|
||||
private static EngineConfig buildEngineConfig(EngineFileType fileOutputType, String docFileName) {
|
||||
return EngineConfig.builder()
|
||||
.fileOutputDir(FILE_OUTPUT_DIR) // 生成文件路径
|
||||
.openOutputDir(false) // 打开目录
|
||||
.fileType(fileOutputType) // 文件类型
|
||||
.produceType(EngineTemplateType.freemarker) // 文件类型
|
||||
.fileName(docFileName) // 自定义文件名称
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建 screw 的处理配置,一般可忽略
|
||||
* 指定生成逻辑、当存在指定表、指定表前缀、指定表后缀时,将生成指定表,其余表不生成、并跳过忽略表配置
|
||||
*/
|
||||
private static ProcessConfig buildProcessConfig() {
|
||||
return ProcessConfig.builder()
|
||||
.ignoreTablePrefix(Collections.singletonList("QRTZ_")) // 忽略表前缀
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
@@ -1,81 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.file;
|
||||
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import cn.iocoder.yudao.coreservice.modules.infra.dal.dataobject.file.InfFileDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.file.vo.InfFilePageReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.file.vo.InfFileRespVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.convert.file.InfFileConvert;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.service.file.InfFileService;
|
||||
import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.io.IOException;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Api(tags = "文件存储")
|
||||
@RestController
|
||||
@RequestMapping("/infra/file")
|
||||
@Validated
|
||||
@Slf4j
|
||||
public class InfFileController {
|
||||
|
||||
@Resource
|
||||
private InfFileService fileService;
|
||||
|
||||
@PostMapping("/upload")
|
||||
@ApiOperation("上传文件")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "file", value = "文件附件", required = true, dataTypeClass = MultipartFile.class),
|
||||
@ApiImplicitParam(name = "path", value = "文件路径", example = "yudaoyuanma.png", dataTypeClass = String.class)
|
||||
})
|
||||
public CommonResult<String> uploadFile(@RequestParam("file") MultipartFile file,
|
||||
@RequestParam("path") String path) throws IOException {
|
||||
return success(fileService.createFile(path, IoUtil.readBytes(file.getInputStream())));
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@ApiOperation("删除文件")
|
||||
@ApiImplicitParam(name = "id", value = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('infra:file:delete')")
|
||||
public CommonResult<Boolean> deleteFile(@RequestParam("id") String id) {
|
||||
fileService.deleteFile(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get/{path}")
|
||||
@ApiOperation("下载文件")
|
||||
@ApiImplicitParam(name = "path", value = "文件附件", required = true, dataTypeClass = MultipartFile.class)
|
||||
public void getFile(HttpServletResponse response, @PathVariable("path") String path) throws IOException {
|
||||
InfFileDO file = fileService.getFile(path);
|
||||
if (file == null) {
|
||||
log.warn("[getFile][path({}) 文件不存在]", path);
|
||||
response.setStatus(HttpStatus.NOT_FOUND.value());
|
||||
return;
|
||||
}
|
||||
ServletUtils.writeAttachment(response, path, file.getContent());
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@ApiOperation("获得文件分页")
|
||||
@PreAuthorize("@ss.hasPermission('infra:file:query')")
|
||||
public CommonResult<PageResult<InfFileRespVO>> getFilePage(@Valid InfFilePageReqVO pageVO) {
|
||||
PageResult<InfFileDO> pageResult = fileService.getFilePage(pageVO);
|
||||
return success(InfFileConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
|
||||
}
|
@@ -1,35 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.file.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@ApiModel("文件分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class InfFilePageReqVO extends PageParam {
|
||||
|
||||
@ApiModelProperty(value = "文件路径", example = "yudao", notes = "模糊匹配")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "文件类型", example = "jpg", notes = "模糊匹配")
|
||||
private String type;
|
||||
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@ApiModelProperty(value = "开始创建时间")
|
||||
private Date beginCreateTime;
|
||||
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@ApiModelProperty(value = "结束创建时间")
|
||||
private Date endCreateTime;
|
||||
|
||||
}
|
@@ -1,22 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.file.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@ApiModel(value = "文件 Response VO", description = "不返回 content 字段,太大")
|
||||
@Data
|
||||
public class InfFileRespVO {
|
||||
|
||||
@ApiModelProperty(value = "文件路径", required = true, example = "yudao.jpg")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "文件类型", required = true, example = "jpg")
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "创建时间", required = true)
|
||||
private Date createTime;
|
||||
|
||||
}
|
@@ -1,145 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.job;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
||||
import cn.iocoder.yudao.framework.quartz.core.util.CronUtils;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job.*;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.convert.job.InfJobConvert;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.job.InfJobDO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.service.job.InfJobService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.quartz.SchedulerException;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
|
||||
|
||||
@Api(tags = "定时任务")
|
||||
@RestController
|
||||
@RequestMapping("/infra/job")
|
||||
@Validated
|
||||
public class InfJobController {
|
||||
|
||||
@Resource
|
||||
private InfJobService jobService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@ApiOperation("创建定时任务")
|
||||
@PreAuthorize("@ss.hasPermission('infra:job:create')")
|
||||
public CommonResult<Long> createJob(@Valid @RequestBody InfJobCreateReqVO createReqVO)
|
||||
throws SchedulerException {
|
||||
return success(jobService.createJob(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@ApiOperation("更新定时任务")
|
||||
@PreAuthorize("@ss.hasPermission('infra:job:update')")
|
||||
public CommonResult<Boolean> updateJob(@Valid @RequestBody InfJobUpdateReqVO updateReqVO)
|
||||
throws SchedulerException {
|
||||
jobService.updateJob(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PutMapping("/update-status")
|
||||
@ApiOperation("更新定时任务的状态")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class),
|
||||
@ApiImplicitParam(name = "status", value = "状态", required = true, example = "1", dataTypeClass = Integer.class),
|
||||
})
|
||||
@PreAuthorize("@ss.hasPermission('infra:job:update')")
|
||||
public CommonResult<Boolean> updateJobStatus(@RequestParam(value = "id") Long id, @RequestParam("status") Integer status)
|
||||
throws SchedulerException {
|
||||
jobService.updateJobStatus(id, status);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@ApiOperation("删除定时任务")
|
||||
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
|
||||
@PreAuthorize("@ss.hasPermission('infra:job:delete')")
|
||||
public CommonResult<Boolean> deleteJob(@RequestParam("id") Long id)
|
||||
throws SchedulerException {
|
||||
jobService.deleteJob(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PutMapping("/trigger")
|
||||
@ApiOperation("触发定时任务")
|
||||
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
|
||||
@PreAuthorize("@ss.hasPermission('infra:job:trigger')")
|
||||
public CommonResult<Boolean> triggerJob(@RequestParam("id") Long id) throws SchedulerException {
|
||||
jobService.triggerJob(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@ApiOperation("获得定时任务")
|
||||
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
|
||||
@PreAuthorize("@ss.hasPermission('infra:job:query')")
|
||||
public CommonResult<InfJobRespVO> getJob(@RequestParam("id") Long id) {
|
||||
InfJobDO job = jobService.getJob(id);
|
||||
return success(InfJobConvert.INSTANCE.convert(job));
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("获得定时任务列表")
|
||||
@ApiImplicitParam(name = "ids", value = "编号列表", required = true, dataTypeClass = List.class)
|
||||
@PreAuthorize("@ss.hasPermission('infra:job:query')")
|
||||
public CommonResult<List<InfJobRespVO>> getJobList(@RequestParam("ids") Collection<Long> ids) {
|
||||
List<InfJobDO> list = jobService.getJobList(ids);
|
||||
return success(InfJobConvert.INSTANCE.convertList(list));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@ApiOperation("获得定时任务分页")
|
||||
@PreAuthorize("@ss.hasPermission('infra:job:query')")
|
||||
public CommonResult<PageResult<InfJobRespVO>> getJobPage(@Valid InfJobPageReqVO pageVO) {
|
||||
PageResult<InfJobDO> pageResult = jobService.getJobPage(pageVO);
|
||||
return success(InfJobConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@ApiOperation("导出定时任务 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('infra:job:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportJobExcel(@Valid InfJobExportReqVO exportReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
List<InfJobDO> list = jobService.getJobList(exportReqVO);
|
||||
// 导出 Excel
|
||||
List<InfJobExcelVO> datas = InfJobConvert.INSTANCE.convertList02(list);
|
||||
ExcelUtils.write(response, "定时任务.xls", "数据", InfJobExcelVO.class, datas);
|
||||
}
|
||||
|
||||
@GetMapping("/get_next_times")
|
||||
@ApiOperation("获得定时任务的下 n 次执行时间")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class),
|
||||
@ApiImplicitParam(name = "count", value = "数量", example = "5", dataTypeClass = Long.class)
|
||||
})
|
||||
@PreAuthorize("@ss.hasPermission('infra:job:query')")
|
||||
public CommonResult<List<Date>> getJobNextTimes(@RequestParam("id") Long id,
|
||||
@RequestParam(value = "count", required = false, defaultValue = "5") Integer count) {
|
||||
InfJobDO job = jobService.getJob(id);
|
||||
if (job == null) {
|
||||
return success(Collections.emptyList());
|
||||
}
|
||||
return success(CronUtils.getNextTimes(job.getCronExpression(), count));
|
||||
}
|
||||
|
||||
}
|
@@ -1,81 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.job;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.log.InfJobLogExcelVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.log.InfJobLogExportReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.log.InfJobLogPageReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.log.InfJobLogRespVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.convert.job.InfJobLogConvert;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.job.InfJobLogDO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.service.job.InfJobLogService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
|
||||
|
||||
@Api(tags = "定时任务日志")
|
||||
@RestController
|
||||
@RequestMapping("/infra/job-log")
|
||||
@Validated
|
||||
public class InfJobLogController {
|
||||
|
||||
@Resource
|
||||
private InfJobLogService jobLogService;
|
||||
|
||||
@GetMapping("/get")
|
||||
@ApiOperation("获得定时任务日志")
|
||||
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
|
||||
@PreAuthorize("@ss.hasPermission('infra:job:query')")
|
||||
public CommonResult<InfJobLogRespVO> getJobLog(@RequestParam("id") Long id) {
|
||||
InfJobLogDO jobLog = jobLogService.getJobLog(id);
|
||||
return success(InfJobLogConvert.INSTANCE.convert(jobLog));
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("获得定时任务日志列表")
|
||||
@ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class)
|
||||
@PreAuthorize("@ss.hasPermission('infra:job:query')")
|
||||
public CommonResult<List<InfJobLogRespVO>> getJobLogList(@RequestParam("ids") Collection<Long> ids) {
|
||||
List<InfJobLogDO> list = jobLogService.getJobLogList(ids);
|
||||
return success(InfJobLogConvert.INSTANCE.convertList(list));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@ApiOperation("获得定时任务日志分页")
|
||||
@PreAuthorize("@ss.hasPermission('infra:job:query')")
|
||||
public CommonResult<PageResult<InfJobLogRespVO>> getJobLogPage(@Valid InfJobLogPageReqVO pageVO) {
|
||||
PageResult<InfJobLogDO> pageResult = jobLogService.getJobLogPage(pageVO);
|
||||
return success(InfJobLogConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@ApiOperation("导出定时任务日志 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('infra:job:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportJobLogExcel(@Valid InfJobLogExportReqVO exportReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
List<InfJobLogDO> list = jobLogService.getJobLogList(exportReqVO);
|
||||
// 导出 Excel
|
||||
List<InfJobLogExcelVO> datas = InfJobLogConvert.INSTANCE.convertList02(list);
|
||||
ExcelUtils.write(response, "任务日志.xls", "数据", InfJobLogExcelVO.class, datas);
|
||||
}
|
||||
|
||||
}
|
@@ -1,37 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 定时任务 Base VO,提供给添加、修改、详细的子 VO 使用
|
||||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
|
||||
*/
|
||||
@Data
|
||||
public class InfJobBaseVO {
|
||||
|
||||
@ApiModelProperty(value = "任务名称", required = true, example = "测试任务")
|
||||
@NotNull(message = "任务名称不能为空")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "处理器的参数", example = "yudao")
|
||||
private String handlerParam;
|
||||
|
||||
@ApiModelProperty(value = "CRON 表达式", required = true, example = "0/10 * * * * ? *")
|
||||
@NotNull(message = "CRON 表达式不能为空")
|
||||
private String cronExpression;
|
||||
|
||||
@ApiModelProperty(value = "重试次数", required = true, example = "3")
|
||||
@NotNull(message = "重试次数不能为空")
|
||||
private Integer retryCount;
|
||||
|
||||
@ApiModelProperty(value = "重试间隔", required = true, example = "1000")
|
||||
@NotNull(message = "重试间隔不能为空")
|
||||
private Integer retryInterval;
|
||||
|
||||
@ApiModelProperty(value = "监控超时时间", example = "1000")
|
||||
private Integer monitorTimeout;
|
||||
|
||||
}
|
@@ -1,21 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@ApiModel("定时任务创建 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class InfJobCreateReqVO extends InfJobBaseVO {
|
||||
|
||||
@ApiModelProperty(value = "处理器的名字", required = true, example = "sysUserSessionTimeoutJob")
|
||||
@NotNull(message = "处理器的名字不能为空")
|
||||
private String handlerName;
|
||||
|
||||
}
|
@@ -1,56 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.enums.InfDictTypeConstants;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 定时任务 Excel VO
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Data
|
||||
public class InfJobExcelVO {
|
||||
|
||||
@ExcelProperty("任务编号")
|
||||
private Long id;
|
||||
|
||||
@ExcelProperty("任务名称")
|
||||
private String name;
|
||||
|
||||
@ExcelProperty(value = "任务状态", converter = DictConvert.class)
|
||||
@DictFormat(InfDictTypeConstants.JOB_STATUS)
|
||||
private Integer status;
|
||||
|
||||
@ExcelProperty("处理器的名字")
|
||||
private String handlerName;
|
||||
|
||||
@ExcelProperty("处理器的参数")
|
||||
private String handlerParam;
|
||||
|
||||
@ExcelProperty("CRON 表达式")
|
||||
private String cronExpression;
|
||||
|
||||
@ExcelProperty("最后一次执行的开始时间")
|
||||
private Date executeBeginTime;
|
||||
|
||||
@ExcelProperty("最后一次执行的结束时间")
|
||||
private Date executeEndTime;
|
||||
|
||||
@ExcelProperty("上一次触发时间")
|
||||
private Date firePrevTime;
|
||||
|
||||
@ExcelProperty("下一次触发时间")
|
||||
private Date fireNextTime;
|
||||
|
||||
@ExcelProperty("监控超时时间")
|
||||
private Integer monitorTimeout;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
@@ -1,20 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@ApiModel(value = "定时任务 Excel 导出 Request VO", description = "参数和 InfJobPageReqVO 是一致的")
|
||||
@Data
|
||||
public class InfJobExportReqVO {
|
||||
|
||||
@ApiModelProperty(value = "任务名称", example = "测试任务", notes = "模糊匹配")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "任务状态", example = "1", notes = "参见 InfJobStatusEnum 枚举")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "处理器的名字", example = "sysUserSessionTimeoutJob", notes = "模糊匹配")
|
||||
private String handlerName;
|
||||
|
||||
}
|
@@ -1,25 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
@ApiModel("定时任务分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class InfJobPageReqVO extends PageParam {
|
||||
|
||||
@ApiModelProperty(value = "任务名称", example = "测试任务", notes = "模糊匹配")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "任务状态", example = "1", notes = "参见 InfJobStatusEnum 枚举")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "处理器的名字", example = "sysUserSessionTimeoutJob", notes = "模糊匹配")
|
||||
private String handlerName;
|
||||
|
||||
}
|
@@ -1,31 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
|
||||
@ApiModel("定时任务 Response VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class InfJobRespVO extends InfJobBaseVO {
|
||||
|
||||
@ApiModelProperty(value = "任务编号", required = true, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "任务状态", required = true, example = "1")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "处理器的名字", required = true, example = "sysUserSessionTimeoutJob")
|
||||
@NotNull(message = "处理器的名字不能为空")
|
||||
private String handlerName;
|
||||
|
||||
@ApiModelProperty(value = "创建时间", required = true)
|
||||
private Date createTime;
|
||||
|
||||
}
|
@@ -1,21 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@ApiModel("定时任务更新 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class InfJobUpdateReqVO extends InfJobBaseVO {
|
||||
|
||||
@ApiModelProperty(value = "任务编号", required = true, example = "1024")
|
||||
@NotNull(message = "任务编号不能为空")
|
||||
private Long id;
|
||||
|
||||
}
|
@@ -1,53 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.log;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
/**
|
||||
* 定时任务日志 Base VO,提供给添加、修改、详细的子 VO 使用
|
||||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
|
||||
*/
|
||||
@Data
|
||||
public class InfJobLogBaseVO {
|
||||
|
||||
@ApiModelProperty(value = "任务编号", required = true, example = "1024")
|
||||
@NotNull(message = "任务编号不能为空")
|
||||
private Long jobId;
|
||||
|
||||
@ApiModelProperty(value = "处理器的名字", required = true, example = "sysUserSessionTimeoutJob")
|
||||
@NotNull(message = "处理器的名字不能为空")
|
||||
private String handlerName;
|
||||
|
||||
@ApiModelProperty(value = "处理器的参数", example = "yudao")
|
||||
private String handlerParam;
|
||||
|
||||
@ApiModelProperty(value = "第几次执行", required = true, example = "1")
|
||||
@NotNull(message = "第几次执行不能为空")
|
||||
private Integer executeIndex;
|
||||
|
||||
@ApiModelProperty(value = "开始执行时间", required = true)
|
||||
@NotNull(message = "开始执行时间不能为空")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private Date beginTime;
|
||||
|
||||
@ApiModelProperty(value = "结束执行时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private Date endTime;
|
||||
|
||||
@ApiModelProperty(value = "执行时长", example = "123")
|
||||
private Integer duration;
|
||||
|
||||
@ApiModelProperty(value = "任务状态", required = true, example = "1", notes = "参见 InfJobLogStatusEnum 枚举")
|
||||
@NotNull(message = "任务状态不能为空")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "结果数据", example = "执行成功")
|
||||
private String result;
|
||||
|
||||
}
|
@@ -1,53 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.log;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.enums.InfDictTypeConstants;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 定时任务 Excel VO
|
||||
*
|
||||
* @author 芋艿
|
||||
*/
|
||||
@Data
|
||||
public class InfJobLogExcelVO {
|
||||
|
||||
@ExcelProperty("日志编号")
|
||||
private Long id;
|
||||
|
||||
@ExcelProperty("任务编号")
|
||||
private Long jobId;
|
||||
|
||||
@ExcelProperty("处理器的名字")
|
||||
private String handlerName;
|
||||
|
||||
@ExcelProperty("处理器的参数")
|
||||
private String handlerParam;
|
||||
|
||||
@ExcelProperty("第几次执行")
|
||||
private Integer executeIndex;
|
||||
|
||||
@ExcelProperty("开始执行时间")
|
||||
private Date beginTime;
|
||||
|
||||
@ExcelProperty("结束执行时间")
|
||||
private Date endTime;
|
||||
|
||||
@ExcelProperty("执行时长")
|
||||
private Integer duration;
|
||||
|
||||
@ExcelProperty(value = "任务状态", converter = DictConvert.class)
|
||||
@DictFormat(InfDictTypeConstants.JOB_STATUS)
|
||||
private Integer status;
|
||||
|
||||
@ExcelProperty("结果数据")
|
||||
private String result;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
@@ -1,33 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.log;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@ApiModel(value = "定时任务 Excel 导出 Request VO", description = "参数和 InfJobLogPageReqVO 是一致的")
|
||||
@Data
|
||||
public class InfJobLogExportReqVO {
|
||||
|
||||
@ApiModelProperty(value = "任务编号", example = "10")
|
||||
private Long jobId;
|
||||
|
||||
@ApiModelProperty(value = "处理器的名字", notes = "模糊匹配")
|
||||
private String handlerName;
|
||||
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@ApiModelProperty(value = "开始执行时间")
|
||||
private Date beginTime;
|
||||
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@ApiModelProperty(value = "结束执行时间")
|
||||
private Date endTime;
|
||||
|
||||
@ApiModelProperty(value = "任务状态", notes = "参见 InfJobLogStatusEnum 枚举")
|
||||
private Integer status;
|
||||
|
||||
}
|
@@ -1,38 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.log;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@ApiModel("定时任务日志分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class InfJobLogPageReqVO extends PageParam {
|
||||
|
||||
@ApiModelProperty(value = "任务编号", example = "10")
|
||||
private Long jobId;
|
||||
|
||||
@ApiModelProperty(value = "处理器的名字", notes = "模糊匹配")
|
||||
private String handlerName;
|
||||
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@ApiModelProperty(value = "开始执行时间")
|
||||
private Date beginTime;
|
||||
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@ApiModelProperty(value = "结束执行时间")
|
||||
private Date endTime;
|
||||
|
||||
@ApiModelProperty(value = "任务状态", notes = "参见 InfJobLogStatusEnum 枚举")
|
||||
private Integer status;
|
||||
|
||||
}
|
@@ -1,23 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.log;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@ApiModel("定时任务日志 Response VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class InfJobLogRespVO extends InfJobLogBaseVO {
|
||||
|
||||
@ApiModelProperty(value = "日志编号", required = true, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "创建时间", required = true)
|
||||
private Date createTime;
|
||||
|
||||
}
|
@@ -1,60 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.logger;
|
||||
|
||||
import cn.iocoder.yudao.coreservice.modules.infra.dal.dataobject.logger.InfApiAccessLogDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogExcelVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogExportReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogPageReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogRespVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.convert.logger.InfApiAccessLogConvert;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.service.logger.InfApiAccessLogService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
|
||||
|
||||
@Api(tags = "API 访问日志")
|
||||
@RestController
|
||||
@RequestMapping("/infra/api-access-log")
|
||||
@Validated
|
||||
public class InfApiAccessLogController {
|
||||
|
||||
@Resource
|
||||
private InfApiAccessLogService apiAccessLogService;
|
||||
|
||||
@GetMapping("/page")
|
||||
@ApiOperation("获得API 访问日志分页")
|
||||
@PreAuthorize("@ss.hasPermission('infra:api-access-log:query')")
|
||||
public CommonResult<PageResult<InfApiAccessLogRespVO>> getApiAccessLogPage(@Valid InfApiAccessLogPageReqVO pageVO) {
|
||||
PageResult<InfApiAccessLogDO> pageResult = apiAccessLogService.getApiAccessLogPage(pageVO);
|
||||
return success(InfApiAccessLogConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@ApiOperation("导出API 访问日志 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('infra:api-access-log:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportApiAccessLogExcel(@Valid InfApiAccessLogExportReqVO exportReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
List<InfApiAccessLogDO> list = apiAccessLogService.getApiAccessLogList(exportReqVO);
|
||||
// 导出 Excel
|
||||
List<InfApiAccessLogExcelVO> datas = InfApiAccessLogConvert.INSTANCE.convertList02(list);
|
||||
ExcelUtils.write(response, "API 访问日志.xls", "数据", InfApiAccessLogExcelVO.class, datas);
|
||||
}
|
||||
|
||||
}
|
@@ -1,74 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.logger;
|
||||
|
||||
import cn.iocoder.yudao.coreservice.modules.infra.dal.dataobject.logger.InfApiErrorLogDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogExcelVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogExportReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogPageReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogRespVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.convert.logger.InfApiErrorLogConvert;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.service.logger.InfApiErrorLogService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
|
||||
|
||||
@Api(tags = "API 错误日志")
|
||||
@RestController
|
||||
@RequestMapping("/infra/api-error-log")
|
||||
@Validated
|
||||
public class InfApiErrorLogController {
|
||||
|
||||
@Resource
|
||||
private InfApiErrorLogService apiErrorLogService;
|
||||
|
||||
@PutMapping("/update-status")
|
||||
@ApiOperation("更新 API 错误日志的状态")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class),
|
||||
@ApiImplicitParam(name = "processStatus", value = "处理状态", required = true, example = "1", dataTypeClass = Integer.class)
|
||||
})
|
||||
@PreAuthorize("@ss.hasPermission('infra:api-error-log:update-status')")
|
||||
public CommonResult<Boolean> updateApiErrorLogProcess(@RequestParam("id") Long id,
|
||||
@RequestParam("processStatus") Integer processStatus) {
|
||||
apiErrorLogService.updateApiErrorLogProcess(id, processStatus, getLoginUserId());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@ApiOperation("获得 API 错误日志分页")
|
||||
@PreAuthorize("@ss.hasPermission('infra:api-error-log:query')")
|
||||
public CommonResult<PageResult<InfApiErrorLogRespVO>> getApiErrorLogPage(@Valid InfApiErrorLogPageReqVO pageVO) {
|
||||
PageResult<InfApiErrorLogDO> pageResult = apiErrorLogService.getApiErrorLogPage(pageVO);
|
||||
return success(InfApiErrorLogConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@ApiOperation("导出 API 错误日志 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('infra:api-error-log:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportApiErrorLogExcel(@Valid InfApiErrorLogExportReqVO exportReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
List<InfApiErrorLogDO> list = apiErrorLogService.getApiErrorLogList(exportReqVO);
|
||||
// 导出 Excel
|
||||
List<InfApiErrorLogExcelVO> datas = InfApiErrorLogConvert.INSTANCE.convertList02(list);
|
||||
ExcelUtils.write(response, "API 错误日志.xls", "数据", InfApiErrorLogExcelVO.class, datas);
|
||||
}
|
||||
|
||||
}
|
@@ -1,75 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apiaccesslog;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
/**
|
||||
* API 访问日志 Base VO,提供给添加、修改、详细的子 VO 使用
|
||||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
|
||||
*/
|
||||
@Data
|
||||
public class InfApiAccessLogBaseVO {
|
||||
|
||||
@ApiModelProperty(value = "链路追踪编号", required = true, example = "66600cb6-7852-11eb-9439-0242ac130002")
|
||||
@NotNull(message = "链路追踪编号不能为空")
|
||||
private String traceId;
|
||||
|
||||
@ApiModelProperty(value = "用户编号", required = true, example = "666")
|
||||
@NotNull(message = "用户编号不能为空")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty(value = "用户类型", required = true, example = "2", notes = "参见 UserTypeEnum 枚举")
|
||||
@NotNull(message = "用户类型不能为空")
|
||||
private Integer userType;
|
||||
|
||||
@ApiModelProperty(value = "应用名", required = true, example = "dashboard")
|
||||
@NotNull(message = "应用名不能为空")
|
||||
private String applicationName;
|
||||
|
||||
@ApiModelProperty(value = "请求方法名", required = true, example = "GET")
|
||||
@NotNull(message = "请求方法名不能为空")
|
||||
private String requestMethod;
|
||||
|
||||
@ApiModelProperty(value = "请求地址", required = true, example = "/xxx/yyy")
|
||||
@NotNull(message = "请求地址不能为空")
|
||||
private String requestUrl;
|
||||
|
||||
@ApiModelProperty(value = "请求参数")
|
||||
private String requestParams;
|
||||
|
||||
@ApiModelProperty(value = "用户 IP", required = true, example = "127.0.0.1")
|
||||
@NotNull(message = "用户 IP不能为空")
|
||||
private String userIp;
|
||||
|
||||
@ApiModelProperty(value = "浏览器 UA", required = true, example = "Mozilla/5.0")
|
||||
@NotNull(message = "浏览器 UA不能为空")
|
||||
private String userAgent;
|
||||
|
||||
@ApiModelProperty(value = "开始请求时间", required = true)
|
||||
@NotNull(message = "开始请求时间不能为空")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private Date beginTime;
|
||||
|
||||
@ApiModelProperty(value = "结束请求时间", required = true)
|
||||
@NotNull(message = "结束请求时间不能为空")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private Date endTime;
|
||||
|
||||
@ApiModelProperty(value = "执行时长", required = true, example = "100")
|
||||
@NotNull(message = "执行时长不能为空")
|
||||
private Integer duration;
|
||||
|
||||
@ApiModelProperty(value = "结果码", required = true, example = "0")
|
||||
@NotNull(message = "结果码不能为空")
|
||||
private Integer resultCode;
|
||||
|
||||
@ApiModelProperty(value = "结果提示", example = "芋道源码,牛逼!")
|
||||
private String resultMsg;
|
||||
|
||||
}
|
@@ -1,65 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apiaccesslog;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||
import cn.iocoder.yudao.adminserver.modules.system.enums.SysDictTypeConstants;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* API 访问日志 Excel VO
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Data
|
||||
public class InfApiAccessLogExcelVO {
|
||||
|
||||
@ExcelProperty("日志主键")
|
||||
private Long id;
|
||||
|
||||
@ExcelProperty("链路追踪编号")
|
||||
private String traceId;
|
||||
|
||||
@ExcelProperty("用户编号")
|
||||
private Long userId;
|
||||
|
||||
@ExcelProperty(value = "用户类型", converter = DictConvert.class)
|
||||
@DictFormat(SysDictTypeConstants.USER_TYPE)
|
||||
private Integer userType;
|
||||
|
||||
@ExcelProperty("应用名")
|
||||
private String applicationName;
|
||||
|
||||
@ExcelProperty("请求方法名")
|
||||
private String requestMethod;
|
||||
|
||||
@ExcelProperty("请求地址")
|
||||
private String requestUrl;
|
||||
|
||||
@ExcelProperty("请求参数")
|
||||
private String requestParams;
|
||||
|
||||
@ExcelProperty("用户 IP")
|
||||
private String userIp;
|
||||
|
||||
@ExcelProperty("浏览器 UA")
|
||||
private String userAgent;
|
||||
|
||||
@ExcelProperty("开始请求时间")
|
||||
private Date beginTime;
|
||||
|
||||
@ExcelProperty("结束请求时间")
|
||||
private Date endTime;
|
||||
|
||||
@ExcelProperty("执行时长")
|
||||
private Integer duration;
|
||||
|
||||
@ExcelProperty("结果码")
|
||||
private Integer resultCode;
|
||||
|
||||
@ExcelProperty("结果提示")
|
||||
private String resultMsg;
|
||||
|
||||
}
|
@@ -1,42 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apiaccesslog;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@ApiModel(value = "API 访问日志 Excel 导出 Request VO", description = "参数和 InfApiAccessLogPageReqVO 是一致的")
|
||||
@Data
|
||||
public class InfApiAccessLogExportReqVO {
|
||||
|
||||
@ApiModelProperty(value = "用户编号", example = "666")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty(value = "用户类型", example = "2")
|
||||
private Integer userType;
|
||||
|
||||
@ApiModelProperty(value = "应用名", example = "dashboard")
|
||||
private String applicationName;
|
||||
|
||||
@ApiModelProperty(value = "请求地址", example = "/xxx/yyy", notes = "模糊匹配")
|
||||
private String requestUrl;
|
||||
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@ApiModelProperty(value = "开始开始请求时间")
|
||||
private Date beginBeginTime;
|
||||
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@ApiModelProperty(value = "结束开始请求时间")
|
||||
private Date endBeginTime;
|
||||
|
||||
@ApiModelProperty(value = "执行时长", example = "100", notes = "大于等于,单位:毫秒")
|
||||
private Integer duration;
|
||||
|
||||
@ApiModelProperty(value = "结果码", example = "0")
|
||||
private Integer resultCode;
|
||||
|
||||
}
|
@@ -1,47 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apiaccesslog;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@ApiModel("API 访问日志分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class InfApiAccessLogPageReqVO extends PageParam {
|
||||
|
||||
@ApiModelProperty(value = "用户编号", example = "666")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty(value = "用户类型", example = "2")
|
||||
private Integer userType;
|
||||
|
||||
@ApiModelProperty(value = "应用名", example = "dashboard")
|
||||
private String applicationName;
|
||||
|
||||
@ApiModelProperty(value = "请求地址", example = "/xxx/yyy", notes = "模糊匹配")
|
||||
private String requestUrl;
|
||||
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@ApiModelProperty(value = "开始开始请求时间")
|
||||
private Date beginBeginTime;
|
||||
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@ApiModelProperty(value = "结束开始请求时间")
|
||||
private Date endBeginTime;
|
||||
|
||||
@ApiModelProperty(value = "执行时长", example = "100", notes = "大于等于,单位:毫秒")
|
||||
private Integer duration;
|
||||
|
||||
@ApiModelProperty(value = "结果码", example = "0")
|
||||
private Integer resultCode;
|
||||
|
||||
}
|
@@ -1,23 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apiaccesslog;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@ApiModel("API 访问日志 Response VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class InfApiAccessLogRespVO extends InfApiAccessLogBaseVO {
|
||||
|
||||
@ApiModelProperty(value = "日志主键", required = true, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "创建时间", required = true)
|
||||
private Date createTime;
|
||||
|
||||
}
|
@@ -1,96 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apierrorlog;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
/**
|
||||
* API 错误日志 Base VO,提供给添加、修改、详细的子 VO 使用
|
||||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
|
||||
*/
|
||||
@Data
|
||||
public class InfApiErrorLogBaseVO {
|
||||
|
||||
@ApiModelProperty(value = "链路追踪编号", required = true, example = "66600cb6-7852-11eb-9439-0242ac130002")
|
||||
@NotNull(message = "链路追踪编号不能为空")
|
||||
private String traceId;
|
||||
|
||||
@ApiModelProperty(value = "用户编号", required = true, example = "666")
|
||||
@NotNull(message = "用户编号不能为空")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "用户类型", required = true, example = "1")
|
||||
@NotNull(message = "用户类型不能为空")
|
||||
private Integer userType;
|
||||
|
||||
@ApiModelProperty(value = "应用名", required = true, example = "dashboard")
|
||||
@NotNull(message = "应用名不能为空")
|
||||
private String applicationName;
|
||||
|
||||
@ApiModelProperty(value = "请求方法名", required = true, example = "GET")
|
||||
@NotNull(message = "请求方法名不能为空")
|
||||
private String requestMethod;
|
||||
|
||||
@ApiModelProperty(value = "请求地址", required = true, example = "/xx/yy")
|
||||
@NotNull(message = "请求地址不能为空")
|
||||
private String requestUrl;
|
||||
|
||||
@ApiModelProperty(value = "请求参数", required = true)
|
||||
@NotNull(message = "请求参数不能为空")
|
||||
private String requestParams;
|
||||
|
||||
@ApiModelProperty(value = "用户 IP", required = true, example = "127.0.0.1")
|
||||
@NotNull(message = "用户 IP不能为空")
|
||||
private String userIp;
|
||||
|
||||
@ApiModelProperty(value = "浏览器 UA", required = true, example = "Mozilla/5.0")
|
||||
@NotNull(message = "浏览器 UA不能为空")
|
||||
private String userAgent;
|
||||
|
||||
@ApiModelProperty(value = "异常发生时间", required = true)
|
||||
@NotNull(message = "异常发生时间不能为空")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private Date exceptionTime;
|
||||
|
||||
@ApiModelProperty(value = "异常名", required = true)
|
||||
@NotNull(message = "异常名不能为空")
|
||||
private String exceptionName;
|
||||
|
||||
@ApiModelProperty(value = "异常导致的消息", required = true)
|
||||
@NotNull(message = "异常导致的消息不能为空")
|
||||
private String exceptionMessage;
|
||||
|
||||
@ApiModelProperty(value = "异常导致的根消息", required = true)
|
||||
@NotNull(message = "异常导致的根消息不能为空")
|
||||
private String exceptionRootCauseMessage;
|
||||
|
||||
@ApiModelProperty(value = "异常的栈轨迹", required = true)
|
||||
@NotNull(message = "异常的栈轨迹不能为空")
|
||||
private String exceptionStackTrace;
|
||||
|
||||
@ApiModelProperty(value = "异常发生的类全名", required = true)
|
||||
@NotNull(message = "异常发生的类全名不能为空")
|
||||
private String exceptionClassName;
|
||||
|
||||
@ApiModelProperty(value = "异常发生的类文件", required = true)
|
||||
@NotNull(message = "异常发生的类文件不能为空")
|
||||
private String exceptionFileName;
|
||||
|
||||
@ApiModelProperty(value = "异常发生的方法名", required = true)
|
||||
@NotNull(message = "异常发生的方法名不能为空")
|
||||
private String exceptionMethodName;
|
||||
|
||||
@ApiModelProperty(value = "异常发生的方法所在行", required = true)
|
||||
@NotNull(message = "异常发生的方法所在行不能为空")
|
||||
private Integer exceptionLineNumber;
|
||||
|
||||
@ApiModelProperty(value = "处理状态", required = true, example = "0")
|
||||
@NotNull(message = "处理状态不能为空")
|
||||
private Integer processStatus;
|
||||
|
||||
}
|
@@ -1,91 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apierrorlog;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.enums.InfDictTypeConstants;
|
||||
import cn.iocoder.yudao.adminserver.modules.system.enums.SysDictTypeConstants;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* API 错误日志 Excel VO
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Data
|
||||
public class InfApiErrorLogExcelVO {
|
||||
|
||||
@ExcelProperty("编号")
|
||||
private Integer id;
|
||||
|
||||
@ExcelProperty("链路追踪编号")
|
||||
private String traceId;
|
||||
|
||||
@ExcelProperty("用户编号")
|
||||
private Integer userId;
|
||||
|
||||
@ExcelProperty(value = "用户类型", converter = DictConvert.class)
|
||||
@DictFormat(SysDictTypeConstants.USER_TYPE)
|
||||
private Integer userType;
|
||||
|
||||
@ExcelProperty("应用名")
|
||||
private String applicationName;
|
||||
|
||||
@ExcelProperty("请求方法名")
|
||||
private String requestMethod;
|
||||
|
||||
@ExcelProperty("请求地址")
|
||||
private String requestUrl;
|
||||
|
||||
@ExcelProperty("请求参数")
|
||||
private String requestParams;
|
||||
|
||||
@ExcelProperty("用户 IP")
|
||||
private String userIp;
|
||||
|
||||
@ExcelProperty("浏览器 UA")
|
||||
private String userAgent;
|
||||
|
||||
@ExcelProperty("异常发生时间")
|
||||
private Date exceptionTime;
|
||||
|
||||
@ExcelProperty("异常名")
|
||||
private String exceptionName;
|
||||
|
||||
@ExcelProperty("异常导致的消息")
|
||||
private String exceptionMessage;
|
||||
|
||||
@ExcelProperty("异常导致的根消息")
|
||||
private String exceptionRootCauseMessage;
|
||||
|
||||
@ExcelProperty("异常的栈轨迹")
|
||||
private String exceptionStackTrace;
|
||||
|
||||
@ExcelProperty("异常发生的类全名")
|
||||
private String exceptionClassName;
|
||||
|
||||
@ExcelProperty("异常发生的类文件")
|
||||
private String exceptionFileName;
|
||||
|
||||
@ExcelProperty("异常发生的方法名")
|
||||
private String exceptionMethodName;
|
||||
|
||||
@ExcelProperty("异常发生的方法所在行")
|
||||
private Integer exceptionLineNumber;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ExcelProperty(value = "处理状态", converter = DictConvert.class)
|
||||
@DictFormat(InfDictTypeConstants.API_ERROR_LOG_PROCESS_STATUS)
|
||||
private Integer processStatus;
|
||||
|
||||
@ExcelProperty("处理时间")
|
||||
private Date processTime;
|
||||
|
||||
@ExcelProperty("处理用户编号")
|
||||
private Integer processUserId;
|
||||
|
||||
}
|
@@ -1,39 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apierrorlog;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@ApiModel(value = "API 错误日志 Excel 导出 Request VO", description = "参数和 InfApiErrorLogPageReqVO 是一致的")
|
||||
@Data
|
||||
public class InfApiErrorLogExportReqVO {
|
||||
|
||||
@ApiModelProperty(value = "用户编号", example = "666")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty(value = "用户类型", example = "1")
|
||||
private Integer userType;
|
||||
|
||||
@ApiModelProperty(value = "应用名", example = "dashboard")
|
||||
private String applicationName;
|
||||
|
||||
@ApiModelProperty(value = "请求地址", example = "/xx/yy")
|
||||
private String requestUrl;
|
||||
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@ApiModelProperty(value = "开始异常发生时间")
|
||||
private Date beginExceptionTime;
|
||||
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@ApiModelProperty(value = "结束异常发生时间")
|
||||
private Date endExceptionTime;
|
||||
|
||||
@ApiModelProperty(value = "处理状态", example = "0")
|
||||
private Integer processStatus;
|
||||
|
||||
}
|
@@ -1,44 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apierrorlog;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@ApiModel("API 错误日志分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class InfApiErrorLogPageReqVO extends PageParam {
|
||||
|
||||
@ApiModelProperty(value = "用户编号", example = "666")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty(value = "用户类型", example = "1")
|
||||
private Integer userType;
|
||||
|
||||
@ApiModelProperty(value = "应用名", example = "dashboard")
|
||||
private String applicationName;
|
||||
|
||||
@ApiModelProperty(value = "请求地址", example = "/xx/yy")
|
||||
private String requestUrl;
|
||||
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@ApiModelProperty(value = "开始异常发生时间")
|
||||
private Date beginExceptionTime;
|
||||
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@ApiModelProperty(value = "结束异常发生时间")
|
||||
private Date endExceptionTime;
|
||||
|
||||
@ApiModelProperty(value = "处理状态", example = "0")
|
||||
private Integer processStatus;
|
||||
|
||||
}
|
@@ -1,29 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apierrorlog;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@ApiModel("API 错误日志 Response VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class InfApiErrorLogRespVO extends InfApiErrorLogBaseVO {
|
||||
|
||||
@ApiModelProperty(value = "编号", required = true, example = "1024")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "创建时间", required = true)
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "处理时间", required = true)
|
||||
private Date processTime;
|
||||
|
||||
@ApiModelProperty(value = "处理用户编号", example = "233")
|
||||
private Integer processUserId;
|
||||
|
||||
}
|
@@ -1,36 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.redis.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.redis.core.RedisKeyDefine;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
@ApiModel("Redis Key 信息 Response VO")
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
public class InfRedisKeyRespVO {
|
||||
|
||||
@ApiModelProperty(value = "login_user:%s", required = true, example = "String")
|
||||
private String keyTemplate;
|
||||
|
||||
@ApiModelProperty(value = "Key 类型的枚举", required = true, example = "String")
|
||||
private RedisKeyDefine.KeyTypeEnum keyType;
|
||||
|
||||
@ApiModelProperty(value = "Value 类型", required = true, example = "java.lang.String")
|
||||
private Class valueType;
|
||||
|
||||
@ApiModelProperty(value = "超时类型", required = true, example = "1")
|
||||
private RedisKeyDefine.TimeoutTypeEnum timeoutType;
|
||||
|
||||
@ApiModelProperty(value = "过期时间,单位:毫秒", required = true, example = "1024")
|
||||
private Duration timeout;
|
||||
|
||||
@ApiModelProperty(value = "备注", required = true, example = "啦啦啦啦~")
|
||||
private String memo;
|
||||
|
||||
}
|
@@ -1,44 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.redis.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
@ApiModel("Redis 监控信息 Response VO")
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
public class InfRedisMonitorRespVO {
|
||||
|
||||
@ApiModelProperty(value = "Redis info 指令结果", required = true, notes = "具体字段,查看 Redis 文档")
|
||||
private Properties info;
|
||||
|
||||
@ApiModelProperty(value = "Redis key 数量", required = true, example = "1024")
|
||||
private Long dbSize;
|
||||
|
||||
@ApiModelProperty(value = "CommandStat 数组", required = true)
|
||||
private List<CommandStat> commandStats;
|
||||
|
||||
@ApiModel("Redis 命令统计结果")
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
public static class CommandStat {
|
||||
|
||||
@ApiModelProperty(value = "Redis 命令", required = true, example = "get")
|
||||
private String command;
|
||||
|
||||
@ApiModelProperty(value = "调用次数", required = true, example = "1024")
|
||||
private Integer calls;
|
||||
|
||||
@ApiModelProperty(value = "消耗 CPU 秒数", required = true, example = "666")
|
||||
private Integer usec;
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -1,29 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.convert.config;
|
||||
|
||||
import cn.iocoder.yudao.coreservice.modules.infra.dal.dataobject.config.InfConfigDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo.InfConfigCreateReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo.InfConfigExcelVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo.InfConfigRespVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo.InfConfigUpdateReqVO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface InfConfigConvert {
|
||||
|
||||
InfConfigConvert INSTANCE = Mappers.getMapper(InfConfigConvert.class);
|
||||
|
||||
PageResult<InfConfigRespVO> convertPage(PageResult<InfConfigDO> page);
|
||||
|
||||
InfConfigRespVO convert(InfConfigDO bean);
|
||||
|
||||
InfConfigDO convert(InfConfigCreateReqVO bean);
|
||||
|
||||
InfConfigDO convert(InfConfigUpdateReqVO bean);
|
||||
|
||||
List<InfConfigExcelVO> convertList(List<InfConfigDO> list);
|
||||
|
||||
}
|
@@ -1,18 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.convert.file;
|
||||
|
||||
import cn.iocoder.yudao.coreservice.modules.infra.dal.dataobject.file.InfFileDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.file.vo.InfFileRespVO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
@Mapper
|
||||
public interface InfFileConvert {
|
||||
|
||||
InfFileConvert INSTANCE = Mappers.getMapper(InfFileConvert.class);
|
||||
|
||||
InfFileRespVO convert(InfFileDO bean);
|
||||
|
||||
PageResult<InfFileRespVO> convertPage(PageResult<InfFileDO> page);
|
||||
|
||||
}
|
@@ -1,36 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.convert.job;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job.InfJobCreateReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job.InfJobExcelVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job.InfJobRespVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job.InfJobUpdateReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.job.InfJobDO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 定时任务 Convert
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Mapper
|
||||
public interface InfJobConvert {
|
||||
|
||||
InfJobConvert INSTANCE = Mappers.getMapper(InfJobConvert.class);
|
||||
|
||||
InfJobDO convert(InfJobCreateReqVO bean);
|
||||
|
||||
InfJobDO convert(InfJobUpdateReqVO bean);
|
||||
|
||||
InfJobRespVO convert(InfJobDO bean);
|
||||
|
||||
List<InfJobRespVO> convertList(List<InfJobDO> list);
|
||||
|
||||
PageResult<InfJobRespVO> convertPage(PageResult<InfJobDO> page);
|
||||
|
||||
List<InfJobExcelVO> convertList02(List<InfJobDO> list);
|
||||
|
||||
}
|
@@ -1,30 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.convert.job;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.log.InfJobLogExcelVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.log.InfJobLogRespVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.job.InfJobLogDO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 定时任务日志 Convert
|
||||
*
|
||||
* @author 芋艿
|
||||
*/
|
||||
@Mapper
|
||||
public interface InfJobLogConvert {
|
||||
|
||||
InfJobLogConvert INSTANCE = Mappers.getMapper(InfJobLogConvert.class);
|
||||
|
||||
InfJobLogRespVO convert(InfJobLogDO bean);
|
||||
|
||||
List<InfJobLogRespVO> convertList(List<InfJobLogDO> list);
|
||||
|
||||
PageResult<InfJobLogRespVO> convertPage(PageResult<InfJobLogDO> page);
|
||||
|
||||
List<InfJobLogExcelVO> convertList02(List<InfJobLogDO> list);
|
||||
|
||||
}
|
@@ -1,31 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.convert.logger;
|
||||
|
||||
import cn.iocoder.yudao.coreservice.modules.infra.dal.dataobject.logger.InfApiAccessLogDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.apilog.core.service.dto.ApiAccessLogCreateDTO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogExcelVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogRespVO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* API 访问日志 Convert
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Mapper
|
||||
public interface InfApiAccessLogConvert {
|
||||
|
||||
InfApiAccessLogConvert INSTANCE = Mappers.getMapper(InfApiAccessLogConvert.class);
|
||||
|
||||
InfApiAccessLogRespVO convert(InfApiAccessLogDO bean);
|
||||
|
||||
List<InfApiAccessLogRespVO> convertList(List<InfApiAccessLogDO> list);
|
||||
|
||||
PageResult<InfApiAccessLogRespVO> convertPage(PageResult<InfApiAccessLogDO> page);
|
||||
|
||||
List<InfApiAccessLogExcelVO> convertList02(List<InfApiAccessLogDO> list);
|
||||
|
||||
}
|
@@ -1,28 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.convert.logger;
|
||||
|
||||
import cn.iocoder.yudao.coreservice.modules.infra.dal.dataobject.logger.InfApiErrorLogDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogExcelVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogRespVO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* API 错误日志 Convert
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Mapper
|
||||
public interface InfApiErrorLogConvert {
|
||||
|
||||
InfApiErrorLogConvert INSTANCE = Mappers.getMapper(InfApiErrorLogConvert.class);
|
||||
|
||||
InfApiErrorLogRespVO convert(InfApiErrorLogDO bean);
|
||||
|
||||
PageResult<InfApiErrorLogRespVO> convertPage(PageResult<InfApiErrorLogDO> page);
|
||||
|
||||
List<InfApiErrorLogExcelVO> convertList02(List<InfApiErrorLogDO> list);
|
||||
|
||||
}
|
@@ -1,6 +0,0 @@
|
||||
/**
|
||||
* 提供 POJO 类的实体转换
|
||||
*
|
||||
* 目前使用 MapStruct 框架
|
||||
*/
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.convert;
|
@@ -1,34 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.convert.redis;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.iocoder.yudao.framework.redis.core.RedisKeyDefine;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.redis.vo.InfRedisKeyRespVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.redis.vo.InfRedisMonitorRespVO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
@Mapper
|
||||
public interface RedisConvert {
|
||||
|
||||
RedisConvert INSTANCE = Mappers.getMapper(RedisConvert.class);
|
||||
|
||||
default InfRedisMonitorRespVO build(Properties info, Long dbSize, Properties commandStats) {
|
||||
InfRedisMonitorRespVO respVO = InfRedisMonitorRespVO.builder().info(info).dbSize(dbSize)
|
||||
.commandStats(new ArrayList<>(commandStats.size())).build();
|
||||
commandStats.forEach((key, value) -> {
|
||||
respVO.getCommandStats().add(InfRedisMonitorRespVO.CommandStat.builder()
|
||||
.command(StrUtil.subAfter((String) key, "cmdstat_", false))
|
||||
.calls(Integer.valueOf(StrUtil.subBetween((String) value, "calls=", ",")))
|
||||
.usec(Integer.valueOf(StrUtil.subBetween((String) value, "usec=", ",")))
|
||||
.build());
|
||||
});
|
||||
return respVO;
|
||||
}
|
||||
|
||||
List<InfRedisKeyRespVO> convertList(List<RedisKeyDefine> list);
|
||||
|
||||
}
|
@@ -1,72 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.job;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.enums.job.InfJobStatusEnum;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
|
||||
/**
|
||||
* 定时任务 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@TableName("inf_job")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class InfJobDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 任务编号
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 任务名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 任务状态
|
||||
*
|
||||
* 枚举 {@link InfJobStatusEnum}
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 处理器的名字
|
||||
*/
|
||||
private String handlerName;
|
||||
/**
|
||||
* 处理器的参数
|
||||
*/
|
||||
private String handlerParam;
|
||||
/**
|
||||
* CRON 表达式
|
||||
*/
|
||||
private String cronExpression;
|
||||
|
||||
// ========== 重试相关字段 ==========
|
||||
/**
|
||||
* 重试次数
|
||||
* 如果不重试,则设置为 0
|
||||
*/
|
||||
private Integer retryCount;
|
||||
/**
|
||||
* 重试间隔,单位:毫秒
|
||||
* 如果没有间隔,则设置为 0
|
||||
*/
|
||||
private Integer retryInterval;
|
||||
|
||||
// ========== 监控相关字段 ==========
|
||||
/**
|
||||
* 监控超时时间,单位:毫秒
|
||||
* 为空时,表示不监控
|
||||
*
|
||||
* 注意,这里的超时的目的,不是进行任务的取消,而是告警任务的执行时间过长
|
||||
*/
|
||||
private Integer monitorTimeout;
|
||||
|
||||
}
|
@@ -1,80 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.job;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import cn.iocoder.yudao.framework.quartz.core.handler.JobHandler;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.enums.job.InfJobLogStatusEnum;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 定时任务的执行日志
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@TableName("inf_job_log")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class InfJobLogDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 日志编号
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* 任务编号
|
||||
*
|
||||
* 关联 {@link InfJobDO#getId()}
|
||||
*/
|
||||
private Long jobId;
|
||||
/**
|
||||
* 处理器的名字
|
||||
*
|
||||
* 冗余字段 {@link InfJobDO#getHandlerName()}
|
||||
*/
|
||||
private String handlerName;
|
||||
/**
|
||||
* 处理器的参数
|
||||
*
|
||||
* 冗余字段 {@link InfJobDO#getHandlerParam()}
|
||||
*/
|
||||
private String handlerParam;
|
||||
/**
|
||||
* 第几次执行
|
||||
*
|
||||
* 用于区分是不是重试执行。如果是重试执行,则 index 大于 1
|
||||
*/
|
||||
private Integer executeIndex;
|
||||
|
||||
/**
|
||||
* 开始执行时间
|
||||
*/
|
||||
private Date beginTime;
|
||||
/**
|
||||
* 结束执行时间
|
||||
*/
|
||||
private Date endTime;
|
||||
/**
|
||||
* 执行时长,单位:毫秒
|
||||
*/
|
||||
private Integer duration;
|
||||
/**
|
||||
* 状态
|
||||
*
|
||||
* 枚举 {@link InfJobLogStatusEnum}
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 结果数据
|
||||
*
|
||||
* 成功时,使用 {@link JobHandler#execute(String)} 的结果
|
||||
* 失败时,使用 {@link JobHandler#execute(String)} 的异常堆栈
|
||||
*/
|
||||
private String result;
|
||||
|
||||
}
|
@@ -1,37 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.dal.mysql.config;
|
||||
|
||||
import cn.iocoder.yudao.coreservice.modules.infra.dal.dataobject.config.InfConfigDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo.InfConfigExportReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo.InfConfigPageReqVO;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface InfConfigMapper extends BaseMapperX<InfConfigDO> {
|
||||
|
||||
default InfConfigDO selectByKey(String key) {
|
||||
return selectOne(new QueryWrapper<InfConfigDO>().eq("`key`", key));
|
||||
}
|
||||
|
||||
default PageResult<InfConfigDO> selectPage(InfConfigPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new QueryWrapperX<InfConfigDO>()
|
||||
.likeIfPresent("name", reqVO.getName())
|
||||
.likeIfPresent("`key`", reqVO.getKey())
|
||||
.eqIfPresent("`type`", reqVO.getType())
|
||||
.betweenIfPresent("create_time", reqVO.getBeginTime(), reqVO.getEndTime()));
|
||||
}
|
||||
|
||||
default List<InfConfigDO> selectList(InfConfigExportReqVO reqVO) {
|
||||
return selectList(new QueryWrapperX<InfConfigDO>()
|
||||
.likeIfPresent("name", reqVO.getName())
|
||||
.likeIfPresent("`key`", reqVO.getKey())
|
||||
.eqIfPresent("`type`", reqVO.getType())
|
||||
.betweenIfPresent("create_time", reqVO.getBeginTime(), reqVO.getEndTime()));
|
||||
}
|
||||
|
||||
}
|
@@ -1,25 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.dal.mysql.file;
|
||||
|
||||
import cn.iocoder.yudao.coreservice.modules.infra.dal.dataobject.file.InfFileDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.file.vo.InfFilePageReqVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface InfFileMapper extends BaseMapperX<InfFileDO> {
|
||||
|
||||
default Integer selectCountById(String id) {
|
||||
return selectCount("id", id);
|
||||
}
|
||||
|
||||
default PageResult<InfFileDO> selectPage(InfFilePageReqVO reqVO) {
|
||||
return selectPage(reqVO, new QueryWrapperX<InfFileDO>()
|
||||
.likeIfPresent("id", reqVO.getId())
|
||||
.likeIfPresent("type", reqVO.getType())
|
||||
.betweenIfPresent("create_time", reqVO.getBeginCreateTime(), reqVO.getEndCreateTime())
|
||||
.orderByDesc("create_time"));
|
||||
}
|
||||
|
||||
}
|
@@ -1,43 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.dal.mysql.job;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.log.InfJobLogExportReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.log.InfJobLogPageReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.job.InfJobLogDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 任务日志 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Mapper
|
||||
public interface InfJobLogMapper extends BaseMapperX<InfJobLogDO> {
|
||||
|
||||
default PageResult<InfJobLogDO> selectPage(InfJobLogPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new QueryWrapperX<InfJobLogDO>()
|
||||
.eqIfPresent("job_id", reqVO.getJobId())
|
||||
.likeIfPresent("handler_name", reqVO.getHandlerName())
|
||||
.geIfPresent("begin_time", reqVO.getBeginTime())
|
||||
.leIfPresent("end_time", reqVO.getEndTime())
|
||||
.eqIfPresent("status", reqVO.getStatus())
|
||||
.orderByDesc("id") // ID 倒序
|
||||
);
|
||||
}
|
||||
|
||||
default List<InfJobLogDO> selectList(InfJobLogExportReqVO reqVO) {
|
||||
return selectList(new QueryWrapperX<InfJobLogDO>()
|
||||
.eqIfPresent("job_id", reqVO.getJobId())
|
||||
.likeIfPresent("handler_name", reqVO.getHandlerName())
|
||||
.geIfPresent("begin_time", reqVO.getBeginTime())
|
||||
.leIfPresent("end_time", reqVO.getEndTime())
|
||||
.eqIfPresent("status", reqVO.getStatus())
|
||||
.orderByDesc("id") // ID 倒序
|
||||
);
|
||||
}
|
||||
|
||||
}
|
@@ -1,41 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.dal.mysql.job;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job.InfJobExportReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job.InfJobPageReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.job.InfJobDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 定时任务 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Mapper
|
||||
public interface InfJobMapper extends BaseMapperX<InfJobDO> {
|
||||
|
||||
default InfJobDO selectByHandlerName(String handlerName) {
|
||||
return selectOne("handler_name", handlerName);
|
||||
}
|
||||
|
||||
default PageResult<InfJobDO> selectPage(InfJobPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new QueryWrapperX<InfJobDO>()
|
||||
.likeIfPresent("name", reqVO.getName())
|
||||
.eqIfPresent("status", reqVO.getStatus())
|
||||
.likeIfPresent("handler_name", reqVO.getHandlerName())
|
||||
);
|
||||
}
|
||||
|
||||
default List<InfJobDO> selectList(InfJobExportReqVO reqVO) {
|
||||
return selectList(new QueryWrapperX<InfJobDO>()
|
||||
.likeIfPresent("name", reqVO.getName())
|
||||
.eqIfPresent("status", reqVO.getStatus())
|
||||
.likeIfPresent("handler_name", reqVO.getHandlerName())
|
||||
);
|
||||
}
|
||||
|
||||
}
|
@@ -1,47 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.dal.mysql.logger;
|
||||
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogExportReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogPageReqVO;
|
||||
import cn.iocoder.yudao.coreservice.modules.infra.dal.dataobject.logger.InfApiAccessLogDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* API 访问日志 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Mapper
|
||||
public interface InfApiAccessLogMapper extends BaseMapperX<InfApiAccessLogDO> {
|
||||
|
||||
default PageResult<InfApiAccessLogDO> selectPage(InfApiAccessLogPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new QueryWrapperX<InfApiAccessLogDO>()
|
||||
.eqIfPresent("user_id", reqVO.getUserId())
|
||||
.eqIfPresent("user_type", reqVO.getUserType())
|
||||
.eqIfPresent("application_name", reqVO.getApplicationName())
|
||||
.likeIfPresent("request_url", reqVO.getRequestUrl())
|
||||
.betweenIfPresent("begin_time", reqVO.getBeginBeginTime(), reqVO.getEndBeginTime())
|
||||
.geIfPresent("duration", reqVO.getDuration())
|
||||
.eqIfPresent("result_code", reqVO.getResultCode())
|
||||
.orderByDesc("id")
|
||||
);
|
||||
}
|
||||
|
||||
default List<InfApiAccessLogDO> selectList(InfApiAccessLogExportReqVO reqVO) {
|
||||
return selectList(new QueryWrapperX<InfApiAccessLogDO>()
|
||||
.eqIfPresent("user_id", reqVO.getUserId())
|
||||
.eqIfPresent("user_type", reqVO.getUserType())
|
||||
.eqIfPresent("application_name", reqVO.getApplicationName())
|
||||
.likeIfPresent("request_url", reqVO.getRequestUrl())
|
||||
.betweenIfPresent("begin_time", reqVO.getBeginBeginTime(), reqVO.getEndBeginTime())
|
||||
.geIfPresent("duration", reqVO.getDuration())
|
||||
.eqIfPresent("result_code", reqVO.getResultCode())
|
||||
.orderByDesc("id")
|
||||
);
|
||||
}
|
||||
|
||||
}
|
@@ -1,45 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.dal.mysql.logger;
|
||||
|
||||
import cn.iocoder.yudao.coreservice.modules.infra.dal.dataobject.logger.InfApiErrorLogDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogExportReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogPageReqVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* API 错误日志 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Mapper
|
||||
public interface InfApiErrorLogMapper extends BaseMapperX<InfApiErrorLogDO> {
|
||||
|
||||
default PageResult<InfApiErrorLogDO> selectPage(InfApiErrorLogPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new QueryWrapperX<InfApiErrorLogDO>()
|
||||
.eqIfPresent("user_id", reqVO.getUserId())
|
||||
.eqIfPresent("user_type", reqVO.getUserType())
|
||||
.eqIfPresent("application_name", reqVO.getApplicationName())
|
||||
.likeIfPresent("request_url", reqVO.getRequestUrl())
|
||||
.betweenIfPresent("exception_time", reqVO.getBeginExceptionTime(), reqVO.getEndExceptionTime())
|
||||
.eqIfPresent("process_status", reqVO.getProcessStatus())
|
||||
.orderByDesc("id")
|
||||
);
|
||||
}
|
||||
|
||||
default List<InfApiErrorLogDO> selectList(InfApiErrorLogExportReqVO reqVO) {
|
||||
return selectList(new QueryWrapperX<InfApiErrorLogDO>()
|
||||
.eqIfPresent("user_id", reqVO.getUserId())
|
||||
.eqIfPresent("user_type", reqVO.getUserType())
|
||||
.eqIfPresent("application_name", reqVO.getApplicationName())
|
||||
.likeIfPresent("request_url", reqVO.getRequestUrl())
|
||||
.betweenIfPresent("exception_time", reqVO.getBeginExceptionTime(), reqVO.getEndExceptionTime())
|
||||
.eqIfPresent("process_status", reqVO.getProcessStatus())
|
||||
.orderByDesc("id")
|
||||
);
|
||||
}
|
||||
|
||||
}
|
@@ -1,19 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.enums;
|
||||
|
||||
/**
|
||||
* Infra 字典类型的枚举类
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
public interface InfDictTypeConstants {
|
||||
|
||||
String REDIS_TIMEOUT_TYPE = "inf_redis_timeout_type"; // Redis 超时类型
|
||||
|
||||
String JOB_STATUS = "inf_job_status"; // 定时任务状态的枚举
|
||||
String JOB_LOG_STATUS = "inf_job_log_status"; // 定时任务日志状态的枚举
|
||||
|
||||
String API_ERROR_LOG_PROCESS_STATUS = "inf_api_error_log_process_status"; // API 错误日志的处理状态的枚举
|
||||
|
||||
String ERROR_CODE_TYPE = "inf_error_code_type"; // 错误码的类型枚举
|
||||
|
||||
}
|
@@ -1,33 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.enums;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.exception.ErrorCode;
|
||||
|
||||
/**
|
||||
* Infra 错误码枚举类
|
||||
*
|
||||
* infra 系统,使用 1-001-000-000 段
|
||||
*/
|
||||
public interface InfErrorCodeConstants {
|
||||
|
||||
// ========== 参数配置 1001000000 ==========
|
||||
ErrorCode CONFIG_NOT_EXISTS = new ErrorCode(1001000001, "参数配置不存在");
|
||||
ErrorCode CONFIG_KEY_DUPLICATE = new ErrorCode(1001000002, "参数配置 key 重复");
|
||||
ErrorCode CONFIG_CAN_NOT_DELETE_SYSTEM_TYPE = new ErrorCode(1001000003, "不能删除类型为系统内置的参数配置");
|
||||
ErrorCode CONFIG_GET_VALUE_ERROR_IF_SENSITIVE = new ErrorCode(1001000004, "不允许获取敏感配置到前端");
|
||||
|
||||
// ========== 定时任务 1001001000 ==========
|
||||
ErrorCode JOB_NOT_EXISTS = new ErrorCode(1001001000, "定时任务不存在");
|
||||
ErrorCode JOB_HANDLER_EXISTS = new ErrorCode(1001001001, "定时任务的处理器已经存在");
|
||||
ErrorCode JOB_CHANGE_STATUS_INVALID = new ErrorCode(1001001002, "只允许修改为开启或者关闭状态");
|
||||
ErrorCode JOB_CHANGE_STATUS_EQUALS = new ErrorCode(1001001003, "定时任务已经处于该状态,无需修改");
|
||||
ErrorCode JOB_UPDATE_ONLY_NORMAL_STATUS = new ErrorCode(1001001004, "只有开启状态的任务,才可以修改");
|
||||
ErrorCode JOB_CRON_EXPRESSION_VALID = new ErrorCode(1001001005, "CRON 表达式不正确");
|
||||
|
||||
// ========== API 错误日志 1001002000 ==========
|
||||
ErrorCode API_ERROR_LOG_NOT_FOUND = new ErrorCode(1001002000, "API 错误日志不存在");
|
||||
ErrorCode API_ERROR_LOG_PROCESSED = new ErrorCode(1001002001, "API 错误日志已处理");
|
||||
|
||||
// ========== 文件 1001003000 ==========
|
||||
ErrorCode FILE_NOT_EXISTS = new ErrorCode(1001003000, "文件不存在");
|
||||
|
||||
}
|
@@ -1,21 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.enums.config;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum InfConfigTypeEnum {
|
||||
|
||||
/**
|
||||
* 系统配置
|
||||
*/
|
||||
SYSTEM(1),
|
||||
/**
|
||||
* 自定义配置
|
||||
*/
|
||||
CUSTOM(2);
|
||||
|
||||
private final Integer type;
|
||||
|
||||
}
|
@@ -1,24 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.enums.job;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 任务日志的状态枚举
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum InfJobLogStatusEnum {
|
||||
|
||||
RUNNING(0), // 运行中
|
||||
SUCCESS(1), // 成功
|
||||
FAILURE(2); // 失败
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private final Integer status;
|
||||
|
||||
}
|
@@ -1,43 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.enums.job;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
import static org.quartz.impl.jdbcjobstore.Constants.*;
|
||||
|
||||
/**
|
||||
* 任务状态的枚举
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum InfJobStatusEnum {
|
||||
|
||||
/**
|
||||
* 初始化中
|
||||
*/
|
||||
INIT(0, Collections.emptySet()),
|
||||
/**
|
||||
* 开启
|
||||
*/
|
||||
NORMAL(1, Sets.newHashSet(STATE_WAITING, STATE_ACQUIRED, STATE_BLOCKED)),
|
||||
/**
|
||||
* 暂停
|
||||
*/
|
||||
STOP(2, Sets.newHashSet(STATE_PAUSED, STATE_PAUSED_BLOCKED));
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private final Integer status;
|
||||
/**
|
||||
* 对应的 Quartz 触发器的状态集合
|
||||
*/
|
||||
private final Set<String> quartzStates;
|
||||
|
||||
}
|
@@ -1,28 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.enums.logger;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* API 异常数据的处理状态
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum InfApiErrorLogProcessStatusEnum {
|
||||
|
||||
INIT(0, "未处理"),
|
||||
DONE(1, "已处理"),
|
||||
IGNORE(2, "已忽略");
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private final Integer status;
|
||||
/**
|
||||
* 资源类型名
|
||||
*/
|
||||
private final String name;
|
||||
|
||||
}
|
@@ -1,16 +0,0 @@
|
||||
/**
|
||||
* 文件的存储,推荐使用七牛、阿里云、华为云、腾讯云等文件服务
|
||||
*
|
||||
* 在不采用云服务的情况下,我们有几种技术选型:
|
||||
* 方案 1. 使用自建的文件服务,例如说 minIO、FastDFS 等等
|
||||
* 方案 2. 使用服务器的文件系统存储
|
||||
* 方案 3. 使用数据库进行存储
|
||||
*
|
||||
* 如果考虑额外在搭建服务,推荐方案 1。
|
||||
* 对于方案 2 来说,如果要实现文件存储的高可用,需要多台服务器之间做实时同步,可以基于 rsync + inotify 来做
|
||||
* 对于方案 3 的话,实现起来最简单,但是数据库本身不适合存储海量的文件
|
||||
*
|
||||
* 综合考虑,暂时使用方案 3 的方式,比较适合这样一个 all in one 的项目。
|
||||
* 随着文件的量级大了之后,还是推荐采用云服务。
|
||||
*/
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.framework.file;
|
@@ -1,6 +0,0 @@
|
||||
/**
|
||||
* 属于 infra 模块的 framework 封装
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.framework;
|
@@ -1,24 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.mq.consumer.config;
|
||||
|
||||
import cn.iocoder.yudao.framework.apollo.internals.DBConfigRepository;
|
||||
import cn.iocoder.yudao.framework.mq.core.pubsub.AbstractChannelMessageListener;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.mq.message.config.InfConfigRefreshMessage;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 针对 {@link InfConfigRefreshMessage} 的消费者
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Component
|
||||
@Slf4j
|
||||
public class InfConfigRefreshConsumer extends AbstractChannelMessageListener<InfConfigRefreshMessage> {
|
||||
|
||||
@Override
|
||||
public void onMessage(InfConfigRefreshMessage message) {
|
||||
log.info("[onMessage][收到 Config 刷新消息]");
|
||||
DBConfigRepository.noticeSync();
|
||||
}
|
||||
|
||||
}
|
@@ -1 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.mq.consumer;
|
@@ -1,17 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.mq.message.config;
|
||||
|
||||
import cn.iocoder.yudao.framework.mq.core.pubsub.ChannelMessage;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 配置数据刷新 Message
|
||||
*/
|
||||
@Data
|
||||
public class InfConfigRefreshMessage implements ChannelMessage {
|
||||
|
||||
@Override
|
||||
public String getChannel() {
|
||||
return "infra.config.refresh";
|
||||
}
|
||||
|
||||
}
|
@@ -1 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.mq.message;
|
@@ -1,27 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.mq.producer.config;
|
||||
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.mq.message.config.InfConfigRefreshMessage;
|
||||
import cn.iocoder.yudao.framework.mq.core.util.RedisMessageUtils;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* Config 配置相关消息的 Producer
|
||||
*/
|
||||
@Component
|
||||
public class InfConfigProducer {
|
||||
|
||||
@Resource
|
||||
private StringRedisTemplate stringRedisTemplate;
|
||||
|
||||
/**
|
||||
* 发送 {@link InfConfigRefreshMessage} 消息
|
||||
*/
|
||||
public void sendConfigRefreshMessage() {
|
||||
InfConfigRefreshMessage message = new InfConfigRefreshMessage();
|
||||
RedisMessageUtils.sendChannelMessage(stringRedisTemplate, message);
|
||||
}
|
||||
|
||||
}
|
@@ -1 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.mq.producer;
|
@@ -1,7 +0,0 @@
|
||||
/**
|
||||
* infra 包下,我们放基础设施的运维与管理,支撑上层的通用与核心业务。
|
||||
* 例如说:定时任务的管理、服务器的信息等等
|
||||
*
|
||||
* 缩写:inf
|
||||
*/
|
||||
package cn.iocoder.yudao.adminserver.modules.infra;
|
@@ -1,75 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.service.config;
|
||||
|
||||
import cn.iocoder.yudao.coreservice.modules.infra.dal.dataobject.config.InfConfigDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo.InfConfigCreateReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo.InfConfigExportReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo.InfConfigPageReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo.InfConfigUpdateReqVO;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 参数配置 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
public interface InfConfigService {
|
||||
|
||||
/**
|
||||
* 创建参数配置
|
||||
*
|
||||
* @param reqVO 创建信息
|
||||
* @return 配置编号
|
||||
*/
|
||||
Long createConfig(@Valid InfConfigCreateReqVO reqVO);
|
||||
|
||||
/**
|
||||
* 更新参数配置
|
||||
*
|
||||
* @param reqVO 更新信息
|
||||
*/
|
||||
void updateConfig(@Valid InfConfigUpdateReqVO reqVO);
|
||||
|
||||
/**
|
||||
* 删除参数配置
|
||||
*
|
||||
* @param id 配置编号
|
||||
*/
|
||||
void deleteConfig(Long id);
|
||||
|
||||
/**
|
||||
* 获得参数配置
|
||||
*
|
||||
* @param id 配置编号
|
||||
* @return 参数配置
|
||||
*/
|
||||
InfConfigDO getConfig(Long id);
|
||||
|
||||
/**
|
||||
* 根据参数键,获得参数配置
|
||||
*
|
||||
* @param key 配置键
|
||||
* @return 参数配置
|
||||
*/
|
||||
InfConfigDO getConfigByKey(String key);
|
||||
|
||||
/**
|
||||
* 获得参数配置分页列表
|
||||
*
|
||||
* @param reqVO 分页条件
|
||||
* @return 分页列表
|
||||
*/
|
||||
PageResult<InfConfigDO> getConfigPage(@Valid InfConfigPageReqVO reqVO);
|
||||
|
||||
/**
|
||||
* 获得参数配置列表
|
||||
*
|
||||
* @param reqVO 列表
|
||||
* @return 列表
|
||||
*/
|
||||
List<InfConfigDO> getConfigList(@Valid InfConfigExportReqVO reqVO);
|
||||
|
||||
|
||||
}
|
@@ -1,132 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.service.config.impl;
|
||||
|
||||
import cn.iocoder.yudao.coreservice.modules.infra.dal.dataobject.config.InfConfigDO;
|
||||
import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo.InfConfigCreateReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo.InfConfigExportReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo.InfConfigPageReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo.InfConfigUpdateReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.convert.config.InfConfigConvert;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.dal.mysql.config.InfConfigMapper;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.enums.config.InfConfigTypeEnum;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.mq.producer.config.InfConfigProducer;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.service.config.InfConfigService;
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.adminserver.modules.infra.enums.InfErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 参数配置 Service 实现类
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
@Validated
|
||||
public class InfConfigServiceImpl implements InfConfigService {
|
||||
|
||||
@Resource
|
||||
private InfConfigMapper configMapper;
|
||||
|
||||
@Resource
|
||||
private InfConfigProducer configProducer;
|
||||
|
||||
@Override
|
||||
public Long createConfig(InfConfigCreateReqVO reqVO) {
|
||||
// 校验正确性
|
||||
checkCreateOrUpdate(null, reqVO.getKey());
|
||||
// 插入参数配置
|
||||
InfConfigDO config = InfConfigConvert.INSTANCE.convert(reqVO);
|
||||
config.setType(InfConfigTypeEnum.CUSTOM.getType());
|
||||
configMapper.insert(config);
|
||||
// 发送刷新消息
|
||||
configProducer.sendConfigRefreshMessage();
|
||||
return config.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateConfig(InfConfigUpdateReqVO reqVO) {
|
||||
// 校验正确性
|
||||
checkCreateOrUpdate(reqVO.getId(), null); // 不允许更新 key
|
||||
// 更新参数配置
|
||||
InfConfigDO updateObj = InfConfigConvert.INSTANCE.convert(reqVO);
|
||||
configMapper.updateById(updateObj);
|
||||
// 发送刷新消息
|
||||
configProducer.sendConfigRefreshMessage();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteConfig(Long id) {
|
||||
// 校验配置存在
|
||||
InfConfigDO config = checkConfigExists(id);
|
||||
// 内置配置,不允许删除
|
||||
if (InfConfigTypeEnum.SYSTEM.getType().equals(config.getType())) {
|
||||
throw ServiceExceptionUtil.exception(CONFIG_CAN_NOT_DELETE_SYSTEM_TYPE);
|
||||
}
|
||||
// 删除
|
||||
configMapper.deleteById(id);
|
||||
// 发送刷新消息
|
||||
configProducer.sendConfigRefreshMessage();
|
||||
}
|
||||
|
||||
@Override
|
||||
public InfConfigDO getConfig(Long id) {
|
||||
return configMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InfConfigDO getConfigByKey(String key) {
|
||||
return configMapper.selectByKey(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<InfConfigDO> getConfigPage(InfConfigPageReqVO reqVO) {
|
||||
return configMapper.selectPage(reqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<InfConfigDO> getConfigList(InfConfigExportReqVO reqVO) {
|
||||
return configMapper.selectList(reqVO);
|
||||
}
|
||||
|
||||
private void checkCreateOrUpdate(Long id, String key) {
|
||||
// 校验自己存在
|
||||
checkConfigExists(id);
|
||||
// 校验参数配置 key 的唯一性
|
||||
checkConfigKeyUnique(id, key);
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
public InfConfigDO checkConfigExists(Long id) {
|
||||
if (id == null) {
|
||||
return null;
|
||||
}
|
||||
InfConfigDO config = configMapper.selectById(id);
|
||||
if (config == null) {
|
||||
throw ServiceExceptionUtil.exception(CONFIG_NOT_EXISTS);
|
||||
}
|
||||
return config;
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
public void checkConfigKeyUnique(Long id, String key) {
|
||||
InfConfigDO config = configMapper.selectByKey(key);
|
||||
if (config == null) {
|
||||
return;
|
||||
}
|
||||
// 如果 id 为空,说明不用比较是否为相同 id 的参数配置
|
||||
if (id == null) {
|
||||
throw ServiceExceptionUtil.exception(CONFIG_KEY_DUPLICATE);
|
||||
}
|
||||
if (!config.getId().equals(id)) {
|
||||
throw ServiceExceptionUtil.exception(CONFIG_KEY_DUPLICATE);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -1,46 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.service.file;
|
||||
|
||||
import cn.iocoder.yudao.coreservice.modules.infra.dal.dataobject.file.InfFileDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.file.vo.InfFilePageReqVO;
|
||||
|
||||
/**
|
||||
* 文件 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
public interface InfFileService {
|
||||
|
||||
/**
|
||||
* 保存文件,并返回文件的访问路径
|
||||
*
|
||||
* @param path 文件路径
|
||||
* @param content 文件内容
|
||||
* @return 文件路径
|
||||
*/
|
||||
String createFile(String path, byte[] content);
|
||||
|
||||
/**
|
||||
* 删除文件
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteFile(String id);
|
||||
|
||||
/**
|
||||
* 获得文件
|
||||
*
|
||||
* @param path 文件路径
|
||||
* @return 文件
|
||||
*/
|
||||
InfFileDO getFile(String path);
|
||||
|
||||
/**
|
||||
* 获得文件分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 文件分页
|
||||
*/
|
||||
PageResult<InfFileDO> getFilePage(InfFilePageReqVO pageReqVO);
|
||||
|
||||
}
|
@@ -1,72 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.service.file.impl;
|
||||
|
||||
import cn.hutool.core.io.FileTypeUtil;
|
||||
import cn.iocoder.yudao.coreservice.modules.infra.dal.dataobject.file.InfFileDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.framework.file.config.FileProperties;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.file.vo.InfFilePageReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.dal.mysql.file.InfFileMapper;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.service.file.InfFileService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.ByteArrayInputStream;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.adminserver.modules.infra.enums.InfErrorCodeConstants.FILE_NOT_EXISTS;
|
||||
import static cn.iocoder.yudao.adminserver.modules.system.enums.SysErrorCodeConstants.FILE_PATH_EXISTS;
|
||||
|
||||
/**
|
||||
* 文件 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Service
|
||||
public class InfFileServiceImpl implements InfFileService {
|
||||
|
||||
@Resource
|
||||
private InfFileMapper fileMapper;
|
||||
|
||||
@Resource
|
||||
private FileProperties fileProperties;
|
||||
|
||||
@Override
|
||||
public String createFile(String path, byte[] content) {
|
||||
if (fileMapper.selectCountById(path) > 0) {
|
||||
throw exception(FILE_PATH_EXISTS);
|
||||
}
|
||||
// 保存到数据库
|
||||
InfFileDO file = new InfFileDO();
|
||||
file.setId(path);
|
||||
file.setType(FileTypeUtil.getType(new ByteArrayInputStream(content)));
|
||||
file.setContent(content);
|
||||
fileMapper.insert(file);
|
||||
// 拼接路径返回
|
||||
return fileProperties.getBasePath() + path;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteFile(String id) {
|
||||
// 校验存在
|
||||
this.validateFileExists(id);
|
||||
// 更新
|
||||
fileMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateFileExists(String id) {
|
||||
if (fileMapper.selectById(id) == null) {
|
||||
throw exception(FILE_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public InfFileDO getFile(String path) {
|
||||
return fileMapper.selectById(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<InfFileDO> getFilePage(InfFilePageReqVO pageReqVO) {
|
||||
return fileMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
@@ -1,51 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.service.job;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.quartz.core.service.JobLogFrameworkService;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.log.InfJobLogExportReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.log.InfJobLogPageReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.job.InfJobLogDO;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Job 日志 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
public interface InfJobLogService extends JobLogFrameworkService {
|
||||
|
||||
/**
|
||||
* 获得定时任务
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 定时任务
|
||||
*/
|
||||
InfJobLogDO getJobLog(Long id);
|
||||
|
||||
/**
|
||||
* 获得定时任务列表
|
||||
*
|
||||
* @param ids 编号
|
||||
* @return 定时任务列表
|
||||
*/
|
||||
List<InfJobLogDO> getJobLogList(Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得定时任务分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 定时任务分页
|
||||
*/
|
||||
PageResult<InfJobLogDO> getJobLogPage(InfJobLogPageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 获得定时任务列表, 用于 Excel 导出
|
||||
*
|
||||
* @param exportReqVO 查询条件
|
||||
* @return 定时任务分页
|
||||
*/
|
||||
List<InfJobLogDO> getJobLogList(InfJobLogExportReqVO exportReqVO);
|
||||
|
||||
}
|
@@ -1,91 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.service.job;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job.InfJobCreateReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job.InfJobExportReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job.InfJobPageReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job.InfJobUpdateReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.job.InfJobDO;
|
||||
import org.quartz.SchedulerException;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 定时任务 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
public interface InfJobService {
|
||||
|
||||
/**
|
||||
* 创建定时任务
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createJob(@Valid InfJobCreateReqVO createReqVO) throws SchedulerException;
|
||||
|
||||
/**
|
||||
* 更新定时任务
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateJob(@Valid InfJobUpdateReqVO updateReqVO) throws SchedulerException;
|
||||
|
||||
/**
|
||||
* 更新定时任务的状态
|
||||
*
|
||||
* @param id 任务编号
|
||||
* @param status 状态
|
||||
*/
|
||||
void updateJobStatus(Long id, Integer status) throws SchedulerException;
|
||||
|
||||
/**
|
||||
* 触发定时任务
|
||||
*
|
||||
* @param id 任务编号
|
||||
*/
|
||||
void triggerJob(Long id) throws SchedulerException;
|
||||
|
||||
/**
|
||||
* 删除定时任务
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteJob(Long id) throws SchedulerException;
|
||||
|
||||
/**
|
||||
* 获得定时任务
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 定时任务
|
||||
*/
|
||||
InfJobDO getJob(Long id);
|
||||
|
||||
/**
|
||||
* 获得定时任务列表
|
||||
*
|
||||
* @param ids 编号
|
||||
* @return 定时任务列表
|
||||
*/
|
||||
List<InfJobDO> getJobList(Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得定时任务分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 定时任务分页
|
||||
*/
|
||||
PageResult<InfJobDO> getJobPage(InfJobPageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 获得定时任务列表, 用于 Excel 导出
|
||||
*
|
||||
* @param exportReqVO 查询条件
|
||||
* @return 定时任务分页
|
||||
*/
|
||||
List<InfJobDO> getJobList(InfJobExportReqVO exportReqVO);
|
||||
|
||||
}
|
@@ -1,74 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.service.job.impl;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.log.InfJobLogExportReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.log.InfJobLogPageReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.job.InfJobLogDO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.dal.mysql.job.InfJobLogMapper;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.enums.job.InfJobLogStatusEnum;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.service.job.InfJobLogService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Job 日志 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
@Slf4j
|
||||
public class InfJobLogServiceImpl implements InfJobLogService {
|
||||
|
||||
@Resource
|
||||
private InfJobLogMapper jobLogMapper;
|
||||
|
||||
@Override
|
||||
public Long createJobLog(Long jobId, Date beginTime, String jobHandlerName, String jobHandlerParam, Integer executeIndex) {
|
||||
InfJobLogDO log = InfJobLogDO.builder().jobId(jobId).handlerName(jobHandlerName).handlerParam(jobHandlerParam).executeIndex(executeIndex)
|
||||
.beginTime(beginTime).status(InfJobLogStatusEnum.RUNNING.getStatus()).build();
|
||||
jobLogMapper.insert(log);
|
||||
return log.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Async
|
||||
public void updateJobLogResultAsync(Long logId, Date endTime, Integer duration, boolean success, String result) {
|
||||
try {
|
||||
InfJobLogDO updateObj = InfJobLogDO.builder().id(logId).endTime(endTime).duration(duration)
|
||||
.status(success ? InfJobLogStatusEnum.SUCCESS.getStatus() : InfJobLogStatusEnum.FAILURE.getStatus()).result(result).build();
|
||||
jobLogMapper.updateById(updateObj);
|
||||
} catch (Exception ex) {
|
||||
log.error("[updateJobLogResultAsync][logId({}) endTime({}) duration({}) success({}) result({})]",
|
||||
logId, endTime, duration, success, result);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public InfJobLogDO getJobLog(Long id) {
|
||||
return jobLogMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<InfJobLogDO> getJobLogList(Collection<Long> ids) {
|
||||
return jobLogMapper.selectBatchIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<InfJobLogDO> getJobLogPage(InfJobLogPageReqVO pageReqVO) {
|
||||
return jobLogMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<InfJobLogDO> getJobLogList(InfJobLogExportReqVO exportReqVO) {
|
||||
return jobLogMapper.selectList(exportReqVO);
|
||||
}
|
||||
|
||||
}
|
@@ -1,174 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.service.job.impl;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.quartz.core.scheduler.SchedulerManager;
|
||||
import cn.iocoder.yudao.framework.quartz.core.util.CronUtils;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job.InfJobCreateReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job.InfJobExportReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job.InfJobPageReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job.InfJobUpdateReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.convert.job.InfJobConvert;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.job.InfJobDO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.dal.mysql.job.InfJobMapper;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.enums.job.InfJobStatusEnum;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.service.job.InfJobService;
|
||||
import org.quartz.SchedulerException;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.adminserver.modules.infra.enums.InfErrorCodeConstants.*;
|
||||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.containsAny;
|
||||
|
||||
/**
|
||||
* 定时任务 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class InfJobServiceImpl implements InfJobService {
|
||||
|
||||
@Resource
|
||||
private InfJobMapper jobMapper;
|
||||
|
||||
@Resource
|
||||
private SchedulerManager schedulerManager;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Long createJob(InfJobCreateReqVO createReqVO) throws SchedulerException {
|
||||
validateCronExpression(createReqVO.getCronExpression());
|
||||
// 校验唯一性
|
||||
if (jobMapper.selectByHandlerName(createReqVO.getHandlerName()) != null) {
|
||||
throw exception(JOB_HANDLER_EXISTS);
|
||||
}
|
||||
// 插入
|
||||
InfJobDO job = InfJobConvert.INSTANCE.convert(createReqVO);
|
||||
job.setStatus(InfJobStatusEnum.INIT.getStatus());
|
||||
fillJobMonitorTimeoutEmpty(job);
|
||||
jobMapper.insert(job);
|
||||
|
||||
// 添加 Job 到 Quartz 中
|
||||
schedulerManager.addJob(job.getId(), job.getHandlerName(), job.getHandlerParam(), job.getCronExpression(),
|
||||
createReqVO.getRetryCount(), createReqVO.getRetryInterval());
|
||||
// 更新
|
||||
InfJobDO updateObj = InfJobDO.builder().id(job.getId()).status(InfJobStatusEnum.NORMAL.getStatus()).build();
|
||||
jobMapper.updateById(updateObj);
|
||||
|
||||
// 返回
|
||||
return job.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updateJob(InfJobUpdateReqVO updateReqVO) throws SchedulerException {
|
||||
validateCronExpression(updateReqVO.getCronExpression());
|
||||
// 校验存在
|
||||
InfJobDO job = this.validateJobExists(updateReqVO.getId());
|
||||
// 只有开启状态,才可以修改.原因是,如果出暂停状态,修改 Quartz Job 时,会导致任务又开始执行
|
||||
if (!job.getStatus().equals(InfJobStatusEnum.NORMAL.getStatus())) {
|
||||
throw exception(JOB_UPDATE_ONLY_NORMAL_STATUS);
|
||||
}
|
||||
// 更新
|
||||
InfJobDO updateObj = InfJobConvert.INSTANCE.convert(updateReqVO);
|
||||
fillJobMonitorTimeoutEmpty(updateObj);
|
||||
jobMapper.updateById(updateObj);
|
||||
|
||||
// 更新 Job 到 Quartz 中
|
||||
schedulerManager.updateJob(job.getHandlerName(), updateReqVO.getHandlerParam(), updateReqVO.getCronExpression(),
|
||||
updateReqVO.getRetryCount(), updateReqVO.getRetryInterval());
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updateJobStatus(Long id, Integer status) throws SchedulerException {
|
||||
// 校验 status
|
||||
if (!containsAny(status, InfJobStatusEnum.NORMAL.getStatus(), InfJobStatusEnum.STOP.getStatus())) {
|
||||
throw exception(JOB_CHANGE_STATUS_INVALID);
|
||||
}
|
||||
// 校验存在
|
||||
InfJobDO job = this.validateJobExists(id);
|
||||
// 校验是否已经为当前状态
|
||||
if (job.getStatus().equals(status)) {
|
||||
throw exception(JOB_CHANGE_STATUS_EQUALS);
|
||||
}
|
||||
// 更新 Job 状态
|
||||
InfJobDO updateObj = InfJobDO.builder().id(id).status(status).build();
|
||||
jobMapper.updateById(updateObj);
|
||||
|
||||
// 更新状态 Job 到 Quartz 中
|
||||
if (InfJobStatusEnum.NORMAL.getStatus().equals(status)) { // 开启
|
||||
schedulerManager.resumeJob(job.getHandlerName());
|
||||
} else { // 暂停
|
||||
schedulerManager.pauseJob(job.getHandlerName());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void triggerJob(Long id) throws SchedulerException {
|
||||
// 校验存在
|
||||
InfJobDO job = this.validateJobExists(id);
|
||||
|
||||
// 触发 Quartz 中的 Job
|
||||
schedulerManager.triggerJob(job.getId(), job.getHandlerName(), job.getHandlerParam());
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteJob(Long id) throws SchedulerException {
|
||||
// 校验存在
|
||||
InfJobDO job = this.validateJobExists(id);
|
||||
// 更新
|
||||
jobMapper.deleteById(id);
|
||||
|
||||
// 删除 Job 到 Quartz 中
|
||||
schedulerManager.deleteJob(job.getHandlerName());
|
||||
}
|
||||
|
||||
private InfJobDO validateJobExists(Long id) {
|
||||
InfJobDO job = jobMapper.selectById(id);
|
||||
if (job == null) {
|
||||
throw exception(JOB_NOT_EXISTS);
|
||||
}
|
||||
return job;
|
||||
}
|
||||
|
||||
private void validateCronExpression(String cronExpression) {
|
||||
if (!CronUtils.isValid(cronExpression)) {
|
||||
throw exception(JOB_CRON_EXPRESSION_VALID);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public InfJobDO getJob(Long id) {
|
||||
return jobMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<InfJobDO> getJobList(Collection<Long> ids) {
|
||||
return jobMapper.selectBatchIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<InfJobDO> getJobPage(InfJobPageReqVO pageReqVO) {
|
||||
return jobMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<InfJobDO> getJobList(InfJobExportReqVO exportReqVO) {
|
||||
return jobMapper.selectList(exportReqVO);
|
||||
}
|
||||
|
||||
private static void fillJobMonitorTimeoutEmpty(InfJobDO job) {
|
||||
if (job.getMonitorTimeout() == null) {
|
||||
job.setMonitorTimeout(0);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -1,33 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.service.logger;
|
||||
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogExportReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogPageReqVO;
|
||||
import cn.iocoder.yudao.coreservice.modules.infra.dal.dataobject.logger.InfApiAccessLogDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* API 访问日志 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
public interface InfApiAccessLogService {
|
||||
|
||||
/**
|
||||
* 获得 API 访问日志分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return API 访问日志分页
|
||||
*/
|
||||
PageResult<InfApiAccessLogDO> getApiAccessLogPage(InfApiAccessLogPageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 获得 API 访问日志列表, 用于 Excel 导出
|
||||
*
|
||||
* @param exportReqVO 查询条件
|
||||
* @return API 访问日志分页
|
||||
*/
|
||||
List<InfApiAccessLogDO> getApiAccessLogList(InfApiAccessLogExportReqVO exportReqVO);
|
||||
|
||||
}
|
@@ -1,42 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.infra.service.logger;
|
||||
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogExportReqVO;
|
||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogPageReqVO;
|
||||
import cn.iocoder.yudao.coreservice.modules.infra.dal.dataobject.logger.InfApiErrorLogDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* API 错误日志 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
public interface InfApiErrorLogService {
|
||||
|
||||
/**
|
||||
* 获得 API 错误日志分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return API 错误日志分页
|
||||
*/
|
||||
PageResult<InfApiErrorLogDO> getApiErrorLogPage(InfApiErrorLogPageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 获得 API 错误日志列表, 用于 Excel 导出
|
||||
*
|
||||
* @param exportReqVO 查询条件
|
||||
* @return API 错误日志分页
|
||||
*/
|
||||
List<InfApiErrorLogDO> getApiErrorLogList(InfApiErrorLogExportReqVO exportReqVO);
|
||||
|
||||
/**
|
||||
* 更新 API 错误日志已处理
|
||||
*
|
||||
* @param id API 日志编号
|
||||
* @param processStatus 处理结果
|
||||
* @param processUserId 处理人
|
||||
*/
|
||||
void updateApiErrorLogProcess(Long id, Integer processStatus, Long processUserId);
|
||||
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user