mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-10-26 20:03:46 +08:00
Compare commits
2546 Commits
v4.8.3-fas
...
v4.5.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a70cf658c | ||
|
|
242e26abee | ||
|
|
52d33195ec | ||
|
|
d8b486c793 | ||
|
|
00b6ca5dfe | ||
|
|
9ebaf936c1 | ||
|
|
dac463efa6 | ||
|
|
da1b18792b | ||
|
|
85b4adf400 | ||
|
|
70f39cb1ee | ||
|
|
d87dfd6397 | ||
|
|
1496220a74 | ||
|
|
996835d124 | ||
|
|
f6f3db1701 | ||
|
|
6ee3085260 | ||
|
|
a6f6562693 | ||
|
|
d8585d0ee7 | ||
|
|
4761237849 | ||
|
|
f1a09711c1 | ||
|
|
346a3cf7f1 | ||
|
|
c42229bc54 | ||
|
|
317ab351ce | ||
|
|
e1579622de | ||
|
|
f2ff839106 | ||
|
|
c494ab9963 | ||
|
|
15f7d4dc47 | ||
|
|
dd9ef8431b | ||
|
|
e729a924d4 | ||
|
|
aeacfea536 | ||
|
|
43b31edb75 | ||
|
|
8448bcdc6d | ||
|
|
e1efdb8602 | ||
|
|
409849db1a | ||
|
|
9d6b0b35a3 | ||
|
|
7f00861e68 | ||
|
|
d2b1177580 | ||
|
|
ef91551449 | ||
|
|
4063b0c2dd | ||
|
|
5117fe2958 | ||
|
|
9ed60f22de | ||
|
|
8498ead56c | ||
|
|
53ae4ea6bc | ||
|
|
4c8137daf2 | ||
|
|
6e017c35f7 | ||
|
|
06cda3fb18 | ||
|
|
b38151a0bb | ||
|
|
2790b5ddc4 | ||
|
|
f70951d374 | ||
|
|
9ebe1ae918 | ||
|
|
06e6f7af0c | ||
|
|
d6894c89ed | ||
|
|
ebf780617a | ||
|
|
e130475259 | ||
|
|
115af9c402 | ||
|
|
8b914c1091 | ||
|
|
9c368e8e68 | ||
|
|
700db1fc15 | ||
|
|
35f9c0fb72 | ||
|
|
3091241279 | ||
|
|
56050aa650 | ||
|
|
b5cbb58c2d | ||
|
|
adaa93acfb | ||
|
|
5d043078b2 | ||
|
|
fe8db721d7 | ||
|
|
4d02466fed | ||
|
|
ca69c00cf4 | ||
|
|
6733e48ea1 | ||
|
|
dca5d69dd2 | ||
|
|
842af57d74 | ||
|
|
8dc92383d9 | ||
|
|
1ae35032a5 | ||
|
|
223ae7ae72 | ||
|
|
87a212f093 | ||
|
|
5952b1c90e | ||
|
|
83ba9be342 | ||
|
|
a1431c5cb1 | ||
|
|
e41a58b10d | ||
|
|
da94e89825 | ||
|
|
0381df6b17 | ||
|
|
31acd6b301 | ||
|
|
3c5dfdcf57 | ||
|
|
e0b65b857d | ||
|
|
83395d4e2f | ||
|
|
a6bed384d7 | ||
|
|
afac00de33 | ||
|
|
ee80e97578 | ||
|
|
35fac6cc0c | ||
|
|
e5515751fd | ||
|
|
c9c1e5ca7f | ||
|
|
b47e67ff30 | ||
|
|
f5de8b9ddf | ||
|
|
a63abbf268 | ||
|
|
1f42bd3d22 | ||
|
|
93c4cc2cd1 | ||
|
|
ab4b21ff58 | ||
|
|
83a09c475d | ||
|
|
9d99afd159 | ||
|
|
1858ac6b25 | ||
|
|
78290128e7 | ||
|
|
68193fd37f | ||
|
|
cd9c3c3f4f | ||
|
|
8bd023b49f | ||
|
|
57daef9ced | ||
|
|
fb134da091 | ||
|
|
c1a3eaaffb | ||
|
|
b6dbe7b5a5 | ||
|
|
8138063bfe | ||
|
|
4c8dc500c7 | ||
|
|
85247991b6 | ||
|
|
a127eaa0e9 | ||
|
|
ebb9f15a75 | ||
|
|
cd137bd9fc | ||
|
|
07bde5f88a | ||
|
|
6fffa02acf | ||
|
|
5830c3c96d | ||
|
|
9f2dc5c233 | ||
|
|
ec076c1e0d | ||
|
|
6e8ef308ed | ||
|
|
dc48f9858b | ||
|
|
a6b2ac5dcd | ||
|
|
c0685b7f7f | ||
|
|
fb2d616c57 | ||
|
|
6ff6853082 | ||
|
|
f8014ae969 | ||
|
|
88ed6e25ca | ||
|
|
1de2b7a57e | ||
|
|
95f7ba0080 | ||
|
|
bb73b31e6b | ||
|
|
9ecc4475dd | ||
|
|
f01aa37394 | ||
|
|
0208fa14af | ||
|
|
efa2f23510 | ||
|
|
408155ff5c | ||
|
|
785c7495c1 | ||
|
|
4517dea98d | ||
|
|
0358dc233a | ||
|
|
e21396870f | ||
|
|
b67f6a0fec | ||
|
|
42d8104505 | ||
|
|
f40a0eab23 | ||
|
|
b6153d1aef | ||
|
|
a2c585daa4 | ||
|
|
5a60bf0b0a | ||
|
|
d2e58ba46b | ||
|
|
9dcddc7876 | ||
|
|
b970185536 | ||
|
|
a64a029323 | ||
|
|
98bb1f00ee | ||
|
|
78f4d1c85b | ||
|
|
bf83fe568b | ||
|
|
02f4fdb2e5 | ||
|
|
cb61a84acb | ||
|
|
dc56e211e6 | ||
|
|
e4d33b7d13 | ||
|
|
f7de561ac5 | ||
|
|
fde624998f | ||
|
|
6505432bf4 | ||
|
|
7d953c1a8b | ||
|
|
95010d4a4c | ||
|
|
a32a931d24 | ||
|
|
4d72fb4289 | ||
|
|
186c04d90a | ||
|
|
84de5a5d42 | ||
|
|
6fe80cff6b | ||
|
|
c542b7ac32 | ||
|
|
3607e008a3 | ||
|
|
5b8edbf381 | ||
|
|
03f7bc0f3f | ||
|
|
0c54416040 | ||
|
|
0d188d6a39 | ||
|
|
e95a1245c5 | ||
|
|
a3b761f4e0 | ||
|
|
6e0c5817d5 | ||
|
|
e410fc8c41 | ||
|
|
9e7141f97c | ||
|
|
d7441edae7 | ||
|
|
5053361a7f | ||
|
|
91c99d305c | ||
|
|
2c39f26de3 | ||
|
|
a680a84d91 | ||
|
|
390edc5e3e | ||
|
|
663024ac7f | ||
|
|
0e75aa6250 | ||
|
|
693a33f660 | ||
|
|
8af85e8066 | ||
|
|
513bda53cd | ||
|
|
cf7df6a14c | ||
|
|
acbdd6365a | ||
|
|
e781f88eca | ||
|
|
86d16d070d | ||
|
|
3c4c91dc7d | ||
|
|
574837a92a | ||
|
|
854b405d89 | ||
|
|
7d66a5bd84 | ||
|
|
2c7663d971 | ||
|
|
6281ec0456 | ||
|
|
c3faa1a925 | ||
|
|
111db70908 | ||
|
|
d6400e382a | ||
|
|
8f34644692 | ||
|
|
7135a917c5 | ||
|
|
e2bcd943f5 | ||
|
|
d7c855b6f5 | ||
|
|
d2774d3706 | ||
|
|
adfae03953 | ||
|
|
8298a08592 | ||
|
|
9a3111487a | ||
|
|
0788bcfcb0 | ||
|
|
e4fff795b8 | ||
|
|
fd7dc204de | ||
|
|
4e807455e0 | ||
|
|
8c9c52417e | ||
|
|
be51b4bf25 | ||
|
|
5761ba4271 | ||
|
|
9e075f5c85 | ||
|
|
37d6cc8146 | ||
|
|
2293822dc2 | ||
|
|
f5bec70911 | ||
|
|
87c53a049b | ||
|
|
5bcd2825b6 | ||
|
|
fc442f482d | ||
|
|
a26c02006f | ||
|
|
be37190c09 | ||
|
|
036144b9ea | ||
|
|
2f2021caaf | ||
|
|
4a00e4c9b1 | ||
|
|
541c2df8db | ||
|
|
0e39f6fa2d | ||
|
|
17f0c20242 | ||
|
|
24be022d4c | ||
|
|
1f41b1db02 | ||
|
|
bd338dd934 | ||
|
|
1920ba94b7 | ||
|
|
ccb1449fb2 | ||
|
|
3fb15d8ec3 | ||
|
|
3f4d51b485 | ||
|
|
64ce9daf88 | ||
|
|
0a07236347 | ||
|
|
42d602b7a8 | ||
|
|
d4b800036c | ||
|
|
0b0a52c699 | ||
|
|
b289f4c1b1 | ||
|
|
edbde96487 | ||
|
|
2f380f0c41 | ||
|
|
bc76319f28 | ||
|
|
5c2313d622 | ||
|
|
aa638475e9 | ||
|
|
4af334f2ad | ||
|
|
21ab56ff78 | ||
|
|
09c4c40d4d | ||
|
|
2cb1b84204 | ||
|
|
d1ef8f5eb3 | ||
|
|
39efed1710 | ||
|
|
9a895763d5 | ||
|
|
3950f3c869 | ||
|
|
7347cbaedf | ||
|
|
ba2994210c | ||
|
|
f1a4b363c6 | ||
|
|
a78b5b7b2a | ||
|
|
e104f0cce5 | ||
|
|
5d6f76d11a | ||
|
|
99d1760b98 | ||
|
|
4d71cfa90a | ||
|
|
e02f692359 | ||
|
|
9a7e66826c | ||
|
|
77ec8d1c9a | ||
|
|
66ce21ec29 | ||
|
|
27e0937235 | ||
|
|
aadb7a41cb | ||
|
|
9b3767a954 | ||
|
|
67e20711d4 | ||
|
|
d1681dc18c | ||
|
|
0c58ba5057 | ||
|
|
34997ef3e1 | ||
|
|
7d57725490 | ||
|
|
0fa0070062 | ||
|
|
851dc54b49 | ||
|
|
9f2fe90e50 | ||
|
|
cf2c4e02c6 | ||
|
|
d351c59b38 | ||
|
|
8837119aad | ||
|
|
f9a9431958 | ||
|
|
56d209cd20 | ||
|
|
0936aaccea | ||
|
|
89c1e4f91d | ||
|
|
88b5715eae | ||
|
|
5b05d4a123 | ||
|
|
893ef39401 | ||
|
|
890ad682d7 | ||
|
|
5d367b7bf8 | ||
|
|
b9f45057b8 | ||
|
|
89008c28df | ||
|
|
af7d0a3409 | ||
|
|
1cd2eef899 | ||
|
|
8c7b93ec4f | ||
|
|
3f7bf545b5 | ||
|
|
138842e9ba | ||
|
|
07f3517b6f | ||
|
|
1a8e2b3e63 | ||
|
|
e57682aa53 | ||
|
|
46287da60e | ||
|
|
0cecbec3b3 | ||
|
|
515657616a | ||
|
|
be7766b5f0 | ||
|
|
168d49fe0b | ||
|
|
cbedec7ca6 | ||
|
|
fb1bac2114 | ||
|
|
d0f399a66a | ||
|
|
e73dbd470a | ||
|
|
e0cd5381e2 | ||
|
|
8fe07a7e6d | ||
|
|
4a796d0e81 | ||
|
|
aee5d417ed | ||
|
|
250c5ba226 | ||
|
|
b91c848962 | ||
|
|
027cd821a2 | ||
|
|
e3e9fe5106 | ||
|
|
26b0dc336a | ||
|
|
d4475d0e8d | ||
|
|
1c935819db | ||
|
|
0c9398776a | ||
|
|
aff54ab5fe | ||
|
|
06177addf5 | ||
|
|
9f3b91fe57 | ||
|
|
80d25863db | ||
|
|
cf8a7f8678 | ||
|
|
a8d798c38a | ||
|
|
975b84a394 | ||
|
|
ef121fa664 | ||
|
|
f4c1816084 | ||
|
|
86fc709b03 | ||
|
|
afc4f9552f | ||
|
|
b8b58cb202 | ||
|
|
96970ff951 | ||
|
|
c2c0a03932 | ||
|
|
9bc2d2981b | ||
|
|
7cc9d17424 | ||
|
|
bc8b5f1079 | ||
|
|
5ec5e1a65d | ||
|
|
1f0e742710 | ||
|
|
801615f780 | ||
|
|
28b9fbb4d2 | ||
|
|
d51b77f42b | ||
|
|
6f83ed3285 | ||
|
|
369e4be31c | ||
|
|
5c9fe22780 | ||
|
|
a2843b599d | ||
|
|
55ba098e50 | ||
|
|
1fdd81b4fa | ||
|
|
d4af02f600 | ||
|
|
d7cf341eb3 | ||
|
|
079e6f7c20 | ||
|
|
8a930bd7d5 | ||
|
|
2c79dc906e | ||
|
|
1852017ecc | ||
|
|
ca301891db | ||
|
|
ce7536df9f | ||
|
|
424d11896a | ||
|
|
ae707d340b | ||
|
|
edefee46b2 | ||
|
|
77ac99a1d0 | ||
|
|
918708a227 | ||
|
|
3ba8cf4102 | ||
|
|
73db68b08b | ||
|
|
ecc4aa5571 | ||
|
|
a1a13708be | ||
|
|
c7c3da2038 | ||
|
|
eb9f3d3772 | ||
|
|
1a61790407 | ||
|
|
fe98fba5b5 | ||
|
|
ff3ad74fb4 | ||
|
|
7cf93278d3 | ||
|
|
1d9f2d2ce7 | ||
|
|
f109bd4a02 | ||
|
|
aeebf7fa95 | ||
|
|
c57ab693e4 | ||
|
|
af54608f62 | ||
|
|
f2d502faf8 | ||
|
|
6c1e146bc1 | ||
|
|
15d5eb858c | ||
|
|
ac1d7aa69f | ||
|
|
da4077f3b7 | ||
|
|
25f9f72366 | ||
|
|
7f04327625 | ||
|
|
dd25573ebc | ||
|
|
d9e54388e7 | ||
|
|
0b07780619 | ||
|
|
48cb0a1bb1 | ||
|
|
84f00e7cad | ||
|
|
a46a7458e1 | ||
|
|
c33aa5c969 | ||
|
|
0ee5fd1ac0 | ||
|
|
4eb8809a8a | ||
|
|
9315417935 | ||
|
|
1bb1b3886b | ||
|
|
9cd4f0c332 | ||
|
|
0d8510b8b3 | ||
|
|
6b57a8161c | ||
|
|
0a893d196e | ||
|
|
a0a09c23da | ||
|
|
1270b6717f | ||
|
|
d1f8b2ed17 | ||
|
|
765deae84d | ||
|
|
686068c8ed | ||
|
|
ec45cf04af | ||
|
|
b9931cda30 | ||
|
|
8a97d2717b | ||
|
|
b80f733cdb | ||
|
|
c6b0e61f44 | ||
|
|
b2a927cc5e | ||
|
|
b73324e800 | ||
|
|
23cbed3aac | ||
|
|
2bd6ad9963 | ||
|
|
ea3d66fda3 | ||
|
|
8acce4a7fc | ||
|
|
181eaefea8 | ||
|
|
5e73b88a8a | ||
|
|
5e6d0b79e3 | ||
|
|
bf362b9aba | ||
|
|
6b0d9214a9 | ||
|
|
9b57c67d3e | ||
|
|
7545323eba | ||
|
|
5eff9a50b6 | ||
|
|
7dc33c9247 | ||
|
|
6f48fc3c58 | ||
|
|
8558954da7 | ||
|
|
2ae41df23b | ||
|
|
47b8daf69c | ||
|
|
ef31a0de42 | ||
|
|
8c956d681b | ||
|
|
89eb44afbc | ||
|
|
9d7e32fb07 | ||
|
|
abb88d622a | ||
|
|
1ccdd75019 | ||
|
|
aaedafff52 | ||
|
|
3ccf5c0e50 | ||
|
|
f25a9832b8 | ||
|
|
11d5e2cdbb | ||
|
|
15f7a7db65 | ||
|
|
aec194ba61 | ||
|
|
63eb145772 | ||
|
|
db5fea922f | ||
|
|
0214d93299 | ||
|
|
1124a203cc | ||
|
|
e8fbf5fdbd | ||
|
|
8fd4ae1282 | ||
|
|
eab1b450d5 | ||
|
|
98fc30786e | ||
|
|
4cb8e239ae | ||
|
|
ea781293df | ||
|
|
0a2979360e | ||
|
|
0c75048e70 | ||
|
|
a07c004983 | ||
|
|
1018a0eda6 | ||
|
|
d1e4898924 | ||
|
|
a46c4bf04e | ||
|
|
d40667a798 | ||
|
|
0eca9e7401 | ||
|
|
b76af31155 | ||
|
|
426aeb0a7f | ||
|
|
8a222df60e | ||
|
|
4c79fcb6ed | ||
|
|
b27e55f4de | ||
|
|
a246cd044e | ||
|
|
880101f338 | ||
|
|
a2d0ff1328 | ||
|
|
5479b4db2b | ||
|
|
da0c86dd54 | ||
|
|
e9f29cd147 | ||
|
|
263448faa2 | ||
|
|
34396de03a | ||
|
|
f6fa17a3a8 | ||
|
|
1dceadba4c | ||
|
|
666c80877c | ||
|
|
4cb9aab9ce | ||
|
|
51593aafb2 | ||
|
|
5ced7e05f5 | ||
|
|
b97a662f2e | ||
|
|
9639c096ba | ||
|
|
e4af41e89a | ||
|
|
52e1717014 | ||
|
|
0ced5d2eaa | ||
|
|
ab8111bdeb | ||
|
|
8dc23ea1ce | ||
|
|
8a2e3d13f2 | ||
|
|
a29a0648ad | ||
|
|
63d471ec94 | ||
|
|
9fa3eac3aa | ||
|
|
a3ba78d7bd | ||
|
|
4b07be6bfd | ||
|
|
e320c50e49 | ||
|
|
524ad4e6dd | ||
|
|
e515d6f776 | ||
|
|
c137965dec | ||
|
|
a9e68e13a8 | ||
|
|
77fffda10e | ||
|
|
88fe5c641f | ||
|
|
da0309eb09 | ||
|
|
4e6f47d50a | ||
|
|
7e626ea219 | ||
|
|
8a6ccabffb | ||
|
|
f546ba85aa | ||
|
|
73e1d3b046 | ||
|
|
b2c8062131 | ||
|
|
6805a96e53 | ||
|
|
a92667c000 | ||
|
|
4a0619cadb | ||
|
|
a7e16d582d | ||
|
|
b3a4da5e4d | ||
|
|
5ea298a238 | ||
|
|
859c0915fb | ||
|
|
45fd96cd0d | ||
|
|
ffe2b3c24d | ||
|
|
b5b8d941f3 | ||
|
|
970561b956 | ||
|
|
9c3b53b701 | ||
|
|
6a69be88c5 | ||
|
|
3a918ae8f6 | ||
|
|
f668089e64 | ||
|
|
af6a08398e | ||
|
|
4d7def4311 | ||
|
|
ae960f5220 | ||
|
|
5be9ce1823 | ||
|
|
5693bbe1f5 | ||
|
|
e4267c5c56 | ||
|
|
99dfd42372 | ||
|
|
8d36924cb6 | ||
|
|
80d1e28d0f | ||
|
|
60132e9947 | ||
|
|
940b996e2d | ||
|
|
0055f479cb | ||
|
|
1c41b701dd | ||
|
|
e1e26d53e6 | ||
|
|
f9131832c7 | ||
|
|
ce14b5e9fb | ||
|
|
c40aa1f950 | ||
|
|
7d1d3d3f05 | ||
|
|
5e6a895fef | ||
|
|
d2fe2a7fc5 | ||
|
|
44a8025e0f | ||
|
|
71e392c1f9 | ||
|
|
416088a2de | ||
|
|
e57d11d55a | ||
|
|
781ae8d5c8 | ||
|
|
b01d45cf5c | ||
|
|
4941aaa5c1 | ||
|
|
07559a5aaa | ||
|
|
92f030887b | ||
|
|
9476f7f616 | ||
|
|
cbe405f6ea | ||
|
|
e18cf51c01 | ||
|
|
f32813951f | ||
|
|
7ba8fc256b | ||
|
|
c7972aa5e6 | ||
|
|
eaef38f79c | ||
|
|
7414bc492e | ||
|
|
6f14087a16 | ||
|
|
0700c60636 | ||
|
|
aac6e0521a | ||
|
|
7e25a80c5b | ||
|
|
328d4b916d | ||
|
|
596ff28207 | ||
|
|
70c1a37bbd | ||
|
|
4902276921 | ||
|
|
83cdeacaa8 | ||
|
|
e6e2f48f7e | ||
|
|
e316f613d0 | ||
|
|
9a8c87a43e | ||
|
|
67140f996b | ||
|
|
2f5d9ced6d | ||
|
|
3dfb116fdd | ||
|
|
eb1047a149 | ||
|
|
b42a8176ca | ||
|
|
2a9beec31d | ||
|
|
910fe6261b | ||
|
|
0c820b96d8 | ||
|
|
9689efedc4 | ||
|
|
97561f428e | ||
|
|
df0497fb58 | ||
|
|
30f0bdc754 | ||
|
|
c3c49a05c2 | ||
|
|
e72b878380 | ||
|
|
d51d8ad877 | ||
|
|
68a616d7c7 | ||
|
|
a0447de061 | ||
|
|
46db06a22b | ||
|
|
7984fdfd20 | ||
|
|
d637f03067 | ||
|
|
4c57c2a044 | ||
|
|
94b09c3fc0 | ||
|
|
de5ae4a05e | ||
|
|
517c5705b6 | ||
|
|
5d3e977761 | ||
|
|
c0d430f4e5 | ||
|
|
d910888181 | ||
|
|
db2dfee6ae | ||
|
|
d311d56bbf | ||
|
|
a33898c2a0 | ||
|
|
e6940d48e3 | ||
|
|
3bc5ef38d3 | ||
|
|
bac3b3a0dc | ||
|
|
07fded4da9 | ||
|
|
4f0a584efc | ||
|
|
1139fb39c5 | ||
|
|
4cd7c07344 | ||
|
|
a854e0ca8e | ||
|
|
de1766abde | ||
|
|
ebd005e1b1 | ||
|
|
9ba61037a4 | ||
|
|
c74b878372 | ||
|
|
01a566c794 | ||
|
|
5362a633e6 | ||
|
|
b2c3f45141 | ||
|
|
d5f9b5b74a | ||
|
|
95a2c74462 | ||
|
|
d217ef37bf | ||
|
|
95bea7f64a | ||
|
|
58b63a24c2 | ||
|
|
53c90cfc99 | ||
|
|
2043d1f439 | ||
|
|
61034d4dde | ||
|
|
6605bf35a8 | ||
|
|
b2b93e5060 | ||
|
|
098286fcaf | ||
|
|
a6f30412ad | ||
|
|
b624648115 | ||
|
|
9d1d74c022 | ||
|
|
0c79d1a619 | ||
|
|
1ea8eebfec | ||
|
|
1dcc03aae0 | ||
|
|
3be9535225 | ||
|
|
8cad83a9dc | ||
|
|
0488495a34 | ||
|
|
a5eb8ce21e | ||
|
|
1dbcd4ee6e | ||
|
|
7e1f024d28 | ||
|
|
4a353896e3 | ||
|
|
eaa12de740 | ||
|
|
0e4372b4a3 | ||
|
|
b0c31ae486 | ||
|
|
a43e4b8aa7 | ||
|
|
ce3f80144a | ||
|
|
cd33cd66ae | ||
|
|
f2a2c2d407 | ||
|
|
5f0481c067 | ||
|
|
f30f3ac37b | ||
|
|
d31ed1f2e1 | ||
|
|
cf67d606ae | ||
|
|
76b859f6ba | ||
|
|
a326e301f0 | ||
|
|
a16ae7dadc | ||
|
|
ac47375aba | ||
|
|
857054179c | ||
|
|
fd5a87eedf | ||
|
|
4770b0d3e3 | ||
|
|
181ec4633b | ||
|
|
dc5e5c6c08 | ||
|
|
dcdf423d66 | ||
|
|
1a19c3b3a5 | ||
|
|
0a3fcfd9f4 | ||
|
|
49ac180329 | ||
|
|
0271aa5414 | ||
|
|
880b3290e8 | ||
|
|
a0364f0758 | ||
|
|
ed693e89c9 | ||
|
|
526957e0ac | ||
|
|
3341eb5f2c | ||
|
|
51fba42b83 | ||
|
|
12f5327e0e | ||
|
|
40f9fac1a5 | ||
|
|
0b5e924a21 | ||
|
|
cd312f1348 | ||
|
|
e480f616e0 | ||
|
|
2285a94958 | ||
|
|
7f1356a447 | ||
|
|
420a43cdd5 | ||
|
|
1aab88859d | ||
|
|
3210fce113 | ||
|
|
0a1b026d92 | ||
|
|
29e1bf3f2e | ||
|
|
333a38978e | ||
|
|
91c7b46d52 | ||
|
|
870d51bf10 | ||
|
|
7c0f41c785 | ||
|
|
647d3391bb | ||
|
|
0d24f34d83 | ||
|
|
a68a32d9b6 | ||
|
|
8a89054c2f | ||
|
|
cd46d08afd | ||
|
|
5e8ccda522 | ||
|
|
78d0e67987 | ||
|
|
62fc38078c | ||
|
|
bc4f844cd8 | ||
|
|
d73cd5ed27 | ||
|
|
2bf3d3a9c5 | ||
|
|
e3b64387a5 | ||
|
|
bd0454309f | ||
|
|
a72fa8038f | ||
|
|
f15f8e3295 | ||
|
|
604c671d41 | ||
|
|
6130bebbb3 | ||
|
|
9f944c043f | ||
|
|
092b3214c5 | ||
|
|
07dfef48be | ||
|
|
e9571fc2e2 | ||
|
|
db3a83d163 | ||
|
|
22f7ccc11d | ||
|
|
ea53b3faba | ||
|
|
645ccb2f87 | ||
|
|
b40cc02e2a | ||
|
|
98418272ab | ||
|
|
a32cc879cc | ||
|
|
adf329cf1a | ||
|
|
4bd5009ec1 | ||
|
|
74a9b4c058 | ||
|
|
8ee749f137 | ||
|
|
46fa404d83 | ||
|
|
cb8f5de5af | ||
|
|
3c7c5380f4 | ||
|
|
04d611e1c2 | ||
|
|
2d813b2191 | ||
|
|
f1bf549e0f | ||
|
|
d3a3ad5cbd | ||
|
|
8091a46005 | ||
|
|
18cffc4678 | ||
|
|
c1d01fb1e1 | ||
|
|
4d0c84bcf5 | ||
|
|
8db5c27d81 | ||
|
|
2ff36d81a1 | ||
|
|
56feff0455 | ||
|
|
cf17bcb15c | ||
|
|
b2d3abd9d6 | ||
|
|
a54cb7d3e4 | ||
|
|
00549c267f | ||
|
|
f41bfdb8eb | ||
|
|
ca085b9aaa | ||
|
|
42df37bb21 | ||
|
|
c23c986543 | ||
|
|
2190d87dc9 | ||
|
|
eefdba947c | ||
|
|
b9afd55856 | ||
|
|
147eb7a9e5 | ||
|
|
81ab861036 | ||
|
|
e6014dd0e9 | ||
|
|
ac030b7275 | ||
|
|
9370747479 | ||
|
|
45efd9290e | ||
|
|
96edba7eec | ||
|
|
6751b97db9 | ||
|
|
927b05713a | ||
|
|
8f23ff7274 | ||
|
|
158e883e47 | ||
|
|
7faa364c53 | ||
|
|
e62e8e372c | ||
|
|
568e2a9337 | ||
|
|
77756eb08d | ||
|
|
8b097af195 | ||
|
|
81ff77c2d5 | ||
|
|
bb65cd1976 | ||
|
|
1086c00929 | ||
|
|
9aaa9ce8aa | ||
|
|
cb5a6d29e2 | ||
|
|
4d8bd8805b | ||
|
|
d9b9f0b3d3 | ||
|
|
c8c57b545a | ||
|
|
d0f7a317e4 | ||
|
|
3517a8f494 | ||
|
|
aa9ed2e863 | ||
|
|
075f7fc19e | ||
|
|
ea7ea2ec59 | ||
|
|
64b183da36 | ||
|
|
54c6c4e547 | ||
|
|
986b48cf36 | ||
|
|
3bb9b03add | ||
|
|
f05aa674ab | ||
|
|
965bdc9986 | ||
|
|
edce19e406 | ||
|
|
1687f20760 | ||
|
|
2917d335bc | ||
|
|
329c070e05 | ||
|
|
30e90619f5 | ||
|
|
d53dc28b83 | ||
|
|
3446b38cbb | ||
|
|
f3a4104fd0 | ||
|
|
bb793d71e7 | ||
|
|
82e8ab2385 | ||
|
|
c9260c4966 | ||
|
|
587fb27484 | ||
|
|
7f305962f2 | ||
|
|
f6edb48df9 | ||
|
|
e793138031 | ||
|
|
5c2992ef16 | ||
|
|
d734bfc34f | ||
|
|
86d5a1d190 | ||
|
|
cb713e32d3 | ||
|
|
84fe0737de | ||
|
|
4ea636366d | ||
|
|
54f5b59c8c | ||
|
|
657b6a9fae | ||
|
|
6c01241b96 | ||
|
|
961073ec96 | ||
|
|
e2b786d97b | ||
|
|
2fbf9ab7be | ||
|
|
68a23c4918 | ||
|
|
b49dbcdbbe | ||
|
|
ee2f74dc5e | ||
|
|
81630a096f | ||
|
|
21780d8106 | ||
|
|
b7b4364db2 | ||
|
|
d9859de756 | ||
|
|
5e6fd0d1e1 | ||
|
|
a91d7cdd72 | ||
|
|
d00dc3b03a | ||
|
|
f5c69bae30 | ||
|
|
89fe17f419 | ||
|
|
c491257359 | ||
|
|
8a2f988be6 | ||
|
|
83c0b70a2d | ||
|
|
b7082c0eb4 | ||
|
|
61e2a07ee2 | ||
|
|
dd5e514d92 | ||
|
|
2532e40f9c | ||
|
|
50236ae4e5 | ||
|
|
04c36018d6 | ||
|
|
1273421498 | ||
|
|
7bd34cb1da | ||
|
|
d99dd4b875 | ||
|
|
c99eb98001 | ||
|
|
a29201a248 | ||
|
|
6f0c59d7be | ||
|
|
844e8b2f77 | ||
|
|
5a0a9e3a1c | ||
|
|
a6ed5667ab | ||
|
|
53da7140c2 | ||
|
|
eb87229ee9 | ||
|
|
0b852faf00 | ||
|
|
ce9e033551 | ||
|
|
eefe3a9c6e | ||
|
|
06535c8eac | ||
|
|
651867055c | ||
|
|
8c7e49dd54 | ||
|
|
612c4293d1 | ||
|
|
8007b22b85 | ||
|
|
35664d818d | ||
|
|
aa9f2c9a3c | ||
|
|
5764befa46 | ||
|
|
29462b83ff | ||
|
|
129a49a60b | ||
|
|
0da30f4623 | ||
|
|
69bcebdf86 | ||
|
|
c0d749b1e2 | ||
|
|
e6bcced213 | ||
|
|
3706d2e1db | ||
|
|
03bda9422d | ||
|
|
f89b4e9336 | ||
|
|
cd510b43b1 | ||
|
|
0c8f727bd8 | ||
|
|
ad18449753 | ||
|
|
1fe08f49c7 | ||
|
|
48b007543a | ||
|
|
d52ece745e | ||
|
|
0f75f789d8 | ||
|
|
bc9098bc22 | ||
|
|
76f1650109 | ||
|
|
c636e6909b | ||
|
|
b5b1b94a9d | ||
|
|
b87aeb9b95 | ||
|
|
5f0e4e81f0 | ||
|
|
7306feb6ef | ||
|
|
dccb3ac6c6 | ||
|
|
89cd2106ed | ||
|
|
74f991b8c5 | ||
|
|
dcf79d9119 | ||
|
|
911867d5a5 | ||
|
|
3600875707 | ||
|
|
8052d75957 | ||
|
|
cc2624d08e | ||
|
|
e72cfff7bb | ||
|
|
a43e6e06e0 | ||
|
|
dc0af0a419 | ||
|
|
868942e202 | ||
|
|
3fef2b68dc | ||
|
|
404cb4c7a6 | ||
|
|
a966b95a5b | ||
|
|
15f05b602f | ||
|
|
9e51d3f250 | ||
|
|
d7ca248bc8 | ||
|
|
3980b2f2ff | ||
|
|
bed9fcea46 | ||
|
|
b1b82857ba | ||
|
|
0b09272a60 | ||
|
|
f9129bd54e | ||
|
|
c0f3dff0f6 | ||
|
|
6ca8535166 | ||
|
|
ff4a429136 | ||
|
|
9a5cea2b23 | ||
|
|
cd1a68f15e | ||
|
|
a0bed51d96 | ||
|
|
857dec38d1 | ||
|
|
8f6484e470 | ||
|
|
5413b37d71 | ||
|
|
869dcf73f8 | ||
|
|
96a34d1ad7 | ||
|
|
26fc652d33 | ||
|
|
766361ac83 | ||
|
|
fc8c96399f | ||
|
|
9bad713db5 | ||
|
|
6f222ab02b | ||
|
|
9bd7509e87 | ||
|
|
e47596383a | ||
|
|
7487c92a52 | ||
|
|
29cc9da934 | ||
|
|
eaeb324c74 | ||
|
|
9f7acd4cf9 | ||
|
|
d9a0de20f8 | ||
|
|
eb11337f7d | ||
|
|
d2872539e3 | ||
|
|
1a5b024df6 | ||
|
|
578d65dfb4 | ||
|
|
db4c2d3dd5 | ||
|
|
47842a1611 | ||
|
|
f4f4cd9b1f | ||
|
|
b7452cc281 | ||
|
|
92653f3deb | ||
|
|
c526ab1870 | ||
|
|
1c7d840ff6 | ||
|
|
8ba91fc9dd | ||
|
|
09b03465d8 | ||
|
|
c8d9b3f8fc | ||
|
|
c9d19cbe56 | ||
|
|
10ae0bce65 | ||
|
|
7bc15245aa | ||
|
|
cb6228800b | ||
|
|
6ef899d000 | ||
|
|
6353f4ff09 | ||
|
|
fb673107f3 | ||
|
|
bb1af390a7 | ||
|
|
f65cd6245d | ||
|
|
530b2a51d5 | ||
|
|
d51e7cbb51 | ||
|
|
f244fe1855 | ||
|
|
293db76bd6 | ||
|
|
5b257b2b57 | ||
|
|
4e04f5e967 | ||
|
|
29f0ded88b | ||
|
|
6c4882b907 | ||
|
|
45e6accd2a | ||
|
|
51b19fcff4 | ||
|
|
c4cfaab621 | ||
|
|
8bf27bf76b | ||
|
|
ccb132374b | ||
|
|
c82afc8c46 | ||
|
|
08e0ed4fc6 | ||
|
|
261d9f8ebc | ||
|
|
948ad86049 | ||
|
|
ed659da488 | ||
|
|
1294f68265 | ||
|
|
0e771a6c1b | ||
|
|
a8227453fc | ||
|
|
225eda7176 | ||
|
|
dd37247e65 | ||
|
|
295cd3670f | ||
|
|
e4df0c6da1 | ||
|
|
2a421deaa3 | ||
|
|
7b23b6db6f | ||
|
|
5ca038d888 | ||
|
|
caf93da26a | ||
|
|
3454e34c7c | ||
|
|
619a80228f | ||
|
|
89de1beb6f | ||
|
|
b6442b4640 | ||
|
|
be412faf6c | ||
|
|
fd3a699ad8 | ||
|
|
4c99cea3e4 | ||
|
|
1d54ef57c7 | ||
|
|
673b225da2 | ||
|
|
c3fe137720 | ||
|
|
c28aa299bd | ||
|
|
b2189ae965 | ||
|
|
a3504dac6e | ||
|
|
a028b566ed | ||
|
|
ca2405c104 | ||
|
|
08f4ae04e1 | ||
|
|
83d69ba507 | ||
|
|
63cb34b563 | ||
|
|
271e42176c | ||
|
|
e5647793ce | ||
|
|
b87e45ce32 | ||
|
|
903b5aebca | ||
|
|
7492dcc9e6 | ||
|
|
5d2b162bea | ||
|
|
3fce90dbb9 | ||
|
|
d40b9324ca | ||
|
|
6875935d37 | ||
|
|
8978012f9d | ||
|
|
7cf4a5da87 | ||
|
|
47b67331d4 | ||
|
|
6e14601c7c | ||
|
|
3546ac2854 | ||
|
|
d600cdd8a0 | ||
|
|
d2c6e27d07 | ||
|
|
8041ced02d | ||
|
|
d81056cbe7 | ||
|
|
44e8a012e2 | ||
|
|
30483dacfb | ||
|
|
9d81d95700 | ||
|
|
e6b45d4cdb | ||
|
|
c2e28b5d94 | ||
|
|
fef7ead0d5 | ||
|
|
06aef0587a | ||
|
|
bf7c259cdd | ||
|
|
43d76e5990 | ||
|
|
ffde310d30 | ||
|
|
44bc7dd9a5 | ||
|
|
9e5b64e1b7 | ||
|
|
2599073f56 | ||
|
|
a2d49f9981 | ||
|
|
877a9d510b | ||
|
|
2455d0b859 | ||
|
|
b3c3afc2b4 | ||
|
|
3f97d19381 | ||
|
|
3ab3d49055 | ||
|
|
bd89cc0287 | ||
|
|
d365a52cd6 | ||
|
|
5e38e054a7 | ||
|
|
317f6d5c87 | ||
|
|
c876776a25 | ||
|
|
e1c7115d8c | ||
|
|
bb4d75aff0 | ||
|
|
c5dbd04c9c | ||
|
|
2a8a72a085 | ||
|
|
29c46a15f9 | ||
|
|
aae3fe5305 | ||
|
|
2743785aaf | ||
|
|
abc378c727 | ||
|
|
79fc16eeb7 | ||
|
|
2a235917dc | ||
|
|
c9e9341b4a | ||
|
|
da247c61b7 | ||
|
|
2cd2e6dd19 | ||
|
|
e442bce607 | ||
|
|
f7664a2d7e | ||
|
|
8a5c8d0db5 | ||
|
|
bcd5b713f8 | ||
|
|
a9488ba3c9 | ||
|
|
be13e3494a | ||
|
|
a62d65a9b8 | ||
|
|
44ce6774dc | ||
|
|
b911d7f78f | ||
|
|
4644176e26 | ||
|
|
df6759b033 | ||
|
|
bf8bac2bcc | ||
|
|
37def02ee1 | ||
|
|
09dfb25d73 | ||
|
|
850b98337b | ||
|
|
7f2921f26b | ||
|
|
836017f2b9 | ||
|
|
ed22f395ba | ||
|
|
bcbc7c1d47 | ||
|
|
1445d6d24a | ||
|
|
4de4763baf | ||
|
|
8362fe1b39 | ||
|
|
258dc16cfd | ||
|
|
8f8e796c77 | ||
|
|
a39a98cda9 | ||
|
|
90ba39593a | ||
|
|
c3061a19a2 | ||
|
|
e11a6163dd | ||
|
|
1b752c35cc | ||
|
|
8b9d3541dd | ||
|
|
dff7d70f0a | ||
|
|
e763381186 | ||
|
|
d4f49b10d7 | ||
|
|
5ba39c0086 | ||
|
|
b5db6fe186 | ||
|
|
8d2886e1ca | ||
|
|
965ebd0f03 | ||
|
|
cb306b0793 | ||
|
|
c5dc08e082 | ||
|
|
b00c6dd89b | ||
|
|
2fd28ca5c8 | ||
|
|
14a05ddaca | ||
|
|
209654fdff | ||
|
|
f30aa02e7c | ||
|
|
dd4374229b | ||
|
|
7eedf37149 | ||
|
|
7aea32f48b | ||
|
|
ac38f7b909 | ||
|
|
2c3f1c28e5 | ||
|
|
e8ee5ad691 | ||
|
|
5322f5f707 | ||
|
|
408f5055a9 | ||
|
|
6bfae2652f | ||
|
|
9036370d67 | ||
|
|
9bc730866f | ||
|
|
a2d3f987c0 | ||
|
|
5a271b8fde | ||
|
|
f43a5cb244 | ||
|
|
bf4ac3ad7a | ||
|
|
4f0e73ba97 | ||
|
|
f28a91969a | ||
|
|
ca285f5e53 | ||
|
|
34f2552cad | ||
|
|
c8720b1524 | ||
|
|
4238266ea3 | ||
|
|
230d19a7aa | ||
|
|
d2b7843d97 | ||
|
|
9351d47948 | ||
|
|
bf98ee3c93 | ||
|
|
dbba894544 | ||
|
|
52673152cc | ||
|
|
42295ef2ac | ||
|
|
a8a4f2101d | ||
|
|
f46bd8b6ba | ||
|
|
d4e1d4ec38 | ||
|
|
f517dc05ef | ||
|
|
a627de02c7 | ||
|
|
a94a0589dd | ||
|
|
81755a280d | ||
|
|
89d776acb5 | ||
|
|
daf660e66d | ||
|
|
e4020faff3 | ||
|
|
e11b727584 | ||
|
|
0a36a94b73 | ||
|
|
89e7cb19b9 | ||
|
|
fa2bdcd5ac | ||
|
|
ea71c9b214 | ||
|
|
c00e397405 | ||
|
|
a2a2640d29 | ||
|
|
7c4a104823 | ||
|
|
7892ec5a59 | ||
|
|
e5fd1f76db | ||
|
|
554ebebb92 | ||
|
|
f604cf4988 | ||
|
|
9de0e9157a | ||
|
|
b1be47f0a0 | ||
|
|
6502f21072 | ||
|
|
a9e21702aa | ||
|
|
48fd65d7f8 | ||
|
|
c1b0e176e5 | ||
|
|
e2d370bd9d | ||
|
|
2fe8291f1d | ||
|
|
1d1732ab4a | ||
|
|
1010ccca4d | ||
|
|
c21ff85b57 | ||
|
|
c3bb4d2a61 | ||
|
|
d2b7f8ef0f | ||
|
|
af25588b88 | ||
|
|
7546ef649c | ||
|
|
2a3bf1d994 | ||
|
|
450657f871 | ||
|
|
664192da0b | ||
|
|
9fc3e220a7 | ||
|
|
64f6a69d9a | ||
|
|
16734b1d88 | ||
|
|
31106c91fb | ||
|
|
026a427103 | ||
|
|
7a4f36c00e | ||
|
|
1f3ef4ffe1 | ||
|
|
c364836a9d | ||
|
|
97a12075b1 | ||
|
|
bafb1372a7 | ||
|
|
b4f032fab4 | ||
|
|
d36d944b3a | ||
|
|
7af22453ba | ||
|
|
d0c4b5bc76 | ||
|
|
4f194aa101 | ||
|
|
ef4bfde4a8 | ||
|
|
65a1245a03 | ||
|
|
486e4f8dd3 | ||
|
|
4cfbd8a9d2 | ||
|
|
7ab51b8960 | ||
|
|
18cbd96280 | ||
|
|
2cdea69719 | ||
|
|
6c053b6266 | ||
|
|
20eea9914e | ||
|
|
6d3f4f5a04 | ||
|
|
20e782eb21 | ||
|
|
e30fa57ab4 | ||
|
|
ef0b07d5c4 | ||
|
|
b9b1ec8f41 | ||
|
|
019526fbe9 | ||
|
|
a4cd5bd424 | ||
|
|
421593c0ba | ||
|
|
91ad85aec1 | ||
|
|
d1eacc1d1c | ||
|
|
e41dd8a0f1 | ||
|
|
5e1d4f215d | ||
|
|
9a7bb81cd0 | ||
|
|
321bb010cb | ||
|
|
e24a79f87b | ||
|
|
2dd0add3e7 | ||
|
|
ce279ca360 | ||
|
|
fcf606acde | ||
|
|
084907eeca | ||
|
|
f8487f581b | ||
|
|
40c9559d9e | ||
|
|
531e0ef918 | ||
|
|
2781655b0a | ||
|
|
64add90edd | ||
|
|
8de93d35ed | ||
|
|
eb844e3260 | ||
|
|
cedd2d1daf | ||
|
|
81d04fb31f | ||
|
|
caba6fb01e | ||
|
|
1c8d44b309 | ||
|
|
984098abce | ||
|
|
ead6da4760 | ||
|
|
2ab96587ef | ||
|
|
cb9c0e79eb | ||
|
|
96d2b2d6b8 | ||
|
|
b699b5fef5 | ||
|
|
b374ff4d6d | ||
|
|
149b136e0b | ||
|
|
5389663b72 | ||
|
|
a610c5c8c6 | ||
|
|
874cf18566 | ||
|
|
53cb0826bc | ||
|
|
6904f38ea2 | ||
|
|
223ff4ebff | ||
|
|
d2ec3e7d9a | ||
|
|
b00171366f | ||
|
|
7079a4e7e4 | ||
|
|
4e817a1109 | ||
|
|
d185d4e4cc | ||
|
|
3b574875cb | ||
|
|
4d5048435c | ||
|
|
57df7f8dfe | ||
|
|
74b36fbd98 | ||
|
|
8ea56d3b22 | ||
|
|
019f585c83 | ||
|
|
19b7f0747a | ||
|
|
c7c9bd6b08 | ||
|
|
b132f04f71 | ||
|
|
2f21f293c1 | ||
|
|
5b3c390e08 | ||
|
|
8a93371baa | ||
|
|
95dcae1a85 | ||
|
|
03e2ff587e | ||
|
|
1ea73a67ca | ||
|
|
1d32420a27 | ||
|
|
53dd9a35a0 | ||
|
|
0b35927b16 | ||
|
|
bbbe83b737 | ||
|
|
06f06ce390 | ||
|
|
cc4c52c998 | ||
|
|
bd09e5b11c | ||
|
|
181f62c15e | ||
|
|
1ff306ff40 | ||
|
|
c4e17ff847 | ||
|
|
3ae5ec92a5 | ||
|
|
2fe919b6ce | ||
|
|
a8ab3ffd01 | ||
|
|
f3c9a4a81c | ||
|
|
cd0aad10b0 | ||
|
|
da2cb61cae | ||
|
|
e4c691fd5f | ||
|
|
ea2e560bd9 | ||
|
|
25321984fa | ||
|
|
24ebc73ee5 | ||
|
|
d6e080d546 | ||
|
|
f5f16aac96 | ||
|
|
5c6f30a8a9 | ||
|
|
e8e8ae9fd7 | ||
|
|
3353ead5d3 | ||
|
|
160beb8e1c | ||
|
|
3f0d3ffb8a | ||
|
|
13c770b6be | ||
|
|
2eb55528ec | ||
|
|
839f631d6b | ||
|
|
8faae71157 | ||
|
|
b87e0fa124 | ||
|
|
d1037c6c9a | ||
|
|
bb205a5cdb | ||
|
|
6e73d8b3ab | ||
|
|
82a2dd8732 | ||
|
|
7e3c9c1094 | ||
|
|
695cb6d76b | ||
|
|
dbb2d8462b | ||
|
|
3bf96c6cd7 | ||
|
|
61375c4bbb | ||
|
|
2e4689d557 | ||
|
|
b6596d021b | ||
|
|
0628dc9b2f | ||
|
|
3117080be3 | ||
|
|
16d6e11e94 | ||
|
|
c9a3164a29 | ||
|
|
790aa0d24b | ||
|
|
d254340b9b | ||
|
|
42a3117e2a | ||
|
|
e47dcb10de | ||
|
|
8a7dcf8a80 | ||
|
|
0c30ffa11f | ||
|
|
0904bf6446 | ||
|
|
2173ed504d | ||
|
|
4583787759 | ||
|
|
17550a5f4b | ||
|
|
a4558c32b2 | ||
|
|
ef4fef3d56 | ||
|
|
3dbbc6a223 | ||
|
|
d3696f5223 | ||
|
|
b8a8b76c38 | ||
|
|
296e6171a1 | ||
|
|
2d7d137abd | ||
|
|
336adbd056 | ||
|
|
32bfe334c0 | ||
|
|
c1c4fb2ca4 | ||
|
|
6c9dc9ae51 | ||
|
|
6ab575cd49 | ||
|
|
c9274307f2 | ||
|
|
2489c46a7f | ||
|
|
f4b619d1d1 | ||
|
|
255c8a083e | ||
|
|
d0700172fa | ||
|
|
83ce927d16 | ||
|
|
809774d87c | ||
|
|
6f3f89a0d3 | ||
|
|
a870a1c6bc | ||
|
|
e04938666c | ||
|
|
c0eb3c53c1 | ||
|
|
b6443e0c01 | ||
|
|
83922c5737 | ||
|
|
78cd6f36ef | ||
|
|
eed4e09282 | ||
|
|
aaa15b403a | ||
|
|
82f1f5d0cf | ||
|
|
2b0452207e | ||
|
|
bc67d0b7b7 | ||
|
|
a8092ace32 | ||
|
|
12d76e4f20 | ||
|
|
c60130e534 | ||
|
|
3eeeb27d70 | ||
|
|
c2a179e9dd | ||
|
|
8b6f7b4e4c | ||
|
|
ce7097b498 | ||
|
|
1ae369855b | ||
|
|
60404a6564 | ||
|
|
519ea854d5 | ||
|
|
e66d0e4f74 | ||
|
|
9e0ec2b03c | ||
|
|
36e501b457 | ||
|
|
284f47e76c | ||
|
|
b47f8fd784 | ||
|
|
37a8addf52 | ||
|
|
a6fb88d74c | ||
|
|
bb43b2853d | ||
|
|
ba1585de34 | ||
|
|
6684812014 | ||
|
|
1419700c43 | ||
|
|
14f6249031 | ||
|
|
ea249c33fd | ||
|
|
1c0b410f55 | ||
|
|
1eaea5c81c | ||
|
|
64ec206ecb | ||
|
|
e7afea4cb7 | ||
|
|
6d6271d6c9 | ||
|
|
1f1d4e2def | ||
|
|
91c4253f06 | ||
|
|
cbb0c98f98 | ||
|
|
aaf9f57459 | ||
|
|
2006e5e51e | ||
|
|
741a5b275b | ||
|
|
eb4376b649 | ||
|
|
b1e5ebab8f | ||
|
|
8bd6296721 | ||
|
|
ae5c68368b | ||
|
|
4fdb0f48ec | ||
|
|
c4207f640b | ||
|
|
f6e477b4f5 | ||
|
|
7ae47b50b8 | ||
|
|
0b14155a75 | ||
|
|
f1fed76273 | ||
|
|
bc6db547d6 | ||
|
|
48813161f6 | ||
|
|
a006904724 | ||
|
|
5477ce3c39 | ||
|
|
f38d7811e3 | ||
|
|
a09f1b8666 | ||
|
|
c7071752a7 | ||
|
|
e2de22bdce | ||
|
|
100f6603f2 | ||
|
|
5382a2a15e | ||
|
|
29163a41c2 | ||
|
|
0a9d4ea17b | ||
|
|
f05138df62 | ||
|
|
6e67e1a849 | ||
|
|
3401f38edc | ||
|
|
76a2e7f8e5 | ||
|
|
3f142dd0fa | ||
|
|
22b4f87232 | ||
|
|
ca5823fcdf | ||
|
|
49fc74be5d | ||
|
|
25f50d74c5 | ||
|
|
266f4d6806 | ||
|
|
a6a9814c06 | ||
|
|
5a8d3ddef0 | ||
|
|
b082da73a1 | ||
|
|
99dcbe0207 | ||
|
|
75b22e9a23 | ||
|
|
c4f8c1b296 | ||
|
|
eecefdc4fa | ||
|
|
ded99502ae | ||
|
|
02b95f95a8 | ||
|
|
2a6d2d733e | ||
|
|
6976c7f386 | ||
|
|
7702175130 | ||
|
|
c2e43cc781 | ||
|
|
6f6a3566ac | ||
|
|
3434610349 | ||
|
|
bcac70b2ab | ||
|
|
369438a46d | ||
|
|
aed8969498 | ||
|
|
4a8781f4d9 | ||
|
|
bff9d0560d | ||
|
|
36f8eb71f3 | ||
|
|
f7982ede73 | ||
|
|
92804151a3 | ||
|
|
0f2caf1cb6 | ||
|
|
06442d5aa2 | ||
|
|
8a81f37d22 | ||
|
|
125547f08f | ||
|
|
0d24be4c05 | ||
|
|
30c89b33fe | ||
|
|
7479ff4b06 | ||
|
|
9801e9c29a | ||
|
|
821f40882f | ||
|
|
02ce9868a7 | ||
|
|
6f870e11ff | ||
|
|
a8f2ff4531 | ||
|
|
eaa3baab3c | ||
|
|
77bce8b1e8 | ||
|
|
6480282826 | ||
|
|
6197ad5090 | ||
|
|
b477e40d3c | ||
|
|
7c8eae3735 | ||
|
|
f8cc7ce328 | ||
|
|
553c29ab8a | ||
|
|
1a5881b1d0 | ||
|
|
071c4c1412 | ||
|
|
03b31652a2 | ||
|
|
852bc4887a | ||
|
|
fa124aeb8b | ||
|
|
258335cc65 | ||
|
|
bdebca94b3 | ||
|
|
f85bad3388 | ||
|
|
e9b0289eff | ||
|
|
40984e201e | ||
|
|
76bf987203 | ||
|
|
3b42abef44 | ||
|
|
26f0737c60 | ||
|
|
ac94242875 | ||
|
|
54bfa627f0 | ||
|
|
36c058188a | ||
|
|
5306a45093 | ||
|
|
a292cccb63 | ||
|
|
5ccd9877b4 | ||
|
|
7108ec41b5 | ||
|
|
5188d56b4a | ||
|
|
8f7ed66544 | ||
|
|
c99b9262a8 | ||
|
|
2ccbaf9143 | ||
|
|
d54ab2733c | ||
|
|
2f18d0d709 | ||
|
|
41c75a808a | ||
|
|
1e55853036 | ||
|
|
931ed0eb00 | ||
|
|
9342bbef56 | ||
|
|
aaae404b2a | ||
|
|
f3a8b4625f | ||
|
|
4021020d3b | ||
|
|
2569e8c0a4 | ||
|
|
dcaeb18870 | ||
|
|
30fe14c0ff | ||
|
|
089b3d6e6d | ||
|
|
17b90f8381 | ||
|
|
f9c62fc23b | ||
|
|
900867df02 | ||
|
|
12ab8b03d9 | ||
|
|
50599487f8 | ||
|
|
2b53e9d86a | ||
|
|
23270c60bc | ||
|
|
2cb6709323 | ||
|
|
917bc03a43 | ||
|
|
d71e35893d | ||
|
|
efd277e7ed | ||
|
|
dbe3446b63 | ||
|
|
d3d3972bea | ||
|
|
5285735c7a | ||
|
|
b84e7013d2 | ||
|
|
9bc5414b44 | ||
|
|
6e28683411 | ||
|
|
b27a8afc3b | ||
|
|
662251e208 | ||
|
|
e314a5e333 | ||
|
|
a0c165c418 | ||
|
|
c604c2de98 | ||
|
|
d6107025fa | ||
|
|
a7ecfb68c1 | ||
|
|
188d27159d | ||
|
|
2af534eea4 | ||
|
|
db193a46e8 | ||
|
|
808bb9a958 | ||
|
|
eca8ea1eb6 | ||
|
|
d9681e1791 | ||
|
|
7f96363ecb | ||
|
|
04c340627d | ||
|
|
c1c6c1cf30 | ||
|
|
5bb7b0dda5 | ||
|
|
61edd5588e | ||
|
|
e1c993c277 | ||
|
|
15abd4d053 | ||
|
|
a7376b36f8 | ||
|
|
d2b61762b7 | ||
|
|
a5e38f6f99 | ||
|
|
4988b585f8 | ||
|
|
3b5fb07c3d | ||
|
|
ddf8d6ad6b | ||
|
|
182edef28a | ||
|
|
97cffa048e | ||
|
|
c5d46591fe | ||
|
|
38f03855eb | ||
|
|
0d8421e7ab | ||
|
|
43301bee8b | ||
|
|
36b0ebf54c | ||
|
|
e7f83fb695 | ||
|
|
ab4b75fe30 | ||
|
|
b35f708c07 | ||
|
|
0e6150720c | ||
|
|
44adf03d2c | ||
|
|
9ae5edaa74 | ||
|
|
14c6c796e8 | ||
|
|
2d6c306ae1 | ||
|
|
b2ab087313 | ||
|
|
22daef0b51 | ||
|
|
067029eebe | ||
|
|
5d72f9d224 | ||
|
|
4dd235124d | ||
|
|
04c03d7ab7 | ||
|
|
fd8affdc8a | ||
|
|
e49f0cebf1 | ||
|
|
237b598264 | ||
|
|
f566c39026 | ||
|
|
6361e4efdc | ||
|
|
cfa86bd4fe | ||
|
|
a56bc47a81 | ||
|
|
80784433b8 | ||
|
|
ab9bc35f9f | ||
|
|
f3d6d1e43b | ||
|
|
8b2f7f0e64 | ||
|
|
76710e453e | ||
|
|
6801490e3b | ||
|
|
a15bfdfb46 | ||
|
|
1a695159e3 | ||
|
|
ee823b8326 | ||
|
|
b461c8cc99 | ||
|
|
adb31b71f8 | ||
|
|
57178e72a4 | ||
|
|
52ca1e7d06 | ||
|
|
b8317a562c | ||
|
|
8040ad8c03 | ||
|
|
c628aa5be8 | ||
|
|
1370d4a43c | ||
|
|
f22aa6d94a | ||
|
|
bdfd2f0787 | ||
|
|
673d10c6c4 | ||
|
|
e54033f4e4 | ||
|
|
bfeca2cd7c | ||
|
|
41de169dd2 | ||
|
|
b036e78d85 | ||
|
|
4e8c6fb7c0 | ||
|
|
134835c870 | ||
|
|
5ade90debf | ||
|
|
bb0aeb39e3 | ||
|
|
dc0f655781 | ||
|
|
94be46d065 | ||
|
|
a5acc3b27e | ||
|
|
ee927ad6dc | ||
|
|
b71e8970fe | ||
|
|
0c438ad8e9 | ||
|
|
31c2cfa53c | ||
|
|
23ce0af2e8 | ||
|
|
0014be5242 | ||
|
|
7c6fe5f244 | ||
|
|
3e5ae811bf | ||
|
|
5df5e63afe | ||
|
|
545f0bd4b0 | ||
|
|
8ffe111086 | ||
|
|
1cd64a1c4e | ||
|
|
098c650655 | ||
|
|
e52092c6d4 | ||
|
|
fc98a260d6 | ||
|
|
613fe5d35a | ||
|
|
f5b90af6d0 | ||
|
|
bf86e5979b | ||
|
|
dae8ee4afc | ||
|
|
89911e7caf | ||
|
|
72f3971ca2 | ||
|
|
0fc266fe80 | ||
|
|
f91ebd93d2 | ||
|
|
dea627f02c | ||
|
|
3c0f992e76 | ||
|
|
5f2f4bb7ef | ||
|
|
92a32fe380 | ||
|
|
a0fc78f9e6 | ||
|
|
3ade542d81 | ||
|
|
0e2ff6a6da | ||
|
|
0c9a778736 | ||
|
|
d1ef19f08a | ||
|
|
e6e10308ff | ||
|
|
d48c57917c | ||
|
|
40347e4cb8 | ||
|
|
33c16e562b | ||
|
|
cb5ee9c8a1 | ||
|
|
c3b44e835d | ||
|
|
c380b77617 | ||
|
|
7fafd94e39 | ||
|
|
89a75e7800 | ||
|
|
1e37f0430b | ||
|
|
295173258c | ||
|
|
fec90d0487 | ||
|
|
aead560227 | ||
|
|
c91d33e4ab | ||
|
|
36fae5c926 | ||
|
|
a33a919169 | ||
|
|
88e3805ff9 | ||
|
|
8133c60ab3 | ||
|
|
96c4c4da56 | ||
|
|
e981388aa7 | ||
|
|
cf4b49ca3b | ||
|
|
9dd0ed4329 | ||
|
|
6a8deaf61a | ||
|
|
e3d90b820d | ||
|
|
8c7507b048 | ||
|
|
0375fd319c | ||
|
|
b19111b9bf | ||
|
|
a937e3f268 | ||
|
|
4eb94f4a1e | ||
|
|
8cc673ec95 | ||
|
|
c271ffc066 | ||
|
|
896939ce4e | ||
|
|
5c155f5f11 | ||
|
|
5bfb2dae13 | ||
|
|
52d0d62c35 | ||
|
|
d3abd6c96e | ||
|
|
03cf98d3c9 | ||
|
|
6f51f729ba | ||
|
|
73d2ed4c02 | ||
|
|
57b159eb98 | ||
|
|
08da6834a5 | ||
|
|
268468fb47 | ||
|
|
333e19339c | ||
|
|
25b47db3cb | ||
|
|
7b6ccd9b22 | ||
|
|
881edb3e62 | ||
|
|
bb1d8d5796 | ||
|
|
cb13642e85 | ||
|
|
6473d4d8be | ||
|
|
5d6f134609 | ||
|
|
f02743bde5 | ||
|
|
8c09c30ca0 | ||
|
|
86fba4aed4 | ||
|
|
a5a71bf505 | ||
|
|
652a39b11c | ||
|
|
824635df7f | ||
|
|
3003bb0f50 | ||
|
|
5139265d32 | ||
|
|
c9f7314cd0 | ||
|
|
8a67af6c26 | ||
|
|
8e4802505e | ||
|
|
8ee641c1bc | ||
|
|
779508989f | ||
|
|
d9e805a6a5 | ||
|
|
2b0c4acfa1 | ||
|
|
2915548bce | ||
|
|
c9a9da7f49 | ||
|
|
8adbdee9d9 | ||
|
|
5645356fa9 | ||
|
|
6a66aaff47 | ||
|
|
253f28bb2b | ||
|
|
a48154a2ee | ||
|
|
0883b9eff1 | ||
|
|
2c2dad24d5 | ||
|
|
cec4e083ef | ||
|
|
05316b08b4 | ||
|
|
7be17ea89a | ||
|
|
1f07641d9b | ||
|
|
c0f4f805d0 | ||
|
|
c2de299834 | ||
|
|
9bfa420a76 | ||
|
|
b84224d7ba | ||
|
|
98a143f1fe | ||
|
|
3243428009 | ||
|
|
7736097f6b | ||
|
|
f544ffc568 | ||
|
|
c06a02fb97 | ||
|
|
fc60c003c3 | ||
|
|
4d15ab766f | ||
|
|
6896db47af | ||
|
|
313d8e8484 | ||
|
|
8c912a8133 | ||
|
|
ffd3dc335f | ||
|
|
4e54190e3a | ||
|
|
79bf332c53 | ||
|
|
08db4a5f53 | ||
|
|
ffed5a09cb | ||
|
|
5ca4478540 | ||
|
|
9cf4794146 | ||
|
|
43901370e9 | ||
|
|
b65856227f | ||
|
|
e1fcbc6476 | ||
|
|
0e8a8fca31 | ||
|
|
01e8fe5ddb | ||
|
|
0ec756cf58 | ||
|
|
0539c2f927 | ||
|
|
80067d32fc | ||
|
|
19d5f2dd78 | ||
|
|
13dde63463 | ||
|
|
da4e080656 | ||
|
|
89cca8af07 | ||
|
|
170908ef8d | ||
|
|
70b77d9801 | ||
|
|
2b1c3335f6 | ||
|
|
ad15978ccb | ||
|
|
c813046594 | ||
|
|
5740561cd3 | ||
|
|
28073ef2fe | ||
|
|
c958217d19 | ||
|
|
f8ab5663ef | ||
|
|
cfdeada3fd | ||
|
|
210b5af1c7 | ||
|
|
946242e8f1 | ||
|
|
1cb79223ff | ||
|
|
68ae4df2dc | ||
|
|
de33e6ecc8 | ||
|
|
a1cc346aca | ||
|
|
5397e345ca | ||
|
|
ba99070ca4 | ||
|
|
c65acd6a28 | ||
|
|
a6bde3c5da | ||
|
|
39783f2b19 | ||
|
|
8ed7916b61 | ||
|
|
2de5cc52d1 | ||
|
|
f6bc28000e | ||
|
|
90d2a7af03 | ||
|
|
d29a7adc9a | ||
|
|
0158fb437d | ||
|
|
2ef70303c5 | ||
|
|
7e613f8da6 | ||
|
|
826bef86b2 | ||
|
|
0bfc4b433b | ||
|
|
6b5dd4d2be | ||
|
|
4da51c739b | ||
|
|
5dbf39beee | ||
|
|
e6becb9337 | ||
|
|
c191b24024 | ||
|
|
13da3c71d8 | ||
|
|
eb2be90e74 | ||
|
|
973471c63b | ||
|
|
79766fa8c2 | ||
|
|
8da55fb72a | ||
|
|
6e75e88d71 | ||
|
|
06944747fd | ||
|
|
6a5c86541a | ||
|
|
3803ac78e2 | ||
|
|
51ae60820d | ||
|
|
7cf6064200 | ||
|
|
4095a1b6ee | ||
|
|
3347ca4d74 | ||
|
|
2e1761423d | ||
|
|
79eb42d3fe | ||
|
|
11c73d8877 | ||
|
|
a5fbb1cd1f | ||
|
|
a3f1a00078 | ||
|
|
280196c9e5 | ||
|
|
83cc800e97 | ||
|
|
da5a1293b3 | ||
|
|
48817519a9 | ||
|
|
b7f6f73342 | ||
|
|
9b1883988b | ||
|
|
49c8a007cc | ||
|
|
64f6d28441 | ||
|
|
c26d87c677 | ||
|
|
97ae0eb7c7 | ||
|
|
6c1cccd031 | ||
|
|
856d1ceba8 | ||
|
|
60673b3b64 | ||
|
|
0a516e3001 | ||
|
|
bb87f35797 | ||
|
|
90d4fd8cf1 | ||
|
|
fbe9ad2392 | ||
|
|
b539939a90 | ||
|
|
1dfc9bbaa6 | ||
|
|
334fe11584 | ||
|
|
c43f9bc3c2 | ||
|
|
46b43b1bd9 | ||
|
|
c92ae6a9d2 | ||
|
|
8dbda47174 | ||
|
|
dd9340090b | ||
|
|
7114fc2720 | ||
|
|
22fd00832d | ||
|
|
2d17123b74 | ||
|
|
bb67924233 | ||
|
|
1f2cf719da | ||
|
|
85376e8d6e | ||
|
|
ed197ce7ac | ||
|
|
cdace51197 | ||
|
|
a4c019ace2 | ||
|
|
c24fc4282c | ||
|
|
eea8f33cf9 | ||
|
|
0a128e454c | ||
|
|
b12bdd1f15 | ||
|
|
0bf40ba600 | ||
|
|
7d4f60e89d | ||
|
|
59006cb931 | ||
|
|
acf40052c4 | ||
|
|
aad482a7e0 | ||
|
|
dc3a017301 | ||
|
|
50b7421f28 | ||
|
|
61daaa3506 | ||
|
|
5b42f87ec4 | ||
|
|
3aaf4e2384 | ||
|
|
1891dbc566 | ||
|
|
00b9043915 | ||
|
|
fdd8c65b36 | ||
|
|
7cffafcdaa | ||
|
|
f847f67982 | ||
|
|
4b921f5e72 | ||
|
|
089e288a6e | ||
|
|
d642c08c2e | ||
|
|
7e90d84598 | ||
|
|
d7fde6fe0d | ||
|
|
b616a2f2e7 | ||
|
|
dfebbfc331 | ||
|
|
a42acb03ab | ||
|
|
1031ba44b7 | ||
|
|
28fa991fc2 | ||
|
|
60abdf1dbc | ||
|
|
83905db717 | ||
|
|
55546dfc80 | ||
|
|
a412b6b03a | ||
|
|
fd5414f82e | ||
|
|
79965e30af | ||
|
|
5c8de41b32 | ||
|
|
6bf38a806c | ||
|
|
15c45eae11 | ||
|
|
45b9acd57b | ||
|
|
3b765f3ac9 | ||
|
|
7b894da43c | ||
|
|
c8b66f9b04 | ||
|
|
25d9edd5c9 | ||
|
|
fdad98b321 | ||
|
|
8ddd71a818 | ||
|
|
5632278688 | ||
|
|
1cbe4c0d88 | ||
|
|
77a21d098f | ||
|
|
cd34c87afa | ||
|
|
d30ba9d52e | ||
|
|
e085ec9418 | ||
|
|
aac20ca789 | ||
|
|
599016a63a | ||
|
|
8231953e29 | ||
|
|
170cfb356c | ||
|
|
5879c2484a | ||
|
|
c02dad2ca3 | ||
|
|
1bfa14e3c6 | ||
|
|
ea506de048 | ||
|
|
d6bb7ab832 | ||
|
|
43486f2f41 | ||
|
|
5dec58e7f5 | ||
|
|
8321f92d2c | ||
|
|
da1095e298 | ||
|
|
1c11d7ccc1 | ||
|
|
33ae270b0d | ||
|
|
4c500eb50c | ||
|
|
dcad0cdf92 | ||
|
|
bc5898b8cd | ||
|
|
18705b4f26 | ||
|
|
e169366638 | ||
|
|
ae8c0b6c43 | ||
|
|
6a8e281b66 | ||
|
|
821f54f1ab | ||
|
|
e30079d656 | ||
|
|
f56da498ab | ||
|
|
6905522b91 | ||
|
|
e259093e01 | ||
|
|
e963a86b15 | ||
|
|
e447fb806b | ||
|
|
d0bbcc4e77 | ||
|
|
282f3b0632 | ||
|
|
80e74eb91c | ||
|
|
61e2a60438 | ||
|
|
59114a14ff | ||
|
|
aa14085746 | ||
|
|
9ac87fd66f | ||
|
|
54688ce7c7 | ||
|
|
2fc3dcfc74 | ||
|
|
90c41d498c | ||
|
|
ce6bea4ba0 | ||
|
|
769e298e0a | ||
|
|
dfb4d9f049 | ||
|
|
2704e921c8 | ||
|
|
99051916eb | ||
|
|
de194880ae | ||
|
|
c26073afeb | ||
|
|
b9128b6074 | ||
|
|
d6ca9e548d | ||
|
|
2d8f380b71 | ||
|
|
9c7901f526 | ||
|
|
945b6c1e59 | ||
|
|
5647cf7a7e | ||
|
|
d4be4df871 | ||
|
|
d92560b64b | ||
|
|
4952f7dcdb | ||
|
|
200170e5f3 | ||
|
|
10a6a9192d | ||
|
|
99de90a015 | ||
|
|
cb54546259 | ||
|
|
efd1fc017b | ||
|
|
04f5a93aa8 | ||
|
|
751ca90690 | ||
|
|
b73a67455d | ||
|
|
b51b8b1b41 | ||
|
|
4d7ef44aee | ||
|
|
3148781045 | ||
|
|
96507d3709 | ||
|
|
5ddfd5bf11 | ||
|
|
f6dd60c051 | ||
|
|
beef02a4b6 | ||
|
|
676ecd9052 | ||
|
|
4962ec7589 | ||
|
|
cc2fbc7b89 | ||
|
|
66f453452e | ||
|
|
24c7ff7959 | ||
|
|
dfd7f594b5 | ||
|
|
9b76b5ac98 | ||
|
|
9edab3dc55 | ||
|
|
3eee19c9a2 | ||
|
|
8195e948a1 | ||
|
|
1dfeae6a03 | ||
|
|
ae43edeb4f | ||
|
|
1488a09b8e | ||
|
|
152a386ac1 | ||
|
|
c4712bcb52 | ||
|
|
4545beab51 | ||
|
|
f48e807cee | ||
|
|
c12dc71ece | ||
|
|
ce3562b3ea | ||
|
|
d05458aa3a | ||
|
|
1ed60c79c0 | ||
|
|
aee1e53140 | ||
|
|
c822e2f6cc | ||
|
|
f098222a43 | ||
|
|
715abe1140 | ||
|
|
645c926bbd | ||
|
|
56eba9cded | ||
|
|
253e2b2de1 | ||
|
|
1790c81603 | ||
|
|
b1413f021e | ||
|
|
fef57cb312 | ||
|
|
a129fafb69 | ||
|
|
81897d0b04 | ||
|
|
40bba563d6 | ||
|
|
1caf76f64b | ||
|
|
8338913ac5 | ||
|
|
c950daf301 | ||
|
|
cf16e31632 | ||
|
|
f48d708e28 | ||
|
|
f585992c6f | ||
|
|
9c55b83dea | ||
|
|
ff5edc44ed | ||
|
|
dcd95d013f | ||
|
|
d507111008 | ||
|
|
3ff6339e29 | ||
|
|
3cc028fa29 | ||
|
|
85ae3a9420 | ||
|
|
46b67fef7a | ||
|
|
c98ab8fb51 | ||
|
|
281b6b6d2b | ||
|
|
60c22b6a43 | ||
|
|
3f05ed6ffa | ||
|
|
e87f2dda85 | ||
|
|
44bbe8b307 | ||
|
|
a8c1d02ee1 | ||
|
|
a2e4f747e0 | ||
|
|
7dd18c75b0 | ||
|
|
090ad5323a | ||
|
|
47266f712a | ||
|
|
0140965a30 | ||
|
|
8bda10c23c | ||
|
|
d10099d9e9 | ||
|
|
ac3f9e5f33 | ||
|
|
0d9fb68a04 | ||
|
|
c3636f1527 | ||
|
|
a0392865f4 | ||
|
|
9f856e9ec2 | ||
|
|
f9967cca4c | ||
|
|
a1717eac6d | ||
|
|
bb2ade75a8 | ||
|
|
7bdce848e7 | ||
|
|
feb7c85d57 | ||
|
|
2cdc12055d | ||
|
|
639816369a | ||
|
|
3e90fd010d | ||
|
|
462862ba65 | ||
|
|
7601a72faf | ||
|
|
7ab14ff293 | ||
|
|
d98faaffee | ||
|
|
c2cf7ba16a | ||
|
|
5311937b69 | ||
|
|
a044519b21 | ||
|
|
8349e631d2 | ||
|
|
b3541e9758 | ||
|
|
97a0c890bf | ||
|
|
200106df39 | ||
|
|
83718c61cd | ||
|
|
a51f7d52ed | ||
|
|
bf3a88ff1a | ||
|
|
ea66e20282 | ||
|
|
346e80839f | ||
|
|
a209b39552 | ||
|
|
24da85fea3 | ||
|
|
57df2690da | ||
|
|
35f607f9a5 | ||
|
|
557672ba9f | ||
|
|
427430fc48 | ||
|
|
48d9fc10ea | ||
|
|
c5c8afe147 | ||
|
|
b348b766fc | ||
|
|
b561f7d906 | ||
|
|
9d05d2bac5 | ||
|
|
a3116cd27d | ||
|
|
f6ccfe6ed3 | ||
|
|
1bf9dd1217 | ||
|
|
524683eabd | ||
|
|
2103731f10 | ||
|
|
ceeac476ec | ||
|
|
a6ba7d9093 | ||
|
|
f45b50a796 | ||
|
|
2ace3257f9 | ||
|
|
c16ee7fc2c | ||
|
|
fd33fe869d | ||
|
|
9a792e601e | ||
|
|
00d024ff86 | ||
|
|
428a6ed71b | ||
|
|
f087b37cb3 | ||
|
|
2027dae30b | ||
|
|
450c6759eb | ||
|
|
dcf125a08a | ||
|
|
ad6386a618 | ||
|
|
6fc141497a | ||
|
|
d674d934e7 | ||
|
|
85bf5fbc9b | ||
|
|
b7446f8d0f | ||
|
|
19924cd184 | ||
|
|
77a7cac830 | ||
|
|
01c34b837d | ||
|
|
5cc9b34132 | ||
|
|
a5975a489c | ||
|
|
edaf57148a | ||
|
|
85470a1549 | ||
|
|
2a604c0548 | ||
|
|
2ab7c7feae | ||
|
|
6b789e2eb0 | ||
|
|
329c95196e | ||
|
|
375a7f7b4c | ||
|
|
9590de2c19 | ||
|
|
430addf520 | ||
|
|
0fe064b8a2 | ||
|
|
2ee2e4505a | ||
|
|
7c20d6e28c | ||
|
|
a961fff69d | ||
|
|
b7f3c68eca | ||
|
|
edd2981076 | ||
|
|
5c40c4b958 | ||
|
|
a287599c8f | ||
|
|
0bc71e28a1 | ||
|
|
45fe77ce4a | ||
|
|
a4edce5a93 | ||
|
|
83ba79dca2 | ||
|
|
d1351503a8 | ||
|
|
d9dd76f2ae | ||
|
|
54d97b53de | ||
|
|
7437092765 | ||
|
|
c90ca8c2a6 | ||
|
|
d815317d7c | ||
|
|
7bbeea0b81 | ||
|
|
99c4692a0d | ||
|
|
f3aaa7ea7a | ||
|
|
38c3c878e1 | ||
|
|
90063ad03c | ||
|
|
8ba346faa6 | ||
|
|
079dc12fe1 | ||
|
|
d7359122b4 | ||
|
|
c105a63c8b | ||
|
|
01fef0b9e1 | ||
|
|
7b7f098dee | ||
|
|
a02aeb468e | ||
|
|
a3a682eeb1 | ||
|
|
456f31901c | ||
|
|
6d5a0d8a7e | ||
|
|
6192d42564 | ||
|
|
8cc2aee13e | ||
|
|
0860934888 | ||
|
|
d2b077af35 | ||
|
|
4bca89f072 | ||
|
|
fcfc5c85c7 | ||
|
|
06513446a0 | ||
|
|
2d53896f92 | ||
|
|
e523764b0f | ||
|
|
8e7d9e1bc7 | ||
|
|
38d2a97582 | ||
|
|
01d2b6ded9 | ||
|
|
080770a493 | ||
|
|
3aaa219d5e | ||
|
|
df8a6bbaa2 | ||
|
|
08d82bb12f | ||
|
|
57e071fe6b | ||
|
|
8d761fa60c | ||
|
|
b7bd67b4cb | ||
|
|
ead1136e31 | ||
|
|
3d54400163 | ||
|
|
7779cbca4d | ||
|
|
8d6c9e116d | ||
|
|
d0b2166525 | ||
|
|
b4f9d3a8f2 | ||
|
|
af9cfb40a4 | ||
|
|
6fa3bfe051 | ||
|
|
454a07b775 | ||
|
|
8a6bc41938 | ||
|
|
f793ee395d | ||
|
|
d2f0ea6fa0 | ||
|
|
c94756f8a2 | ||
|
|
a42c1e4711 | ||
|
|
25264faf37 | ||
|
|
380b4e5f3a | ||
|
|
9bd78a8c22 | ||
|
|
a570589dcc | ||
|
|
2885ced2c7 | ||
|
|
5dc873209e | ||
|
|
3131b7ea9d | ||
|
|
ca903ebd1f | ||
|
|
a2ca46004b | ||
|
|
5795958a18 | ||
|
|
6c195af2a3 | ||
|
|
5e64a93d11 | ||
|
|
caa81d1f4d | ||
|
|
5f584e683a | ||
|
|
4aabf5d8be | ||
|
|
cf6254a8d5 | ||
|
|
883cff5de9 | ||
|
|
7e79c4f249 | ||
|
|
504638eb41 | ||
|
|
2adac4a899 | ||
|
|
56a943bf48 | ||
|
|
77ebca264a | ||
|
|
7b94ae3a9a | ||
|
|
bd1edc6dcc | ||
|
|
09d166e97d | ||
|
|
a272ea07a9 | ||
|
|
69dd3ab639 | ||
|
|
798ffd9065 | ||
|
|
f3e5d908d6 | ||
|
|
9651a7d7fc | ||
|
|
1d38d51ac1 | ||
|
|
f80b8f0d42 | ||
|
|
d0dbe49bfd | ||
|
|
39a0e05f87 | ||
|
|
34e7f20f24 | ||
|
|
dc7eeaa45d | ||
|
|
b2914cbcb1 | ||
|
|
97a237bbdc | ||
|
|
3d25dfbebe | ||
|
|
7076deb2b6 | ||
|
|
db18050b86 | ||
|
|
8c744e13bc | ||
|
|
eb12d7bd73 | ||
|
|
5e32b5f0bf | ||
|
|
0fc1f4e10e | ||
|
|
3b79eff2f1 | ||
|
|
92a54a5320 | ||
|
|
65ca0f2554 | ||
|
|
72de8f57a7 | ||
|
|
d0a4d6b111 | ||
|
|
c4eb641d9c | ||
|
|
b431703262 | ||
|
|
2ebcffb22e | ||
|
|
89fa1dff09 | ||
|
|
5bc6057050 | ||
|
|
87164d574e | ||
|
|
b366f8b053 | ||
|
|
be6a9ba72c | ||
|
|
3e08a8e1c1 | ||
|
|
3c57f468c6 | ||
|
|
84c1841e85 | ||
|
|
a7833a3b72 | ||
|
|
df6f3e658a | ||
|
|
b885e1eeff | ||
|
|
69b9a4db2b | ||
|
|
ee064fa84c | ||
|
|
9d94d0fce9 | ||
|
|
b5064021e6 | ||
|
|
31db658929 | ||
|
|
322d9d66a8 | ||
|
|
488cce767f | ||
|
|
2316379160 | ||
|
|
d459bb61dc | ||
|
|
590f4e07af | ||
|
|
e071b4315a | ||
|
|
869e975ed1 | ||
|
|
dab99405c5 | ||
|
|
d2c745d3fd | ||
|
|
6067cb1797 | ||
|
|
51efddcfb0 | ||
|
|
0c7e52d9c3 | ||
|
|
81b50b9b3c | ||
|
|
7c26e516c9 | ||
|
|
9c95c93630 | ||
|
|
7f73591742 | ||
|
|
f01bb5966a | ||
|
|
b0417338cc | ||
|
|
20e82d708b | ||
|
|
9f5a03edcd | ||
|
|
a34fef3478 | ||
|
|
685504e1d0 | ||
|
|
fddc128156 | ||
|
|
9159e2ed22 | ||
|
|
15fdb9b218 | ||
|
|
3b73bbe0ac | ||
|
|
c33c3de43a | ||
|
|
99726be9ac | ||
|
|
32f333a00e | ||
|
|
be5c19b764 | ||
|
|
dd384e4a31 | ||
|
|
bdde195e2b | ||
|
|
dafdb43c84 | ||
|
|
961c60dd1a | ||
|
|
e124de4b80 | ||
|
|
98624e66e5 | ||
|
|
5343b03493 | ||
|
|
60895bf8d6 | ||
|
|
d50e7a3d17 | ||
|
|
a181c09786 | ||
|
|
7c8dd238de | ||
|
|
0b6952d0fe | ||
|
|
6ce4c93b3c | ||
|
|
14ea071306 | ||
|
|
50034301ac | ||
|
|
85ed712c50 | ||
|
|
f67d682345 | ||
|
|
0656dc381d | ||
|
|
3f1427eef9 | ||
|
|
882f65fdce | ||
|
|
7d0f5e94ef | ||
|
|
f1fccb7a66 | ||
|
|
73db99398f | ||
|
|
0af493ad67 | ||
|
|
bc182f1392 | ||
|
|
91c6ae307d | ||
|
|
aabae8eb01 | ||
|
|
e3ea16d020 | ||
|
|
ad991c9d8e | ||
|
|
c0e5e9cb24 | ||
|
|
ae48c160b0 | ||
|
|
4e723f4936 | ||
|
|
251547e79e | ||
|
|
b222c4215b | ||
|
|
734073019f | ||
|
|
9a26a3c4e8 | ||
|
|
1bef814c51 | ||
|
|
6dc791c34f | ||
|
|
5fcef39a2e | ||
|
|
7ae9f21f82 | ||
|
|
5b4e9ef4db | ||
|
|
39e9df47bc | ||
|
|
9173f9c9cb | ||
|
|
62081aebb9 | ||
|
|
a4b71278c0 | ||
|
|
3f07632cd4 | ||
|
|
2c94587263 | ||
|
|
db43f678d8 | ||
|
|
a4f2aa1981 | ||
|
|
78149e19dc | ||
|
|
046b0bc98a | ||
|
|
97873a7b2b | ||
|
|
f8633f8c4e | ||
|
|
ef27ee0a28 | ||
|
|
bf5315d306 | ||
|
|
9c7efa8e0e | ||
|
|
a1c44b4987 | ||
|
|
55f8624388 | ||
|
|
927777291e | ||
|
|
3fc3818231 | ||
|
|
f093da99ec | ||
|
|
adeaa77864 | ||
|
|
48d61a3cdf | ||
|
|
876a06a9cd | ||
|
|
20d40ea691 | ||
|
|
d69d1fbfe8 | ||
|
|
323fe960bd | ||
|
|
938ca5c451 | ||
|
|
4500db395f | ||
|
|
d48946ab90 | ||
|
|
88841ac01f | ||
|
|
8b37eca241 | ||
|
|
1d3a361a66 | ||
|
|
c862484f00 | ||
|
|
ccd48965a8 | ||
|
|
b6472f3469 | ||
|
|
866c69e706 | ||
|
|
a50df84a72 | ||
|
|
6760942218 | ||
|
|
b71e74927e | ||
|
|
7e50364244 | ||
|
|
b82fa6534b | ||
|
|
74a4848205 | ||
|
|
4e58887b9a | ||
|
|
dfcd84c2bc | ||
|
|
3012bf0a31 | ||
|
|
85e9534fae | ||
|
|
4a1ff5a5ac | ||
|
|
222dfd1fe1 | ||
|
|
c1964b934f | ||
|
|
b16fe5e263 | ||
|
|
fdacc04582 | ||
|
|
96d10126b2 | ||
|
|
a29ebef202 | ||
|
|
06e9feadee | ||
|
|
77ffdf69a1 | ||
|
|
e3bcc6b273 | ||
|
|
39793318a0 | ||
|
|
2df675bb01 | ||
|
|
c9e01879ca | ||
|
|
6557f1bdae | ||
|
|
f156e0a094 | ||
|
|
62464cfe45 | ||
|
|
7d47e1e81b | ||
|
|
3d6fbb93f5 | ||
|
|
5d1e977442 | ||
|
|
8434511e39 | ||
|
|
939d89f0b8 | ||
|
|
1270b056d5 | ||
|
|
a7f235164f | ||
|
|
31ddb2aee3 | ||
|
|
c0186580ba | ||
|
|
63a582404b | ||
|
|
04e1dc351e | ||
|
|
7ae2df1390 | ||
|
|
9b4b9e0c74 | ||
|
|
46aa17db9c | ||
|
|
71325b540a | ||
|
|
2509815a4f | ||
|
|
2b8ab9cc4d | ||
|
|
57cfad671f | ||
|
|
9a94ab573d | ||
|
|
51d942f14c | ||
|
|
5494ec36e5 | ||
|
|
2c2deced02 | ||
|
|
0638f3c1fe | ||
|
|
9b136e76bb | ||
|
|
ac99fddfe6 | ||
|
|
66899c4c96 | ||
|
|
2c40a892f8 | ||
|
|
6f0dfa850a | ||
|
|
8ba1266b6a | ||
|
|
118c02144f | ||
|
|
a4756004f8 | ||
|
|
6e6933bb25 | ||
|
|
2925f28255 | ||
|
|
b5e8fa2b98 | ||
|
|
09acac4caf | ||
|
|
9fdee373af | ||
|
|
3362ce5f33 | ||
|
|
52325307f4 | ||
|
|
684eadbcc6 | ||
|
|
b368745380 | ||
|
|
d73994f05d | ||
|
|
e9d368ed0c | ||
|
|
b8f6731584 | ||
|
|
93e7f53cf8 | ||
|
|
c24b912b50 | ||
|
|
476df3117b | ||
|
|
1000a577d0 | ||
|
|
78ef398257 | ||
|
|
805c79506b | ||
|
|
817da5bc04 | ||
|
|
a514330db3 | ||
|
|
2b0cf24be4 | ||
|
|
6c8497f632 | ||
|
|
b029a7265a | ||
|
|
f44ff8477f | ||
|
|
1249c7ca26 | ||
|
|
1ec7073027 | ||
|
|
7e476b941e | ||
|
|
8d4f3561d5 | ||
|
|
8b88d91312 | ||
|
|
f56f57a236 | ||
|
|
4e56f30381 | ||
|
|
fe39a7bc7b | ||
|
|
5109eb0e7e | ||
|
|
583738fa65 | ||
|
|
5a62019cdd | ||
|
|
69f30760f8 | ||
|
|
e80349c343 | ||
|
|
d2cef9c40d | ||
|
|
b346036cca | ||
|
|
5ebd0a971f | ||
|
|
c50e058953 | ||
|
|
a3dfa843af | ||
|
|
2afb109bff | ||
|
|
f7f7557d4d | ||
|
|
b36b413a69 | ||
|
|
ce438f182a | ||
|
|
6d900dc654 | ||
|
|
15c4428b9c | ||
|
|
20d7c90515 | ||
|
|
3363d7b12d | ||
|
|
ff563c44e2 | ||
|
|
527decb7fa | ||
|
|
03f0e3a137 | ||
|
|
148d0361e0 | ||
|
|
d626dd9e90 | ||
|
|
1043afcecc | ||
|
|
04d1154be0 | ||
|
|
550f781d6f | ||
|
|
b114d0a41c | ||
|
|
60dda6c7eb | ||
|
|
c57005b4e4 | ||
|
|
93093d9f55 | ||
|
|
e095a9f73f | ||
|
|
5d748a50ff | ||
|
|
efb938c370 | ||
|
|
616fbc45ae | ||
|
|
cf44d1f213 | ||
|
|
30d15afd33 | ||
|
|
8747d36b2c | ||
|
|
1a15c528a2 | ||
|
|
f4876422a9 | ||
|
|
8ca53c7666 | ||
|
|
bd39b971cf | ||
|
|
cb92e41b76 | ||
|
|
cddaf4b088 | ||
|
|
cc59e5ad89 | ||
|
|
3c703e4189 | ||
|
|
ef4731e3ff | ||
|
|
6101a3bf0d | ||
|
|
aefa2095f0 | ||
|
|
298fabfdec | ||
|
|
b111cbeedd | ||
|
|
06c4d4d01b | ||
|
|
a41bc230a1 | ||
|
|
ef95cec77f | ||
|
|
f69cb567f0 | ||
|
|
1ef17bb582 | ||
|
|
fdbe943053 | ||
|
|
184bb04bc2 | ||
|
|
d464d8703c | ||
|
|
1b82822d15 | ||
|
|
1cc8bc172b | ||
|
|
5aeac1a8ae | ||
|
|
def4377226 | ||
|
|
25afde4796 | ||
|
|
088bc98a43 | ||
|
|
3aaff7b776 | ||
|
|
4044ed23ea | ||
|
|
a9f4a4e111 | ||
|
|
c7785d1dbc | ||
|
|
5b1ed429ae | ||
|
|
c8613ac9a7 | ||
|
|
d9aa681a0d | ||
|
|
c966d9bada | ||
|
|
a95abff0d3 | ||
|
|
8a9a53225a | ||
|
|
e19e2fd9cc | ||
|
|
8e1b8a3a3f | ||
|
|
6f47310c24 | ||
|
|
1e79d6f56f | ||
|
|
a53a3b3119 | ||
|
|
22f3e2ad23 | ||
|
|
4555050301 | ||
|
|
e6dc647287 | ||
|
|
e85334bacd | ||
|
|
a3a3d62034 | ||
|
|
59b42fddea | ||
|
|
eef65b449d | ||
|
|
942629722d | ||
|
|
f652a035b7 | ||
|
|
c70ec63952 | ||
|
|
f0bee6af63 | ||
|
|
2e95557840 | ||
|
|
827bbc2b17 | ||
|
|
eb7c29c647 | ||
|
|
8d318c222e | ||
|
|
db380f9af1 | ||
|
|
694fb19628 | ||
|
|
c53d5fd1f6 | ||
|
|
6bb7db31aa | ||
|
|
2e37fe9bc9 | ||
|
|
8a62368141 | ||
|
|
5f866906d1 | ||
|
|
48999868d8 | ||
|
|
35e940f0b5 | ||
|
|
4460fae46f | ||
|
|
c20dabbcdf | ||
|
|
98941acd2a | ||
|
|
661cc0afdb | ||
|
|
d350c048b8 | ||
|
|
b15be7078c | ||
|
|
42008124b6 | ||
|
|
1dae7c9bc9 | ||
|
|
1062da678f | ||
|
|
4bee0d652a | ||
|
|
405ad4280c | ||
|
|
44e2618ee2 | ||
|
|
09918e338a | ||
|
|
1dac24c9f8 | ||
|
|
76ea06748b | ||
|
|
29b131b107 | ||
|
|
31a2713012 | ||
|
|
39d8723159 | ||
|
|
67657e9f02 | ||
|
|
2a922caf89 | ||
|
|
bd7371fb8b | ||
|
|
51ae2d1a87 | ||
|
|
b1afb78ca2 | ||
|
|
2e6bb454f4 | ||
|
|
7507a3ed2a | ||
|
|
bed1fd98ff | ||
|
|
f9b9156c8a | ||
|
|
87c0074fab | ||
|
|
0ba48df61e | ||
|
|
db20b4a3d3 | ||
|
|
6687efd887 | ||
|
|
c9527fcf42 | ||
|
|
a1cf719d26 | ||
|
|
7cd5c26337 | ||
|
|
fbba782f5c | ||
|
|
a108574387 | ||
|
|
de74b802d4 | ||
|
|
83c427c1bb | ||
|
|
7c8d062d58 | ||
|
|
c7bc8e415f | ||
|
|
2841620be6 | ||
|
|
b279aa391c | ||
|
|
abdb1048ed | ||
|
|
a7fa51303b | ||
|
|
3dd52a3f7d |
18
.editorconfig
Normal file
18
.editorconfig
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# http://editorconfig.org
|
||||||
|
root = true
|
||||||
|
|
||||||
|
# 空格替代Tab缩进在各种编辑工具下效果一致
|
||||||
|
[*]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
charset = utf-8
|
||||||
|
end_of_line = lf
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
|
|
||||||
|
[*.{json,yml,yaml}]
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
insert_final_newline = false
|
||||||
|
trim_trailing_whitespace = false
|
||||||
49
.gitee/ISSUE_TEMPLATE.zh-CN.md
Normal file
49
.gitee/ISSUE_TEMPLATE.zh-CN.md
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
### 使用版本(未按照模板填写直接删除)
|
||||||
|
|
||||||
|
- jdk版本(带上尾号): 例如 1.8.0_202
|
||||||
|
- 框架版本(项目启动时输出的版本号): 例如 4.4.0
|
||||||
|
- 其他依赖版本(你觉得有必要的):
|
||||||
|
|
||||||
|
### 问题前提
|
||||||
|
|
||||||
|
> 功能不好用 不会用 是否已经看过项目文档
|
||||||
|
> 项目运行报错 是否已经拿着报错信息去百度 常见报错百度百度足以
|
||||||
|
> 是否搜索过其他issue 一些已经解决的问题 会在issue内留下解决方法
|
||||||
|
> 无法线上解决或者与框架无关的问题的欢迎加VIP群跟作者一对一谈
|
||||||
|
|
||||||
|
### 异常模块
|
||||||
|
|
||||||
|
> 此报错都涉及到那些系统模块
|
||||||
|
|
||||||
|
例如 ruoyi-system ruoyi-auth 等等
|
||||||
|
|
||||||
|
### 问题描述
|
||||||
|
|
||||||
|
> 越详细越容易直击问题所在
|
||||||
|
|
||||||
|
已知: XXX功能不好用 或 XXX数据不正常 等等
|
||||||
|
|
||||||
|
### 希望结果
|
||||||
|
|
||||||
|
> 想知道你觉得怎么样是正常或者合理的
|
||||||
|
|
||||||
|
希望功能可以有XXX结果 或者 XXX现象
|
||||||
|
|
||||||
|
### 重现步骤
|
||||||
|
|
||||||
|
> 作者并不知道这个问题是如何出现的
|
||||||
|
|
||||||
|
- 1
|
||||||
|
- 2
|
||||||
|
- 3
|
||||||
|
|
||||||
|
### 相关代码与报错信息(请勿发混乱格式)
|
||||||
|
|
||||||
|
> 代码可按照如下形式提供或者截图均可 越详细越好
|
||||||
|
> 大多数问题都是 代码编写错误问题 逻辑问题 或者用法错误等问题
|
||||||
|
|
||||||
|
```java
|
||||||
|
public class XXX {
|
||||||
|
|
||||||
|
}
|
||||||
|
```
|
||||||
7
.gitee/PULL_REQUEST_TEMPLATE.zh-CN.md
Normal file
7
.gitee/PULL_REQUEST_TEMPLATE.zh-CN.md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
### 更改目的 解决了什么问题(请提交到dev分支)
|
||||||
|
|
||||||
|
|
||||||
|
### 改动逻辑 这么写的思路(让作者更好的理解你的意图)
|
||||||
|
|
||||||
|
|
||||||
|
### 测试 都做了哪些测试(未经过测试不采纳)
|
||||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -25,11 +25,13 @@ target/
|
|||||||
*.iml
|
*.iml
|
||||||
*.ipr
|
*.ipr
|
||||||
|
|
||||||
|
### JRebel ###
|
||||||
|
rebel.xml
|
||||||
|
|
||||||
### NetBeans ###
|
### NetBeans ###
|
||||||
nbproject/private/
|
nbproject/private/
|
||||||
build/*
|
build/*
|
||||||
nbbuild/
|
nbbuild/
|
||||||
dist/
|
|
||||||
nbdist/
|
nbdist/
|
||||||
.nb-gradle/
|
.nb-gradle/
|
||||||
|
|
||||||
|
|||||||
12
.run/ruoyi-monitor-admin.run.xml
Normal file
12
.run/ruoyi-monitor-admin.run.xml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="ruoyi-monitor-admin" type="docker-deploy" factoryName="dockerfile" server-name="Docker">
|
||||||
|
<deployment type="dockerfile">
|
||||||
|
<settings>
|
||||||
|
<option name="imageTag" value="ruoyi/ruoyi-monitor-admin:4.5.0" />
|
||||||
|
<option name="buildOnly" value="true" />
|
||||||
|
<option name="sourceFilePath" value="ruoyi-extend/ruoyi-monitor-admin/Dockerfile" />
|
||||||
|
</settings>
|
||||||
|
</deployment>
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
12
.run/ruoyi-server.run.xml
Normal file
12
.run/ruoyi-server.run.xml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="ruoyi-server" type="docker-deploy" factoryName="dockerfile" server-name="Docker">
|
||||||
|
<deployment type="dockerfile">
|
||||||
|
<settings>
|
||||||
|
<option name="imageTag" value="ruoyi/ruoyi-server:4.5.0" />
|
||||||
|
<option name="buildOnly" value="true" />
|
||||||
|
<option name="sourceFilePath" value="ruoyi-admin/Dockerfile" />
|
||||||
|
</settings>
|
||||||
|
</deployment>
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
12
.run/ruoyi-xxl-job-admin.run.xml
Normal file
12
.run/ruoyi-xxl-job-admin.run.xml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="ruoyi-xxl-job-admin" type="docker-deploy" factoryName="dockerfile" server-name="Docker">
|
||||||
|
<deployment type="dockerfile">
|
||||||
|
<settings>
|
||||||
|
<option name="imageTag" value="ruoyi/ruoyi-xxl-job-admin:4.5.0" />
|
||||||
|
<option name="buildOnly" value="true" />
|
||||||
|
<option name="sourceFilePath" value="ruoyi-extend/ruoyi-xxl-job-admin/Dockerfile" />
|
||||||
|
</settings>
|
||||||
|
</deployment>
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
|||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright (c) 2018 RuoYi
|
Copyright (c) 2019 RuoYi-Vue-Plus
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
this software and associated documentation files (the "Software"), to deal in
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
|
|||||||
194
README.md
194
README.md
@@ -1,85 +1,163 @@
|
|||||||
## 平台简介
|
## 平台简介
|
||||||
|
[](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus)
|
||||||
|
[](https://github.com/JavaLionLi/RuoYi-Vue-Plus)
|
||||||
|
[](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/blob/master/LICENSE)
|
||||||
|
[](https://www.jetbrains.com/?from=RuoYi-Vue-Plus)
|
||||||
|
<br>
|
||||||
|
[](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus)
|
||||||
|
[]()
|
||||||
|
[]()
|
||||||
|
[]()
|
||||||
|
|
||||||
若依是一套全部开源的快速开发平台,毫无保留给个人及企业免费使用。
|
> RuoYi-Vue-Plus 是重写 RuoYi-Vue 针对 `分布式集群` 场景全方位升级(不兼容原框架)
|
||||||
|
|
||||||
* 前端采用Vue、Element UI。
|
> 项目代码、文档 均开源免费可商用 遵循开源协议在项目中保留开源协议文件即可<br>
|
||||||
* 后端采用Spring Boot、Spring Security、Redis & Jwt。
|
活到老写到老 为兴趣而开源 为学习而开源 为让大家真正可以学到技术而开源
|
||||||
* 权限认证使用Jwt,支持多终端认证系统。
|
|
||||||
* 支持加载动态权限菜单,多方式轻松权限控制。
|
|
||||||
* 高效率开发,使用代码生成器可以一键生成前后端代码。
|
|
||||||
* 提供了单应用版本[RuoYi-Vue-fast](https://github.com/yangzongzhuan/RuoYi-Vue-fast),Oracle版本[RuoYi-Vue-Oracle](https://github.com/yangzongzhuan/RuoYi-Vue-Oracle),保持同步更新。
|
|
||||||
* 不分离版本,请移步[RuoYi](https://gitee.com/y_project/RuoYi),微服务版本,请移步[RuoYi-Cloud](https://gitee.com/y_project/RuoYi-Cloud)
|
|
||||||
* 特别鸣谢:[element](https://github.com/ElemeFE/element),[vue-element-admin](https://github.com/PanJiaChen/vue-element-admin),[eladmin-web](https://github.com/elunez/eladmin-web)。
|
|
||||||
* 阿里云折扣场:[点我进入](http://aly.ruoyi.vip),腾讯云秒杀场:[点我进入](http://txy.ruoyi.vip)
|
|
||||||
* 阿里云优惠券:[点我领取](https://www.aliyun.com/minisite/goods?userCode=brki8iof&share_source=copy_link),腾讯云优惠券:[点我领取](https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console)
|
|
||||||
|
|
||||||
## 内置功能
|
> 系统演示: [传送门](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/pages?sort_id=4836388&doc_id=1469725)
|
||||||
|
|
||||||
1. 用户管理:用户是系统操作者,该功能主要完成系统用户配置。
|
| 功能介绍 | 使用技术 | 文档地址 | 特性注意事项 |
|
||||||
2. 部门管理:配置系统组织机构(公司、部门、小组),树结构展现支持数据权限。
|
|----------|---------------------|---------------------------------------------------------------------------------------------------|----------------------------|
|
||||||
3. 岗位管理:配置系统用户所属担任职务。
|
| 当前框架 | RuoYi-Vue-Plus | [RuoYi-Vue-Plus文档](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/pages) | 重写RuoYi-Vue全方位升级(不兼容原框架) |
|
||||||
4. 菜单管理:配置系统菜单,操作权限,按钮权限标识等。
|
| 微服务分支 | RuoYi-Cloud-Plus | [微服务分支地址](https://gitee.com/JavaLionLi/RuoYi-Cloud-Plus) | 重写RuoYi-Cloud全方位升级(不兼容原框架) |
|
||||||
5. 角色管理:角色菜单权限分配、设置角色按机构进行数据范围权限划分。
|
| 单体分支 | RuoYi-Vue-Plus-fast | [fast分支地址](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/tree/fast/) | 单体应用结构 |
|
||||||
6. 字典管理:对系统中经常使用的一些较为固定的数据进行维护。
|
| Vue3分支 | RuoYi-Vue-Plus-UI | [UI地址](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus-UI) | 由于组件还未完善 仅供学习 |
|
||||||
7. 参数管理:对系统动态配置常用参数。
|
| 原框架 | RuoYi-Vue | [RuoYi-Vue官网](http://ruoyi.vip/) | 定期同步需要的功能 |
|
||||||
8. 通知公告:系统通知公告信息发布维护。
|
| 前端开发框架 | Vue、Element UI | [Element UI官网](https://element.eleme.cn/#/zh-CN) | |
|
||||||
9. 操作日志:系统正常操作日志记录和查询;系统异常信息日志记录和查询。
|
| 后端开发框架 | SpringBoot | [SpringBoot官网](https://spring.io/projects/spring-boot/#learn) | |
|
||||||
10. 登录日志:系统登录日志记录查询包含登录异常。
|
| 容器框架 | Undertow | [Undertow官网](https://undertow.io/) | 基于 XNIO 的高性能容器 |
|
||||||
11. 在线用户:当前系统中活跃用户状态监控。
|
| 权限认证框架 | Sa-Token、Jwt | [Sa-Token官网](https://sa-token.dev33.cn/) | 强解耦、强扩展 |
|
||||||
12. 定时任务:在线(添加、修改、删除)任务调度包含执行结果日志。
|
| 关系数据库 | MySQL | [MySQL官网](https://dev.mysql.com/) | 适配 8.X 最低 5.7 |
|
||||||
13. 代码生成:前后端代码的生成(java、html、xml、sql)支持CRUD下载 。
|
| 关系数据库 | Oracle | [Oracle官网](https://www.oracle.com/cn/database/) | 适配 11g 12c |
|
||||||
14. 系统接口:根据业务代码自动生成相关的api接口文档。
|
| 关系数据库 | PostgreSQL | [PostgreSQL官网](https://www.postgresql.org/) | 适配 13 14 |
|
||||||
15. 服务监控:监视当前系统CPU、内存、磁盘、堆栈等相关信息。
|
| 关系数据库 | SQLServer | [SQLServer官网](https://docs.microsoft.com/zh-cn/sql/sql-server) | 适配 2017 2019 |
|
||||||
16. 缓存监控:对系统的缓存信息查询,命令统计等。
|
| 缓存数据库 | Redis | [Redis官网](https://redis.io/) | 适配 6.X 最低 4.X |
|
||||||
17. 在线构建器:拖动表单元素生成相应的HTML代码。
|
| 数据库框架 | Mybatis-Plus | [Mybatis-Plus文档](https://baomidou.com/guide/) | 快速 CRUD 增加开发效率 |
|
||||||
18. 连接池监视:监视当前系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈。
|
| 数据库框架 | p6spy | [p6spy官网](https://p6spy.readthedocs.io/) | 更强劲的 SQL 分析 |
|
||||||
|
| 多数据源框架 | dynamic-datasource | [dynamic-ds文档](https://www.kancloud.cn/tracy5546/dynamic-datasource/content) | 支持主从与多种类数据库异构 |
|
||||||
|
| 序列化框架 | Jackson | [Jackson官网](https://github.com/FasterXML/jackson) | 统一使用 jackson 高效可靠 |
|
||||||
|
| Redis客户端 | Redisson | [Redisson文档](https://github.com/redisson/redisson/wiki/%E7%9B%AE%E5%BD%95) | 支持单机、集群配置 |
|
||||||
|
| 分布式限流 | Redisson | [Redisson文档](https://github.com/redisson/redisson/wiki/%E7%9B%AE%E5%BD%95) | 全局、请求IP、集群ID 多种限流 |
|
||||||
|
| 分布式队列 | Redisson | [Redisson文档](https://github.com/redisson/redisson/wiki/%E7%9B%AE%E5%BD%95) | 普通队列、延迟队列、优先队列 等 |
|
||||||
|
| 分布式锁 | Lock4j | [Lock4j官网](https://gitee.com/baomidou/lock4j) | 注解锁、工具锁 多种多样 |
|
||||||
|
| 分布式幂等 | Redisson | [Lock4j文档](https://gitee.com/baomidou/lock4j) | 拦截重复提交 |
|
||||||
|
| 分布式链路追踪 | Apache SkyWalking | [Apache SkyWalking文档](https://skywalking.apache.org/docs/) | 链路追踪、网格分析、度量聚合、可视化 |
|
||||||
|
| 分布式任务调度 | Xxl-Job | [Xxl-Job官网](https://www.xuxueli.com/xxl-job/) | 高性能 高可靠 易扩展 |
|
||||||
|
| 文件存储 | Minio | [Minio文档](https://docs.min.io/) | 本地存储 |
|
||||||
|
| 文件存储 | 七牛、阿里、腾讯 | [OSS使用文档](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/pages?sort_id=4359146&doc_id=1469725) | 云存储 |
|
||||||
|
| 短信模块 | 阿里、腾讯 | [短信使用文档](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/pages?sort_id=5578491&doc_id=1469725) | 短信发送 |
|
||||||
|
| 监控框架 | SpringBoot-Admin | [SpringBoot-Admin文档](https://codecentric.github.io/spring-boot-admin/current/) | 全方位服务监控 |
|
||||||
|
| 校验框架 | Validation | [Validation文档](https://docs.jboss.org/hibernate/stable/validator/reference/en-US/html_single/) | 增强接口安全性、严谨性 支持国际化 |
|
||||||
|
| Excel框架 | Alibaba EasyExcel | [EasyExcel文档](https://www.yuque.com/easyexcel/doc/easyexcel) | 性能优异 扩展性强 |
|
||||||
|
| 文档框架 | SpringDoc、javadoc | [接口文档](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/pages?sort_id=5805266&doc_id=1469725) | 无注解零入侵基于java注释 |
|
||||||
|
| 工具类框架 | Hutool、Lombok | [Hutool文档](https://www.hutool.cn/docs/) | 减少代码冗余 增加安全性 |
|
||||||
|
| 代码生成器 | 适配MP、SpringDoc规范化代码 | [代码生成文档](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/pages?sort_id=5522329&doc_id=1469725) | 一键生成前后端代码 |
|
||||||
|
| 部署方式 | Docker | [Docker文档](https://docs.docker.com/) | 容器编排 一键部署业务集群 |
|
||||||
|
| 国际化 | SpringMessage | [SpringMVC文档](https://docs.spring.io/spring-framework/docs/current/reference/html/web.html#mvc) | Spring标准国际化方案 |
|
||||||
|
|
||||||
## 在线体验
|
## 参考文档
|
||||||
|
|
||||||
- admin/admin123
|
使用框架前请仔细阅读文档重点注意事项
|
||||||
- 陆陆续续收到一些打赏,为了更好的体验已用于演示服务器升级。谢谢各位小伙伴。
|
<br>
|
||||||
|
>[初始化项目 必看](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/pages?sort_id=4164117&doc_id=1469725)
|
||||||
|
>>[https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/pages?sort_id=4164117&doc_id=1469725](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/pages?sort_id=4164117&doc_id=1469725)
|
||||||
|
>
|
||||||
|
>[专栏与视频 入门必看](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/pages?sort_id=5473272&doc_id=1469725)
|
||||||
|
>>[https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/pages?sort_id=5473272&doc_id=1469725](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/pages?sort_id=5473272&doc_id=1469725)
|
||||||
|
>
|
||||||
|
>[部署项目 必看](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/pages?sort_id=4219382&doc_id=1469725)
|
||||||
|
>>[https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/pages?sort_id=4219382&doc_id=1469725](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/pages?sort_id=4219382&doc_id=1469725)
|
||||||
|
>
|
||||||
|
>[参考文档 Wiki](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/pages)
|
||||||
|
>>[https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/pages](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/pages)
|
||||||
|
|
||||||
演示地址:http://vue.ruoyi.vip
|
## 软件架构图
|
||||||
文档地址:http://doc.ruoyi.vip
|
|
||||||
|
|
||||||
## 演示图
|

|
||||||
|
## 贡献代码
|
||||||
|
|
||||||
<table>
|
欢迎各路英雄豪杰 `PR` 代码 请提交到 `dev` 开发分支 统一测试发版
|
||||||
|
|
||||||
|
框架定位为 `通用后台管理系统(分布式集群强化)` 原则上不接受业务 `PR`
|
||||||
|
|
||||||
|
### 其他
|
||||||
|
|
||||||
|
* 同步升级 RuoYi-Vue
|
||||||
|
* GitHub 地址 [RuoYi-Vue-Plus-github](https://github.com/JavaLionLi/RuoYi-Vue-Plus)
|
||||||
|
* 单模块 分支 [RuoYi-Vue-Plus-fast](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/tree/fast/)
|
||||||
|
* 微服务 分支 [RuoYi-Cloud-Plus](https://gitee.com/JavaLionLi/RuoYi-Cloud-Plus)
|
||||||
|
* 用户扩展项目 [扩展项目列表](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/pages?sort_id=4478302&doc_id=1469725)
|
||||||
|
|
||||||
|
## 加群与捐献
|
||||||
|
>[加群与捐献](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/加群与捐献?sort_id=4104598)
|
||||||
|
>>[https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/加群与捐献?sort_id=4104598](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/加群与捐献?sort_id=4104598)
|
||||||
|
|
||||||
|
## 捐献作者
|
||||||
|
作者为兼职做开源,平时还需要工作,如果帮到了您可以请作者吃个盒饭
|
||||||
|
<img src="https://images.gitee.com/uploads/images/2022/0218/213734_b1b8197f_1766278.jpeg" width="300px" height="450px" />
|
||||||
|
<img src="https://images.gitee.com/uploads/images/2021/0525/101713_3d18b119_1766278.jpeg" width="300px" height="450px" />
|
||||||
|
|
||||||
|
## 业务功能
|
||||||
|
|
||||||
|
| 功能 | 介绍 |
|
||||||
|
|---|---|
|
||||||
|
| 用户管理 | 用户是系统操作者,该功能主要完成系统用户配置。 |
|
||||||
|
| 部门管理 | 配置系统组织机构(公司、部门、小组),树结构展现支持数据权限。 |
|
||||||
|
| 岗位管理 | 配置系统用户所属担任职务。 |
|
||||||
|
| 菜单管理 | 配置系统菜单,操作权限,按钮权限标识等。 |
|
||||||
|
| 角色管理 | 角色菜单权限分配、设置角色按机构进行数据范围权限划分。 |
|
||||||
|
| 字典管理 | 对系统中经常使用的一些较为固定的数据进行维护。 |
|
||||||
|
| 参数管理 | 对系统动态配置常用参数。 |
|
||||||
|
| 通知公告 | 系统通知公告信息发布维护。 |
|
||||||
|
| 操作日志 | 系统正常操作日志记录和查询;系统异常信息日志记录和查询。 |
|
||||||
|
| 登录日志 | 系统登录日志记录查询包含登录异常。 |
|
||||||
|
| 文件管理 | 系统文件上传、下载等管理。 |
|
||||||
|
| 定时任务 | 在线(添加、修改、删除)任务调度包含执行结果日志。 |
|
||||||
|
| 代码生成 | 前后端代码的生成(java、html、xml、sql)支持CRUD下载 。 |
|
||||||
|
| 系统接口 | 根据业务代码自动生成相关的api接口文档。 |
|
||||||
|
| 服务监控 | 监视集群系统CPU、内存、磁盘、堆栈、在线日志、Spring相关配置等。 |
|
||||||
|
| 缓存监控 | 对系统的缓存信息查询,命令统计等。 |
|
||||||
|
| 在线构建器 | 拖动表单元素生成相应的HTML代码。 |
|
||||||
|
| 连接池监视 | 监视当前系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈。 |
|
||||||
|
| 使用案例 | 系统的一些功能案例 |
|
||||||
|
|
||||||
|
## 演示图例
|
||||||
|
|
||||||
|
<table border="1" cellpadding="1" cellspacing="1" style="width:500px">
|
||||||
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/cd1f90be5f2684f4560c9519c0f2a232ee8.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-972235bcbe3518dedd351ff0e2ee7d1031c.png" width="1920" /></td>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/1cbcf0e6f257c7d3a063c0e3f2ff989e4b3.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-5e0097702fa91e2e36391de8127676a7fa1.png" width="1920" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-8074972883b5ba0622e13246738ebba237a.png"/></td>
|
<td>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-9f88719cdfca9af2e58b352a20e23d43b12.png"/></td>
|
<p><img src="https://oscimg.oschina.net/oscnet/up-e56e3828f48cd9886d88731766f06d5f3c1.png" width="1920" /></p>
|
||||||
|
</td>
|
||||||
|
<td><img src="https://oscimg.oschina.net/oscnet/up-0715990ea1a9f254ec2138fcd063c1f556a.png" width="1920" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-39bf2584ec3a529b0d5a3b70d15c9b37646.png"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-eaf5417ccf921bb64abb959e3d8e290467f.png" width="1920" /></td>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-936ec82d1f4872e1bc980927654b6007307.png"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-fc285cf33095ebf8318de6999af0f473861.png" width="1920" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-b2d62ceb95d2dd9b3fbe157bb70d26001e9.png"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-60c83fd8bd61c29df6dbf47c88355e9c272.png" width="1920" /></td>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-d67451d308b7a79ad6819723396f7c3d77a.png"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-7f731948c8b73c7d90f67f9e1c7a534d5c3.png" width="1920" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/5e8c387724954459291aafd5eb52b456f53.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-e4de89b5e2d20c52d3c3a47f9eb88eb8526.png" width="1920" /></td>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/644e78da53c2e92a95dfda4f76e6d117c4b.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-8791d823a508eb90e67c604f36f57491a67.png" width="1920" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-8370a0d02977eebf6dbf854c8450293c937.png"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-4589afd99982ead331785299b894174feb6.png" width="1920" /></td>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-49003ed83f60f633e7153609a53a2b644f7.png"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-8ea177cdacaea20995daf2f596b15232561.png" width="1920" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-d4fe726319ece268d4746602c39cffc0621.png"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-32d1d04c55c11f74c9129fbbc58399728c4.png" width="1920" /></td>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-c195234bbcd30be6927f037a6755e6ab69c.png"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-04fa118f7631b7ae6fd72299ca0a1430a63.png" width="1920" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/b6115bc8c31de52951982e509930b20684a.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-fe7e85b65827802bfaadf3acd42568b58c7.png" width="1920" /></td>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-5e4daac0bb59612c5038448acbcef235e3a.png"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-eff2b02a54f8188022d8498cfe6af6fcc06.png" width="1920" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
## 若依前后端分离交流群
|
|
||||||
|
|
||||||
QQ群: [](https://jq.qq.com/?_wv=1027&k=5bVB1og) [](https://jq.qq.com/?_wv=1027&k=5eiA4DH) [](https://jq.qq.com/?_wv=1027&k=5AxMKlC) [](https://jq.qq.com/?_wv=1027&k=51G72yr) [](https://jq.qq.com/?_wv=1027&k=VvjN2nvu) 点击按钮入群。
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
@echo off
|
|
||||||
echo.
|
|
||||||
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD>
|
|
||||||
echo.
|
|
||||||
|
|
||||||
%~d0
|
|
||||||
cd %~dp0
|
|
||||||
|
|
||||||
cd ..
|
|
||||||
call mvn clean
|
|
||||||
|
|
||||||
pause
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
@echo off
|
|
||||||
echo.
|
|
||||||
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD>Web<65><62><EFBFBD>̣<EFBFBD><CCA3><EFBFBD><EFBFBD><EFBFBD>war/jar<61><72><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
|
|
||||||
echo.
|
|
||||||
|
|
||||||
%~d0
|
|
||||||
cd %~dp0
|
|
||||||
|
|
||||||
cd ..
|
|
||||||
call mvn clean package -Dmaven.test.skip=true
|
|
||||||
|
|
||||||
pause
|
|
||||||
14
bin/run.bat
14
bin/run.bat
@@ -1,14 +0,0 @@
|
|||||||
@echo off
|
|
||||||
echo.
|
|
||||||
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD>Web<65><62><EFBFBD>̡<EFBFBD>
|
|
||||||
echo.
|
|
||||||
|
|
||||||
cd %~dp0
|
|
||||||
cd ../ruoyi-admin/target
|
|
||||||
|
|
||||||
set JAVA_OPTS=-Xms256m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
|
||||||
|
|
||||||
java -jar %JAVA_OPTS% ruoyi-admin.jar
|
|
||||||
|
|
||||||
cd bin
|
|
||||||
pause
|
|
||||||
Binary file not shown.
411
pom.xml
411
pom.xml
@@ -5,36 +5,78 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>ruoyi-vue-plus</artifactId>
|
||||||
<version>3.4.0</version>
|
<version>4.5.0</version>
|
||||||
|
|
||||||
<name>ruoyi</name>
|
<name>RuoYi-Vue-Plus</name>
|
||||||
<url>http://www.ruoyi.vip</url>
|
<url>https://gitee.com/JavaLionLi/RuoYi-Vue-Plus</url>
|
||||||
<description>若依管理系统</description>
|
<description>RuoYi-Vue-Plus后台管理系统</description>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<ruoyi.version>3.4.0</ruoyi.version>
|
<ruoyi-vue-plus.version>4.5.0</ruoyi-vue-plus.version>
|
||||||
|
<spring-boot.version>2.7.7</spring-boot.version>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
<java.version>1.8</java.version>
|
<java.version>1.8</java.version>
|
||||||
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
|
<maven-jar-plugin.version>3.2.2</maven-jar-plugin.version>
|
||||||
<druid.version>1.2.4</druid.version>
|
<spring-boot.mybatis>2.2.2</spring-boot.mybatis>
|
||||||
<bitwalker.version>1.21</bitwalker.version>
|
<springdoc.version>1.6.14</springdoc.version>
|
||||||
<swagger.version>2.9.2</swagger.version>
|
<poi.version>5.2.3</poi.version>
|
||||||
<kaptcha.version>2.3.2</kaptcha.version>
|
<easyexcel.version>3.1.5</easyexcel.version>
|
||||||
<mybatis-spring-boot.version>2.1.4</mybatis-spring-boot.version>
|
<velocity.version>2.3</velocity.version>
|
||||||
<pagehelper.boot.version>1.3.0</pagehelper.boot.version>
|
<satoken.version>1.34.0</satoken.version>
|
||||||
<fastjson.version>1.2.75</fastjson.version>
|
<mybatis-plus.version>3.5.3.1</mybatis-plus.version>
|
||||||
<oshi.version>5.6.0</oshi.version>
|
<p6spy.version>3.9.1</p6spy.version>
|
||||||
<jna.version>5.7.0</jna.version>
|
<hutool.version>5.8.11</hutool.version>
|
||||||
<commons.io.version>2.5</commons.io.version>
|
<okhttp.version>4.10.0</okhttp.version>
|
||||||
<commons.fileupload.version>1.3.3</commons.fileupload.version>
|
<spring-boot-admin.version>2.7.10</spring-boot-admin.version>
|
||||||
<commons.collections.version>3.2.2</commons.collections.version>
|
<redisson.version>3.19.1</redisson.version>
|
||||||
<poi.version>4.1.2</poi.version>
|
<lock4j.version>2.2.3</lock4j.version>
|
||||||
<velocity.version>1.7</velocity.version>
|
<dynamic-ds.version>3.5.2</dynamic-ds.version>
|
||||||
<jwt.version>0.9.1</jwt.version>
|
<alibaba-ttl.version>2.14.2</alibaba-ttl.version>
|
||||||
|
<xxl-job.version>2.3.1</xxl-job.version>
|
||||||
|
<lombok.version>1.18.24</lombok.version>
|
||||||
|
|
||||||
|
<!-- 临时修复 snakeyaml 漏洞 -->
|
||||||
|
<snakeyaml.version>1.33</snakeyaml.version>
|
||||||
|
|
||||||
|
<!-- OSS 配置 -->
|
||||||
|
<aws-java-sdk-s3.version>1.12.373</aws-java-sdk-s3.version>
|
||||||
|
<!-- SMS 配置 -->
|
||||||
|
<aliyun.sms.version>2.0.23</aliyun.sms.version>
|
||||||
|
<tencent.sms.version>3.1.660</tencent.sms.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>local</id>
|
||||||
|
<properties>
|
||||||
|
<!-- 环境标识,需要与配置文件的名称相对应 -->
|
||||||
|
<profiles.active>local</profiles.active>
|
||||||
|
<logging.level>debug</logging.level>
|
||||||
|
</properties>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>dev</id>
|
||||||
|
<properties>
|
||||||
|
<!-- 环境标识,需要与配置文件的名称相对应 -->
|
||||||
|
<profiles.active>dev</profiles.active>
|
||||||
|
<logging.level>debug</logging.level>
|
||||||
|
</properties>
|
||||||
|
<activation>
|
||||||
|
<!-- 默认环境 -->
|
||||||
|
<activeByDefault>true</activeByDefault>
|
||||||
|
</activation>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>prod</id>
|
||||||
|
<properties>
|
||||||
|
<profiles.active>prod</profiles.active>
|
||||||
|
<logging.level>warn</logging.level>
|
||||||
|
</properties>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
|
|
||||||
<!-- 依赖声明 -->
|
<!-- 依赖声明 -->
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@@ -43,177 +85,227 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-dependencies</artifactId>
|
<artifactId>spring-boot-dependencies</artifactId>
|
||||||
<version>2.2.13.RELEASE</version>
|
<version>${spring-boot.version}</version>
|
||||||
<type>pom</type>
|
<type>pom</type>
|
||||||
<scope>import</scope>
|
<scope>import</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!--阿里数据库连接池 -->
|
<!-- hutool 的依赖配置-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba</groupId>
|
<groupId>cn.hutool</groupId>
|
||||||
<artifactId>druid-spring-boot-starter</artifactId>
|
<artifactId>hutool-bom</artifactId>
|
||||||
<version>${druid.version}</version>
|
<version>${hutool.version}</version>
|
||||||
</dependency>
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
<!-- 解析客户端操作系统、浏览器等 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>eu.bitwalker</groupId>
|
|
||||||
<artifactId>UserAgentUtils</artifactId>
|
|
||||||
<version>${bitwalker.version}</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- SpringBoot集成mybatis框架 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.mybatis.spring.boot</groupId>
|
|
||||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
|
||||||
<version>${mybatis-spring-boot.version}</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- pagehelper 分页插件 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.github.pagehelper</groupId>
|
|
||||||
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
|
||||||
<version>${pagehelper.boot.version}</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- 获取系统信息 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.github.oshi</groupId>
|
|
||||||
<artifactId>oshi-core</artifactId>
|
|
||||||
<version>${oshi.version}</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.java.dev.jna</groupId>
|
<groupId>org.springdoc</groupId>
|
||||||
<artifactId>jna</artifactId>
|
<artifactId>springdoc-openapi-webmvc-core</artifactId>
|
||||||
<version>${jna.version}</version>
|
<version>${springdoc.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.java.dev.jna</groupId>
|
<groupId>org.springdoc</groupId>
|
||||||
<artifactId>jna-platform</artifactId>
|
<artifactId>springdoc-openapi-javadoc</artifactId>
|
||||||
<version>${jna.version}</version>
|
<version>${springdoc.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- swagger2-->
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.springfox</groupId>
|
<groupId>org.projectlombok</groupId>
|
||||||
<artifactId>springfox-swagger2</artifactId>
|
<artifactId>lombok</artifactId>
|
||||||
<version>${swagger.version}</version>
|
<version>${lombok.version}</version>
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>io.swagger</groupId>
|
|
||||||
<artifactId>swagger-annotations</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>io.swagger</groupId>
|
|
||||||
<artifactId>swagger-models</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- swagger2-UI-->
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.springfox</groupId>
|
<groupId>org.apache.poi</groupId>
|
||||||
<artifactId>springfox-swagger-ui</artifactId>
|
<artifactId>poi</artifactId>
|
||||||
<version>${swagger.version}</version>
|
<version>${poi.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!--io常用工具类 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>commons-io</groupId>
|
|
||||||
<artifactId>commons-io</artifactId>
|
|
||||||
<version>${commons.io.version}</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!--文件上传工具类 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>commons-fileupload</groupId>
|
|
||||||
<artifactId>commons-fileupload</artifactId>
|
|
||||||
<version>${commons.fileupload.version}</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- excel工具 -->
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.poi</groupId>
|
<groupId>org.apache.poi</groupId>
|
||||||
<artifactId>poi-ooxml</artifactId>
|
<artifactId>poi-ooxml</artifactId>
|
||||||
<version>${poi.version}</version>
|
<version>${poi.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!--velocity代码生成使用模板 -->
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.velocity</groupId>
|
<groupId>com.alibaba</groupId>
|
||||||
<artifactId>velocity</artifactId>
|
<artifactId>easyexcel</artifactId>
|
||||||
<version>${velocity.version}</version>
|
<version>${easyexcel.version}</version>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>commons-collections</groupId>
|
<groupId>org.apache.poi</groupId>
|
||||||
<artifactId>commons-collections</artifactId>
|
<artifactId>poi-ooxml-schemas</artifactId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- collections工具类 -->
|
<!-- velocity代码生成使用模板 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-collections</groupId>
|
<groupId>org.apache.velocity</groupId>
|
||||||
<artifactId>commons-collections</artifactId>
|
<artifactId>velocity-engine-core</artifactId>
|
||||||
<version>${commons.collections.version}</version>
|
<version>${velocity.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Sa-Token 权限认证, 在线文档:http://sa-token.dev33.cn/ -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.dev33</groupId>
|
||||||
|
<artifactId>sa-token-spring-boot-starter</artifactId>
|
||||||
|
<version>${satoken.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- Sa-Token 整合 jwt -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.dev33</groupId>
|
||||||
|
<artifactId>sa-token-jwt</artifactId>
|
||||||
|
<version>${satoken.version}</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>cn.hutool</groupId>
|
||||||
|
<artifactId>hutool-all</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- dynamic-datasource 多数据源-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
|
||||||
|
<version>${dynamic-ds.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||||
|
<version>${mybatis-plus.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- sql性能分析插件 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>p6spy</groupId>
|
||||||
|
<artifactId>p6spy</artifactId>
|
||||||
|
<version>${p6spy.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.squareup.okhttp3</groupId>
|
||||||
|
<artifactId>okhttp</artifactId>
|
||||||
|
<version>${okhttp.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.amazonaws</groupId>
|
||||||
|
<artifactId>aws-java-sdk-s3</artifactId>
|
||||||
|
<version>${aws-java-sdk-s3.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.aliyun</groupId>
|
||||||
|
<artifactId>dysmsapi20170525</artifactId>
|
||||||
|
<version>${aliyun.sms.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.tencentcloudapi</groupId>
|
||||||
|
<artifactId>tencentcloud-sdk-java-sms</artifactId>
|
||||||
|
<version>${tencent.sms.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>de.codecentric</groupId>
|
||||||
|
<artifactId>spring-boot-admin-starter-server</artifactId>
|
||||||
|
<version>${spring-boot-admin.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>de.codecentric</groupId>
|
||||||
|
<artifactId>spring-boot-admin-starter-client</artifactId>
|
||||||
|
<version>${spring-boot-admin.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!--redisson-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.redisson</groupId>
|
||||||
|
<artifactId>redisson-spring-boot-starter</artifactId>
|
||||||
|
<version>${redisson.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>lock4j-redisson-spring-boot-starter</artifactId>
|
||||||
|
<version>${lock4j.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- xxl-job-core -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.xuxueli</groupId>
|
||||||
|
<artifactId>xxl-job-core</artifactId>
|
||||||
|
<version>${xxl-job.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 阿里JSON解析器 -->
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba</groupId>
|
<groupId>com.alibaba</groupId>
|
||||||
<artifactId>fastjson</artifactId>
|
<artifactId>transmittable-thread-local</artifactId>
|
||||||
<version>${fastjson.version}</version>
|
<version>${alibaba-ttl.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!--Token生成与解析-->
|
<!-- 临时修复 snakeyaml 漏洞 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.jsonwebtoken</groupId>
|
<groupId>org.yaml</groupId>
|
||||||
<artifactId>jjwt</artifactId>
|
<artifactId>snakeyaml</artifactId>
|
||||||
<version>${jwt.version}</version>
|
<version>${snakeyaml.version}</version>
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!--验证码 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.github.penggle</groupId>
|
|
||||||
<artifactId>kaptcha</artifactId>
|
|
||||||
<version>${kaptcha.version}</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 定时任务 -->
|
<!-- 定时任务 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-quartz</artifactId>
|
<artifactId>ruoyi-job</artifactId>
|
||||||
<version>${ruoyi.version}</version>
|
<version>${ruoyi-vue-plus.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 代码生成-->
|
<!-- 代码生成-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-generator</artifactId>
|
<artifactId>ruoyi-generator</artifactId>
|
||||||
<version>${ruoyi.version}</version>
|
<version>${ruoyi-vue-plus.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 核心模块-->
|
<!-- 核心模块-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-framework</artifactId>
|
<artifactId>ruoyi-framework</artifactId>
|
||||||
<version>${ruoyi.version}</version>
|
<version>${ruoyi-vue-plus.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 系统模块-->
|
<!-- 系统模块-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-system</artifactId>
|
<artifactId>ruoyi-system</artifactId>
|
||||||
<version>${ruoyi.version}</version>
|
<version>${ruoyi-vue-plus.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 通用工具-->
|
<!-- 通用工具-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-common</artifactId>
|
<artifactId>ruoyi-common</artifactId>
|
||||||
<version>${ruoyi.version}</version>
|
<version>${ruoyi-vue-plus.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- OSS对象存储模块 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-oss</artifactId>
|
||||||
|
<version>${ruoyi-vue-plus.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- SMS短信模块 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-sms</artifactId>
|
||||||
|
<version>${ruoyi-vue-plus.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- demo模块 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-demo</artifactId>
|
||||||
|
<version>${ruoyi-vue-plus.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
@@ -223,37 +315,84 @@
|
|||||||
<module>ruoyi-admin</module>
|
<module>ruoyi-admin</module>
|
||||||
<module>ruoyi-framework</module>
|
<module>ruoyi-framework</module>
|
||||||
<module>ruoyi-system</module>
|
<module>ruoyi-system</module>
|
||||||
<module>ruoyi-quartz</module>
|
<module>ruoyi-job</module>
|
||||||
<module>ruoyi-generator</module>
|
<module>ruoyi-generator</module>
|
||||||
<module>ruoyi-common</module>
|
<module>ruoyi-common</module>
|
||||||
|
<module>ruoyi-demo</module>
|
||||||
|
<module>ruoyi-extend</module>
|
||||||
|
<module>ruoyi-oss</module>
|
||||||
|
<module>ruoyi-sms</module>
|
||||||
</modules>
|
</modules>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.1</version>
|
<version>3.9.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>${java.version}</source>
|
<source>${java.version}</source>
|
||||||
<target>${java.version}</target>
|
<target>${java.version}</target>
|
||||||
<encoding>${project.build.sourceEncoding}</encoding>
|
<encoding>${project.build.sourceEncoding}</encoding>
|
||||||
|
<annotationProcessorPaths>
|
||||||
|
<path>
|
||||||
|
<groupId>com.github.therapi</groupId>
|
||||||
|
<artifactId>therapi-runtime-javadoc-scribe</artifactId>
|
||||||
|
<version>0.15.0</version>
|
||||||
|
</path>
|
||||||
|
<path>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<version>${lombok.version}</version>
|
||||||
|
</path>
|
||||||
|
<path>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||||
|
<version>${spring-boot.version}</version>
|
||||||
|
</path>
|
||||||
|
</annotationProcessorPaths>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<!-- 单元测试使用 -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>2.22.2</version>
|
||||||
|
<configuration>
|
||||||
|
<argLine>-Dfile.encoding=UTF-8</argLine>
|
||||||
|
<!-- 根据打包环境执行对应的@Tag测试方法 -->
|
||||||
|
<groups>${profiles.active}</groups>
|
||||||
|
<!-- 排除标签 -->
|
||||||
|
<excludedGroups>exclude</excludedGroups>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
<!-- 关闭过滤 -->
|
||||||
|
<filtering>false</filtering>
|
||||||
|
</resource>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
<!-- 引入所有 匹配文件进行过滤 -->
|
||||||
|
<includes>
|
||||||
|
<include>application*</include>
|
||||||
|
<include>bootstrap*</include>
|
||||||
|
<include>banner*</include>
|
||||||
|
</includes>
|
||||||
|
<!-- 启用过滤 即该资源中的变量将会被过滤器中的值替换 -->
|
||||||
|
<filtering>true</filtering>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
<id>public</id>
|
<id>public</id>
|
||||||
<name>aliyun nexus</name>
|
<name>aliyun nexus</name>
|
||||||
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
|
<url>https://maven.aliyun.com/repository/public/</url>
|
||||||
<releases>
|
<releases>
|
||||||
<enabled>true</enabled>
|
<enabled>true</enabled>
|
||||||
</releases>
|
</releases>
|
||||||
@@ -264,7 +403,7 @@
|
|||||||
<pluginRepository>
|
<pluginRepository>
|
||||||
<id>public</id>
|
<id>public</id>
|
||||||
<name>aliyun nexus</name>
|
<name>aliyun nexus</name>
|
||||||
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
|
<url>https://maven.aliyun.com/repository/public/</url>
|
||||||
<releases>
|
<releases>
|
||||||
<enabled>true</enabled>
|
<enabled>true</enabled>
|
||||||
</releases>
|
</releases>
|
||||||
@@ -275,3 +414,5 @@
|
|||||||
</pluginRepositories>
|
</pluginRepositories>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
23
ruoyi-admin/Dockerfile
Normal file
23
ruoyi-admin/Dockerfile
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
FROM anapsix/alpine-java:8_server-jre_unlimited
|
||||||
|
|
||||||
|
MAINTAINER Lion Li
|
||||||
|
|
||||||
|
RUN mkdir -p /ruoyi/server/logs \
|
||||||
|
/ruoyi/server/temp \
|
||||||
|
/ruoyi/skywalking/agent
|
||||||
|
|
||||||
|
WORKDIR /ruoyi/server
|
||||||
|
|
||||||
|
ENV SERVER_PORT=8080
|
||||||
|
|
||||||
|
EXPOSE ${SERVER_PORT}
|
||||||
|
|
||||||
|
ADD ./target/ruoyi-admin.jar ./app.jar
|
||||||
|
|
||||||
|
ENTRYPOINT ["java", \
|
||||||
|
"-Djava.security.egd=file:/dev/./urandom", \
|
||||||
|
"-Dserver.port=${SERVER_PORT}", \
|
||||||
|
# 应用名称 如果想区分集群节点监控 改成不同的名称即可
|
||||||
|
# "-Dskywalking.agent.service_name=ruoyi-server", \
|
||||||
|
# "-javaagent:/ruoyi/skywalking/agent/skywalking-agent.jar", \
|
||||||
|
"-jar", "app.jar"]
|
||||||
@@ -3,9 +3,9 @@
|
|||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
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">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>ruoyi-vue-plus</artifactId>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<version>3.4.0</version>
|
<version>4.5.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
@@ -24,35 +24,25 @@
|
|||||||
<optional>true</optional> <!-- 表示依赖不会传递 -->
|
<optional>true</optional> <!-- 表示依赖不会传递 -->
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- swagger2-->
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.springfox</groupId>
|
|
||||||
<artifactId>springfox-swagger2</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!--防止进入swagger页面报类型转换错误,排除2.9.2中的引用,手动增加1.5.21版本-->
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.swagger</groupId>
|
|
||||||
<artifactId>swagger-annotations</artifactId>
|
|
||||||
<version>1.5.21</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.swagger</groupId>
|
|
||||||
<artifactId>swagger-models</artifactId>
|
|
||||||
<version>1.5.21</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- swagger2-UI-->
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.springfox</groupId>
|
|
||||||
<artifactId>springfox-swagger-ui</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- Mysql驱动包 -->
|
<!-- Mysql驱动包 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>mysql</groupId>
|
<groupId>com.mysql</groupId>
|
||||||
<artifactId>mysql-connector-java</artifactId>
|
<artifactId>mysql-connector-j</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<!-- Oracle -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.oracle.database.jdbc</groupId>
|
||||||
|
<artifactId>ojdbc8</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<!-- PostgreSql -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.postgresql</groupId>
|
||||||
|
<artifactId>postgresql</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<!-- SqlServer -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.microsoft.sqlserver</groupId>
|
||||||
|
<artifactId>mssql-jdbc</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 核心模块-->
|
<!-- 核心模块-->
|
||||||
@@ -61,10 +51,19 @@
|
|||||||
<artifactId>ruoyi-framework</artifactId>
|
<artifactId>ruoyi-framework</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 定时任务-->
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-quartz</artifactId>
|
<artifactId>ruoyi-system</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-job</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-oss</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 代码生成-->
|
<!-- 代码生成-->
|
||||||
@@ -73,14 +72,39 @@
|
|||||||
<artifactId>ruoyi-generator</artifactId>
|
<artifactId>ruoyi-generator</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- demo模块 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-demo</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- skywalking 整合 logback -->
|
||||||
|
<!-- <dependency>-->
|
||||||
|
<!-- <groupId>org.apache.skywalking</groupId>-->
|
||||||
|
<!-- <artifactId>apm-toolkit-logback-1.x</artifactId>-->
|
||||||
|
<!-- <version>${与你的agent探针版本保持一致}</version>-->
|
||||||
|
<!-- </dependency>-->
|
||||||
|
<!-- <dependency>-->
|
||||||
|
<!-- <groupId>org.apache.skywalking</groupId>-->
|
||||||
|
<!-- <artifactId>apm-toolkit-trace</artifactId>-->
|
||||||
|
<!-- <version>${与你的agent探针版本保持一致}</version>-->
|
||||||
|
<!-- </dependency>-->
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
<finalName>${project.artifactId}</finalName>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
<version>2.1.1.RELEASE</version>
|
<version>${spring-boot.version}</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
|
<fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
|
||||||
</configuration>
|
</configuration>
|
||||||
@@ -95,14 +119,13 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-war-plugin</artifactId>
|
<artifactId>maven-war-plugin</artifactId>
|
||||||
<version>3.1.0</version>
|
<version>3.2.2</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||||
<warName>${project.artifactId}</warName>
|
<warName>${project.artifactId}</warName>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
<finalName>${project.artifactId}</finalName>
|
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@@ -2,29 +2,23 @@ package com.ruoyi;
|
|||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
import org.springframework.boot.context.metrics.buffering.BufferingApplicationStartup;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 启动程序
|
* 启动程序
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
|
|
||||||
public class RuoYiApplication
|
@SpringBootApplication
|
||||||
{
|
public class RuoYiApplication {
|
||||||
public static void main(String[] args)
|
|
||||||
{
|
public static void main(String[] args) {
|
||||||
// System.setProperty("spring.devtools.restart.enabled", "false");
|
System.setProperty("spring.devtools.restart.enabled", "false");
|
||||||
SpringApplication.run(RuoYiApplication.class, args);
|
SpringApplication application = new SpringApplication(RuoYiApplication.class);
|
||||||
System.out.println("(♥◠‿◠)ノ゙ 若依启动成功 ლ(´ڡ`ლ)゙ \n" +
|
application.setApplicationStartup(new BufferingApplicationStartup(2048));
|
||||||
" .-------. ____ __ \n" +
|
application.run(args);
|
||||||
" | _ _ \\ \\ \\ / / \n" +
|
System.out.println("(♥◠‿◠)ノ゙ RuoYi-Vue-Plus启动成功 ლ(´ڡ`ლ)゙");
|
||||||
" | ( ' ) | \\ _. / ' \n" +
|
|
||||||
" |(_ o _) / _( )_ .' \n" +
|
|
||||||
" | (_,_).' __ ___(_ o _)' \n" +
|
|
||||||
" | |\\ \\ | || |(_,_)' \n" +
|
|
||||||
" | | \\ `' /| `-' / \n" +
|
|
||||||
" | | \\ / \\ / \n" +
|
|
||||||
" ''-' `'-' `-..-' ");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,11 +8,11 @@ import org.springframework.boot.web.servlet.support.SpringBootServletInitializer
|
|||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
public class RuoYiServletInitializer extends SpringBootServletInitializer
|
public class RuoYiServletInitializer extends SpringBootServletInitializer {
|
||||||
{
|
|
||||||
@Override
|
@Override
|
||||||
protected SpringApplicationBuilder configure(SpringApplicationBuilder application)
|
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
|
||||||
{
|
|
||||||
return application.sources(RuoYiApplication.class);
|
return application.sources(RuoYiApplication.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,86 +1,112 @@
|
|||||||
package com.ruoyi.web.controller.common;
|
package com.ruoyi.web.controller.common;
|
||||||
|
|
||||||
import java.awt.image.BufferedImage;
|
import cn.dev33.satoken.annotation.SaIgnore;
|
||||||
import java.io.IOException;
|
import cn.hutool.captcha.AbstractCaptcha;
|
||||||
import java.util.concurrent.TimeUnit;
|
import cn.hutool.captcha.generator.CodeGenerator;
|
||||||
import javax.annotation.Resource;
|
import cn.hutool.core.util.IdUtil;
|
||||||
import javax.imageio.ImageIO;
|
import cn.hutool.core.util.RandomUtil;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import com.ruoyi.common.constant.CacheConstants;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import com.ruoyi.common.constant.Constants;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import com.ruoyi.common.core.domain.R;
|
||||||
import org.springframework.util.FastByteArrayOutputStream;
|
import com.ruoyi.common.enums.CaptchaType;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import com.ruoyi.common.utils.redis.RedisUtils;
|
||||||
|
import com.ruoyi.common.utils.reflect.ReflectUtils;
|
||||||
|
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||||
|
import com.ruoyi.framework.config.properties.CaptchaProperties;
|
||||||
|
import com.ruoyi.sms.config.properties.SmsProperties;
|
||||||
|
import com.ruoyi.sms.core.SmsTemplate;
|
||||||
|
import com.ruoyi.sms.entity.SmsResult;
|
||||||
|
import com.ruoyi.system.service.ISysConfigService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.expression.Expression;
|
||||||
|
import org.springframework.expression.ExpressionParser;
|
||||||
|
import org.springframework.expression.spel.standard.SpelExpressionParser;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
import com.google.code.kaptcha.Producer;
|
|
||||||
import com.ruoyi.common.constant.Constants;
|
import javax.validation.constraints.NotBlank;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import java.time.Duration;
|
||||||
import com.ruoyi.common.core.redis.RedisCache;
|
import java.util.HashMap;
|
||||||
import com.ruoyi.common.utils.sign.Base64;
|
import java.util.Map;
|
||||||
import com.ruoyi.common.utils.uuid.IdUtils;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 验证码操作处理
|
* 验证码操作处理
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author Lion Li
|
||||||
*/
|
*/
|
||||||
|
@SaIgnore
|
||||||
|
@Slf4j
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
@RestController
|
@RestController
|
||||||
public class CaptchaController
|
public class CaptchaController {
|
||||||
{
|
|
||||||
@Resource(name = "captchaProducer")
|
|
||||||
private Producer captchaProducer;
|
|
||||||
|
|
||||||
@Resource(name = "captchaProducerMath")
|
private final CaptchaProperties captchaProperties;
|
||||||
private Producer captchaProducerMath;
|
private final SmsProperties smsProperties;
|
||||||
|
private final ISysConfigService configService;
|
||||||
|
|
||||||
@Autowired
|
/**
|
||||||
private RedisCache redisCache;
|
* 短信验证码
|
||||||
|
*
|
||||||
// 验证码类型
|
* @param phonenumber 用户手机号
|
||||||
@Value("${ruoyi.captchaType}")
|
*/
|
||||||
private String captchaType;
|
@GetMapping("/captchaSms")
|
||||||
|
public R<Void> smsCaptcha(@NotBlank(message = "{user.phonenumber.not.blank}")
|
||||||
|
String phonenumber) {
|
||||||
|
if (!smsProperties.getEnabled()) {
|
||||||
|
return R.fail("当前系统没有开启短信功能!");
|
||||||
|
}
|
||||||
|
String key = CacheConstants.CAPTCHA_CODE_KEY + phonenumber;
|
||||||
|
String code = RandomUtil.randomNumbers(4);
|
||||||
|
RedisUtils.setCacheObject(key, code, Duration.ofMinutes(Constants.CAPTCHA_EXPIRATION));
|
||||||
|
// 验证码模板id 自行处理 (查数据库或写死均可)
|
||||||
|
String templateId = "";
|
||||||
|
Map<String, String> map = new HashMap<>(1);
|
||||||
|
map.put("code", code);
|
||||||
|
SmsTemplate smsTemplate = SpringUtils.getBean(SmsTemplate.class);
|
||||||
|
SmsResult result = smsTemplate.send(phonenumber, templateId, map);
|
||||||
|
if (!result.isSuccess()) {
|
||||||
|
log.error("验证码短信发送异常 => {}", result);
|
||||||
|
return R.fail(result.getMessage());
|
||||||
|
}
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成验证码
|
* 生成验证码
|
||||||
*/
|
*/
|
||||||
@GetMapping("/captchaImage")
|
@GetMapping("/captchaImage")
|
||||||
public AjaxResult getCode(HttpServletResponse response) throws IOException
|
public R<Map<String, Object>> getCode() {
|
||||||
{
|
Map<String, Object> ajax = new HashMap<>();
|
||||||
|
boolean captchaEnabled = configService.selectCaptchaEnabled();
|
||||||
|
ajax.put("captchaEnabled", captchaEnabled);
|
||||||
|
if (!captchaEnabled) {
|
||||||
|
return R.ok(ajax);
|
||||||
|
}
|
||||||
// 保存验证码信息
|
// 保存验证码信息
|
||||||
String uuid = IdUtils.simpleUUID();
|
String uuid = IdUtil.simpleUUID();
|
||||||
String verifyKey = Constants.CAPTCHA_CODE_KEY + uuid;
|
String verifyKey = CacheConstants.CAPTCHA_CODE_KEY + uuid;
|
||||||
|
|
||||||
String capStr = null, code = null;
|
|
||||||
BufferedImage image = null;
|
|
||||||
|
|
||||||
// 生成验证码
|
// 生成验证码
|
||||||
if ("math".equals(captchaType))
|
CaptchaType captchaType = captchaProperties.getType();
|
||||||
{
|
boolean isMath = CaptchaType.MATH == captchaType;
|
||||||
String capText = captchaProducerMath.createText();
|
Integer length = isMath ? captchaProperties.getNumberLength() : captchaProperties.getCharLength();
|
||||||
capStr = capText.substring(0, capText.lastIndexOf("@"));
|
CodeGenerator codeGenerator = ReflectUtils.newInstance(captchaType.getClazz(), length);
|
||||||
code = capText.substring(capText.lastIndexOf("@") + 1);
|
AbstractCaptcha captcha = SpringUtils.getBean(captchaProperties.getCategory().getClazz());
|
||||||
image = captchaProducerMath.createImage(capStr);
|
captcha.setGenerator(codeGenerator);
|
||||||
|
captcha.createCode();
|
||||||
|
String code = captcha.getCode();
|
||||||
|
if (isMath) {
|
||||||
|
ExpressionParser parser = new SpelExpressionParser();
|
||||||
|
Expression exp = parser.parseExpression(StringUtils.remove(code, "="));
|
||||||
|
code = exp.getValue(String.class);
|
||||||
}
|
}
|
||||||
else if ("char".equals(captchaType))
|
RedisUtils.setCacheObject(verifyKey, code, Duration.ofMinutes(Constants.CAPTCHA_EXPIRATION));
|
||||||
{
|
|
||||||
capStr = code = captchaProducer.createText();
|
|
||||||
image = captchaProducer.createImage(capStr);
|
|
||||||
}
|
|
||||||
|
|
||||||
redisCache.setCacheObject(verifyKey, code, Constants.CAPTCHA_EXPIRATION, TimeUnit.MINUTES);
|
|
||||||
// 转换流信息写出
|
|
||||||
FastByteArrayOutputStream os = new FastByteArrayOutputStream();
|
|
||||||
try
|
|
||||||
{
|
|
||||||
ImageIO.write(image, "jpg", os);
|
|
||||||
}
|
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
return AjaxResult.error(e.getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
AjaxResult ajax = AjaxResult.success();
|
|
||||||
ajax.put("uuid", uuid);
|
ajax.put("uuid", uuid);
|
||||||
ajax.put("img", Base64.encode(os.toByteArray()));
|
ajax.put("img", captcha.getImageBase64());
|
||||||
return ajax;
|
return R.ok(ajax);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,118 +0,0 @@
|
|||||||
package com.ruoyi.web.controller.common;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.http.MediaType;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
import com.ruoyi.common.config.RuoYiConfig;
|
|
||||||
import com.ruoyi.common.constant.Constants;
|
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
|
||||||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
|
||||||
import com.ruoyi.common.utils.file.FileUtils;
|
|
||||||
import com.ruoyi.framework.config.ServerConfig;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通用请求处理
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
public class CommonController
|
|
||||||
{
|
|
||||||
private static final Logger log = LoggerFactory.getLogger(CommonController.class);
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ServerConfig serverConfig;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通用下载请求
|
|
||||||
*
|
|
||||||
* @param fileName 文件名称
|
|
||||||
* @param delete 是否删除
|
|
||||||
*/
|
|
||||||
@GetMapping("common/download")
|
|
||||||
public void fileDownload(String fileName, Boolean delete, HttpServletResponse response, HttpServletRequest request)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (!FileUtils.checkAllowDownload(fileName))
|
|
||||||
{
|
|
||||||
throw new Exception(StringUtils.format("文件名称({})非法,不允许下载。 ", fileName));
|
|
||||||
}
|
|
||||||
String realFileName = System.currentTimeMillis() + fileName.substring(fileName.indexOf("_") + 1);
|
|
||||||
String filePath = RuoYiConfig.getDownloadPath() + fileName;
|
|
||||||
|
|
||||||
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
|
|
||||||
FileUtils.setAttachmentResponseHeader(response, realFileName);
|
|
||||||
FileUtils.writeBytes(filePath, response.getOutputStream());
|
|
||||||
if (delete)
|
|
||||||
{
|
|
||||||
FileUtils.deleteFile(filePath);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
log.error("下载文件失败", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通用上传请求
|
|
||||||
*/
|
|
||||||
@PostMapping("/common/upload")
|
|
||||||
public AjaxResult uploadFile(MultipartFile file) throws Exception
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
// 上传文件路径
|
|
||||||
String filePath = RuoYiConfig.getUploadPath();
|
|
||||||
// 上传并返回新文件名称
|
|
||||||
String fileName = FileUploadUtils.upload(filePath, file);
|
|
||||||
String url = serverConfig.getUrl() + fileName;
|
|
||||||
AjaxResult ajax = AjaxResult.success();
|
|
||||||
ajax.put("fileName", fileName);
|
|
||||||
ajax.put("url", url);
|
|
||||||
return ajax;
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
return AjaxResult.error(e.getMessage());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 本地资源通用下载
|
|
||||||
*/
|
|
||||||
@GetMapping("/common/download/resource")
|
|
||||||
public void resourceDownload(String resource, HttpServletRequest request, HttpServletResponse response)
|
|
||||||
throws Exception
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (!FileUtils.checkAllowDownload(resource))
|
|
||||||
{
|
|
||||||
throw new Exception(StringUtils.format("资源文件({})非法,不允许下载。 ", resource));
|
|
||||||
}
|
|
||||||
// 本地资源路径
|
|
||||||
String localPath = RuoYiConfig.getProfile();
|
|
||||||
// 数据库资源地址
|
|
||||||
String downloadPath = localPath + StringUtils.substringAfter(resource, Constants.RESOURCE_PREFIX);
|
|
||||||
// 下载名称
|
|
||||||
String downloadName = StringUtils.substringAfterLast(downloadPath, "/");
|
|
||||||
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
|
|
||||||
FileUtils.setAttachmentResponseHeader(response, downloadName);
|
|
||||||
FileUtils.writeBytes(downloadPath, response.getOutputStream());
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
log.error("下载文件失败", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,45 +1,66 @@
|
|||||||
package com.ruoyi.web.controller.monitor;
|
package com.ruoyi.web.controller.monitor;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import java.util.HashMap;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import java.util.List;
|
import com.ruoyi.common.constant.CacheConstants;
|
||||||
import java.util.Map;
|
import com.ruoyi.common.constant.CacheNames;
|
||||||
import java.util.Properties;
|
import com.ruoyi.common.core.domain.R;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import com.ruoyi.common.utils.JsonUtils;
|
||||||
import org.springframework.data.redis.core.RedisCallback;
|
|
||||||
import org.springframework.data.redis.core.RedisTemplate;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import com.ruoyi.common.utils.redis.CacheUtils;
|
||||||
|
import com.ruoyi.common.utils.redis.RedisUtils;
|
||||||
|
import com.ruoyi.system.domain.SysCache;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.redisson.spring.data.connection.RedissonConnectionFactory;
|
||||||
|
import org.springframework.data.redis.connection.RedisConnection;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 缓存监控
|
* 缓存监控
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author Lion Li
|
||||||
*/
|
*/
|
||||||
|
@RequiredArgsConstructor
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/monitor/cache")
|
@RequestMapping("/monitor/cache")
|
||||||
public class CacheController
|
public class CacheController {
|
||||||
{
|
|
||||||
@Autowired
|
|
||||||
private RedisTemplate<String, String> redisTemplate;
|
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasPermi('monitor:cache:list')")
|
private final RedissonConnectionFactory connectionFactory;
|
||||||
|
|
||||||
|
private final static List<SysCache> CACHES = new ArrayList<>();
|
||||||
|
|
||||||
|
static {
|
||||||
|
CACHES.add(new SysCache(CacheConstants.LOGIN_TOKEN_KEY, "用户信息"));
|
||||||
|
CACHES.add(new SysCache(CacheConstants.ONLINE_TOKEN_KEY, "在线用户"));
|
||||||
|
CACHES.add(new SysCache(CacheNames.SYS_CONFIG, "配置信息"));
|
||||||
|
CACHES.add(new SysCache(CacheNames.SYS_DICT, "数据字典"));
|
||||||
|
CACHES.add(new SysCache(CacheConstants.CAPTCHA_CODE_KEY, "验证码"));
|
||||||
|
CACHES.add(new SysCache(CacheConstants.REPEAT_SUBMIT_KEY, "防重提交"));
|
||||||
|
CACHES.add(new SysCache(CacheConstants.RATE_LIMIT_KEY, "限流处理"));
|
||||||
|
CACHES.add(new SysCache(CacheNames.SYS_OSS_CONFIG, "OSS配置"));
|
||||||
|
CACHES.add(new SysCache(CacheConstants.PWD_ERR_CNT_KEY, "密码错误次数"));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取缓存监控列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("monitor:cache:list")
|
||||||
@GetMapping()
|
@GetMapping()
|
||||||
public AjaxResult getInfo() throws Exception
|
public R<Map<String, Object>> getInfo() throws Exception {
|
||||||
{
|
RedisConnection connection = connectionFactory.getConnection();
|
||||||
Properties info = (Properties) redisTemplate.execute((RedisCallback<Object>) connection -> connection.info());
|
Properties info = connection.info();
|
||||||
Properties commandStats = (Properties) redisTemplate.execute((RedisCallback<Object>) connection -> connection.info("commandstats"));
|
Properties commandStats = connection.info("commandstats");
|
||||||
Object dbSize = redisTemplate.execute((RedisCallback<Object>) connection -> connection.dbSize());
|
Long dbSize = connection.dbSize();
|
||||||
|
|
||||||
Map<String, Object> result = new HashMap<>(3);
|
Map<String, Object> result = new HashMap<>(3);
|
||||||
result.put("info", info);
|
result.put("info", info);
|
||||||
result.put("dbSize", dbSize);
|
result.put("dbSize", dbSize);
|
||||||
|
|
||||||
List<Map<String, String>> pieList = new ArrayList<>();
|
List<Map<String, String>> pieList = new ArrayList<>();
|
||||||
|
if (commandStats != null) {
|
||||||
commandStats.stringPropertyNames().forEach(key -> {
|
commandStats.stringPropertyNames().forEach(key -> {
|
||||||
Map<String, String> data = new HashMap<>(2);
|
Map<String, String> data = new HashMap<>(2);
|
||||||
String property = commandStats.getProperty(key);
|
String property = commandStats.getProperty(key);
|
||||||
@@ -47,7 +68,102 @@ public class CacheController
|
|||||||
data.put("value", StringUtils.substringBetween(property, "calls=", ",usec"));
|
data.put("value", StringUtils.substringBetween(property, "calls=", ",usec"));
|
||||||
pieList.add(data);
|
pieList.add(data);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
result.put("commandStats", pieList);
|
result.put("commandStats", pieList);
|
||||||
return AjaxResult.success(result);
|
return R.ok(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取缓存监控缓存名列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("monitor:cache:list")
|
||||||
|
@GetMapping("/getNames")
|
||||||
|
public R<List<SysCache>> cache() {
|
||||||
|
return R.ok(CACHES);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取缓存监控Key列表
|
||||||
|
*
|
||||||
|
* @param cacheName 缓存名
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("monitor:cache:list")
|
||||||
|
@GetMapping("/getKeys/{cacheName}")
|
||||||
|
public R<Collection<String>> getCacheKeys(@PathVariable String cacheName) {
|
||||||
|
Collection<String> cacheKeys = new HashSet<>(0);
|
||||||
|
if (isCacheNames(cacheName)) {
|
||||||
|
Set<Object> keys = CacheUtils.keys(cacheName);
|
||||||
|
if (CollUtil.isNotEmpty(keys)) {
|
||||||
|
cacheKeys = keys.stream().map(Object::toString).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
cacheKeys = RedisUtils.keys(cacheName + "*");
|
||||||
|
}
|
||||||
|
return R.ok(cacheKeys);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取缓存监控缓存值详情
|
||||||
|
*
|
||||||
|
* @param cacheName 缓存名
|
||||||
|
* @param cacheKey 缓存key
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("monitor:cache:list")
|
||||||
|
@GetMapping("/getValue/{cacheName}/{cacheKey}")
|
||||||
|
public R<SysCache> getCacheValue(@PathVariable String cacheName, @PathVariable String cacheKey) {
|
||||||
|
Object cacheValue;
|
||||||
|
if (isCacheNames(cacheName)) {
|
||||||
|
cacheValue = CacheUtils.get(cacheName, cacheKey);
|
||||||
|
} else {
|
||||||
|
cacheValue = RedisUtils.getCacheObject(cacheKey);
|
||||||
|
}
|
||||||
|
SysCache sysCache = new SysCache(cacheName, cacheKey, JsonUtils.toJsonString(cacheValue));
|
||||||
|
return R.ok(sysCache);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 清理缓存监控缓存名
|
||||||
|
*
|
||||||
|
* @param cacheName 缓存名
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("monitor:cache:list")
|
||||||
|
@DeleteMapping("/clearCacheName/{cacheName}")
|
||||||
|
public R<Void> clearCacheName(@PathVariable String cacheName) {
|
||||||
|
if (isCacheNames(cacheName)) {
|
||||||
|
CacheUtils.clear(cacheName);
|
||||||
|
} else {
|
||||||
|
RedisUtils.deleteKeys(cacheName + "*");
|
||||||
|
}
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 清理缓存监控Key
|
||||||
|
*
|
||||||
|
* @param cacheKey key名
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("monitor:cache:list")
|
||||||
|
@DeleteMapping("/clearCacheKey/{cacheName}/{cacheKey}")
|
||||||
|
public R<Void> clearCacheKey(@PathVariable String cacheName, @PathVariable String cacheKey) {
|
||||||
|
if (isCacheNames(cacheName)) {
|
||||||
|
CacheUtils.evict(cacheName, cacheKey);
|
||||||
|
} else {
|
||||||
|
RedisUtils.deleteObject(cacheKey);
|
||||||
|
}
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 清理全部缓存监控
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("monitor:cache:list")
|
||||||
|
@DeleteMapping("/clearCacheAll")
|
||||||
|
public R<Void> clearCacheAll() {
|
||||||
|
RedisUtils.deleteKeys("*");
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isCacheNames(String cacheName) {
|
||||||
|
return !StringUtils.contains(cacheName, ":");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,27 +0,0 @@
|
|||||||
package com.ruoyi.web.controller.monitor;
|
|
||||||
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
|
||||||
import com.ruoyi.framework.web.domain.Server;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 服务器监控
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/monitor/server")
|
|
||||||
public class ServerController
|
|
||||||
{
|
|
||||||
@PreAuthorize("@ss.hasPermi('monitor:server:list')")
|
|
||||||
@GetMapping()
|
|
||||||
public AjaxResult getInfo() throws Exception
|
|
||||||
{
|
|
||||||
Server server = new Server();
|
|
||||||
server.copyTo();
|
|
||||||
return AjaxResult.success(server);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,67 +1,88 @@
|
|||||||
package com.ruoyi.web.controller.monitor;
|
package com.ruoyi.web.controller.monitor;
|
||||||
|
|
||||||
import java.util.List;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.constant.CacheConstants;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.common.utils.redis.RedisUtils;
|
||||||
import com.ruoyi.system.domain.SysLogininfor;
|
import com.ruoyi.system.domain.SysLogininfor;
|
||||||
import com.ruoyi.system.service.ISysLogininforService;
|
import com.ruoyi.system.service.ISysLogininforService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统访问记录
|
* 系统访问记录
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author Lion Li
|
||||||
*/
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/monitor/logininfor")
|
@RequestMapping("/monitor/logininfor")
|
||||||
public class SysLogininforController extends BaseController
|
public class SysLogininforController extends BaseController {
|
||||||
{
|
|
||||||
@Autowired
|
|
||||||
private ISysLogininforService logininforService;
|
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasPermi('monitor:logininfor:list')")
|
private final ISysLogininforService logininforService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取系统访问记录列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("monitor:logininfor:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(SysLogininfor logininfor)
|
public TableDataInfo<SysLogininfor> list(SysLogininfor logininfor, PageQuery pageQuery) {
|
||||||
{
|
return logininforService.selectPageLogininforList(logininfor, pageQuery);
|
||||||
startPage();
|
|
||||||
List<SysLogininfor> list = logininforService.selectLogininforList(logininfor);
|
|
||||||
return getDataTable(list);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出系统访问记录列表
|
||||||
|
*/
|
||||||
@Log(title = "登录日志", businessType = BusinessType.EXPORT)
|
@Log(title = "登录日志", businessType = BusinessType.EXPORT)
|
||||||
@PreAuthorize("@ss.hasPermi('monitor:logininfor:export')")
|
@SaCheckPermission("monitor:logininfor:export")
|
||||||
@GetMapping("/export")
|
@PostMapping("/export")
|
||||||
public AjaxResult export(SysLogininfor logininfor)
|
public void export(SysLogininfor logininfor, HttpServletResponse response) {
|
||||||
{
|
|
||||||
List<SysLogininfor> list = logininforService.selectLogininforList(logininfor);
|
List<SysLogininfor> list = logininforService.selectLogininforList(logininfor);
|
||||||
ExcelUtil<SysLogininfor> util = new ExcelUtil<SysLogininfor>(SysLogininfor.class);
|
ExcelUtil.exportExcel(list, "登录日志", SysLogininfor.class, response);
|
||||||
return util.exportExcel(list, "登录日志");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasPermi('monitor:logininfor:remove')")
|
/**
|
||||||
|
* 批量删除登录日志
|
||||||
|
* @param infoIds 日志ids
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("monitor:logininfor:remove")
|
||||||
@Log(title = "登录日志", businessType = BusinessType.DELETE)
|
@Log(title = "登录日志", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{infoIds}")
|
@DeleteMapping("/{infoIds}")
|
||||||
public AjaxResult remove(@PathVariable Long[] infoIds)
|
public R<Void> remove(@PathVariable Long[] infoIds) {
|
||||||
{
|
|
||||||
return toAjax(logininforService.deleteLogininforByIds(infoIds));
|
return toAjax(logininforService.deleteLogininforByIds(infoIds));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasPermi('monitor:logininfor:remove')")
|
/**
|
||||||
|
* 清理系统访问记录
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("monitor:logininfor:remove")
|
||||||
@Log(title = "登录日志", businessType = BusinessType.CLEAN)
|
@Log(title = "登录日志", businessType = BusinessType.CLEAN)
|
||||||
@DeleteMapping("/clean")
|
@DeleteMapping("/clean")
|
||||||
public AjaxResult clean()
|
public R<Void> clean() {
|
||||||
{
|
|
||||||
logininforService.cleanLogininfor();
|
logininforService.cleanLogininfor();
|
||||||
return AjaxResult.success();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SaCheckPermission("monitor:logininfor:unlock")
|
||||||
|
@Log(title = "账户解锁", businessType = BusinessType.OTHER)
|
||||||
|
@GetMapping("/unlock/{userName}")
|
||||||
|
public R<Void> unlock(@PathVariable("userName") String userName) {
|
||||||
|
String loginName = CacheConstants.PWD_ERR_CNT_KEY + userName;
|
||||||
|
if (RedisUtils.hasKey(loginName)) {
|
||||||
|
RedisUtils.deleteObject(loginName);
|
||||||
|
}
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,66 +1,74 @@
|
|||||||
package com.ruoyi.web.controller.monitor;
|
package com.ruoyi.web.controller.monitor;
|
||||||
|
|
||||||
import java.util.List;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
import com.ruoyi.system.domain.SysOperLog;
|
import com.ruoyi.system.domain.SysOperLog;
|
||||||
import com.ruoyi.system.service.ISysOperLogService;
|
import com.ruoyi.system.service.ISysOperLogService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 操作日志记录
|
* 操作日志记录
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author Lion Li
|
||||||
*/
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/monitor/operlog")
|
@RequestMapping("/monitor/operlog")
|
||||||
public class SysOperlogController extends BaseController
|
public class SysOperlogController extends BaseController {
|
||||||
{
|
|
||||||
@Autowired
|
|
||||||
private ISysOperLogService operLogService;
|
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasPermi('monitor:operlog:list')")
|
private final ISysOperLogService operLogService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取操作日志记录列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("monitor:operlog:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(SysOperLog operLog)
|
public TableDataInfo<SysOperLog> list(SysOperLog operLog, PageQuery pageQuery) {
|
||||||
{
|
return operLogService.selectPageOperLogList(operLog, pageQuery);
|
||||||
startPage();
|
|
||||||
List<SysOperLog> list = operLogService.selectOperLogList(operLog);
|
|
||||||
return getDataTable(list);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出操作日志记录列表
|
||||||
|
*/
|
||||||
@Log(title = "操作日志", businessType = BusinessType.EXPORT)
|
@Log(title = "操作日志", businessType = BusinessType.EXPORT)
|
||||||
@PreAuthorize("@ss.hasPermi('monitor:operlog:export')")
|
@SaCheckPermission("monitor:operlog:export")
|
||||||
@GetMapping("/export")
|
@PostMapping("/export")
|
||||||
public AjaxResult export(SysOperLog operLog)
|
public void export(SysOperLog operLog, HttpServletResponse response) {
|
||||||
{
|
|
||||||
List<SysOperLog> list = operLogService.selectOperLogList(operLog);
|
List<SysOperLog> list = operLogService.selectOperLogList(operLog);
|
||||||
ExcelUtil<SysOperLog> util = new ExcelUtil<SysOperLog>(SysOperLog.class);
|
ExcelUtil.exportExcel(list, "操作日志", SysOperLog.class, response);
|
||||||
return util.exportExcel(list, "操作日志");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasPermi('monitor:operlog:remove')")
|
/**
|
||||||
|
* 批量删除操作日志记录
|
||||||
|
* @param operIds 日志ids
|
||||||
|
*/
|
||||||
|
@Log(title = "操作日志", businessType = BusinessType.DELETE)
|
||||||
|
@SaCheckPermission("monitor:operlog:remove")
|
||||||
@DeleteMapping("/{operIds}")
|
@DeleteMapping("/{operIds}")
|
||||||
public AjaxResult remove(@PathVariable Long[] operIds)
|
public R<Void> remove(@PathVariable Long[] operIds) {
|
||||||
{
|
|
||||||
return toAjax(operLogService.deleteOperLogByIds(operIds));
|
return toAjax(operLogService.deleteOperLogByIds(operIds));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 清理操作日志记录
|
||||||
|
*/
|
||||||
@Log(title = "操作日志", businessType = BusinessType.CLEAN)
|
@Log(title = "操作日志", businessType = BusinessType.CLEAN)
|
||||||
@PreAuthorize("@ss.hasPermi('monitor:operlog:remove')")
|
@SaCheckPermission("monitor:operlog:remove")
|
||||||
@DeleteMapping("/clean")
|
@DeleteMapping("/clean")
|
||||||
public AjaxResult clean()
|
public R<Void> clean() {
|
||||||
{
|
|
||||||
operLogService.cleanOperLog();
|
operLogService.cleanOperLog();
|
||||||
return AjaxResult.success();
|
return R.ok();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,92 +1,90 @@
|
|||||||
package com.ruoyi.web.controller.monitor;
|
package com.ruoyi.web.controller.monitor;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.dev33.satoken.exception.NotLoginException;
|
||||||
|
import cn.dev33.satoken.stp.StpUtil;
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.constant.CacheConstants;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.common.core.domain.dto.UserOnlineDTO;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.utils.StreamUtils;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import com.ruoyi.common.utils.redis.RedisUtils;
|
||||||
|
import com.ruoyi.system.domain.SysUserOnline;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.ruoyi.common.annotation.Log;
|
|
||||||
import com.ruoyi.common.constant.Constants;
|
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
|
||||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
|
||||||
import com.ruoyi.common.core.redis.RedisCache;
|
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
|
||||||
import com.ruoyi.system.domain.SysUserOnline;
|
|
||||||
import com.ruoyi.system.service.ISysUserOnlineService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 在线用户监控
|
* 在线用户监控
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author Lion Li
|
||||||
*/
|
*/
|
||||||
|
@RequiredArgsConstructor
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/monitor/online")
|
@RequestMapping("/monitor/online")
|
||||||
public class SysUserOnlineController extends BaseController
|
public class SysUserOnlineController extends BaseController {
|
||||||
{
|
|
||||||
@Autowired
|
|
||||||
private ISysUserOnlineService userOnlineService;
|
|
||||||
|
|
||||||
@Autowired
|
/**
|
||||||
private RedisCache redisCache;
|
* 获取在线用户监控列表
|
||||||
|
*
|
||||||
@PreAuthorize("@ss.hasPermi('monitor:online:list')")
|
* @param ipaddr IP地址
|
||||||
|
* @param userName 用户名
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("monitor:online:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(String ipaddr, String userName)
|
public TableDataInfo<SysUserOnline> list(String ipaddr, String userName) {
|
||||||
{
|
// 获取所有未过期的 token
|
||||||
Collection<String> keys = redisCache.keys(Constants.LOGIN_TOKEN_KEY + "*");
|
List<String> keys = StpUtil.searchTokenValue("", 0, -1, false);
|
||||||
List<SysUserOnline> userOnlineList = new ArrayList<SysUserOnline>();
|
List<UserOnlineDTO> userOnlineDTOList = new ArrayList<>();
|
||||||
for (String key : keys)
|
for (String key : keys) {
|
||||||
{
|
String token = key.replace(CacheConstants.LOGIN_TOKEN_KEY, "");
|
||||||
LoginUser user = redisCache.getCacheObject(key);
|
// 如果已经过期则跳过
|
||||||
if (StringUtils.isNotEmpty(ipaddr) && StringUtils.isNotEmpty(userName))
|
if (StpUtil.stpLogic.getTokenActivityTimeoutByToken(token) < -1) {
|
||||||
{
|
continue;
|
||||||
if (StringUtils.equals(ipaddr, user.getIpaddr()) && StringUtils.equals(userName, user.getUsername()))
|
|
||||||
{
|
|
||||||
userOnlineList.add(userOnlineService.selectOnlineByInfo(ipaddr, userName, user));
|
|
||||||
}
|
}
|
||||||
|
userOnlineDTOList.add(RedisUtils.getCacheObject(CacheConstants.ONLINE_TOKEN_KEY + token));
|
||||||
}
|
}
|
||||||
else if (StringUtils.isNotEmpty(ipaddr))
|
if (StringUtils.isNotEmpty(ipaddr) && StringUtils.isNotEmpty(userName)) {
|
||||||
{
|
userOnlineDTOList = StreamUtils.filter(userOnlineDTOList, userOnline ->
|
||||||
if (StringUtils.equals(ipaddr, user.getIpaddr()))
|
StringUtils.equals(ipaddr, userOnline.getIpaddr()) &&
|
||||||
{
|
StringUtils.equals(userName, userOnline.getUserName())
|
||||||
userOnlineList.add(userOnlineService.selectOnlineByIpaddr(ipaddr, user));
|
);
|
||||||
|
} else if (StringUtils.isNotEmpty(ipaddr)) {
|
||||||
|
userOnlineDTOList = StreamUtils.filter(userOnlineDTOList, userOnline ->
|
||||||
|
StringUtils.equals(ipaddr, userOnline.getIpaddr())
|
||||||
|
);
|
||||||
|
} else if (StringUtils.isNotEmpty(userName)) {
|
||||||
|
userOnlineDTOList = StreamUtils.filter(userOnlineDTOList, userOnline ->
|
||||||
|
StringUtils.equals(userName, userOnline.getUserName())
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
Collections.reverse(userOnlineDTOList);
|
||||||
else if (StringUtils.isNotEmpty(userName) && StringUtils.isNotNull(user.getUser()))
|
userOnlineDTOList.removeAll(Collections.singleton(null));
|
||||||
{
|
List<SysUserOnline> userOnlineList = BeanUtil.copyToList(userOnlineDTOList, SysUserOnline.class);
|
||||||
if (StringUtils.equals(userName, user.getUsername()))
|
return TableDataInfo.build(userOnlineList);
|
||||||
{
|
|
||||||
userOnlineList.add(userOnlineService.selectOnlineByUserName(userName, user));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
userOnlineList.add(userOnlineService.loginUserToUserOnline(user));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Collections.reverse(userOnlineList);
|
|
||||||
userOnlineList.removeAll(Collections.singleton(null));
|
|
||||||
return getDataTable(userOnlineList);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 强退用户
|
* 强退用户
|
||||||
|
*
|
||||||
|
* @param tokenId token值
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('monitor:online:forceLogout')")
|
@SaCheckPermission("monitor:online:forceLogout")
|
||||||
@Log(title = "在线用户", businessType = BusinessType.FORCE)
|
@Log(title = "在线用户", businessType = BusinessType.FORCE)
|
||||||
@DeleteMapping("/{tokenId}")
|
@DeleteMapping("/{tokenId}")
|
||||||
public AjaxResult forceLogout(@PathVariable String tokenId)
|
public R<Void> forceLogout(@PathVariable String tokenId) {
|
||||||
{
|
try {
|
||||||
redisCache.deleteObject(Constants.LOGIN_TOKEN_KEY + tokenId);
|
StpUtil.kickoutByTokenValue(tokenId);
|
||||||
return AjaxResult.success();
|
} catch (NotLoginException ignored) {
|
||||||
|
}
|
||||||
|
return R.ok();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,135 +1,137 @@
|
|||||||
package com.ruoyi.web.controller.system;
|
package com.ruoyi.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
|
||||||
import com.ruoyi.common.constant.UserConstants;
|
import com.ruoyi.common.constant.UserConstants;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
import com.ruoyi.system.domain.SysConfig;
|
import com.ruoyi.system.domain.SysConfig;
|
||||||
import com.ruoyi.system.service.ISysConfigService;
|
import com.ruoyi.system.service.ISysConfigService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 参数配置 信息操作处理
|
* 参数配置 信息操作处理
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author Lion Li
|
||||||
*/
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/system/config")
|
@RequestMapping("/system/config")
|
||||||
public class SysConfigController extends BaseController
|
public class SysConfigController extends BaseController {
|
||||||
{
|
|
||||||
@Autowired
|
private final ISysConfigService configService;
|
||||||
private ISysConfigService configService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取参数配置列表
|
* 获取参数配置列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:config:list')")
|
@SaCheckPermission("system:config:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(SysConfig config)
|
public TableDataInfo<SysConfig> list(SysConfig config, PageQuery pageQuery) {
|
||||||
{
|
return configService.selectPageConfigList(config, pageQuery);
|
||||||
startPage();
|
|
||||||
List<SysConfig> list = configService.selectConfigList(config);
|
|
||||||
return getDataTable(list);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出参数配置列表
|
||||||
|
*/
|
||||||
@Log(title = "参数管理", businessType = BusinessType.EXPORT)
|
@Log(title = "参数管理", businessType = BusinessType.EXPORT)
|
||||||
@PreAuthorize("@ss.hasPermi('system:config:export')")
|
@SaCheckPermission("system:config:export")
|
||||||
@GetMapping("/export")
|
@PostMapping("/export")
|
||||||
public AjaxResult export(SysConfig config)
|
public void export(SysConfig config, HttpServletResponse response) {
|
||||||
{
|
|
||||||
List<SysConfig> list = configService.selectConfigList(config);
|
List<SysConfig> list = configService.selectConfigList(config);
|
||||||
ExcelUtil<SysConfig> util = new ExcelUtil<SysConfig>(SysConfig.class);
|
ExcelUtil.exportExcel(list, "参数数据", SysConfig.class, response);
|
||||||
return util.exportExcel(list, "参数数据");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据参数编号获取详细信息
|
* 根据参数编号获取详细信息
|
||||||
|
*
|
||||||
|
* @param configId 参数ID
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:config:query')")
|
@SaCheckPermission("system:config:query")
|
||||||
@GetMapping(value = "/{configId}")
|
@GetMapping(value = "/{configId}")
|
||||||
public AjaxResult getInfo(@PathVariable Long configId)
|
public R<SysConfig> getInfo(@PathVariable Long configId) {
|
||||||
{
|
return R.ok(configService.selectConfigById(configId));
|
||||||
return AjaxResult.success(configService.selectConfigById(configId));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据参数键名查询参数值
|
* 根据参数键名查询参数值
|
||||||
|
*
|
||||||
|
* @param configKey 参数Key
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/configKey/{configKey}")
|
@GetMapping(value = "/configKey/{configKey}")
|
||||||
public AjaxResult getConfigKey(@PathVariable String configKey)
|
public R<Void> getConfigKey(@PathVariable String configKey) {
|
||||||
{
|
return R.ok(configService.selectConfigByKey(configKey));
|
||||||
return AjaxResult.success(configService.selectConfigByKey(configKey));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增参数配置
|
* 新增参数配置
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:config:add')")
|
@SaCheckPermission("system:config:add")
|
||||||
@Log(title = "参数管理", businessType = BusinessType.INSERT)
|
@Log(title = "参数管理", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
@RepeatSubmit
|
public R<Void> add(@Validated @RequestBody SysConfig config) {
|
||||||
public AjaxResult add(@Validated @RequestBody SysConfig config)
|
if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config))) {
|
||||||
{
|
return R.fail("新增参数'" + config.getConfigName() + "'失败,参数键名已存在");
|
||||||
if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config)))
|
|
||||||
{
|
|
||||||
return AjaxResult.error("新增参数'" + config.getConfigName() + "'失败,参数键名已存在");
|
|
||||||
}
|
}
|
||||||
config.setCreateBy(SecurityUtils.getUsername());
|
configService.insertConfig(config);
|
||||||
return toAjax(configService.insertConfig(config));
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改参数配置
|
* 修改参数配置
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:config:edit')")
|
@SaCheckPermission("system:config:edit")
|
||||||
@Log(title = "参数管理", businessType = BusinessType.UPDATE)
|
@Log(title = "参数管理", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@Validated @RequestBody SysConfig config)
|
public R<Void> edit(@Validated @RequestBody SysConfig config) {
|
||||||
{
|
if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config))) {
|
||||||
if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config)))
|
return R.fail("修改参数'" + config.getConfigName() + "'失败,参数键名已存在");
|
||||||
{
|
|
||||||
return AjaxResult.error("修改参数'" + config.getConfigName() + "'失败,参数键名已存在");
|
|
||||||
}
|
}
|
||||||
config.setUpdateBy(SecurityUtils.getUsername());
|
configService.updateConfig(config);
|
||||||
return toAjax(configService.updateConfig(config));
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据参数键名修改参数配置
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:config:edit")
|
||||||
|
@Log(title = "参数管理", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping("/updateByKey")
|
||||||
|
public R<Void> updateByKey(@RequestBody SysConfig config) {
|
||||||
|
configService.updateConfig(config);
|
||||||
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除参数配置
|
* 删除参数配置
|
||||||
|
*
|
||||||
|
* @param configIds 参数ID串
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:config:remove')")
|
@SaCheckPermission("system:config:remove")
|
||||||
@Log(title = "参数管理", businessType = BusinessType.DELETE)
|
@Log(title = "参数管理", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{configIds}")
|
@DeleteMapping("/{configIds}")
|
||||||
public AjaxResult remove(@PathVariable Long[] configIds)
|
public R<Void> remove(@PathVariable Long[] configIds) {
|
||||||
{
|
configService.deleteConfigByIds(configIds);
|
||||||
return toAjax(configService.deleteConfigByIds(configIds));
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 清空缓存
|
* 刷新参数缓存
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:config:remove')")
|
@SaCheckPermission("system:config:remove")
|
||||||
@Log(title = "参数管理", businessType = BusinessType.CLEAN)
|
@Log(title = "参数管理", businessType = BusinessType.CLEAN)
|
||||||
@DeleteMapping("/clearCache")
|
@DeleteMapping("/refreshCache")
|
||||||
public AjaxResult clearCache()
|
public R<Void> refreshCache() {
|
||||||
{
|
configService.resetConfigCache();
|
||||||
configService.clearCache();
|
return R.ok();
|
||||||
return AjaxResult.success();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,163 +1,119 @@
|
|||||||
package com.ruoyi.web.controller.system;
|
package com.ruoyi.web.controller.system;
|
||||||
|
|
||||||
import java.util.Iterator;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import java.util.List;
|
import cn.hutool.core.util.ArrayUtil;
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.constant.UserConstants;
|
import com.ruoyi.common.constant.UserConstants;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.R;
|
||||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.system.service.ISysDeptService;
|
import com.ruoyi.system.service.ISysDeptService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部门信息
|
* 部门信息
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author Lion Li
|
||||||
*/
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/system/dept")
|
@RequestMapping("/system/dept")
|
||||||
public class SysDeptController extends BaseController
|
public class SysDeptController extends BaseController {
|
||||||
{
|
|
||||||
@Autowired
|
private final ISysDeptService deptService;
|
||||||
private ISysDeptService deptService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取部门列表
|
* 获取部门列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:dept:list')")
|
@SaCheckPermission("system:dept:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public AjaxResult list(SysDept dept)
|
public R<List<SysDept>> list(SysDept dept) {
|
||||||
{
|
|
||||||
List<SysDept> depts = deptService.selectDeptList(dept);
|
List<SysDept> depts = deptService.selectDeptList(dept);
|
||||||
return AjaxResult.success(depts);
|
return R.ok(depts);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询部门列表(排除节点)
|
* 查询部门列表(排除节点)
|
||||||
|
*
|
||||||
|
* @param deptId 部门ID
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:dept:list')")
|
@SaCheckPermission("system:dept:list")
|
||||||
@GetMapping("/list/exclude/{deptId}")
|
@GetMapping("/list/exclude/{deptId}")
|
||||||
public AjaxResult excludeChild(@PathVariable(value = "deptId", required = false) Long deptId)
|
public R<List<SysDept>> excludeChild(@PathVariable(value = "deptId", required = false) Long deptId) {
|
||||||
{
|
|
||||||
List<SysDept> depts = deptService.selectDeptList(new SysDept());
|
List<SysDept> depts = deptService.selectDeptList(new SysDept());
|
||||||
Iterator<SysDept> it = depts.iterator();
|
depts.removeIf(d -> d.getDeptId().equals(deptId)
|
||||||
while (it.hasNext())
|
|| ArrayUtil.contains(StringUtils.split(d.getAncestors(), ","), deptId + ""));
|
||||||
{
|
return R.ok(depts);
|
||||||
SysDept d = (SysDept) it.next();
|
|
||||||
if (d.getDeptId().intValue() == deptId
|
|
||||||
|| ArrayUtils.contains(StringUtils.split(d.getAncestors(), ","), deptId + ""))
|
|
||||||
{
|
|
||||||
it.remove();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return AjaxResult.success(depts);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据部门编号获取详细信息
|
* 根据部门编号获取详细信息
|
||||||
|
*
|
||||||
|
* @param deptId 部门ID
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:dept:query')")
|
@SaCheckPermission("system:dept:query")
|
||||||
@GetMapping(value = "/{deptId}")
|
@GetMapping(value = "/{deptId}")
|
||||||
public AjaxResult getInfo(@PathVariable Long deptId)
|
public R<SysDept> getInfo(@PathVariable Long deptId) {
|
||||||
{
|
deptService.checkDeptDataScope(deptId);
|
||||||
return AjaxResult.success(deptService.selectDeptById(deptId));
|
return R.ok(deptService.selectDeptById(deptId));
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取部门下拉树列表
|
|
||||||
*/
|
|
||||||
@GetMapping("/treeselect")
|
|
||||||
public AjaxResult treeselect(SysDept dept)
|
|
||||||
{
|
|
||||||
List<SysDept> depts = deptService.selectDeptList(dept);
|
|
||||||
return AjaxResult.success(deptService.buildDeptTreeSelect(depts));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 加载对应角色部门列表树
|
|
||||||
*/
|
|
||||||
@GetMapping(value = "/roleDeptTreeselect/{roleId}")
|
|
||||||
public AjaxResult roleDeptTreeselect(@PathVariable("roleId") Long roleId)
|
|
||||||
{
|
|
||||||
List<SysDept> depts = deptService.selectDeptList(new SysDept());
|
|
||||||
AjaxResult ajax = AjaxResult.success();
|
|
||||||
ajax.put("checkedKeys", deptService.selectDeptListByRoleId(roleId));
|
|
||||||
ajax.put("depts", deptService.buildDeptTreeSelect(depts));
|
|
||||||
return ajax;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增部门
|
* 新增部门
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:dept:add')")
|
@SaCheckPermission("system:dept:add")
|
||||||
@Log(title = "部门管理", businessType = BusinessType.INSERT)
|
@Log(title = "部门管理", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@Validated @RequestBody SysDept dept)
|
public R<Void> add(@Validated @RequestBody SysDept dept) {
|
||||||
{
|
if (UserConstants.NOT_UNIQUE.equals(deptService.checkDeptNameUnique(dept))) {
|
||||||
if (UserConstants.NOT_UNIQUE.equals(deptService.checkDeptNameUnique(dept)))
|
return R.fail("新增部门'" + dept.getDeptName() + "'失败,部门名称已存在");
|
||||||
{
|
|
||||||
return AjaxResult.error("新增部门'" + dept.getDeptName() + "'失败,部门名称已存在");
|
|
||||||
}
|
}
|
||||||
dept.setCreateBy(SecurityUtils.getUsername());
|
|
||||||
return toAjax(deptService.insertDept(dept));
|
return toAjax(deptService.insertDept(dept));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改部门
|
* 修改部门
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:dept:edit')")
|
@SaCheckPermission("system:dept:edit")
|
||||||
@Log(title = "部门管理", businessType = BusinessType.UPDATE)
|
@Log(title = "部门管理", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@Validated @RequestBody SysDept dept)
|
public R<Void> edit(@Validated @RequestBody SysDept dept) {
|
||||||
{
|
Long deptId = dept.getDeptId();
|
||||||
if (UserConstants.NOT_UNIQUE.equals(deptService.checkDeptNameUnique(dept)))
|
deptService.checkDeptDataScope(deptId);
|
||||||
{
|
if (UserConstants.NOT_UNIQUE.equals(deptService.checkDeptNameUnique(dept))) {
|
||||||
return AjaxResult.error("修改部门'" + dept.getDeptName() + "'失败,部门名称已存在");
|
return R.fail("修改部门'" + dept.getDeptName() + "'失败,部门名称已存在");
|
||||||
|
} else if (dept.getParentId().equals(deptId)) {
|
||||||
|
return R.fail("修改部门'" + dept.getDeptName() + "'失败,上级部门不能是自己");
|
||||||
|
} else if (StringUtils.equals(UserConstants.DEPT_DISABLE, dept.getStatus())
|
||||||
|
&& deptService.selectNormalChildrenDeptById(deptId) > 0) {
|
||||||
|
return R.fail("该部门包含未停用的子部门!");
|
||||||
}
|
}
|
||||||
else if (dept.getParentId().equals(dept.getDeptId()))
|
|
||||||
{
|
|
||||||
return AjaxResult.error("修改部门'" + dept.getDeptName() + "'失败,上级部门不能是自己");
|
|
||||||
}
|
|
||||||
else if (StringUtils.equals(UserConstants.DEPT_DISABLE, dept.getStatus())
|
|
||||||
&& deptService.selectNormalChildrenDeptById(dept.getDeptId()) > 0)
|
|
||||||
{
|
|
||||||
return AjaxResult.error("该部门包含未停用的子部门!");
|
|
||||||
}
|
|
||||||
dept.setUpdateBy(SecurityUtils.getUsername());
|
|
||||||
return toAjax(deptService.updateDept(dept));
|
return toAjax(deptService.updateDept(dept));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除部门
|
* 删除部门
|
||||||
|
*
|
||||||
|
* @param deptId 部门ID
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:dept:remove')")
|
@SaCheckPermission("system:dept:remove")
|
||||||
@Log(title = "部门管理", businessType = BusinessType.DELETE)
|
@Log(title = "部门管理", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{deptId}")
|
@DeleteMapping("/{deptId}")
|
||||||
public AjaxResult remove(@PathVariable Long deptId)
|
public R<Void> remove(@PathVariable Long deptId) {
|
||||||
{
|
if (deptService.hasChildByDeptId(deptId)) {
|
||||||
if (deptService.hasChildByDeptId(deptId))
|
return R.warn("存在下级部门,不允许删除");
|
||||||
{
|
|
||||||
return AjaxResult.error("存在下级部门,不允许删除");
|
|
||||||
}
|
}
|
||||||
if (deptService.checkDeptExistUser(deptId))
|
if (deptService.checkDeptExistUser(deptId)) {
|
||||||
{
|
return R.warn("部门存在用户,不允许删除");
|
||||||
return AjaxResult.error("部门存在用户,不允许删除");
|
|
||||||
}
|
}
|
||||||
|
deptService.checkDeptDataScope(deptId);
|
||||||
return toAjax(deptService.deleteDeptById(deptId));
|
return toAjax(deptService.deleteDeptById(deptId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,120 +1,116 @@
|
|||||||
package com.ruoyi.web.controller.system;
|
package com.ruoyi.web.controller.system;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import java.util.List;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
import com.ruoyi.system.service.ISysDictDataService;
|
import com.ruoyi.system.service.ISysDictDataService;
|
||||||
import com.ruoyi.system.service.ISysDictTypeService;
|
import com.ruoyi.system.service.ISysDictTypeService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据字典信息
|
* 数据字典信息
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author Lion Li
|
||||||
*/
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/system/dict/data")
|
@RequestMapping("/system/dict/data")
|
||||||
public class SysDictDataController extends BaseController
|
public class SysDictDataController extends BaseController {
|
||||||
{
|
|
||||||
@Autowired
|
|
||||||
private ISysDictDataService dictDataService;
|
|
||||||
|
|
||||||
@Autowired
|
private final ISysDictDataService dictDataService;
|
||||||
private ISysDictTypeService dictTypeService;
|
private final ISysDictTypeService dictTypeService;
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasPermi('system:dict:list')")
|
/**
|
||||||
|
* 查询字典数据列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:dict:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(SysDictData dictData)
|
public TableDataInfo<SysDictData> list(SysDictData dictData, PageQuery pageQuery) {
|
||||||
{
|
return dictDataService.selectPageDictDataList(dictData, pageQuery);
|
||||||
startPage();
|
|
||||||
List<SysDictData> list = dictDataService.selectDictDataList(dictData);
|
|
||||||
return getDataTable(list);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出字典数据列表
|
||||||
|
*/
|
||||||
@Log(title = "字典数据", businessType = BusinessType.EXPORT)
|
@Log(title = "字典数据", businessType = BusinessType.EXPORT)
|
||||||
@PreAuthorize("@ss.hasPermi('system:dict:export')")
|
@SaCheckPermission("system:dict:export")
|
||||||
@GetMapping("/export")
|
@PostMapping("/export")
|
||||||
public AjaxResult export(SysDictData dictData)
|
public void export(SysDictData dictData, HttpServletResponse response) {
|
||||||
{
|
|
||||||
List<SysDictData> list = dictDataService.selectDictDataList(dictData);
|
List<SysDictData> list = dictDataService.selectDictDataList(dictData);
|
||||||
ExcelUtil<SysDictData> util = new ExcelUtil<SysDictData>(SysDictData.class);
|
ExcelUtil.exportExcel(list, "字典数据", SysDictData.class, response);
|
||||||
return util.exportExcel(list, "字典数据");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询字典数据详细
|
* 查询字典数据详细
|
||||||
|
*
|
||||||
|
* @param dictCode 字典code
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:dict:query')")
|
@SaCheckPermission("system:dict:query")
|
||||||
@GetMapping(value = "/{dictCode}")
|
@GetMapping(value = "/{dictCode}")
|
||||||
public AjaxResult getInfo(@PathVariable Long dictCode)
|
public R<SysDictData> getInfo(@PathVariable Long dictCode) {
|
||||||
{
|
return R.ok(dictDataService.selectDictDataById(dictCode));
|
||||||
return AjaxResult.success(dictDataService.selectDictDataById(dictCode));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据字典类型查询字典数据信息
|
* 根据字典类型查询字典数据信息
|
||||||
|
*
|
||||||
|
* @param dictType 字典类型
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/type/{dictType}")
|
@GetMapping(value = "/type/{dictType}")
|
||||||
public AjaxResult dictType(@PathVariable String dictType)
|
public R<List<SysDictData>> dictType(@PathVariable String dictType) {
|
||||||
{
|
|
||||||
List<SysDictData> data = dictTypeService.selectDictDataByType(dictType);
|
List<SysDictData> data = dictTypeService.selectDictDataByType(dictType);
|
||||||
if (StringUtils.isNull(data))
|
if (ObjectUtil.isNull(data)) {
|
||||||
{
|
data = new ArrayList<>();
|
||||||
data = new ArrayList<SysDictData>();
|
|
||||||
}
|
}
|
||||||
return AjaxResult.success(data);
|
return R.ok(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增字典类型
|
* 新增字典类型
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:dict:add')")
|
@SaCheckPermission("system:dict:add")
|
||||||
@Log(title = "字典数据", businessType = BusinessType.INSERT)
|
@Log(title = "字典数据", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@Validated @RequestBody SysDictData dict)
|
public R<Void> add(@Validated @RequestBody SysDictData dict) {
|
||||||
{
|
dictDataService.insertDictData(dict);
|
||||||
dict.setCreateBy(SecurityUtils.getUsername());
|
return R.ok();
|
||||||
return toAjax(dictDataService.insertDictData(dict));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改保存字典类型
|
* 修改保存字典类型
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:dict:edit')")
|
@SaCheckPermission("system:dict:edit")
|
||||||
@Log(title = "字典数据", businessType = BusinessType.UPDATE)
|
@Log(title = "字典数据", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@Validated @RequestBody SysDictData dict)
|
public R<Void> edit(@Validated @RequestBody SysDictData dict) {
|
||||||
{
|
dictDataService.updateDictData(dict);
|
||||||
dict.setUpdateBy(SecurityUtils.getUsername());
|
return R.ok();
|
||||||
return toAjax(dictDataService.updateDictData(dict));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除字典类型
|
* 删除字典类型
|
||||||
|
*
|
||||||
|
* @param dictCodes 字典code串
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:dict:remove')")
|
@SaCheckPermission("system:dict:remove")
|
||||||
@Log(title = "字典类型", businessType = BusinessType.DELETE)
|
@Log(title = "字典类型", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{dictCodes}")
|
@DeleteMapping("/{dictCodes}")
|
||||||
public AjaxResult remove(@PathVariable Long[] dictCodes)
|
public R<Void> remove(@PathVariable Long[] dictCodes) {
|
||||||
{
|
dictDataService.deleteDictDataByIds(dictCodes);
|
||||||
return toAjax(dictDataService.deleteDictDataByIds(dictCodes));
|
return R.ok();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,131 +1,125 @@
|
|||||||
package com.ruoyi.web.controller.system;
|
package com.ruoyi.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.constant.UserConstants;
|
import com.ruoyi.common.constant.UserConstants;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
import com.ruoyi.common.core.domain.entity.SysDictType;
|
import com.ruoyi.common.core.domain.entity.SysDictType;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
import com.ruoyi.system.service.ISysDictTypeService;
|
import com.ruoyi.system.service.ISysDictTypeService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据字典信息
|
* 数据字典信息
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author Lion Li
|
||||||
*/
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/system/dict/type")
|
@RequestMapping("/system/dict/type")
|
||||||
public class SysDictTypeController extends BaseController
|
public class SysDictTypeController extends BaseController {
|
||||||
{
|
|
||||||
@Autowired
|
|
||||||
private ISysDictTypeService dictTypeService;
|
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasPermi('system:dict:list')")
|
private final ISysDictTypeService dictTypeService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询字典类型列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:dict:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(SysDictType dictType)
|
public TableDataInfo<SysDictType> list(SysDictType dictType, PageQuery pageQuery) {
|
||||||
{
|
return dictTypeService.selectPageDictTypeList(dictType, pageQuery);
|
||||||
startPage();
|
|
||||||
List<SysDictType> list = dictTypeService.selectDictTypeList(dictType);
|
|
||||||
return getDataTable(list);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出字典类型列表
|
||||||
|
*/
|
||||||
@Log(title = "字典类型", businessType = BusinessType.EXPORT)
|
@Log(title = "字典类型", businessType = BusinessType.EXPORT)
|
||||||
@PreAuthorize("@ss.hasPermi('system:dict:export')")
|
@SaCheckPermission("system:dict:export")
|
||||||
@GetMapping("/export")
|
@PostMapping("/export")
|
||||||
public AjaxResult export(SysDictType dictType)
|
public void export(SysDictType dictType, HttpServletResponse response) {
|
||||||
{
|
|
||||||
List<SysDictType> list = dictTypeService.selectDictTypeList(dictType);
|
List<SysDictType> list = dictTypeService.selectDictTypeList(dictType);
|
||||||
ExcelUtil<SysDictType> util = new ExcelUtil<SysDictType>(SysDictType.class);
|
ExcelUtil.exportExcel(list, "字典类型", SysDictType.class, response);
|
||||||
return util.exportExcel(list, "字典类型");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询字典类型详细
|
* 查询字典类型详细
|
||||||
|
*
|
||||||
|
* @param dictId 字典ID
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:dict:query')")
|
@SaCheckPermission("system:dict:query")
|
||||||
@GetMapping(value = "/{dictId}")
|
@GetMapping(value = "/{dictId}")
|
||||||
public AjaxResult getInfo(@PathVariable Long dictId)
|
public R<SysDictType> getInfo(@PathVariable Long dictId) {
|
||||||
{
|
return R.ok(dictTypeService.selectDictTypeById(dictId));
|
||||||
return AjaxResult.success(dictTypeService.selectDictTypeById(dictId));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增字典类型
|
* 新增字典类型
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:dict:add')")
|
@SaCheckPermission("system:dict:add")
|
||||||
@Log(title = "字典类型", businessType = BusinessType.INSERT)
|
@Log(title = "字典类型", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@Validated @RequestBody SysDictType dict)
|
public R<Void> add(@Validated @RequestBody SysDictType dict) {
|
||||||
{
|
if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict))) {
|
||||||
if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict)))
|
return R.fail("新增字典'" + dict.getDictName() + "'失败,字典类型已存在");
|
||||||
{
|
|
||||||
return AjaxResult.error("新增字典'" + dict.getDictName() + "'失败,字典类型已存在");
|
|
||||||
}
|
}
|
||||||
dict.setCreateBy(SecurityUtils.getUsername());
|
dictTypeService.insertDictType(dict);
|
||||||
return toAjax(dictTypeService.insertDictType(dict));
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改字典类型
|
* 修改字典类型
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:dict:edit')")
|
@SaCheckPermission("system:dict:edit")
|
||||||
@Log(title = "字典类型", businessType = BusinessType.UPDATE)
|
@Log(title = "字典类型", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@Validated @RequestBody SysDictType dict)
|
public R<Void> edit(@Validated @RequestBody SysDictType dict) {
|
||||||
{
|
if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict))) {
|
||||||
if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict)))
|
return R.fail("修改字典'" + dict.getDictName() + "'失败,字典类型已存在");
|
||||||
{
|
|
||||||
return AjaxResult.error("修改字典'" + dict.getDictName() + "'失败,字典类型已存在");
|
|
||||||
}
|
}
|
||||||
dict.setUpdateBy(SecurityUtils.getUsername());
|
dictTypeService.updateDictType(dict);
|
||||||
return toAjax(dictTypeService.updateDictType(dict));
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除字典类型
|
* 删除字典类型
|
||||||
|
*
|
||||||
|
* @param dictIds 字典ID串
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:dict:remove')")
|
@SaCheckPermission("system:dict:remove")
|
||||||
@Log(title = "字典类型", businessType = BusinessType.DELETE)
|
@Log(title = "字典类型", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{dictIds}")
|
@DeleteMapping("/{dictIds}")
|
||||||
public AjaxResult remove(@PathVariable Long[] dictIds)
|
public R<Void> remove(@PathVariable Long[] dictIds) {
|
||||||
{
|
dictTypeService.deleteDictTypeByIds(dictIds);
|
||||||
return toAjax(dictTypeService.deleteDictTypeByIds(dictIds));
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 清空缓存
|
* 刷新字典缓存
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:dict:remove')")
|
@SaCheckPermission("system:dict:remove")
|
||||||
@Log(title = "字典类型", businessType = BusinessType.CLEAN)
|
@Log(title = "字典类型", businessType = BusinessType.CLEAN)
|
||||||
@DeleteMapping("/clearCache")
|
@DeleteMapping("/refreshCache")
|
||||||
public AjaxResult clearCache()
|
public R<Void> refreshCache() {
|
||||||
{
|
dictTypeService.resetDictCache();
|
||||||
dictTypeService.clearCache();
|
return R.ok();
|
||||||
return AjaxResult.success();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取字典选择框列表
|
* 获取字典选择框列表
|
||||||
*/
|
*/
|
||||||
@GetMapping("/optionselect")
|
@GetMapping("/optionselect")
|
||||||
public AjaxResult optionselect()
|
public R<List<SysDictType>> optionselect() {
|
||||||
{
|
|
||||||
List<SysDictType> dictTypes = dictTypeService.selectDictTypeAll();
|
List<SysDictType> dictTypes = dictTypeService.selectDictTypeAll();
|
||||||
return AjaxResult.success(dictTypes);
|
return R.ok(dictTypes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package com.ruoyi.web.controller.system;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaIgnore;
|
||||||
|
import com.ruoyi.common.config.RuoYiConfig;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 首页
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
*/
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
public class SysIndexController {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统基础配置
|
||||||
|
*/
|
||||||
|
private final RuoYiConfig ruoyiConfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 访问首页,提示语
|
||||||
|
*/
|
||||||
|
@SaIgnore
|
||||||
|
@GetMapping("/")
|
||||||
|
public String index() {
|
||||||
|
return StringUtils.format("欢迎使用{}后台管理框架,当前版本:v{},请通过前端地址访问。", ruoyiConfig.getName(), ruoyiConfig.getVersion());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,43 +1,43 @@
|
|||||||
package com.ruoyi.web.controller.system;
|
package com.ruoyi.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
import cn.dev33.satoken.annotation.SaIgnore;
|
||||||
import java.util.Set;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.ruoyi.common.constant.Constants;
|
import com.ruoyi.common.constant.Constants;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.R;
|
||||||
import com.ruoyi.common.core.domain.entity.SysMenu;
|
import com.ruoyi.common.core.domain.entity.SysMenu;
|
||||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||||
import com.ruoyi.common.core.domain.model.LoginBody;
|
import com.ruoyi.common.core.domain.model.LoginBody;
|
||||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||||
import com.ruoyi.common.utils.ServletUtils;
|
import com.ruoyi.common.core.domain.model.SmsLoginBody;
|
||||||
import com.ruoyi.framework.web.service.SysLoginService;
|
import com.ruoyi.common.helper.LoginHelper;
|
||||||
import com.ruoyi.framework.web.service.SysPermissionService;
|
import com.ruoyi.system.domain.vo.RouterVo;
|
||||||
import com.ruoyi.framework.web.service.TokenService;
|
|
||||||
import com.ruoyi.system.service.ISysMenuService;
|
import com.ruoyi.system.service.ISysMenuService;
|
||||||
|
import com.ruoyi.system.service.ISysUserService;
|
||||||
|
import com.ruoyi.system.service.SysLoginService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登录验证
|
* 登录验证
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author Lion Li
|
||||||
*/
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
@RestController
|
@RestController
|
||||||
public class SysLoginController
|
public class SysLoginController {
|
||||||
{
|
|
||||||
@Autowired
|
|
||||||
private SysLoginService loginService;
|
|
||||||
|
|
||||||
@Autowired
|
private final SysLoginService loginService;
|
||||||
private ISysMenuService menuService;
|
private final ISysMenuService menuService;
|
||||||
|
private final ISysUserService userService;
|
||||||
@Autowired
|
|
||||||
private SysPermissionService permissionService;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private TokenService tokenService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登录方法
|
* 登录方法
|
||||||
@@ -45,15 +45,57 @@ public class SysLoginController
|
|||||||
* @param loginBody 登录信息
|
* @param loginBody 登录信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@SaIgnore
|
||||||
@PostMapping("/login")
|
@PostMapping("/login")
|
||||||
public AjaxResult login(@RequestBody LoginBody loginBody)
|
public R<Map<String, Object>> login(@Validated @RequestBody LoginBody loginBody) {
|
||||||
{
|
Map<String, Object> ajax = new HashMap<>();
|
||||||
AjaxResult ajax = AjaxResult.success();
|
|
||||||
// 生成令牌
|
// 生成令牌
|
||||||
String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(),
|
String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(),
|
||||||
loginBody.getUuid());
|
loginBody.getUuid());
|
||||||
ajax.put(Constants.TOKEN, token);
|
ajax.put(Constants.TOKEN, token);
|
||||||
return ajax;
|
return R.ok(ajax);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 短信登录(示例)
|
||||||
|
*
|
||||||
|
* @param smsLoginBody 登录信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@SaIgnore
|
||||||
|
@PostMapping("/smsLogin")
|
||||||
|
public R<Map<String, Object>> smsLogin(@Validated @RequestBody SmsLoginBody smsLoginBody) {
|
||||||
|
Map<String, Object> ajax = new HashMap<>();
|
||||||
|
// 生成令牌
|
||||||
|
String token = loginService.smsLogin(smsLoginBody.getPhonenumber(), smsLoginBody.getSmsCode());
|
||||||
|
ajax.put(Constants.TOKEN, token);
|
||||||
|
return R.ok(ajax);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小程序登录(示例)
|
||||||
|
*
|
||||||
|
* @param xcxCode 小程序code
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@SaIgnore
|
||||||
|
@PostMapping("/xcxLogin")
|
||||||
|
public R<Map<String, Object>> xcxLogin(@NotBlank(message = "{xcx.code.not.blank}") String xcxCode) {
|
||||||
|
Map<String, Object> ajax = new HashMap<>();
|
||||||
|
// 生成令牌
|
||||||
|
String token = loginService.xcxLogin(xcxCode);
|
||||||
|
ajax.put(Constants.TOKEN, token);
|
||||||
|
return R.ok(ajax);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退出登录
|
||||||
|
*/
|
||||||
|
@SaIgnore
|
||||||
|
@PostMapping("/logout")
|
||||||
|
public R<Void> logout() {
|
||||||
|
loginService.logout();
|
||||||
|
return R.ok("退出成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -62,19 +104,14 @@ public class SysLoginController
|
|||||||
* @return 用户信息
|
* @return 用户信息
|
||||||
*/
|
*/
|
||||||
@GetMapping("getInfo")
|
@GetMapping("getInfo")
|
||||||
public AjaxResult getInfo()
|
public R<Map<String, Object>> getInfo() {
|
||||||
{
|
LoginUser loginUser = LoginHelper.getLoginUser();
|
||||||
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
SysUser user = userService.selectUserById(loginUser.getUserId());
|
||||||
SysUser user = loginUser.getUser();
|
Map<String, Object> ajax = new HashMap<>();
|
||||||
// 角色集合
|
|
||||||
Set<String> roles = permissionService.getRolePermission(user);
|
|
||||||
// 权限集合
|
|
||||||
Set<String> permissions = permissionService.getMenuPermission(user);
|
|
||||||
AjaxResult ajax = AjaxResult.success();
|
|
||||||
ajax.put("user", user);
|
ajax.put("user", user);
|
||||||
ajax.put("roles", roles);
|
ajax.put("roles", loginUser.getRolePermission());
|
||||||
ajax.put("permissions", permissions);
|
ajax.put("permissions", loginUser.getMenuPermission());
|
||||||
return ajax;
|
return R.ok(ajax);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -83,12 +120,9 @@ public class SysLoginController
|
|||||||
* @return 路由信息
|
* @return 路由信息
|
||||||
*/
|
*/
|
||||||
@GetMapping("getRouters")
|
@GetMapping("getRouters")
|
||||||
public AjaxResult getRouters()
|
public R<List<RouterVo>> getRouters() {
|
||||||
{
|
Long userId = LoginHelper.getUserId();
|
||||||
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
List<SysMenu> menus = menuService.selectMenuTreeByUserId(userId);
|
||||||
// 用户信息
|
return R.ok(menuService.buildMenus(menus));
|
||||||
SysUser user = loginUser.getUser();
|
|
||||||
List<SysMenu> menus = menuService.selectMenuTreeByUserId(user.getUserId());
|
|
||||||
return AjaxResult.success(menuService.buildMenus(menus));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,156 +1,126 @@
|
|||||||
package com.ruoyi.web.controller.system;
|
package com.ruoyi.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import cn.hutool.core.lang.tree.Tree;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.constant.Constants;
|
|
||||||
import com.ruoyi.common.constant.UserConstants;
|
import com.ruoyi.common.constant.UserConstants;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.R;
|
||||||
import com.ruoyi.common.core.domain.entity.SysMenu;
|
import com.ruoyi.common.core.domain.entity.SysMenu;
|
||||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
|
||||||
import com.ruoyi.common.utils.ServletUtils;
|
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.framework.web.service.TokenService;
|
|
||||||
import com.ruoyi.system.service.ISysMenuService;
|
import com.ruoyi.system.service.ISysMenuService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 菜单信息
|
* 菜单信息
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author Lion Li
|
||||||
*/
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/system/menu")
|
@RequestMapping("/system/menu")
|
||||||
public class SysMenuController extends BaseController
|
public class SysMenuController extends BaseController {
|
||||||
{
|
|
||||||
@Autowired
|
|
||||||
private ISysMenuService menuService;
|
|
||||||
|
|
||||||
@Autowired
|
private final ISysMenuService menuService;
|
||||||
private TokenService tokenService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取菜单列表
|
* 获取菜单列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:menu:list')")
|
@SaCheckPermission("system:menu:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public AjaxResult list(SysMenu menu)
|
public R<List<SysMenu>> list(SysMenu menu) {
|
||||||
{
|
List<SysMenu> menus = menuService.selectMenuList(menu, getUserId());
|
||||||
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
return R.ok(menus);
|
||||||
Long userId = loginUser.getUser().getUserId();
|
|
||||||
List<SysMenu> menus = menuService.selectMenuList(menu, userId);
|
|
||||||
return AjaxResult.success(menus);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据菜单编号获取详细信息
|
* 根据菜单编号获取详细信息
|
||||||
|
*
|
||||||
|
* @param menuId 菜单ID
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:menu:query')")
|
@SaCheckPermission("system:menu:query")
|
||||||
@GetMapping(value = "/{menuId}")
|
@GetMapping(value = "/{menuId}")
|
||||||
public AjaxResult getInfo(@PathVariable Long menuId)
|
public R<SysMenu> getInfo(@PathVariable Long menuId) {
|
||||||
{
|
return R.ok(menuService.selectMenuById(menuId));
|
||||||
return AjaxResult.success(menuService.selectMenuById(menuId));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取菜单下拉树列表
|
* 获取菜单下拉树列表
|
||||||
*/
|
*/
|
||||||
@GetMapping("/treeselect")
|
@GetMapping("/treeselect")
|
||||||
public AjaxResult treeselect(SysMenu menu)
|
public R<List<Tree<Long>>> treeselect(SysMenu menu) {
|
||||||
{
|
List<SysMenu> menus = menuService.selectMenuList(menu, getUserId());
|
||||||
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
return R.ok(menuService.buildMenuTreeSelect(menus));
|
||||||
Long userId = loginUser.getUser().getUserId();
|
|
||||||
List<SysMenu> menus = menuService.selectMenuList(menu, userId);
|
|
||||||
return AjaxResult.success(menuService.buildMenuTreeSelect(menus));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 加载对应角色菜单列表树
|
* 加载对应角色菜单列表树
|
||||||
|
*
|
||||||
|
* @param roleId 角色ID
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/roleMenuTreeselect/{roleId}")
|
@GetMapping(value = "/roleMenuTreeselect/{roleId}")
|
||||||
public AjaxResult roleMenuTreeselect(@PathVariable("roleId") Long roleId)
|
public R<Map<String, Object>> roleMenuTreeselect(@PathVariable("roleId") Long roleId) {
|
||||||
{
|
List<SysMenu> menus = menuService.selectMenuList(getUserId());
|
||||||
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
Map<String, Object> ajax = new HashMap<>();
|
||||||
List<SysMenu> menus = menuService.selectMenuList(loginUser.getUser().getUserId());
|
|
||||||
AjaxResult ajax = AjaxResult.success();
|
|
||||||
ajax.put("checkedKeys", menuService.selectMenuListByRoleId(roleId));
|
ajax.put("checkedKeys", menuService.selectMenuListByRoleId(roleId));
|
||||||
ajax.put("menus", menuService.buildMenuTreeSelect(menus));
|
ajax.put("menus", menuService.buildMenuTreeSelect(menus));
|
||||||
return ajax;
|
return R.ok(ajax);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增菜单
|
* 新增菜单
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:menu:add')")
|
@SaCheckPermission("system:menu:add")
|
||||||
@Log(title = "菜单管理", businessType = BusinessType.INSERT)
|
@Log(title = "菜单管理", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@Validated @RequestBody SysMenu menu)
|
public R<Void> add(@Validated @RequestBody SysMenu menu) {
|
||||||
{
|
if (UserConstants.NOT_UNIQUE.equals(menuService.checkMenuNameUnique(menu))) {
|
||||||
if (UserConstants.NOT_UNIQUE.equals(menuService.checkMenuNameUnique(menu)))
|
return R.fail("新增菜单'" + menu.getMenuName() + "'失败,菜单名称已存在");
|
||||||
{
|
} else if (UserConstants.YES_FRAME.equals(menu.getIsFrame()) && !StringUtils.ishttp(menu.getPath())) {
|
||||||
return AjaxResult.error("新增菜单'" + menu.getMenuName() + "'失败,菜单名称已存在");
|
return R.fail("新增菜单'" + menu.getMenuName() + "'失败,地址必须以http(s)://开头");
|
||||||
}
|
}
|
||||||
else if (UserConstants.YES_FRAME.equals(menu.getIsFrame())
|
|
||||||
&& !StringUtils.startsWithAny(menu.getPath(), Constants.HTTP, Constants.HTTPS))
|
|
||||||
{
|
|
||||||
return AjaxResult.error("新增菜单'" + menu.getMenuName() + "'失败,地址必须以http(s)://开头");
|
|
||||||
}
|
|
||||||
menu.setCreateBy(SecurityUtils.getUsername());
|
|
||||||
return toAjax(menuService.insertMenu(menu));
|
return toAjax(menuService.insertMenu(menu));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改菜单
|
* 修改菜单
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:menu:edit')")
|
@SaCheckPermission("system:menu:edit")
|
||||||
@Log(title = "菜单管理", businessType = BusinessType.UPDATE)
|
@Log(title = "菜单管理", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@Validated @RequestBody SysMenu menu)
|
public R<Void> edit(@Validated @RequestBody SysMenu menu) {
|
||||||
{
|
if (UserConstants.NOT_UNIQUE.equals(menuService.checkMenuNameUnique(menu))) {
|
||||||
if (UserConstants.NOT_UNIQUE.equals(menuService.checkMenuNameUnique(menu)))
|
return R.fail("修改菜单'" + menu.getMenuName() + "'失败,菜单名称已存在");
|
||||||
{
|
} else if (UserConstants.YES_FRAME.equals(menu.getIsFrame()) && !StringUtils.ishttp(menu.getPath())) {
|
||||||
return AjaxResult.error("修改菜单'" + menu.getMenuName() + "'失败,菜单名称已存在");
|
return R.fail("修改菜单'" + menu.getMenuName() + "'失败,地址必须以http(s)://开头");
|
||||||
|
} else if (menu.getMenuId().equals(menu.getParentId())) {
|
||||||
|
return R.fail("修改菜单'" + menu.getMenuName() + "'失败,上级菜单不能选择自己");
|
||||||
}
|
}
|
||||||
else if (UserConstants.YES_FRAME.equals(menu.getIsFrame())
|
|
||||||
&& !StringUtils.startsWithAny(menu.getPath(), Constants.HTTP, Constants.HTTPS))
|
|
||||||
{
|
|
||||||
return AjaxResult.error("修改菜单'" + menu.getMenuName() + "'失败,地址必须以http(s)://开头");
|
|
||||||
}
|
|
||||||
else if (menu.getMenuId().equals(menu.getParentId()))
|
|
||||||
{
|
|
||||||
return AjaxResult.error("修改菜单'" + menu.getMenuName() + "'失败,上级菜单不能选择自己");
|
|
||||||
}
|
|
||||||
menu.setUpdateBy(SecurityUtils.getUsername());
|
|
||||||
return toAjax(menuService.updateMenu(menu));
|
return toAjax(menuService.updateMenu(menu));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除菜单
|
* 删除菜单
|
||||||
|
*
|
||||||
|
* @param menuId 菜单ID
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:menu:remove')")
|
@SaCheckPermission("system:menu:remove")
|
||||||
@Log(title = "菜单管理", businessType = BusinessType.DELETE)
|
@Log(title = "菜单管理", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{menuId}")
|
@DeleteMapping("/{menuId}")
|
||||||
public AjaxResult remove(@PathVariable("menuId") Long menuId)
|
public R<Void> remove(@PathVariable("menuId") Long menuId) {
|
||||||
{
|
if (menuService.hasChildByMenuId(menuId)) {
|
||||||
if (menuService.hasChildByMenuId(menuId))
|
return R.warn("存在子菜单,不允许删除");
|
||||||
{
|
|
||||||
return AjaxResult.error("存在子菜单,不允许删除");
|
|
||||||
}
|
}
|
||||||
if (menuService.checkMenuExistRole(menuId))
|
if (menuService.checkMenuExistRole(menuId)) {
|
||||||
{
|
return R.warn("菜单已分配,不允许删除");
|
||||||
return AjaxResult.error("菜单已分配,不允许删除");
|
|
||||||
}
|
}
|
||||||
return toAjax(menuService.deleteMenuById(menuId));
|
return toAjax(menuService.deleteMenuById(menuId));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,92 +1,80 @@
|
|||||||
package com.ruoyi.web.controller.system;
|
package com.ruoyi.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
|
||||||
import com.ruoyi.system.domain.SysNotice;
|
import com.ruoyi.system.domain.SysNotice;
|
||||||
import com.ruoyi.system.service.ISysNoticeService;
|
import com.ruoyi.system.service.ISysNoticeService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 公告 信息操作处理
|
* 公告 信息操作处理
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author Lion Li
|
||||||
*/
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/system/notice")
|
@RequestMapping("/system/notice")
|
||||||
public class SysNoticeController extends BaseController
|
public class SysNoticeController extends BaseController {
|
||||||
{
|
|
||||||
@Autowired
|
private final ISysNoticeService noticeService;
|
||||||
private ISysNoticeService noticeService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取通知公告列表
|
* 获取通知公告列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:notice:list')")
|
@SaCheckPermission("system:notice:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(SysNotice notice)
|
public TableDataInfo<SysNotice> list(SysNotice notice, PageQuery pageQuery) {
|
||||||
{
|
return noticeService.selectPageNoticeList(notice, pageQuery);
|
||||||
startPage();
|
|
||||||
List<SysNotice> list = noticeService.selectNoticeList(notice);
|
|
||||||
return getDataTable(list);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据通知公告编号获取详细信息
|
* 根据通知公告编号获取详细信息
|
||||||
|
*
|
||||||
|
* @param noticeId 公告ID
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:notice:query')")
|
@SaCheckPermission("system:notice:query")
|
||||||
@GetMapping(value = "/{noticeId}")
|
@GetMapping(value = "/{noticeId}")
|
||||||
public AjaxResult getInfo(@PathVariable Long noticeId)
|
public R<SysNotice> getInfo(@PathVariable Long noticeId) {
|
||||||
{
|
return R.ok(noticeService.selectNoticeById(noticeId));
|
||||||
return AjaxResult.success(noticeService.selectNoticeById(noticeId));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增通知公告
|
* 新增通知公告
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:notice:add')")
|
@SaCheckPermission("system:notice:add")
|
||||||
@Log(title = "通知公告", businessType = BusinessType.INSERT)
|
@Log(title = "通知公告", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@Validated @RequestBody SysNotice notice)
|
public R<Void> add(@Validated @RequestBody SysNotice notice) {
|
||||||
{
|
|
||||||
notice.setCreateBy(SecurityUtils.getUsername());
|
|
||||||
return toAjax(noticeService.insertNotice(notice));
|
return toAjax(noticeService.insertNotice(notice));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改通知公告
|
* 修改通知公告
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:notice:edit')")
|
@SaCheckPermission("system:notice:edit")
|
||||||
@Log(title = "通知公告", businessType = BusinessType.UPDATE)
|
@Log(title = "通知公告", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@Validated @RequestBody SysNotice notice)
|
public R<Void> edit(@Validated @RequestBody SysNotice notice) {
|
||||||
{
|
|
||||||
notice.setUpdateBy(SecurityUtils.getUsername());
|
|
||||||
return toAjax(noticeService.updateNotice(notice));
|
return toAjax(noticeService.updateNotice(notice));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除通知公告
|
* 删除通知公告
|
||||||
|
*
|
||||||
|
* @param noticeIds 公告ID串
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:notice:remove')")
|
@SaCheckPermission("system:notice:remove")
|
||||||
@Log(title = "通知公告", businessType = BusinessType.DELETE)
|
@Log(title = "通知公告", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{noticeIds}")
|
@DeleteMapping("/{noticeIds}")
|
||||||
public AjaxResult remove(@PathVariable Long[] noticeIds)
|
public R<Void> remove(@PathVariable Long[] noticeIds) {
|
||||||
{
|
|
||||||
return toAjax(noticeService.deleteNoticeByIds(noticeIds));
|
return toAjax(noticeService.deleteNoticeByIds(noticeIds));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,105 @@
|
|||||||
|
package com.ruoyi.web.controller.system;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.core.validate.AddGroup;
|
||||||
|
import com.ruoyi.common.core.validate.EditGroup;
|
||||||
|
import com.ruoyi.common.core.validate.QueryGroup;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.system.domain.bo.SysOssConfigBo;
|
||||||
|
import com.ruoyi.system.domain.vo.SysOssConfigVo;
|
||||||
|
import com.ruoyi.system.service.ISysOssConfigService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对象存储配置
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @author 孤舟烟雨
|
||||||
|
* @date 2021-08-13
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/system/oss/config")
|
||||||
|
public class SysOssConfigController extends BaseController {
|
||||||
|
|
||||||
|
private final ISysOssConfigService iSysOssConfigService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询对象存储配置列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:oss:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<SysOssConfigVo> list(@Validated(QueryGroup.class) SysOssConfigBo bo, PageQuery pageQuery) {
|
||||||
|
return iSysOssConfigService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取对象存储配置详细信息
|
||||||
|
*
|
||||||
|
* @param ossConfigId OSS配置ID
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:oss:query")
|
||||||
|
@GetMapping("/{ossConfigId}")
|
||||||
|
public R<SysOssConfigVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long ossConfigId) {
|
||||||
|
return R.ok(iSysOssConfigService.queryById(ossConfigId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增对象存储配置
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:oss:add")
|
||||||
|
@Log(title = "对象存储配置", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody SysOssConfigBo bo) {
|
||||||
|
return toAjax(iSysOssConfigService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改对象存储配置
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:oss:edit")
|
||||||
|
@Log(title = "对象存储配置", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody SysOssConfigBo bo) {
|
||||||
|
return toAjax(iSysOssConfigService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除对象存储配置
|
||||||
|
*
|
||||||
|
* @param ossConfigIds OSS配置ID串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:oss:remove")
|
||||||
|
@Log(title = "对象存储配置", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ossConfigIds}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ossConfigIds) {
|
||||||
|
return toAjax(iSysOssConfigService.deleteWithValidByIds(Arrays.asList(ossConfigIds), true));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态修改
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:oss:edit")
|
||||||
|
@Log(title = "对象存储状态修改", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping("/changeStatus")
|
||||||
|
public R<Void> changeStatus(@RequestBody SysOssConfigBo bo) {
|
||||||
|
return toAjax(iSysOssConfigService.updateOssConfigStatus(bo));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,117 @@
|
|||||||
|
package com.ruoyi.web.controller.system;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.convert.Convert;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import cn.hutool.http.HttpException;
|
||||||
|
import cn.hutool.http.HttpUtil;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.core.validate.QueryGroup;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.exception.ServiceException;
|
||||||
|
import com.ruoyi.common.utils.file.FileUtils;
|
||||||
|
import com.ruoyi.oss.core.OssClient;
|
||||||
|
import com.ruoyi.oss.factory.OssFactory;
|
||||||
|
import com.ruoyi.system.domain.SysOss;
|
||||||
|
import com.ruoyi.system.domain.bo.SysOssBo;
|
||||||
|
import com.ruoyi.system.domain.vo.SysOssVo;
|
||||||
|
import com.ruoyi.system.service.ISysOssService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件上传 控制层
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/system/oss")
|
||||||
|
public class SysOssController extends BaseController {
|
||||||
|
|
||||||
|
private final ISysOssService iSysOssService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询OSS对象存储列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:oss:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<SysOssVo> list(@Validated(QueryGroup.class) SysOssBo bo, PageQuery pageQuery) {
|
||||||
|
return iSysOssService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询OSS对象基于id串
|
||||||
|
*
|
||||||
|
* @param ossIds OSS对象ID串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:oss:list")
|
||||||
|
@GetMapping("/listByIds/{ossIds}")
|
||||||
|
public R<List<SysOssVo>> listByIds(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ossIds) {
|
||||||
|
List<SysOssVo> list = iSysOssService.listByIds(Arrays.asList(ossIds));
|
||||||
|
return R.ok(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传OSS对象存储
|
||||||
|
*
|
||||||
|
* @param file 文件
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:oss:upload")
|
||||||
|
@Log(title = "OSS对象存储", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||||
|
public R<Map<String, String>> upload(@RequestPart("file") MultipartFile file) {
|
||||||
|
if (ObjectUtil.isNull(file)) {
|
||||||
|
throw new ServiceException("上传文件不能为空");
|
||||||
|
}
|
||||||
|
SysOssVo oss = iSysOssService.upload(file);
|
||||||
|
Map<String, String> map = new HashMap<>(2);
|
||||||
|
map.put("url", oss.getUrl());
|
||||||
|
map.put("fileName", oss.getOriginalName());
|
||||||
|
map.put("ossId", oss.getOssId().toString());
|
||||||
|
return R.ok(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下载OSS对象
|
||||||
|
*
|
||||||
|
* @param ossId OSS对象ID
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:oss:download")
|
||||||
|
@GetMapping("/download/{ossId}")
|
||||||
|
public void download(@PathVariable Long ossId, HttpServletResponse response) throws IOException {
|
||||||
|
iSysOssService.download(ossId,response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除OSS对象存储
|
||||||
|
*
|
||||||
|
* @param ossIds OSS对象ID串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:oss:remove")
|
||||||
|
@Log(title = "OSS对象存储", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ossIds}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ossIds) {
|
||||||
|
return toAjax(iSysOssService.deleteWithValidByIds(Arrays.asList(ossIds), true));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,120 +1,106 @@
|
|||||||
package com.ruoyi.web.controller.system;
|
package com.ruoyi.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.constant.UserConstants;
|
import com.ruoyi.common.constant.UserConstants;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
import com.ruoyi.system.domain.SysPost;
|
import com.ruoyi.system.domain.SysPost;
|
||||||
import com.ruoyi.system.service.ISysPostService;
|
import com.ruoyi.system.service.ISysPostService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 岗位信息操作处理
|
* 岗位信息操作处理
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author Lion Li
|
||||||
*/
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/system/post")
|
@RequestMapping("/system/post")
|
||||||
public class SysPostController extends BaseController
|
public class SysPostController extends BaseController {
|
||||||
{
|
|
||||||
@Autowired
|
private final ISysPostService postService;
|
||||||
private ISysPostService postService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取岗位列表
|
* 获取岗位列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:post:list')")
|
@SaCheckPermission("system:post:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(SysPost post)
|
public TableDataInfo<SysPost> list(SysPost post, PageQuery pageQuery) {
|
||||||
{
|
return postService.selectPagePostList(post, pageQuery);
|
||||||
startPage();
|
|
||||||
List<SysPost> list = postService.selectPostList(post);
|
|
||||||
return getDataTable(list);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出岗位列表
|
||||||
|
*/
|
||||||
@Log(title = "岗位管理", businessType = BusinessType.EXPORT)
|
@Log(title = "岗位管理", businessType = BusinessType.EXPORT)
|
||||||
@PreAuthorize("@ss.hasPermi('system:post:export')")
|
@SaCheckPermission("system:post:export")
|
||||||
@GetMapping("/export")
|
@PostMapping("/export")
|
||||||
public AjaxResult export(SysPost post)
|
public void export(SysPost post, HttpServletResponse response) {
|
||||||
{
|
|
||||||
List<SysPost> list = postService.selectPostList(post);
|
List<SysPost> list = postService.selectPostList(post);
|
||||||
ExcelUtil<SysPost> util = new ExcelUtil<SysPost>(SysPost.class);
|
ExcelUtil.exportExcel(list, "岗位数据", SysPost.class, response);
|
||||||
return util.exportExcel(list, "岗位数据");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据岗位编号获取详细信息
|
* 根据岗位编号获取详细信息
|
||||||
|
*
|
||||||
|
* @param postId 岗位ID
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:post:query')")
|
@SaCheckPermission("system:post:query")
|
||||||
@GetMapping(value = "/{postId}")
|
@GetMapping(value = "/{postId}")
|
||||||
public AjaxResult getInfo(@PathVariable Long postId)
|
public R<SysPost> getInfo(@PathVariable Long postId) {
|
||||||
{
|
return R.ok(postService.selectPostById(postId));
|
||||||
return AjaxResult.success(postService.selectPostById(postId));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增岗位
|
* 新增岗位
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:post:add')")
|
@SaCheckPermission("system:post:add")
|
||||||
@Log(title = "岗位管理", businessType = BusinessType.INSERT)
|
@Log(title = "岗位管理", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@Validated @RequestBody SysPost post)
|
public R<Void> add(@Validated @RequestBody SysPost post) {
|
||||||
{
|
if (UserConstants.NOT_UNIQUE.equals(postService.checkPostNameUnique(post))) {
|
||||||
if (UserConstants.NOT_UNIQUE.equals(postService.checkPostNameUnique(post)))
|
return R.fail("新增岗位'" + post.getPostName() + "'失败,岗位名称已存在");
|
||||||
{
|
} else if (UserConstants.NOT_UNIQUE.equals(postService.checkPostCodeUnique(post))) {
|
||||||
return AjaxResult.error("新增岗位'" + post.getPostName() + "'失败,岗位名称已存在");
|
return R.fail("新增岗位'" + post.getPostName() + "'失败,岗位编码已存在");
|
||||||
}
|
}
|
||||||
else if (UserConstants.NOT_UNIQUE.equals(postService.checkPostCodeUnique(post)))
|
|
||||||
{
|
|
||||||
return AjaxResult.error("新增岗位'" + post.getPostName() + "'失败,岗位编码已存在");
|
|
||||||
}
|
|
||||||
post.setCreateBy(SecurityUtils.getUsername());
|
|
||||||
return toAjax(postService.insertPost(post));
|
return toAjax(postService.insertPost(post));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改岗位
|
* 修改岗位
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:post:edit')")
|
@SaCheckPermission("system:post:edit")
|
||||||
@Log(title = "岗位管理", businessType = BusinessType.UPDATE)
|
@Log(title = "岗位管理", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@Validated @RequestBody SysPost post)
|
public R<Void> edit(@Validated @RequestBody SysPost post) {
|
||||||
{
|
if (UserConstants.NOT_UNIQUE.equals(postService.checkPostNameUnique(post))) {
|
||||||
if (UserConstants.NOT_UNIQUE.equals(postService.checkPostNameUnique(post)))
|
return R.fail("修改岗位'" + post.getPostName() + "'失败,岗位名称已存在");
|
||||||
{
|
} else if (UserConstants.NOT_UNIQUE.equals(postService.checkPostCodeUnique(post))) {
|
||||||
return AjaxResult.error("修改岗位'" + post.getPostName() + "'失败,岗位名称已存在");
|
return R.fail("修改岗位'" + post.getPostName() + "'失败,岗位编码已存在");
|
||||||
}
|
}
|
||||||
else if (UserConstants.NOT_UNIQUE.equals(postService.checkPostCodeUnique(post)))
|
|
||||||
{
|
|
||||||
return AjaxResult.error("修改岗位'" + post.getPostName() + "'失败,岗位编码已存在");
|
|
||||||
}
|
|
||||||
post.setUpdateBy(SecurityUtils.getUsername());
|
|
||||||
return toAjax(postService.updatePost(post));
|
return toAjax(postService.updatePost(post));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除岗位
|
* 删除岗位
|
||||||
|
*
|
||||||
|
* @param postIds 岗位ID串
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:post:remove')")
|
@SaCheckPermission("system:post:remove")
|
||||||
@Log(title = "岗位管理", businessType = BusinessType.DELETE)
|
@Log(title = "岗位管理", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{postIds}")
|
@DeleteMapping("/{postIds}")
|
||||||
public AjaxResult remove(@PathVariable Long[] postIds)
|
public R<Void> remove(@PathVariable Long[] postIds) {
|
||||||
{
|
|
||||||
return toAjax(postService.deletePostByIds(postIds));
|
return toAjax(postService.deletePostByIds(postIds));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,9 +108,8 @@ public class SysPostController extends BaseController
|
|||||||
* 获取岗位选择框列表
|
* 获取岗位选择框列表
|
||||||
*/
|
*/
|
||||||
@GetMapping("/optionselect")
|
@GetMapping("/optionselect")
|
||||||
public AjaxResult optionselect()
|
public R<List<SysPost>> optionselect() {
|
||||||
{
|
|
||||||
List<SysPost> posts = postService.selectPostAll();
|
List<SysPost> posts = postService.selectPostAll();
|
||||||
return AjaxResult.success(posts);
|
return R.ok(posts);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,57 +1,55 @@
|
|||||||
package com.ruoyi.web.controller.system;
|
package com.ruoyi.web.controller.system;
|
||||||
|
|
||||||
import java.io.IOException;
|
import cn.dev33.satoken.secure.BCrypt;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import cn.hutool.core.io.FileUtil;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.config.RuoYiConfig;
|
|
||||||
import com.ruoyi.common.constant.UserConstants;
|
import com.ruoyi.common.constant.UserConstants;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.R;
|
||||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
import com.ruoyi.common.helper.LoginHelper;
|
||||||
import com.ruoyi.common.utils.ServletUtils;
|
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
import com.ruoyi.common.utils.file.MimeTypeUtils;
|
||||||
import com.ruoyi.framework.web.service.TokenService;
|
import com.ruoyi.system.domain.SysOss;
|
||||||
|
import com.ruoyi.system.domain.vo.SysOssVo;
|
||||||
|
import com.ruoyi.system.service.ISysOssService;
|
||||||
import com.ruoyi.system.service.ISysUserService;
|
import com.ruoyi.system.service.ISysUserService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 个人信息 业务处理
|
* 个人信息 业务处理
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author Lion Li
|
||||||
*/
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/system/user/profile")
|
@RequestMapping("/system/user/profile")
|
||||||
public class SysProfileController extends BaseController
|
public class SysProfileController extends BaseController {
|
||||||
{
|
|
||||||
@Autowired
|
|
||||||
private ISysUserService userService;
|
|
||||||
|
|
||||||
@Autowired
|
private final ISysUserService userService;
|
||||||
private TokenService tokenService;
|
private final ISysOssService iSysOssService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 个人信息
|
* 个人信息
|
||||||
*/
|
*/
|
||||||
@GetMapping
|
@GetMapping
|
||||||
public AjaxResult profile()
|
public R<Map<String, Object>> profile() {
|
||||||
{
|
SysUser user = userService.selectUserById(getUserId());
|
||||||
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
Map<String, Object> ajax = new HashMap<>();
|
||||||
SysUser user = loginUser.getUser();
|
ajax.put("user", user);
|
||||||
AjaxResult ajax = AjaxResult.success(user);
|
ajax.put("roleGroup", userService.selectUserRoleGroup(user.getUserName()));
|
||||||
ajax.put("roleGroup", userService.selectUserRoleGroup(loginUser.getUsername()));
|
ajax.put("postGroup", userService.selectUserPostGroup(user.getUserName()));
|
||||||
ajax.put("postGroup", userService.selectUserPostGroup(loginUser.getUsername()));
|
return R.ok(ajax);
|
||||||
return ajax;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -59,81 +57,72 @@ public class SysProfileController extends BaseController
|
|||||||
*/
|
*/
|
||||||
@Log(title = "个人信息", businessType = BusinessType.UPDATE)
|
@Log(title = "个人信息", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult updateProfile(@RequestBody SysUser user)
|
public R<Void> updateProfile(@RequestBody SysUser user) {
|
||||||
{
|
|
||||||
if (StringUtils.isNotEmpty(user.getPhonenumber())
|
if (StringUtils.isNotEmpty(user.getPhonenumber())
|
||||||
&& UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
|
&& UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user))) {
|
||||||
{
|
return R.fail("修改用户'" + user.getUserName() + "'失败,手机号码已存在");
|
||||||
return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,手机号码已存在");
|
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotEmpty(user.getEmail())
|
if (StringUtils.isNotEmpty(user.getEmail())
|
||||||
&& UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
|
&& UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user))) {
|
||||||
{
|
return R.fail("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在");
|
||||||
return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在");
|
|
||||||
}
|
}
|
||||||
if (userService.updateUserProfile(user) > 0)
|
user.setUserId(getUserId());
|
||||||
{
|
user.setUserName(null);
|
||||||
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
user.setPassword(null);
|
||||||
// 更新缓存用户信息
|
user.setAvatar(null);
|
||||||
loginUser.getUser().setNickName(user.getNickName());
|
user.setDeptId(null);
|
||||||
loginUser.getUser().setPhonenumber(user.getPhonenumber());
|
if (userService.updateUserProfile(user) > 0) {
|
||||||
loginUser.getUser().setEmail(user.getEmail());
|
return R.ok();
|
||||||
loginUser.getUser().setSex(user.getSex());
|
|
||||||
tokenService.setLoginUser(loginUser);
|
|
||||||
return AjaxResult.success();
|
|
||||||
}
|
}
|
||||||
return AjaxResult.error("修改个人信息异常,请联系管理员");
|
return R.fail("修改个人信息异常,请联系管理员");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 重置密码
|
* 重置密码
|
||||||
|
*
|
||||||
|
* @param newPassword 旧密码
|
||||||
|
* @param oldPassword 新密码
|
||||||
*/
|
*/
|
||||||
@Log(title = "个人信息", businessType = BusinessType.UPDATE)
|
@Log(title = "个人信息", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping("/updatePwd")
|
@PutMapping("/updatePwd")
|
||||||
public AjaxResult updatePwd(String oldPassword, String newPassword)
|
public R<Void> updatePwd(String oldPassword, String newPassword) {
|
||||||
{
|
SysUser user = userService.selectUserById(LoginHelper.getUserId());
|
||||||
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
String userName = user.getUserName();
|
||||||
String userName = loginUser.getUsername();
|
String password = user.getPassword();
|
||||||
String password = loginUser.getPassword();
|
if (!BCrypt.checkpw(oldPassword, password)) {
|
||||||
if (!SecurityUtils.matchesPassword(oldPassword, password))
|
return R.fail("修改密码失败,旧密码错误");
|
||||||
{
|
|
||||||
return AjaxResult.error("修改密码失败,旧密码错误");
|
|
||||||
}
|
}
|
||||||
if (SecurityUtils.matchesPassword(newPassword, password))
|
if (BCrypt.checkpw(newPassword, password)) {
|
||||||
{
|
return R.fail("新密码不能与旧密码相同");
|
||||||
return AjaxResult.error("新密码不能与旧密码相同");
|
|
||||||
}
|
}
|
||||||
if (userService.resetUserPwd(userName, SecurityUtils.encryptPassword(newPassword)) > 0)
|
|
||||||
{
|
if (userService.resetUserPwd(userName, BCrypt.hashpw(newPassword)) > 0) {
|
||||||
// 更新缓存用户密码
|
return R.ok();
|
||||||
loginUser.getUser().setPassword(SecurityUtils.encryptPassword(newPassword));
|
|
||||||
tokenService.setLoginUser(loginUser);
|
|
||||||
return AjaxResult.success();
|
|
||||||
}
|
}
|
||||||
return AjaxResult.error("修改密码异常,请联系管理员");
|
return R.fail("修改密码异常,请联系管理员");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 头像上传
|
* 头像上传
|
||||||
|
*
|
||||||
|
* @param avatarfile 用户头像
|
||||||
*/
|
*/
|
||||||
@Log(title = "用户头像", businessType = BusinessType.UPDATE)
|
@Log(title = "用户头像", businessType = BusinessType.UPDATE)
|
||||||
@PostMapping("/avatar")
|
@PostMapping(value = "/avatar", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||||
public AjaxResult avatar(@RequestParam("avatarfile") MultipartFile file) throws IOException
|
public R<Map<String, Object>> avatar(@RequestPart("avatarfile") MultipartFile avatarfile) {
|
||||||
{
|
Map<String, Object> ajax = new HashMap<>();
|
||||||
if (!file.isEmpty())
|
if (!avatarfile.isEmpty()) {
|
||||||
{
|
String extension = FileUtil.extName(avatarfile.getOriginalFilename());
|
||||||
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
if (!StringUtils.equalsAnyIgnoreCase(extension, MimeTypeUtils.IMAGE_EXTENSION)) {
|
||||||
String avatar = FileUploadUtils.upload(RuoYiConfig.getAvatarPath(), file);
|
return R.fail("文件格式不正确,请上传" + Arrays.toString(MimeTypeUtils.IMAGE_EXTENSION) + "格式");
|
||||||
if (userService.updateUserAvatar(loginUser.getUsername(), avatar))
|
}
|
||||||
{
|
SysOssVo oss = iSysOssService.upload(avatarfile);
|
||||||
AjaxResult ajax = AjaxResult.success();
|
String avatar = oss.getUrl();
|
||||||
|
if (userService.updateUserAvatar(getUsername(), avatar)) {
|
||||||
ajax.put("imgUrl", avatar);
|
ajax.put("imgUrl", avatar);
|
||||||
// 更新缓存用户头像
|
return R.ok(ajax);
|
||||||
loginUser.getUser().setAvatar(avatar);
|
|
||||||
tokenService.setLoginUser(loginUser);
|
|
||||||
return ajax;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return AjaxResult.error("上传图片异常,请联系管理员");
|
return R.fail("上传图片异常,请联系管理员");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
package com.ruoyi.web.controller.system;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaIgnore;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.common.core.domain.model.RegisterBody;
|
||||||
|
import com.ruoyi.system.service.ISysConfigService;
|
||||||
|
import com.ruoyi.system.service.SysRegisterService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 注册验证
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
public class SysRegisterController extends BaseController {
|
||||||
|
|
||||||
|
private final SysRegisterService registerService;
|
||||||
|
private final ISysConfigService configService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户注册
|
||||||
|
*/
|
||||||
|
@SaIgnore
|
||||||
|
@PostMapping("/register")
|
||||||
|
public R<Void> register(@Validated @RequestBody RegisterBody user) {
|
||||||
|
if (!("true".equals(configService.selectConfigByKey("sys.account.registerUser")))) {
|
||||||
|
return R.fail("当前系统没有开启注册功能!");
|
||||||
|
}
|
||||||
|
registerService.register(user);
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,101 +1,94 @@
|
|||||||
package com.ruoyi.web.controller.system;
|
package com.ruoyi.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.constant.UserConstants;
|
import com.ruoyi.common.constant.UserConstants;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
import com.ruoyi.common.helper.LoginHelper;
|
||||||
import com.ruoyi.common.utils.ServletUtils;
|
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
import com.ruoyi.framework.web.service.SysPermissionService;
|
import com.ruoyi.system.domain.SysUserRole;
|
||||||
import com.ruoyi.framework.web.service.TokenService;
|
import com.ruoyi.system.service.ISysDeptService;
|
||||||
import com.ruoyi.system.service.ISysRoleService;
|
import com.ruoyi.system.service.ISysRoleService;
|
||||||
import com.ruoyi.system.service.ISysUserService;
|
import com.ruoyi.system.service.ISysUserService;
|
||||||
|
import com.ruoyi.system.service.SysPermissionService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 角色信息
|
* 角色信息
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author Lion Li
|
||||||
*/
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/system/role")
|
@RequestMapping("/system/role")
|
||||||
public class SysRoleController extends BaseController
|
public class SysRoleController extends BaseController {
|
||||||
{
|
|
||||||
@Autowired
|
|
||||||
private ISysRoleService roleService;
|
|
||||||
|
|
||||||
@Autowired
|
private final ISysRoleService roleService;
|
||||||
private TokenService tokenService;
|
private final ISysUserService userService;
|
||||||
|
private final ISysDeptService deptService;
|
||||||
|
private final SysPermissionService permissionService;
|
||||||
|
|
||||||
@Autowired
|
/**
|
||||||
private SysPermissionService permissionService;
|
* 获取角色信息列表
|
||||||
|
*/
|
||||||
@Autowired
|
@SaCheckPermission("system:role:list")
|
||||||
private ISysUserService userService;
|
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasPermi('system:role:list')")
|
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(SysRole role)
|
public TableDataInfo<SysRole> list(SysRole role, PageQuery pageQuery) {
|
||||||
{
|
return roleService.selectPageRoleList(role, pageQuery);
|
||||||
startPage();
|
|
||||||
List<SysRole> list = roleService.selectRoleList(role);
|
|
||||||
return getDataTable(list);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出角色信息列表
|
||||||
|
*/
|
||||||
@Log(title = "角色管理", businessType = BusinessType.EXPORT)
|
@Log(title = "角色管理", businessType = BusinessType.EXPORT)
|
||||||
@PreAuthorize("@ss.hasPermi('system:role:export')")
|
@SaCheckPermission("system:role:export")
|
||||||
@GetMapping("/export")
|
@PostMapping("/export")
|
||||||
public AjaxResult export(SysRole role)
|
public void export(SysRole role, HttpServletResponse response) {
|
||||||
{
|
|
||||||
List<SysRole> list = roleService.selectRoleList(role);
|
List<SysRole> list = roleService.selectRoleList(role);
|
||||||
ExcelUtil<SysRole> util = new ExcelUtil<SysRole>(SysRole.class);
|
ExcelUtil.exportExcel(list, "角色数据", SysRole.class, response);
|
||||||
return util.exportExcel(list, "角色数据");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据角色编号获取详细信息
|
* 根据角色编号获取详细信息
|
||||||
|
*
|
||||||
|
* @param roleId 角色ID
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:role:query')")
|
@SaCheckPermission("system:role:query")
|
||||||
@GetMapping(value = "/{roleId}")
|
@GetMapping(value = "/{roleId}")
|
||||||
public AjaxResult getInfo(@PathVariable Long roleId)
|
public R<SysRole> getInfo(@PathVariable Long roleId) {
|
||||||
{
|
roleService.checkRoleDataScope(roleId);
|
||||||
return AjaxResult.success(roleService.selectRoleById(roleId));
|
return R.ok(roleService.selectRoleById(roleId));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增角色
|
* 新增角色
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:role:add')")
|
@SaCheckPermission("system:role:add")
|
||||||
@Log(title = "角色管理", businessType = BusinessType.INSERT)
|
@Log(title = "角色管理", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@Validated @RequestBody SysRole role)
|
public R<Void> add(@Validated @RequestBody SysRole role) {
|
||||||
{
|
if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role))) {
|
||||||
if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role)))
|
return R.fail("新增角色'" + role.getRoleName() + "'失败,角色名称已存在");
|
||||||
{
|
} else if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleKeyUnique(role))) {
|
||||||
return AjaxResult.error("新增角色'" + role.getRoleName() + "'失败,角色名称已存在");
|
return R.fail("新增角色'" + role.getRoleName() + "'失败,角色权限已存在");
|
||||||
}
|
}
|
||||||
else if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleKeyUnique(role)))
|
|
||||||
{
|
|
||||||
return AjaxResult.error("新增角色'" + role.getRoleName() + "'失败,角色权限已存在");
|
|
||||||
}
|
|
||||||
role.setCreateBy(SecurityUtils.getUsername());
|
|
||||||
return toAjax(roleService.insertRole(role));
|
return toAjax(roleService.insertRole(role));
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -103,80 +96,142 @@ public class SysRoleController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 修改保存角色
|
* 修改保存角色
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:role:edit')")
|
@SaCheckPermission("system:role:edit")
|
||||||
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@Validated @RequestBody SysRole role)
|
public R<Void> edit(@Validated @RequestBody SysRole role) {
|
||||||
{
|
|
||||||
roleService.checkRoleAllowed(role);
|
roleService.checkRoleAllowed(role);
|
||||||
if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role)))
|
roleService.checkRoleDataScope(role.getRoleId());
|
||||||
{
|
if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role))) {
|
||||||
return AjaxResult.error("修改角色'" + role.getRoleName() + "'失败,角色名称已存在");
|
return R.fail("修改角色'" + role.getRoleName() + "'失败,角色名称已存在");
|
||||||
|
} else if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleKeyUnique(role))) {
|
||||||
|
return R.fail("修改角色'" + role.getRoleName() + "'失败,角色权限已存在");
|
||||||
}
|
}
|
||||||
else if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleKeyUnique(role)))
|
|
||||||
{
|
|
||||||
return AjaxResult.error("修改角色'" + role.getRoleName() + "'失败,角色权限已存在");
|
|
||||||
}
|
|
||||||
role.setUpdateBy(SecurityUtils.getUsername());
|
|
||||||
|
|
||||||
if (roleService.updateRole(role) > 0)
|
if (roleService.updateRole(role) > 0) {
|
||||||
{
|
|
||||||
// 更新缓存用户权限
|
// 更新缓存用户权限
|
||||||
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
LoginUser loginUser = getLoginUser();
|
||||||
if (StringUtils.isNotNull(loginUser.getUser()) && !loginUser.getUser().isAdmin())
|
SysUser sysUser = userService.selectUserById(loginUser.getUserId());
|
||||||
{
|
if (ObjectUtil.isNotNull(sysUser) && !sysUser.isAdmin()) {
|
||||||
loginUser.setPermissions(permissionService.getMenuPermission(loginUser.getUser()));
|
loginUser.setMenuPermission(permissionService.getMenuPermission(sysUser));
|
||||||
loginUser.setUser(userService.selectUserByUserName(loginUser.getUser().getUserName()));
|
LoginHelper.setLoginUser(loginUser);
|
||||||
tokenService.setLoginUser(loginUser);
|
|
||||||
}
|
}
|
||||||
return AjaxResult.success();
|
return R.ok();
|
||||||
}
|
}
|
||||||
return AjaxResult.error("修改角色'" + role.getRoleName() + "'失败,请联系管理员");
|
return R.fail("修改角色'" + role.getRoleName() + "'失败,请联系管理员");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改保存数据权限
|
* 修改保存数据权限
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:role:edit')")
|
@SaCheckPermission("system:role:edit")
|
||||||
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping("/dataScope")
|
@PutMapping("/dataScope")
|
||||||
public AjaxResult dataScope(@RequestBody SysRole role)
|
public R<Void> dataScope(@RequestBody SysRole role) {
|
||||||
{
|
|
||||||
roleService.checkRoleAllowed(role);
|
roleService.checkRoleAllowed(role);
|
||||||
|
roleService.checkRoleDataScope(role.getRoleId());
|
||||||
return toAjax(roleService.authDataScope(role));
|
return toAjax(roleService.authDataScope(role));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 状态修改
|
* 状态修改
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:role:edit')")
|
@SaCheckPermission("system:role:edit")
|
||||||
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping("/changeStatus")
|
@PutMapping("/changeStatus")
|
||||||
public AjaxResult changeStatus(@RequestBody SysRole role)
|
public R<Void> changeStatus(@RequestBody SysRole role) {
|
||||||
{
|
|
||||||
roleService.checkRoleAllowed(role);
|
roleService.checkRoleAllowed(role);
|
||||||
role.setUpdateBy(SecurityUtils.getUsername());
|
roleService.checkRoleDataScope(role.getRoleId());
|
||||||
return toAjax(roleService.updateRoleStatus(role));
|
return toAjax(roleService.updateRoleStatus(role));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除角色
|
* 删除角色
|
||||||
|
*
|
||||||
|
* @param roleIds 角色ID串
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:role:remove')")
|
@SaCheckPermission("system:role:remove")
|
||||||
@Log(title = "角色管理", businessType = BusinessType.DELETE)
|
@Log(title = "角色管理", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{roleIds}")
|
@DeleteMapping("/{roleIds}")
|
||||||
public AjaxResult remove(@PathVariable Long[] roleIds)
|
public R<Void> remove(@PathVariable Long[] roleIds) {
|
||||||
{
|
|
||||||
return toAjax(roleService.deleteRoleByIds(roleIds));
|
return toAjax(roleService.deleteRoleByIds(roleIds));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取角色选择框列表
|
* 获取角色选择框列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:role:query')")
|
@SaCheckPermission("system:role:query")
|
||||||
@GetMapping("/optionselect")
|
@GetMapping("/optionselect")
|
||||||
public AjaxResult optionselect()
|
public R<List<SysRole>> optionselect() {
|
||||||
{
|
return R.ok(roleService.selectRoleAll());
|
||||||
return AjaxResult.success(roleService.selectRoleAll());
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询已分配用户角色列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:role:list")
|
||||||
|
@GetMapping("/authUser/allocatedList")
|
||||||
|
public TableDataInfo<SysUser> allocatedList(SysUser user, PageQuery pageQuery) {
|
||||||
|
return userService.selectAllocatedList(user, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询未分配用户角色列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:role:list")
|
||||||
|
@GetMapping("/authUser/unallocatedList")
|
||||||
|
public TableDataInfo<SysUser> unallocatedList(SysUser user, PageQuery pageQuery) {
|
||||||
|
return userService.selectUnallocatedList(user, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取消授权用户
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:role:edit")
|
||||||
|
@Log(title = "角色管理", businessType = BusinessType.GRANT)
|
||||||
|
@PutMapping("/authUser/cancel")
|
||||||
|
public R<Void> cancelAuthUser(@RequestBody SysUserRole userRole) {
|
||||||
|
return toAjax(roleService.deleteAuthUser(userRole));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量取消授权用户
|
||||||
|
*
|
||||||
|
* @param roleId 角色ID
|
||||||
|
* @param userIds 用户ID串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:role:edit")
|
||||||
|
@Log(title = "角色管理", businessType = BusinessType.GRANT)
|
||||||
|
@PutMapping("/authUser/cancelAll")
|
||||||
|
public R<Void> cancelAuthUserAll(Long roleId, Long[] userIds) {
|
||||||
|
return toAjax(roleService.deleteAuthUsers(roleId, userIds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量选择用户授权
|
||||||
|
*
|
||||||
|
* @param roleId 角色ID
|
||||||
|
* @param userIds 用户ID串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:role:edit")
|
||||||
|
@Log(title = "角色管理", businessType = BusinessType.GRANT)
|
||||||
|
@PutMapping("/authUser/selectAll")
|
||||||
|
public R<Void> selectAuthUserAll(Long roleId, Long[] userIds) {
|
||||||
|
roleService.checkRoleDataScope(roleId);
|
||||||
|
return toAjax(roleService.insertAuthUsers(roleId, userIds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取对应角色部门树列表
|
||||||
|
*
|
||||||
|
* @param roleId 角色ID
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:role:list")
|
||||||
|
@GetMapping(value = "/deptTree/{roleId}")
|
||||||
|
public R<Map<String, Object>> roleDeptTreeselect(@PathVariable("roleId") Long roleId) {
|
||||||
|
Map<String, Object> ajax = new HashMap<>();
|
||||||
|
ajax.put("checkedKeys", deptService.selectDeptListByRoleId(roleId));
|
||||||
|
ajax.put("depts", deptService.selectDeptTreeList(new SysDept()));
|
||||||
|
return R.ok(ajax);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,205 +1,253 @@
|
|||||||
package com.ruoyi.web.controller.system;
|
package com.ruoyi.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import java.util.stream.Collectors;
|
import cn.dev33.satoken.secure.BCrypt;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import cn.hutool.core.lang.tree.Tree;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import cn.hutool.core.util.ArrayUtil;
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.constant.UserConstants;
|
import com.ruoyi.common.constant.UserConstants;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
import com.ruoyi.common.excel.ExcelResult;
|
||||||
import com.ruoyi.common.utils.ServletUtils;
|
import com.ruoyi.common.helper.LoginHelper;
|
||||||
|
import com.ruoyi.common.utils.StreamUtils;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
import com.ruoyi.framework.web.service.TokenService;
|
import com.ruoyi.system.domain.vo.SysUserExportVo;
|
||||||
|
import com.ruoyi.system.domain.vo.SysUserImportVo;
|
||||||
|
import com.ruoyi.system.listener.SysUserImportListener;
|
||||||
|
import com.ruoyi.system.service.ISysDeptService;
|
||||||
import com.ruoyi.system.service.ISysPostService;
|
import com.ruoyi.system.service.ISysPostService;
|
||||||
import com.ruoyi.system.service.ISysRoleService;
|
import com.ruoyi.system.service.ISysRoleService;
|
||||||
import com.ruoyi.system.service.ISysUserService;
|
import com.ruoyi.system.service.ISysUserService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户信息
|
* 用户信息
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author Lion Li
|
||||||
*/
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/system/user")
|
@RequestMapping("/system/user")
|
||||||
public class SysUserController extends BaseController
|
public class SysUserController extends BaseController {
|
||||||
{
|
|
||||||
@Autowired
|
|
||||||
private ISysUserService userService;
|
|
||||||
|
|
||||||
@Autowired
|
private final ISysUserService userService;
|
||||||
private ISysRoleService roleService;
|
private final ISysRoleService roleService;
|
||||||
|
private final ISysPostService postService;
|
||||||
@Autowired
|
private final ISysDeptService deptService;
|
||||||
private ISysPostService postService;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private TokenService tokenService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取用户列表
|
* 获取用户列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:user:list')")
|
@SaCheckPermission("system:user:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(SysUser user)
|
public TableDataInfo<SysUser> list(SysUser user, PageQuery pageQuery) {
|
||||||
{
|
return userService.selectPageUserList(user, pageQuery);
|
||||||
startPage();
|
|
||||||
List<SysUser> list = userService.selectUserList(user);
|
|
||||||
return getDataTable(list);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出用户列表
|
||||||
|
*/
|
||||||
@Log(title = "用户管理", businessType = BusinessType.EXPORT)
|
@Log(title = "用户管理", businessType = BusinessType.EXPORT)
|
||||||
@PreAuthorize("@ss.hasPermi('system:user:export')")
|
@SaCheckPermission("system:user:export")
|
||||||
@GetMapping("/export")
|
@PostMapping("/export")
|
||||||
public AjaxResult export(SysUser user)
|
public void export(SysUser user, HttpServletResponse response) {
|
||||||
{
|
|
||||||
List<SysUser> list = userService.selectUserList(user);
|
List<SysUser> list = userService.selectUserList(user);
|
||||||
ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
|
List<SysUserExportVo> listVo = BeanUtil.copyToList(list, SysUserExportVo.class);
|
||||||
return util.exportExcel(list, "用户数据");
|
for (int i = 0; i < list.size(); i++) {
|
||||||
|
SysDept dept = list.get(i).getDept();
|
||||||
|
SysUserExportVo vo = listVo.get(i);
|
||||||
|
if (ObjectUtil.isNotEmpty(dept)) {
|
||||||
|
vo.setDeptName(dept.getDeptName());
|
||||||
|
vo.setLeader(dept.getLeader());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ExcelUtil.exportExcel(listVo, "用户数据", SysUserExportVo.class, response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入数据
|
||||||
|
*
|
||||||
|
* @param file 导入文件
|
||||||
|
* @param updateSupport 是否更新已存在数据
|
||||||
|
*/
|
||||||
@Log(title = "用户管理", businessType = BusinessType.IMPORT)
|
@Log(title = "用户管理", businessType = BusinessType.IMPORT)
|
||||||
@PreAuthorize("@ss.hasPermi('system:user:import')")
|
@SaCheckPermission("system:user:import")
|
||||||
@PostMapping("/importData")
|
@PostMapping(value = "/importData", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||||
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
|
public R<Void> importData(@RequestPart("file") MultipartFile file, boolean updateSupport) throws Exception {
|
||||||
{
|
ExcelResult<SysUserImportVo> result = ExcelUtil.importExcel(file.getInputStream(), SysUserImportVo.class, new SysUserImportListener(updateSupport));
|
||||||
ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
|
return R.ok(result.getAnalysis());
|
||||||
List<SysUser> userList = util.importExcel(file.getInputStream());
|
|
||||||
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
||||||
String operName = loginUser.getUsername();
|
|
||||||
String message = userService.importUser(userList, updateSupport, operName);
|
|
||||||
return AjaxResult.success(message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/importTemplate")
|
/**
|
||||||
public AjaxResult importTemplate()
|
* 获取导入模板
|
||||||
{
|
*/
|
||||||
ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
|
@PostMapping("/importTemplate")
|
||||||
return util.importTemplateExcel("用户数据");
|
public void importTemplate(HttpServletResponse response) {
|
||||||
|
ExcelUtil.exportExcel(new ArrayList<>(), "用户数据", SysUserImportVo.class, response);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据用户编号获取详细信息
|
* 根据用户编号获取详细信息
|
||||||
|
*
|
||||||
|
* @param userId 用户ID
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:user:query')")
|
@SaCheckPermission("system:user:query")
|
||||||
@GetMapping(value = {"/", "/{userId}"})
|
@GetMapping(value = {"/", "/{userId}"})
|
||||||
public AjaxResult getInfo(@PathVariable(value = "userId", required = false) Long userId)
|
public R<Map<String, Object>> getInfo(@PathVariable(value = "userId", required = false) Long userId) {
|
||||||
{
|
userService.checkUserDataScope(userId);
|
||||||
AjaxResult ajax = AjaxResult.success();
|
Map<String, Object> ajax = new HashMap<>();
|
||||||
List<SysRole> roles = roleService.selectRoleAll();
|
List<SysRole> roles = roleService.selectRoleAll();
|
||||||
ajax.put("roles", SysUser.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList()));
|
ajax.put("roles", LoginHelper.isAdmin(userId) ? roles : StreamUtils.filter(roles, r -> !r.isAdmin()));
|
||||||
ajax.put("posts", postService.selectPostAll());
|
ajax.put("posts", postService.selectPostAll());
|
||||||
if (StringUtils.isNotNull(userId))
|
if (ObjectUtil.isNotNull(userId)) {
|
||||||
{
|
SysUser sysUser = userService.selectUserById(userId);
|
||||||
ajax.put(AjaxResult.DATA_TAG, userService.selectUserById(userId));
|
ajax.put("user", sysUser);
|
||||||
ajax.put("postIds", postService.selectPostListByUserId(userId));
|
ajax.put("postIds", postService.selectPostListByUserId(userId));
|
||||||
ajax.put("roleIds", roleService.selectRoleListByUserId(userId));
|
ajax.put("roleIds", StreamUtils.toList(sysUser.getRoles(), SysRole::getRoleId));
|
||||||
}
|
}
|
||||||
return ajax;
|
return R.ok(ajax);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增用户
|
* 新增用户
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:user:add')")
|
@SaCheckPermission("system:user:add")
|
||||||
@Log(title = "用户管理", businessType = BusinessType.INSERT)
|
@Log(title = "用户管理", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@Validated @RequestBody SysUser user)
|
public R<Void> add(@Validated @RequestBody SysUser user) {
|
||||||
{
|
if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(user))) {
|
||||||
if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(user.getUserName())))
|
return R.fail("新增用户'" + user.getUserName() + "'失败,登录账号已存在");
|
||||||
{
|
} else if (StringUtils.isNotEmpty(user.getPhonenumber())
|
||||||
return AjaxResult.error("新增用户'" + user.getUserName() + "'失败,登录账号已存在");
|
&& UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user))) {
|
||||||
|
return R.fail("新增用户'" + user.getUserName() + "'失败,手机号码已存在");
|
||||||
|
} else if (StringUtils.isNotEmpty(user.getEmail())
|
||||||
|
&& UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user))) {
|
||||||
|
return R.fail("新增用户'" + user.getUserName() + "'失败,邮箱账号已存在");
|
||||||
}
|
}
|
||||||
else if (StringUtils.isNotEmpty(user.getPhonenumber())
|
user.setPassword(BCrypt.hashpw(user.getPassword()));
|
||||||
&& UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
|
|
||||||
{
|
|
||||||
return AjaxResult.error("新增用户'" + user.getUserName() + "'失败,手机号码已存在");
|
|
||||||
}
|
|
||||||
else if (StringUtils.isNotEmpty(user.getEmail())
|
|
||||||
&& UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
|
|
||||||
{
|
|
||||||
return AjaxResult.error("新增用户'" + user.getUserName() + "'失败,邮箱账号已存在");
|
|
||||||
}
|
|
||||||
user.setCreateBy(SecurityUtils.getUsername());
|
|
||||||
user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
|
|
||||||
return toAjax(userService.insertUser(user));
|
return toAjax(userService.insertUser(user));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改用户
|
* 修改用户
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:user:edit')")
|
@SaCheckPermission("system:user:edit")
|
||||||
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
|
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@Validated @RequestBody SysUser user)
|
public R<Void> edit(@Validated @RequestBody SysUser user) {
|
||||||
{
|
|
||||||
userService.checkUserAllowed(user);
|
userService.checkUserAllowed(user);
|
||||||
if (StringUtils.isNotEmpty(user.getPhonenumber())
|
userService.checkUserDataScope(user.getUserId());
|
||||||
&& UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
|
if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(user))) {
|
||||||
{
|
return R.fail("修改用户'" + user.getUserName() + "'失败,登录账号已存在");
|
||||||
return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,手机号码已存在");
|
} else if (StringUtils.isNotEmpty(user.getPhonenumber())
|
||||||
|
&& UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user))) {
|
||||||
|
return R.fail("修改用户'" + user.getUserName() + "'失败,手机号码已存在");
|
||||||
|
} else if (StringUtils.isNotEmpty(user.getEmail())
|
||||||
|
&& UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user))) {
|
||||||
|
return R.fail("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在");
|
||||||
}
|
}
|
||||||
else if (StringUtils.isNotEmpty(user.getEmail())
|
|
||||||
&& UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
|
|
||||||
{
|
|
||||||
return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在");
|
|
||||||
}
|
|
||||||
user.setUpdateBy(SecurityUtils.getUsername());
|
|
||||||
return toAjax(userService.updateUser(user));
|
return toAjax(userService.updateUser(user));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除用户
|
* 删除用户
|
||||||
|
*
|
||||||
|
* @param userIds 角色ID串
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:user:remove')")
|
@SaCheckPermission("system:user:remove")
|
||||||
@Log(title = "用户管理", businessType = BusinessType.DELETE)
|
@Log(title = "用户管理", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{userIds}")
|
@DeleteMapping("/{userIds}")
|
||||||
public AjaxResult remove(@PathVariable Long[] userIds)
|
public R<Void> remove(@PathVariable Long[] userIds) {
|
||||||
{
|
if (ArrayUtil.contains(userIds, getUserId())) {
|
||||||
|
return R.fail("当前用户不能删除");
|
||||||
|
}
|
||||||
return toAjax(userService.deleteUserByIds(userIds));
|
return toAjax(userService.deleteUserByIds(userIds));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 重置密码
|
* 重置密码
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:user:resetPwd')")
|
@SaCheckPermission("system:user:resetPwd")
|
||||||
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
|
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping("/resetPwd")
|
@PutMapping("/resetPwd")
|
||||||
public AjaxResult resetPwd(@RequestBody SysUser user)
|
public R<Void> resetPwd(@RequestBody SysUser user) {
|
||||||
{
|
|
||||||
userService.checkUserAllowed(user);
|
userService.checkUserAllowed(user);
|
||||||
user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
|
userService.checkUserDataScope(user.getUserId());
|
||||||
user.setUpdateBy(SecurityUtils.getUsername());
|
user.setPassword(BCrypt.hashpw(user.getPassword()));
|
||||||
return toAjax(userService.resetPwd(user));
|
return toAjax(userService.resetPwd(user));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 状态修改
|
* 状态修改
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:user:edit')")
|
@SaCheckPermission("system:user:edit")
|
||||||
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
|
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping("/changeStatus")
|
@PutMapping("/changeStatus")
|
||||||
public AjaxResult changeStatus(@RequestBody SysUser user)
|
public R<Void> changeStatus(@RequestBody SysUser user) {
|
||||||
{
|
|
||||||
userService.checkUserAllowed(user);
|
userService.checkUserAllowed(user);
|
||||||
user.setUpdateBy(SecurityUtils.getUsername());
|
userService.checkUserDataScope(user.getUserId());
|
||||||
return toAjax(userService.updateUserStatus(user));
|
return toAjax(userService.updateUserStatus(user));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户编号获取授权角色
|
||||||
|
*
|
||||||
|
* @param userId 用户ID
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:user:query")
|
||||||
|
@GetMapping("/authRole/{userId}")
|
||||||
|
public R<Map<String, Object>> authRole(@PathVariable Long userId) {
|
||||||
|
SysUser user = userService.selectUserById(userId);
|
||||||
|
List<SysRole> roles = roleService.selectRolesByUserId(userId);
|
||||||
|
Map<String, Object> ajax = new HashMap<>();
|
||||||
|
ajax.put("user", user);
|
||||||
|
ajax.put("roles", LoginHelper.isAdmin(userId) ? roles : StreamUtils.filter(roles, r -> !r.isAdmin()));
|
||||||
|
return R.ok(ajax);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户授权角色
|
||||||
|
*
|
||||||
|
* @param userId 用户Id
|
||||||
|
* @param roleIds 角色ID串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:user:edit")
|
||||||
|
@Log(title = "用户管理", businessType = BusinessType.GRANT)
|
||||||
|
@PutMapping("/authRole")
|
||||||
|
public R<Void> insertAuthRole(Long userId, Long[] roleIds) {
|
||||||
|
userService.checkUserDataScope(userId);
|
||||||
|
userService.insertUserAuth(userId, roleIds);
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取部门树列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:user:list")
|
||||||
|
@GetMapping("/deptTree")
|
||||||
|
public R<List<Tree<Long>>> deptTree(SysDept dept) {
|
||||||
|
return R.ok(deptService.selectDeptTreeList(dept));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
package com.ruoyi.web.controller.tool;
|
|
||||||
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* swagger 接口
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
@RequestMapping("/tool/swagger")
|
|
||||||
public class SwaggerController extends BaseController
|
|
||||||
{
|
|
||||||
@PreAuthorize("@ss.hasPermi('tool:swagger:view')")
|
|
||||||
@GetMapping()
|
|
||||||
public String index()
|
|
||||||
{
|
|
||||||
return redirect("/swagger-ui.html");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,175 +0,0 @@
|
|||||||
package com.ruoyi.web.controller.tool;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.LinkedHashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* swagger 用户测试方法
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
*/
|
|
||||||
@Api("用户信息管理")
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/test/user")
|
|
||||||
public class TestController extends BaseController
|
|
||||||
{
|
|
||||||
private final static Map<Integer, UserEntity> users = new LinkedHashMap<Integer, UserEntity>();
|
|
||||||
{
|
|
||||||
users.put(1, new UserEntity(1, "admin", "admin123", "15888888888"));
|
|
||||||
users.put(2, new UserEntity(2, "ry", "admin123", "15666666666"));
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation("获取用户列表")
|
|
||||||
@GetMapping("/list")
|
|
||||||
public AjaxResult userList()
|
|
||||||
{
|
|
||||||
List<UserEntity> userList = new ArrayList<UserEntity>(users.values());
|
|
||||||
return AjaxResult.success(userList);
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation("获取用户详细")
|
|
||||||
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path")
|
|
||||||
@GetMapping("/{userId}")
|
|
||||||
public AjaxResult getUser(@PathVariable Integer userId)
|
|
||||||
{
|
|
||||||
if (!users.isEmpty() && users.containsKey(userId))
|
|
||||||
{
|
|
||||||
return AjaxResult.success(users.get(userId));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return AjaxResult.error("用户不存在");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation("新增用户")
|
|
||||||
@ApiImplicitParam(name = "userEntity", value = "新增用户信息", dataType = "UserEntity")
|
|
||||||
@PostMapping("/save")
|
|
||||||
public AjaxResult save(UserEntity user)
|
|
||||||
{
|
|
||||||
if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId()))
|
|
||||||
{
|
|
||||||
return AjaxResult.error("用户ID不能为空");
|
|
||||||
}
|
|
||||||
return AjaxResult.success(users.put(user.getUserId(), user));
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation("更新用户")
|
|
||||||
@ApiImplicitParam(name = "userEntity", value = "新增用户信息", dataType = "UserEntity")
|
|
||||||
@PutMapping("/update")
|
|
||||||
public AjaxResult update(UserEntity user)
|
|
||||||
{
|
|
||||||
if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId()))
|
|
||||||
{
|
|
||||||
return AjaxResult.error("用户ID不能为空");
|
|
||||||
}
|
|
||||||
if (users.isEmpty() || !users.containsKey(user.getUserId()))
|
|
||||||
{
|
|
||||||
return AjaxResult.error("用户不存在");
|
|
||||||
}
|
|
||||||
users.remove(user.getUserId());
|
|
||||||
return AjaxResult.success(users.put(user.getUserId(), user));
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation("删除用户信息")
|
|
||||||
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path")
|
|
||||||
@DeleteMapping("/{userId}")
|
|
||||||
public AjaxResult delete(@PathVariable Integer userId)
|
|
||||||
{
|
|
||||||
if (!users.isEmpty() && users.containsKey(userId))
|
|
||||||
{
|
|
||||||
users.remove(userId);
|
|
||||||
return AjaxResult.success();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return AjaxResult.error("用户不存在");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiModel("用户实体")
|
|
||||||
class UserEntity
|
|
||||||
{
|
|
||||||
@ApiModelProperty("用户ID")
|
|
||||||
private Integer userId;
|
|
||||||
|
|
||||||
@ApiModelProperty("用户名称")
|
|
||||||
private String username;
|
|
||||||
|
|
||||||
@ApiModelProperty("用户密码")
|
|
||||||
private String password;
|
|
||||||
|
|
||||||
@ApiModelProperty("用户手机")
|
|
||||||
private String mobile;
|
|
||||||
|
|
||||||
public UserEntity()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public UserEntity(Integer userId, String username, String password, String mobile)
|
|
||||||
{
|
|
||||||
this.userId = userId;
|
|
||||||
this.username = username;
|
|
||||||
this.password = password;
|
|
||||||
this.mobile = mobile;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getUserId()
|
|
||||||
{
|
|
||||||
return userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUserId(Integer userId)
|
|
||||||
{
|
|
||||||
this.userId = userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUsername()
|
|
||||||
{
|
|
||||||
return username;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUsername(String username)
|
|
||||||
{
|
|
||||||
this.username = username;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPassword()
|
|
||||||
{
|
|
||||||
return password;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPassword(String password)
|
|
||||||
{
|
|
||||||
this.password = password;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMobile()
|
|
||||||
{
|
|
||||||
return mobile;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMobile(String mobile)
|
|
||||||
{
|
|
||||||
this.mobile = mobile;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,125 +0,0 @@
|
|||||||
package com.ruoyi.web.core.config;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.context.annotation.Bean;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
import com.ruoyi.common.config.RuoYiConfig;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import springfox.documentation.builders.ApiInfoBuilder;
|
|
||||||
import springfox.documentation.builders.PathSelectors;
|
|
||||||
import springfox.documentation.builders.RequestHandlerSelectors;
|
|
||||||
import springfox.documentation.service.ApiInfo;
|
|
||||||
import springfox.documentation.service.ApiKey;
|
|
||||||
import springfox.documentation.service.AuthorizationScope;
|
|
||||||
import springfox.documentation.service.Contact;
|
|
||||||
import springfox.documentation.service.SecurityReference;
|
|
||||||
import springfox.documentation.spi.DocumentationType;
|
|
||||||
import springfox.documentation.spi.service.contexts.SecurityContext;
|
|
||||||
import springfox.documentation.spring.web.plugins.Docket;
|
|
||||||
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Swagger2的接口配置
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
*/
|
|
||||||
@Configuration
|
|
||||||
@EnableSwagger2
|
|
||||||
public class SwaggerConfig
|
|
||||||
{
|
|
||||||
/** 系统基础配置 */
|
|
||||||
@Autowired
|
|
||||||
private RuoYiConfig ruoyiConfig;
|
|
||||||
|
|
||||||
/** 是否开启swagger */
|
|
||||||
@Value("${swagger.enabled}")
|
|
||||||
private boolean enabled;
|
|
||||||
|
|
||||||
/** 设置请求的统一前缀 */
|
|
||||||
@Value("${swagger.pathMapping}")
|
|
||||||
private String pathMapping;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建API
|
|
||||||
*/
|
|
||||||
@Bean
|
|
||||||
public Docket createRestApi()
|
|
||||||
{
|
|
||||||
return new Docket(DocumentationType.SWAGGER_2)
|
|
||||||
// 是否启用Swagger
|
|
||||||
.enable(enabled)
|
|
||||||
// 用来创建该API的基本信息,展示在文档的页面中(自定义展示的信息)
|
|
||||||
.apiInfo(apiInfo())
|
|
||||||
// 设置哪些接口暴露给Swagger展示
|
|
||||||
.select()
|
|
||||||
// 扫描所有有注解的api,用这种方式更灵活
|
|
||||||
.apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
|
|
||||||
// 扫描指定包中的swagger注解
|
|
||||||
// .apis(RequestHandlerSelectors.basePackage("com.ruoyi.project.tool.swagger"))
|
|
||||||
// 扫描所有 .apis(RequestHandlerSelectors.any())
|
|
||||||
.paths(PathSelectors.any())
|
|
||||||
.build()
|
|
||||||
/* 设置安全模式,swagger可以设置访问token */
|
|
||||||
.securitySchemes(securitySchemes())
|
|
||||||
.securityContexts(securityContexts())
|
|
||||||
.pathMapping(pathMapping);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 安全模式,这里指定token通过Authorization头请求头传递
|
|
||||||
*/
|
|
||||||
private List<ApiKey> securitySchemes()
|
|
||||||
{
|
|
||||||
List<ApiKey> apiKeyList = new ArrayList<ApiKey>();
|
|
||||||
apiKeyList.add(new ApiKey("Authorization", "Authorization", "header"));
|
|
||||||
return apiKeyList;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 安全上下文
|
|
||||||
*/
|
|
||||||
private List<SecurityContext> securityContexts()
|
|
||||||
{
|
|
||||||
List<SecurityContext> securityContexts = new ArrayList<>();
|
|
||||||
securityContexts.add(
|
|
||||||
SecurityContext.builder()
|
|
||||||
.securityReferences(defaultAuth())
|
|
||||||
.forPaths(PathSelectors.regex("^(?!auth).*$"))
|
|
||||||
.build());
|
|
||||||
return securityContexts;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 默认的安全上引用
|
|
||||||
*/
|
|
||||||
private List<SecurityReference> defaultAuth()
|
|
||||||
{
|
|
||||||
AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
|
|
||||||
AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
|
|
||||||
authorizationScopes[0] = authorizationScope;
|
|
||||||
List<SecurityReference> securityReferences = new ArrayList<>();
|
|
||||||
securityReferences.add(new SecurityReference("Authorization", authorizationScopes));
|
|
||||||
return securityReferences;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加摘要信息
|
|
||||||
*/
|
|
||||||
private ApiInfo apiInfo()
|
|
||||||
{
|
|
||||||
// 用ApiInfoBuilder进行定制
|
|
||||||
return new ApiInfoBuilder()
|
|
||||||
// 设置标题
|
|
||||||
.title("标题:若依管理系统_接口文档")
|
|
||||||
// 描述
|
|
||||||
.description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...")
|
|
||||||
// 作者信息
|
|
||||||
.contact(new Contact(ruoyiConfig.getName(), null, null))
|
|
||||||
// 版本
|
|
||||||
.version("版本号:" + ruoyiConfig.getVersion())
|
|
||||||
.build();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
restart.include.json=/com.alibaba.fastjson.*.jar
|
|
||||||
169
ruoyi-admin/src/main/resources/application-dev.yml
Normal file
169
ruoyi-admin/src/main/resources/application-dev.yml
Normal file
@@ -0,0 +1,169 @@
|
|||||||
|
--- # 监控中心配置
|
||||||
|
spring.boot.admin.client:
|
||||||
|
# 增加客户端开关
|
||||||
|
enabled: true
|
||||||
|
url: http://localhost:9090/admin
|
||||||
|
instance:
|
||||||
|
service-host-type: IP
|
||||||
|
username: ruoyi
|
||||||
|
password: 123456
|
||||||
|
|
||||||
|
--- # xxl-job 配置
|
||||||
|
xxl.job:
|
||||||
|
# 执行器开关
|
||||||
|
enabled: true
|
||||||
|
# 调度中心地址:如调度中心集群部署存在多个地址则用逗号分隔。
|
||||||
|
admin-addresses: http://localhost:9100/xxl-job-admin
|
||||||
|
# 执行器通讯TOKEN:非空时启用
|
||||||
|
access-token: xxl-job
|
||||||
|
executor:
|
||||||
|
# 执行器AppName:执行器心跳注册分组依据;为空则关闭自动注册
|
||||||
|
appname: xxl-job-executor
|
||||||
|
# 执行器端口号 执行器从9101开始往后写
|
||||||
|
port: 9101
|
||||||
|
# 执行器注册:默认IP:PORT
|
||||||
|
address:
|
||||||
|
# 执行器IP:默认自动获取IP
|
||||||
|
ip:
|
||||||
|
# 执行器运行日志文件存储磁盘路径
|
||||||
|
logpath: ./logs/xxl-job
|
||||||
|
# 执行器日志文件保存天数:大于3生效
|
||||||
|
logretentiondays: 30
|
||||||
|
|
||||||
|
--- # 数据源配置
|
||||||
|
spring:
|
||||||
|
datasource:
|
||||||
|
type: com.zaxxer.hikari.HikariDataSource
|
||||||
|
# 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content
|
||||||
|
dynamic:
|
||||||
|
# 性能分析插件(有性能损耗 不建议生产环境使用)
|
||||||
|
p6spy: true
|
||||||
|
# 设置默认的数据源或者数据源组,默认值即为 master
|
||||||
|
primary: master
|
||||||
|
# 严格模式 匹配不到数据源则报错
|
||||||
|
strict: true
|
||||||
|
datasource:
|
||||||
|
# 主库数据源
|
||||||
|
master:
|
||||||
|
type: ${spring.datasource.type}
|
||||||
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
|
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
|
||||||
|
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
|
||||||
|
url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
|
||||||
|
username: root
|
||||||
|
password: root
|
||||||
|
# 从库数据源
|
||||||
|
slave:
|
||||||
|
lazy: true
|
||||||
|
type: ${spring.datasource.type}
|
||||||
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
|
url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
|
||||||
|
username:
|
||||||
|
password:
|
||||||
|
# oracle:
|
||||||
|
# type: ${spring.datasource.type}
|
||||||
|
# driverClassName: oracle.jdbc.OracleDriver
|
||||||
|
# url: jdbc:oracle:thin:@//localhost:1521/XE
|
||||||
|
# username: ROOT
|
||||||
|
# password: root
|
||||||
|
# hikari:
|
||||||
|
# connectionTestQuery: SELECT 1 FROM DUAL
|
||||||
|
# postgres:
|
||||||
|
# type: ${spring.datasource.type}
|
||||||
|
# driverClassName: org.postgresql.Driver
|
||||||
|
# url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
|
||||||
|
# username: root
|
||||||
|
# password: root
|
||||||
|
# sqlserver:
|
||||||
|
# type: ${spring.datasource.type}
|
||||||
|
# driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||||
|
# url: jdbc:sqlserver://localhost:1433;DatabaseName=tempdb;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true
|
||||||
|
# username: SA
|
||||||
|
# password: root
|
||||||
|
hikari:
|
||||||
|
# 最大连接池数量
|
||||||
|
maxPoolSize: 20
|
||||||
|
# 最小空闲线程数量
|
||||||
|
minIdle: 10
|
||||||
|
# 配置获取连接等待超时的时间
|
||||||
|
connectionTimeout: 10000
|
||||||
|
# 校验超时时间
|
||||||
|
validationTimeout: 5000
|
||||||
|
# 空闲连接存活最大时间,默认10分钟
|
||||||
|
idleTimeout: 60000
|
||||||
|
# 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认30分钟
|
||||||
|
maxLifetime: 900000
|
||||||
|
# 连接测试query(配置检测连接是否有效)
|
||||||
|
connectionTestQuery: SELECT 1
|
||||||
|
|
||||||
|
--- # redis 单机配置(单机与集群只能开启一个另一个需要注释掉)
|
||||||
|
spring:
|
||||||
|
redis:
|
||||||
|
# 地址
|
||||||
|
host: localhost
|
||||||
|
# 端口,默认为6379
|
||||||
|
port: 6379
|
||||||
|
# 数据库索引
|
||||||
|
database: 0
|
||||||
|
# 密码(如没有密码请注释掉)
|
||||||
|
# password:
|
||||||
|
# 连接超时时间
|
||||||
|
timeout: 10s
|
||||||
|
# 是否开启ssl
|
||||||
|
ssl: false
|
||||||
|
|
||||||
|
redisson:
|
||||||
|
# redis key前缀
|
||||||
|
keyPrefix:
|
||||||
|
# 线程池数量
|
||||||
|
threads: 4
|
||||||
|
# Netty线程池数量
|
||||||
|
nettyThreads: 8
|
||||||
|
# 单节点配置
|
||||||
|
singleServerConfig:
|
||||||
|
# 客户端名称
|
||||||
|
clientName: ${ruoyi.name}
|
||||||
|
# 最小空闲连接数
|
||||||
|
connectionMinimumIdleSize: 8
|
||||||
|
# 连接池大小
|
||||||
|
connectionPoolSize: 32
|
||||||
|
# 连接空闲超时,单位:毫秒
|
||||||
|
idleConnectionTimeout: 10000
|
||||||
|
# 命令等待超时,单位:毫秒
|
||||||
|
timeout: 3000
|
||||||
|
# 发布和订阅连接池大小
|
||||||
|
subscriptionConnectionPoolSize: 50
|
||||||
|
|
||||||
|
--- # mail 邮件发送
|
||||||
|
mail:
|
||||||
|
enabled: false
|
||||||
|
host: smtp.163.com
|
||||||
|
port: 465
|
||||||
|
# 是否需要用户名密码验证
|
||||||
|
auth: true
|
||||||
|
# 发送方,遵循RFC-822标准
|
||||||
|
from: xxx@163.com
|
||||||
|
# 用户名(注意:如果使用foxmail邮箱,此处user为qq号)
|
||||||
|
user: xxx@163.com
|
||||||
|
# 密码(注意,某些邮箱需要为SMTP服务单独设置密码,详情查看相关帮助)
|
||||||
|
pass: xxxxxxxxxx
|
||||||
|
# 使用 STARTTLS安全连接,STARTTLS是对纯文本通信协议的扩展。
|
||||||
|
starttlsEnable: true
|
||||||
|
# 使用SSL安全连接
|
||||||
|
sslEnable: true
|
||||||
|
# SMTP超时时长,单位毫秒,缺省值不超时
|
||||||
|
timeout: 0
|
||||||
|
# Socket连接超时值,单位毫秒,缺省值不超时
|
||||||
|
connectionTimeout: 0
|
||||||
|
|
||||||
|
--- # sms 短信
|
||||||
|
sms:
|
||||||
|
enabled: false
|
||||||
|
# 阿里云 dysmsapi.aliyuncs.com
|
||||||
|
# 腾讯云 sms.tencentcloudapi.com
|
||||||
|
endpoint: "dysmsapi.aliyuncs.com"
|
||||||
|
accessKeyId: xxxxxxx
|
||||||
|
accessKeySecret: xxxxxx
|
||||||
|
signName: 测试
|
||||||
|
# 腾讯专用
|
||||||
|
sdkAppId:
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
# 数据源配置
|
|
||||||
spring:
|
|
||||||
datasource:
|
|
||||||
type: com.alibaba.druid.pool.DruidDataSource
|
|
||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
|
||||||
druid:
|
|
||||||
# 主库数据源
|
|
||||||
master:
|
|
||||||
url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
|
||||||
username: root
|
|
||||||
password: password
|
|
||||||
# 从库数据源
|
|
||||||
slave:
|
|
||||||
# 从数据源开关/默认关闭
|
|
||||||
enabled: false
|
|
||||||
url:
|
|
||||||
username:
|
|
||||||
password:
|
|
||||||
# 初始连接数
|
|
||||||
initialSize: 5
|
|
||||||
# 最小连接池数量
|
|
||||||
minIdle: 10
|
|
||||||
# 最大连接池数量
|
|
||||||
maxActive: 20
|
|
||||||
# 配置获取连接等待超时的时间
|
|
||||||
maxWait: 60000
|
|
||||||
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
|
|
||||||
timeBetweenEvictionRunsMillis: 60000
|
|
||||||
# 配置一个连接在池中最小生存的时间,单位是毫秒
|
|
||||||
minEvictableIdleTimeMillis: 300000
|
|
||||||
# 配置一个连接在池中最大生存的时间,单位是毫秒
|
|
||||||
maxEvictableIdleTimeMillis: 900000
|
|
||||||
# 配置检测连接是否有效
|
|
||||||
validationQuery: SELECT 1 FROM DUAL
|
|
||||||
testWhileIdle: true
|
|
||||||
testOnBorrow: false
|
|
||||||
testOnReturn: false
|
|
||||||
webStatFilter:
|
|
||||||
enabled: true
|
|
||||||
statViewServlet:
|
|
||||||
enabled: true
|
|
||||||
# 设置白名单,不填则允许所有访问
|
|
||||||
allow:
|
|
||||||
url-pattern: /druid/*
|
|
||||||
# 控制台管理用户名和密码
|
|
||||||
login-username: ruoyi
|
|
||||||
login-password: 123456
|
|
||||||
filter:
|
|
||||||
stat:
|
|
||||||
enabled: true
|
|
||||||
# 慢SQL记录
|
|
||||||
log-slow-sql: true
|
|
||||||
slow-sql-millis: 1000
|
|
||||||
merge-sql: true
|
|
||||||
wall:
|
|
||||||
config:
|
|
||||||
multi-statement-allow: true
|
|
||||||
172
ruoyi-admin/src/main/resources/application-prod.yml
Normal file
172
ruoyi-admin/src/main/resources/application-prod.yml
Normal file
@@ -0,0 +1,172 @@
|
|||||||
|
--- # 临时文件存储位置 避免临时文件被系统清理报错
|
||||||
|
spring.servlet.multipart.location: /ruoyi/server/temp
|
||||||
|
|
||||||
|
--- # 监控中心配置
|
||||||
|
spring.boot.admin.client:
|
||||||
|
# 增加客户端开关
|
||||||
|
enabled: true
|
||||||
|
url: http://localhost:9090/admin
|
||||||
|
instance:
|
||||||
|
service-host-type: IP
|
||||||
|
username: ruoyi
|
||||||
|
password: 123456
|
||||||
|
|
||||||
|
--- # xxl-job 配置
|
||||||
|
xxl.job:
|
||||||
|
# 执行器开关
|
||||||
|
enabled: true
|
||||||
|
# 调度中心地址:如调度中心集群部署存在多个地址则用逗号分隔。
|
||||||
|
admin-addresses: http://localhost:9100/xxl-job-admin
|
||||||
|
# 执行器通讯TOKEN:非空时启用
|
||||||
|
access-token: xxl-job
|
||||||
|
executor:
|
||||||
|
# 执行器AppName:执行器心跳注册分组依据;为空则关闭自动注册
|
||||||
|
appname: xxl-job-executor
|
||||||
|
# 执行器端口号 执行器从9101开始往后写
|
||||||
|
port: 9101
|
||||||
|
# 执行器注册:默认IP:PORT
|
||||||
|
address:
|
||||||
|
# 执行器IP:默认自动获取IP
|
||||||
|
ip:
|
||||||
|
# 执行器运行日志文件存储磁盘路径
|
||||||
|
logpath: ./logs/xxl-job
|
||||||
|
# 执行器日志文件保存天数:大于3生效
|
||||||
|
logretentiondays: 30
|
||||||
|
|
||||||
|
--- # 数据源配置
|
||||||
|
spring:
|
||||||
|
datasource:
|
||||||
|
type: com.zaxxer.hikari.HikariDataSource
|
||||||
|
# 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content
|
||||||
|
dynamic:
|
||||||
|
# 性能分析插件(有性能损耗 不建议生产环境使用)
|
||||||
|
p6spy: false
|
||||||
|
# 设置默认的数据源或者数据源组,默认值即为 master
|
||||||
|
primary: master
|
||||||
|
# 严格模式 匹配不到数据源则报错
|
||||||
|
strict: true
|
||||||
|
datasource:
|
||||||
|
# 主库数据源
|
||||||
|
master:
|
||||||
|
type: ${spring.datasource.type}
|
||||||
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
|
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
|
||||||
|
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
|
||||||
|
url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
|
||||||
|
username: root
|
||||||
|
password: root
|
||||||
|
# 从库数据源
|
||||||
|
slave:
|
||||||
|
lazy: true
|
||||||
|
type: ${spring.datasource.type}
|
||||||
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
|
url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
|
||||||
|
username:
|
||||||
|
password:
|
||||||
|
# oracle:
|
||||||
|
# type: ${spring.datasource.type}
|
||||||
|
# driverClassName: oracle.jdbc.OracleDriver
|
||||||
|
# url: jdbc:oracle:thin:@//localhost:1521/XE
|
||||||
|
# username: ROOT
|
||||||
|
# password: root
|
||||||
|
# hikari:
|
||||||
|
# connectionTestQuery: SELECT 1 FROM DUAL
|
||||||
|
# postgres:
|
||||||
|
# type: ${spring.datasource.type}
|
||||||
|
# driverClassName: org.postgresql.Driver
|
||||||
|
# url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
|
||||||
|
# username: root
|
||||||
|
# password: root
|
||||||
|
# sqlserver:
|
||||||
|
# type: ${spring.datasource.type}
|
||||||
|
# driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||||
|
# url: jdbc:sqlserver://localhost:1433;DatabaseName=tempdb;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true
|
||||||
|
# username: SA
|
||||||
|
# password: root
|
||||||
|
hikari:
|
||||||
|
# 最大连接池数量
|
||||||
|
maxPoolSize: 20
|
||||||
|
# 最小空闲线程数量
|
||||||
|
minIdle: 10
|
||||||
|
# 配置获取连接等待超时的时间
|
||||||
|
connectionTimeout: 10000
|
||||||
|
# 校验超时时间
|
||||||
|
validationTimeout: 5000
|
||||||
|
# 空闲连接存活最大时间,默认10分钟
|
||||||
|
idleTimeout: 60000
|
||||||
|
# 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认30分钟
|
||||||
|
maxLifetime: 900000
|
||||||
|
# 连接测试query(配置检测连接是否有效)
|
||||||
|
connectionTestQuery: SELECT 1
|
||||||
|
|
||||||
|
--- # redis 单机配置(单机与集群只能开启一个另一个需要注释掉)
|
||||||
|
spring:
|
||||||
|
redis:
|
||||||
|
# 地址
|
||||||
|
host: localhost
|
||||||
|
# 端口,默认为6379
|
||||||
|
port: 6379
|
||||||
|
# 数据库索引
|
||||||
|
database: 0
|
||||||
|
# 密码(如没有密码请注释掉)
|
||||||
|
# password:
|
||||||
|
# 连接超时时间
|
||||||
|
timeout: 10s
|
||||||
|
# 是否开启ssl
|
||||||
|
ssl: false
|
||||||
|
|
||||||
|
redisson:
|
||||||
|
# redis key前缀
|
||||||
|
keyPrefix:
|
||||||
|
# 线程池数量
|
||||||
|
threads: 16
|
||||||
|
# Netty线程池数量
|
||||||
|
nettyThreads: 32
|
||||||
|
# 单节点配置
|
||||||
|
singleServerConfig:
|
||||||
|
# 客户端名称
|
||||||
|
clientName: ${ruoyi.name}
|
||||||
|
# 最小空闲连接数
|
||||||
|
connectionMinimumIdleSize: 32
|
||||||
|
# 连接池大小
|
||||||
|
connectionPoolSize: 64
|
||||||
|
# 连接空闲超时,单位:毫秒
|
||||||
|
idleConnectionTimeout: 10000
|
||||||
|
# 命令等待超时,单位:毫秒
|
||||||
|
timeout: 3000
|
||||||
|
# 发布和订阅连接池大小
|
||||||
|
subscriptionConnectionPoolSize: 50
|
||||||
|
|
||||||
|
--- # mail 邮件发送
|
||||||
|
mail:
|
||||||
|
enabled: false
|
||||||
|
host: smtp.163.com
|
||||||
|
port: 465
|
||||||
|
# 是否需要用户名密码验证
|
||||||
|
auth: true
|
||||||
|
# 发送方,遵循RFC-822标准
|
||||||
|
from: xxx@163.com
|
||||||
|
# 用户名(注意:如果使用foxmail邮箱,此处user为qq号)
|
||||||
|
user: xxx@163.com
|
||||||
|
# 密码(注意,某些邮箱需要为SMTP服务单独设置密码,详情查看相关帮助)
|
||||||
|
pass: xxxxxxxxxx
|
||||||
|
# 使用 STARTTLS安全连接,STARTTLS是对纯文本通信协议的扩展。
|
||||||
|
starttlsEnable: true
|
||||||
|
# 使用SSL安全连接
|
||||||
|
sslEnable: true
|
||||||
|
# SMTP超时时长,单位毫秒,缺省值不超时
|
||||||
|
timeout: 0
|
||||||
|
# Socket连接超时值,单位毫秒,缺省值不超时
|
||||||
|
connectionTimeout: 0
|
||||||
|
|
||||||
|
--- # sms 短信
|
||||||
|
sms:
|
||||||
|
enabled: false
|
||||||
|
# 阿里云 dysmsapi.aliyuncs.com
|
||||||
|
# 腾讯云 sms.tencentcloudapi.com
|
||||||
|
endpoint: "dysmsapi.aliyuncs.com"
|
||||||
|
accessKeyId: xxxxxxx
|
||||||
|
accessKeySecret: xxxxxx
|
||||||
|
signName: 测试
|
||||||
|
# 腾讯专用
|
||||||
|
sdkAppId:
|
||||||
@@ -1,19 +1,28 @@
|
|||||||
# 项目相关配置
|
# 项目相关配置
|
||||||
ruoyi:
|
ruoyi:
|
||||||
# 名称
|
# 名称
|
||||||
name: RuoYi
|
name: RuoYi-Vue-Plus
|
||||||
# 版本
|
# 版本
|
||||||
version: 3.4.0
|
version: ${ruoyi-vue-plus.version}
|
||||||
# 版权年份
|
# 版权年份
|
||||||
copyrightYear: 2021
|
copyrightYear: 2022
|
||||||
# 实例演示开关
|
# 实例演示开关
|
||||||
demoEnabled: true
|
demoEnabled: true
|
||||||
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
|
||||||
profile: D:/ruoyi/uploadPath
|
|
||||||
# 获取ip地址开关
|
# 获取ip地址开关
|
||||||
addressEnabled: false
|
addressEnabled: true
|
||||||
|
# 缓存懒加载
|
||||||
|
cacheLazy: false
|
||||||
|
|
||||||
|
captcha:
|
||||||
|
# 页面 <参数设置> 可开启关闭 验证码校验
|
||||||
# 验证码类型 math 数组计算 char 字符验证
|
# 验证码类型 math 数组计算 char 字符验证
|
||||||
captchaType: math
|
type: MATH
|
||||||
|
# line 线段干扰 circle 圆圈干扰 shear 扭曲干扰
|
||||||
|
category: CIRCLE
|
||||||
|
# 数字验证码位数
|
||||||
|
numberLength: 1
|
||||||
|
# 字符验证码长度
|
||||||
|
charLength: 4
|
||||||
|
|
||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
server:
|
server:
|
||||||
@@ -22,28 +31,46 @@ server:
|
|||||||
servlet:
|
servlet:
|
||||||
# 应用的访问路径
|
# 应用的访问路径
|
||||||
context-path: /
|
context-path: /
|
||||||
tomcat:
|
# undertow 配置
|
||||||
# tomcat的URI编码
|
undertow:
|
||||||
uri-encoding: UTF-8
|
# HTTP post内容的最大大小。当值为-1时,默认值为大小是无限的
|
||||||
# tomcat最大线程数,默认为200
|
max-http-post-size: -1
|
||||||
max-threads: 800
|
# 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理
|
||||||
# Tomcat启动初始化的线程数,默认值25
|
# 每块buffer的空间大小,越小的空间被利用越充分
|
||||||
min-spare-threads: 30
|
buffer-size: 512
|
||||||
|
# 是否分配的直接内存
|
||||||
|
direct-buffers: true
|
||||||
|
threads:
|
||||||
|
# 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程
|
||||||
|
io: 8
|
||||||
|
# 阻塞任务线程池, 当执行类似servlet请求阻塞操作, undertow会从这个线程池中取得线程,它的值设置取决于系统的负载
|
||||||
|
worker: 256
|
||||||
|
|
||||||
# 日志配置
|
# 日志配置
|
||||||
logging:
|
logging:
|
||||||
level:
|
level:
|
||||||
com.ruoyi: debug
|
com.ruoyi: @logging.level@
|
||||||
org.springframework: warn
|
org.springframework: warn
|
||||||
|
config: classpath:logback.xml
|
||||||
|
|
||||||
|
# 用户配置
|
||||||
|
user:
|
||||||
|
password:
|
||||||
|
# 密码最大错误次数
|
||||||
|
maxRetryCount: 5
|
||||||
|
# 密码锁定时间(默认10分钟)
|
||||||
|
lockTime: 10
|
||||||
|
|
||||||
# Spring配置
|
# Spring配置
|
||||||
spring:
|
spring:
|
||||||
|
application:
|
||||||
|
name: ${ruoyi.name}
|
||||||
# 资源信息
|
# 资源信息
|
||||||
messages:
|
messages:
|
||||||
# 国际化资源文件路径
|
# 国际化资源文件路径
|
||||||
basename: i18n/messages
|
basename: i18n/messages
|
||||||
profiles:
|
profiles:
|
||||||
active: druid
|
active: @profiles.active@
|
||||||
# 文件上传
|
# 文件上传
|
||||||
servlet:
|
servlet:
|
||||||
multipart:
|
multipart:
|
||||||
@@ -56,66 +83,173 @@ spring:
|
|||||||
restart:
|
restart:
|
||||||
# 热部署开关
|
# 热部署开关
|
||||||
enabled: true
|
enabled: true
|
||||||
# redis 配置
|
mvc:
|
||||||
redis:
|
format:
|
||||||
# 地址
|
date-time: yyyy-MM-dd HH:mm:ss
|
||||||
host: localhost
|
jackson:
|
||||||
# 端口,默认为6379
|
# 日期格式化
|
||||||
port: 6379
|
date-format: yyyy-MM-dd HH:mm:ss
|
||||||
# 数据库索引
|
serialization:
|
||||||
database: 0
|
# 格式化输出
|
||||||
# 密码
|
indent_output: false
|
||||||
password:
|
# 忽略无法转换的对象
|
||||||
# 连接超时时间
|
fail_on_empty_beans: false
|
||||||
timeout: 10s
|
deserialization:
|
||||||
lettuce:
|
# 允许对象忽略json中不存在的属性
|
||||||
pool:
|
fail_on_unknown_properties: false
|
||||||
# 连接池中的最小空闲连接
|
|
||||||
min-idle: 0
|
|
||||||
# 连接池中的最大空闲连接
|
|
||||||
max-idle: 8
|
|
||||||
# 连接池的最大数据库连接数
|
|
||||||
max-active: 8
|
|
||||||
# #连接池最大阻塞等待时间(使用负值表示没有限制)
|
|
||||||
max-wait: -1ms
|
|
||||||
|
|
||||||
# token配置
|
# Sa-Token配置
|
||||||
token:
|
sa-token:
|
||||||
# 令牌自定义标识
|
# token名称 (同时也是cookie名称)
|
||||||
header: Authorization
|
token-name: Authorization
|
||||||
# 令牌密钥
|
# token有效期 设为一天 (必定过期) 单位: 秒
|
||||||
secret: abcdefghijklmnopqrstuvwxyz
|
timeout: 86400
|
||||||
# 令牌有效期(默认30分钟)
|
# token临时有效期 (指定时间无操作就过期) 单位: 秒
|
||||||
expireTime: 30
|
activity-timeout: 1800
|
||||||
|
# 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
|
||||||
|
is-concurrent: true
|
||||||
|
# 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
|
||||||
|
is-share: false
|
||||||
|
# 是否尝试从header里读取token
|
||||||
|
is-read-header: true
|
||||||
|
# 是否尝试从cookie里读取token
|
||||||
|
is-read-cookie: false
|
||||||
|
# token前缀
|
||||||
|
token-prefix: "Bearer"
|
||||||
|
# jwt秘钥
|
||||||
|
jwt-secret-key: abcdefghijklmnopqrstuvwxyz
|
||||||
|
|
||||||
# MyBatis配置
|
# security配置
|
||||||
mybatis:
|
security:
|
||||||
# 搜索指定包别名
|
# 排除路径
|
||||||
typeAliasesPackage: com.ruoyi.**.domain
|
excludes:
|
||||||
# 配置mapper的扫描,找到所有的mapper.xml映射文件
|
# 静态资源
|
||||||
|
- /*.html
|
||||||
|
- /**/*.html
|
||||||
|
- /**/*.css
|
||||||
|
- /**/*.js
|
||||||
|
# swagger 文档配置
|
||||||
|
- /favicon.ico
|
||||||
|
- /*/api-docs
|
||||||
|
- /*/api-docs/**
|
||||||
|
# actuator 监控配置
|
||||||
|
- /actuator
|
||||||
|
- /actuator/**
|
||||||
|
|
||||||
|
# MyBatisPlus配置
|
||||||
|
# https://baomidou.com/config/
|
||||||
|
mybatis-plus:
|
||||||
|
# 不支持多包, 如有需要可在注解配置 或 提升扫包等级
|
||||||
|
# 例如 com.**.**.mapper
|
||||||
|
mapperPackage: com.ruoyi.**.mapper
|
||||||
|
# 对应的 XML 文件位置
|
||||||
mapperLocations: classpath*:mapper/**/*Mapper.xml
|
mapperLocations: classpath*:mapper/**/*Mapper.xml
|
||||||
# 加载全局的配置文件
|
# 实体扫描,多个package用逗号或者分号分隔
|
||||||
configLocation: classpath:mybatis/mybatis-config.xml
|
typeAliasesPackage: com.ruoyi.**.domain
|
||||||
|
# 启动时是否检查 MyBatis XML 文件的存在,默认不检查
|
||||||
# PageHelper分页插件
|
checkConfigLocation: false
|
||||||
pagehelper:
|
configuration:
|
||||||
helperDialect: mysql
|
# 自动驼峰命名规则(camel case)映射
|
||||||
reasonable: true
|
mapUnderscoreToCamelCase: true
|
||||||
supportMethodsArguments: true
|
# MyBatis 自动映射策略
|
||||||
params: count=countSql
|
# NONE:不启用 PARTIAL:只对非嵌套 resultMap 自动映射 FULL:对所有 resultMap 自动映射
|
||||||
|
autoMappingBehavior: PARTIAL
|
||||||
|
# MyBatis 自动映射时未知列或未知属性处理策
|
||||||
|
# NONE:不做处理 WARNING:打印相关警告 FAILING:抛出异常和详细信息
|
||||||
|
autoMappingUnknownColumnBehavior: NONE
|
||||||
|
# 更详细的日志输出 会有性能损耗 org.apache.ibatis.logging.stdout.StdOutImpl
|
||||||
|
# 关闭日志记录 (可单纯使用 p6spy 分析) org.apache.ibatis.logging.nologging.NoLoggingImpl
|
||||||
|
# 默认日志输出 org.apache.ibatis.logging.slf4j.Slf4jImpl
|
||||||
|
logImpl: org.apache.ibatis.logging.nologging.NoLoggingImpl
|
||||||
|
global-config:
|
||||||
|
# 是否打印 Logo banner
|
||||||
|
banner: true
|
||||||
|
dbConfig:
|
||||||
|
# 主键类型
|
||||||
|
# AUTO 自增 NONE 空 INPUT 用户输入 ASSIGN_ID 雪花 ASSIGN_UUID 唯一 UUID
|
||||||
|
idType: ASSIGN_ID
|
||||||
|
# 逻辑已删除值
|
||||||
|
logicDeleteValue: 2
|
||||||
|
# 逻辑未删除值
|
||||||
|
logicNotDeleteValue: 0
|
||||||
|
# 字段验证策略之 insert,在 insert 的时候的字段验证策略
|
||||||
|
# IGNORED 忽略 NOT_NULL 非NULL NOT_EMPTY 非空 DEFAULT 默认 NEVER 不加入 SQL
|
||||||
|
insertStrategy: NOT_NULL
|
||||||
|
# 字段验证策略之 update,在 update 的时候的字段验证策略
|
||||||
|
updateStrategy: NOT_NULL
|
||||||
|
# 字段验证策略之 select,在 select 的时候的字段验证策略既 wrapper 根据内部 entity 生成的 where 条件
|
||||||
|
where-strategy: NOT_NULL
|
||||||
|
|
||||||
# Swagger配置
|
# Swagger配置
|
||||||
swagger:
|
swagger:
|
||||||
# 是否开启swagger
|
# 是否开启swagger
|
||||||
enabled: true
|
enabled: true
|
||||||
# 请求前缀
|
info:
|
||||||
pathMapping: /dev-api
|
# 标题
|
||||||
|
title: '标题:${ruoyi.name}后台管理系统_接口文档'
|
||||||
|
# 描述
|
||||||
|
description: '描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...'
|
||||||
|
# 版本
|
||||||
|
version: '版本号: ${ruoyi-vue-plus.version}'
|
||||||
|
# 作者信息
|
||||||
|
contact:
|
||||||
|
name: Lion Li
|
||||||
|
email: crazylionli@163.com
|
||||||
|
url: https://gitee.com/JavaLionLi/RuoYi-Vue-Plus
|
||||||
|
components:
|
||||||
|
# 鉴权方式配置
|
||||||
|
security-schemes:
|
||||||
|
apiKey:
|
||||||
|
type: APIKEY
|
||||||
|
in: HEADER
|
||||||
|
name: ${sa-token.token-name}
|
||||||
|
|
||||||
|
springdoc:
|
||||||
|
swagger-ui:
|
||||||
|
# 持久化认证数据
|
||||||
|
persistAuthorization: true
|
||||||
|
#这里定义了两个分组,可定义多个,也可以不定义
|
||||||
|
group-configs:
|
||||||
|
- group: 1.演示模块
|
||||||
|
packages-to-scan: com.ruoyi.demo
|
||||||
|
- group: 2.系统模块
|
||||||
|
packages-to-scan: com.ruoyi.web
|
||||||
|
- group: 3.代码生成模块
|
||||||
|
packages-to-scan: com.ruoyi.generator
|
||||||
|
|
||||||
# 防止XSS攻击
|
# 防止XSS攻击
|
||||||
xss:
|
xss:
|
||||||
# 过滤开关
|
# 过滤开关
|
||||||
enabled: true
|
enabled: true
|
||||||
# 排除链接(多个用逗号分隔)
|
# 排除链接(多个用逗号分隔)
|
||||||
excludes: /system/notice/*
|
excludes: /system/notice
|
||||||
# 匹配链接
|
# 匹配链接
|
||||||
urlPatterns: /system/*,/monitor/*,/tool/*
|
urlPatterns: /system/*,/monitor/*,/tool/*
|
||||||
|
|
||||||
|
# 全局线程池相关配置
|
||||||
|
thread-pool:
|
||||||
|
# 是否开启线程池
|
||||||
|
enabled: false
|
||||||
|
# 队列最大长度
|
||||||
|
queueCapacity: 128
|
||||||
|
# 线程池维护线程所允许的空闲时间
|
||||||
|
keepAliveSeconds: 300
|
||||||
|
|
||||||
|
--- # 分布式锁 lock4j 全局配置
|
||||||
|
lock4j:
|
||||||
|
# 获取分布式锁超时时间,默认为 3000 毫秒
|
||||||
|
acquire-timeout: 3000
|
||||||
|
# 分布式锁的超时时间,默认为 30 秒
|
||||||
|
expire: 30000
|
||||||
|
|
||||||
|
--- # Actuator 监控端点的配置项
|
||||||
|
management:
|
||||||
|
endpoints:
|
||||||
|
web:
|
||||||
|
exposure:
|
||||||
|
include: '*'
|
||||||
|
endpoint:
|
||||||
|
health:
|
||||||
|
show-details: ALWAYS
|
||||||
|
logfile:
|
||||||
|
external-file: ./logs/sys-console.log
|
||||||
|
|||||||
@@ -1,24 +1,8 @@
|
|||||||
Application Version: ${ruoyi.version}
|
Application Version: ${ruoyi-vue-plus.version}
|
||||||
Spring Boot Version: ${spring-boot.version}
|
Spring Boot Version: ${spring-boot.version}
|
||||||
////////////////////////////////////////////////////////////////////
|
__________ _____.___.__ ____ ____ __________.__
|
||||||
// _ooOoo_ //
|
\______ \__ __ ____\__ | |__| \ \ / /_ __ ____ \______ \ | __ __ ______
|
||||||
// o8888888o //
|
| _/ | \/ _ \/ | | | ______ \ Y / | \_/ __ \ ______ | ___/ | | | \/ ___/
|
||||||
// 88" . "88 //
|
| | \ | ( <_> )____ | | /_____/ \ /| | /\ ___/ /_____/ | | | |_| | /\___ \
|
||||||
// (| ^_^ |) //
|
|____|_ /____/ \____// ______|__| \___/ |____/ \___ > |____| |____/____//____ >
|
||||||
// O\ = /O //
|
\/ \/ \/ \/
|
||||||
// ____/`---'\____ //
|
|
||||||
// .' \\| |// `. //
|
|
||||||
// / \\||| : |||// \ //
|
|
||||||
// / _||||| -:- |||||- \ //
|
|
||||||
// | | \\\ - /// | | //
|
|
||||||
// | \_| ''\---/'' | | //
|
|
||||||
// \ .-\__ `-` ___/-. / //
|
|
||||||
// ___`. .' /--.--\ `. . ___ //
|
|
||||||
// ."" '< `.___\_<|>_/___.' >'"". //
|
|
||||||
// | | : `- \`.;`\ _ /`;.`/ - ` : | | //
|
|
||||||
// \ \ `-. \_ __\ /__ _/ .-` / / //
|
|
||||||
// ========`-.____`-.___\_____/___.-`____.-'======== //
|
|
||||||
// `=---=' //
|
|
||||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
|
|
||||||
// 佛祖保佑 永不宕机 永无BUG //
|
|
||||||
////////////////////////////////////////////////////////////////////
|
|
||||||
|
|||||||
@@ -2,31 +2,34 @@
|
|||||||
not.null=* 必须填写
|
not.null=* 必须填写
|
||||||
user.jcaptcha.error=验证码错误
|
user.jcaptcha.error=验证码错误
|
||||||
user.jcaptcha.expire=验证码已失效
|
user.jcaptcha.expire=验证码已失效
|
||||||
user.not.exists=用户不存在/密码错误
|
user.not.exists=对不起, 您的账号:{0} 不存在.
|
||||||
user.password.not.match=用户不存在/密码错误
|
user.password.not.match=用户不存在/密码错误
|
||||||
user.password.retry.limit.count=密码输入错误{0}次
|
user.password.retry.limit.count=密码输入错误{0}次
|
||||||
user.password.retry.limit.exceed=密码输入错误{0}次,帐户锁定10分钟
|
user.password.retry.limit.exceed=密码输入错误{0}次,帐户锁定{1}分钟
|
||||||
user.password.delete=对不起,您的账号已被删除
|
user.password.delete=对不起,您的账号:{0} 已被删除
|
||||||
user.blocked=用户已封禁,请联系管理员
|
user.blocked=对不起,您的账号:{0} 已禁用,请联系管理员
|
||||||
role.blocked=角色已封禁,请联系管理员
|
role.blocked=角色已封禁,请联系管理员
|
||||||
user.logout.success=退出成功
|
user.logout.success=退出成功
|
||||||
|
|
||||||
length.not.valid=长度必须在{min}到{max}个字符之间
|
length.not.valid=长度必须在{min}到{max}个字符之间
|
||||||
|
user.username.not.blank=用户名不能为空
|
||||||
user.username.not.valid=* 2到20个汉字、字母、数字或下划线组成,且必须以非数字开头
|
user.username.not.valid=* 2到20个汉字、字母、数字或下划线组成,且必须以非数字开头
|
||||||
|
user.username.length.valid=账户长度必须在{min}到{max}个字符之间
|
||||||
|
user.password.not.blank=用户密码不能为空
|
||||||
|
user.password.length.valid=用户密码长度必须在{min}到{max}个字符之间
|
||||||
user.password.not.valid=* 5-50个字符
|
user.password.not.valid=* 5-50个字符
|
||||||
|
|
||||||
user.email.not.valid=邮箱格式错误
|
user.email.not.valid=邮箱格式错误
|
||||||
|
user.phonenumber.not.blank=用户手机号不能为空
|
||||||
user.mobile.phone.number.not.valid=手机号格式错误
|
user.mobile.phone.number.not.valid=手机号格式错误
|
||||||
user.login.success=登录成功
|
user.login.success=登录成功
|
||||||
|
user.register.success=注册成功
|
||||||
|
user.register.save.error=保存用户 {0} 失败,注册账号已存在
|
||||||
|
user.register.error=注册失败,请联系系统管理人员
|
||||||
user.notfound=请重新登录
|
user.notfound=请重新登录
|
||||||
user.forcelogout=管理员强制退出,请重新登录
|
user.forcelogout=管理员强制退出,请重新登录
|
||||||
user.unknown.error=未知错误,请重新登录
|
user.unknown.error=未知错误,请重新登录
|
||||||
|
|
||||||
##文件上传消息
|
##文件上传消息
|
||||||
upload.exceed.maxSize=上传的文件大小超出限制的文件大小!<br/>允许的文件最大大小是:{0}MB!
|
upload.exceed.maxSize=上传的文件大小超出限制的文件大小!<br/>允许的文件最大大小是:{0}MB!
|
||||||
upload.filename.exceed.length=上传的文件名最长{0}个字符
|
upload.filename.exceed.length=上传的文件名最长{0}个字符
|
||||||
|
|
||||||
##权限
|
##权限
|
||||||
no.permission=您没有数据的权限,请联系管理员添加权限 [{0}]
|
no.permission=您没有数据的权限,请联系管理员添加权限 [{0}]
|
||||||
no.create.permission=您没有创建数据的权限,请联系管理员添加权限 [{0}]
|
no.create.permission=您没有创建数据的权限,请联系管理员添加权限 [{0}]
|
||||||
@@ -34,3 +37,9 @@ no.update.permission=您没有修改数据的权限,请联系管理员添加
|
|||||||
no.delete.permission=您没有删除数据的权限,请联系管理员添加权限 [{0}]
|
no.delete.permission=您没有删除数据的权限,请联系管理员添加权限 [{0}]
|
||||||
no.export.permission=您没有导出数据的权限,请联系管理员添加权限 [{0}]
|
no.export.permission=您没有导出数据的权限,请联系管理员添加权限 [{0}]
|
||||||
no.view.permission=您没有查看数据的权限,请联系管理员添加权限 [{0}]
|
no.view.permission=您没有查看数据的权限,请联系管理员添加权限 [{0}]
|
||||||
|
repeat.submit.message=不允许重复提交,请稍候再试
|
||||||
|
rate.limiter.message=访问过于频繁,请稍候再试
|
||||||
|
sms.code.not.blank=短信验证码不能为空
|
||||||
|
sms.code.retry.limit.count=短信验证码输入错误{0}次
|
||||||
|
sms.code.retry.limit.exceed=短信验证码输入错误{0}次,帐户锁定{1}分钟
|
||||||
|
xcx.code.not.blank=小程序code不能为空
|
||||||
|
|||||||
@@ -0,0 +1,45 @@
|
|||||||
|
#错误消息
|
||||||
|
not.null=* Required fill in
|
||||||
|
user.jcaptcha.error=Captcha error
|
||||||
|
user.jcaptcha.expire=Captcha invalid
|
||||||
|
user.not.exists=Sorry, your account: {0} does not exist
|
||||||
|
user.password.not.match=User does not exist/Password error
|
||||||
|
user.password.retry.limit.count=Password input error {0} times
|
||||||
|
user.password.retry.limit.exceed=Password input error {0} times, account locked for {1} minutes
|
||||||
|
user.password.delete=Sorry, your account:{0} has been deleted
|
||||||
|
user.blocked=Sorry, your account: {0} has been disabled. Please contact the administrator
|
||||||
|
role.blocked=Role disabled,please contact administrators
|
||||||
|
user.logout.success=Exit successful
|
||||||
|
length.not.valid=The length must be between {min} and {max} characters
|
||||||
|
user.username.not.blank=Username cannot be blank
|
||||||
|
user.username.not.valid=* 2 to 20 chinese characters, letters, numbers or underscores, and must start with a non number
|
||||||
|
user.username.length.valid=Account length must be between {min} and {max} characters
|
||||||
|
user.password.not.blank=Password cannot be empty
|
||||||
|
user.password.length.valid=Password length must be between {min} and {max} characters
|
||||||
|
user.password.not.valid=* 5-50 characters
|
||||||
|
user.email.not.valid=Mailbox format error
|
||||||
|
user.phonenumber.not.blank=Phone number cannot be blank
|
||||||
|
user.mobile.phone.number.not.valid=Phone number format error
|
||||||
|
user.login.success=Login successful
|
||||||
|
user.register.success=Register successful
|
||||||
|
user.register.save.error=Failed to save user {0}, The registered account already exists
|
||||||
|
user.register.error=Register failed, please contact system administrator
|
||||||
|
user.notfound=Please login again
|
||||||
|
user.forcelogout=The administrator is forced to exit,please login again
|
||||||
|
user.unknown.error=Unknown error, please login again
|
||||||
|
##文件上传消息
|
||||||
|
upload.exceed.maxSize=The uploaded file size exceeds the limit file size!<br/>the maximum allowed file size is:{0}MB!
|
||||||
|
upload.filename.exceed.length=The maximum length of uploaded file name is {0} characters
|
||||||
|
##权限
|
||||||
|
no.permission=You do not have permission to the data,please contact your administrator to add permissions [{0}]
|
||||||
|
no.create.permission=You do not have permission to create data,please contact your administrator to add permissions [{0}]
|
||||||
|
no.update.permission=You do not have permission to modify data,please contact your administrator to add permissions [{0}]
|
||||||
|
no.delete.permission=You do not have permission to delete data,please contact your administrator to add permissions [{0}]
|
||||||
|
no.export.permission=You do not have permission to export data,please contact your administrator to add permissions [{0}]
|
||||||
|
no.view.permission=You do not have permission to view data,please contact your administrator to add permissions [{0}]
|
||||||
|
repeat.submit.message=Repeat submit is not allowed, please try again later
|
||||||
|
rate.limiter.message=Visit too frequently, please try again later
|
||||||
|
sms.code.not.blank=Sms code cannot be blank
|
||||||
|
sms.code.retry.limit.count=Sms code input error {0} times
|
||||||
|
sms.code.retry.limit.exceed=Sms code input error {0} times, account locked for {1} minutes
|
||||||
|
xcx.code.not.blank=Mini program code cannot be blank
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
#错误消息
|
||||||
|
not.null=* 必须填写
|
||||||
|
user.jcaptcha.error=验证码错误
|
||||||
|
user.jcaptcha.expire=验证码已失效
|
||||||
|
user.not.exists=对不起, 您的账号:{0} 不存在.
|
||||||
|
user.password.not.match=用户不存在/密码错误
|
||||||
|
user.password.retry.limit.count=密码输入错误{0}次
|
||||||
|
user.password.retry.limit.exceed=密码输入错误{0}次,帐户锁定{1}分钟
|
||||||
|
user.password.delete=对不起,您的账号:{0} 已被删除
|
||||||
|
user.blocked=对不起,您的账号:{0} 已禁用,请联系管理员
|
||||||
|
role.blocked=角色已封禁,请联系管理员
|
||||||
|
user.logout.success=退出成功
|
||||||
|
length.not.valid=长度必须在{min}到{max}个字符之间
|
||||||
|
user.username.not.blank=用户名不能为空
|
||||||
|
user.username.not.valid=* 2到20个汉字、字母、数字或下划线组成,且必须以非数字开头
|
||||||
|
user.username.length.valid=账户长度必须在{min}到{max}个字符之间
|
||||||
|
user.password.not.blank=用户密码不能为空
|
||||||
|
user.password.length.valid=用户密码长度必须在{min}到{max}个字符之间
|
||||||
|
user.password.not.valid=* 5-50个字符
|
||||||
|
user.email.not.valid=邮箱格式错误
|
||||||
|
user.phonenumber.not.blank=用户手机号不能为空
|
||||||
|
user.mobile.phone.number.not.valid=手机号格式错误
|
||||||
|
user.login.success=登录成功
|
||||||
|
user.register.success=注册成功
|
||||||
|
user.register.save.error=保存用户 {0} 失败,注册账号已存在
|
||||||
|
user.register.error=注册失败,请联系系统管理人员
|
||||||
|
user.notfound=请重新登录
|
||||||
|
user.forcelogout=管理员强制退出,请重新登录
|
||||||
|
user.unknown.error=未知错误,请重新登录
|
||||||
|
##文件上传消息
|
||||||
|
upload.exceed.maxSize=上传的文件大小超出限制的文件大小!<br/>允许的文件最大大小是:{0}MB!
|
||||||
|
upload.filename.exceed.length=上传的文件名最长{0}个字符
|
||||||
|
##权限
|
||||||
|
no.permission=您没有数据的权限,请联系管理员添加权限 [{0}]
|
||||||
|
no.create.permission=您没有创建数据的权限,请联系管理员添加权限 [{0}]
|
||||||
|
no.update.permission=您没有修改数据的权限,请联系管理员添加权限 [{0}]
|
||||||
|
no.delete.permission=您没有删除数据的权限,请联系管理员添加权限 [{0}]
|
||||||
|
no.export.permission=您没有导出数据的权限,请联系管理员添加权限 [{0}]
|
||||||
|
no.view.permission=您没有查看数据的权限,请联系管理员添加权限 [{0}]
|
||||||
|
repeat.submit.message=不允许重复提交,请稍候再试
|
||||||
|
rate.limiter.message=访问过于频繁,请稍候再试
|
||||||
|
sms.code.not.blank=短信验证码不能为空
|
||||||
|
sms.code.retry.limit.count=短信验证码输入错误{0}次
|
||||||
|
sms.code.retry.limit.exceed=短信验证码输入错误{0}次,帐户锁定{1}分钟
|
||||||
|
xcx.code.not.blank=小程序code不能为空
|
||||||
@@ -1,17 +1,37 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<!-- 日志存放路径 -->
|
<property name="log.path" value="./logs"/>
|
||||||
<property name="log.path" value="/home/ruoyi/logs" />
|
<property name="console.log.pattern"
|
||||||
<!-- 日志输出格式 -->
|
value="%red(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{36}%n) - %msg%n"/>
|
||||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
<property name="log.pattern" value="%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n"/>
|
||||||
|
|
||||||
<!-- 控制台输出 -->
|
<!-- 控制台输出 -->
|
||||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
<encoder>
|
<encoder>
|
||||||
<pattern>${log.pattern}</pattern>
|
<pattern>${console.log.pattern}</pattern>
|
||||||
|
<charset>utf-8</charset>
|
||||||
</encoder>
|
</encoder>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
|
<!-- 控制台输出 -->
|
||||||
|
<appender name="file_console" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
|
<file>${log.path}/sys-console.log</file>
|
||||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
|
<!-- 日志文件名格式 -->
|
||||||
|
<fileNamePattern>${log.path}/sys-console.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
<!-- 日志最大 1天 -->
|
||||||
|
<maxHistory>1</maxHistory>
|
||||||
|
</rollingPolicy>
|
||||||
|
<encoder>
|
||||||
|
<pattern>${log.pattern}</pattern>
|
||||||
|
<charset>utf-8</charset>
|
||||||
|
</encoder>
|
||||||
|
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||||
|
<!-- 过滤的级别 -->
|
||||||
|
<level>INFO</level>
|
||||||
|
</filter>
|
||||||
|
</appender>
|
||||||
|
|
||||||
<!-- 系统日志输出 -->
|
<!-- 系统日志输出 -->
|
||||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<file>${log.path}/sys-info.log</file>
|
<file>${log.path}/sys-info.log</file>
|
||||||
@@ -57,37 +77,53 @@
|
|||||||
</filter>
|
</filter>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
<!-- 用户访问日志输出 -->
|
<!-- info异步输出 -->
|
||||||
<appender name="sys-user" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="async_info" class="ch.qos.logback.classic.AsyncAppender">
|
||||||
<file>${log.path}/sys-user.log</file>
|
<!-- 不丢失日志.默认的,如果队列的80%已满,则会丢弃TRACT、DEBUG、INFO级别的日志 -->
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
<discardingThreshold>0</discardingThreshold>
|
||||||
<!-- 按天回滚 daily -->
|
<!-- 更改默认的队列的深度,该值会影响性能.默认值为256 -->
|
||||||
<fileNamePattern>${log.path}/sys-user.%d{yyyy-MM-dd}.log</fileNamePattern>
|
<queueSize>512</queueSize>
|
||||||
<!-- 日志最大的历史 60天 -->
|
<!-- 添加附加的appender,最多只能添加一个 -->
|
||||||
<maxHistory>60</maxHistory>
|
<appender-ref ref="file_info"/>
|
||||||
</rollingPolicy>
|
|
||||||
<encoder>
|
|
||||||
<pattern>${log.pattern}</pattern>
|
|
||||||
</encoder>
|
|
||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
<!-- 系统模块日志级别控制 -->
|
<!-- error异步输出 -->
|
||||||
<logger name="com.ruoyi" level="info" />
|
<appender name="async_error" class="ch.qos.logback.classic.AsyncAppender">
|
||||||
<!-- Spring日志级别控制 -->
|
<!-- 不丢失日志.默认的,如果队列的80%已满,则会丢弃TRACT、DEBUG、INFO级别的日志 -->
|
||||||
<logger name="org.springframework" level="warn" />
|
<discardingThreshold>0</discardingThreshold>
|
||||||
|
<!-- 更改默认的队列的深度,该值会影响性能.默认值为256 -->
|
||||||
|
<queueSize>512</queueSize>
|
||||||
|
<!-- 添加附加的appender,最多只能添加一个 -->
|
||||||
|
<appender-ref ref="file_error"/>
|
||||||
|
</appender>
|
||||||
|
|
||||||
<root level="info">
|
<!-- 整合 skywalking 控制台输出 tid -->
|
||||||
<appender-ref ref="console" />
|
<!-- <appender name="console" class="ch.qos.logback.core.ConsoleAppender">-->
|
||||||
</root>
|
<!-- <encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">-->
|
||||||
|
<!-- <layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">-->
|
||||||
|
<!-- <pattern>[%tid] ${console.log.pattern}</pattern>-->
|
||||||
|
<!-- </layout>-->
|
||||||
|
<!-- <charset>utf-8</charset>-->
|
||||||
|
<!-- </encoder>-->
|
||||||
|
<!-- </appender>-->
|
||||||
|
|
||||||
|
<!-- 整合 skywalking 推送采集日志 -->
|
||||||
|
<!-- <appender name="sky_log" class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.log.GRPCLogClientAppender">-->
|
||||||
|
<!-- <encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">-->
|
||||||
|
<!-- <layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">-->
|
||||||
|
<!-- <pattern>[%tid] ${console.log.pattern}</pattern>-->
|
||||||
|
<!-- </layout>-->
|
||||||
|
<!-- <charset>utf-8</charset>-->
|
||||||
|
<!-- </encoder>-->
|
||||||
|
<!-- </appender>-->
|
||||||
|
|
||||||
<!--系统操作日志-->
|
<!--系统操作日志-->
|
||||||
<root level="info">
|
<root level="info">
|
||||||
<appender-ref ref="file_info" />
|
<appender-ref ref="console" />
|
||||||
<appender-ref ref="file_error" />
|
<appender-ref ref="async_info" />
|
||||||
|
<appender-ref ref="async_error" />
|
||||||
|
<appender-ref ref="file_console" />
|
||||||
|
<!-- <appender-ref ref="sky_log"/>-->
|
||||||
</root>
|
</root>
|
||||||
|
|
||||||
<!--系统用户操作日志-->
|
|
||||||
<logger name="sys-user" level="info">
|
|
||||||
<appender-ref ref="sys-user"/>
|
|
||||||
</logger>
|
|
||||||
</configuration>
|
</configuration>
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
|
||||||
<!DOCTYPE configuration
|
|
||||||
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
|
|
||||||
"http://mybatis.org/dtd/mybatis-3-config.dtd">
|
|
||||||
<configuration>
|
|
||||||
|
|
||||||
<settings>
|
|
||||||
<setting name="cacheEnabled" value="true" /> <!-- 全局映射器启用缓存 -->
|
|
||||||
<setting name="useGeneratedKeys" value="true" /> <!-- 允许 JDBC 支持自动生成主键 -->
|
|
||||||
<setting name="defaultExecutorType" value="REUSE" /> <!-- 配置默认的执行器 -->
|
|
||||||
<setting name="logImpl" value="SLF4J" /> <!-- 指定 MyBatis 所用日志的具体实现 -->
|
|
||||||
<!-- <setting name="mapUnderscoreToCamelCase" value="true"/> 驼峰式命名 -->
|
|
||||||
</settings>
|
|
||||||
|
|
||||||
</configuration>
|
|
||||||
28
ruoyi-admin/src/main/resources/spy.properties
Normal file
28
ruoyi-admin/src/main/resources/spy.properties
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
# p6spy 性能分析插件配置文件
|
||||||
|
modulelist=com.baomidou.mybatisplus.extension.p6spy.MybatisPlusLogFactory,com.p6spy.engine.outage.P6OutageFactory
|
||||||
|
# 自定义日志打印
|
||||||
|
logMessageFormat=com.baomidou.mybatisplus.extension.p6spy.P6SpyLogger
|
||||||
|
#日志输出到控制台
|
||||||
|
appender=com.baomidou.mybatisplus.extension.p6spy.StdoutLogger
|
||||||
|
# 使用日志系统记录 sql
|
||||||
|
#appender=com.p6spy.engine.spy.appender.Slf4JLogger
|
||||||
|
# 设置 p6spy driver 代理
|
||||||
|
#deregisterdrivers=true
|
||||||
|
# 取消JDBC URL前缀
|
||||||
|
useprefix=true
|
||||||
|
# 配置记录 Log 例外,可去掉的结果集有error,info,batch,debug,statement,commit,rollback,result,resultset.
|
||||||
|
excludecategories=info,debug,result,commit,resultset
|
||||||
|
# 日期格式
|
||||||
|
dateformat=yyyy-MM-dd HH:mm:ss
|
||||||
|
# SQL语句打印时间格式
|
||||||
|
databaseDialectTimestampFormat=yyyy-MM-dd HH:mm:ss
|
||||||
|
# 实际驱动可多个
|
||||||
|
#driverlist=org.h2.Driver
|
||||||
|
# 是否开启慢SQL记录
|
||||||
|
outagedetection=true
|
||||||
|
# 慢SQL记录标准 2 秒
|
||||||
|
outagedetectioninterval=2
|
||||||
|
# 是否过滤 Log
|
||||||
|
filter=true
|
||||||
|
# 过滤 Log 时所排除的 sql 关键字,以逗号分隔
|
||||||
|
exclude=SELECT 1
|
||||||
45
ruoyi-admin/src/test/java/com/ruoyi/test/AssertUnitTest.java
Normal file
45
ruoyi-admin/src/test/java/com/ruoyi/test/AssertUnitTest.java
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
package com.ruoyi.test;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Assertions;
|
||||||
|
import org.junit.jupiter.api.DisplayName;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 断言单元测试案例
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
*/
|
||||||
|
@DisplayName("断言单元测试案例")
|
||||||
|
public class AssertUnitTest {
|
||||||
|
|
||||||
|
@DisplayName("测试 assertEquals 方法")
|
||||||
|
@Test
|
||||||
|
public void testAssertEquals() {
|
||||||
|
Assertions.assertEquals("666", new String("666"));
|
||||||
|
Assertions.assertNotEquals("666", new String("666"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@DisplayName("测试 assertSame 方法")
|
||||||
|
@Test
|
||||||
|
public void testAssertSame() {
|
||||||
|
Object obj = new Object();
|
||||||
|
Object obj1 = obj;
|
||||||
|
Assertions.assertSame(obj, obj1);
|
||||||
|
Assertions.assertNotSame(obj, obj1);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DisplayName("测试 assertTrue 方法")
|
||||||
|
@Test
|
||||||
|
public void testAssertTrue() {
|
||||||
|
Assertions.assertTrue(true);
|
||||||
|
Assertions.assertFalse(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DisplayName("测试 assertNull 方法")
|
||||||
|
@Test
|
||||||
|
public void testAssertNull() {
|
||||||
|
Assertions.assertNull(null);
|
||||||
|
Assertions.assertNotNull(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
70
ruoyi-admin/src/test/java/com/ruoyi/test/DemoUnitTest.java
Normal file
70
ruoyi-admin/src/test/java/com/ruoyi/test/DemoUnitTest.java
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
package com.ruoyi.test;
|
||||||
|
|
||||||
|
import com.ruoyi.common.config.RuoYiConfig;
|
||||||
|
import org.junit.jupiter.api.*;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单元测试案例
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
*/
|
||||||
|
@SpringBootTest // 此注解只能在 springboot 主包下使用 需包含 main 方法与 yml 配置文件
|
||||||
|
@DisplayName("单元测试案例")
|
||||||
|
public class DemoUnitTest {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RuoYiConfig ruoYiConfig;
|
||||||
|
|
||||||
|
@DisplayName("测试 @SpringBootTest @Test @DisplayName 注解")
|
||||||
|
@Test
|
||||||
|
public void testTest() {
|
||||||
|
System.out.println(ruoYiConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Disabled
|
||||||
|
@DisplayName("测试 @Disabled 注解")
|
||||||
|
@Test
|
||||||
|
public void testDisabled() {
|
||||||
|
System.out.println(ruoYiConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Timeout(value = 2L, unit = TimeUnit.SECONDS)
|
||||||
|
@DisplayName("测试 @Timeout 注解")
|
||||||
|
@Test
|
||||||
|
public void testTimeout() throws InterruptedException {
|
||||||
|
Thread.sleep(3000);
|
||||||
|
System.out.println(ruoYiConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@DisplayName("测试 @RepeatedTest 注解")
|
||||||
|
@RepeatedTest(3)
|
||||||
|
public void testRepeatedTest() {
|
||||||
|
System.out.println(666);
|
||||||
|
}
|
||||||
|
|
||||||
|
@BeforeAll
|
||||||
|
public static void testBeforeAll() {
|
||||||
|
System.out.println("@BeforeAll ==================");
|
||||||
|
}
|
||||||
|
|
||||||
|
@BeforeEach
|
||||||
|
public void testBeforeEach() {
|
||||||
|
System.out.println("@BeforeEach ==================");
|
||||||
|
}
|
||||||
|
|
||||||
|
@AfterEach
|
||||||
|
public void testAfterEach() {
|
||||||
|
System.out.println("@AfterEach ==================");
|
||||||
|
}
|
||||||
|
|
||||||
|
@AfterAll
|
||||||
|
public static void testAfterAll() {
|
||||||
|
System.out.println("@AfterAll ==================");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
72
ruoyi-admin/src/test/java/com/ruoyi/test/ParamUnitTest.java
Normal file
72
ruoyi-admin/src/test/java/com/ruoyi/test/ParamUnitTest.java
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
package com.ruoyi.test;
|
||||||
|
|
||||||
|
import com.ruoyi.common.enums.UserType;
|
||||||
|
import org.junit.jupiter.api.AfterEach;
|
||||||
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
|
import org.junit.jupiter.api.DisplayName;
|
||||||
|
import org.junit.jupiter.params.ParameterizedTest;
|
||||||
|
import org.junit.jupiter.params.provider.EnumSource;
|
||||||
|
import org.junit.jupiter.params.provider.MethodSource;
|
||||||
|
import org.junit.jupiter.params.provider.NullSource;
|
||||||
|
import org.junit.jupiter.params.provider.ValueSource;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 带参数单元测试案例
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
*/
|
||||||
|
@DisplayName("带参数单元测试案例")
|
||||||
|
public class ParamUnitTest {
|
||||||
|
|
||||||
|
@DisplayName("测试 @ValueSource 注解")
|
||||||
|
@ParameterizedTest
|
||||||
|
@ValueSource(strings = {"t1", "t2", "t3"})
|
||||||
|
public void testValueSource(String str) {
|
||||||
|
System.out.println(str);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DisplayName("测试 @NullSource 注解")
|
||||||
|
@ParameterizedTest
|
||||||
|
@NullSource
|
||||||
|
public void testNullSource(String str) {
|
||||||
|
System.out.println(str);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DisplayName("测试 @EnumSource 注解")
|
||||||
|
@ParameterizedTest
|
||||||
|
@EnumSource(UserType.class)
|
||||||
|
public void testEnumSource(UserType type) {
|
||||||
|
System.out.println(type.getUserType());
|
||||||
|
}
|
||||||
|
|
||||||
|
@DisplayName("测试 @MethodSource 注解")
|
||||||
|
@ParameterizedTest
|
||||||
|
@MethodSource("getParam")
|
||||||
|
public void testMethodSource(String str) {
|
||||||
|
System.out.println(str);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Stream<String> getParam() {
|
||||||
|
List<String> list = new ArrayList<>();
|
||||||
|
list.add("t1");
|
||||||
|
list.add("t2");
|
||||||
|
list.add("t3");
|
||||||
|
return list.stream();
|
||||||
|
}
|
||||||
|
|
||||||
|
@BeforeEach
|
||||||
|
public void testBeforeEach() {
|
||||||
|
System.out.println("@BeforeEach ==================");
|
||||||
|
}
|
||||||
|
|
||||||
|
@AfterEach
|
||||||
|
public void testAfterEach() {
|
||||||
|
System.out.println("@AfterEach ==================");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
54
ruoyi-admin/src/test/java/com/ruoyi/test/TagUnitTest.java
Normal file
54
ruoyi-admin/src/test/java/com/ruoyi/test/TagUnitTest.java
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
package com.ruoyi.test;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.*;
|
||||||
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标签单元测试案例
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
*/
|
||||||
|
@SpringBootTest
|
||||||
|
@DisplayName("标签单元测试案例")
|
||||||
|
public class TagUnitTest {
|
||||||
|
|
||||||
|
@Tag("dev")
|
||||||
|
@DisplayName("测试 @Tag dev")
|
||||||
|
@Test
|
||||||
|
public void testTagDev() {
|
||||||
|
System.out.println("dev");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Tag("prod")
|
||||||
|
@DisplayName("测试 @Tag prod")
|
||||||
|
@Test
|
||||||
|
public void testTagProd() {
|
||||||
|
System.out.println("prod");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Tag("local")
|
||||||
|
@DisplayName("测试 @Tag local")
|
||||||
|
@Test
|
||||||
|
public void testTagLocal() {
|
||||||
|
System.out.println("local");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Tag("exclude")
|
||||||
|
@DisplayName("测试 @Tag exclude")
|
||||||
|
@Test
|
||||||
|
public void testTagExclude() {
|
||||||
|
System.out.println("exclude");
|
||||||
|
}
|
||||||
|
|
||||||
|
@BeforeEach
|
||||||
|
public void testBeforeEach() {
|
||||||
|
System.out.println("@BeforeEach ==================");
|
||||||
|
}
|
||||||
|
|
||||||
|
@AfterEach
|
||||||
|
public void testAfterEach() {
|
||||||
|
System.out.println("@AfterEach ==================");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -3,9 +3,9 @@
|
|||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
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">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>ruoyi-vue-plus</artifactId>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<version>3.4.0</version>
|
<version>4.5.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
@@ -29,22 +29,21 @@
|
|||||||
<artifactId>spring-web</artifactId>
|
<artifactId>spring-web</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- spring security 安全认证 -->
|
<!-- Sa-Token 权限认证, 在线文档:http://sa-token.dev33.cn/ -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>cn.dev33</groupId>
|
||||||
<artifactId>spring-boot-starter-security</artifactId>
|
<artifactId>sa-token-spring-boot-starter</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- Sa-Token 整合 jwt -->
|
||||||
<!-- pagehelper 分页插件 -->
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.pagehelper</groupId>
|
<groupId>cn.dev33</groupId>
|
||||||
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
<artifactId>sa-token-jwt</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 自定义验证注解 -->
|
<!-- 自定义验证注解 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.validation</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>validation-api</artifactId>
|
<artifactId>spring-boot-starter-validation</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!--常用工具类 -->
|
<!--常用工具类 -->
|
||||||
@@ -59,28 +58,9 @@
|
|||||||
<artifactId>jackson-databind</artifactId>
|
<artifactId>jackson-databind</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 阿里JSON解析器 -->
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba</groupId>
|
<groupId>com.alibaba</groupId>
|
||||||
<artifactId>fastjson</artifactId>
|
<artifactId>easyexcel</artifactId>
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- io常用工具类 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>commons-io</groupId>
|
|
||||||
<artifactId>commons-io</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- 文件上传工具类 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>commons-fileupload</groupId>
|
|
||||||
<artifactId>commons-fileupload</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- excel工具 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.poi</groupId>
|
|
||||||
<artifactId>poi-ooxml</artifactId>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- yml解析器 -->
|
<!-- yml解析器 -->
|
||||||
@@ -89,36 +69,85 @@
|
|||||||
<artifactId>snakeyaml</artifactId>
|
<artifactId>snakeyaml</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!--Token生成与解析-->
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.jsonwebtoken</groupId>
|
|
||||||
<artifactId>jjwt</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- redis 缓存操作 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-data-redis</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- pool 对象池 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.commons</groupId>
|
|
||||||
<artifactId>commons-pool2</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- 解析客户端操作系统、浏览器等 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>eu.bitwalker</groupId>
|
|
||||||
<artifactId>UserAgentUtils</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- servlet包 -->
|
<!-- servlet包 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.servlet</groupId>
|
<groupId>javax.servlet</groupId>
|
||||||
<artifactId>javax.servlet-api</artifactId>
|
<artifactId>javax.servlet-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- dynamic-datasource 多数据源-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.hutool</groupId>
|
||||||
|
<artifactId>hutool-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.hutool</groupId>
|
||||||
|
<artifactId>hutool-http</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.hutool</groupId>
|
||||||
|
<artifactId>hutool-captcha</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.hutool</groupId>
|
||||||
|
<artifactId>hutool-jwt</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.hutool</groupId>
|
||||||
|
<artifactId>hutool-extra</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.sun.mail</groupId>
|
||||||
|
<artifactId>jakarta.mail</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springdoc</groupId>
|
||||||
|
<artifactId>springdoc-openapi-webmvc-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springdoc</groupId>
|
||||||
|
<artifactId>springdoc-openapi-javadoc</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 自动生成YML配置关联JSON文件 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!--redisson-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.redisson</groupId>
|
||||||
|
<artifactId>redisson-spring-boot-starter</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>lock4j-redisson-spring-boot-starter</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.ruoyi.common.annotation;
|
||||||
|
|
||||||
|
import com.ruoyi.common.excel.CellMergeStrategy;
|
||||||
|
|
||||||
|
import java.lang.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* excel 列单元格合并(合并列相同项)
|
||||||
|
*
|
||||||
|
* 需搭配 {@link CellMergeStrategy} 策略使用
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
*/
|
||||||
|
@Target(ElementType.FIELD)
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@Inherited
|
||||||
|
public @interface CellMerge {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* col index
|
||||||
|
*/
|
||||||
|
int index() default -1;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.ruoyi.common.annotation;
|
||||||
|
|
||||||
|
import java.lang.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据权限
|
||||||
|
*
|
||||||
|
* 一个注解只能对应一个模板
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @version 3.5.0
|
||||||
|
*/
|
||||||
|
@Target(ElementType.METHOD)
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@Documented
|
||||||
|
public @interface DataColumn {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 占位符关键字
|
||||||
|
*/
|
||||||
|
String[] key() default "deptName";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 占位符替换值
|
||||||
|
*/
|
||||||
|
String[] value() default "dept_id";
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package com.ruoyi.common.annotation;
|
||||||
|
|
||||||
|
import java.lang.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据权限组
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @version 3.5.0
|
||||||
|
*/
|
||||||
|
@Target({ElementType.METHOD, ElementType.TYPE})
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@Documented
|
||||||
|
public @interface DataPermission {
|
||||||
|
|
||||||
|
DataColumn[] value();
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
package com.ruoyi.common.annotation;
|
|
||||||
|
|
||||||
import java.lang.annotation.Documented;
|
|
||||||
import java.lang.annotation.ElementType;
|
|
||||||
import java.lang.annotation.Retention;
|
|
||||||
import java.lang.annotation.RetentionPolicy;
|
|
||||||
import java.lang.annotation.Target;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 数据权限过滤注解
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
*/
|
|
||||||
@Target(ElementType.METHOD)
|
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
|
||||||
@Documented
|
|
||||||
public @interface DataScope
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* 部门表的别名
|
|
||||||
*/
|
|
||||||
public String deptAlias() default "";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户表的别名
|
|
||||||
*/
|
|
||||||
public String userAlias() default "";
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
package com.ruoyi.common.annotation;
|
|
||||||
|
|
||||||
import java.lang.annotation.Documented;
|
|
||||||
import java.lang.annotation.ElementType;
|
|
||||||
import java.lang.annotation.Inherited;
|
|
||||||
import java.lang.annotation.Retention;
|
|
||||||
import java.lang.annotation.RetentionPolicy;
|
|
||||||
import java.lang.annotation.Target;
|
|
||||||
import com.ruoyi.common.enums.DataSourceType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 自定义多数据源切换注解
|
|
||||||
*
|
|
||||||
* 优先级:先方法,后类,如果方法覆盖了类上的数据源类型,以方法的为准,否则以类上的为准
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
*/
|
|
||||||
@Target({ ElementType.METHOD, ElementType.TYPE })
|
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
|
||||||
@Documented
|
|
||||||
@Inherited
|
|
||||||
public @interface DataSource
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* 切换数据源名称
|
|
||||||
*/
|
|
||||||
public DataSourceType value() default DataSourceType.MASTER;
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package com.ruoyi.common.annotation;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.ruoyi.common.jackson.DictDataJsonSerializer;
|
||||||
|
|
||||||
|
import java.lang.annotation.ElementType;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字典数据映射注解
|
||||||
|
*
|
||||||
|
* @author itino
|
||||||
|
*/
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@Target({ElementType.FIELD, ElementType.METHOD})
|
||||||
|
@JacksonAnnotationsInside
|
||||||
|
@JsonSerialize(using = DictDataJsonSerializer.class)
|
||||||
|
public @interface DictDataMapper {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置字典的type值 (如: sys_user_sex)
|
||||||
|
*/
|
||||||
|
String dictType() default "";
|
||||||
|
}
|
||||||
@@ -1,165 +0,0 @@
|
|||||||
package com.ruoyi.common.annotation;
|
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
|
||||||
import java.lang.annotation.Retention;
|
|
||||||
import java.lang.annotation.RetentionPolicy;
|
|
||||||
import java.lang.annotation.Target;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 自定义导出Excel数据注解
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
*/
|
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
|
||||||
@Target(ElementType.FIELD)
|
|
||||||
public @interface Excel
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* 导出时在excel中排序
|
|
||||||
*/
|
|
||||||
public int sort() default Integer.MAX_VALUE;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出到Excel中的名字.
|
|
||||||
*/
|
|
||||||
public String name() default "";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 日期格式, 如: yyyy-MM-dd
|
|
||||||
*/
|
|
||||||
public String dateFormat() default "";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 如果是字典类型,请设置字典的type值 (如: sys_user_sex)
|
|
||||||
*/
|
|
||||||
public String dictType() default "";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 读取内容转表达式 (如: 0=男,1=女,2=未知)
|
|
||||||
*/
|
|
||||||
public String readConverterExp() default "";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分隔符,读取字符串组内容
|
|
||||||
*/
|
|
||||||
public String separator() default ",";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* BigDecimal 精度 默认:-1(默认不开启BigDecimal格式化)
|
|
||||||
*/
|
|
||||||
public int scale() default -1;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* BigDecimal 舍入规则 默认:BigDecimal.ROUND_HALF_EVEN
|
|
||||||
*/
|
|
||||||
public int roundingMode() default BigDecimal.ROUND_HALF_EVEN;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出类型(0数字 1字符串)
|
|
||||||
*/
|
|
||||||
public ColumnType cellType() default ColumnType.STRING;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出时在excel中每个列的高度 单位为字符
|
|
||||||
*/
|
|
||||||
public double height() default 14;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出时在excel中每个列的宽 单位为字符
|
|
||||||
*/
|
|
||||||
public double width() default 16;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 文字后缀,如% 90 变成90%
|
|
||||||
*/
|
|
||||||
public String suffix() default "";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 当值为空时,字段的默认值
|
|
||||||
*/
|
|
||||||
public String defaultValue() default "";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 提示信息
|
|
||||||
*/
|
|
||||||
public String prompt() default "";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置只能选择不能输入的列内容.
|
|
||||||
*/
|
|
||||||
public String[] combo() default {};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否导出数据,应对需求:有时我们需要导出一份模板,这是标题需要但内容需要用户手工填写.
|
|
||||||
*/
|
|
||||||
public boolean isExport() default true;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 另一个类中的属性名称,支持多级获取,以小数点隔开
|
|
||||||
*/
|
|
||||||
public String targetAttr() default "";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否自动统计数据,在最后追加一行统计数据总和
|
|
||||||
*/
|
|
||||||
public boolean isStatistics() default false;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出字段对齐方式(0:默认;1:靠左;2:居中;3:靠右)
|
|
||||||
*/
|
|
||||||
Align align() default Align.AUTO;
|
|
||||||
|
|
||||||
public enum Align
|
|
||||||
{
|
|
||||||
AUTO(0), LEFT(1), CENTER(2), RIGHT(3);
|
|
||||||
private final int value;
|
|
||||||
|
|
||||||
Align(int value)
|
|
||||||
{
|
|
||||||
this.value = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int value()
|
|
||||||
{
|
|
||||||
return this.value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 字段类型(0:导出导入;1:仅导出;2:仅导入)
|
|
||||||
*/
|
|
||||||
Type type() default Type.ALL;
|
|
||||||
|
|
||||||
public enum Type
|
|
||||||
{
|
|
||||||
ALL(0), EXPORT(1), IMPORT(2);
|
|
||||||
private final int value;
|
|
||||||
|
|
||||||
Type(int value)
|
|
||||||
{
|
|
||||||
this.value = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int value()
|
|
||||||
{
|
|
||||||
return this.value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum ColumnType
|
|
||||||
{
|
|
||||||
NUMERIC(0), STRING(1), IMAGE(2);
|
|
||||||
private final int value;
|
|
||||||
|
|
||||||
ColumnType(int value)
|
|
||||||
{
|
|
||||||
this.value = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int value()
|
|
||||||
{
|
|
||||||
return this.value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package com.ruoyi.common.annotation;
|
||||||
|
|
||||||
|
import java.lang.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字典格式化
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
*/
|
||||||
|
@Target({ElementType.FIELD})
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@Inherited
|
||||||
|
public @interface ExcelDictFormat {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 如果是字典类型,请设置字典的type值 (如: sys_user_sex)
|
||||||
|
*/
|
||||||
|
String dictType() default "";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 读取内容转表达式 (如: 0=男,1=女,2=未知)
|
||||||
|
*/
|
||||||
|
String readConverterExp() default "";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分隔符,读取字符串组内容
|
||||||
|
*/
|
||||||
|
String separator() default ",";
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
package com.ruoyi.common.annotation;
|
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
|
||||||
import java.lang.annotation.Retention;
|
|
||||||
import java.lang.annotation.RetentionPolicy;
|
|
||||||
import java.lang.annotation.Target;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Excel注解集
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
*/
|
|
||||||
@Target(ElementType.FIELD)
|
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
|
||||||
public @interface Excels
|
|
||||||
{
|
|
||||||
Excel[] value();
|
|
||||||
}
|
|
||||||
@@ -1,41 +1,41 @@
|
|||||||
package com.ruoyi.common.annotation;
|
package com.ruoyi.common.annotation;
|
||||||
|
|
||||||
import java.lang.annotation.Documented;
|
|
||||||
import java.lang.annotation.ElementType;
|
|
||||||
import java.lang.annotation.Retention;
|
|
||||||
import java.lang.annotation.RetentionPolicy;
|
|
||||||
import java.lang.annotation.Target;
|
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.common.enums.OperatorType;
|
import com.ruoyi.common.enums.OperatorType;
|
||||||
|
|
||||||
|
import java.lang.annotation.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自定义操作日志记录注解
|
* 自定义操作日志记录注解
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@Target({ElementType.PARAMETER, ElementType.METHOD})
|
@Target({ElementType.PARAMETER, ElementType.METHOD})
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@Documented
|
@Documented
|
||||||
public @interface Log
|
public @interface Log {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* 模块
|
* 模块
|
||||||
*/
|
*/
|
||||||
public String title() default "";
|
String title() default "";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 功能
|
* 功能
|
||||||
*/
|
*/
|
||||||
public BusinessType businessType() default BusinessType.OTHER;
|
BusinessType businessType() default BusinessType.OTHER;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 操作人类别
|
* 操作人类别
|
||||||
*/
|
*/
|
||||||
public OperatorType operatorType() default OperatorType.MANAGE;
|
OperatorType operatorType() default OperatorType.MANAGE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否保存请求的参数
|
* 是否保存请求的参数
|
||||||
*/
|
*/
|
||||||
public boolean isSaveRequestData() default true;
|
boolean isSaveRequestData() default true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否保存响应的参数
|
||||||
|
*/
|
||||||
|
boolean isSaveResponseData() default true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package com.ruoyi.common.annotation;
|
||||||
|
|
||||||
|
import com.ruoyi.common.constant.CacheConstants;
|
||||||
|
import com.ruoyi.common.enums.LimitType;
|
||||||
|
|
||||||
|
import java.lang.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 限流注解
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
*/
|
||||||
|
@Target(ElementType.METHOD)
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@Documented
|
||||||
|
public @interface RateLimiter {
|
||||||
|
/**
|
||||||
|
* 限流key
|
||||||
|
*/
|
||||||
|
String key() default CacheConstants.RATE_LIMIT_KEY;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 限流时间,单位秒
|
||||||
|
*/
|
||||||
|
int time() default 60;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 限流次数
|
||||||
|
*/
|
||||||
|
int count() default 100;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 限流类型
|
||||||
|
*/
|
||||||
|
LimitType limitType() default LimitType.DEFAULT;
|
||||||
|
}
|
||||||
@@ -1,23 +1,29 @@
|
|||||||
package com.ruoyi.common.annotation;
|
package com.ruoyi.common.annotation;
|
||||||
|
|
||||||
import java.lang.annotation.Documented;
|
import java.lang.annotation.*;
|
||||||
import java.lang.annotation.ElementType;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.lang.annotation.Inherited;
|
|
||||||
import java.lang.annotation.Retention;
|
|
||||||
import java.lang.annotation.RetentionPolicy;
|
|
||||||
import java.lang.annotation.Target;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自定义注解防止表单重复提交
|
* 自定义注解防止表单重复提交
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author Lion Li
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@Inherited
|
@Inherited
|
||||||
@Target(ElementType.METHOD)
|
@Target(ElementType.METHOD)
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@Documented
|
@Documented
|
||||||
public @interface RepeatSubmit
|
public @interface RepeatSubmit {
|
||||||
{
|
|
||||||
|
/**
|
||||||
|
* 间隔时间(ms),小于此时间视为重复提交
|
||||||
|
*/
|
||||||
|
int interval() default 5000;
|
||||||
|
|
||||||
|
TimeUnit timeUnit() default TimeUnit.MILLISECONDS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提示消息 支持国际化 格式为 {code}
|
||||||
|
*/
|
||||||
|
String message() default "{repeat.submit.message}";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.ruoyi.common.annotation;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.ruoyi.common.enums.SensitiveStrategy;
|
||||||
|
import com.ruoyi.common.jackson.SensitiveJsonSerializer;
|
||||||
|
|
||||||
|
import java.lang.annotation.ElementType;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据脱敏注解
|
||||||
|
*
|
||||||
|
* @author zhujie
|
||||||
|
*/
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@Target(ElementType.FIELD)
|
||||||
|
@JacksonAnnotationsInside
|
||||||
|
@JsonSerialize(using = SensitiveJsonSerializer.class)
|
||||||
|
public @interface Sensitive {
|
||||||
|
SensitiveStrategy strategy();
|
||||||
|
}
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
package com.ruoyi.common.captcha;
|
||||||
|
|
||||||
|
import cn.hutool.captcha.generator.CodeGenerator;
|
||||||
|
import cn.hutool.core.math.Calculator;
|
||||||
|
import cn.hutool.core.util.CharUtil;
|
||||||
|
import cn.hutool.core.util.RandomUtil;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 无符号计算生成器
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
*/
|
||||||
|
public class UnsignedMathGenerator implements CodeGenerator {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -5514819971774091076L;
|
||||||
|
|
||||||
|
private static final String OPERATORS = "+-*";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 参与计算数字最大长度
|
||||||
|
*/
|
||||||
|
private final int numberLength;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构造
|
||||||
|
*/
|
||||||
|
public UnsignedMathGenerator() {
|
||||||
|
this(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构造
|
||||||
|
*
|
||||||
|
* @param numberLength 参与计算最大数字位数
|
||||||
|
*/
|
||||||
|
public UnsignedMathGenerator(int numberLength) {
|
||||||
|
this.numberLength = numberLength;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String generate() {
|
||||||
|
final int limit = getLimit();
|
||||||
|
int a = RandomUtil.randomInt(limit);
|
||||||
|
int b = RandomUtil.randomInt(limit);
|
||||||
|
String max = Integer.toString(Math.max(a,b));
|
||||||
|
String min = Integer.toString(Math.min(a,b));
|
||||||
|
max = StringUtils.rightPad(max, this.numberLength, CharUtil.SPACE);
|
||||||
|
min = StringUtils.rightPad(min, this.numberLength, CharUtil.SPACE);
|
||||||
|
|
||||||
|
return max + RandomUtil.randomChar(OPERATORS) + min + '=';
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean verify(String code, String userInputCode) {
|
||||||
|
int result;
|
||||||
|
try {
|
||||||
|
result = Integer.parseInt(userInputCode);
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
// 用户输入非数字
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
final int calculateResult = (int) Calculator.conversion(code);
|
||||||
|
return result == calculateResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取验证码长度
|
||||||
|
*
|
||||||
|
* @return 验证码长度
|
||||||
|
*/
|
||||||
|
public int getLength() {
|
||||||
|
return this.numberLength * 2 + 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据长度获取参与计算数字最大值
|
||||||
|
*
|
||||||
|
* @return 最大值
|
||||||
|
*/
|
||||||
|
private int getLimit() {
|
||||||
|
return Integer.parseInt("1" + StringUtils.repeat('0', this.numberLength));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,116 +1,54 @@
|
|||||||
package com.ruoyi.common.config;
|
package com.ruoyi.common.config;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.Getter;
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 读取项目相关配置
|
* 读取项目相关配置
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author Lion Li
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
@Component
|
@Component
|
||||||
@ConfigurationProperties(prefix = "ruoyi")
|
@ConfigurationProperties(prefix = "ruoyi")
|
||||||
public class RuoYiConfig
|
public class RuoYiConfig {
|
||||||
{
|
|
||||||
/** 项目名称 */
|
/**
|
||||||
|
* 项目名称
|
||||||
|
*/
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
/** 版本 */
|
/**
|
||||||
|
* 版本
|
||||||
|
*/
|
||||||
private String version;
|
private String version;
|
||||||
|
|
||||||
/** 版权年份 */
|
/**
|
||||||
|
* 版权年份
|
||||||
|
*/
|
||||||
private String copyrightYear;
|
private String copyrightYear;
|
||||||
|
|
||||||
/** 实例演示开关 */
|
/**
|
||||||
|
* 实例演示开关
|
||||||
|
*/
|
||||||
private boolean demoEnabled;
|
private boolean demoEnabled;
|
||||||
|
|
||||||
/** 上传路径 */
|
/**
|
||||||
private static String profile;
|
* 缓存懒加载
|
||||||
|
*/
|
||||||
|
private boolean cacheLazy;
|
||||||
|
|
||||||
/** 获取地址开关 */
|
/**
|
||||||
|
* 获取地址开关
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
private static boolean addressEnabled;
|
private static boolean addressEnabled;
|
||||||
|
|
||||||
public String getName()
|
public void setAddressEnabled(boolean addressEnabled) {
|
||||||
{
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setName(String name)
|
|
||||||
{
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getVersion()
|
|
||||||
{
|
|
||||||
return version;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setVersion(String version)
|
|
||||||
{
|
|
||||||
this.version = version;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCopyrightYear()
|
|
||||||
{
|
|
||||||
return copyrightYear;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCopyrightYear(String copyrightYear)
|
|
||||||
{
|
|
||||||
this.copyrightYear = copyrightYear;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isDemoEnabled()
|
|
||||||
{
|
|
||||||
return demoEnabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDemoEnabled(boolean demoEnabled)
|
|
||||||
{
|
|
||||||
this.demoEnabled = demoEnabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getProfile()
|
|
||||||
{
|
|
||||||
return profile;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setProfile(String profile)
|
|
||||||
{
|
|
||||||
RuoYiConfig.profile = profile;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean isAddressEnabled()
|
|
||||||
{
|
|
||||||
return addressEnabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAddressEnabled(boolean addressEnabled)
|
|
||||||
{
|
|
||||||
RuoYiConfig.addressEnabled = addressEnabled;
|
RuoYiConfig.addressEnabled = addressEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取头像上传路径
|
|
||||||
*/
|
|
||||||
public static String getAvatarPath()
|
|
||||||
{
|
|
||||||
return getProfile() + "/avatar";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取下载路径
|
|
||||||
*/
|
|
||||||
public static String getDownloadPath()
|
|
||||||
{
|
|
||||||
return getProfile() + "/download/";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取上传路径
|
|
||||||
*/
|
|
||||||
public static String getUploadPath()
|
|
||||||
{
|
|
||||||
return getProfile() + "/upload";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package com.ruoyi.common.constant;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 缓存的key 常量
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
*/
|
||||||
|
public interface CacheConstants {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 登录用户 redis key
|
||||||
|
*/
|
||||||
|
String LOGIN_TOKEN_KEY = "Authorization:login:token:";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 在线用户 redis key
|
||||||
|
*/
|
||||||
|
String ONLINE_TOKEN_KEY = "online_tokens:";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验证码 redis key
|
||||||
|
*/
|
||||||
|
String CAPTCHA_CODE_KEY = "captcha_codes:";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 参数管理 cache key
|
||||||
|
*/
|
||||||
|
String SYS_CONFIG_KEY = "sys_config:";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字典管理 cache key
|
||||||
|
*/
|
||||||
|
String SYS_DICT_KEY = "sys_dict:";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 防重提交 redis key
|
||||||
|
*/
|
||||||
|
String REPEAT_SUBMIT_KEY = "repeat_submit:";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 限流 redis key
|
||||||
|
*/
|
||||||
|
String RATE_LIMIT_KEY = "rate_limit:";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 登录账户密码错误次数 redis key
|
||||||
|
*/
|
||||||
|
String PWD_ERR_CNT_KEY = "pwd_err_cnt:";
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
package com.ruoyi.common.constant;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 缓存组名称常量
|
||||||
|
* <p>
|
||||||
|
* key 格式为 cacheNames#ttl#maxIdleTime#maxSize
|
||||||
|
* <p>
|
||||||
|
* ttl 过期时间 如果设置为0则不过期 默认为0
|
||||||
|
* maxIdleTime 最大空闲时间 根据LRU算法清理空闲数据 如果设置为0则不检测 默认为0
|
||||||
|
* maxSize 组最大长度 根据LRU算法清理溢出数据 如果设置为0则无限长 默认为0
|
||||||
|
* <p>
|
||||||
|
* 例子: test#60s、test#0#60s、test#0#1m#1000、test#1h#0#500
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
*/
|
||||||
|
public interface CacheNames {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 演示案例
|
||||||
|
*/
|
||||||
|
String DEMO_CACHE = "demo:cache#60s#10m#20";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统配置
|
||||||
|
*/
|
||||||
|
String SYS_CONFIG = "sys_config";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据字典
|
||||||
|
*/
|
||||||
|
String SYS_DICT = "sys_dict";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OSS内容
|
||||||
|
*/
|
||||||
|
String SYS_OSS = "sys_oss#30d";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OSS配置
|
||||||
|
*/
|
||||||
|
String SYS_OSS_CONFIG = "sys_oss_config";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 在线用户
|
||||||
|
*/
|
||||||
|
String ONLINE_TOKEN = "online_tokens";
|
||||||
|
|
||||||
|
}
|
||||||
@@ -5,125 +5,72 @@ package com.ruoyi.common.constant;
|
|||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
public class Constants
|
public interface Constants {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* UTF-8 字符集
|
* UTF-8 字符集
|
||||||
*/
|
*/
|
||||||
public static final String UTF8 = "UTF-8";
|
String UTF8 = "UTF-8";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GBK 字符集
|
* GBK 字符集
|
||||||
*/
|
*/
|
||||||
public static final String GBK = "GBK";
|
String GBK = "GBK";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* www主域
|
||||||
|
*/
|
||||||
|
String WWW = "www.";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* http请求
|
* http请求
|
||||||
*/
|
*/
|
||||||
public static final String HTTP = "http://";
|
String HTTP = "http://";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* https请求
|
* https请求
|
||||||
*/
|
*/
|
||||||
public static final String HTTPS = "https://";
|
String HTTPS = "https://";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通用成功标识
|
* 通用成功标识
|
||||||
*/
|
*/
|
||||||
public static final String SUCCESS = "0";
|
String SUCCESS = "0";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通用失败标识
|
* 通用失败标识
|
||||||
*/
|
*/
|
||||||
public static final String FAIL = "1";
|
String FAIL = "1";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登录成功
|
* 登录成功
|
||||||
*/
|
*/
|
||||||
public static final String LOGIN_SUCCESS = "Success";
|
String LOGIN_SUCCESS = "Success";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 注销
|
* 注销
|
||||||
*/
|
*/
|
||||||
public static final String LOGOUT = "Logout";
|
String LOGOUT = "Logout";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 注册
|
||||||
|
*/
|
||||||
|
String REGISTER = "Register";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登录失败
|
* 登录失败
|
||||||
*/
|
*/
|
||||||
public static final String LOGIN_FAIL = "Error";
|
String LOGIN_FAIL = "Error";
|
||||||
|
|
||||||
/**
|
|
||||||
* 验证码 redis key
|
|
||||||
*/
|
|
||||||
public static final String CAPTCHA_CODE_KEY = "captcha_codes:";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 登录用户 redis key
|
|
||||||
*/
|
|
||||||
public static final String LOGIN_TOKEN_KEY = "login_tokens:";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 防重提交 redis key
|
|
||||||
*/
|
|
||||||
public static final String REPEAT_SUBMIT_KEY = "repeat_submit:";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 验证码有效期(分钟)
|
* 验证码有效期(分钟)
|
||||||
*/
|
*/
|
||||||
public static final Integer CAPTCHA_EXPIRATION = 2;
|
Integer CAPTCHA_EXPIRATION = 2;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 令牌
|
* 令牌
|
||||||
*/
|
*/
|
||||||
public static final String TOKEN = "token";
|
String TOKEN = "token";
|
||||||
|
|
||||||
/**
|
|
||||||
* 令牌前缀
|
|
||||||
*/
|
|
||||||
public static final String TOKEN_PREFIX = "Bearer ";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 令牌前缀
|
|
||||||
*/
|
|
||||||
public static final String LOGIN_USER_KEY = "login_user_key";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户ID
|
|
||||||
*/
|
|
||||||
public static final String JWT_USERID = "userid";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户名称
|
|
||||||
*/
|
|
||||||
public static final String JWT_USERNAME = "sub";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户头像
|
|
||||||
*/
|
|
||||||
public static final String JWT_AVATAR = "avatar";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建时间
|
|
||||||
*/
|
|
||||||
public static final String JWT_CREATED = "created";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户权限
|
|
||||||
*/
|
|
||||||
public static final String JWT_AUTHORITIES = "authorities";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 参数管理 cache key
|
|
||||||
*/
|
|
||||||
public static final String SYS_CONFIG_KEY = "sys_config:";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 字典管理 cache key
|
|
||||||
*/
|
|
||||||
public static final String SYS_DICT_KEY = "sys_dict:";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 资源映射路径 前缀
|
|
||||||
*/
|
|
||||||
public static final String RESOURCE_PREFIX = "/profile";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,110 +5,189 @@ package com.ruoyi.common.constant;
|
|||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
public class GenConstants
|
public interface GenConstants {
|
||||||
{
|
/**
|
||||||
/** 单表(增删改查) */
|
* 单表(增删改查)
|
||||||
public static final String TPL_CRUD = "crud";
|
*/
|
||||||
|
String TPL_CRUD = "crud";
|
||||||
|
|
||||||
/** 树表(增删改查) */
|
/**
|
||||||
public static final String TPL_TREE = "tree";
|
* 树表(增删改查)
|
||||||
|
*/
|
||||||
|
String TPL_TREE = "tree";
|
||||||
|
|
||||||
/** 主子表(增删改查) */
|
/**
|
||||||
public static final String TPL_SUB = "sub";
|
* 主子表(增删改查)
|
||||||
|
*/
|
||||||
|
String TPL_SUB = "sub";
|
||||||
|
|
||||||
/** 树编码字段 */
|
/**
|
||||||
public static final String TREE_CODE = "treeCode";
|
* 树编码字段
|
||||||
|
*/
|
||||||
|
String TREE_CODE = "treeCode";
|
||||||
|
|
||||||
/** 树父编码字段 */
|
/**
|
||||||
public static final String TREE_PARENT_CODE = "treeParentCode";
|
* 树父编码字段
|
||||||
|
*/
|
||||||
|
String TREE_PARENT_CODE = "treeParentCode";
|
||||||
|
|
||||||
/** 树名称字段 */
|
/**
|
||||||
public static final String TREE_NAME = "treeName";
|
* 树名称字段
|
||||||
|
*/
|
||||||
|
String TREE_NAME = "treeName";
|
||||||
|
|
||||||
/** 上级菜单ID字段 */
|
/**
|
||||||
public static final String PARENT_MENU_ID = "parentMenuId";
|
* 上级菜单ID字段
|
||||||
|
*/
|
||||||
|
String PARENT_MENU_ID = "parentMenuId";
|
||||||
|
|
||||||
/** 上级菜单名称字段 */
|
/**
|
||||||
public static final String PARENT_MENU_NAME = "parentMenuName";
|
* 上级菜单名称字段
|
||||||
|
*/
|
||||||
|
String PARENT_MENU_NAME = "parentMenuName";
|
||||||
|
|
||||||
/** 数据库字符串类型 */
|
/**
|
||||||
public static final String[] COLUMNTYPE_STR = { "char", "varchar", "nvarchar", "varchar2" };
|
* 数据库字符串类型
|
||||||
|
*/
|
||||||
|
String[] COLUMNTYPE_STR = {"char", "varchar", "nvarchar", "varchar2"};
|
||||||
|
|
||||||
/** 数据库文本类型 */
|
/**
|
||||||
public static final String[] COLUMNTYPE_TEXT = { "tinytext", "text", "mediumtext", "longtext" };
|
* 数据库文本类型
|
||||||
|
*/
|
||||||
|
String[] COLUMNTYPE_TEXT = {"tinytext", "text", "mediumtext", "longtext"};
|
||||||
|
|
||||||
/** 数据库时间类型 */
|
/**
|
||||||
public static final String[] COLUMNTYPE_TIME = { "datetime", "time", "date", "timestamp" };
|
* 数据库时间类型
|
||||||
|
*/
|
||||||
|
String[] COLUMNTYPE_TIME = {"datetime", "time", "date", "timestamp"};
|
||||||
|
|
||||||
/** 数据库数字类型 */
|
/**
|
||||||
public static final String[] COLUMNTYPE_NUMBER = { "tinyint", "smallint", "mediumint", "int", "number", "integer",
|
* 数据库数字类型
|
||||||
|
*/
|
||||||
|
String[] COLUMNTYPE_NUMBER = {"tinyint", "smallint", "mediumint", "int", "number", "integer",
|
||||||
"bit", "bigint", "float", "double", "decimal"};
|
"bit", "bigint", "float", "double", "decimal"};
|
||||||
|
|
||||||
/** 页面不需要编辑字段 */
|
/**
|
||||||
public static final String[] COLUMNNAME_NOT_EDIT = { "id", "create_by", "create_time", "del_flag" };
|
* BO对象 不需要添加字段
|
||||||
|
*/
|
||||||
|
String[] COLUMNNAME_NOT_ADD = {"create_by", "create_time", "del_flag", "update_by",
|
||||||
|
"update_time", "version"};
|
||||||
|
|
||||||
/** 页面不需要显示的列表字段 */
|
/**
|
||||||
public static final String[] COLUMNNAME_NOT_LIST = { "id", "create_by", "create_time", "del_flag", "update_by",
|
* BO对象 不需要编辑字段
|
||||||
"update_time" };
|
*/
|
||||||
|
String[] COLUMNNAME_NOT_EDIT = {"create_by", "create_time", "del_flag", "update_by",
|
||||||
|
"update_time", "version"};
|
||||||
|
|
||||||
/** 页面不需要查询字段 */
|
/**
|
||||||
public static final String[] COLUMNNAME_NOT_QUERY = { "id", "create_by", "create_time", "del_flag", "update_by",
|
* VO对象 不需要返回字段
|
||||||
"update_time", "remark" };
|
*/
|
||||||
|
String[] COLUMNNAME_NOT_LIST = {"create_by", "create_time", "del_flag", "update_by",
|
||||||
|
"update_time", "version"};
|
||||||
|
|
||||||
/** Entity基类字段 */
|
/**
|
||||||
public static final String[] BASE_ENTITY = { "createBy", "createTime", "updateBy", "updateTime", "remark" };
|
* BO对象 不需要查询字段
|
||||||
|
*/
|
||||||
|
String[] COLUMNNAME_NOT_QUERY = {"id", "create_by", "create_time", "del_flag", "update_by",
|
||||||
|
"update_time", "remark", "version"};
|
||||||
|
|
||||||
/** Tree基类字段 */
|
/**
|
||||||
public static final String[] TREE_ENTITY = { "parentName", "parentId", "orderNum", "ancestors", "children" };
|
* Entity基类字段
|
||||||
|
*/
|
||||||
|
String[] BASE_ENTITY = {"createBy", "createTime", "updateBy", "updateTime"};
|
||||||
|
|
||||||
/** 文本框 */
|
/**
|
||||||
public static final String HTML_INPUT = "input";
|
* Tree基类字段
|
||||||
|
*/
|
||||||
|
String[] TREE_ENTITY = {"parentName", "parentId", "children"};
|
||||||
|
|
||||||
/** 文本域 */
|
/**
|
||||||
public static final String HTML_TEXTAREA = "textarea";
|
* 文本框
|
||||||
|
*/
|
||||||
|
String HTML_INPUT = "input";
|
||||||
|
|
||||||
/** 下拉框 */
|
/**
|
||||||
public static final String HTML_SELECT = "select";
|
* 文本域
|
||||||
|
*/
|
||||||
|
String HTML_TEXTAREA = "textarea";
|
||||||
|
|
||||||
/** 单选框 */
|
/**
|
||||||
public static final String HTML_RADIO = "radio";
|
* 下拉框
|
||||||
|
*/
|
||||||
|
String HTML_SELECT = "select";
|
||||||
|
|
||||||
/** 复选框 */
|
/**
|
||||||
public static final String HTML_CHECKBOX = "checkbox";
|
* 单选框
|
||||||
|
*/
|
||||||
|
String HTML_RADIO = "radio";
|
||||||
|
|
||||||
/** 日期控件 */
|
/**
|
||||||
public static final String HTML_DATETIME = "datetime";
|
* 复选框
|
||||||
|
*/
|
||||||
|
String HTML_CHECKBOX = "checkbox";
|
||||||
|
|
||||||
/** 图片上传控件 */
|
/**
|
||||||
public static final String HTML_IMAGE_UPLOAD = "imageUpload";
|
* 日期控件
|
||||||
|
*/
|
||||||
|
String HTML_DATETIME = "datetime";
|
||||||
|
|
||||||
/** 文件上传控件 */
|
/**
|
||||||
public static final String HTML_FILE_UPLOAD = "fileUpload";
|
* 图片上传控件
|
||||||
|
*/
|
||||||
|
String HTML_IMAGE_UPLOAD = "imageUpload";
|
||||||
|
|
||||||
/** 富文本控件 */
|
/**
|
||||||
public static final String HTML_EDITOR = "editor";
|
* 文件上传控件
|
||||||
|
*/
|
||||||
|
String HTML_FILE_UPLOAD = "fileUpload";
|
||||||
|
|
||||||
/** 字符串类型 */
|
/**
|
||||||
public static final String TYPE_STRING = "String";
|
* 富文本控件
|
||||||
|
*/
|
||||||
|
String HTML_EDITOR = "editor";
|
||||||
|
|
||||||
/** 整型 */
|
/**
|
||||||
public static final String TYPE_INTEGER = "Integer";
|
* 字符串类型
|
||||||
|
*/
|
||||||
|
String TYPE_STRING = "String";
|
||||||
|
|
||||||
/** 长整型 */
|
/**
|
||||||
public static final String TYPE_LONG = "Long";
|
* 整型
|
||||||
|
*/
|
||||||
|
String TYPE_INTEGER = "Integer";
|
||||||
|
|
||||||
/** 浮点型 */
|
/**
|
||||||
public static final String TYPE_DOUBLE = "Double";
|
* 长整型
|
||||||
|
*/
|
||||||
|
String TYPE_LONG = "Long";
|
||||||
|
|
||||||
/** 高精度计算类型 */
|
/**
|
||||||
public static final String TYPE_BIGDECIMAL = "BigDecimal";
|
* 浮点型
|
||||||
|
*/
|
||||||
|
String TYPE_DOUBLE = "Double";
|
||||||
|
|
||||||
/** 时间类型 */
|
/**
|
||||||
public static final String TYPE_DATE = "Date";
|
* 高精度计算类型
|
||||||
|
*/
|
||||||
|
String TYPE_BIGDECIMAL = "BigDecimal";
|
||||||
|
|
||||||
/** 模糊查询 */
|
/**
|
||||||
public static final String QUERY_LIKE = "LIKE";
|
* 时间类型
|
||||||
|
*/
|
||||||
|
String TYPE_DATE = "Date";
|
||||||
|
|
||||||
/** 需要 */
|
/**
|
||||||
public static final String REQUIRE = "1";
|
* 模糊查询
|
||||||
|
*/
|
||||||
|
String QUERY_LIKE = "LIKE";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 相等查询
|
||||||
|
*/
|
||||||
|
String QUERY_EQ = "EQ";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 需要
|
||||||
|
*/
|
||||||
|
String REQUIRE = "1";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,87 +3,91 @@ package com.ruoyi.common.constant;
|
|||||||
/**
|
/**
|
||||||
* 返回状态码
|
* 返回状态码
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author Lion Li
|
||||||
*/
|
*/
|
||||||
public class HttpStatus
|
public interface HttpStatus {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* 操作成功
|
* 操作成功
|
||||||
*/
|
*/
|
||||||
public static final int SUCCESS = 200;
|
int SUCCESS = 200;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 对象创建成功
|
* 对象创建成功
|
||||||
*/
|
*/
|
||||||
public static final int CREATED = 201;
|
int CREATED = 201;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请求已经被接受
|
* 请求已经被接受
|
||||||
*/
|
*/
|
||||||
public static final int ACCEPTED = 202;
|
int ACCEPTED = 202;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 操作已经执行成功,但是没有返回数据
|
* 操作已经执行成功,但是没有返回数据
|
||||||
*/
|
*/
|
||||||
public static final int NO_CONTENT = 204;
|
int NO_CONTENT = 204;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 资源已被移除
|
* 资源已被移除
|
||||||
*/
|
*/
|
||||||
public static final int MOVED_PERM = 301;
|
int MOVED_PERM = 301;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 重定向
|
* 重定向
|
||||||
*/
|
*/
|
||||||
public static final int SEE_OTHER = 303;
|
int SEE_OTHER = 303;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 资源没有被修改
|
* 资源没有被修改
|
||||||
*/
|
*/
|
||||||
public static final int NOT_MODIFIED = 304;
|
int NOT_MODIFIED = 304;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 参数列表错误(缺少,格式不匹配)
|
* 参数列表错误(缺少,格式不匹配)
|
||||||
*/
|
*/
|
||||||
public static final int BAD_REQUEST = 400;
|
int BAD_REQUEST = 400;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 未授权
|
* 未授权
|
||||||
*/
|
*/
|
||||||
public static final int UNAUTHORIZED = 401;
|
int UNAUTHORIZED = 401;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 访问受限,授权过期
|
* 访问受限,授权过期
|
||||||
*/
|
*/
|
||||||
public static final int FORBIDDEN = 403;
|
int FORBIDDEN = 403;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 资源,服务未找到
|
* 资源,服务未找到
|
||||||
*/
|
*/
|
||||||
public static final int NOT_FOUND = 404;
|
int NOT_FOUND = 404;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 不允许的http方法
|
* 不允许的http方法
|
||||||
*/
|
*/
|
||||||
public static final int BAD_METHOD = 405;
|
int BAD_METHOD = 405;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 资源冲突,或者资源被锁
|
* 资源冲突,或者资源被锁
|
||||||
*/
|
*/
|
||||||
public static final int CONFLICT = 409;
|
int CONFLICT = 409;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 不支持的数据,媒体类型
|
* 不支持的数据,媒体类型
|
||||||
*/
|
*/
|
||||||
public static final int UNSUPPORTED_TYPE = 415;
|
int UNSUPPORTED_TYPE = 415;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统内部错误
|
* 系统内部错误
|
||||||
*/
|
*/
|
||||||
public static final int ERROR = 500;
|
int ERROR = 500;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 接口未实现
|
* 接口未实现
|
||||||
*/
|
*/
|
||||||
public static final int NOT_IMPLEMENTED = 501;
|
int NOT_IMPLEMENTED = 501;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统警告消息
|
||||||
|
*/
|
||||||
|
int WARN = 601;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,50 +0,0 @@
|
|||||||
package com.ruoyi.common.constant;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 任务调度通用常量
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
*/
|
|
||||||
public class ScheduleConstants
|
|
||||||
{
|
|
||||||
public static final String TASK_CLASS_NAME = "TASK_CLASS_NAME";
|
|
||||||
|
|
||||||
/** 执行目标key */
|
|
||||||
public static final String TASK_PROPERTIES = "TASK_PROPERTIES";
|
|
||||||
|
|
||||||
/** 默认 */
|
|
||||||
public static final String MISFIRE_DEFAULT = "0";
|
|
||||||
|
|
||||||
/** 立即触发执行 */
|
|
||||||
public static final String MISFIRE_IGNORE_MISFIRES = "1";
|
|
||||||
|
|
||||||
/** 触发一次执行 */
|
|
||||||
public static final String MISFIRE_FIRE_AND_PROCEED = "2";
|
|
||||||
|
|
||||||
/** 不触发立即执行 */
|
|
||||||
public static final String MISFIRE_DO_NOTHING = "3";
|
|
||||||
|
|
||||||
public enum Status
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* 正常
|
|
||||||
*/
|
|
||||||
NORMAL("0"),
|
|
||||||
/**
|
|
||||||
* 暂停
|
|
||||||
*/
|
|
||||||
PAUSE("1");
|
|
||||||
|
|
||||||
private String value;
|
|
||||||
|
|
||||||
private Status(String value)
|
|
||||||
{
|
|
||||||
this.value = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getValue()
|
|
||||||
{
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -5,59 +5,134 @@ package com.ruoyi.common.constant;
|
|||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
public class UserConstants
|
public interface UserConstants {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* 平台内系统用户的唯一标志
|
* 平台内系统用户的唯一标志
|
||||||
*/
|
*/
|
||||||
public static final String SYS_USER = "SYS_USER";
|
String SYS_USER = "SYS_USER";
|
||||||
|
|
||||||
/** 正常状态 */
|
/**
|
||||||
public static final String NORMAL = "0";
|
* 正常状态
|
||||||
|
*/
|
||||||
|
String NORMAL = "0";
|
||||||
|
|
||||||
/** 异常状态 */
|
/**
|
||||||
public static final String EXCEPTION = "1";
|
* 异常状态
|
||||||
|
*/
|
||||||
|
String EXCEPTION = "1";
|
||||||
|
|
||||||
/** 用户封禁状态 */
|
/**
|
||||||
public static final String USER_DISABLE = "1";
|
* 用户正常状态
|
||||||
|
*/
|
||||||
|
String USER_NORMAL = "0";
|
||||||
|
|
||||||
/** 角色封禁状态 */
|
/**
|
||||||
public static final String ROLE_DISABLE = "1";
|
* 用户封禁状态
|
||||||
|
*/
|
||||||
|
String USER_DISABLE = "1";
|
||||||
|
|
||||||
/** 部门正常状态 */
|
/**
|
||||||
public static final String DEPT_NORMAL = "0";
|
* 角色正常状态
|
||||||
|
*/
|
||||||
|
String ROLE_NORMAL = "0";
|
||||||
|
|
||||||
/** 部门停用状态 */
|
/**
|
||||||
public static final String DEPT_DISABLE = "1";
|
* 角色封禁状态
|
||||||
|
*/
|
||||||
|
String ROLE_DISABLE = "1";
|
||||||
|
|
||||||
/** 字典正常状态 */
|
/**
|
||||||
public static final String DICT_NORMAL = "0";
|
* 部门正常状态
|
||||||
|
*/
|
||||||
|
String DEPT_NORMAL = "0";
|
||||||
|
|
||||||
/** 是否为系统默认(是) */
|
/**
|
||||||
public static final String YES = "Y";
|
* 部门停用状态
|
||||||
|
*/
|
||||||
|
String DEPT_DISABLE = "1";
|
||||||
|
|
||||||
/** 是否菜单外链(是) */
|
/**
|
||||||
public static final String YES_FRAME = "0";
|
* 字典正常状态
|
||||||
|
*/
|
||||||
|
String DICT_NORMAL = "0";
|
||||||
|
|
||||||
/** 是否菜单外链(否) */
|
/**
|
||||||
public static final String NO_FRAME = "1";
|
* 是否为系统默认(是)
|
||||||
|
*/
|
||||||
|
String YES = "Y";
|
||||||
|
|
||||||
/** 菜单类型(目录) */
|
/**
|
||||||
public static final String TYPE_DIR = "M";
|
* 是否菜单外链(是)
|
||||||
|
*/
|
||||||
|
String YES_FRAME = "0";
|
||||||
|
|
||||||
/** 菜单类型(菜单) */
|
/**
|
||||||
public static final String TYPE_MENU = "C";
|
* 是否菜单外链(否)
|
||||||
|
*/
|
||||||
|
String NO_FRAME = "1";
|
||||||
|
|
||||||
/** 菜单类型(按钮) */
|
/**
|
||||||
public static final String TYPE_BUTTON = "F";
|
* 菜单正常状态
|
||||||
|
*/
|
||||||
|
String MENU_NORMAL = "0";
|
||||||
|
|
||||||
/** Layout组件标识 */
|
/**
|
||||||
public final static String LAYOUT = "Layout";
|
* 菜单停用状态
|
||||||
|
*/
|
||||||
|
String MENU_DISABLE = "1";
|
||||||
|
|
||||||
/** ParentView组件标识 */
|
/**
|
||||||
public final static String PARENT_VIEW = "ParentView";
|
* 菜单类型(目录)
|
||||||
|
*/
|
||||||
|
String TYPE_DIR = "M";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 菜单类型(菜单)
|
||||||
|
*/
|
||||||
|
String TYPE_MENU = "C";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 菜单类型(按钮)
|
||||||
|
*/
|
||||||
|
String TYPE_BUTTON = "F";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Layout组件标识
|
||||||
|
*/
|
||||||
|
String LAYOUT = "Layout";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ParentView组件标识
|
||||||
|
*/
|
||||||
|
String PARENT_VIEW = "ParentView";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* InnerLink组件标识
|
||||||
|
*/
|
||||||
|
String INNER_LINK = "InnerLink";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验返回结果码
|
||||||
|
*/
|
||||||
|
String UNIQUE = "0";
|
||||||
|
String NOT_UNIQUE = "1";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户名长度限制
|
||||||
|
*/
|
||||||
|
int USERNAME_MIN_LENGTH = 2;
|
||||||
|
int USERNAME_MAX_LENGTH = 20;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 密码长度限制
|
||||||
|
*/
|
||||||
|
int PASSWORD_MIN_LENGTH = 5;
|
||||||
|
int PASSWORD_MAX_LENGTH = 20;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 管理员ID
|
||||||
|
*/
|
||||||
|
Long ADMIN_ID = 1L;
|
||||||
|
|
||||||
/** 校验返回结果码 */
|
|
||||||
public final static String UNIQUE = "0";
|
|
||||||
public final static String NOT_UNIQUE = "1";
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
package com.ruoyi.common.convert;
|
||||||
|
|
||||||
|
import cn.hutool.core.convert.Convert;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.alibaba.excel.converters.Converter;
|
||||||
|
import com.alibaba.excel.enums.CellDataTypeEnum;
|
||||||
|
import com.alibaba.excel.metadata.GlobalConfiguration;
|
||||||
|
import com.alibaba.excel.metadata.data.ReadCellData;
|
||||||
|
import com.alibaba.excel.metadata.data.WriteCellData;
|
||||||
|
import com.alibaba.excel.metadata.property.ExcelContentProperty;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 大数值转换
|
||||||
|
* Excel 数值长度位15位 大于15位的数值转换位字符串
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
public class ExcelBigNumberConvert implements Converter<Long> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class<Long> supportJavaTypeKey() {
|
||||||
|
return Long.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CellDataTypeEnum supportExcelTypeKey() {
|
||||||
|
return CellDataTypeEnum.STRING;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long convertToJavaData(ReadCellData<?> cellData, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) {
|
||||||
|
return Convert.toLong(cellData.getData());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WriteCellData<Object> convertToExcelData(Long object, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) {
|
||||||
|
if (ObjectUtil.isNotNull(object)) {
|
||||||
|
String str = Convert.toStr(object);
|
||||||
|
if (str.length() > 15) {
|
||||||
|
return new WriteCellData<>(str);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
WriteCellData<Object> cellData = new WriteCellData<>(new BigDecimal(object));
|
||||||
|
cellData.setType(CellDataTypeEnum.NUMBER);
|
||||||
|
return cellData;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
package com.ruoyi.common.convert;
|
||||||
|
|
||||||
|
import cn.hutool.core.annotation.AnnotationUtil;
|
||||||
|
import cn.hutool.core.convert.Convert;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.alibaba.excel.converters.Converter;
|
||||||
|
import com.alibaba.excel.enums.CellDataTypeEnum;
|
||||||
|
import com.alibaba.excel.metadata.GlobalConfiguration;
|
||||||
|
import com.alibaba.excel.metadata.data.ReadCellData;
|
||||||
|
import com.alibaba.excel.metadata.data.WriteCellData;
|
||||||
|
import com.alibaba.excel.metadata.property.ExcelContentProperty;
|
||||||
|
import com.ruoyi.common.annotation.ExcelDictFormat;
|
||||||
|
import com.ruoyi.common.core.service.DictService;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字典格式化转换处理
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
public class ExcelDictConvert implements Converter<Object> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class<Object> supportJavaTypeKey() {
|
||||||
|
return Object.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CellDataTypeEnum supportExcelTypeKey() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object convertToJavaData(ReadCellData<?> cellData, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) {
|
||||||
|
ExcelDictFormat anno = getAnnotation(contentProperty.getField());
|
||||||
|
String type = anno.dictType();
|
||||||
|
String label = cellData.getStringValue();
|
||||||
|
String value;
|
||||||
|
if (StringUtils.isBlank(type)) {
|
||||||
|
value = ExcelUtil.reverseByExp(label, anno.readConverterExp(), anno.separator());
|
||||||
|
} else {
|
||||||
|
value = SpringUtils.getBean(DictService.class).getDictValue(type, label, anno.separator());
|
||||||
|
}
|
||||||
|
return Convert.convert(contentProperty.getField().getType(), value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WriteCellData<String> convertToExcelData(Object object, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) {
|
||||||
|
if (ObjectUtil.isNull(object)) {
|
||||||
|
return new WriteCellData<>("");
|
||||||
|
}
|
||||||
|
ExcelDictFormat anno = getAnnotation(contentProperty.getField());
|
||||||
|
String type = anno.dictType();
|
||||||
|
String value = Convert.toStr(object);
|
||||||
|
String label;
|
||||||
|
if (StringUtils.isBlank(type)) {
|
||||||
|
label = ExcelUtil.convertByExp(value, anno.readConverterExp(), anno.separator());
|
||||||
|
} else {
|
||||||
|
label = SpringUtils.getBean(DictService.class).getDictLabel(type, value, anno.separator());
|
||||||
|
}
|
||||||
|
return new WriteCellData<>(label);
|
||||||
|
}
|
||||||
|
|
||||||
|
private ExcelDictFormat getAnnotation(Field field) {
|
||||||
|
return AnnotationUtil.getAnnotation(field, ExcelDictFormat.class);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,77 +1,16 @@
|
|||||||
package com.ruoyi.common.core.controller;
|
package com.ruoyi.common.core.controller;
|
||||||
|
|
||||||
import java.beans.PropertyEditorSupport;
|
import com.ruoyi.common.core.domain.R;
|
||||||
import java.util.Date;
|
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||||
import java.util.List;
|
import com.ruoyi.common.helper.LoginHelper;
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.web.bind.WebDataBinder;
|
|
||||||
import org.springframework.web.bind.annotation.InitBinder;
|
|
||||||
import com.github.pagehelper.PageHelper;
|
|
||||||
import com.github.pagehelper.PageInfo;
|
|
||||||
import com.ruoyi.common.constant.HttpStatus;
|
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
|
||||||
import com.ruoyi.common.core.page.PageDomain;
|
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
|
||||||
import com.ruoyi.common.core.page.TableSupport;
|
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.common.utils.sql.SqlUtil;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* web层通用数据处理
|
* web层通用数据处理
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author Lion Li
|
||||||
*/
|
*/
|
||||||
public class BaseController
|
public class BaseController {
|
||||||
{
|
|
||||||
protected final Logger logger = LoggerFactory.getLogger(this.getClass());
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 将前台传递过来的日期格式的字符串,自动转化为Date类型
|
|
||||||
*/
|
|
||||||
@InitBinder
|
|
||||||
public void initBinder(WebDataBinder binder)
|
|
||||||
{
|
|
||||||
// Date 类型转换
|
|
||||||
binder.registerCustomEditor(Date.class, new PropertyEditorSupport()
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public void setAsText(String text)
|
|
||||||
{
|
|
||||||
setValue(DateUtils.parseDate(text));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置请求分页数据
|
|
||||||
*/
|
|
||||||
protected void startPage()
|
|
||||||
{
|
|
||||||
PageDomain pageDomain = TableSupport.buildPageRequest();
|
|
||||||
Integer pageNum = pageDomain.getPageNum();
|
|
||||||
Integer pageSize = pageDomain.getPageSize();
|
|
||||||
if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize))
|
|
||||||
{
|
|
||||||
String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
|
|
||||||
PageHelper.startPage(pageNum, pageSize, orderBy);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 响应请求分页数据
|
|
||||||
*/
|
|
||||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
|
||||||
protected TableDataInfo getDataTable(List<?> list)
|
|
||||||
{
|
|
||||||
TableDataInfo rspData = new TableDataInfo();
|
|
||||||
rspData.setCode(HttpStatus.SUCCESS);
|
|
||||||
rspData.setMsg("查询成功");
|
|
||||||
rspData.setRows(list);
|
|
||||||
rspData.setTotal(new PageInfo(list).getTotal());
|
|
||||||
return rspData;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 响应返回结果
|
* 响应返回结果
|
||||||
@@ -79,9 +18,8 @@ public class BaseController
|
|||||||
* @param rows 影响行数
|
* @param rows 影响行数
|
||||||
* @return 操作结果
|
* @return 操作结果
|
||||||
*/
|
*/
|
||||||
protected AjaxResult toAjax(int rows)
|
protected R<Void> toAjax(int rows) {
|
||||||
{
|
return rows > 0 ? R.ok() : R.fail();
|
||||||
return rows > 0 ? AjaxResult.success() : AjaxResult.error();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -90,48 +28,42 @@ public class BaseController
|
|||||||
* @param result 结果
|
* @param result 结果
|
||||||
* @return 操作结果
|
* @return 操作结果
|
||||||
*/
|
*/
|
||||||
protected AjaxResult toAjax(boolean result)
|
protected R<Void> toAjax(boolean result) {
|
||||||
{
|
return result ? R.ok() : R.fail();
|
||||||
return result ? success() : error();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 返回成功
|
|
||||||
*/
|
|
||||||
public AjaxResult success()
|
|
||||||
{
|
|
||||||
return AjaxResult.success();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 返回失败消息
|
|
||||||
*/
|
|
||||||
public AjaxResult error()
|
|
||||||
{
|
|
||||||
return AjaxResult.error();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 返回成功消息
|
|
||||||
*/
|
|
||||||
public AjaxResult success(String message)
|
|
||||||
{
|
|
||||||
return AjaxResult.success(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 返回失败消息
|
|
||||||
*/
|
|
||||||
public AjaxResult error(String message)
|
|
||||||
{
|
|
||||||
return AjaxResult.error(message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页面跳转
|
* 页面跳转
|
||||||
*/
|
*/
|
||||||
public String redirect(String url)
|
public String redirect(String url) {
|
||||||
{
|
|
||||||
return StringUtils.format("redirect:{}", url);
|
return StringUtils.format("redirect:{}", url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户缓存信息
|
||||||
|
*/
|
||||||
|
public LoginUser getLoginUser() {
|
||||||
|
return LoginHelper.getLoginUser();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取登录用户id
|
||||||
|
*/
|
||||||
|
public Long getUserId() {
|
||||||
|
return LoginHelper.getUserId();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取登录部门id
|
||||||
|
*/
|
||||||
|
public Long getDeptId() {
|
||||||
|
return LoginHelper.getDeptId();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取登录用户名
|
||||||
|
*/
|
||||||
|
public String getUsername() {
|
||||||
|
return LoginHelper.getUsername();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,148 +0,0 @@
|
|||||||
package com.ruoyi.common.core.domain;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import com.ruoyi.common.constant.HttpStatus;
|
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 操作消息提醒
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
*/
|
|
||||||
public class AjaxResult extends HashMap<String, Object>
|
|
||||||
{
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** 状态码 */
|
|
||||||
public static final String CODE_TAG = "code";
|
|
||||||
|
|
||||||
/** 返回内容 */
|
|
||||||
public static final String MSG_TAG = "msg";
|
|
||||||
|
|
||||||
/** 数据对象 */
|
|
||||||
public static final String DATA_TAG = "data";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 初始化一个新创建的 AjaxResult 对象,使其表示一个空消息。
|
|
||||||
*/
|
|
||||||
public AjaxResult()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 初始化一个新创建的 AjaxResult 对象
|
|
||||||
*
|
|
||||||
* @param code 状态码
|
|
||||||
* @param msg 返回内容
|
|
||||||
*/
|
|
||||||
public AjaxResult(int code, String msg)
|
|
||||||
{
|
|
||||||
super.put(CODE_TAG, code);
|
|
||||||
super.put(MSG_TAG, msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 初始化一个新创建的 AjaxResult 对象
|
|
||||||
*
|
|
||||||
* @param code 状态码
|
|
||||||
* @param msg 返回内容
|
|
||||||
* @param data 数据对象
|
|
||||||
*/
|
|
||||||
public AjaxResult(int code, String msg, Object data)
|
|
||||||
{
|
|
||||||
super.put(CODE_TAG, code);
|
|
||||||
super.put(MSG_TAG, msg);
|
|
||||||
if (StringUtils.isNotNull(data))
|
|
||||||
{
|
|
||||||
super.put(DATA_TAG, data);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 返回成功消息
|
|
||||||
*
|
|
||||||
* @return 成功消息
|
|
||||||
*/
|
|
||||||
public static AjaxResult success()
|
|
||||||
{
|
|
||||||
return AjaxResult.success("操作成功");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 返回成功数据
|
|
||||||
*
|
|
||||||
* @return 成功消息
|
|
||||||
*/
|
|
||||||
public static AjaxResult success(Object data)
|
|
||||||
{
|
|
||||||
return AjaxResult.success("操作成功", data);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 返回成功消息
|
|
||||||
*
|
|
||||||
* @param msg 返回内容
|
|
||||||
* @return 成功消息
|
|
||||||
*/
|
|
||||||
public static AjaxResult success(String msg)
|
|
||||||
{
|
|
||||||
return AjaxResult.success(msg, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 返回成功消息
|
|
||||||
*
|
|
||||||
* @param msg 返回内容
|
|
||||||
* @param data 数据对象
|
|
||||||
* @return 成功消息
|
|
||||||
*/
|
|
||||||
public static AjaxResult success(String msg, Object data)
|
|
||||||
{
|
|
||||||
return new AjaxResult(HttpStatus.SUCCESS, msg, data);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 返回错误消息
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public static AjaxResult error()
|
|
||||||
{
|
|
||||||
return AjaxResult.error("操作失败");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 返回错误消息
|
|
||||||
*
|
|
||||||
* @param msg 返回内容
|
|
||||||
* @return 警告消息
|
|
||||||
*/
|
|
||||||
public static AjaxResult error(String msg)
|
|
||||||
{
|
|
||||||
return AjaxResult.error(msg, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 返回错误消息
|
|
||||||
*
|
|
||||||
* @param msg 返回内容
|
|
||||||
* @param data 数据对象
|
|
||||||
* @return 警告消息
|
|
||||||
*/
|
|
||||||
public static AjaxResult error(String msg, Object data)
|
|
||||||
{
|
|
||||||
return new AjaxResult(HttpStatus.ERROR, msg, data);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 返回错误消息
|
|
||||||
*
|
|
||||||
* @param code 状态码
|
|
||||||
* @param msg 返回内容
|
|
||||||
* @return 警告消息
|
|
||||||
*/
|
|
||||||
public static AjaxResult error(int code, String msg)
|
|
||||||
{
|
|
||||||
return new AjaxResult(code, msg, null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,114 +1,63 @@
|
|||||||
package com.ruoyi.common.core.domain;
|
package com.ruoyi.common.core.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Entity基类
|
* Entity基类
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author Lion Li
|
||||||
*/
|
*/
|
||||||
public class BaseEntity implements Serializable
|
|
||||||
{
|
@Data
|
||||||
|
public class BaseEntity implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** 搜索值 */
|
/**
|
||||||
|
* 搜索值
|
||||||
|
*/
|
||||||
|
@JsonIgnore
|
||||||
|
@TableField(exist = false)
|
||||||
private String searchValue;
|
private String searchValue;
|
||||||
|
|
||||||
/** 创建者 */
|
/**
|
||||||
|
* 创建者
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
private String createBy;
|
private String createBy;
|
||||||
|
|
||||||
/** 创建时间 */
|
/**
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
/** 更新者 */
|
/**
|
||||||
|
* 更新者
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
private String updateBy;
|
private String updateBy;
|
||||||
|
|
||||||
/** 更新时间 */
|
/**
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
|
|
||||||
/** 备注 */
|
/**
|
||||||
private String remark;
|
* 请求参数
|
||||||
|
*/
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Map<String, Object> params = new HashMap<>();
|
||||||
|
|
||||||
/** 请求参数 */
|
|
||||||
private Map<String, Object> params;
|
|
||||||
|
|
||||||
public String getSearchValue()
|
|
||||||
{
|
|
||||||
return searchValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSearchValue(String searchValue)
|
|
||||||
{
|
|
||||||
this.searchValue = searchValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCreateBy()
|
|
||||||
{
|
|
||||||
return createBy;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCreateBy(String createBy)
|
|
||||||
{
|
|
||||||
this.createBy = createBy;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getCreateTime()
|
|
||||||
{
|
|
||||||
return createTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCreateTime(Date createTime)
|
|
||||||
{
|
|
||||||
this.createTime = createTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUpdateBy()
|
|
||||||
{
|
|
||||||
return updateBy;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUpdateBy(String updateBy)
|
|
||||||
{
|
|
||||||
this.updateBy = updateBy;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getUpdateTime()
|
|
||||||
{
|
|
||||||
return updateTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUpdateTime(Date updateTime)
|
|
||||||
{
|
|
||||||
this.updateTime = updateTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getRemark()
|
|
||||||
{
|
|
||||||
return remark;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRemark(String remark)
|
|
||||||
{
|
|
||||||
this.remark = remark;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Map<String, Object> getParams()
|
|
||||||
{
|
|
||||||
if (params == null)
|
|
||||||
{
|
|
||||||
params = new HashMap<>();
|
|
||||||
}
|
|
||||||
return params;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setParams(Map<String, Object> params)
|
|
||||||
{
|
|
||||||
this.params = params;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,112 @@
|
|||||||
|
package com.ruoyi.common.core.domain;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.OrderItem;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.ruoyi.common.exception.ServiceException;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import com.ruoyi.common.utils.sql.SqlUtil;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询实体类
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class PageQuery implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页大小
|
||||||
|
*/
|
||||||
|
private Integer pageSize;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前页数
|
||||||
|
*/
|
||||||
|
private Integer pageNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序列
|
||||||
|
*/
|
||||||
|
private String orderByColumn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序的方向desc或者asc
|
||||||
|
*/
|
||||||
|
private String isAsc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前记录起始索引 默认值
|
||||||
|
*/
|
||||||
|
public static final int DEFAULT_PAGE_NUM = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 每页显示记录数 默认值 默认查全部
|
||||||
|
*/
|
||||||
|
public static final int DEFAULT_PAGE_SIZE = Integer.MAX_VALUE;
|
||||||
|
|
||||||
|
public <T> Page<T> build() {
|
||||||
|
Integer pageNum = ObjectUtil.defaultIfNull(getPageNum(), DEFAULT_PAGE_NUM);
|
||||||
|
Integer pageSize = ObjectUtil.defaultIfNull(getPageSize(), DEFAULT_PAGE_SIZE);
|
||||||
|
if (pageNum <= 0) {
|
||||||
|
pageNum = DEFAULT_PAGE_NUM;
|
||||||
|
}
|
||||||
|
Page<T> page = new Page<>(pageNum, pageSize);
|
||||||
|
List<OrderItem> orderItems = buildOrderItem();
|
||||||
|
if (CollUtil.isNotEmpty(orderItems)) {
|
||||||
|
page.addOrder(orderItems);
|
||||||
|
}
|
||||||
|
return page;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建排序
|
||||||
|
*
|
||||||
|
* 支持的用法如下:
|
||||||
|
* {isAsc:"asc",orderByColumn:"id"} order by id asc
|
||||||
|
* {isAsc:"asc",orderByColumn:"id,createTime"} order by id asc,create_time asc
|
||||||
|
* {isAsc:"desc",orderByColumn:"id,createTime"} order by id desc,create_time desc
|
||||||
|
* {isAsc:"asc,desc",orderByColumn:"id,createTime"} order by id asc,create_time desc
|
||||||
|
*/
|
||||||
|
private List<OrderItem> buildOrderItem() {
|
||||||
|
if (StringUtils.isBlank(orderByColumn) || StringUtils.isBlank(isAsc)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
String orderBy = SqlUtil.escapeOrderBySql(orderByColumn);
|
||||||
|
orderBy = StringUtils.toUnderScoreCase(orderBy);
|
||||||
|
|
||||||
|
// 兼容前端排序类型
|
||||||
|
isAsc = StringUtils.replaceEach(isAsc, new String[]{"ascending", "descending"}, new String[]{"asc", "desc"});
|
||||||
|
|
||||||
|
String[] orderByArr = orderBy.split(",");
|
||||||
|
String[] isAscArr = isAsc.split(",");
|
||||||
|
if (isAscArr.length != 1 && isAscArr.length != orderByArr.length) {
|
||||||
|
throw new ServiceException("排序参数有误");
|
||||||
|
}
|
||||||
|
|
||||||
|
List<OrderItem> list = new ArrayList<>();
|
||||||
|
// 每个字段各自排序
|
||||||
|
for (int i = 0; i < orderByArr.length; i++) {
|
||||||
|
String orderByStr = orderByArr[i];
|
||||||
|
String isAscStr = isAscArr.length == 1 ? isAscArr[0] : isAscArr[i];
|
||||||
|
if ("asc".equals(isAscStr)) {
|
||||||
|
list.add(OrderItem.asc(orderByStr));
|
||||||
|
} else if ("desc".equals(isAscStr)) {
|
||||||
|
list.add(OrderItem.desc(orderByStr));
|
||||||
|
} else {
|
||||||
|
throw new ServiceException("排序参数有误");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
107
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/R.java
Normal file
107
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/R.java
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
package com.ruoyi.common.core.domain;
|
||||||
|
|
||||||
|
import com.ruoyi.common.constant.HttpStatus;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 响应信息主体
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class R<T> implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成功
|
||||||
|
*/
|
||||||
|
public static final int SUCCESS = 200;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 失败
|
||||||
|
*/
|
||||||
|
public static final int FAIL = 500;
|
||||||
|
|
||||||
|
private int code;
|
||||||
|
|
||||||
|
private String msg;
|
||||||
|
|
||||||
|
private T data;
|
||||||
|
|
||||||
|
public static <T> R<T> ok() {
|
||||||
|
return restResult(null, SUCCESS, "操作成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static <T> R<T> ok(T data) {
|
||||||
|
return restResult(data, SUCCESS, "操作成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static <T> R<T> ok(String msg) {
|
||||||
|
return restResult(null, SUCCESS, msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static <T> R<T> ok(String msg, T data) {
|
||||||
|
return restResult(data, SUCCESS, msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static <T> R<T> fail() {
|
||||||
|
return restResult(null, FAIL, "操作失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static <T> R<T> fail(String msg) {
|
||||||
|
return restResult(null, FAIL, msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static <T> R<T> fail(T data) {
|
||||||
|
return restResult(data, FAIL, "操作失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static <T> R<T> fail(String msg, T data) {
|
||||||
|
return restResult(data, FAIL, msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static <T> R<T> fail(int code, String msg) {
|
||||||
|
return restResult(null, code, msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回警告消息
|
||||||
|
*
|
||||||
|
* @param msg 返回内容
|
||||||
|
* @return 警告消息
|
||||||
|
*/
|
||||||
|
public static <T> R<T> warn(String msg) {
|
||||||
|
return restResult(null, HttpStatus.WARN, msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回警告消息
|
||||||
|
*
|
||||||
|
* @param msg 返回内容
|
||||||
|
* @param data 数据对象
|
||||||
|
* @return 警告消息
|
||||||
|
*/
|
||||||
|
public static <T> R<T> warn(String msg, T data) {
|
||||||
|
return restResult(data, HttpStatus.WARN, msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static <T> R<T> restResult(T data, int code, String msg) {
|
||||||
|
R<T> r = new R<>();
|
||||||
|
r.setCode(code);
|
||||||
|
r.setData(data);
|
||||||
|
r.setMsg(msg);
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static <T> Boolean isError(R<T> ret) {
|
||||||
|
return !isSuccess(ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static <T> Boolean isSuccess(R<T> ret) {
|
||||||
|
return R.SUCCESS == ret.getCode();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,79 +1,39 @@
|
|||||||
package com.ruoyi.common.core.domain;
|
package com.ruoyi.common.core.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tree基类
|
* Tree基类
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author Lion Li
|
||||||
*/
|
*/
|
||||||
public class TreeEntity extends BaseEntity
|
|
||||||
{
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class TreeEntity<T> extends BaseEntity {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** 父菜单名称 */
|
/**
|
||||||
|
* 父菜单名称
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
private String parentName;
|
private String parentName;
|
||||||
|
|
||||||
/** 父菜单ID */
|
/**
|
||||||
|
* 父菜单ID
|
||||||
|
*/
|
||||||
private Long parentId;
|
private Long parentId;
|
||||||
|
|
||||||
/** 显示顺序 */
|
/**
|
||||||
private Integer orderNum;
|
* 子部门
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<T> children = new ArrayList<>();
|
||||||
|
|
||||||
/** 祖级列表 */
|
|
||||||
private String ancestors;
|
|
||||||
|
|
||||||
/** 子部门 */
|
|
||||||
private List<?> children = new ArrayList<>();
|
|
||||||
|
|
||||||
public String getParentName()
|
|
||||||
{
|
|
||||||
return parentName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setParentName(String parentName)
|
|
||||||
{
|
|
||||||
this.parentName = parentName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getParentId()
|
|
||||||
{
|
|
||||||
return parentId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setParentId(Long parentId)
|
|
||||||
{
|
|
||||||
this.parentId = parentId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getOrderNum()
|
|
||||||
{
|
|
||||||
return orderNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOrderNum(Integer orderNum)
|
|
||||||
{
|
|
||||||
this.orderNum = orderNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAncestors()
|
|
||||||
{
|
|
||||||
return ancestors;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAncestors(String ancestors)
|
|
||||||
{
|
|
||||||
this.ancestors = ancestors;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<?> getChildren()
|
|
||||||
{
|
|
||||||
return children;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setChildren(List<?> children)
|
|
||||||
{
|
|
||||||
this.children = children;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,77 +0,0 @@
|
|||||||
package com.ruoyi.common.core.domain;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
||||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
|
||||||
import com.ruoyi.common.core.domain.entity.SysMenu;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Treeselect树结构实体类
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
*/
|
|
||||||
public class TreeSelect implements Serializable
|
|
||||||
{
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** 节点ID */
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/** 节点名称 */
|
|
||||||
private String label;
|
|
||||||
|
|
||||||
/** 子节点 */
|
|
||||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
|
||||||
private List<TreeSelect> children;
|
|
||||||
|
|
||||||
public TreeSelect()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public TreeSelect(SysDept dept)
|
|
||||||
{
|
|
||||||
this.id = dept.getDeptId();
|
|
||||||
this.label = dept.getDeptName();
|
|
||||||
this.children = dept.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
|
|
||||||
}
|
|
||||||
|
|
||||||
public TreeSelect(SysMenu menu)
|
|
||||||
{
|
|
||||||
this.id = menu.getMenuId();
|
|
||||||
this.label = menu.getMenuName();
|
|
||||||
this.children = menu.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getId()
|
|
||||||
{
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setId(Long id)
|
|
||||||
{
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLabel()
|
|
||||||
{
|
|
||||||
return label;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLabel(String label)
|
|
||||||
{
|
|
||||||
this.label = label;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<TreeSelect> getChildren()
|
|
||||||
{
|
|
||||||
return children;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setChildren(List<TreeSelect> children)
|
|
||||||
{
|
|
||||||
this.children = children;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package com.ruoyi.common.core.domain.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class RoleDTO implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色ID
|
||||||
|
*/
|
||||||
|
private Long roleId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色名称
|
||||||
|
*/
|
||||||
|
private String roleName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色权限
|
||||||
|
*/
|
||||||
|
private String roleKey;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限;5:仅本人数据权限)
|
||||||
|
*/
|
||||||
|
private String dataScope;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
package com.ruoyi.common.core.domain.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前在线会话
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class UserOnlineDTO implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会话编号
|
||||||
|
*/
|
||||||
|
private String tokenId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门名称
|
||||||
|
*/
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户名称
|
||||||
|
*/
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 登录IP地址
|
||||||
|
*/
|
||||||
|
private String ipaddr;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 登录地址
|
||||||
|
*/
|
||||||
|
private String loginLocation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 浏览器类型
|
||||||
|
*/
|
||||||
|
private String browser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作系统
|
||||||
|
*/
|
||||||
|
private String os;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 登录时间
|
||||||
|
*/
|
||||||
|
private Long loginTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,202 +1,80 @@
|
|||||||
package com.ruoyi.common.core.domain.entity;
|
package com.ruoyi.common.core.domain.entity;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import java.util.List;
|
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.ruoyi.common.core.domain.TreeEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
import javax.validation.constraints.Email;
|
import javax.validation.constraints.Email;
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
import javax.validation.constraints.Size;
|
import javax.validation.constraints.Size;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部门表 sys_dept
|
* 部门表 sys_dept
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author Lion Li
|
||||||
*/
|
*/
|
||||||
public class SysDept extends BaseEntity
|
|
||||||
{
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("sys_dept")
|
||||||
|
public class SysDept extends TreeEntity<SysDept> {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** 部门ID */
|
/**
|
||||||
|
* 部门ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "dept_id")
|
||||||
private Long deptId;
|
private Long deptId;
|
||||||
|
|
||||||
/** 父部门ID */
|
/**
|
||||||
private Long parentId;
|
* 部门名称
|
||||||
|
*/
|
||||||
/** 祖级列表 */
|
|
||||||
private String ancestors;
|
|
||||||
|
|
||||||
/** 部门名称 */
|
|
||||||
private String deptName;
|
|
||||||
|
|
||||||
/** 显示顺序 */
|
|
||||||
private String orderNum;
|
|
||||||
|
|
||||||
/** 负责人 */
|
|
||||||
private String leader;
|
|
||||||
|
|
||||||
/** 联系电话 */
|
|
||||||
private String phone;
|
|
||||||
|
|
||||||
/** 邮箱 */
|
|
||||||
private String email;
|
|
||||||
|
|
||||||
/** 部门状态:0正常,1停用 */
|
|
||||||
private String status;
|
|
||||||
|
|
||||||
/** 删除标志(0代表存在 2代表删除) */
|
|
||||||
private String delFlag;
|
|
||||||
|
|
||||||
/** 父部门名称 */
|
|
||||||
private String parentName;
|
|
||||||
|
|
||||||
/** 子部门 */
|
|
||||||
private List<SysDept> children = new ArrayList<SysDept>();
|
|
||||||
|
|
||||||
public Long getDeptId()
|
|
||||||
{
|
|
||||||
return deptId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDeptId(Long deptId)
|
|
||||||
{
|
|
||||||
this.deptId = deptId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getParentId()
|
|
||||||
{
|
|
||||||
return parentId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setParentId(Long parentId)
|
|
||||||
{
|
|
||||||
this.parentId = parentId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAncestors()
|
|
||||||
{
|
|
||||||
return ancestors;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAncestors(String ancestors)
|
|
||||||
{
|
|
||||||
this.ancestors = ancestors;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotBlank(message = "部门名称不能为空")
|
@NotBlank(message = "部门名称不能为空")
|
||||||
@Size(min = 0, max = 30, message = "部门名称长度不能超过30个字符")
|
@Size(min = 0, max = 30, message = "部门名称长度不能超过30个字符")
|
||||||
public String getDeptName()
|
private String deptName;
|
||||||
{
|
|
||||||
return deptName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDeptName(String deptName)
|
/**
|
||||||
{
|
* 显示顺序
|
||||||
this.deptName = deptName;
|
*/
|
||||||
}
|
@NotNull(message = "显示顺序不能为空")
|
||||||
|
private Integer orderNum;
|
||||||
|
|
||||||
@NotBlank(message = "显示顺序不能为空")
|
/**
|
||||||
public String getOrderNum()
|
* 负责人
|
||||||
{
|
*/
|
||||||
return orderNum;
|
private String leader;
|
||||||
}
|
|
||||||
|
|
||||||
public void setOrderNum(String orderNum)
|
|
||||||
{
|
|
||||||
this.orderNum = orderNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLeader()
|
|
||||||
{
|
|
||||||
return leader;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLeader(String leader)
|
|
||||||
{
|
|
||||||
this.leader = leader;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系电话
|
||||||
|
*/
|
||||||
@Size(min = 0, max = 11, message = "联系电话长度不能超过11个字符")
|
@Size(min = 0, max = 11, message = "联系电话长度不能超过11个字符")
|
||||||
public String getPhone()
|
private String phone;
|
||||||
{
|
|
||||||
return phone;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPhone(String phone)
|
|
||||||
{
|
|
||||||
this.phone = phone;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邮箱
|
||||||
|
*/
|
||||||
@Email(message = "邮箱格式不正确")
|
@Email(message = "邮箱格式不正确")
|
||||||
@Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符")
|
@Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符")
|
||||||
public String getEmail()
|
private String email;
|
||||||
{
|
|
||||||
return email;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEmail(String email)
|
/**
|
||||||
{
|
* 部门状态:0正常,1停用
|
||||||
this.email = email;
|
*/
|
||||||
}
|
private String status;
|
||||||
|
|
||||||
public String getStatus()
|
/**
|
||||||
{
|
* 删除标志(0代表存在 2代表删除)
|
||||||
return status;
|
*/
|
||||||
}
|
@TableLogic
|
||||||
|
private String delFlag;
|
||||||
|
|
||||||
public void setStatus(String status)
|
/**
|
||||||
{
|
* 祖级列表
|
||||||
this.status = status;
|
*/
|
||||||
}
|
private String ancestors;
|
||||||
|
|
||||||
public String getDelFlag()
|
|
||||||
{
|
|
||||||
return delFlag;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDelFlag(String delFlag)
|
|
||||||
{
|
|
||||||
this.delFlag = delFlag;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getParentName()
|
|
||||||
{
|
|
||||||
return parentName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setParentName(String parentName)
|
|
||||||
{
|
|
||||||
this.parentName = parentName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<SysDept> getChildren()
|
|
||||||
{
|
|
||||||
return children;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setChildren(List<SysDept> children)
|
|
||||||
{
|
|
||||||
this.children = children;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
|
||||||
.append("deptId", getDeptId())
|
|
||||||
.append("parentId", getParentId())
|
|
||||||
.append("ancestors", getAncestors())
|
|
||||||
.append("deptName", getDeptName())
|
|
||||||
.append("orderNum", getOrderNum())
|
|
||||||
.append("leader", getLeader())
|
|
||||||
.append("phone", getPhone())
|
|
||||||
.append("email", getEmail())
|
|
||||||
.append("status", getStatus())
|
|
||||||
.append("delFlag", getDelFlag())
|
|
||||||
.append("createBy", getCreateBy())
|
|
||||||
.append("createTime", getCreateTime())
|
|
||||||
.append("updateBy", getUpdateBy())
|
|
||||||
.append("updateTime", getUpdateTime())
|
|
||||||
.toString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,176 +1,100 @@
|
|||||||
package com.ruoyi.common.core.domain.entity;
|
package com.ruoyi.common.core.domain.entity;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.ruoyi.common.annotation.ExcelDictFormat;
|
||||||
|
import com.ruoyi.common.constant.UserConstants;
|
||||||
|
import com.ruoyi.common.convert.ExcelDictConvert;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.Size;
|
import javax.validation.constraints.Size;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
|
||||||
import com.ruoyi.common.annotation.Excel;
|
|
||||||
import com.ruoyi.common.annotation.Excel.ColumnType;
|
|
||||||
import com.ruoyi.common.constant.UserConstants;
|
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 字典数据表 sys_dict_data
|
* 字典数据表 sys_dict_data
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author Lion Li
|
||||||
*/
|
*/
|
||||||
public class SysDictData extends BaseEntity
|
|
||||||
{
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** 字典编码 */
|
@Data
|
||||||
@Excel(name = "字典编码", cellType = ColumnType.NUMERIC)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("sys_dict_data")
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class SysDictData extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字典编码
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "字典编码")
|
||||||
|
@TableId(value = "dict_code")
|
||||||
private Long dictCode;
|
private Long dictCode;
|
||||||
|
|
||||||
/** 字典排序 */
|
/**
|
||||||
@Excel(name = "字典排序", cellType = ColumnType.NUMERIC)
|
* 字典排序
|
||||||
private Long dictSort;
|
*/
|
||||||
|
@ExcelProperty(value = "字典排序")
|
||||||
/** 字典标签 */
|
private Integer dictSort;
|
||||||
@Excel(name = "字典标签")
|
|
||||||
private String dictLabel;
|
|
||||||
|
|
||||||
/** 字典键值 */
|
|
||||||
@Excel(name = "字典键值")
|
|
||||||
private String dictValue;
|
|
||||||
|
|
||||||
/** 字典类型 */
|
|
||||||
@Excel(name = "字典类型")
|
|
||||||
private String dictType;
|
|
||||||
|
|
||||||
/** 样式属性(其他样式扩展) */
|
|
||||||
private String cssClass;
|
|
||||||
|
|
||||||
/** 表格字典样式 */
|
|
||||||
private String listClass;
|
|
||||||
|
|
||||||
/** 是否默认(Y是 N否) */
|
|
||||||
@Excel(name = "是否默认", readConverterExp = "Y=是,N=否")
|
|
||||||
private String isDefault;
|
|
||||||
|
|
||||||
/** 状态(0正常 1停用) */
|
|
||||||
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
|
|
||||||
private String status;
|
|
||||||
|
|
||||||
public Long getDictCode()
|
|
||||||
{
|
|
||||||
return dictCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDictCode(Long dictCode)
|
|
||||||
{
|
|
||||||
this.dictCode = dictCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getDictSort()
|
|
||||||
{
|
|
||||||
return dictSort;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDictSort(Long dictSort)
|
|
||||||
{
|
|
||||||
this.dictSort = dictSort;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字典标签
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "字典标签")
|
||||||
@NotBlank(message = "字典标签不能为空")
|
@NotBlank(message = "字典标签不能为空")
|
||||||
@Size(min = 0, max = 100, message = "字典标签长度不能超过100个字符")
|
@Size(min = 0, max = 100, message = "字典标签长度不能超过100个字符")
|
||||||
public String getDictLabel()
|
private String dictLabel;
|
||||||
{
|
|
||||||
return dictLabel;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDictLabel(String dictLabel)
|
|
||||||
{
|
|
||||||
this.dictLabel = dictLabel;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字典键值
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "字典键值")
|
||||||
@NotBlank(message = "字典键值不能为空")
|
@NotBlank(message = "字典键值不能为空")
|
||||||
@Size(min = 0, max = 100, message = "字典键值长度不能超过100个字符")
|
@Size(min = 0, max = 100, message = "字典键值长度不能超过100个字符")
|
||||||
public String getDictValue()
|
private String dictValue;
|
||||||
{
|
|
||||||
return dictValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDictValue(String dictValue)
|
|
||||||
{
|
|
||||||
this.dictValue = dictValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字典类型
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "字典类型")
|
||||||
@NotBlank(message = "字典类型不能为空")
|
@NotBlank(message = "字典类型不能为空")
|
||||||
@Size(min = 0, max = 100, message = "字典类型长度不能超过100个字符")
|
@Size(min = 0, max = 100, message = "字典类型长度不能超过100个字符")
|
||||||
public String getDictType()
|
private String dictType;
|
||||||
{
|
|
||||||
return dictType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDictType(String dictType)
|
|
||||||
{
|
|
||||||
this.dictType = dictType;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 样式属性(其他样式扩展)
|
||||||
|
*/
|
||||||
@Size(min = 0, max = 100, message = "样式属性长度不能超过100个字符")
|
@Size(min = 0, max = 100, message = "样式属性长度不能超过100个字符")
|
||||||
public String getCssClass()
|
private String cssClass;
|
||||||
{
|
|
||||||
return cssClass;
|
/**
|
||||||
|
* 表格字典样式
|
||||||
|
*/
|
||||||
|
private String listClass;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否默认(Y是 N否)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "是否默认", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(dictType = "sys_yes_no")
|
||||||
|
private String isDefault;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态(0正常 1停用)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(dictType = "sys_normal_disable")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
public boolean getDefault() {
|
||||||
|
return UserConstants.YES.equals(this.isDefault);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCssClass(String cssClass)
|
|
||||||
{
|
|
||||||
this.cssClass = cssClass;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getListClass()
|
|
||||||
{
|
|
||||||
return listClass;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setListClass(String listClass)
|
|
||||||
{
|
|
||||||
this.listClass = listClass;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean getDefault()
|
|
||||||
{
|
|
||||||
return UserConstants.YES.equals(this.isDefault) ? true : false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getIsDefault()
|
|
||||||
{
|
|
||||||
return isDefault;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIsDefault(String isDefault)
|
|
||||||
{
|
|
||||||
this.isDefault = isDefault;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getStatus()
|
|
||||||
{
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setStatus(String status)
|
|
||||||
{
|
|
||||||
this.status = status;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
|
||||||
.append("dictCode", getDictCode())
|
|
||||||
.append("dictSort", getDictSort())
|
|
||||||
.append("dictLabel", getDictLabel())
|
|
||||||
.append("dictValue", getDictValue())
|
|
||||||
.append("dictType", getDictType())
|
|
||||||
.append("cssClass", getCssClass())
|
|
||||||
.append("listClass", getListClass())
|
|
||||||
.append("isDefault", getIsDefault())
|
|
||||||
.append("status", getStatus())
|
|
||||||
.append("createBy", getCreateBy())
|
|
||||||
.append("createTime", getCreateTime())
|
|
||||||
.append("updateBy", getUpdateBy())
|
|
||||||
.append("updateTime", getUpdateTime())
|
|
||||||
.append("remark", getRemark())
|
|
||||||
.toString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,94 +1,65 @@
|
|||||||
package com.ruoyi.common.core.domain.entity;
|
package com.ruoyi.common.core.domain.entity;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
import javax.validation.constraints.Size;
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.ruoyi.common.annotation.Excel;
|
import com.ruoyi.common.annotation.ExcelDictFormat;
|
||||||
import com.ruoyi.common.annotation.Excel.ColumnType;
|
import com.ruoyi.common.convert.ExcelDictConvert;
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.Pattern;
|
||||||
|
import javax.validation.constraints.Size;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 字典类型表 sys_dict_type
|
* 字典类型表 sys_dict_type
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author Lion Li
|
||||||
*/
|
*/
|
||||||
public class SysDictType extends BaseEntity
|
|
||||||
{
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** 字典主键 */
|
@Data
|
||||||
@Excel(name = "字典主键", cellType = ColumnType.NUMERIC)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("sys_dict_type")
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class SysDictType extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字典主键
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "字典主键")
|
||||||
|
@TableId(value = "dict_id")
|
||||||
private Long dictId;
|
private Long dictId;
|
||||||
|
|
||||||
/** 字典名称 */
|
/**
|
||||||
@Excel(name = "字典名称")
|
* 字典名称
|
||||||
private String dictName;
|
*/
|
||||||
|
@ExcelProperty(value = "字典名称")
|
||||||
/** 字典类型 */
|
|
||||||
@Excel(name = "字典类型")
|
|
||||||
private String dictType;
|
|
||||||
|
|
||||||
/** 状态(0正常 1停用) */
|
|
||||||
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
|
|
||||||
private String status;
|
|
||||||
|
|
||||||
public Long getDictId()
|
|
||||||
{
|
|
||||||
return dictId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDictId(Long dictId)
|
|
||||||
{
|
|
||||||
this.dictId = dictId;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotBlank(message = "字典名称不能为空")
|
@NotBlank(message = "字典名称不能为空")
|
||||||
@Size(min = 0, max = 100, message = "字典类型名称长度不能超过100个字符")
|
@Size(min = 0, max = 100, message = "字典类型名称长度不能超过100个字符")
|
||||||
public String getDictName()
|
private String dictName;
|
||||||
{
|
|
||||||
return dictName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDictName(String dictName)
|
|
||||||
{
|
|
||||||
this.dictName = dictName;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字典类型
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "字典类型")
|
||||||
@NotBlank(message = "字典类型不能为空")
|
@NotBlank(message = "字典类型不能为空")
|
||||||
@Size(min = 0, max = 100, message = "字典类型类型长度不能超过100个字符")
|
@Size(min = 0, max = 100, message = "字典类型类型长度不能超过100个字符")
|
||||||
public String getDictType()
|
@Pattern(regexp = "^[a-z][a-z0-9_]*$", message = "字典类型必须以字母开头,且只能为(小写字母,数字,下滑线)")
|
||||||
{
|
private String dictType;
|
||||||
return dictType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDictType(String dictType)
|
/**
|
||||||
{
|
* 状态(0正常 1停用)
|
||||||
this.dictType = dictType;
|
*/
|
||||||
}
|
@ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(dictType = "sys_normal_disable")
|
||||||
|
private String status;
|
||||||
|
|
||||||
public String getStatus()
|
/**
|
||||||
{
|
* 备注
|
||||||
return status;
|
*/
|
||||||
}
|
private String remark;
|
||||||
|
|
||||||
public void setStatus(String status)
|
|
||||||
{
|
|
||||||
this.status = status;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
|
||||||
.append("dictId", getDictId())
|
|
||||||
.append("dictName", getDictName())
|
|
||||||
.append("dictType", getDictType())
|
|
||||||
.append("status", getStatus())
|
|
||||||
.append("createBy", getCreateBy())
|
|
||||||
.append("createTime", getCreateTime())
|
|
||||||
.append("updateBy", getUpdateBy())
|
|
||||||
.append("updateTime", getUpdateTime())
|
|
||||||
.append("remark", getRemark())
|
|
||||||
.toString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,245 +1,104 @@
|
|||||||
package com.ruoyi.common.core.domain.entity;
|
package com.ruoyi.common.core.domain.entity;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import java.util.List;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.ruoyi.common.core.domain.TreeEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
import javax.validation.constraints.Size;
|
import javax.validation.constraints.Size;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 菜单权限表 sys_menu
|
* 菜单权限表 sys_menu
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author Lion Li
|
||||||
*/
|
*/
|
||||||
public class SysMenu extends BaseEntity
|
|
||||||
{
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** 菜单ID */
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("sys_menu")
|
||||||
|
public class SysMenu extends TreeEntity<SysMenu> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 菜单ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "menu_id")
|
||||||
private Long menuId;
|
private Long menuId;
|
||||||
|
|
||||||
/** 菜单名称 */
|
/**
|
||||||
private String menuName;
|
* 菜单名称
|
||||||
|
*/
|
||||||
/** 父菜单名称 */
|
|
||||||
private String parentName;
|
|
||||||
|
|
||||||
/** 父菜单ID */
|
|
||||||
private Long parentId;
|
|
||||||
|
|
||||||
/** 显示顺序 */
|
|
||||||
private String orderNum;
|
|
||||||
|
|
||||||
/** 路由地址 */
|
|
||||||
private String path;
|
|
||||||
|
|
||||||
/** 组件路径 */
|
|
||||||
private String component;
|
|
||||||
|
|
||||||
/** 是否为外链(0是 1否) */
|
|
||||||
private String isFrame;
|
|
||||||
|
|
||||||
/** 是否缓存(0缓存 1不缓存) */
|
|
||||||
private String isCache;
|
|
||||||
|
|
||||||
/** 类型(M目录 C菜单 F按钮) */
|
|
||||||
private String menuType;
|
|
||||||
|
|
||||||
/** 显示状态(0显示 1隐藏) */
|
|
||||||
private String visible;
|
|
||||||
|
|
||||||
/** 菜单状态(0显示 1隐藏) */
|
|
||||||
private String status;
|
|
||||||
|
|
||||||
/** 权限字符串 */
|
|
||||||
private String perms;
|
|
||||||
|
|
||||||
/** 菜单图标 */
|
|
||||||
private String icon;
|
|
||||||
|
|
||||||
/** 子菜单 */
|
|
||||||
private List<SysMenu> children = new ArrayList<SysMenu>();
|
|
||||||
|
|
||||||
public Long getMenuId()
|
|
||||||
{
|
|
||||||
return menuId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMenuId(Long menuId)
|
|
||||||
{
|
|
||||||
this.menuId = menuId;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotBlank(message = "菜单名称不能为空")
|
@NotBlank(message = "菜单名称不能为空")
|
||||||
@Size(min = 0, max = 50, message = "菜单名称长度不能超过50个字符")
|
@Size(min = 0, max = 50, message = "菜单名称长度不能超过50个字符")
|
||||||
public String getMenuName()
|
private String menuName;
|
||||||
{
|
|
||||||
return menuName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMenuName(String menuName)
|
/**
|
||||||
{
|
* 显示顺序
|
||||||
this.menuName = menuName;
|
*/
|
||||||
}
|
@NotNull(message = "显示顺序不能为空")
|
||||||
|
private Integer orderNum;
|
||||||
public String getParentName()
|
|
||||||
{
|
|
||||||
return parentName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setParentName(String parentName)
|
|
||||||
{
|
|
||||||
this.parentName = parentName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getParentId()
|
|
||||||
{
|
|
||||||
return parentId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setParentId(Long parentId)
|
|
||||||
{
|
|
||||||
this.parentId = parentId;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotBlank(message = "显示顺序不能为空")
|
|
||||||
public String getOrderNum()
|
|
||||||
{
|
|
||||||
return orderNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOrderNum(String orderNum)
|
|
||||||
{
|
|
||||||
this.orderNum = orderNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 路由地址
|
||||||
|
*/
|
||||||
@Size(min = 0, max = 200, message = "路由地址不能超过200个字符")
|
@Size(min = 0, max = 200, message = "路由地址不能超过200个字符")
|
||||||
public String getPath()
|
private String path;
|
||||||
{
|
|
||||||
return path;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPath(String path)
|
|
||||||
{
|
|
||||||
this.path = path;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组件路径
|
||||||
|
*/
|
||||||
@Size(min = 0, max = 200, message = "组件路径不能超过255个字符")
|
@Size(min = 0, max = 200, message = "组件路径不能超过255个字符")
|
||||||
public String getComponent()
|
private String component;
|
||||||
{
|
|
||||||
return component;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setComponent(String component)
|
/**
|
||||||
{
|
* 路由参数
|
||||||
this.component = component;
|
*/
|
||||||
}
|
private String queryParam;
|
||||||
|
|
||||||
public String getIsFrame()
|
/**
|
||||||
{
|
* 是否为外链(0是 1否)
|
||||||
return isFrame;
|
*/
|
||||||
}
|
private String isFrame;
|
||||||
|
|
||||||
public void setIsFrame(String isFrame)
|
/**
|
||||||
{
|
* 是否缓存(0缓存 1不缓存)
|
||||||
this.isFrame = isFrame;
|
*/
|
||||||
}
|
private String isCache;
|
||||||
|
|
||||||
public String getIsCache()
|
|
||||||
{
|
|
||||||
return isCache;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIsCache(String isCache)
|
|
||||||
{
|
|
||||||
this.isCache = isCache;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型(M目录 C菜单 F按钮)
|
||||||
|
*/
|
||||||
@NotBlank(message = "菜单类型不能为空")
|
@NotBlank(message = "菜单类型不能为空")
|
||||||
public String getMenuType()
|
private String menuType;
|
||||||
{
|
|
||||||
return menuType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMenuType(String menuType)
|
/**
|
||||||
{
|
* 显示状态(0显示 1隐藏)
|
||||||
this.menuType = menuType;
|
*/
|
||||||
}
|
private String visible;
|
||||||
|
|
||||||
public String getVisible()
|
/**
|
||||||
{
|
* 菜单状态(0正常 1停用)
|
||||||
return visible;
|
*/
|
||||||
}
|
private String status;
|
||||||
|
|
||||||
public void setVisible(String visible)
|
|
||||||
{
|
|
||||||
this.visible = visible;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getStatus()
|
|
||||||
{
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setStatus(String status)
|
|
||||||
{
|
|
||||||
this.status = status;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 权限字符串
|
||||||
|
*/
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
@Size(min = 0, max = 100, message = "权限标识长度不能超过100个字符")
|
@Size(min = 0, max = 100, message = "权限标识长度不能超过100个字符")
|
||||||
public String getPerms()
|
private String perms;
|
||||||
{
|
|
||||||
return perms;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPerms(String perms)
|
/**
|
||||||
{
|
* 菜单图标
|
||||||
this.perms = perms;
|
*/
|
||||||
}
|
private String icon;
|
||||||
|
|
||||||
public String getIcon()
|
/**
|
||||||
{
|
* 备注
|
||||||
return icon;
|
*/
|
||||||
}
|
private String remark;
|
||||||
|
|
||||||
public void setIcon(String icon)
|
|
||||||
{
|
|
||||||
this.icon = icon;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<SysMenu> getChildren()
|
|
||||||
{
|
|
||||||
return children;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setChildren(List<SysMenu> children)
|
|
||||||
{
|
|
||||||
this.children = children;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
|
||||||
.append("menuId", getMenuId())
|
|
||||||
.append("menuName", getMenuName())
|
|
||||||
.append("parentId", getParentId())
|
|
||||||
.append("orderNum", getOrderNum())
|
|
||||||
.append("path", getPath())
|
|
||||||
.append("component", getComponent())
|
|
||||||
.append("isFrame", getIsFrame())
|
|
||||||
.append("IsCache", getIsCache())
|
|
||||||
.append("menuType", getMenuType())
|
|
||||||
.append("visible", getVisible())
|
|
||||||
.append("status ", getStatus())
|
|
||||||
.append("perms", getPerms())
|
|
||||||
.append("icon", getIcon())
|
|
||||||
.append("createBy", getCreateBy())
|
|
||||||
.append("createTime", getCreateTime())
|
|
||||||
.append("updateBy", getUpdateBy())
|
|
||||||
.append("updateTime", getUpdateTime())
|
|
||||||
.append("remark", getRemark())
|
|
||||||
.toString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,226 +1,131 @@
|
|||||||
package com.ruoyi.common.core.domain.entity;
|
package com.ruoyi.common.core.domain.entity;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
import javax.validation.constraints.Size;
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.ruoyi.common.annotation.Excel;
|
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||||
import com.ruoyi.common.annotation.Excel.ColumnType;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.ruoyi.common.annotation.ExcelDictFormat;
|
||||||
|
import com.ruoyi.common.constant.UserConstants;
|
||||||
|
import com.ruoyi.common.convert.ExcelDictConvert;
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import javax.validation.constraints.Size;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 角色表 sys_role
|
* 角色表 sys_role
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author Lion Li
|
||||||
*/
|
*/
|
||||||
public class SysRole extends BaseEntity
|
|
||||||
{
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** 角色ID */
|
@Data
|
||||||
@Excel(name = "角色序号", cellType = ColumnType.NUMERIC)
|
@NoArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("sys_role")
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class SysRole extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "角色序号")
|
||||||
|
@TableId(value = "role_id")
|
||||||
private Long roleId;
|
private Long roleId;
|
||||||
|
|
||||||
/** 角色名称 */
|
/**
|
||||||
@Excel(name = "角色名称")
|
* 角色名称
|
||||||
private String roleName;
|
*/
|
||||||
|
@ExcelProperty(value = "角色名称")
|
||||||
/** 角色权限 */
|
|
||||||
@Excel(name = "角色权限")
|
|
||||||
private String roleKey;
|
|
||||||
|
|
||||||
/** 角色排序 */
|
|
||||||
@Excel(name = "角色排序")
|
|
||||||
private String roleSort;
|
|
||||||
|
|
||||||
/** 数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限) */
|
|
||||||
@Excel(name = "数据范围", readConverterExp = "1=所有数据权限,2=自定义数据权限,3=本部门数据权限,4=本部门及以下数据权限")
|
|
||||||
private String dataScope;
|
|
||||||
|
|
||||||
/** 菜单树选择项是否关联显示( 0:父子不互相关联显示 1:父子互相关联显示) */
|
|
||||||
private boolean menuCheckStrictly;
|
|
||||||
|
|
||||||
/** 部门树选择项是否关联显示(0:父子不互相关联显示 1:父子互相关联显示 ) */
|
|
||||||
private boolean deptCheckStrictly;
|
|
||||||
|
|
||||||
/** 角色状态(0正常 1停用) */
|
|
||||||
@Excel(name = "角色状态", readConverterExp = "0=正常,1=停用")
|
|
||||||
private String status;
|
|
||||||
|
|
||||||
/** 删除标志(0代表存在 2代表删除) */
|
|
||||||
private String delFlag;
|
|
||||||
|
|
||||||
/** 用户是否存在此角色标识 默认不存在 */
|
|
||||||
private boolean flag = false;
|
|
||||||
|
|
||||||
/** 菜单组 */
|
|
||||||
private Long[] menuIds;
|
|
||||||
|
|
||||||
/** 部门组(数据权限) */
|
|
||||||
private Long[] deptIds;
|
|
||||||
|
|
||||||
public SysRole()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public SysRole(Long roleId)
|
|
||||||
{
|
|
||||||
this.roleId = roleId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getRoleId()
|
|
||||||
{
|
|
||||||
return roleId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRoleId(Long roleId)
|
|
||||||
{
|
|
||||||
this.roleId = roleId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isAdmin()
|
|
||||||
{
|
|
||||||
return isAdmin(this.roleId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean isAdmin(Long roleId)
|
|
||||||
{
|
|
||||||
return roleId != null && 1L == roleId;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotBlank(message = "角色名称不能为空")
|
@NotBlank(message = "角色名称不能为空")
|
||||||
@Size(min = 0, max = 30, message = "角色名称长度不能超过30个字符")
|
@Size(min = 0, max = 30, message = "角色名称长度不能超过30个字符")
|
||||||
public String getRoleName()
|
private String roleName;
|
||||||
{
|
|
||||||
return roleName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRoleName(String roleName)
|
|
||||||
{
|
|
||||||
this.roleName = roleName;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色权限
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "角色权限")
|
||||||
@NotBlank(message = "权限字符不能为空")
|
@NotBlank(message = "权限字符不能为空")
|
||||||
@Size(min = 0, max = 100, message = "权限字符长度不能超过100个字符")
|
@Size(min = 0, max = 100, message = "权限字符长度不能超过100个字符")
|
||||||
public String getRoleKey()
|
private String roleKey;
|
||||||
{
|
|
||||||
return roleKey;
|
/**
|
||||||
|
* 角色排序
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "角色排序")
|
||||||
|
@NotNull(message = "显示顺序不能为空")
|
||||||
|
private Integer roleSort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限;5:仅本人数据权限)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "数据范围", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "1=所有数据权限,2=自定义数据权限,3=本部门数据权限,4=本部门及以下数据权限,5=仅本人数据权限")
|
||||||
|
private String dataScope;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 菜单树选择项是否关联显示( 0:父子不互相关联显示 1:父子互相关联显示)
|
||||||
|
*/
|
||||||
|
private Boolean menuCheckStrictly;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门树选择项是否关联显示(0:父子不互相关联显示 1:父子互相关联显示 )
|
||||||
|
*/
|
||||||
|
private Boolean deptCheckStrictly;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色状态(0正常 1停用)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "角色状态", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(dictType = "sys_normal_disable")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标志(0代表存在 2代表删除)
|
||||||
|
*/
|
||||||
|
@TableLogic
|
||||||
|
private String delFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户是否存在此角色标识 默认不存在
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private boolean flag = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 菜单组
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Long[] menuIds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门组(数据权限)
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Long[] deptIds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色菜单权限
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Set<String> permissions;
|
||||||
|
|
||||||
|
public SysRole(Long roleId) {
|
||||||
|
this.roleId = roleId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRoleKey(String roleKey)
|
public boolean isAdmin() {
|
||||||
{
|
return UserConstants.ADMIN_ID.equals(this.roleId);
|
||||||
this.roleKey = roleKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotBlank(message = "显示顺序不能为空")
|
|
||||||
public String getRoleSort()
|
|
||||||
{
|
|
||||||
return roleSort;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRoleSort(String roleSort)
|
|
||||||
{
|
|
||||||
this.roleSort = roleSort;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDataScope()
|
|
||||||
{
|
|
||||||
return dataScope;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDataScope(String dataScope)
|
|
||||||
{
|
|
||||||
this.dataScope = dataScope;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isMenuCheckStrictly()
|
|
||||||
{
|
|
||||||
return menuCheckStrictly;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMenuCheckStrictly(boolean menuCheckStrictly)
|
|
||||||
{
|
|
||||||
this.menuCheckStrictly = menuCheckStrictly;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isDeptCheckStrictly()
|
|
||||||
{
|
|
||||||
return deptCheckStrictly;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDeptCheckStrictly(boolean deptCheckStrictly)
|
|
||||||
{
|
|
||||||
this.deptCheckStrictly = deptCheckStrictly;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getStatus()
|
|
||||||
{
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setStatus(String status)
|
|
||||||
{
|
|
||||||
this.status = status;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDelFlag()
|
|
||||||
{
|
|
||||||
return delFlag;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDelFlag(String delFlag)
|
|
||||||
{
|
|
||||||
this.delFlag = delFlag;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isFlag()
|
|
||||||
{
|
|
||||||
return flag;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFlag(boolean flag)
|
|
||||||
{
|
|
||||||
this.flag = flag;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long[] getMenuIds()
|
|
||||||
{
|
|
||||||
return menuIds;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMenuIds(Long[] menuIds)
|
|
||||||
{
|
|
||||||
this.menuIds = menuIds;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long[] getDeptIds()
|
|
||||||
{
|
|
||||||
return deptIds;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDeptIds(Long[] deptIds)
|
|
||||||
{
|
|
||||||
this.deptIds = deptIds;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
|
||||||
.append("roleId", getRoleId())
|
|
||||||
.append("roleName", getRoleName())
|
|
||||||
.append("roleKey", getRoleKey())
|
|
||||||
.append("roleSort", getRoleSort())
|
|
||||||
.append("dataScope", getDataScope())
|
|
||||||
.append("menuCheckStrictly", isMenuCheckStrictly())
|
|
||||||
.append("deptCheckStrictly", isDeptCheckStrictly())
|
|
||||||
.append("status", getStatus())
|
|
||||||
.append("delFlag", getDelFlag())
|
|
||||||
.append("createBy", getCreateBy())
|
|
||||||
.append("createTime", getCreateTime())
|
|
||||||
.append("updateBy", getUpdateBy())
|
|
||||||
.append("updateTime", getUpdateTime())
|
|
||||||
.append("remark", getRemark())
|
|
||||||
.toString();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,328 +1,160 @@
|
|||||||
package com.ruoyi.common.core.domain.entity;
|
package com.ruoyi.common.core.domain.entity;
|
||||||
|
|
||||||
import java.util.Date;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import java.util.List;
|
import com.ruoyi.common.annotation.Sensitive;
|
||||||
|
import com.ruoyi.common.constant.UserConstants;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
import com.ruoyi.common.enums.SensitiveStrategy;
|
||||||
|
import com.ruoyi.common.xss.Xss;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
import javax.validation.constraints.Email;
|
import javax.validation.constraints.Email;
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.Size;
|
import javax.validation.constraints.Size;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import java.util.Date;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import java.util.List;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
import com.ruoyi.common.annotation.Excel;
|
|
||||||
import com.ruoyi.common.annotation.Excel.ColumnType;
|
|
||||||
import com.ruoyi.common.annotation.Excel.Type;
|
|
||||||
import com.ruoyi.common.annotation.Excels;
|
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户对象 sys_user
|
* 用户对象 sys_user
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author Lion Li
|
||||||
*/
|
*/
|
||||||
public class SysUser extends BaseEntity
|
|
||||||
{
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** 用户ID */
|
@Data
|
||||||
@Excel(name = "用户序号", cellType = ColumnType.NUMERIC, prompt = "用户编号")
|
@NoArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("sys_user")
|
||||||
|
public class SysUser extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "user_id")
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
/** 部门ID */
|
/**
|
||||||
@Excel(name = "部门编号", type = Type.IMPORT)
|
* 部门ID
|
||||||
|
*/
|
||||||
private Long deptId;
|
private Long deptId;
|
||||||
|
|
||||||
/** 用户账号 */
|
/**
|
||||||
@Excel(name = "登录名称")
|
* 用户账号
|
||||||
private String userName;
|
*/
|
||||||
|
@Xss(message = "用户账号不能包含脚本字符")
|
||||||
/** 用户昵称 */
|
|
||||||
@Excel(name = "用户名称")
|
|
||||||
private String nickName;
|
|
||||||
|
|
||||||
/** 用户邮箱 */
|
|
||||||
@Excel(name = "用户邮箱")
|
|
||||||
private String email;
|
|
||||||
|
|
||||||
/** 手机号码 */
|
|
||||||
@Excel(name = "手机号码")
|
|
||||||
private String phonenumber;
|
|
||||||
|
|
||||||
/** 用户性别 */
|
|
||||||
@Excel(name = "用户性别", readConverterExp = "0=男,1=女,2=未知")
|
|
||||||
private String sex;
|
|
||||||
|
|
||||||
/** 用户头像 */
|
|
||||||
private String avatar;
|
|
||||||
|
|
||||||
/** 密码 */
|
|
||||||
private String password;
|
|
||||||
|
|
||||||
/** 盐加密 */
|
|
||||||
private String salt;
|
|
||||||
|
|
||||||
/** 帐号状态(0正常 1停用) */
|
|
||||||
@Excel(name = "帐号状态", readConverterExp = "0=正常,1=停用")
|
|
||||||
private String status;
|
|
||||||
|
|
||||||
/** 删除标志(0代表存在 2代表删除) */
|
|
||||||
private String delFlag;
|
|
||||||
|
|
||||||
/** 最后登录IP */
|
|
||||||
@Excel(name = "最后登录IP", type = Type.EXPORT)
|
|
||||||
private String loginIp;
|
|
||||||
|
|
||||||
/** 最后登录时间 */
|
|
||||||
@Excel(name = "最后登录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Type.EXPORT)
|
|
||||||
private Date loginDate;
|
|
||||||
|
|
||||||
/** 部门对象 */
|
|
||||||
@Excels({
|
|
||||||
@Excel(name = "部门名称", targetAttr = "deptName", type = Type.EXPORT),
|
|
||||||
@Excel(name = "部门负责人", targetAttr = "leader", type = Type.EXPORT)
|
|
||||||
})
|
|
||||||
private SysDept dept;
|
|
||||||
|
|
||||||
/** 角色对象 */
|
|
||||||
private List<SysRole> roles;
|
|
||||||
|
|
||||||
/** 角色组 */
|
|
||||||
private Long[] roleIds;
|
|
||||||
|
|
||||||
/** 岗位组 */
|
|
||||||
private Long[] postIds;
|
|
||||||
|
|
||||||
public SysUser()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public SysUser(Long userId)
|
|
||||||
{
|
|
||||||
this.userId = userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getUserId()
|
|
||||||
{
|
|
||||||
return userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUserId(Long userId)
|
|
||||||
{
|
|
||||||
this.userId = userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isAdmin()
|
|
||||||
{
|
|
||||||
return isAdmin(this.userId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean isAdmin(Long userId)
|
|
||||||
{
|
|
||||||
return userId != null && 1L == userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getDeptId()
|
|
||||||
{
|
|
||||||
return deptId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDeptId(Long deptId)
|
|
||||||
{
|
|
||||||
this.deptId = deptId;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Size(min = 0, max = 30, message = "用户昵称长度不能超过30个字符")
|
|
||||||
public String getNickName()
|
|
||||||
{
|
|
||||||
return nickName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNickName(String nickName)
|
|
||||||
{
|
|
||||||
this.nickName = nickName;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotBlank(message = "用户账号不能为空")
|
@NotBlank(message = "用户账号不能为空")
|
||||||
@Size(min = 0, max = 30, message = "用户账号长度不能超过30个字符")
|
@Size(min = 0, max = 30, message = "用户账号长度不能超过30个字符")
|
||||||
public String getUserName()
|
private String userName;
|
||||||
{
|
|
||||||
return userName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUserName(String userName)
|
/**
|
||||||
{
|
* 用户昵称
|
||||||
this.userName = userName;
|
*/
|
||||||
}
|
@Xss(message = "用户昵称不能包含脚本字符")
|
||||||
|
@Size(min = 0, max = 30, message = "用户昵称长度不能超过30个字符")
|
||||||
|
private String nickName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户类型(sys_user系统用户)
|
||||||
|
*/
|
||||||
|
private String userType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户邮箱
|
||||||
|
*/
|
||||||
|
@Sensitive(strategy = SensitiveStrategy.EMAIL)
|
||||||
@Email(message = "邮箱格式不正确")
|
@Email(message = "邮箱格式不正确")
|
||||||
@Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符")
|
@Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符")
|
||||||
public String getEmail()
|
private String email;
|
||||||
{
|
|
||||||
return email;
|
/**
|
||||||
|
* 手机号码
|
||||||
|
*/
|
||||||
|
@Sensitive(strategy = SensitiveStrategy.PHONE)
|
||||||
|
private String phonenumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户性别
|
||||||
|
*/
|
||||||
|
private String sex;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户头像
|
||||||
|
*/
|
||||||
|
private String avatar;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 密码
|
||||||
|
*/
|
||||||
|
@TableField(
|
||||||
|
insertStrategy = FieldStrategy.NOT_EMPTY,
|
||||||
|
updateStrategy = FieldStrategy.NOT_EMPTY,
|
||||||
|
whereStrategy = FieldStrategy.NOT_EMPTY
|
||||||
|
)
|
||||||
|
private String password;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 帐号状态(0正常 1停用)
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标志(0代表存在 2代表删除)
|
||||||
|
*/
|
||||||
|
@TableLogic
|
||||||
|
private String delFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最后登录IP
|
||||||
|
*/
|
||||||
|
private String loginIp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最后登录时间
|
||||||
|
*/
|
||||||
|
private Date loginDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门对象
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private SysDept dept;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色对象
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<SysRole> roles;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色组
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Long[] roleIds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 岗位组
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Long[] postIds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据权限 当前角色ID
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Long roleId;
|
||||||
|
|
||||||
|
public SysUser(Long userId) {
|
||||||
|
this.userId = userId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setEmail(String email)
|
public boolean isAdmin() {
|
||||||
{
|
return UserConstants.ADMIN_ID.equals(this.userId);
|
||||||
this.email = email;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Size(min = 0, max = 11, message = "手机号码长度不能超过11个字符")
|
|
||||||
public String getPhonenumber()
|
|
||||||
{
|
|
||||||
return phonenumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPhonenumber(String phonenumber)
|
|
||||||
{
|
|
||||||
this.phonenumber = phonenumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSex()
|
|
||||||
{
|
|
||||||
return sex;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSex(String sex)
|
|
||||||
{
|
|
||||||
this.sex = sex;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAvatar()
|
|
||||||
{
|
|
||||||
return avatar;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAvatar(String avatar)
|
|
||||||
{
|
|
||||||
this.avatar = avatar;
|
|
||||||
}
|
|
||||||
|
|
||||||
@JsonIgnore
|
|
||||||
@JsonProperty
|
|
||||||
public String getPassword()
|
|
||||||
{
|
|
||||||
return password;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPassword(String password)
|
|
||||||
{
|
|
||||||
this.password = password;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSalt()
|
|
||||||
{
|
|
||||||
return salt;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSalt(String salt)
|
|
||||||
{
|
|
||||||
this.salt = salt;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getStatus()
|
|
||||||
{
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setStatus(String status)
|
|
||||||
{
|
|
||||||
this.status = status;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDelFlag()
|
|
||||||
{
|
|
||||||
return delFlag;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDelFlag(String delFlag)
|
|
||||||
{
|
|
||||||
this.delFlag = delFlag;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLoginIp()
|
|
||||||
{
|
|
||||||
return loginIp;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLoginIp(String loginIp)
|
|
||||||
{
|
|
||||||
this.loginIp = loginIp;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getLoginDate()
|
|
||||||
{
|
|
||||||
return loginDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLoginDate(Date loginDate)
|
|
||||||
{
|
|
||||||
this.loginDate = loginDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public SysDept getDept()
|
|
||||||
{
|
|
||||||
return dept;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDept(SysDept dept)
|
|
||||||
{
|
|
||||||
this.dept = dept;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<SysRole> getRoles()
|
|
||||||
{
|
|
||||||
return roles;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRoles(List<SysRole> roles)
|
|
||||||
{
|
|
||||||
this.roles = roles;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long[] getRoleIds()
|
|
||||||
{
|
|
||||||
return roleIds;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRoleIds(Long[] roleIds)
|
|
||||||
{
|
|
||||||
this.roleIds = roleIds;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long[] getPostIds()
|
|
||||||
{
|
|
||||||
return postIds;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPostIds(Long[] postIds)
|
|
||||||
{
|
|
||||||
this.postIds = postIds;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
|
||||||
.append("userId", getUserId())
|
|
||||||
.append("deptId", getDeptId())
|
|
||||||
.append("userName", getUserName())
|
|
||||||
.append("nickName", getNickName())
|
|
||||||
.append("email", getEmail())
|
|
||||||
.append("phonenumber", getPhonenumber())
|
|
||||||
.append("sex", getSex())
|
|
||||||
.append("avatar", getAvatar())
|
|
||||||
.append("password", getPassword())
|
|
||||||
.append("salt", getSalt())
|
|
||||||
.append("status", getStatus())
|
|
||||||
.append("delFlag", getDelFlag())
|
|
||||||
.append("loginIp", getLoginIp())
|
|
||||||
.append("loginDate", getLoginDate())
|
|
||||||
.append("createBy", getCreateBy())
|
|
||||||
.append("createTime", getCreateTime())
|
|
||||||
.append("updateBy", getUpdateBy())
|
|
||||||
.append("updateTime", getUpdateTime())
|
|
||||||
.append("remark", getRemark())
|
|
||||||
.append("dept", getDept())
|
|
||||||
.toString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package com.ruoyi.common.core.domain.event;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 登录事件
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class LogininforEvent implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户账号
|
||||||
|
*/
|
||||||
|
private String username;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 登录状态 0成功 1失败
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提示消息
|
||||||
|
*/
|
||||||
|
private String message;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求体
|
||||||
|
*/
|
||||||
|
private HttpServletRequest request;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 其他参数
|
||||||
|
*/
|
||||||
|
private Object[] args;
|
||||||
|
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user