Compare commits
983 Commits
release-QJ
...
master
Author | SHA1 | Date |
---|---|---|
|
e4b2f70ae3 | |
|
41b0dce852 | |
|
188470bc1d | |
|
92e3aa4c35 | |
|
5e136d1815 | |
|
7506665052 | |
|
fc2f0e84b2 | |
|
6ba2ef3a96 | |
|
2674c6278d | |
|
6e881fbff4 | |
|
135f0615f5 | |
|
a53c0cd791 | |
|
71d5ff0a24 | |
|
acf4ed75dc | |
|
b6ddd637db | |
|
383bec6e20 | |
|
3f0839b12c | |
|
3c99d1e76a | |
|
195802e87f | |
|
063390e255 | |
|
a987e8eda3 | |
|
919f543cbd | |
|
617c72771d | |
|
82cc6befaa | |
|
4035c96c83 | |
|
7465b7f890 | |
|
5c7b29ee04 | |
|
a946424275 | |
|
8de82f119f | |
|
979361b20c | |
|
540694a4e1 | |
|
8b8d8d5111 | |
|
58c4d6d5b2 | |
|
889f03189d | |
|
7eb06c1df6 | |
|
a549d87acd | |
|
88268b450b | |
|
51ff64fb2a | |
|
25197d9cb3 | |
|
3280d00472 | |
|
5dc6bc066a | |
|
d09be53f2b | |
|
b25d6df9a7 | |
|
0df75c019f | |
|
2fb1e406d6 | |
|
1de338c6b7 | |
|
8c102946d7 | |
|
331f034d9b | |
|
10e5b1d26c | |
|
1a896cf994 | |
|
2107b70d94 | |
|
f4490c3395 | |
|
50bc67c5d8 | |
|
97836b447f | |
|
9d2c3dfdac | |
|
1ff9891331 | |
|
25fae681ae | |
|
e14b053c72 | |
|
24fe9e7d35 | |
|
ebf60eabf7 | |
|
b4aea5974c | |
|
65756b458c | |
|
8536fadf2c | |
|
f0a3c85f43 | |
|
3898d0c7d5 | |
|
434e7ab82b | |
|
0d609c41b0 | |
|
d7b7bef4c2 | |
|
49ca3503eb | |
|
41e94ca677 | |
|
7411047ea3 | |
|
71956f9a36 | |
|
43fe7cf209 | |
|
d6d5ec0ee8 | |
|
32bad4adcb | |
|
1bf2e4141c | |
|
e6d5cacefa | |
|
f68ec04269 | |
|
18ace08ea9 | |
|
658d616cfb | |
|
a602539ec5 | |
|
08b02e9579 | |
|
3e5de3e936 | |
|
f0e3e60514 | |
|
4182d86fd4 | |
|
36aa19dd6e | |
|
f18229d58c | |
|
d77d4786aa | |
|
503c1a4a2b | |
|
554614aa4a | |
|
84e4c68413 | |
|
3a0525f11f | |
|
cacea459c1 | |
|
267d0e68bd | |
|
05f0d1d344 | |
|
6840c1d851 | |
|
35ed1f654f | |
|
6657c29c79 | |
|
f12b2d254a | |
|
18cbde111b | |
|
e484961576 | |
|
df6098f1dc | |
|
7fd4a83b52 | |
|
2892a2780f | |
|
2a7c42071a | |
|
b04d45b624 | |
|
09146b9acf | |
|
f5bc782097 | |
|
23e43ff248 | |
|
95bec59886 | |
|
4d98083434 | |
|
9f3777209c | |
|
b8078fd505 | |
|
d0860e57a5 | |
|
22f5907bc4 | |
|
c19cd5ca85 | |
|
943c620c55 | |
|
b6cd8ddcdd | |
|
d60bdd3bc8 | |
|
b391d109cd | |
|
5aab0908c4 | |
|
aa11b1fa96 | |
|
53a8eb614f | |
|
0e64331bc3 | |
|
8ec06d9199 | |
|
e7b8a9ef51 | |
|
7e66b50b79 | |
|
61ac109d2e | |
|
eb67bbf26e | |
|
66f803c73b | |
|
a4599b835e | |
|
fb0d42b02e | |
|
5bdb883947 | |
|
cdeee4b3b2 | |
|
2a52d139a6 | |
|
74cf29ad13 | |
|
86640d3b64 | |
|
fcaa0244c2 | |
|
7b2b7490fa | |
|
16ed058850 | |
|
926cd75cf6 | |
|
7c2935bb1b | |
|
8b280cef15 | |
|
d683f392f2 | |
|
4695b8e17e | |
|
01c2857be6 | |
|
5bd40bd487 | |
|
0df8267cb2 | |
|
1317b2828f | |
|
663580b8ae | |
|
92f615c730 | |
|
e79b2d3007 | |
|
e148aa5c57 | |
|
57537d50d3 | |
|
e25fecb164 | |
|
5096910ba3 | |
|
eb3ce91948 | |
|
cf164c57c7 | |
|
81ce2b70e0 | |
|
bb6aa0723e | |
|
76fe5d7fcd | |
|
f712b0ab0e | |
|
b281d05c5d | |
|
bbf51ea3f4 | |
|
70e42a8268 | |
|
9720ae85ef | |
|
78078e6d6f | |
|
614d3d6b43 | |
|
19a2123cee | |
|
11984e20e7 | |
|
c00895a848 | |
|
fae54caea1 | |
|
b19a9cb955 | |
|
78ab4ad0d0 | |
|
4436a74b60 | |
|
5ee01d88be | |
|
57f78cc7f5 | |
|
d46602b4f7 | |
|
87438838b5 | |
|
97eeba961a | |
|
88fbd32ee8 | |
|
d381ef1e51 | |
|
b32e28ca2c | |
|
15007cd2fc | |
|
913f4db051 | |
|
06b3368a9f | |
|
bdae9766dc | |
|
0d0443fddb | |
|
e1a6e7379d | |
|
18bf30fe83 | |
|
c28ef26e8e | |
|
808dc444b1 | |
|
4cb59e5d03 | |
|
f9e4efd84e | |
|
4e3f7cfab1 | |
|
f8870109c3 | |
|
e0fd45f15a | |
|
f5f0a7b735 | |
|
a7fe25c67d | |
|
0323b5ca3b | |
|
ecff092ea4 | |
|
09de55a641 | |
|
7ce614554f | |
|
0e81c0e257 | |
|
3ebfe8cd56 | |
|
23dd2d05df | |
|
794d90731a | |
|
8e4066e6e2 | |
|
1ddef32a83 | |
|
cbb75e58d8 | |
|
d3f73e62b1 | |
|
56733878da | |
|
b062a01afb | |
|
b51782e796 | |
|
b18bc89175 | |
|
4b707e9bc4 | |
|
f87efc7c20 | |
|
9612e48bbb | |
|
383eaaf14e | |
|
c633dd4a81 | |
|
490c8f87eb | |
|
0bf9f2a4b5 | |
|
441cdfb336 | |
|
86522a81a4 | |
|
6bd7303d82 | |
|
ebbaba0f59 | |
|
93630f99b4 | |
|
c83725bfa1 | |
|
106d85acf4 | |
|
9e550a896c | |
|
eab30a9a6d | |
|
3c658dba46 | |
|
1a87ac25f5 | |
|
76a6628865 | |
|
580055c688 | |
|
5d44d2c5ca | |
|
fc1a0f113f | |
|
1e0203472e | |
|
e4cb1b4a9d | |
|
b417eb04c8 | |
|
e150e33bfe | |
|
d1d1811fd3 | |
|
17ae71c72e | |
|
57225c0937 | |
|
1086b7d6a1 | |
|
0e0f016cd9 | |
|
b72899b658 | |
|
ee28d845f2 | |
|
bafa4f1aa4 | |
|
ec02aeef82 | |
|
46641a8696 | |
|
310795568c | |
|
176ac6d4b1 | |
|
e1fcf586e5 | |
|
bd58a29fca | |
|
bc6ec6be12 | |
|
541a2714b7 | |
|
3c7ce9cf24 | |
|
2e11fce1fd | |
|
ed8dcc9296 | |
|
bbe2631541 | |
|
39aa8bfd1d | |
|
eea8838963 | |
|
7e7b9d0ec0 | |
|
0a6317ec5c | |
|
a5866b13b1 | |
|
25af048f77 | |
|
c7b385cd67 | |
|
08b194c33d | |
|
3ef333f6ec | |
|
5a61625f6f | |
|
edf691a506 | |
|
6703d510b2 | |
|
97503e4a81 | |
|
7768c9ea49 | |
|
915e2371b1 | |
|
083bd15d91 | |
|
d517d57163 | |
|
ce74be1f6d | |
|
ec83350830 | |
|
184b0e2a14 | |
|
374392afb3 | |
|
d716b340e6 | |
|
55f673cacc | |
|
2eced5eadd | |
|
35339d7ebf | |
|
99b6da65af | |
|
1e95e722f9 | |
|
0cdcb0eec9 | |
|
db8da6b3ed | |
|
927a9bfd90 | |
|
874b45b29b | |
|
edf50b0a7a | |
|
9946294160 | |
|
d542c4675e | |
|
c15de686c0 | |
|
dfb5fffcef | |
|
b0a3a35396 | |
|
578bfc6710 | |
|
9912d73e70 | |
|
5eaca5d5dc | |
|
90e06fedc2 | |
|
eadf199649 | |
|
289ed3f4a3 | |
|
7fdef045ca | |
|
a395512a24 | |
|
ae746cd352 | |
|
4b6b1e2d6e | |
|
9ed1fd8f20 | |
|
fa3c2e4557 | |
|
e903eac47b | |
|
7ca930a12c | |
|
2d9dc116d6 | |
|
e4dea27c12 | |
|
ee8387f620 | |
|
dee2e909a4 | |
|
fe36e7d888 | |
|
5eddf6ad24 | |
|
4a3582748b | |
|
fa6c0e302f | |
|
ae88de413a | |
|
da261c6405 | |
|
719c9ace72 | |
|
e385ad798b | |
|
0b828ff38c | |
|
77f1f2e0d9 | |
|
570775ad1b | |
|
f2095cac40 | |
|
6029e86072 | |
|
30614bd223 | |
|
69e8428b2e | |
|
c9396cc163 | |
|
d3eb00b93d | |
|
4b3a61ed39 | |
|
fcee12335e | |
|
accc58a6b0 | |
|
840a78db95 | |
|
f581e761e8 | |
|
ab8508a0cb | |
|
fa3374a492 | |
|
fa3d6ba274 | |
|
7b0902435c | |
|
7369db6778 | |
|
85537a1dec | |
|
d106b8eeb4 | |
|
e63226e755 | |
|
5037b16123 | |
|
05cfdeefb3 | |
|
8b3ac481e9 | |
|
359a01e7ea | |
|
972c9da4cf | |
|
0109e5fbb9 | |
|
92bc630e4f | |
|
8ae21413f4 | |
|
2c20e23ba3 | |
|
892049c2cb | |
|
1d94e53866 | |
|
0df111ee42 | |
|
61827b87eb | |
|
f21df83abc | |
|
fd2fca1d90 | |
|
ede1f1fead | |
|
99477b8ede | |
|
ac2df1436d | |
|
eaf36fec5e | |
|
31c9c4de7b | |
|
08d5e498a0 | |
|
54431a131d | |
|
32cc5c184a | |
|
2232cd2eb9 | |
|
b8f2851dab | |
|
0b682fd3d7 | |
|
206368282d | |
|
9ed6fc4541 | |
|
5b8ca016c2 | |
|
3de89cd94e | |
|
500f0f148e | |
|
33054356d0 | |
|
0b1a110b22 | |
|
c0c417ca29 | |
|
647cc252d4 | |
|
affbfe1d88 | |
|
b14d9d5752 | |
|
fea8e572fd | |
|
4e8a7b2cdd | |
|
bf4fedc544 | |
|
b0651c755e | |
|
513dce940f | |
|
334a1efbd9 | |
|
bee6c5b895 | |
|
5bc293dd50 | |
|
4260dd6888 | |
|
17fac05da1 | |
|
ee5558d817 | |
|
1ccd30b337 | |
|
8ed5a6981f | |
|
27e25c9907 | |
|
ead25a3390 | |
|
801ea3a957 | |
|
67942d615b | |
|
311195f86d | |
|
1085708123 | |
|
5845c87e69 | |
|
3deea2b478 | |
|
63680b0b6f | |
|
6cc1ccaa5a | |
|
80c7f9aa8c | |
|
f4ba67baf9 | |
|
16d3d52005 | |
|
33ed7abc0d | |
|
816019e202 | |
|
d9da2119a6 | |
|
0675e5de8c | |
|
4e4a6a61e0 | |
|
5c3be3a19f | |
|
03ceefcd11 | |
|
edac104fbc | |
|
42d56b9dbc | |
|
24baec9cea | |
|
4204cf2e19 | |
|
2308252fd9 | |
|
1b1481e86a | |
|
a755e68ee6 | |
|
0028688ffb | |
|
500d564cd6 | |
|
c0fb0a7beb | |
|
d79ad95f6f | |
|
f78a64ee4e | |
|
cad6b19f02 | |
|
c4da4cc9dc | |
|
e1b1c3cbb1 | |
|
4a2e077dce | |
|
64033be9f2 | |
|
ac7ce48a8c | |
|
5524b909a9 | |
|
ddaeee11c7 | |
|
a3e6697500 | |
|
429c9ed6f1 | |
|
0a1302dbc6 | |
|
198c016099 | |
|
6dfcc4b90c | |
|
2c1334a4a9 | |
|
4d15c8ffa4 | |
|
0442af36ab | |
|
a7c1789eb2 | |
|
b12d75f2cd | |
|
0157c571ad | |
|
2819af41e2 | |
|
3ba8bd4ba8 | |
|
45a70fe238 | |
|
5daeab89dd | |
|
1f2865807a | |
|
d31b056292 | |
|
d9a80affcf | |
|
b6f0e08257 | |
|
361037cdbd | |
|
4b39a2da63 | |
|
d95e066b7d | |
|
bb55697dda | |
|
ed072c229d | |
|
80f5c1be1f | |
|
6a3b006cc1 | |
|
6fe9de3ac9 | |
|
d97e0c5ba5 | |
|
59852d3bd3 | |
|
9a288c91de | |
|
6270102c99 | |
|
2ab14c25d1 | |
|
6d814a2e2d | |
|
1b59098fa4 | |
|
d83a96ed63 | |
|
88607e9419 | |
|
a04d2213c4 | |
|
cc3af1218c | |
|
32071fe0ad | |
|
14d3413f1e | |
|
534a3a80f0 | |
|
23c9db651c | |
|
2f2bb8f440 | |
|
49b33137e6 | |
|
531cafc11c | |
|
7762b36e37 | |
|
30fd07591e | |
|
dcfe691fd3 | |
|
549cd8ff48 | |
|
76b7043bdf | |
|
b513d19b60 | |
|
e800937321 | |
|
1c0e5f05d5 | |
|
2e13e2c5b7 | |
|
582b5a0aee | |
|
bab4abe978 | |
|
988e71402c | |
|
5728ee8983 | |
|
763061caf8 | |
|
2da0738339 | |
|
986c6c7ab4 | |
|
cebb4e7beb | |
|
829bbcd588 | |
|
f608d88c9d | |
|
cea0a9744f | |
|
7150e86473 | |
|
3f49c7fecd | |
|
188709e4a5 | |
|
23015c318a | |
|
ec87210310 | |
|
94ffea202f | |
|
4814786ab3 | |
|
9e963aba7b | |
|
c911fd99b2 | |
|
0a94117088 | |
|
e9dc4404ca | |
|
db5b324eec | |
|
c5ccfef7d0 | |
|
fde8231177 | |
|
045b5861e7 | |
|
004e591076 | |
|
842827ad22 | |
|
4131b5e51d | |
|
78c82af2dc | |
|
612331e5e9 | |
|
e20e51a3b1 | |
|
09a3f34f12 | |
|
393e3ee1d6 | |
|
144151fc0c | |
|
7b6dac9bd5 | |
|
e0563c17c8 | |
|
b6324ba2b9 | |
|
62e3d6b54a | |
|
23c20628d9 | |
|
861dbee3b0 | |
|
f9937cd32c | |
|
d3e93c7c7b | |
|
be7a2f80bd | |
|
33641b85d8 | |
|
2422950925 | |
|
a0b25da459 | |
|
a242a2b395 | |
|
fb40cfff10 | |
|
e50cda5478 | |
|
d003d2aaac | |
|
a3c07e0392 | |
|
1cae5ea56d | |
|
b268c4a9e1 | |
|
d5fbb09d77 | |
|
d10e2ec4fa | |
|
c0b601130b | |
|
159fa782c0 | |
|
8c076f95bd | |
|
db9acc1cde | |
|
635e3cdcb7 | |
|
bf1459a778 | |
|
efb02ff3bb | |
|
bcf426bfda | |
|
e83c02e161 | |
|
9ae9d5ccf4 | |
|
d42bfba824 | |
|
a320208253 | |
|
03cc7d445c | |
|
a9ae7ed140 | |
|
2e08a6b26b | |
|
19206c564a | |
|
be1c6919be | |
|
f163b1becf | |
|
368401f35a | |
|
f27843d493 | |
|
4de4630dbc | |
|
55d5e7f4fe | |
|
9a407f2293 | |
|
459a55f658 | |
|
28c7523223 | |
|
f65cbcb461 | |
|
8d516e4882 | |
|
fb49d646ef | |
|
98b6f3d9d9 | |
|
b1ab285f75 | |
|
625267d354 | |
|
41d967c910 | |
|
04c769c84b | |
|
2ddcf5c827 | |
|
118864f50c | |
|
678ed236be | |
|
ad05215260 | |
|
b455118844 | |
|
3d255edb0f | |
|
5cf09ff1a7 | |
|
62a8abd29a | |
|
693e07588c | |
|
0b96082364 | |
|
435c5529a3 | |
|
73ac43e97f | |
|
5ade081cf2 | |
|
b112e5ab6e | |
|
df915cbf4d | |
|
24f521f5ad | |
|
4172a5a934 | |
|
12f63aac31 | |
|
8142953979 | |
|
4d30f25b47 | |
|
64f1ddbf39 | |
|
c617cde4c3 | |
|
8f37290072 | |
|
26c0a7cd99 | |
|
452b89e239 | |
|
bd2c4823ae | |
|
5c3aaea05d | |
|
daf3e32724 | |
|
819890dff2 | |
|
780bf046d0 | |
|
5f5df6f868 | |
|
7e69d580d1 | |
|
d1770d5326 | |
|
0cf1d3cb60 | |
|
c0fab60865 | |
|
d1e8e104c6 | |
|
c6f32ddff8 | |
|
9ac5b21c60 | |
|
f10e36031f | |
|
8f6263814c | |
|
fe30ec09e8 | |
|
712455ebe2 | |
|
e547a84f5a | |
|
da31d6522d | |
|
4bc7ccb12a | |
|
045e663ca6 | |
|
d2e22eb856 | |
|
bc1b9b0ffe | |
|
181fd03e17 | |
|
b02d5ad53c | |
|
01c6a52089 | |
|
8515419fed | |
|
c9c32da5be | |
|
e8c39fb25e | |
|
7192fe8313 | |
|
c010555e0d | |
|
735acfb0d1 | |
|
e2a216919d | |
|
8c38717f73 | |
|
9fe03299a4 | |
|
feb1b3b90c | |
|
31d4c3d38e | |
|
70af25a63f | |
|
2c49fbff42 | |
|
dd85f12e79 | |
|
2454ea3684 | |
|
97ebce39ac | |
|
6e594b08a7 | |
|
9eff344f7e | |
|
921180b5c4 | |
|
6187cf8fc9 | |
|
7538d5fbe0 | |
|
1ba16e0e4b | |
|
34d1f87a51 | |
|
97be2c0eff | |
|
e3bd7cbbfa | |
|
0d64c69596 | |
|
ec692efaa3 | |
|
c9bd585d57 | |
|
ac3eaa58b6 | |
|
4041a2d4f8 | |
|
fb10318b29 | |
|
e5dfcfe398 | |
|
5d141b3b78 | |
|
488ac6be60 | |
|
bcd344c433 | |
|
9575a7eb93 | |
|
dc495b82f8 | |
|
a099b9e4a9 | |
|
2e8705b8b0 | |
|
37c74dfeee | |
|
eefed96ad5 | |
|
29a7766945 | |
|
722b2e1a52 | |
|
78f41e4aa0 | |
|
6321500dd7 | |
|
5fbb942a26 | |
|
bddefe3971 | |
|
43fdbf1d03 | |
|
1867653767 | |
|
4bb1612b3f | |
|
a028c1fbf8 | |
|
5812d7a3a8 | |
|
8262b0c83e | |
|
9f67ac65b8 | |
|
43b48fc9ae | |
|
06dae58db1 | |
|
8d8e3977ac | |
|
0a13ba4744 | |
|
e510054076 | |
|
36d71bfb89 | |
|
7ef09fae6c | |
|
4d83bf470b | |
|
30c4dc9b91 | |
|
22b3d760b6 | |
|
7ea6d0a4e1 | |
|
928afdf0d5 | |
|
4c3a0da671 | |
|
35ae9a84d7 | |
|
b22e097fe0 | |
|
95c963a4e5 | |
|
45bf73114e | |
|
4202871c29 | |
|
667e482687 | |
|
721bccf3af | |
|
626d0c6cc1 | |
|
37e54d121a | |
|
35fb697651 | |
|
a34d621f42 | |
|
729fb3bde0 | |
|
8d55776c70 | |
|
47c98c1466 | |
|
6d5eac8cd0 | |
|
8da9dd0fb6 | |
|
57b3e9519a | |
|
a9dd132586 | |
|
79175dcbe2 | |
|
364c718cd2 | |
|
b2b4192d55 | |
|
3a8621825d | |
|
e13b87d202 | |
|
f0fff56a6b | |
|
e1c6cf7a1e | |
|
94d3e1201e | |
|
eb47622725 | |
|
e8b39af55f | |
|
32fbf10c92 | |
|
add11c0327 | |
|
213eadefec | |
|
fef2976c1f | |
|
0e49f723da | |
|
8d119f9897 | |
|
4010fb8efb | |
|
b7bede8921 | |
|
fdfce4e56d | |
|
cd3817dfb3 | |
|
69c24b83c9 | |
|
bef576efe5 | |
|
344a6cbca0 | |
|
111000c55e | |
|
45e4d734fb | |
|
1645f5f657 | |
|
91b174f296 | |
|
c620323461 | |
|
b00359b60d | |
|
8fb2867b94 | |
|
bc359dca8d | |
|
54835998dc | |
|
e8b824c6a0 | |
|
09e72eb0ee | |
|
f171685d1c | |
|
1a3c75299d | |
|
673df763b5 | |
|
099dfc483a | |
|
f0bf03b368 | |
|
425d4ce180 | |
|
dca64218c1 | |
|
0cd470f233 | |
|
18f13a6cca | |
|
fe9184cf8d | |
|
a0c249719a | |
|
09a3523432 | |
|
af80525198 | |
|
c3cee0dc58 | |
|
11a121cc63 | |
|
533498797a | |
|
301565d8c8 | |
|
65fda668bf | |
|
ca3cbdc6e5 | |
|
38134e2f0a | |
|
0aabbb8c50 | |
|
ef1718360e | |
|
261f91683f | |
|
08adc81d1d | |
|
acdf57a0f8 | |
|
e2cb79b4ec | |
|
4c889a5a52 | |
|
5159ed3f19 | |
|
eb7ccebf90 | |
|
2da705ec22 | |
|
aeee739b8f | |
|
5b3fea70eb | |
|
49cdbbb3f7 | |
|
4b3e6fd04c | |
|
d0c05b4f78 | |
|
98b8eac888 | |
|
be80b0c629 | |
|
ba8320708a | |
|
f66aac9d30 | |
|
b0ac8c8545 | |
|
f493ce3f64 | |
|
863eb5ef09 | |
|
57170ae810 | |
|
6846a32769 | |
|
1432ab640f | |
|
3f72af3757 | |
|
b03289d10f | |
|
80a0e2794d | |
|
f0954645b4 | |
|
c73df8dceb | |
|
614c49083e | |
|
38c0b41433 | |
|
cae1be17c6 | |
|
217d432b72 | |
|
59b7dc6134 | |
|
1ddbd95d30 | |
|
e769dedd17 | |
|
8584152673 | |
|
86622f169c | |
|
c972da88f5 | |
|
80e1b2ebc1 | |
|
ce976d3353 | |
|
562b8dfe3e | |
|
9e081f6340 | |
|
9ac820c4b9 | |
|
bf0398fe91 | |
|
d6d5c09bbe | |
|
28cf98e763 | |
|
9ca7df8578 | |
|
d63be129b1 | |
|
2f8c01b633 | |
|
8239fe5d4a | |
|
bae10baf5d | |
|
c3d4b2577d | |
|
2d1506ba8d | |
|
91627fac3f | |
|
44b19579b9 | |
|
7c5e40c472 | |
|
5a3ea87d61 | |
|
7698ce5a1c | |
|
ae385233ec | |
|
9614a69a22 | |
|
01b9dd7a1e | |
|
d9a1ae8034 | |
|
9341dc1089 | |
|
9c15d0ed15 | |
|
b8017288e8 | |
|
ce8f10046d | |
|
3b9e40ad9c | |
|
33b54ae7b9 | |
|
94ddc1be82 | |
|
f7be77741b | |
|
47ca087360 | |
|
1ba3c042cf | |
|
3562d92a9a | |
|
62d4051ec8 | |
|
325301acf7 | |
|
22ba715cc4 | |
|
601edacebe | |
|
41589aca4a | |
|
68ddbae784 | |
|
360f0cdaab | |
|
46ea84fa94 | |
|
99cbd930c6 | |
|
aea2b8e607 | |
|
ca1f843606 | |
|
e3dbedf24a | |
|
f90833ae1a | |
|
d0ecd71a46 | |
|
e800e1889c | |
|
de4d10fafd | |
|
bf98514e1a | |
|
ecdbe52334 | |
|
5e09284d83 | |
|
fe5aac13fd | |
|
0d01ea8c0e | |
|
8d5b161e97 | |
|
25e09a944b | |
|
ce0fcb99bf | |
|
ad3b64481f | |
|
ab75bbdc72 | |
|
fc0fb71ad0 | |
|
76a80d6a97 | |
|
69f31a3ba4 | |
|
5911328cc7 | |
|
9de164f9dd | |
|
acd45aa741 | |
|
8349517e97 | |
|
f750a4e60f | |
|
2935c2b1e4 | |
|
aee783baea | |
|
1e3fabc46f | |
|
9169775718 | |
|
887a7cda0c | |
|
eb26862702 | |
|
ff5518bd3a | |
|
57282285cc | |
|
fedee6e7c7 | |
|
1a99c85e85 | |
|
74fef7fdc6 | |
|
a90a478348 | |
|
c7bc96432e | |
|
e479aa590a | |
|
b312858d40 | |
|
5c4f33d3a1 | |
|
12e70675c8 | |
|
3fd62056ba | |
|
e2b1a42ca2 | |
|
2f33a5bbe6 | |
|
bd3c725e4d | |
|
db09c2ecc4 | |
|
f92bfce833 | |
|
1c639942ed | |
|
b65040af7e | |
|
4b0e8c22de | |
|
d772e73f81 | |
|
c569af0bd7 | |
|
22809d7984 | |
|
4390e3e7db | |
|
d754d42b9d | |
|
5855df9240 | |
|
350b0dc3a2 | |
|
924b987156 | |
|
a2f043fb05 | |
|
22ed63278a | |
|
2a84ecf4f4 | |
|
fd2b4bcfd9 | |
|
3aa8d0c326 | |
|
0806d2b902 | |
|
5cd8fc1629 | |
|
f0fb88d86f | |
|
ee8842c13a | |
|
902c9435a6 | |
|
3b0d371ec1 | |
|
5a9dd7a4d5 | |
|
0c49b3ebbf | |
|
81948f4693 | |
|
37f742cca2 | |
|
ecd008d846 | |
|
5528dbebbe | |
|
b14089affb | |
|
210209b94d | |
|
69378a96d8 | |
|
173626490e | |
|
182f598d84 | |
|
02c503c977 | |
|
8297b05081 | |
|
642616c424 | |
|
81347cd0e6 | |
|
001f5921a5 | |
|
954b7556a7 | |
|
e554f58fa2 | |
|
8fae244170 | |
|
f383b62864 | |
|
60b0f2225d | |
|
c9c591a582 | |
|
02a07ec1c8 | |
|
3da4d11857 | |
|
4f60ca085f | |
|
1fe48553f6 | |
|
9a1e482a80 | |
|
2c92d56547 | |
|
60d7f5d5ac | |
|
9c5064c4c3 | |
|
964a1e7ca8 | |
|
7b548051f8 | |
|
f109b2126e | |
|
f5abd580ff | |
|
c65c75ac69 | |
|
0ef303540e | |
|
93af3948be | |
|
81bb7132b1 | |
|
c824c008fc | |
|
9484a6e598 | |
|
8bda9c416f | |
|
193b73f0be | |
|
6004c0c8f1 | |
|
5b05c4b9ab | |
|
bfc1869d5f | |
|
41e69b820c | |
|
d1525e0651 | |
|
a901aa4ee6 | |
|
df57e0b249 | |
|
0eac1de73d | |
|
72c5cd9414 | |
|
030cd53eb5 | |
|
cd99e6ec50 | |
|
05d5557a90 | |
|
14ac39c61d | |
|
08ff785719 | |
|
e1c7c3fff3 | |
|
5ec8eb4cce | |
|
bda547f321 | |
|
7c33399891 |
|
@ -16,7 +16,7 @@ indent_size = 4
|
|||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
charset = utf-8-bom
|
||||
[*.{json,yml,xml}]
|
||||
[*.{json,yml,xml,csproj,props}]
|
||||
indent_size = 2
|
||||
###############################
|
||||
# .NET Coding Conventions #
|
||||
|
@ -123,9 +123,13 @@ csharp_space_between_method_call_empty_parameter_list_parentheses = false
|
|||
# Wrapping preferences
|
||||
csharp_preserve_single_line_statements = true
|
||||
csharp_preserve_single_line_blocks = true
|
||||
csharp_style_namespace_declarations=file_scoped:silent
|
||||
###############################
|
||||
# VB Coding Conventions #
|
||||
###############################
|
||||
[*.vb]
|
||||
# Modifier preferences
|
||||
visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async:suggestion
|
||||
[*.cs]
|
||||
# Add file header
|
||||
file_header_template = Copyright (c) Argo Zhang (argo@163.com). All rights reserved.\nLicensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.\nWebsite: https://admin.blazor.zone
|
|
@ -14,6 +14,6 @@ jobs:
|
|||
- name: Setup .NET Core
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 3.0.100
|
||||
dotnet-version: 5.0.103
|
||||
- name: Build with dotnet
|
||||
run: dotnet build src/admin/Bootstrap.Admin/ --configuration Release
|
|
@ -12,4 +12,4 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Build the Docker image
|
||||
run: docker build . --file src/admin/Bootstrap.Admin/Linux.Dockerfile --tag ba:$(date +%s)
|
||||
run: docker build . --file src/admin/Bootstrap.Admin/Dockerfile --tag ba:$(date +%s)
|
||||
|
|
|
@ -85,7 +85,6 @@ StyleCopReport.xml
|
|||
*.tmp
|
||||
*.tmp_proj
|
||||
*_wpftmp.csproj
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
|
@ -348,10 +347,10 @@ ASALocalRun/
|
|||
|
||||
# Net Core Keys
|
||||
**/[Kk]eys/*.xml
|
||||
Bootstrap.*.xml
|
||||
Bootstrap*.xml
|
||||
|
||||
###### -- Custom Ignore Section, Make sure all files you add to the git repo are below this line -- ######
|
||||
|
||||
# Coverage
|
||||
coverage*.xml
|
||||
tools/
|
||||
tools/
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"solution": {
|
||||
"path": "BootstrapAdmin.sln",
|
||||
"projects": [
|
||||
"src\\blazor\\admin\\BootstrapAdmin.Caching\\BootstrapAdmin.Caching.csproj",
|
||||
"src\\blazor\\admin\\BootstrapAdmin.DataAccess.Models\\BootstrapAdmin.DataAccess.Models.csproj",
|
||||
"src\\blazor\\admin\\BootstrapAdmin.DataAccess.PetaPoco\\BootstrapAdmin.DataAccess.PetaPoco.csproj",
|
||||
"src\\blazor\\admin\\BootstrapAdmin.Web.Core\\BootstrapAdmin.Web.Core.csproj",
|
||||
"src\\blazor\\admin\\BootstrapAdmin.Web\\BootstrapAdmin.Web.csproj",
|
||||
"src\\blazor\\client\\BootstrapClient.DataAccess\\BootstrapClient.DataAccess.PetaPoco.csproj",
|
||||
"src\\blazor\\client\\BootstrapClient.Shared\\BootstrapClient.Web.Shared.csproj",
|
||||
"src\\blazor\\client\\BootstrapClient.Web.Core\\BootstrapClient.Web.Core.csproj",
|
||||
"src\\blazor\\client\\BootstrapClient.Web.Models\\BootstrapClient.DataAccess.Models.csproj",
|
||||
"src\\blazor\\client\\BootstrapClient.Web\\BootstrapClient.Web.csproj",
|
||||
"src\\mvc\\admin\\Bootstrap.Admin\\Bootstrap.Admin.csproj",
|
||||
"src\\mvc\\admin\\Bootstrap.DataAccess\\Bootstrap.DataAccess.csproj",
|
||||
"test\\UnitTest\\UnitTest.csproj"
|
||||
]
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.29215.179
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.0.31903.59
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SQLServer", "SQLServer", "{87319AF5-7C40-4362-B67C-35F9DD737DB4}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
|
@ -10,15 +10,15 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SQLServer", "SQLServer", "{
|
|||
db\SqlServer\Install.sql = db\SqlServer\Install.sql
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bootstrap.Admin", "src\admin\Bootstrap.Admin\Bootstrap.Admin.csproj", "{7B2B7043-3CB2-4C5A-BDF2-8C47F1A5471A}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bootstrap.Admin", "src\mvc\admin\Bootstrap.Admin\Bootstrap.Admin.csproj", "{7B2B7043-3CB2-4C5A-BDF2-8C47F1A5471A}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "db", "db", "{586410F2-C1F0-47CD-AB28-2CF506DED2C8}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bootstrap.Client", "src\client\Bootstrap.Client\Bootstrap.Client.csproj", "{C82A6E45-AB90-43D1-8429-5CBE953D8151}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bootstrap.Client", "src\mvc\client\Bootstrap.Client\Bootstrap.Client.csproj", "{C82A6E45-AB90-43D1-8429-5CBE953D8151}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "client", "client", "{C7F51A14-2D89-4D1F-AD78-C42B79AB0BF0}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bootstrap.DataAccess", "src\admin\Bootstrap.DataAccess\Bootstrap.DataAccess.csproj", "{8D62BE79-BE13-43C8-969B-C9B00B3C84B7}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bootstrap.DataAccess", "src\mvc\admin\Bootstrap.DataAccess\Bootstrap.DataAccess.csproj", "{8D62BE79-BE13-43C8-969B-C9B00B3C84B7}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SQLite", "SQLite", "{523515EC-2AD7-4282-9AF4-9D20371183B0}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
|
@ -26,7 +26,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SQLite", "SQLite", "{523515
|
|||
db\SQLite\Install.sql = db\SQLite\Install.sql
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bootstrap.DataAccess.MongoDB", "src\admin\Bootstrap.DataAccess.MongoDB\Bootstrap.DataAccess.MongoDB.csproj", "{8336F096-4B4A-4710-A1FA-0F5E44CD8D26}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bootstrap.DataAccess.MongoDB", "src\mvc\admin\Bootstrap.DataAccess.MongoDB\Bootstrap.DataAccess.MongoDB.csproj", "{8336F096-4B4A-4710-A1FA-0F5E44CD8D26}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MongoDB", "MongoDB", "{A06A0AD8-A246-4329-B024-7174AE4A3EDE}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
|
@ -57,9 +57,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Postgresql", "Postgresql",
|
|||
db\Postgresql\install.sql = db\Postgresql\install.sql
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bootstrap.Client.DataAccess", "src\client\Bootstrap.Client.DataAccess\Bootstrap.Client.DataAccess.csproj", "{843811A2-FE49-410F-BF9F-9F1FB14A1DEE}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bootstrap.Client.DataAccess", "src\mvc\client\Bootstrap.Client.DataAccess\Bootstrap.Client.DataAccess.csproj", "{843811A2-FE49-410F-BF9F-9F1FB14A1DEE}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bootstrap.Client.DataAccess.MongoDB", "src\client\Bootstrap.Client.DataAccess.MongoDB\Bootstrap.Client.DataAccess.MongoDB.csproj", "{BC1C6D63-ADA9-4C3B-89F0-CEB191A86BF5}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bootstrap.Client.DataAccess.MongoDB", "src\mvc\client\Bootstrap.Client.DataAccess.MongoDB\Bootstrap.Client.DataAccess.MongoDB.csproj", "{BC1C6D63-ADA9-4C3B-89F0-CEB191A86BF5}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{6AD32A76-F3AA-423E-96EA-E5CC679934D1}"
|
||||
EndProject
|
||||
|
@ -67,13 +67,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{41B6D37A-5E5
|
|||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "admin", "admin", "{E03B7391-B52F-4449-B400-5CD9DE01F085}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{D8F90830-15D0-4031-94EE-6E5D93CB734A}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
appveyor.build.ps1 = appveyor.build.ps1
|
||||
appveyor.test.ps1 = appveyor.test.ps1
|
||||
appveyor.yml = appveyor.yml
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{E057452E-00EB-4C46-9F8D-14096AAE8148}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
README.md = README.md
|
||||
|
@ -81,46 +74,97 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{E057452E-0
|
|||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docker", "docker", "{85574E7C-7D58-4135-AB4B-76678552D271}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
src\admin\Bootstrap.Admin\Dockerfile = src\admin\Bootstrap.Admin\Dockerfile
|
||||
src\admin\Bootstrap.Admin\Linux.Dockerfile = src\admin\Bootstrap.Admin\Linux.Dockerfile
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcipts", "srcipts", "{72C103DB-E1D3-449F-97C2-DF12CA111FD4}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "win", "win", "{C6F2DCA0-7941-4C28-9328-2D495F5DCB00}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
publish-admin.cmd = publish-admin.cmd
|
||||
publish-client.cmd = publish-client.cmd
|
||||
watch-run-admin.cmd = watch-run-admin.cmd
|
||||
watch-run-client.cmd = watch-run-client.cmd
|
||||
scripts\windows\publish-admin.cmd = scripts\windows\publish-admin.cmd
|
||||
scripts\windows\publish-client.cmd = scripts\windows\publish-client.cmd
|
||||
scripts\windows\watch-run-admin.cmd = scripts\windows\watch-run-admin.cmd
|
||||
scripts\windows\watch-run-client.cmd = scripts\windows\watch-run-client.cmd
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "linux", "linux", "{FDCFC3E3-14CF-40B2-9FE5-5BC239AAC110}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
deploy-admin.sh = deploy-admin.sh
|
||||
deploy-client.sh = deploy-client.sh
|
||||
init.sh = init.sh
|
||||
publish-admin.sh = publish-admin.sh
|
||||
publish-client.sh = publish-client.sh
|
||||
watch-run-admin.sh = watch-run-admin.sh
|
||||
watch-run-client.sh = watch-run-client.sh
|
||||
scripts\linux\deploy-admin.sh = scripts\linux\deploy-admin.sh
|
||||
scripts\linux\deploy-client.sh = scripts\linux\deploy-client.sh
|
||||
scripts\linux\init.sh = scripts\linux\init.sh
|
||||
scripts\linux\publish-admin.sh = scripts\linux\publish-admin.sh
|
||||
scripts\linux\publish-client.sh = scripts\linux\publish-client.sh
|
||||
scripts\linux\watch-run-admin.sh = scripts\linux\watch-run-admin.sh
|
||||
scripts\linux\watch-run-client.sh = scripts\linux\watch-run-client.sh
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ci", "ci", "{5F732D4E-133B-4DA6-811B-C369CDC3FB89}"
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "appveyor", "appveyor", "{5F732D4E-133B-4DA6-811B-C369CDC3FB89}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
appveyor.build.ps1 = appveyor.build.ps1
|
||||
appveyor.test.ps1 = appveyor.test.ps1
|
||||
scripts\appveyor\appveyor.build.ps1 = scripts\appveyor\appveyor.build.ps1
|
||||
scripts\appveyor\appveyor.install.ps1 = scripts\appveyor\appveyor.install.ps1
|
||||
scripts\appveyor\appveyor.test.ps1 = scripts\appveyor\appveyor.test.ps1
|
||||
appveyor.yml = appveyor.yml
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "services", "services", "{68F7C160-3FB2-4129-8F89-96F78B2DA0A9}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
services\ba.admin.service = services\ba.admin.service
|
||||
services\ba.client.service = services\ba.client.service
|
||||
services\nginx.service = services\nginx.service
|
||||
scripts\linux\services\ba.admin.service = scripts\linux\services\ba.admin.service
|
||||
scripts\linux\services\ba.client.service = scripts\linux\services\ba.client.service
|
||||
scripts\linux\services\nginx.service = scripts\linux\services\nginx.service
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Oracle", "Oracle", "{41E078CA-F005-4B66-B440-FD7EB731AD61}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
db\Oracle\InitData.sql = db\Oracle\InitData.sql
|
||||
db\Oracle\Install.sql = db\Oracle\Install.sql
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "git", "git", "{64EACBD1-23DD-4168-BEED-55D47DB1A8BB}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
scripts\git\commit_msg_template.txt = scripts\git\commit_msg_template.txt
|
||||
scripts\git\readme.md = scripts\git\readme.md
|
||||
scripts\git\run.cmd = scripts\git\run.cmd
|
||||
scripts\git\run.sh = scripts\git\run.sh
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "blazor", "blazor", "{DAE3826B-AAAB-468A-9A06-2F56EF5C0767}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "github", "github", "{C07631B9-5E5E-417A-9A16-3C88956D574E}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
.github\workflows\build.yml = .github\workflows\build.yml
|
||||
.github\workflows\docker.yml = .github\workflows\docker.yml
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "mvc", "mvc", "{C996F427-DA93-49D6-9804-4E665D195FC2}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "admin", "admin", "{45ADEF9B-C8BD-4224-9E12-F6716E85A22C}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "client", "client", "{55A2459A-6BDE-4493-B2C0-5BE1673E99EE}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BootstrapAdmin.Web", "src\blazor\admin\BootstrapAdmin.Web\BootstrapAdmin.Web.csproj", "{EF5EF5A4-616A-4BA7-9E1E-1407E8EC0395}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BootstrapAdmin.DataAccess.EFCore", "src\blazor\admin\BootstrapAdmin.DataAccess.EFCore\BootstrapAdmin.DataAccess.EFCore.csproj", "{D8ED2DF7-F7E1-4DE7-B097-D0BEE51D58E9}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BootstrapAdmin.DataAccess.Models", "src\blazor\admin\BootstrapAdmin.DataAccess.Models\BootstrapAdmin.DataAccess.Models.csproj", "{7E3861AB-F797-4A9F-B7CE-0E35751FFCD9}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BootstrapAdmin.DataAccess.PetaPoco", "src\blazor\admin\BootstrapAdmin.DataAccess.PetaPoco\BootstrapAdmin.DataAccess.PetaPoco.csproj", "{20D03C52-0F8B-47B6-BCA8-CF0812F82722}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BootstrapAdmin.Web.Core", "src\blazor\admin\BootstrapAdmin.Web.Core\BootstrapAdmin.Web.Core.csproj", "{DA143654-C258-410D-B5DC-FE446ED99CE4}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BootstrapClient.DataAccess.PetaPoco", "src\blazor\client\BootstrapClient.DataAccess\BootstrapClient.DataAccess.PetaPoco.csproj", "{640F598B-6586-4AD6-B544-78CFF2602DFB}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BootstrapClient.Web.Shared", "src\blazor\client\BootstrapClient.Shared\BootstrapClient.Web.Shared.csproj", "{93770088-3463-427B-9CD8-88B8D7945C83}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BootstrapClient.Web", "src\blazor\client\BootstrapClient.Web\BootstrapClient.Web.csproj", "{6CD7A35B-93A8-4DB2-B078-EE5A81F40032}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BootStarpAdmin.DataAccess.FreeSql", "src\blazor\admin\BootStarpAdmin.DataAccess.FreeSql\BootStarpAdmin.DataAccess.FreeSql.csproj", "{11122D97-B349-4A3E-B7DD-73B8B363C47C}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BootStarpAdmin.DataAccess.SqlSugar", "src\blazor\admin\BootStarpAdmin.DataAccess.SqlSugar\BootStarpAdmin.DataAccess.SqlSugar.csproj", "{1D20E6CF-9825-4CDE-B732-AE586BD1AABA}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BootstrapClient.Web.Core", "src\blazor\client\BootstrapClient.Web.Core\BootstrapClient.Web.Core.csproj", "{FFDF9FF9-0B29-47D3-AD42-53A476B570EC}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BootstrapClient.DataAccess.Models", "src\blazor\client\BootstrapClient.Web.Models\BootstrapClient.DataAccess.Models.csproj", "{CC3DF23A-2880-438F-BDEB-DB093E919ABA}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BootstrapAdmin.Caching", "src\blazor\admin\BootstrapAdmin.Caching\BootstrapAdmin.Caching.csproj", "{ADD20515-1C1C-418B-84F6-8B05A7AA315B}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
@ -155,6 +199,58 @@ Global
|
|||
{BC1C6D63-ADA9-4C3B-89F0-CEB191A86BF5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{BC1C6D63-ADA9-4C3B-89F0-CEB191A86BF5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BC1C6D63-ADA9-4C3B-89F0-CEB191A86BF5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{EF5EF5A4-616A-4BA7-9E1E-1407E8EC0395}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EF5EF5A4-616A-4BA7-9E1E-1407E8EC0395}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EF5EF5A4-616A-4BA7-9E1E-1407E8EC0395}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EF5EF5A4-616A-4BA7-9E1E-1407E8EC0395}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D8ED2DF7-F7E1-4DE7-B097-D0BEE51D58E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D8ED2DF7-F7E1-4DE7-B097-D0BEE51D58E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D8ED2DF7-F7E1-4DE7-B097-D0BEE51D58E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D8ED2DF7-F7E1-4DE7-B097-D0BEE51D58E9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{7E3861AB-F797-4A9F-B7CE-0E35751FFCD9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{7E3861AB-F797-4A9F-B7CE-0E35751FFCD9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7E3861AB-F797-4A9F-B7CE-0E35751FFCD9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7E3861AB-F797-4A9F-B7CE-0E35751FFCD9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{20D03C52-0F8B-47B6-BCA8-CF0812F82722}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{20D03C52-0F8B-47B6-BCA8-CF0812F82722}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{20D03C52-0F8B-47B6-BCA8-CF0812F82722}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{20D03C52-0F8B-47B6-BCA8-CF0812F82722}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{DA143654-C258-410D-B5DC-FE446ED99CE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DA143654-C258-410D-B5DC-FE446ED99CE4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DA143654-C258-410D-B5DC-FE446ED99CE4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DA143654-C258-410D-B5DC-FE446ED99CE4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{640F598B-6586-4AD6-B544-78CFF2602DFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{640F598B-6586-4AD6-B544-78CFF2602DFB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{640F598B-6586-4AD6-B544-78CFF2602DFB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{640F598B-6586-4AD6-B544-78CFF2602DFB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{93770088-3463-427B-9CD8-88B8D7945C83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{93770088-3463-427B-9CD8-88B8D7945C83}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{93770088-3463-427B-9CD8-88B8D7945C83}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{93770088-3463-427B-9CD8-88B8D7945C83}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{6CD7A35B-93A8-4DB2-B078-EE5A81F40032}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6CD7A35B-93A8-4DB2-B078-EE5A81F40032}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6CD7A35B-93A8-4DB2-B078-EE5A81F40032}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6CD7A35B-93A8-4DB2-B078-EE5A81F40032}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{11122D97-B349-4A3E-B7DD-73B8B363C47C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{11122D97-B349-4A3E-B7DD-73B8B363C47C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{11122D97-B349-4A3E-B7DD-73B8B363C47C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{11122D97-B349-4A3E-B7DD-73B8B363C47C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1D20E6CF-9825-4CDE-B732-AE586BD1AABA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1D20E6CF-9825-4CDE-B732-AE586BD1AABA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1D20E6CF-9825-4CDE-B732-AE586BD1AABA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1D20E6CF-9825-4CDE-B732-AE586BD1AABA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{FFDF9FF9-0B29-47D3-AD42-53A476B570EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{FFDF9FF9-0B29-47D3-AD42-53A476B570EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FFDF9FF9-0B29-47D3-AD42-53A476B570EC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FFDF9FF9-0B29-47D3-AD42-53A476B570EC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{CC3DF23A-2880-438F-BDEB-DB093E919ABA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CC3DF23A-2880-438F-BDEB-DB093E919ABA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CC3DF23A-2880-438F-BDEB-DB093E919ABA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CC3DF23A-2880-438F-BDEB-DB093E919ABA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{ADD20515-1C1C-418B-84F6-8B05A7AA315B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{ADD20515-1C1C-418B-84F6-8B05A7AA315B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{ADD20515-1C1C-418B-84F6-8B05A7AA315B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{ADD20515-1C1C-418B-84F6-8B05A7AA315B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@ -163,7 +259,7 @@ Global
|
|||
{87319AF5-7C40-4362-B67C-35F9DD737DB4} = {586410F2-C1F0-47CD-AB28-2CF506DED2C8}
|
||||
{7B2B7043-3CB2-4C5A-BDF2-8C47F1A5471A} = {E03B7391-B52F-4449-B400-5CD9DE01F085}
|
||||
{C82A6E45-AB90-43D1-8429-5CBE953D8151} = {C7F51A14-2D89-4D1F-AD78-C42B79AB0BF0}
|
||||
{C7F51A14-2D89-4D1F-AD78-C42B79AB0BF0} = {41B6D37A-5E5E-42B3-85E4-D81A81E3D757}
|
||||
{C7F51A14-2D89-4D1F-AD78-C42B79AB0BF0} = {C996F427-DA93-49D6-9804-4E665D195FC2}
|
||||
{8D62BE79-BE13-43C8-969B-C9B00B3C84B7} = {E03B7391-B52F-4449-B400-5CD9DE01F085}
|
||||
{523515EC-2AD7-4282-9AF4-9D20371183B0} = {586410F2-C1F0-47CD-AB28-2CF506DED2C8}
|
||||
{8336F096-4B4A-4710-A1FA-0F5E44CD8D26} = {E03B7391-B52F-4449-B400-5CD9DE01F085}
|
||||
|
@ -173,11 +269,30 @@ Global
|
|||
{6F61C2AC-84D4-48A9-8A48-680657CC8175} = {586410F2-C1F0-47CD-AB28-2CF506DED2C8}
|
||||
{843811A2-FE49-410F-BF9F-9F1FB14A1DEE} = {C7F51A14-2D89-4D1F-AD78-C42B79AB0BF0}
|
||||
{BC1C6D63-ADA9-4C3B-89F0-CEB191A86BF5} = {C7F51A14-2D89-4D1F-AD78-C42B79AB0BF0}
|
||||
{E03B7391-B52F-4449-B400-5CD9DE01F085} = {41B6D37A-5E5E-42B3-85E4-D81A81E3D757}
|
||||
{E03B7391-B52F-4449-B400-5CD9DE01F085} = {C996F427-DA93-49D6-9804-4E665D195FC2}
|
||||
{C6F2DCA0-7941-4C28-9328-2D495F5DCB00} = {72C103DB-E1D3-449F-97C2-DF12CA111FD4}
|
||||
{FDCFC3E3-14CF-40B2-9FE5-5BC239AAC110} = {72C103DB-E1D3-449F-97C2-DF12CA111FD4}
|
||||
{5F732D4E-133B-4DA6-811B-C369CDC3FB89} = {72C103DB-E1D3-449F-97C2-DF12CA111FD4}
|
||||
{68F7C160-3FB2-4129-8F89-96F78B2DA0A9} = {FDCFC3E3-14CF-40B2-9FE5-5BC239AAC110}
|
||||
{41E078CA-F005-4B66-B440-FD7EB731AD61} = {586410F2-C1F0-47CD-AB28-2CF506DED2C8}
|
||||
{64EACBD1-23DD-4168-BEED-55D47DB1A8BB} = {72C103DB-E1D3-449F-97C2-DF12CA111FD4}
|
||||
{DAE3826B-AAAB-468A-9A06-2F56EF5C0767} = {41B6D37A-5E5E-42B3-85E4-D81A81E3D757}
|
||||
{C996F427-DA93-49D6-9804-4E665D195FC2} = {41B6D37A-5E5E-42B3-85E4-D81A81E3D757}
|
||||
{45ADEF9B-C8BD-4224-9E12-F6716E85A22C} = {DAE3826B-AAAB-468A-9A06-2F56EF5C0767}
|
||||
{55A2459A-6BDE-4493-B2C0-5BE1673E99EE} = {DAE3826B-AAAB-468A-9A06-2F56EF5C0767}
|
||||
{EF5EF5A4-616A-4BA7-9E1E-1407E8EC0395} = {45ADEF9B-C8BD-4224-9E12-F6716E85A22C}
|
||||
{D8ED2DF7-F7E1-4DE7-B097-D0BEE51D58E9} = {45ADEF9B-C8BD-4224-9E12-F6716E85A22C}
|
||||
{7E3861AB-F797-4A9F-B7CE-0E35751FFCD9} = {45ADEF9B-C8BD-4224-9E12-F6716E85A22C}
|
||||
{20D03C52-0F8B-47B6-BCA8-CF0812F82722} = {45ADEF9B-C8BD-4224-9E12-F6716E85A22C}
|
||||
{DA143654-C258-410D-B5DC-FE446ED99CE4} = {45ADEF9B-C8BD-4224-9E12-F6716E85A22C}
|
||||
{640F598B-6586-4AD6-B544-78CFF2602DFB} = {55A2459A-6BDE-4493-B2C0-5BE1673E99EE}
|
||||
{93770088-3463-427B-9CD8-88B8D7945C83} = {55A2459A-6BDE-4493-B2C0-5BE1673E99EE}
|
||||
{6CD7A35B-93A8-4DB2-B078-EE5A81F40032} = {55A2459A-6BDE-4493-B2C0-5BE1673E99EE}
|
||||
{11122D97-B349-4A3E-B7DD-73B8B363C47C} = {45ADEF9B-C8BD-4224-9E12-F6716E85A22C}
|
||||
{1D20E6CF-9825-4CDE-B732-AE586BD1AABA} = {45ADEF9B-C8BD-4224-9E12-F6716E85A22C}
|
||||
{FFDF9FF9-0B29-47D3-AD42-53A476B570EC} = {55A2459A-6BDE-4493-B2C0-5BE1673E99EE}
|
||||
{CC3DF23A-2880-438F-BDEB-DB093E919ABA} = {55A2459A-6BDE-4493-B2C0-5BE1673E99EE}
|
||||
{ADD20515-1C1C-418B-84F6-8B05A7AA315B} = {45ADEF9B-C8BD-4224-9E12-F6716E85A22C}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {221EAE38-5F75-4391-9A48-E462A9F3B8FC}
|
||||
|
|
|
@ -11,17 +11,17 @@
|
|||
|
||||
<Target Condition=" $(IsWebProject) == true Or $(IsTestProject) == true" Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
<Message Text="Copy lic file -> $(TargetDir)" Importance="high" />
|
||||
<Copy Condition="'$(OS)' == 'Windows_NT'" DestinationFolder="$(TargetDir)" SourceFiles="$(MSBuildThisFileDirectory)src\admin\keys\Longbow.lic" SkipUnchangedFiles="true" />
|
||||
<Copy Condition="'$(OS)' == 'UNIX'" DestinationFolder="$(TargetDir)" SourceFiles="$(MSBuildThisFileDirectory)src/admin/keys/Longbow.lic" SkipUnchangedFiles="true" />
|
||||
<Copy Condition="'$(OS)' == 'Windows_NT'" DestinationFolder="$(TargetDir)" SourceFiles="$(MSBuildThisFileDirectory)src\mvc\admin\keys\Longbow.lic" SkipUnchangedFiles="true" />
|
||||
<Copy Condition="'$(OS)' == 'UNIX'" DestinationFolder="$(TargetDir)" SourceFiles="$(MSBuildThisFileDirectory)src/mvc/admin/keys/Longbow.lic" SkipUnchangedFiles="true" />
|
||||
</Target>
|
||||
|
||||
<Target Condition=" $(IsWebProject) == true " Name="PostPublish" AfterTargets="Publish">
|
||||
<Message Text="Publish lic file -> $(PublishDir)" Importance="high" />
|
||||
<Copy Condition="'$(OS)' == 'Windows_NT'" DestinationFolder="$(PublishDir)" SourceFiles="$(MSBuildThisFileDirectory)src\admin\keys\Longbow.lic" SkipUnchangedFiles="true" />
|
||||
<Copy Condition="'$(OS)' == 'UNIX'" DestinationFolder="$(PublishDir)" SourceFiles="$(MSBuildThisFileDirectory)src/admin/keys/Longbow.lic" SkipUnchangedFiles="true" />
|
||||
<Copy Condition="'$(OS)' == 'Windows_NT'" DestinationFolder="$(PublishDir)" SourceFiles="$(MSBuildThisFileDirectory)src\mvc\admin\keys\Longbow.lic" SkipUnchangedFiles="true" />
|
||||
<Copy Condition="'$(OS)' == 'UNIX'" DestinationFolder="$(PublishDir)" SourceFiles="$(MSBuildThisFileDirectory)src/mvc/admin/keys/Longbow.lic" SkipUnchangedFiles="true" />
|
||||
<Message Text="Publish db file -> $(PublishDir)" Importance="high" />
|
||||
<Copy Condition="'$(OS)' == 'Windows_NT'" DestinationFolder="$(PublishDir)" SourceFiles="$(MSBuildThisFileDirectory)src\admin\Bootstrap.Admin\BootstrapAdmin.db" SkipUnchangedFiles="true" />
|
||||
<Copy Condition="'$(OS)' == 'UNIX'" DestinationFolder="$(PublishDir)" SourceFiles="$(MSBuildThisFileDirectory)src/admin/Bootstrap.Admin/BootstrapAdmin.db" SkipUnchangedFiles="true" />
|
||||
<Copy Condition="'$(OS)' == 'Windows_NT'" DestinationFolder="$(PublishDir)" SourceFiles="$(MSBuildThisFileDirectory)src\mvc\admin\Bootstrap.Admin\BootstrapAdmin.db" SkipUnchangedFiles="true" />
|
||||
<Copy Condition="'$(OS)' == 'UNIX'" DestinationFolder="$(PublishDir)" SourceFiles="$(MSBuildThisFileDirectory)src/mvc/admin/Bootstrap.Admin/BootstrapAdmin.db" SkipUnchangedFiles="true" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
|
284
LICENSE
284
LICENSE
|
@ -1,191 +1,165 @@
|
|||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction, and
|
||||
distribution as defined by Sections 1 through 9 of this document.
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by the copyright
|
||||
owner that is granting the License.
|
||||
0. Additional Definitions.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all other entities
|
||||
that control, are controlled by, or are under common control with that entity.
|
||||
For the purposes of this definition, "control" means (i) the power, direct or
|
||||
indirect, to cause the direction or management of such entity, whether by
|
||||
contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity exercising
|
||||
permissions granted by this License.
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications, including
|
||||
but not limited to software source code, documentation source, and configuration
|
||||
files.
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical transformation or
|
||||
translation of a Source form, including but not limited to compiled object code,
|
||||
generated documentation, and conversions to other media types.
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or Object form, made
|
||||
available under the License, as indicated by a copyright notice that is included
|
||||
in or attached to the work (an example is provided in the Appendix below).
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object form, that
|
||||
is based on (or derived from) the Work and for which the editorial revisions,
|
||||
annotations, elaborations, or other modifications represent, as a whole, an
|
||||
original work of authorship. For the purposes of this License, Derivative Works
|
||||
shall not include works that remain separable from, or merely link (or bind by
|
||||
name) to the interfaces of, the Work and Derivative Works thereof.
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including the original version
|
||||
of the Work and any modifications or additions to that Work or Derivative Works
|
||||
thereof, that is intentionally submitted to Licensor for inclusion in the Work
|
||||
by the copyright owner or by an individual or Legal Entity authorized to submit
|
||||
on behalf of the copyright owner. For the purposes of this definition,
|
||||
"submitted" means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems, and
|
||||
issue tracking systems that are managed by, or on behalf of, the Licensor for
|
||||
the purpose of discussing and improving the Work, but excluding communication
|
||||
that is conspicuously marked or otherwise designated in writing by the copyright
|
||||
owner as "Not a Contribution."
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf
|
||||
of whom a Contribution has been received by Licensor and subsequently
|
||||
incorporated within the Work.
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Grant of Copyright License.
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
Subject to the terms and conditions of this License, each Contributor hereby
|
||||
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
|
||||
irrevocable copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the Work and such
|
||||
Derivative Works in Source or Object form.
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
3. Grant of Patent License.
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
Subject to the terms and conditions of this License, each Contributor hereby
|
||||
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
|
||||
irrevocable (except as stated in this section) patent license to make, have
|
||||
made, use, offer to sell, sell, import, and otherwise transfer the Work, where
|
||||
such license applies only to those patent claims licensable by such Contributor
|
||||
that are necessarily infringed by their Contribution(s) alone or by combination
|
||||
of their Contribution(s) with the Work to which such Contribution(s) was
|
||||
submitted. If You institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work or a
|
||||
Contribution incorporated within the Work constitutes direct or contributory
|
||||
patent infringement, then any patent licenses granted to You under this License
|
||||
for that Work shall terminate as of the date such litigation is filed.
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
4. Redistribution.
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
You may reproduce and distribute copies of the Work or Derivative Works thereof
|
||||
in any medium, with or without modifications, and in Source or Object form,
|
||||
provided that You meet the following conditions:
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
You must give any other recipients of the Work or Derivative Works a copy of
|
||||
this License; and
|
||||
You must cause any modified files to carry prominent notices stating that You
|
||||
changed the files; and
|
||||
You must retain, in the Source form of any Derivative Works that You distribute,
|
||||
all copyright, patent, trademark, and attribution notices from the Source form
|
||||
of the Work, excluding those notices that do not pertain to any part of the
|
||||
Derivative Works; and
|
||||
If the Work includes a "NOTICE" text file as part of its distribution, then any
|
||||
Derivative Works that You distribute must include a readable copy of the
|
||||
attribution notices contained within such NOTICE file, excluding those notices
|
||||
that do not pertain to any part of the Derivative Works, in at least one of the
|
||||
following places: within a NOTICE text file distributed as part of the
|
||||
Derivative Works; within the Source form or documentation, if provided along
|
||||
with the Derivative Works; or, within a display generated by the Derivative
|
||||
Works, if and wherever such third-party notices normally appear. The contents of
|
||||
the NOTICE file are for informational purposes only and do not modify the
|
||||
License. You may add Your own attribution notices within Derivative Works that
|
||||
You distribute, alongside or as an addendum to the NOTICE text from the Work,
|
||||
provided that such additional attribution notices cannot be construed as
|
||||
modifying the License.
|
||||
You may add Your own copyright statement to Your modifications and may provide
|
||||
additional or different license terms and conditions for use, reproduction, or
|
||||
distribution of Your modifications, or for any such Derivative Works as a whole,
|
||||
provided Your use, reproduction, and distribution of the Work otherwise complies
|
||||
with the conditions stated in this License.
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
5. Submission of Contributions.
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
Unless You explicitly state otherwise, any Contribution intentionally submitted
|
||||
for inclusion in the Work by You to the Licensor shall be under the terms and
|
||||
conditions of this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify the terms of
|
||||
any separate license agreement you may have executed with Licensor regarding
|
||||
such Contributions.
|
||||
4. Combined Works.
|
||||
|
||||
6. Trademarks.
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
This License does not grant permission to use the trade names, trademarks,
|
||||
service marks, or product names of the Licensor, except as required for
|
||||
reasonable and customary use in describing the origin of the Work and
|
||||
reproducing the content of the NOTICE file.
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
7. Disclaimer of Warranty.
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
Unless required by applicable law or agreed to in writing, Licensor provides the
|
||||
Work (and each Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
|
||||
including, without limitation, any warranties or conditions of TITLE,
|
||||
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
|
||||
solely responsible for determining the appropriateness of using or
|
||||
redistributing the Work and assume any risks associated with Your exercise of
|
||||
permissions under this License.
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
8. Limitation of Liability.
|
||||
d) Do one of the following:
|
||||
|
||||
In no event and under no legal theory, whether in tort (including negligence),
|
||||
contract, or otherwise, unless required by applicable law (such as deliberate
|
||||
and grossly negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special, incidental,
|
||||
or consequential damages of any character arising as a result of this License or
|
||||
out of the use or inability to use the Work (including but not limited to
|
||||
damages for loss of goodwill, work stoppage, computer failure or malfunction, or
|
||||
any and all other commercial damages or losses), even if such Contributor has
|
||||
been advised of the possibility of such damages.
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
9. Accepting Warranty or Additional Liability.
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
While redistributing the Work or Derivative Works thereof, You may choose to
|
||||
offer, and charge a fee for, acceptance of support, warranty, indemnity, or
|
||||
other liability obligations and/or rights consistent with this License. However,
|
||||
in accepting such obligations, You may act only on Your own behalf and on Your
|
||||
sole responsibility, not on behalf of any other Contributor, and only if You
|
||||
agree to indemnify, defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason of your
|
||||
accepting any such warranty or additional liability.
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
5. Combined Libraries.
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
To apply the Apache License to your work, attach the following boilerplate
|
||||
notice, with the fields enclosed by brackets "{}" replaced with your own
|
||||
identifying information. (Don't include the brackets!) The text should be
|
||||
enclosed in the appropriate comment syntax for the file format. We also
|
||||
recommend that a file or class name and description of purpose be included on
|
||||
the same "printed page" as the copyright notice for easier identification within
|
||||
third-party archives.
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
Copyright 2019 LaoGanDie
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
||||
|
|
22
README.md
22
README.md
|
@ -5,21 +5,22 @@
|
|||
---
|
||||
|
||||
##### Version & Coverage
|
||||
[![Release](https://img.shields.io/endpoint.svg?logo=Groupon&logoColor=red&color=green&label=release&url=https://ba.sdgxgz.com/api/Gitee/Releases)](https://gitee.com/LongbowEnterprise/BootstrapAdmin/releases)
|
||||
[![Release](https://img.shields.io/endpoint.svg?logo=Groupon&logoColor=red&color=green&label=release&url=https://admin.blazor.zone/api/Gitee/Releases?userName=LongbowEnterprise)](https://gitee.com/LongbowEnterprise/BootstrapAdmin/releases)
|
||||
[![Coveralls](https://img.shields.io/coveralls/github/ArgoZhang/BootstrapAdmin/master.svg?logo=ReverbNation&logoColor=green&label=coveralls)](https://coveralls.io/github/ArgoZhang/BootstrapAdmin)
|
||||
[![Codecov](https://img.shields.io/codecov/c/gh/argozhang/bootstrapadmin/master.svg?logo=codecov&label=codecov)](https://codecov.io/gh/argozhang/bootstrapadmin/branch/master)
|
||||
|
||||
##### Gitee
|
||||
[![Appveyor build](https://img.shields.io/endpoint.svg?logo=appveyor&label=build&color=blueviolet&url=https://ba.sdgxgz.com/api/Gitee/Builds?projName=bootstrapadmin-9m1jm)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin-9m1jm)
|
||||
[![Build Status](https://img.shields.io/appveyor/ci/ArgoZhang/bootstrapadmin-9m1jm/master.svg?logo=appveyor&label=maser)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin-9m1jm)
|
||||
[![Test](https://img.shields.io/appveyor/tests/ArgoZhang/bootstrapadmin-9m1jm/master.svg?logo=appveyor&)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin-9m1jm/build/tests)
|
||||
[![Issue Status](https://img.shields.io/endpoint.svg?logo=Groupon&logoColor=critical&label=issues&url=https://ba.sdgxgz.com/api/Gitee/Issues)](https://gitee.com/LongbowEnterprise/BootstrapAdmin/issues)
|
||||
[![Pull Status](https://img.shields.io/endpoint.svg?logo=Groupon&logoColor=green&color=success&label=pulls&url=https://ba.sdgxgz.com/api/Gitee/Pulls)](https://gitee.com/LongbowEnterprise/BootstrapAdmin/pulls)
|
||||
[![Appveyor build](https://img.shields.io/endpoint.svg?logo=appveyor&label=build&color=blueviolet&url=https://admin.blazor.zone/api/Gitee/Builds?projName=bootstrapadmin-9m1jm)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin-9m1jm)
|
||||
[![Build Status](https://img.shields.io/appveyor/ci/ArgoZhang/bootstrapadmin-9m1jm/master.svg?logo=appveyor&label=master)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin-9m1jm/branch/master)
|
||||
[![Test](https://img.shields.io/appveyor/tests/ArgoZhang/bootstrapadmin-9m1jm/master.svg?logo=appveyor&)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin-9m1jm/branch/master/tests)
|
||||
[![Issue Status](https://img.shields.io/endpoint.svg?logo=Groupon&logoColor=critical&label=issues&url=https://admin.blazor.zone/api/Gitee/Issues?userName=LongbowEnterprise)](https://gitee.com/LongbowEnterprise/BootstrapAdmin/issues)
|
||||
[![Pull Status](https://img.shields.io/endpoint.svg?logo=Groupon&logoColor=green&color=success&label=pulls&url=https://admin.blazor.zone/api/Gitee/Pulls?userName=LongbowEnterprise)](https://gitee.com/LongbowEnterprise/BootstrapAdmin/pulls)
|
||||
|
||||
##### GitHub
|
||||
[![Appveyor build](https://img.shields.io/endpoint.svg?logo=appveyor&label=build&color=blueviolet&url=https://ba.sdgxgz.com/api/Gitee/Builds?projName=bootstrapadmin)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin)
|
||||
[![Appveyor build](https://img.shields.io/endpoint.svg?logo=appveyor&label=build&color=blueviolet&url=https://admin.blazor.zone/api/Gitee/Builds?projName=bootstrapadmin)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin)
|
||||
[![master status](https://img.shields.io/appveyor/ci/ArgoZhang/bootstrapadmin/master.svg?logo=appveyor&label=master)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin/branch/master)
|
||||
[![Test](https://img.shields.io/appveyor/tests/argozhang/bootstrapadmin/master.svg?logo=appveyor&)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin/branch/master/tests)
|
||||
[![Github build](https://img.shields.io/github/workflow/status/ArgoZhang/BootstrapAdmin/Auto%20Build%20CI/master?label=master&logoColor=green&logo=github)](https://github.com/ArgoZhang/BootstrapAdmin/actions?query=workflow%3A%22Auto+Build+CI%22+branch%3Amaster)
|
||||
[![Repo Size](https://img.shields.io/github/repo-size/ArgoZhang/BootstrapAdmin.svg?logo=github&logoColor=green&label=repo)](https://github.com/ArgoZhang/BootstrapAdmin)
|
||||
[![Commit Date](https://img.shields.io/github/last-commit/ArgoZhang/BootstrapAdmin/master.svg?logo=github&logoColor=green&label=commit)](https://github.com/ArgoZhang/BootstrapAdmin)
|
||||
|
||||
|
@ -59,7 +60,7 @@ Departments Authorize Users
|
|||
For more information, please click [wiki](https://gitee.com/LongbowEnterprise/BootstrapAdmin/wikis/%E9%A1%B9%E7%9B%AE%E4%BB%8B%E7%BB%8D)
|
||||
|
||||
### Database
|
||||
**MSSQL/Oracle/SQLite/MySql/MariaDB/Postgresql/Firebird/MongoDB**
|
||||
**MSSQL/Oracle/SQLite/MySql/MariaDB/Firebird/MongoDB**
|
||||
|
||||
For more information, please click [wiki](https://gitee.com/LongbowEnterprise/BootstrapAdmin/wikis/数据库连接配置?sort_id=1333482)
|
||||
|
||||
|
@ -121,7 +122,7 @@ For more information, please click [wiki](https://gitee.com/LongbowEnterprise/Bo
|
|||
|
||||
## Online Demonstration
|
||||
[![website1](https://img.shields.io/badge/linux-http://ba.zylweb.cn-success.svg?logo=buzzfeed&logoColor=green)](http://ba.zylweb.cn)
|
||||
[![website2](https://img.shields.io/badge/linux-http://ba.sdgxgz.com-success.svg?logo=buzzfeed&logoColor=green)](http://ba.sdgxgz.com)
|
||||
[![website2](https://img.shields.io/badge/linux-http://admin.blazor.zone-success.svg?logo=buzzfeed&logoColor=green)](http://admin.blazor.zone)
|
||||
|
||||
### Login
|
||||
Administrator: Admin/123789
|
||||
|
@ -130,6 +131,7 @@ User: User/123789
|
|||
## Docker Images
|
||||
[![Docker](https://img.shields.io/docker/cloud/automated/argozhang/ba.svg?logo=docker&logoColor=success)](https://hub.docker.com/r/argozhang/ba)
|
||||
[![Docker](https://img.shields.io/docker/cloud/build/argozhang/ba.svg?logo=docker&logoColor=success)](https://hub.docker.com/r/argozhang/ba/builds)
|
||||
[![Docker](https://img.shields.io/github/workflow/status/ArgoZhang/BootstrapAdmin/Docker%20Image%20CI/master?label=Docker%20Image%20CI&logo=github&logoColor=green)](https://github.com/ArgoZhang/BootstrapAdmin/actions?query=workflow%3A%22Docker+Image+CI%22%3Amaster)
|
||||
|
||||
### Docker Hub
|
||||
Mirror [Portal](https://hub.docker.com/r/argozhang/ba)
|
||||
|
@ -152,7 +154,7 @@ Please click [wikis](https://gitee.com/LongbowEnterprise/BootstrapAdmin/wikis/%E
|
|||
[![Gitee license](https://img.shields.io/github/license/argozhang/bootstrapadmin.svg?logo=git&logoColor=red)](https://gitee.com/LongbowEnterprise/BootstrapAdmin/blob/master/LICENSE)
|
||||
|
||||
## GVP award
|
||||
[View](https://images.gitee.com/uploads/images/2019/0516/124055_96cc9f8d_554725.png "GiteeGVP.png")
|
||||
[View](https://images.gitee.com/uploads/images/2021/0112/112021_9d570be1_554725.png "GiteeGVP.png")
|
||||
|
||||
## Screenshots
|
||||
|
||||
|
|
|
@ -5,21 +5,22 @@
|
|||
---
|
||||
|
||||
##### Version & Coverage
|
||||
[![Release](https://img.shields.io/endpoint.svg?logo=Groupon&logoColor=red&color=green&label=release&url=https://ba.sdgxgz.com/api/Gitee/Releases)](https://gitee.com/LongbowEnterprise/BootstrapAdmin/releases)
|
||||
[![Coveralls](https://img.shields.io/coveralls/github/ArgoZhang/BootstrapAdmin/master.svg?logo=ReverbNation&logoColor=green&label=coveralls)](https://coveralls.io/github/ArgoZhang/BootstrapAdmin)
|
||||
[![Release](https://img.shields.io/endpoint.svg?logo=Groupon&logoColor=red&color=green&label=release&url=https://admin.blazor.zone/api/Gitee/Releases?userName=LongbowEnterprise)](https://gitee.com/LongbowEnterprise/BootstrapAdmin/releases)
|
||||
[![Coveralls](https://img.shields.io/coveralls/github/ArgoZhang/BootstrapAdmin/master.svg?logo=ReverbNation&logoColor=green&label=coveralls)](https://coveralls.io/github/ArgoZhang/BootstrapAdmin?branch=master)
|
||||
[![Codecov](https://img.shields.io/codecov/c/gh/argozhang/bootstrapadmin/master.svg?logo=codecov&label=codecov)](https://codecov.io/gh/argozhang/bootstrapadmin/branch/master)
|
||||
|
||||
##### Gitee
|
||||
[![Appveyor build](https://img.shields.io/endpoint.svg?logo=appveyor&label=build&color=blueviolet&url=https://ba.sdgxgz.com/api/Gitee/Builds?projName=bootstrapadmin-9m1jm)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin-9m1jm)
|
||||
[![Build Status](https://img.shields.io/appveyor/ci/ArgoZhang/bootstrapadmin-9m1jm/master.svg?logo=appveyor&label=maser)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin-9m1jm)
|
||||
[![Test](https://img.shields.io/appveyor/tests/ArgoZhang/bootstrapadmin-9m1jm/master.svg?logo=appveyor&)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin-9m1jm/build/tests)
|
||||
[![Issue Status](https://img.shields.io/endpoint.svg?logo=Groupon&logoColor=critical&label=issues&url=https://ba.sdgxgz.com/api/Gitee/Issues)](https://gitee.com/LongbowEnterprise/BootstrapAdmin/issues)
|
||||
[![Pull Status](https://img.shields.io/endpoint.svg?logo=Groupon&logoColor=green&color=success&label=pulls&url=https://ba.sdgxgz.com/api/Gitee/Pulls)](https://gitee.com/LongbowEnterprise/BootstrapAdmin/pulls)
|
||||
[![Appveyor build](https://img.shields.io/endpoint.svg?logo=appveyor&label=build&color=blueviolet&url=https://admin.blazor.zone/api/Gitee/Builds?projName=bootstrapadmin-9m1jm)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin-9m1jm)
|
||||
[![Build Status](https://img.shields.io/appveyor/ci/ArgoZhang/bootstrapadmin-9m1jm/master.svg?logo=appveyor&label=master)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin-9m1jm/branch/master)
|
||||
[![Test](https://img.shields.io/appveyor/tests/ArgoZhang/bootstrapadmin-9m1jm/master.svg?logo=appveyor&)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin-9m1jm/branch/master/tests)
|
||||
[![Issue Status](https://img.shields.io/endpoint.svg?logo=Groupon&logoColor=critical&label=issues&url=https://admin.blazor.zone/api/Gitee/Issues?userName=LongbowEnterprise)](https://gitee.com/LongbowEnterprise/BootstrapAdmin/issues)
|
||||
[![Pull Status](https://img.shields.io/endpoint.svg?logo=Groupon&logoColor=green&color=success&label=pulls&url=https://admin.blazor.zone/api/Gitee/Pulls?userName=LongbowEnterprise)](https://gitee.com/LongbowEnterprise/BootstrapAdmin/pulls)
|
||||
|
||||
##### GitHub
|
||||
[![Appveyor build](https://img.shields.io/endpoint.svg?logo=appveyor&label=build&color=blueviolet&url=https://ba.sdgxgz.com/api/Gitee/Builds?projName=bootstrapadmin)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin)
|
||||
[![Appveyor build](https://img.shields.io/endpoint.svg?logo=appveyor&label=build&color=blueviolet&url=https://admin.blazor.zone/api/Gitee/Builds?projName=bootstrapadmin)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin)
|
||||
[![master status](https://img.shields.io/appveyor/ci/ArgoZhang/bootstrapadmin/master.svg?logo=appveyor&label=master)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin/branch/master)
|
||||
[![Test](https://img.shields.io/appveyor/tests/argozhang/bootstrapadmin/master.svg?logo=appveyor&)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin/branch/master/tests)
|
||||
[![Github build](https://img.shields.io/github/workflow/status/ArgoZhang/BootstrapAdmin/Auto%20Build%20CI/master?label=master&logoColor=green&logo=github)](https://github.com/ArgoZhang/BootstrapAdmin/actions?query=workflow%3A%22Auto+Build+CI%22+branch%3Amaster)
|
||||
[![Repo Size](https://img.shields.io/github/repo-size/ArgoZhang/BootstrapAdmin.svg?logo=github&logoColor=green&label=repo)](https://github.com/ArgoZhang/BootstrapAdmin)
|
||||
[![Commit Date](https://img.shields.io/github/last-commit/ArgoZhang/BootstrapAdmin/master.svg?logo=github&logoColor=green&label=commit)](https://github.com/ArgoZhang/BootstrapAdmin)
|
||||
|
||||
|
@ -28,6 +29,15 @@
|
|||
|
||||
使用 NET Core + Bootstrap + PetaPoco + HTML 5 + jQuery 构建的后台管理平台
|
||||
|
||||
**BootstrapAdmin** 与 **开源驰骋 ccflow** 达成如下协议.
|
||||
|
||||
1. 驰骋工作流引擎、表单引擎、快速开发平台系统采用 `GPL` 协议.
|
||||
2. 驰骋 `.net` 版本成为 `ccflow`, `java` 版本成为 `jflow` 两个版本代码 100% 开源.
|
||||
3. 与 BootstrapAdmin 签订服务合同的并且付费的 BootstrapAdmin 客户使用ccflow不开源系统代码受到法律保护.
|
||||
4. 驰骋 BPM 代码下载地址: [传送门](http://ccflow.org/down.htm?from=argo)
|
||||
|
||||
<a href='http://ccflow.org/?from=argo' target=_blank ><img src='https://images.gitee.com/uploads/images/2021/0718/172630_7ebb560a_554725.png' /></a>
|
||||
|
||||
### 特别说明
|
||||
**BootstrapAdmin** 无需二次开发,要做的仅仅是与前台系统集成,前台系统模板工程为 **Bootstrap.Client**
|
||||
项目原始出发点是把权限系统从业务系统中剥离出来,项目开发专注于功能,详细配置说明请点击 [查看文档](https://gitee.com/LongbowEnterprise/BootstrapAdmin/wikis/%E7%B3%BB%E7%BB%9F%E9%9B%86%E6%88%90)
|
||||
|
@ -65,6 +75,10 @@
|
|||
数据库支持列表如下:
|
||||
**MSSQL/Oracle/SQLite/MySql/MariaDB/Postgresql/Firebird/MongoDB**
|
||||
|
||||
### 工作流
|
||||
|
||||
与 **驰骋工作流** 进行深度集成,欢迎访问其主页 [传送门](http://ccflow.org/?from=argo)
|
||||
|
||||
### 浏览器支持
|
||||
|
||||
![chrome](https://img.shields.io/badge/chrome->%3D4.5-success.svg?logo=google%20chrome&logoColor=red)
|
||||
|
@ -115,12 +129,10 @@
|
|||
|
||||
## 开发环境搭建
|
||||
1. 安装 .net core sdk [官方网址](http://www.microsoft.com/net/download)
|
||||
2. 安装 Visual Studio 2019 以上 [官方网址](https://visualstudio.microsoft.com/vs/getting-started/)
|
||||
2. 安装 Visual Studio 2019 最新版 [官方网址](https://visualstudio.microsoft.com/vs/getting-started/)
|
||||
3. 获取本项目代码 [BootstrapAdmin](https://gitee.com/LongbowEnterprise/BootstrapAdmin)
|
||||
|
||||
*注意*
|
||||
master 分支为 NETCore 3.0 框架 必须使用 Visual Studio 2019 (v16.3)
|
||||
netcore-2.2 分支为 NETCore 2.2 框架支持 Visual Studio 2017 (v15.9+)
|
||||
环境搭建教程 [详细说明](https://gitee.com/LongbowEnterprise/BootstrapAdmin/wikis/%E5%AE%89%E8%A3%85%E6%95%99%E7%A8%8B?sort_id=1333477)
|
||||
|
||||
### 安装数据库
|
||||
|
||||
|
@ -128,7 +140,7 @@ netcore-2.2 分支为 NETCore 2.2 框架支持 Visual Studio 2017 (v15.9+)
|
|||
1. SQLite
|
||||
2. SqlServer
|
||||
3. MySql
|
||||
4. PostgresSql
|
||||
4. Oracle
|
||||
5. MongoDB
|
||||
|
||||
数据库配置 [详细说明](https://gitee.com/LongbowEnterprise/BootstrapAdmin/wikis/数据库连接配置?sort_id=1333482)
|
||||
|
@ -138,7 +150,7 @@ netcore-2.2 分支为 NETCore 2.2 框架支持 Visual Studio 2017 (v15.9+)
|
|||
|
||||
## 演示地址
|
||||
[![website1](https://img.shields.io/badge/linux-http://ba.zylweb.cn-success.svg?logo=buzzfeed&logoColor=green)](http://ba.zylweb.cn)
|
||||
[![website2](https://img.shields.io/badge/linux-http://ba.sdgxgz.com-success.svg?logo=buzzfeed&logoColor=green)](http://ba.sdgxgz.com)
|
||||
[![website2](https://img.shields.io/badge/linux-http://admin.blazor.zone-success.svg?logo=buzzfeed&logoColor=green)](http://admin.blazor.zone)
|
||||
|
||||
### 登录用户名与密码
|
||||
管理账号:Admin/123789
|
||||
|
@ -147,6 +159,7 @@ netcore-2.2 分支为 NETCore 2.2 框架支持 Visual Studio 2017 (v15.9+)
|
|||
## Docker 镜像
|
||||
[![Docker](https://img.shields.io/docker/cloud/automated/argozhang/ba.svg?logo=docker&logoColor=success)](https://hub.docker.com/r/argozhang/ba)
|
||||
[![Docker](https://img.shields.io/docker/cloud/build/argozhang/ba.svg?logo=docker&logoColor=success)](https://hub.docker.com/r/argozhang/ba/builds)
|
||||
[![Docker](https://img.shields.io/github/workflow/status/ArgoZhang/BootstrapAdmin/Docker%20Image%20CI/master?label=Docker%20Image%20CI&logo=github&logoColor=green)](https://github.com/ArgoZhang/BootstrapAdmin/actions?query=workflow%3A%22Docker+Image+CI%22%3Amaster)
|
||||
|
||||
### Docker Hub
|
||||
镜像拉取 [传送门](https://hub.docker.com/r/argozhang/ba)
|
||||
|
@ -169,7 +182,7 @@ docker pull reg.qiniu.com/argozhang/ba
|
|||
[![Gitee license](https://img.shields.io/github/license/argozhang/bootstrapadmin.svg?logo=git&logoColor=red)](https://gitee.com/LongbowEnterprise/BootstrapAdmin/blob/master/LICENSE)
|
||||
|
||||
## GVP 奖杯
|
||||
[查看照片](https://images.gitee.com/uploads/images/2019/0516/124055_96cc9f8d_554725.png "GiteeGVP.png")
|
||||
![项目奖杯](https://images.gitee.com/uploads/images/2021/0112/112021_9d570be1_554725.png "GVP.png")
|
||||
|
||||
## 项目截图
|
||||
|
||||
|
@ -194,8 +207,12 @@ docker pull reg.qiniu.com/argozhang/ba
|
|||
3. 提交代码
|
||||
4. 新建 Pull Request
|
||||
|
||||
## 相关视频讲解
|
||||
|
||||
[视频教材](https://gitee.com/LongbowEnterprise/BootstrapAdmin/wikis/%E8%AF%BE%E7%A8%8B%E5%88%97%E8%A1%A8?sort_id=1916635#%E8%AF%BE%E7%A8%8B%E5%88%97%E8%A1%A8)
|
||||
|
||||
## 捐助
|
||||
|
||||
如果这个项目对您有所帮助,请扫下方二维码打赏一杯咖啡。
|
||||
|
||||
![WeChat](https://gitee.com/LongbowEnterprise/Pictures/raw/master/WeChat/WeChat.png "微信扫码")
|
||||
<img src="https://gitee.com/LongbowEnterprise/Pictures/raw/master/WeChat/BarCode@2x.png" width="382px;" />
|
||||
|
|
|
@ -1,75 +0,0 @@
|
|||
function installDB() {
|
||||
write-host "init sqlserver database..." -ForegroundColor Cyan
|
||||
$startPath = "$($env:appveyor_build_folder)\db\SqlServer"
|
||||
$sqlInstance = "(local)\SQL2017"
|
||||
$outFile = join-path $startPath "output.log"
|
||||
$sqlFile = join-path $startPath "Install.sql"
|
||||
$initFile = join-path $startPath "InitData.sql"
|
||||
|
||||
sqlcmd -S "$sqlInstance" -U sa -P Password12! -i "$sqlFile" -i "$initFile" -o "$outFile"
|
||||
|
||||
#write-host "init mysql database..." -ForegroundColor Cyan
|
||||
#$env:MYSQL_PWD="Password12!"
|
||||
#$mysql = '"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql.exe"'
|
||||
#$cmd = $mysql + ' -e "create database BootstrapAdmin;" -uroot'
|
||||
#cmd.exe /c $cmd
|
||||
|
||||
#$startPath = "$($env:appveyor_build_folder)\db\MySQL"
|
||||
#$para = ' -hlocalhost -uroot -DBootstrapAdmin < '
|
||||
#$sqlFile = join-path $startPath "Install.sql"
|
||||
#$cmd = $mysql + $para + $sqlFile
|
||||
#cmd.exe /c $cmd
|
||||
|
||||
#$initFile = join-path $startPath "InitData.sql"
|
||||
#$cmd = $mysql + $para + $initFile
|
||||
#cmd.exe /c $cmd
|
||||
|
||||
write-host "init mongodb data..." -ForegroundColor Cyan
|
||||
$initFolder = "$($env:appveyor_build_folder)\db\MongoDB"
|
||||
cd $initFolder
|
||||
|
||||
cmd.exe /c "C:\mongodb\bin\mongo init.js"
|
||||
|
||||
$cmd = 'C:\mongodb\bin\mongo BootstrapAdmin --eval "printjson(db.getCollectionNames())"'
|
||||
iex "& $cmd"
|
||||
|
||||
cd $($env:appveyor_build_folder)
|
||||
}
|
||||
|
||||
function runUnitTest() {
|
||||
write-host "dotnet test test\UnitTest" -ForegroundColor Cyan
|
||||
dotnet test test\UnitTest --filter="FullyQualifiedName!~MySql" /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Include="[Bootstrap.Admin*]*%2c[Bootstrap.DataAccess*]*" /p:Exclude="[*]*Program%2c[*]*Startup%2c[Bootstrap.DataAccess]*AutoDB%2c[Bootstrap.DataAccess]*WeChatHelper" /p:ExcludeByFile="**/SMSExtensions.cs%2c**/Helper/OAuthHelper.cs" /p:CoverletOutput=..\..\
|
||||
}
|
||||
|
||||
function coverallUnitTest() {
|
||||
write-host "install coveralls.net tools" -ForegroundColor Cyan
|
||||
dotnet tool install coveralls.net --version 1.0.0 --tool-path ".\tools"
|
||||
runUnitTest
|
||||
write-host "report UnitTest with Coveralls" -ForegroundColor Cyan
|
||||
cmd.exe /c ".\tools\csmacnz.Coveralls.exe --opencover -i coverage.opencover.xml --useRelativePaths"
|
||||
}
|
||||
|
||||
function codecovUnitTest() {
|
||||
Set-AppveyorBuildVariable COVERALLS_REPO_TOKEN $($env:COVERALLS_REPO_TOKEN)
|
||||
Set-AppveyorBuildVariable CODECOV_TOKEN $($env:CODECOV_TOKEN)
|
||||
|
||||
$codecovCmd = "C:\ProgramData\chocolatey\lib\codecov\tools\codecov.exe"
|
||||
$codecov = Test-Path $codecovCmd
|
||||
if (!$codecov) {
|
||||
write-host "install codecov tools" -ForegroundColor Cyan
|
||||
choco install codecov
|
||||
}
|
||||
$coverageFile = Test-Path coverage.opencover.xml
|
||||
if (!$coverageFile) {
|
||||
runUnitTest
|
||||
}
|
||||
write-host "report UnitTest with Codecov" -ForegroundColor Cyan
|
||||
cmd.exe /c "$codecovCmd -f ""coverage.opencover.xml"""
|
||||
}
|
||||
|
||||
$branch = $($env:APPVEYOR_REPO_BRANCH)
|
||||
if ($branch -ne "dev") {
|
||||
installDB
|
||||
coverallUnitTest
|
||||
codecovUnitTest
|
||||
}
|
17
appveyor.yml
17
appveyor.yml
|
@ -1,4 +1,4 @@
|
|||
version: 1.0.{build}
|
||||
version: 5.0.{build}
|
||||
branches:
|
||||
only:
|
||||
- release
|
||||
|
@ -9,6 +9,7 @@ clone_depth: 1
|
|||
init:
|
||||
- ps: git version
|
||||
environment:
|
||||
CI: true
|
||||
Appveyor: true
|
||||
COVERALLS_REPO_TOKEN:
|
||||
secure: 5L1b6XqSNTOfU1iZrARo5eUOi1HOleVO3VDCW0pr6yaspgkC5jxL+gBDK0OEY8EI
|
||||
|
@ -18,25 +19,21 @@ environment:
|
|||
secure: 6rKKLXCmy3HZBxW5SjoO4Ox7G09FC0NJgGnvukWkYyJ2rx1GCzu4JvmLin69SHRz
|
||||
CODECOV_TOKEN_GITLAB:
|
||||
secure: +22PuAn5seq4bbCVCly8zDFuyEV3m2NjW3QuM0+2gm4c8akwicNFmv2T/ZGd0Jpd
|
||||
cache: C:\ProgramData\chocolatey\lib\codecov\tools
|
||||
services:
|
||||
- mssql2017
|
||||
- mysql
|
||||
- mongodb
|
||||
install:
|
||||
- ps: >-
|
||||
#copy my.ini into mysql folder
|
||||
|
||||
dotnet --version
|
||||
|
||||
#xcopy "$($env:appveyor_build_folder)\db\MySQL\my.ini" "C:\Program Files\MySQL\MySQL Server 5.7" /y
|
||||
.\scripts\appveyor\appveyor.install.ps1
|
||||
build_script:
|
||||
- ps: >-
|
||||
.\appveyor.build.ps1
|
||||
.\scripts\appveyor\appveyor.build.ps1
|
||||
test_script:
|
||||
- ps: >-
|
||||
.\appveyor.test.ps1
|
||||
.\scripts\appveyor\appveyor.test.ps1
|
||||
artifacts:
|
||||
- path: src\admin\Bootstrap.Admin\bin\release\netcoreapp3.0\publish\
|
||||
- path: src\admin\Bootstrap.Admin\bin\release\net5.0\publish\
|
||||
name: BootstrapAdmin
|
||||
type: WebDeployPackage
|
||||
deploy:
|
||||
|
|
|
@ -108,7 +108,7 @@
|
|||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "当前样式",
|
||||
"Category": "网站设置",
|
||||
"Name": "使用样式",
|
||||
"Code": "blue.css",
|
||||
"Define": NumberInt(0)
|
||||
|
@ -158,90 +158,126 @@
|
|||
{
|
||||
"Category": "测试平台",
|
||||
"Name": "个人中心地址",
|
||||
"Code": "http://localhost:50852/Admin/Profiles",
|
||||
"Code": "/Admin/Profiles",
|
||||
"Define": NumberInt(1)
|
||||
},
|
||||
{
|
||||
"Category": "测试平台",
|
||||
"Name": "系统设置地址",
|
||||
"Code": "http://localhost:50852/Admin/Index",
|
||||
"Code": "/Admin/Index",
|
||||
"Define": NumberInt(1)
|
||||
},
|
||||
{
|
||||
"Category": "测试平台",
|
||||
"Name": "系统通知地址",
|
||||
"Code": "http://localhost:50852/Admin/Notifications",
|
||||
"Code": "/Admin/Notifications",
|
||||
"Define": NumberInt(1)
|
||||
},
|
||||
{
|
||||
"Category": "应用首页",
|
||||
"Name": "Demo",
|
||||
"Code": "http://localhost:49185/",
|
||||
"Code": "http://localhost:49185",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "系统设置",
|
||||
"Category": "网站设置",
|
||||
"Name": "程序异常保留时长",
|
||||
"Code": "1",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
|
||||
"Category": "系统设置",
|
||||
"Category": "网站设置",
|
||||
"Name": "操作日志保留时长",
|
||||
"Code": "12",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "系统设置",
|
||||
"Category": "网站设置",
|
||||
"Name": "登录日志保留时长",
|
||||
"Code": "12",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "系统设置",
|
||||
"Category": "网站设置",
|
||||
"Name": "Cookie保留时长",
|
||||
"Code": "7",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "系统设置",
|
||||
"Category": "网站设置",
|
||||
"Name": "IP地理位置接口",
|
||||
"Code": "None",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "系统设置",
|
||||
"Category": "地理位置服务",
|
||||
"Name": "百度地图开放平台",
|
||||
"Code": "BaiDuIPSvr",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "地理位置服务",
|
||||
"Name": "聚合地理位置",
|
||||
"Code": "百度138地理位置",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "地理位置服务",
|
||||
"Name": "https://sp0.baidu.com/8aQDcjqpAAV3otqbppnN2DJv/api.php?resource_id=6006&query=",
|
||||
"Code": "BaiDuIP138Svr",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "地理位置",
|
||||
"Name": "BaiDuIPSvr",
|
||||
"Code": "http://api.map.baidu.com/location/ip?ak=6lvVPMDlm2gjLpU0aiqPsHXi2OiwGQRj&ip=",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "系统设置",
|
||||
"Category": "地理位置",
|
||||
"Name": "JuheIPSvr",
|
||||
"Code": "http://apis.juhe.cn/ip/ipNew?key=f57102d1b9fadd3f4a1c29072d0c0206&ip=",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "系统设置",
|
||||
"Category": "地理位置",
|
||||
"Name": "BaiDuIP138Svr",
|
||||
"Code": "https://sp0.baidu.com/8aQDcjqpAAV3otqbppnN2DJv/api.php?resource_id=6006&query=",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "网站设置",
|
||||
"Name": "访问日志保留时长",
|
||||
"Code": "1",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "系统设置",
|
||||
"Category": "网站设置",
|
||||
"Name": "IP请求缓存时长",
|
||||
"Code": "10",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "系统设置",
|
||||
"Category": "网站设置",
|
||||
"Name": "演示系统",
|
||||
"Code": "0",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "系统设置",
|
||||
"Category": "网站设置",
|
||||
"Name": "授权盐值",
|
||||
"Code": "yjglE2eddCGcS7tTFTDd2DfvqXHgCnMhNhpmx9HJaC9l8GAZ",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "网站设置",
|
||||
"Name": "哈希结果",
|
||||
"Code": "6jTT50HGuk8V+AIsiE4IfqjcER71PBN1DY7gqOLZE7E=",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "网站设置",
|
||||
"Name": "验证码图床",
|
||||
"Code": "http://imgs.sdgxgz.com/images/",
|
||||
"Define": NumberInt(0)
|
||||
|
@ -264,6 +300,12 @@
|
|||
"Code": "1",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "网站设置",
|
||||
"Name": "固定表头",
|
||||
"Code": "1",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "网站设置",
|
||||
"Name": "OAuth 认证登录",
|
||||
|
@ -282,16 +324,76 @@
|
|||
"Code": "0",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "网站设置",
|
||||
"Name": "Blazor",
|
||||
"Code": "0",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "网站设置",
|
||||
"Name": "健康检查",
|
||||
"Code": "0",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "网站设置",
|
||||
"Name": "默认应用程序",
|
||||
"Code": "0",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "网站设置",
|
||||
"Name": "后台地址",
|
||||
"Code": "http://localhost:50852",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "测试平台",
|
||||
"Name": "favicon",
|
||||
"Code": "http://localhost:49185/favicon.ico",
|
||||
"Code": "/favicon.ico",
|
||||
"Define": NumberInt(1)
|
||||
},
|
||||
{
|
||||
"Category": "测试平台",
|
||||
"Name": "网站图标",
|
||||
"Code": "http://localhost:49185/favicon.png",
|
||||
"Code": "/favicon.png",
|
||||
"Define": NumberInt(1)
|
||||
},
|
||||
{
|
||||
"Category": "系统首页",
|
||||
"Name": "高仿码云",
|
||||
"Code": "Login-Gitee",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "系统首页",
|
||||
"Name": "蓝色清新",
|
||||
"Code": "Login-Blue",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "系统首页",
|
||||
"Name": "系统默认",
|
||||
"Code": "Login",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "系统首页",
|
||||
"Name": "科技动感",
|
||||
"Code": "Login-Tec",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "系统首页",
|
||||
"Name": "Admin-LTE",
|
||||
"Code": "Login-LTE",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "网站设置",
|
||||
"Name": "登录界面",
|
||||
"Code": "Login",
|
||||
"Define": NumberInt(0)
|
||||
}
|
||||
];
|
|
@ -215,6 +215,18 @@
|
|||
"IsResource": NumberInt(2),
|
||||
"Application": "BA"
|
||||
},
|
||||
{
|
||||
"_id": ObjectId("5bd7b8445fa31256f77e4b08"),
|
||||
"ParentId": "5bd7b8445fa31256f77e4b93",
|
||||
"Name": "默认应用",
|
||||
"Order": NumberInt(80),
|
||||
"Icon": "fa fa-fa",
|
||||
"Url": "defaultApp",
|
||||
"Category": "0",
|
||||
"Target": "_self",
|
||||
"IsResource": NumberInt(2),
|
||||
"Application": "BA"
|
||||
},
|
||||
{
|
||||
"_id": ObjectId("5bd7b8445fa31256f77e4b94"),
|
||||
"ParentId": "0",
|
||||
|
|
|
@ -26,12 +26,13 @@ INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('头像地址', '头像
|
|||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站样式', '蓝色样式', 'blue.css', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站样式', '黑色样式', 'black.css', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站样式', 'AdminLTE', 'lte.css', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('当前样式', '使用样式', 'blue.css', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '使用样式', 'blue.css', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '前台首页', '~/Home/Index', 0);
|
||||
|
||||
-- 网站UI设置
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '侧边栏状态', '1', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '卡片标题状态', '1', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '固定表头', '1', 0);
|
||||
|
||||
-- 登录配置
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '短信验证码登录', '1', 0);
|
||||
|
@ -41,22 +42,49 @@ INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', 'OAuth
|
|||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '自动锁屏时长', '30', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '自动锁屏', '0', 0);
|
||||
|
||||
-- 是否启用 Blazor 默认为 0 未启用
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', 'Blazor', '0', 0);
|
||||
|
||||
-- 是否启用 健康检查 默认为 0 未启用 1 启用
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) Values ('网站设置', '健康检查', '1', 0);
|
||||
|
||||
-- 时长单位 月
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', '程序异常保留时长', '1', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', '操作日志保留时长', '12', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', '登录日志保留时长', '12', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', '访问日志保留时长', '1', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '程序异常保留时长', '1', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '操作日志保留时长', '12', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '登录日志保留时长', '12', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '访问日志保留时长', '1', 0);
|
||||
|
||||
-- 时长单位 天
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', 'Cookie保留时长', '7', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', 'Cookie保留时长', '7', 0);
|
||||
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', 'IP地理位置接口', 'None', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('地理位置服务', '百度地图开放平台', 'BaiDuIPSvr', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('地理位置服务', '聚合地理位置', 'JuheIPSvr', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('地理位置服务', '百度138地理位置', 'BaiDuIP138Svr', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('地理位置', 'BaiDuIPSvr', 'http://api.map.baidu.com/location/ip?ak=6lvVPMDlm2gjLpU0aiqPsHXi2OiwGQRj&ip=', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('地理位置', 'JuheIPSvr', 'http://apis.juhe.cn/ip/ipNew?key=f57102d1b9fadd3f4a1c29072d0c0206&ip=', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('地理位置', 'BaiDuIP138Svr', 'https://sp0.baidu.com/8aQDcjqpAAV3otqbppnN2DJv/api.php?resource_id=6006&query=', 0);
|
||||
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', 'IP地理位置接口', 'None', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', 'BaiDuIPSvr', 'http://api.map.baidu.com/location/ip?ak=6lvVPMDlm2gjLpU0aiqPsHXi2OiwGQRj&ip=', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', 'JuheIPSvr', 'http://apis.juhe.cn/ip/ipNew?key=f57102d1b9fadd3f4a1c29072d0c0206&ip=', 0);
|
||||
-- 时长单位 分钟
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', 'IP请求缓存时长', '10', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', '演示系统', '0', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', '验证码图床', 'http://imgs.sdgxgz.com/images/', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', 'IP请求缓存时长', '10', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '演示系统', '0', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '授权盐值', 'yjglE2eddCGcS7tTFTDd2DfvqXHgCnMhNhpmx9HJaC9l8GAZ', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '哈希结果', '6jTT50HGuk8V+AIsiE4IfqjcER71PBN1DY7gqOLZE7E=', 0);
|
||||
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '验证码图床', 'http://imgs.sdgxgz.com/images/', 0);
|
||||
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '默认应用程序', '0', 0);
|
||||
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '后台地址', 'http://localhost:50852', 0);
|
||||
|
||||
-- 系统登录首页设置
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统首页', '高仿码云', 'Login-Gitee', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统首页', '蓝色清新', 'Login-Blue', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统首页', '系统默认', 'Login', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统首页', '科技动感', 'Login-Tec', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统首页', 'Admin-LTE', 'Login-LTE', 0);
|
||||
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '登录界面', 'Login', 0);
|
||||
|
||||
DELETE FROM Navigations Where Category = '0';
|
||||
INSERT INTO Navigations (ParentId, Name, `Order`, Icon, Url, Category) VALUES (0, '后台管理', 10, 'fa fa-gear', '~/Admin/Index', '0');
|
||||
|
@ -77,6 +105,7 @@ INSERT INTO Navigations (ParentId, Name, `Order`, Icon, Url, Category, IsResourc
|
|||
INSERT INTO Navigations (ParentId, Name, `Order`, Icon, Url, Category, IsResource) VALUES (@@identity - 4, '清理全部缓存', 50, 'fa fa-fa', 'clearAllCache', '0', 2);
|
||||
INSERT INTO Navigations (ParentId, Name, `Order`, Icon, Url, Category, IsResource) VALUES (@@identity - 5, '登录设置', 60, 'fa fa-fa', 'loginSettings', '0', 2);
|
||||
INSERT INTO Navigations (ParentId, Name, `Order`, Icon, Url, Category, IsResource) VALUES (@@identity - 6, '自动锁屏', 70, 'fa fa-fa', 'lockScreen', '0', 2);
|
||||
INSERT INTO Navigations (ParentId, Name, `Order`, Icon, Url, Category, IsResource) VALUES (@@identity - 7, '默认应用', 80, 'fa fa-fa', 'defaultApp', '0', 2);
|
||||
INSERT INTO Navigations (ParentId, Name, `Order`, Icon, Url, Category) VALUES (0, '菜单管理', 50, 'fa fa-dashboard', '~/Admin/Menus', '0');
|
||||
INSERT INTO Navigations (ParentId, Name, `Order`, Icon, Url, Category, IsResource) VALUES (@@identity, '新增', 10, 'fa fa-fa', 'add', '0', 2);
|
||||
INSERT INTO Navigations (ParentId, Name, `Order`, Icon, Url, Category, IsResource) VALUES (@@identity - 1, '编辑', 20, 'fa fa-fa', 'edit', '0', 2);
|
||||
|
@ -128,6 +157,11 @@ INSERT INTO Navigations (ParentId, Name, `Order`, Icon, Url, Category) VALUES (@
|
|||
INSERT INTO Navigations (ParentId, Name, `Order`, Icon, Url, Category) VALUES (@@identity - 1, 'API文档', 10, 'fa fa-wrench', '~/swagger', '0');
|
||||
INSERT INTO Navigations (ParentId, Name, `Order`, Icon, Url, Category) VALUES (@@identity - 2, '图标集', 10, 'fa fa-dashboard', '~/Admin/FAIcon', '0');
|
||||
|
||||
-- 控件集合菜单
|
||||
INSERT INTO Navigations (ParentId, Name, `Order`, Icon, Url, Category) VALUES (0, '控件集合', 170, 'fa fa-stethoscope', '#', '0');
|
||||
INSERT INTO Navigations (ParentId, Name, `Order`, Icon, Url, Category) VALUES (@@identity, '行为式验证码', 10, 'fa fa-wrench', 'https://gitee.com/LongbowEnterprise/SliderCaptcha', '0');
|
||||
INSERT INTO Navigations (ParentId, Name, `Order`, Icon, Url, Category) VALUES (@@identity - 1, '下拉框', 20, 'fa fa-bars', 'http://longbowenterprise.gitee.io/longbow-select/', '0');
|
||||
|
||||
DELETE FROM `Groups` WHERE GroupName = 'Admin';
|
||||
INSERT INTO `Groups` (GroupCode, GroupName, Description) VALUES ('001', 'Admin', '系统默认组');
|
||||
|
||||
|
@ -153,16 +187,16 @@ INSERT INTO NavigationRole (NavigationID, RoleID) SELECT n.Id, r.Id FROM Navigat
|
|||
Delete From Dicts Where Category = '应用程序' and Code = 'Demo';
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('应用程序', '测试平台', 'Demo', 0);
|
||||
Delete From Dicts Where Category = '应用首页' and Name = 'Demo';
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('应用首页', 'Demo', 'http://localhost:49185/', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('应用首页', 'Demo', 'http://localhost:49185', 0);
|
||||
|
||||
Delete From Dicts Where Category = '测试平台';
|
||||
Insert into Dicts (Category, Name, Code, Define) values ('测试平台', '网站标题', '前台演示系统', 1);
|
||||
Insert into Dicts (Category, Name, Code, Define) values ('测试平台', '网站页脚', '前台演示程序后台权限管理框架', 1);
|
||||
Insert into Dicts (Category, Name, Code, Define) values ('测试平台', '个人中心地址', 'http://localhost:50852/Admin/Profiles', 1);
|
||||
Insert into Dicts (Category, Name, Code, Define) values ('测试平台', '系统设置地址', 'http://localhost:50852/Admin/Index', 1);
|
||||
Insert into Dicts (Category, Name, Code, Define) values ('测试平台', '系统通知地址', 'http://localhost:50852/Admin/Notifications', 1);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('测试平台', 'favicon', 'http://localhost:49185/favicon.ico', 1);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('测试平台', '网站图标', 'http://localhost:49185/favicon.png', 1);
|
||||
Insert into Dicts (Category, Name, Code, Define) values ('测试平台', '个人中心地址', '/Admin/Profiles', 1);
|
||||
Insert into Dicts (Category, Name, Code, Define) values ('测试平台', '系统设置地址', '/Admin/Index', 1);
|
||||
Insert into Dicts (Category, Name, Code, Define) values ('测试平台', '系统通知地址', '/Admin/Notifications', 1);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('测试平台', 'favicon', '/favicon.ico', 1);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('测试平台', '网站图标', '/favicon.png', 1);
|
||||
|
||||
Delete from Navigations where Application = 'Demo';
|
||||
INSERT into Navigations (ParentId, Name, `Order`, Icon, Url, Category, Application) VALUES (0, '首页', 10, 'fa fa-fa', '~/Home/Index', '1', 'Demo');
|
||||
|
|
|
@ -178,10 +178,10 @@ CREATE TABLE Traces(
|
|||
UserName VARCHAR (50) NOT NULL,
|
||||
LogTime DATETIME NOT NULL,
|
||||
IP VARCHAR (15) NOT NULL,
|
||||
Browser VARCHAR (50),
|
||||
OS VARCHAR (50),
|
||||
Browser VARCHAR (2000),
|
||||
OS VARCHAR (2000),
|
||||
City VARCHAR (50),
|
||||
RequestUrl VARCHAR (500) NOT NULL,
|
||||
RequestUrl VARCHAR (2000) NOT NULL,
|
||||
UserAgent VARCHAR (2000) NULL,
|
||||
Referer VARCHAR (2000)
|
||||
);
|
||||
|
@ -189,6 +189,6 @@ CREATE TABLE Traces(
|
|||
CREATE TABLE DBLogs (
|
||||
ID INTEGER PRIMARY KEY Auto_increment,
|
||||
UserName VARCHAR (50) NULL,
|
||||
`SQL` VARCHAR (2000) NOT NULL,
|
||||
`SQL` Text NOT NULL,
|
||||
LogTime DATETIME NOT NULL
|
||||
);
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
[client]
|
||||
[mysqld]
|
||||
basedir=C:\\Program Files\\MySQL\\MySQL Server 5.7
|
||||
datadir=C:\\Program Files\\MySQL\\MySQL Server 5.7\\data
|
||||
character-set-server=utf8
|
||||
|
||||
[client]
|
||||
default-character-set=utf8
|
||||
|
||||
[mysqld]
|
||||
charcater_set_client=utf8
|
||||
character_set_connection=utf8
|
||||
character_set_results=utf8
|
||||
character_set_server=utf8
|
||||
character_set_database=utf8
|
||||
[mysql]
|
||||
default-character-set=utf8
|
||||
|
|
|
@ -0,0 +1,214 @@
|
|||
-- ADMIN/123789
|
||||
-- User/123789
|
||||
DELETE From Users where UserName in ('Admin', 'User');
|
||||
INSERT INTO Users (Id, UserName, Password, PassSalt, DisplayName, RegisterTime, ApprovedTime, ApprovedBy, Description) values (SEQ_USERS_ID.NEXTVAL, 'Admin', 'Es7WVgNsJuELwWK8daCqufUBknCsSC0IYDphQZAiGOo=', 'W5vpBEOYRGHkQXatN0t+ECM/U8cHDuEgrq56+zZBk4J481xH', 'Administrator', sysdate, sysdate, 'system', '系统默认创建');
|
||||
INSERT INTO Users (Id, UserName, Password, PassSalt, DisplayName, RegisterTime, ApprovedTime, ApprovedBy, Description, App) values (SEQ_USERS_ID.NEXTVAL, 'User', 'tXG/yNffpnm6cThrCH7wf6jN1ic3VHvLoY4OrzKtrZ4=', 'c5cIrRMn8XjB84M/D/X7Lg9uUqQFmYNEdxb/4HWH8OLa4pNZ', '测试账号', sysdate, sysdate, 'system', '系统默认创建', 'Demo');
|
||||
|
||||
DELETE From Dicts Where Define = 0;
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '菜单', '系统菜单', '0', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '菜单', '外部菜单', '1', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '应用程序', '后台管理', 'BA', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '网站标题', '后台管理系统', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '网站页脚', '2016 © 通用后台管理系统', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '系统通知', '用户注册', '0', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '系统通知', '程序异常', '1', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '系统通知', '数据库连接', '2', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '通知状态', '未处理', '0', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '通知状态', '已处理', '1', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '处理结果', '同意', '0', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '处理结果', '拒绝', '1', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '消息状态', '未读', '0', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '消息状态', '已读', '1', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '消息标签', '一般', '0', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '消息标签', '紧要', '1', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '头像地址', '头像路径', '~/images/uploader/', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '头像地址', '头像文件', 'default.jpg', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站样式', '蓝色样式', 'blue.css', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站样式', '黑色样式', 'black.css', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站样式', 'AdminLTE', 'lte.css', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '使用样式', 'blue.css', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '前台首页', '~/Home/Index', 0);
|
||||
|
||||
-- 网站UI设置
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '侧边栏状态', '1', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '卡片标题状态', '1', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '固定表头', '1', 0);
|
||||
|
||||
-- 登录配置
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '短信验证码登录', '1', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', 'OAuth 认证登录', '1', 0);
|
||||
|
||||
-- 自动锁屏(秒)默认 30 秒
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '自动锁屏时长', '30', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '自动锁屏', '0', 0);
|
||||
|
||||
-- 是否启用 Blazor 默认为 0 未启用
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', 'Blazor', '0', 0);
|
||||
|
||||
-- 是否启用 健康检查 默认为 0 未启用 1 启用
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '健康检查', '1', 0);
|
||||
|
||||
-- 时长单位 月
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '程序异常保留时长', '1', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '操作日志保留时长', '12', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '登录日志保留时长', '12', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '访问日志保留时长', '1', 0);
|
||||
|
||||
-- 时长单位 天
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', 'Cookie保留时长', '7', 0);
|
||||
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', 'IP地理位置接口', 'None', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) VALUES (SEQ_DICTS_ID.NEXTVAL, '地理位置服务', '百度地图开放平台', 'BaiDuIPSvr', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) VALUES (SEQ_DICTS_ID.NEXTVAL, '地理位置服务', '聚合地理位置', 'JuheIPSvr', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) VALUES (SEQ_DICTS_ID.NEXTVAL, '地理位置服务', '百度138地理位置', 'BaiDuIP138Svr', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '地理位置', 'BaiDuIPSvr', 'http://api.map.baidu.com/location/ip?ak=6lvVPMDlm2gjLpU0aiqPsHXi2OiwGQRj'||CHR(38)||'ip=', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '地理位置', 'JuheIPSvr', 'http://apis.juhe.cn/ip/ipNew?key=f57102d1b9fadd3f4a1c29072d0c0206'||CHR(38)||'ip=', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '地理位置', 'BaiDuIP138Svr', 'https://sp0.baidu.com/8aQDcjqpAAV3otqbppnN2DJv/api.php?resource_id=6006&query=', 0);
|
||||
|
||||
-- 时长单位 分钟
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', 'IP请求缓存时长', '10', 0);
|
||||
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '演示系统', '0', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) VALUES (SEQ_DICTS_ID.NEXTVAL, '网站设置', '授权盐值', 'yjglE2eddCGcS7tTFTDd2DfvqXHgCnMhNhpmx9HJaC9l8GAZ', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) VALUES (SEQ_DICTS_ID.NEXTVAL, '网站设置', '哈希结果', '6jTT50HGuk8V+AIsiE4IfqjcER71PBN1DY7gqOLZE7E=', 0);
|
||||
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '验证码图床', 'http://imgs.sdgxgz.com/images/', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '默认应用程序', '0', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '后台地址', 'http://localhost:50852', 0);
|
||||
|
||||
-- 系统登录首页设置
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) VALUES (SEQ_DICTS_ID.NEXTVAL, '系统首页', '高仿码云', 'Login-Gitee', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) VALUES (SEQ_DICTS_ID.NEXTVAL, '系统首页', '蓝色清新', 'Login-Blue', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) VALUES (SEQ_DICTS_ID.NEXTVAL, '系统首页', '系统默认', 'Login', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) VALUES (SEQ_DICTS_ID.NEXTVAL, '系统首页', '科技动感', 'Login-Tec', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) VALUES (SEQ_DICTS_ID.NEXTVAL, '系统首页', 'Admin-LTE', 'Login-LTE', 0);
|
||||
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) VALUES (SEQ_DICTS_ID.NEXTVAL, '网站设置', '登录界面', 'Login', 0);
|
||||
|
||||
DELETE FROM Navigations Where Category = '0';
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL, 0, '后台管理', 10, 'fa fa-gear', '~/Admin/Index', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL, 0, '个人中心', 20, 'fa fa-suitcase', '~/Admin/Profiles', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 1, '保存显示名称', 10, 'fa fa-fa', 'saveDisplayName', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 2, '保存密码', 20, 'fa fa-fa', 'savePassword', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 3, '保存应用', 30, 'fa fa-fa', 'saveApp', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 4, '保存样式', 40, 'fa fa-fa', 'saveTheme', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 5, '保存头像', 50, 'fa fa-fa', 'saveIcon', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 6, '保存网站设置', 60, 'fa fa-fa', 'saveUISettings', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL,0, '系统锁屏', 25, 'fa fa-television', '~/Account/Lock', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL,0, '返回前台', 30, 'fa fa-hand-o-left', '~/Home/Index', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL,0, '网站设置', 40, 'fa fa-fa', '~/Admin/Settings', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 1, '保存系统名称', 10, 'fa fa-fa', 'saveTitle', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 2, '保存页脚设置', 20, 'fa fa-fa', 'saveFooter', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 3, '保存样式', 30, 'fa fa-fa', 'saveTheme', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 4, '清理缓存', 40, 'fa fa-fa', 'clearCache', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 5, '清理全部缓存', 50, 'fa fa-fa', 'clearAllCache', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 6, '登录设置', 60, 'fa fa-fa', 'loginSettings', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 7, '自动锁屏', 70, 'fa fa-fa', 'lockScreen', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 8, '默认应用', 80, 'fa fa-fa', 'defaultApp', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL,0, '菜单管理', 50, 'fa fa-dashboard', '~/Admin/Menus', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 1, '新增', 10, 'fa fa-fa', 'add', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 2, '编辑', 20, 'fa fa-fa', 'edit', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 3, '删除', 30, 'fa fa-fa', 'del', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 4, '分配角色', 40, 'fa fa-fa', 'assignRole', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAL,0, '图标页面', 50, 'fa fa-fa', '~/Admin/IconView', '0', 1);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAL,0, '侧边栏', 55, 'fa fa-fa', '~/Admin/Sidebar', '0', 1);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL,0, '用户管理', 60, 'fa fa-user', '~/Admin/Users', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 1, '新增', 10, 'fa fa-fa', 'add', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 2, '编辑', 20, 'fa fa-fa', 'edit', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 3, '删除', 30, 'fa fa-fa', 'del', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 4, '分配部门', 40, 'fa fa-fa', 'assignGroup', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 5, '分配角色', 50, 'fa fa-fa', 'assignRole', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL,0, '角色管理', 70, 'fa fa-sitemap', '~/Admin/Roles', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 1, '新增', 10, 'fa fa-fa', 'add', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 2, '编辑', 20, 'fa fa-fa', 'edit', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 3, '删除', 30, 'fa fa-fa', 'del', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 4, '分配用户', 40, 'fa fa-fa', 'assignUser', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 5, '分配部门', 50, 'fa fa-fa', 'assignGroup', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 6, '分配菜单', 60, 'fa fa-fa', 'assignMenu', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 7, '分配应用', 70, 'fa fa-fa', 'assignApp', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL,0, '部门管理', 80, 'fa fa-bank', '~/Admin/Groups', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 1, '新增', 10, 'fa fa-fa', 'add', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 2, '编辑', 20, 'fa fa-fa', 'edit', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 3, '删除', 30, 'fa fa-fa', 'del', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 4, '分配用户', 40, 'fa fa-fa', 'assignUser', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 5, '分配角色', 50, 'fa fa-fa', 'assignRole', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL,0, '字典表维护', 90, 'fa fa-book', '~/Admin/Dicts', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 1, '新增', 10, 'fa fa-fa', 'add', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 2, '编辑', 20, 'fa fa-fa', 'edit', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 3, '删除', 30, 'fa fa-fa', 'del', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL,0, '站内消息', 100, 'fa fa-envelope', '~/Admin/Messages', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL,0, '任务管理', 110, 'fa fa fa-tasks', '~/Admin/Tasks', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 1, '暂停', 10, 'fa fa-fa', 'pause', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 2, '日志', 20, 'fa fa-fa', 'info', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL,0, '通知管理', 120, 'fa fa-bell', '~/Admin/Notifications', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL,0, '系统日志', 130, 'fa fa-gears', '#', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 1, '操作日志', 10, 'fa fa-edit', '~/Admin/Logs', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 2, '登录日志', 20, 'fa fa-user-circle-o', '~/Admin/Logins', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 3, '访问日志', 30, 'fa fa-bars', '~/Admin/Traces', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 4, 'SQL日志', 40, 'fa fa-database', '~/Admin/SQL', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL,0, '在线用户', 140, 'fa fa-users', '~/Admin/Online', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL,0, '网站分析', 145, 'fa fa-line-chart', '~/Admin/Analyse', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL,0, '程序异常', 150, 'fa fa-cubes', '~/Admin/Exceptions', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL, '服务器日志', 10, 'fa fa-fa', 'log', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL,0, '健康检查', 155, 'fa fa-heartbeat', '~/Admin/Healths', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL,0, '工具集合', 160, 'fa fa-gavel', '#', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 1, '客户端测试', 10, 'fa fa-wrench', '~/Admin/Mobile', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 2, 'API文档', 20, 'fa fa-wrench', '~/swagger', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 3, '图标集', 30, 'fa fa-dashboard', '~/Admin/FAIcon', '0');
|
||||
|
||||
-- 控件集合菜单
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL, 0, '控件集合', 170, 'fa fa-stethoscope', '#', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 1, '行为式验证码', 10, 'fa fa-wrench', 'https://gitee.com/LongbowEnterprise/SliderCaptcha', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 2, '下拉框', 20, 'fa fa-bars', 'http://longbowenterprise.gitee.io/longbow-select/', '0');
|
||||
|
||||
DELETE FROM GROUPS WHERE GroupName = 'Admin';
|
||||
INSERT INTO Groups (Id, GroupCode, GroupName, Description) VALUES (SEQ_GROUPS_ID.NEXTVAL, '001', 'Admin', '系统默认组');
|
||||
|
||||
DELETE FROM Roles where RoleName in ('Administrators', 'Default');
|
||||
INSERT INTO Roles (Id, RoleName, Description) VALUES (SEQ_ROLES_ID.NEXTVAL, 'Administrators', '系统管理员');
|
||||
INSERT INTO Roles (Id, RoleName, Description) VALUES (SEQ_ROLES_ID.NEXTVAL, 'Default', '默认用户,可访问前台页面');
|
||||
|
||||
DELETE FROM RoleGroup;
|
||||
INSERT INTO RoleGroup (Id, GroupId, RoleId) SELECT SEQ_ROLEGROUP_ID.NEXTVAL, g.Id, r.Id From Groups g left join Roles r on 1=1 where GroupName = 'Admin' and RoleName = 'Administrators';
|
||||
|
||||
DELETE FROM UserGroup;
|
||||
|
||||
DELETE FROM UserRole;
|
||||
INSERT INTO UserRole (Id, UserId, RoleId) SELECT SEQ_USERROLE_ID.NEXTVAL, u.Id, r.Id From Users u left join Roles r on 1=1 where UserName = 'Admin' and RoleName = 'Administrators';
|
||||
INSERT INTO UserRole (Id, UserId, RoleId) SELECT SEQ_USERROLE_ID.NEXTVAL, u.Id, r.Id From Users u left join Roles r on 1=1 where UserName = 'User' and RoleName = 'Default';
|
||||
|
||||
DELETE FROM NavigationRole;
|
||||
INSERT INTO NavigationRole (Id, NavigationID, RoleID) SELECT SEQ_NAVIGATIONROLE_ID.NEXTVAL, n.Id, r.Id FROM Navigations n left join Roles r on 1=1 Where RoleName = 'Administrators';
|
||||
INSERT INTO NavigationRole (Id, NavigationID, RoleID) SELECT SEQ_NAVIGATIONROLE_ID.NEXTVAL, n.Id, r.Id FROM Navigations n left join Roles r on 1=1 Where RoleName = 'Default' and Name in ('后台管理', '个人中心', '返回前台', '通知管理');
|
||||
INSERT INTO NavigationRole (Id, NavigationID, RoleID) SELECT SEQ_NAVIGATIONROLE_ID.NEXTVAL, n.Id, r.Id FROM Navigations n left join Roles r on 1=1 Where RoleName = 'Default' and ParentId in (select id from Navigations where Name in ('个人中心'));
|
||||
|
||||
-- Client Data
|
||||
Delete From Dicts Where Category = '应用程序' and Code = 'Demo';
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) VALUES (SEQ_DICTS_ID.NEXTVAL, '应用程序', '测试平台', 'Demo', 0);
|
||||
Delete From Dicts Where Category = '应用首页' and Name = 'Demo';
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) VALUES (SEQ_DICTS_ID.NEXTVAL, '应用首页', 'Demo', 'http://localhost:49185', 0);
|
||||
|
||||
Delete From Dicts Where Category = '测试平台';
|
||||
Insert into Dicts (Id, Category, Name, Code, Define) values (SEQ_DICTS_ID.NEXTVAL, '测试平台', '网站标题', '前台演示系统', 1);
|
||||
Insert into Dicts (Id, Category, Name, Code, Define) values (SEQ_DICTS_ID.NEXTVAL, '测试平台', '网站页脚', '前台演示程序后台权限管理框架', 1);
|
||||
Insert into Dicts (Id, Category, Name, Code, Define) values (SEQ_DICTS_ID.NEXTVAL, '测试平台', '个人中心地址', '/Admin/Profiles', 1);
|
||||
Insert into Dicts (Id, Category, Name, Code, Define) values (SEQ_DICTS_ID.NEXTVAL, '测试平台', '系统设置地址', '/Admin/Index', 1);
|
||||
Insert into Dicts (Id, Category, Name, Code, Define) values (SEQ_DICTS_ID.NEXTVAL, '测试平台', '系统通知地址', '/Admin/Notifications', 1);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) VALUES (SEQ_DICTS_ID.NEXTVAL, '测试平台', 'favicon', '/favicon.ico', 1);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) VALUES (SEQ_DICTS_ID.NEXTVAL, '测试平台', '网站图标', '/favicon.png', 1);
|
||||
|
||||
Delete from Navigations where Application = 'Demo';
|
||||
INSERT into Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, Application) VALUES (SEQ_NAVIGATIONS_ID.NEXTVAl, 0, '首页', 10, 'fa fa-fa', '~/Home/Index', '1', 'Demo');
|
||||
|
||||
INSERT into Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, Application) VALUES (SEQ_NAVIGATIONS_ID.NEXTVAl, 0, '测试页面', 20, 'fa fa-fa', '#', '1', 'Demo');
|
||||
INSERT into Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, Application) VALUES (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL, '关于', 10, 'fa fa-fa', '~/Home/About', '1', 'Demo');
|
||||
|
||||
INSERT into Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, Application) VALUES (SEQ_NAVIGATIONS_ID.NEXTVAl, 0, '返回码云', 20, 'fa fa-fa', 'https://gitee.com/LongbowEnterprise/BootstrapAdmin', '1', 'Demo');
|
||||
|
||||
-- 菜单授权
|
||||
INSERT INTO NavigationRole (Id, NavigationId, RoleId) SELECT SEQ_NAVIGATIONROLE_ID.NEXTVAL, n.ID, r.ID FROM Navigations n left join Roles r on 1=1 Where r.RoleName = 'Default' and Application = 'Demo';
|
||||
|
||||
-- 角色对应用授权
|
||||
DELETE From RoleApp where AppId in ('Demo', 'BA');
|
||||
INSERT INTO RoleApp (Id, AppId, RoleId) SELECT SEQ_ROLEAPP_ID.NEXTVAL, 'Demo', ID From Roles Where RoleName = 'Default';
|
||||
INSERT INTO RoleApp (Id, AppId, RoleId) SELECT SEQ_ROLEAPP_ID.NEXTVAL, 'BA', ID From Roles Where RoleName = 'Default';
|
|
@ -0,0 +1,215 @@
|
|||
CREATE TABLE Users (
|
||||
ID INTEGER NOT NULL,
|
||||
UserName NVARCHAR2 (16) NOT NULL,
|
||||
Password NVARCHAR2 (50) NOT NULL,
|
||||
PassSalt NVARCHAR2 (50) NOT NULL,
|
||||
DisplayName NVARCHAR2 (50) NOT NULL,
|
||||
RegisterTime DATE NOT NULL,
|
||||
ApprovedTime DATE,
|
||||
ApprovedBy NVARCHAR2 (50),
|
||||
Description NVARCHAR2 (500) NOT NULL,
|
||||
RejectedBy NVARCHAR2 (50) ,
|
||||
RejectedTime DATE,
|
||||
RejectedReason NVARCHAR2 (50),
|
||||
Icon NVARCHAR2 (50),
|
||||
Css NVARCHAR2 (50),
|
||||
App NVARCHAR2 (50)
|
||||
);
|
||||
|
||||
CREATE TABLE UserRole (
|
||||
ID INTEGER NOT NULL,
|
||||
UserID INTEGER NOT NULL,
|
||||
RoleID INTEGER NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE UserGroup(
|
||||
ID INTEGER NOT NULL,
|
||||
UserID INTEGER NOT NULL,
|
||||
GroupID INTEGER NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE Roles(
|
||||
ID INTEGER NOT NULL,
|
||||
RoleName NVARCHAR2 (50) NOT NULL,
|
||||
Description NVARCHAR2 (500) NULL
|
||||
);
|
||||
|
||||
CREATE TABLE RoleGroup(
|
||||
ID INTEGER NOT NULL,
|
||||
RoleID INTEGER NOT NULL,
|
||||
GroupID INTEGER NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE RoleApp(
|
||||
ID INTEGER NOT NULL,
|
||||
AppID NVARCHAR2 (50) NOT NULL,
|
||||
RoleID INTEGER NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE Notifications(
|
||||
ID INTEGER NOT NULL,
|
||||
Category NVARCHAR2 (50) NOT NULL,
|
||||
Title NVARCHAR2 (50) NOT NULL,
|
||||
Content NVARCHAR2 (50) NOT NULL,
|
||||
RegisterTime DATE NOT NULL,
|
||||
ProcessTime DATE NULL,
|
||||
ProcessBy NVARCHAR2 (50) NULL,
|
||||
ProcessResult NVARCHAR2 (50) NULL,
|
||||
Status NVARCHAR2 (50) DEFAULT 0
|
||||
);
|
||||
|
||||
CREATE TABLE Navigations(
|
||||
ID INTEGER NOT NULL,
|
||||
ParentId INTEGER DEFAULT 0,
|
||||
Name NVARCHAR2 (50) NOT NULL,
|
||||
"ORDER" INTEGER DEFAULT 0 NOT NULL,
|
||||
Icon NVARCHAR2 (50) DEFAULT 'fa fa-fa',
|
||||
Url NVARCHAR2 (2000) NULL,
|
||||
Category NVARCHAR2 (50) DEFAULT 0,
|
||||
Target NVARCHAR2 (10) DEFAULT '_self',
|
||||
IsResource INTEGER DEFAULT 0,
|
||||
Application NVARCHAR2 (200) DEFAULT 'BA'
|
||||
);
|
||||
|
||||
CREATE TABLE NavigationRole(
|
||||
ID INTEGER NOT NULL,
|
||||
NavigationID INTEGER NOT NULL,
|
||||
RoleID INTEGER NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE Logs(
|
||||
ID INTEGER NOT NULL,
|
||||
CRUD NVARCHAR2 (50) NOT NULL,
|
||||
UserName NVARCHAR2 (50) NOT NULL,
|
||||
LogTime DATE NOT NULL,
|
||||
Ip NVARCHAR2 (15) NOT NULL,
|
||||
Browser NVARCHAR2 (50) NULL,
|
||||
OS NVARCHAR2 (50) NULL,
|
||||
City NVARCHAR2 (50) NULL,
|
||||
RequestUrl NVARCHAR2 (500) NOT NULL,
|
||||
RequestData NVARCHAR2 (2000) NULL,
|
||||
UserAgent NVARCHAR2 (2000) NULL,
|
||||
Referer NVARCHAR2 (2000) NULL
|
||||
);
|
||||
|
||||
CREATE TABLE Groups(
|
||||
ID INTEGER NOT NULL,
|
||||
GroupCode NVARCHAR2 (50) NOT NULL,
|
||||
GroupName NVARCHAR2 (50) NOT NULL,
|
||||
Description NVARCHAR2 (500) NULL
|
||||
);
|
||||
|
||||
CREATE TABLE Exceptions(
|
||||
ID INTEGER NOT NULL,
|
||||
AppDomainName NVARCHAR2 (50) NOT NULL,
|
||||
ErrorPage NVARCHAR2 (50) NOT NULL,
|
||||
UserID NVARCHAR2 (50) NULL,
|
||||
UserIp NVARCHAR2 (15) NULL,
|
||||
ExceptionType NVARCHAR2 (2000) NOT NULL,
|
||||
Message NVARCHAR2 (2000) NOT NULL,
|
||||
StackTrace NVARCHAR2 (2000) NULL,
|
||||
LogTime DATE NOT NULL,
|
||||
Category NVARCHAR2 (50) NULL
|
||||
);
|
||||
|
||||
CREATE TABLE Dicts(
|
||||
ID INTEGER NOT NULL,
|
||||
Category NVARCHAR2 (50) NOT NULL,
|
||||
Name NVARCHAR2 (50) NOT NULL,
|
||||
Code NVARCHAR2 (2000) NOT NULL,
|
||||
Define INTEGER DEFAULT 1 NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE Messages(
|
||||
ID INTEGER NOT NULL,
|
||||
Title NVARCHAR2 (50) NOT NULL,
|
||||
Content NVARCHAR2 (500) NOT NULL,
|
||||
"FROM" NVARCHAR2 (50) NOT NULL,
|
||||
"TO" NVARCHAR2 (50) NOT NULL,
|
||||
SendTime DATE NOT NULL,
|
||||
Status NVARCHAR2 (50) NOT NULL,
|
||||
Flag INTEGER DEFAULT 0,
|
||||
IsDelete INTEGER DEFAULT 0,
|
||||
Label NVARCHAR2 (50)
|
||||
);
|
||||
|
||||
CREATE TABLE Tasks(
|
||||
ID INTEGER NOT NULL,
|
||||
TaskName NVARCHAR2 (500) NOT NULL,
|
||||
AssignName NVARCHAR2 (50) NOT NULL,
|
||||
UserName NVARCHAR2 (50) NOT NULL,
|
||||
TaskTime INTEGER NOT NULL,
|
||||
TaskProgress INTEGER NOT NULL,
|
||||
AssignTime DATE NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE RejectUsers(
|
||||
ID INTEGER NOT NULL,
|
||||
UserName NVARCHAR2 (50) NOT NULL,
|
||||
DisplayName NVARCHAR2 (50) NOT NULL,
|
||||
RegisterTime DATE NOT NULL,
|
||||
RejectedBy NVARCHAR2 (50) NOT NULL,
|
||||
RejectedTime DATE NOT NULL,
|
||||
RejectedReason NVARCHAR2 (50) NULL
|
||||
);
|
||||
|
||||
CREATE TABLE LoginLogs(
|
||||
ID INTEGER NOT NULL,
|
||||
UserName NVARCHAR2 (50) NOT NULL,
|
||||
LoginTime DATE NOT NULL,
|
||||
Ip NVARCHAR2 (15) NOT NULL,
|
||||
OS NVARCHAR2 (50) NULL,
|
||||
Browser NVARCHAR2 (50) NULL,
|
||||
City NVARCHAR2 (50) NULL,
|
||||
Result NVARCHAR2 (50) NOT NULL,
|
||||
UserAgent NVARCHAR2 (2000) NULL
|
||||
);
|
||||
|
||||
CREATE TABLE ResetUsers(
|
||||
ID INTEGER NOT NULL,
|
||||
UserName NVARCHAR2 (50) NOT NULL,
|
||||
DisplayName NVARCHAR2 (50) NOT NULL,
|
||||
Reason NVARCHAR2 (500) NOT NULL,
|
||||
ResetTime DATE NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE Traces(
|
||||
ID INTEGER NOT NULL,
|
||||
UserName NVARCHAR2 (50) NOT NULL,
|
||||
LogTime DATE NOT NULL,
|
||||
IP NVARCHAR2 (15) NOT NULL,
|
||||
Browser NVARCHAR2 (2000),
|
||||
OS NVARCHAR2 (2000),
|
||||
City NVARCHAR2 (50),
|
||||
RequestUrl NVARCHAR2 (2000) NOT NULL,
|
||||
UserAgent NVARCHAR2 (2000),
|
||||
Referer NVARCHAR2 (2000)
|
||||
);
|
||||
|
||||
CREATE TABLE DBLogs (
|
||||
ID INTEGER NOT NULL,
|
||||
UserName NVARCHAR2 (50),
|
||||
SQL NVARCHAR2 (2000) NOT NULL,
|
||||
LogTime DATE NOT NULL
|
||||
);
|
||||
|
||||
CREATE SEQUENCE SEQ_USERS_ID;
|
||||
CREATE SEQUENCE SEQ_USERROLE_ID;
|
||||
CREATE SEQUENCE SEQ_USERGROUP_ID;
|
||||
CREATE SEQUENCE SEQ_ROLES_ID;
|
||||
CREATE SEQUENCE SEQ_ROLEGROUP_ID;
|
||||
CREATE SEQUENCE SEQ_ROLEAPP_ID;
|
||||
CREATE SEQUENCE SEQ_NOTIFICATIONS_ID;
|
||||
CREATE SEQUENCE SEQ_NAVIGATIONS_ID;
|
||||
CREATE SEQUENCE SEQ_NAVIGATIONROLE_ID;
|
||||
CREATE SEQUENCE SEQ_LOGS_ID;
|
||||
CREATE SEQUENCE SEQ_GROUPS_ID;
|
||||
CREATE SEQUENCE SEQ_EXCEPTIONS_ID;
|
||||
CREATE SEQUENCE SEQ_DICTS_ID;
|
||||
CREATE SEQUENCE SEQ_MESSAGES_ID;
|
||||
CREATE SEQUENCE SEQ_TASKS_ID;
|
||||
CREATE SEQUENCE SEQ_REJECTUSERS_ID;
|
||||
CREATE SEQUENCE SEQ_LOGINLOGS_ID;
|
||||
CREATE SEQUENCE SEQ_RESETUSERS_ID;
|
||||
CREATE SEQUENCE SEQ_TRACES_ID;
|
||||
CREATE SEQUENCE SEQ_DBLOGS_ID;
|
|
@ -26,12 +26,13 @@ INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('头像地址', '头像
|
|||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站样式', '蓝色样式', 'blue.css', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站样式', '黑色样式', 'black.css', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站样式', 'AdminLTE', 'lte.css', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('当前样式', '使用样式', 'blue.css', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '使用样式', 'blue.css', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '前台首页', '~/Home/Index', 0);
|
||||
|
||||
-- 网站UI设置
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '侧边栏状态', '1', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '卡片标题状态', '1', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '固定表头', '1', 0);
|
||||
|
||||
-- 登录配置
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '短信验证码登录', '1', 0);
|
||||
|
@ -42,21 +43,23 @@ INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '自动
|
|||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '自动锁屏', '0', 0);
|
||||
|
||||
-- 时长单位 月
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', '程序异常保留时长', '1', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', '操作日志保留时长', '12', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', '登录日志保留时长', '12', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', '访问日志保留时长', '1', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '程序异常保留时长', '1', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '操作日志保留时长', '12', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '登录日志保留时长', '12', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '访问日志保留时长', '1', 0);
|
||||
|
||||
-- 时长单位 天
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', 'Cookie保留时长', '7', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', 'Cookie保留时长', '7', 0);
|
||||
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', 'IP地理位置接口', 'None', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('地理位置', 'BaiDuIPSvr', 'http://api.map.baidu.com/location/ip?ak=6lvVPMDlm2gjLpU0aiqPsHXi2OiwGQRj&ip=', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('地理位置', 'JuheIPSvr', 'http://apis.juhe.cn/ip/ipNew?key=f57102d1b9fadd3f4a1c29072d0c0206&ip=', 0);
|
||||
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '演示系统', '0', 0);
|
||||
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', 'IP地理位置接口', 'None', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', 'BaiDuIPSvr', 'http://api.map.baidu.com/location/ip?ak=6lvVPMDlm2gjLpU0aiqPsHXi2OiwGQRj&ip=', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', 'JuheIPSvr', 'http://apis.juhe.cn/ip/ipNew?key=f57102d1b9fadd3f4a1c29072d0c0206&ip=', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', '演示系统', '0', 0);
|
||||
-- 时长单位 分钟
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', 'IP请求缓存时长', '10', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', '验证码图床', 'http://imgs.sdgxgz.com/images/', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', 'IP请求缓存时长', '10', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '验证码图床', 'http://imgs.sdgxgz.com/images/', 0);
|
||||
|
||||
DELETE FROM Navigations Where Category = '0';
|
||||
INSERT INTO Navigations (ParentId, Name, "order", Icon, Url, Category) VALUES (0, '后台管理', 10, 'fa fa-gear', '~/Admin/Index', '0');
|
||||
|
|
|
@ -178,10 +178,10 @@ CREATE TABLE Traces(
|
|||
UserName VARCHAR (50) NOT NULL,
|
||||
LogTime DATE NOT NULL,
|
||||
IP VARCHAR (15) NOT NULL,
|
||||
Browser VARCHAR (50),
|
||||
OS VARCHAR (50),
|
||||
Browser VARCHAR (2000),
|
||||
OS VARCHAR (2000),
|
||||
City VARCHAR (50),
|
||||
RequestUrl VARCHAR (500) NOT NULL,
|
||||
RequestUrl VARCHAR (2000) NOT NULL,
|
||||
UserAgent VARCHAR (2000) NULL,
|
||||
Referer VARCHAR (2000)
|
||||
);
|
||||
|
|
|
@ -5,8 +5,6 @@ INSERT INTO Users (UserName, Password, PassSalt, DisplayName, RegisterTime, Appr
|
|||
INSERT INTO Users (UserName, Password, PassSalt, DisplayName, RegisterTime, ApprovedTime, ApprovedBy, [Description], [App]) values ('User', 'tXG/yNffpnm6cThrCH7wf6jN1ic3VHvLoY4OrzKtrZ4=', 'c5cIrRMn8XjB84M/D/X7Lg9uUqQFmYNEdxb/4HWH8OLa4pNZ', '测试账号', datetime(CURRENT_TIMESTAMP, 'localtime'), datetime(CURRENT_TIMESTAMP, 'localtime'), 'system', '系统默认创建', 'Demo');
|
||||
|
||||
DELETE From Dicts Where Define = 0;
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('菜单', '系统菜单', '0', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('菜单', '外部菜单', '1', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('应用程序', '后台管理', 'BA', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '网站标题', '后台管理系统', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '网站页脚', '2016 © 通用后台管理系统', 0);
|
||||
|
@ -26,12 +24,13 @@ INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('头像地址
|
|||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站样式', '蓝色样式', 'blue.css', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站样式', '黑色样式', 'black.css', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站样式', 'AdminLTE', 'lte.css', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('当前样式', '使用样式', 'blue.css', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '使用样式', 'blue.css', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '前台首页', '~/Home/Index', 0);
|
||||
|
||||
-- 网站UI设置
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '侧边栏状态', '1', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '卡片标题状态', '1', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '固定表头', '1', 0);
|
||||
|
||||
-- 登录配置
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '短信验证码登录', '1', 0);
|
||||
|
@ -41,22 +40,53 @@ INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置
|
|||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '自动锁屏时长', '30', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '自动锁屏', '0', 0);
|
||||
|
||||
-- 是否启用 Blazor 默认为 0 未启用
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', 'Blazor', '0', 0);
|
||||
|
||||
-- 是否启用 健康检查 默认为 0 未启用 1 启用
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '健康检查', '1', 0);
|
||||
|
||||
-- 时长单位 月
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('系统设置', '程序异常保留时长', '1', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('系统设置', '操作日志保留时长', '12', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('系统设置', '登录日志保留时长', '12', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('系统设置', '访问日志保留时长', '1', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '程序异常保留时长', '1', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '操作日志保留时长', '12', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '登录日志保留时长', '12', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '访问日志保留时长', '1', 0);
|
||||
|
||||
-- 时长单位 天
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('系统设置', 'Cookie保留时长', '7', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', 'Cookie保留时长', '7', 0);
|
||||
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', 'IP地理位置接口', 'None', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('地理位置服务', '百度地图开放平台', 'BaiDuIPSvr', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('地理位置服务', '聚合地理位置', 'JuheIPSvr', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('地理位置服务', '百度138地理位置', 'BaiDuIP138Svr', 0);
|
||||
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('地理位置', 'BaiDuIPSvr', 'http://api.map.baidu.com/location/ip?ak=6lvVPMDlm2gjLpU0aiqPsHXi2OiwGQRj&ip=', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('地理位置', 'JuheIPSvr', 'http://apis.juhe.cn/ip/ipNew?key=f57102d1b9fadd3f4a1c29072d0c0206&ip=', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('地理位置', 'BaiDuIP138Svr', 'https://sp0.baidu.com/8aQDcjqpAAV3otqbppnN2DJv/api.php?resource_id=6006&query=', 0);
|
||||
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('系统设置', 'IP地理位置接口', 'None', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('系统设置', 'BaiDuIPSvr', 'http://api.map.baidu.com/location/ip?ak=6lvVPMDlm2gjLpU0aiqPsHXi2OiwGQRj&ip=', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('系统设置', 'JuheIPSvr', 'http://apis.juhe.cn/ip/ipNew?key=f57102d1b9fadd3f4a1c29072d0c0206&ip=', 0);
|
||||
-- 时长单位 分钟
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('系统设置', 'IP请求缓存时长', '10', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('系统设置', '演示系统', '0', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('系统设置', '验证码图床', 'http://imgs.sdgxgz.com/images/', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', 'IP请求缓存时长', '10', 0);
|
||||
|
||||
-- 演示系统
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '演示系统', '0', 0);
|
||||
-- 授权密码默认为 123789
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '授权盐值', 'yjglE2eddCGcS7tTFTDd2DfvqXHgCnMhNhpmx9HJaC9l8GAZ', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '哈希结果', '6jTT50HGuk8V+AIsiE4IfqjcER71PBN1DY7gqOLZE7E=', 0);
|
||||
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '验证码图床', 'http://imgs.sdgxgz.com/images/', 0);
|
||||
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '默认应用程序', '0', 0);
|
||||
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '后台地址', 'http://localhost:50852', 0);
|
||||
|
||||
-- 系统登录首页设置
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('系统首页', '2-高仿码云', 'Login-Gitee', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('系统首页', '3-蓝色清新', 'Login-Blue', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('系统首页', '1-系统默认', 'Login', 1);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统首页', '科技动感', '4-Login-Tec', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统首页', 'Admin-LTE', '5-Login-LTE', 0);
|
||||
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '登录界面', 'Login', 0);
|
||||
|
||||
DELETE FROM Navigations Where Category = '0';
|
||||
INSERT INTO [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category]) VALUES (0, '后台管理', 10, 'fa fa-gear', '~/Admin/Index', '0');
|
||||
|
@ -77,6 +107,7 @@ INSERT INTO [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category
|
|||
INSERT INTO [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category], IsResource) VALUES (last_insert_rowid() - 4, '清理全部缓存', 50, 'fa fa-fa', 'clearAllCache', '0', 2);
|
||||
INSERT INTO [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category], IsResource) VALUES (last_insert_rowid() - 5, '登录设置', 60, 'fa fa-fa', 'loginSettings', '0', 2);
|
||||
INSERT INTO [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category], IsResource) VALUES (last_insert_rowid() - 6, '自动锁屏', 70, 'fa fa-fa', 'lockScreen', '0', 2);
|
||||
INSERT INTO [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category], IsResource) VALUES (last_insert_rowid() - 7, '默认应用', 80, 'fa fa-fa', 'defaultApp', '0', 2);
|
||||
INSERT INTO [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category]) VALUES (0, '菜单管理', 50, 'fa fa-dashboard', '~/Admin/Menus', '0');
|
||||
INSERT INTO [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category], IsResource) VALUES (last_insert_rowid(), '新增', 10, 'fa fa-fa', 'add', '0', 2);
|
||||
INSERT INTO [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category], IsResource) VALUES (last_insert_rowid() - 1, '编辑', 20, 'fa fa-fa', 'edit', '0', 2);
|
||||
|
@ -158,16 +189,16 @@ INSERT INTO NavigationRole (NavigationID, RoleID) SELECT n.Id, r.Id FROM Navigat
|
|||
Delete From [Dicts] Where Category = '应用程序' and Code = 'Demo';
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('应用程序', '测试平台', 'Demo', 0);
|
||||
Delete From [Dicts] Where Category = '应用首页' and Name = 'Demo';
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('应用首页', 'Demo', 'http://localhost:49185/', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('应用首页', 'Demo', 'http://localhost:49185', 0);
|
||||
|
||||
Delete From [Dicts] Where Category = '测试平台';
|
||||
Insert into Dicts (Category, [Name], Code, Define) values ('测试平台', '网站标题', '前台演示系统', 1);
|
||||
Insert into Dicts (Category, [Name], Code, Define) values ('测试平台', '网站页脚', '前台演示程序后台权限管理框架', 1);
|
||||
Insert into Dicts (Category, [Name], Code, Define) values ('测试平台', '个人中心地址', 'http://localhost:50852/Admin/Profiles', 1);
|
||||
Insert into Dicts (Category, [Name], Code, Define) values ('测试平台', '系统设置地址', 'http://localhost:50852/Admin/Index', 1);
|
||||
Insert into Dicts (Category, [Name], Code, Define) values ('测试平台', '系统通知地址', 'http://localhost:50852/Admin/Notifications', 1);
|
||||
INSERT INTO Dicts (Category, [Name], Code, Define) VALUES ('测试平台', 'favicon', 'http://localhost:49185/favicon.ico', 1);
|
||||
INSERT INTO Dicts (Category, [Name], Code, Define) VALUES ('测试平台', '网站图标', 'http://localhost:49185/favicon.png', 1);
|
||||
Insert into Dicts (Category, [Name], Code, Define) values ('测试平台', '个人中心地址', '/Admin/Profiles', 1);
|
||||
Insert into Dicts (Category, [Name], Code, Define) values ('测试平台', '系统设置地址', '/Admin/Index', 1);
|
||||
Insert into Dicts (Category, [Name], Code, Define) values ('测试平台', '系统通知地址', '/Admin/Notifications', 1);
|
||||
INSERT INTO Dicts (Category, [Name], Code, Define) VALUES ('测试平台', 'favicon', '/favicon.ico', 1);
|
||||
INSERT INTO Dicts (Category, [Name], Code, Define) VALUES ('测试平台', '网站图标', '/favicon.png', 1);
|
||||
|
||||
Delete from [Navigations] where Application = 'Demo';
|
||||
INSERT into [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category], [Application]) VALUES (0, '首页', 10, 'fa fa-fa', '~/Home/Index', '1', 'Demo');
|
||||
|
|
|
@ -178,10 +178,10 @@ CREATE TABLE Traces(
|
|||
UserName VARCHAR (50) NOT NULL COLLATE NOCASE,
|
||||
LogTime DATETIME NOT NULL,
|
||||
IP VARCHAR (15) NOT NULL,
|
||||
Browser VARCHAR (50),
|
||||
OS VARCHAR (50),
|
||||
Browser VARCHAR (2000),
|
||||
OS VARCHAR (2000),
|
||||
City VARCHAR (50),
|
||||
RequestUrl VARCHAR (500) NOT NULL,
|
||||
RequestUrl VARCHAR (2000) NOT NULL,
|
||||
UserAgent VARCHAR (2000),
|
||||
Referer VARCHAR (2000)
|
||||
);
|
||||
|
|
|
@ -29,12 +29,13 @@ INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'头像地
|
|||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站样式', N'蓝色样式', N'blue.css', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站样式', N'黑色样式', N'black.css', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站样式', N'AdminLTE', N'lte.css', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'当前样式', N'使用样式', N'blue.css', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'使用样式', N'blue.css', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'前台首页', N'~/Home/Index', 0)
|
||||
|
||||
-- 网站UI设置
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'侧边栏状态', N'1', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'卡片标题状态', N'1', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'固定表头', N'1', 0)
|
||||
|
||||
-- 登录配置
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'短信验证码登录', N'1', 0)
|
||||
|
@ -44,22 +45,50 @@ INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设
|
|||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'自动锁屏时长', N'30', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'自动锁屏', N'0', 0)
|
||||
|
||||
-- 是否启用 Blazor 默认为 0 未启用
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'Blazor', N'0', 0)
|
||||
|
||||
-- 是否启用 健康检查 默认为 0 未启用 1 启用
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'健康检查', N'1', 0);
|
||||
|
||||
-- 时长单位 月
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'系统设置', N'程序异常保留时长', '1', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'系统设置', N'操作日志保留时长', '12', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'系统设置', N'登录日志保留时长', '12', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'系统设置', N'访问日志保留时长', '1', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'程序异常保留时长', '1', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'操作日志保留时长', '12', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'登录日志保留时长', '12', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'访问日志保留时长', '1', 0)
|
||||
|
||||
-- 时长单位 天
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'系统设置', N'Cookie保留时长', '7', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'Cookie保留时长', '7', 0)
|
||||
|
||||
-- 地理位置接口
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'IP地理位置接口', 'None', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'地理位置服务', N'百度地图开放平台', 'BaiDuIPSvr', 0);
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'地理位置服务', N'聚合地理位置', 'JuheIPSvr', 0);
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'地理位置服务', N'百度138地理位置', 'BaiDuIP138Svr', 0);
|
||||
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'地理位置', N'BaiDuIPSvr', 'http://api.map.baidu.com/location/ip?ak=6lvVPMDlm2gjLpU0aiqPsHXi2OiwGQRj&ip=', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'地理位置', N'JuheIPSvr', 'http://apis.juhe.cn/ip/ipNew?key=f57102d1b9fadd3f4a1c29072d0c0206&ip=', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'地理位置', N'BaiDuIP138Svr', 'https://sp0.baidu.com/8aQDcjqpAAV3otqbppnN2DJv/api.php?resource_id=6006&query=', 0)
|
||||
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'系统设置', N'IP地理位置接口', 'None', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'系统设置', N'BaiDuIPSvr', 'http://api.map.baidu.com/location/ip?ak=6lvVPMDlm2gjLpU0aiqPsHXi2OiwGQRj&ip=', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'系统设置', N'JuheIPSvr', 'http://apis.juhe.cn/ip/ipNew?key=f57102d1b9fadd3f4a1c29072d0c0206&ip=', 0)
|
||||
-- 时长单位 分钟
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'系统设置', N'IP请求缓存时长', '10', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'系统设置', N'演示系统', '0', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'系统设置', N'验证码图床', 'http://imgs.sdgxgz.com/images/', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'IP请求缓存时长', '10', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'演示系统', '0', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'授权盐值', 'yjglE2eddCGcS7tTFTDd2DfvqXHgCnMhNhpmx9HJaC9l8GAZ', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'哈希结果', '6jTT50HGuk8V+AIsiE4IfqjcER71PBN1DY7gqOLZE7E=', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'验证码图床', 'http://imgs.sdgxgz.com/images/', 0)
|
||||
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'默认应用程序', '0', 0)
|
||||
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'后台地址', 'http://localhost:50852', 0)
|
||||
|
||||
-- 系统登录首页设置
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES (N'系统首页', N'高仿码云', N'Login-Gitee', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES (N'系统首页', N'蓝色清新', N'Login-Blue', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES (N'系统首页', N'系统默认', N'Login', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES (N'系统首页', N'科技动感', N'Login-Tec', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES (N'系统首页', N'Admin-LTE', N'Login-LTE', 0);
|
||||
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES (N'网站设置', N'登录界面', N'Login', 0);
|
||||
|
||||
DELETE FROM Navigations Where Category = N'0'
|
||||
INSERT [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category]) VALUES (0, N'后台管理', 10, N'fa fa-gear', N'~/Admin/Index', N'0')
|
||||
|
@ -80,6 +109,7 @@ INSERT INTO [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category
|
|||
INSERT INTO [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category], IsResource) VALUES (@@Identity - 4, N'清理全部缓存', 50, 'fa fa-fa', 'clearAllCache', '0', 2);
|
||||
INSERT INTO [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category], IsResource) VALUES (@@Identity - 5, N'登录设置', 60, 'fa fa-fa', 'loginSettings', '0', 2);
|
||||
INSERT INTO [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category], IsResource) VALUES (@@Identity - 6, N'自动锁屏', 70, 'fa fa-fa', 'lockScreen', '0', 2);
|
||||
INSERT INTO [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category], IsResource) VALUES (@@Identity - 7, N'默认应用', 80, 'fa fa-fa', 'defaultApp', '0', 2);
|
||||
INSERT INTO [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category]) VALUES (0, N'菜单管理', 50, N'fa fa-dashboard', N'~/Admin/Menus', N'0')
|
||||
INSERT INTO [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category], IsResource) VALUES (@@Identity, N'新增', 10, 'fa fa-fa', 'add', '0', 2);
|
||||
INSERT INTO [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category], IsResource) VALUES (@@Identity - 1, N'编辑', 20, 'fa fa-fa', 'edit', '0', 2);
|
||||
|
@ -165,16 +195,16 @@ set @AppName = N'测试平台'
|
|||
Delete From [dbo].[Dicts] Where Category = N'应用程序' and Code = @AppId
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'应用程序', @AppName, @AppId, 0)
|
||||
Delete From [Dicts] Where Category = '应用首页' and Name = @AppId
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'应用首页', @AppId, 'http://localhost:49185/', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'应用首页', @AppId, 'http://localhost:49185', 0)
|
||||
|
||||
Delete From [dbo].[Dicts] Where Category = @AppName
|
||||
Insert Dicts (Category, Name, Code, Define) values (@AppName, N'网站标题', N'前台演示程序', 1);
|
||||
Insert Dicts (Category, Name, Code, Define) values (@AppName, N'网站页脚', N'前台演示程序后台权限管理框架', 1);
|
||||
Insert Dicts (Category, Name, Code, Define) values (@AppName, N'个人中心地址', N'http://localhost:50852/Admin/Profiles', 1);
|
||||
Insert Dicts (Category, Name, Code, Define) values (@AppName, N'系统设置地址', N'http://localhost:50852/Admin/Index', 1);
|
||||
Insert Dicts (Category, Name, Code, Define) values (@AppName, N'系统通知地址', N'http://localhost:50852/Admin/Notifications', 1);
|
||||
INSERT Dicts (Category, Name, Code, Define) VALUES (@AppName, N'favicon', N'http://localhost:49185/favicon.ico', 1);
|
||||
INSERT Dicts (Category, Name, Code, Define) VALUES (@AppName, N'网站图标', 'http://localhost:49185/favicon.png', 1);
|
||||
Insert Dicts (Category, Name, Code, Define) values (@AppName, N'个人中心地址', N'/Admin/Profiles', 1);
|
||||
Insert Dicts (Category, Name, Code, Define) values (@AppName, N'系统设置地址', N'/Admin/Index', 1);
|
||||
Insert Dicts (Category, Name, Code, Define) values (@AppName, N'系统通知地址', N'/Admin/Notifications', 1);
|
||||
INSERT Dicts (Category, Name, Code, Define) VALUES (@AppName, N'favicon', N'/favicon.ico', 1);
|
||||
INSERT Dicts (Category, Name, Code, Define) VALUES (@AppName, N'网站图标', '/favicon.png', 1);
|
||||
|
||||
-- 菜单
|
||||
DELETE FROM Navigations Where [Application] = @AppId
|
||||
|
|
|
@ -564,10 +564,10 @@ CREATE TABLE [dbo].[Traces](
|
|||
[UserName] [varchar](50) NOT NULL,
|
||||
[LogTime] [datetime] NOT NULL,
|
||||
[Ip] [varchar](15) NOT NULL,
|
||||
[Browser] [varchar](50) NULL,
|
||||
[OS] [varchar](50) NULL,
|
||||
[Browser] [varchar](2000) NULL,
|
||||
[OS] [varchar](2000) NULL,
|
||||
[City] [nvarchar](50) NULL,
|
||||
[RequestUrl] [nvarchar](500) NOT NULL,
|
||||
[RequestUrl] [nvarchar](2000) NOT NULL,
|
||||
[UserAgent] [varchar](2000) NULL,
|
||||
[Referer] [nvarchar](2000) NULL,
|
||||
CONSTRAINT [PK_Traces] PRIMARY KEY CLUSTERED
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
# 显示 dotnet version
|
||||
write-host "dotnet --version" -ForegroundColor Cyan
|
||||
dotnet --version
|
||||
|
||||
# 注意 my.ini 文件行结束符必须为CRLF
|
||||
|
||||
$iniPath="C:\Program Files\MySQL\MySQL Server 5.7\my.ini"
|
||||
write-host "copy $($env:appveyor_build_folder)\db\MySQL\my.ini -> $iniPath" -ForegroundColor Cyan
|
||||
xcopy "$($env:appveyor_build_folder)\db\MySQL\my.ini" $iniPath /y
|
||||
$newText = ([System.IO.File]::ReadAllText($iniPath)).Replace("\n", "\r\n")
|
||||
[System.IO.File]::WriteAllText($iniPath, $newText)
|
||||
|
||||
write-host "starting database services ..." -ForegroundColor Cyan
|
|
@ -0,0 +1,78 @@
|
|||
function installDB() {
|
||||
write-host "init sqlserver database..." -ForegroundColor Cyan
|
||||
$startPath = "$($env:appveyor_build_folder)\db\SqlServer"
|
||||
$sqlInstance = "(local)\SQL2017"
|
||||
$outFile = join-path $startPath "output.log"
|
||||
$sqlFile = join-path $startPath "Install.sql"
|
||||
$initFile = join-path $startPath "InitData.sql"
|
||||
|
||||
sqlcmd -S "$sqlInstance" -U sa -P Password12! -i "$sqlFile" -i "$initFile" -o "$outFile"
|
||||
|
||||
write-host "init mysql database..." -ForegroundColor Cyan
|
||||
$env:MYSQL_PWD="Password12!"
|
||||
$mysql = '"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql.exe"'
|
||||
$cmd = $mysql + ' -e "create database BootstrapAdmin;" -uroot'
|
||||
cmd.exe /c $cmd
|
||||
|
||||
$startPath = "$($env:appveyor_build_folder)\db\MySQL"
|
||||
$para = ' -hlocalhost -uroot -DBootstrapAdmin < '
|
||||
$sqlFile = join-path $startPath "Install.sql"
|
||||
$cmd = $mysql + $para + $sqlFile
|
||||
cmd.exe /c $cmd
|
||||
|
||||
$initFile = join-path $startPath "InitData.sql"
|
||||
$cmd = $mysql + $para + $initFile
|
||||
cmd.exe /c $cmd
|
||||
|
||||
write-host "init mongodb data..." -ForegroundColor Cyan
|
||||
$initFolder = "$($env:appveyor_build_folder)\db\MongoDB"
|
||||
cd $initFolder
|
||||
|
||||
cmd.exe /c "C:\mongodb\bin\mongo init.js"
|
||||
|
||||
$cmd = 'C:\mongodb\bin\mongo BootstrapAdmin --eval "printjson(db.getCollectionNames())"'
|
||||
iex "& $cmd"
|
||||
|
||||
cd $($env:appveyor_build_folder)
|
||||
}
|
||||
|
||||
function runUnitTest() {
|
||||
write-host "dotnet test test\UnitTest" -ForegroundColor Cyan
|
||||
dotnet test "test\UnitTest" /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Include="[Bootstrap.Admin*]*%2c[Bootstrap.DataAccess*]*" /p:Exclude="[*]*Program%2c[*]*Startup%2c[Bootstrap.DataAccess*]*AutoDB*%2c[Bootstrap.DataAccess]*WeChatHelper" /p:ExcludeByFile="**/SMSExtensions.cs%2c**/Helper/OAuthHelper.cs%2c**/Extensions/CloudLoggerExtensions.cs%2c**/Extensions/AutoGenerateDatabaseExtensions.cs%2c**/Api/HealthsController.cs%2c**/Pages/**%2c**/DBLogTask.cs%2c**/AutoDbHelper.cs" /p:CoverletOutput=..\..\
|
||||
}
|
||||
|
||||
function installCoveralls() {
|
||||
write-host "install coveralls.net tools" -ForegroundColor Cyan
|
||||
dotnet tool install coveralls.net --tool-path ".\tools"
|
||||
}
|
||||
|
||||
function reportCoveralls() {
|
||||
Set-AppveyorBuildVariable COVERALLS_REPO_TOKEN $($env:COVERALLS_REPO_TOKEN)
|
||||
|
||||
write-host "report UnitTest with Coveralls" -ForegroundColor Cyan
|
||||
.\tools\csmacnz.Coveralls.exe --opencover -i coverage.opencover.xml --useRelativePaths
|
||||
}
|
||||
|
||||
function installCodecov {
|
||||
write-host "install codecov.tool tools" -ForegroundColor Cyan
|
||||
dotnet tool install Codecov.Tool --tool-path ".\tools"
|
||||
}
|
||||
|
||||
function reportCodecov() {
|
||||
Set-AppveyorBuildVariable CODECOV_TOKEN $($env:CODECOV_TOKEN)
|
||||
Set-AppveyorBuildVariable CI $($env:CI)
|
||||
Set-AppveyorBuildVariable APPVEYOR $($env:Appveyor)
|
||||
|
||||
$coverageFile = Test-Path coverage.opencover.xml
|
||||
if ($coverageFile) {
|
||||
write-host "report UnitTest with Codecov" -ForegroundColor Cyan
|
||||
.\tools\codecov -f coverage.opencover.xml
|
||||
}
|
||||
}
|
||||
|
||||
installDB
|
||||
installCoveralls
|
||||
installCodecov
|
||||
runUnitTest
|
||||
reportCoveralls
|
||||
reportCodecov
|
|
@ -0,0 +1,42 @@
|
|||
fix(#BUGID): 简要描述
|
||||
|
||||
#Comment
|
||||
comment #BUGID
|
||||
|
||||
#Issue
|
||||
close link fix https://gitee.com/LongbowEnterprise/dashboard/issues?id=BUGID
|
||||
|
||||
# 样式 : feat(location): 接入登录API
|
||||
#
|
||||
# 登录功能与服务器对接
|
||||
#
|
||||
<type>(<scope>): <subject>
|
||||
|
||||
<body>
|
||||
|
||||
<footer>
|
||||
|
||||
#其中 type 的值可以有
|
||||
# feat: 新功能
|
||||
# fix: 修复bug
|
||||
# doc: 文档改变
|
||||
# style: 代码格式改变
|
||||
# refactor: 某个已有功能重构
|
||||
# perf: 性能优化
|
||||
# test: 增加测试
|
||||
# build: 改变了build工具 如 更新 props 文件
|
||||
# revert: 撤销上一次的 commit
|
||||
# db: 数据库文件或者脚本更改
|
||||
# script: 辅助脚本改变
|
||||
#
|
||||
#scope: 用来说明此次修改的影响范围
|
||||
# all: 表示影响面大 ,如修改了网络框架 会对真个程序产生影响
|
||||
# location: 表示影响小,某个小小的功能
|
||||
# module: 表示会影响某个模块 如登录模块、首页模块 、用户管理模块等等
|
||||
#
|
||||
#subject: 用来简要描述本次改动,概述就好了
|
||||
#
|
||||
#body: 具体的修改信息 应该尽量详细
|
||||
#
|
||||
#footer: 放置写备注啥的,如果是 bug ,可以把bug id放入
|
||||
#
|
|
@ -0,0 +1,32 @@
|
|||
## 提交模板配置
|
||||
|
||||
### Windows Fork
|
||||
|
||||
Windows 版本的 Fork 提供了提交模板 (commit message template)功能,配置步骤如下
|
||||
|
||||
#### git 配置文件
|
||||
|
||||
1. 拷贝仓库 `scripts\git\commit_msg_template.txt` 文件到当前用户根目录下 `C:\Users\[用户名]\.commit_msg_template.txt`
|
||||
2. 配置 git 全局配置文件 `C:\Users\[用户名]\.gitconfig` (此文件为隐藏文件)
|
||||
3. 更新 commit 配置项
|
||||
|
||||
```log
|
||||
[commit]
|
||||
template = /Users/argo/.commit_msg_template.txt
|
||||
```
|
||||
|
||||
注意原始文件不是 . 开头拷贝到跟目录下为 . 开头文件名(点号开头文件默认为隐藏文件)
|
||||
|
||||
#### Fork 配置步骤
|
||||
|
||||
1. 打开要配置的仓库
|
||||
2. 点击菜单栏第二个 **仓库** 菜单(Repository)
|
||||
3. 下拉菜单中选中最后一个菜单项 **仓库设置** 子菜单(Settings for this repository)
|
||||
|
||||
如下图所示
|
||||
![输入图片说明](https://images.gitee.com/uploads/images/2020/0327/123310_1b9b4af3_554725.png "Screen Shot 2020-03-27 at 12.30.38.png")
|
||||
|
||||
4. 切换到 **提交模板** 面板(Commit Template)
|
||||
5. 勾选使用 **全局配置文件** (Use global git configuration file)
|
||||
|
||||
下面的文本框内即出现提交模板内容
|
|
@ -0,0 +1,3 @@
|
|||
@echo off
|
||||
|
||||
copy commit_msg_template.txt "%USERPROFILE%\.commit_msg_template.txt" /y
|
|
@ -0,0 +1,3 @@
|
|||
#! /bin/bash
|
||||
|
||||
cp commit_msg_template.txt "../../.git/commit_msg_template1.txt"
|
|
@ -4,10 +4,10 @@ cd ~/BootstrapAdmin
|
|||
git pull
|
||||
dotnet publish src/admin/Bootstrap.Admin -c Release
|
||||
|
||||
rm -f ~/BootstrapAdmin/src/admin/Bootstrap.Admin/bin/Release/netcoreapp3.0/publish/appsettings*.json
|
||||
rm -f ~/BootstrapAdmin/src/admin/Bootstrap.Admin/bin/Release/netcoreapp3.0/publish/BootstrapAdmin.db
|
||||
rm -f ~/BootstrapAdmin/src/admin/Bootstrap.Admin/bin/Release/net5.0/publish/appsettings*.json
|
||||
rm -f ~/BootstrapAdmin/src/admin/Bootstrap.Admin/bin/Release/net5.0/publish/BootstrapAdmin.db
|
||||
|
||||
systemctl stop ba.admin
|
||||
\cp -fr ~/BootstrapAdmin/src/admin/Bootstrap.Admin/bin/Release/netcoreapp3.0/publish/* /usr/local/ba/admin/
|
||||
\cp -fr ~/BootstrapAdmin/src/admin/Bootstrap.Admin/bin/Release/net5.0/publish/* /usr/local/ba/admin/
|
||||
systemctl start ba.admin
|
||||
systemctl status ba.admin -l
|
|
@ -4,8 +4,8 @@ cd ~/BootstrapAdmin
|
|||
git pull
|
||||
dotnet publish src/client/Bootstrap.Client -c Release
|
||||
|
||||
rm -f ~/BootstrapAdmin/src/client/Bootstrap.Client/bin/Release/netcoreapp3.0/publish/appsettings*.json
|
||||
rm -f ~/BootstrapAdmin/src/client/Bootstrap.Client/bin/Release/net5.0/publish/appsettings*.json
|
||||
systemctl stop ba.client
|
||||
\cp -fr ~/BootstrapAdmin/src/client/Bootstrap.Client/bin/Release/netcoreapp3.0/publish/* /usr/local/ba/client/
|
||||
\cp -fr ~/BootstrapAdmin/src/client/Bootstrap.Client/bin/Release/net5.0/publish/* /usr/local/ba/client/
|
||||
systemctl start ba.client
|
||||
systemctl status ba.client -l
|
|
@ -8,7 +8,7 @@ cp ~/BootstrapAdmin/src/admin/Bootstrap.Admin/appsettings.json /usr/local/ba/adm
|
|||
cp ~/BootstrapAdmin/src/admin/Bootstrap.Admin/BootstrapAdmin.db /usr/local/ba/admin
|
||||
cp ~/BootstrapAdmin/src/client/Bootstrap.Client/appsettings.json /usr/local/ba/client
|
||||
|
||||
cp ~/BootstrapAdmin/services/* /usr/lib/systemd/system
|
||||
cp ~/BootstrapAdmin/scripts/linux/services/* /usr/lib/systemd/system
|
||||
systemctl enable ba.admin
|
||||
systemctl enable ba.client
|
||||
systemctl enable nginx
|
|
@ -3,11 +3,15 @@
|
|||
<Import Project="..\Directory.Build.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<PackageProjectUrl>https://gitee.com/LongbowGroup/$(MsBuildProjectName)</PackageProjectUrl>
|
||||
<RepositoryUrl>https://gitee.com/LongbowGroup/$(MsBuildProjectName).git</RepositoryUrl>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<PackageProjectUrl>https://gitee.com/LongbowEnterprise/BootstrapAdmin</PackageProjectUrl>
|
||||
<RepositoryUrl>https://gitee.com/LongbowEnterprise/BootstrapAdmin.git</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<Nullable>enable</Nullable>
|
||||
<DocumentationFile>$(MSBuildProjectName).xml</DocumentationFile>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -1,140 +0,0 @@
|
|||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Bootstrap.Admin.Controllers.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Gitee 网站信息接口类
|
||||
/// </summary>
|
||||
[Route("api/[controller]/[action]")]
|
||||
[ApiController]
|
||||
[AllowAnonymous]
|
||||
public class GiteeController : ControllerBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取 Gitee 网站 Issues 信息
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="userName"></param>
|
||||
/// <param name="repoName"></param>
|
||||
/// <param name="label"></param>
|
||||
/// <param name="color"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public async Task<ActionResult> Issues([FromServices]GiteeHttpClient client, [FromQuery]string? userName = "LongbowEnterprise", [FromQuery]string? repoName = "BootstrapAdmin", [FromQuery]string? label = "custom badge", [FromQuery]string? color = "orange")
|
||||
{
|
||||
var ret = await GetJsonAsync(() => client.HttpClient.GetStringAsync($"https://gitee.com/{userName}/{repoName}/issues"), content =>
|
||||
{
|
||||
var regex = Regex.Matches(content, "<div class='ui mini circular label'>([\\d]+)</div>", RegexOptions.IgnoreCase);
|
||||
var labels = new string[] { "open", "progressing", "closed", "rejected" };
|
||||
var result = string.IsNullOrEmpty(content) ? new string[] { "unknown" } : regex.Select((m, i) => $"{labels[i]} {m.Groups[1].Value}");
|
||||
return string.Join(" ", result);
|
||||
});
|
||||
color = ret.StartsWith("open 0 progressing 0", StringComparison.OrdinalIgnoreCase) ? "success" : color;
|
||||
return new JsonResult(new { schemaVersion = 1, label, message = ret, color });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取 Gitee 网站 Pulls 信息
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="userName"></param>
|
||||
/// <param name="repoName"></param>
|
||||
/// <param name="label"></param>
|
||||
/// <param name="color"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public async Task<ActionResult> Pulls([FromServices]GiteeHttpClient client, [FromQuery]string? userName = "LongbowEnterprise", [FromQuery]string? repoName = "BootstrapAdmin", [FromQuery]string? label = "custom badge", [FromQuery]string? color = "orange")
|
||||
{
|
||||
var ret = await GetJsonAsync(() => client.HttpClient.GetStringAsync($"https://gitee.com/{userName}/{repoName}/pulls"), content =>
|
||||
{
|
||||
var regex = Regex.Matches(content, "<div class='ui mini circular label'>([\\d]+)</div>", RegexOptions.IgnoreCase);
|
||||
var labels = new string[] { "open", "merged", "closed" };
|
||||
var result = string.IsNullOrEmpty(content) ? new string[] { "unknown" } : regex.Select((m, i) => $"{labels[i]} {m.Groups[1].Value}");
|
||||
return string.Join(" ", result);
|
||||
});
|
||||
return new JsonResult(new { schemaVersion = 1, label, message = ret, color });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取 Gitee 网站 Releases 信息
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="userName"></param>
|
||||
/// <param name="repoName"></param>
|
||||
/// <param name="label"></param>
|
||||
/// <param name="color"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public async Task<ActionResult> Releases([FromServices]GiteeHttpClient client, [FromQuery]string? userName = "LongbowEnterprise", [FromQuery]string? repoName = "BootstrapAdmin", [FromQuery]string? label = "custom badge", [FromQuery]string? color = "orange")
|
||||
{
|
||||
var ret = await GetJsonAsync(() => client.HttpClient.GetStringAsync($"https://gitee.com/{userName}/{repoName}/releases"), content =>
|
||||
{
|
||||
var regex = Regex.Match(content, $"<a href=\"/{userName}/{repoName}/releases/([^\\s]+)\" target=\"_blank\">", RegexOptions.IgnoreCase);
|
||||
return string.IsNullOrEmpty(content) ? "unknown" : regex.Groups[1].Value;
|
||||
});
|
||||
return new JsonResult(new { schemaVersion = 1, label, message = ret, color });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取 Gitee 网站 Builds 信息
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="userName"></param>
|
||||
/// <param name="projName"></param>
|
||||
/// <param name="branchName"></param>
|
||||
/// <param name="label"></param>
|
||||
/// <param name="color"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public async Task<ActionResult> Builds([FromServices]GiteeHttpClient client, [FromQuery]string? userName = "ArgoZhang", [FromQuery]string? projName = "bootstrapadmin", [FromQuery]string? branchName = "master", [FromQuery]string? label = "custom badge", [FromQuery]string? color = "orange")
|
||||
{
|
||||
var ret = await GetJsonAsync(() => client.HttpClient.GetAsJsonAsync<AppveyorBuildResult>($"https://ci.appveyor.com/api/projects/{userName}/{projName}/branch/{branchName}", null, new CancellationTokenSource(10000).Token), content =>
|
||||
{
|
||||
return content == null ? "unknown" : content.Build.Version;
|
||||
});
|
||||
return new JsonResult(new { schemaVersion = 1, label, message = ret, color });
|
||||
}
|
||||
|
||||
private async static Task<string> GetJsonAsync<T>(Func<Task<T>> requestUrl, Func<T, string> callback)
|
||||
{
|
||||
var ret = "unresponsive";
|
||||
try
|
||||
{
|
||||
var resq = await requestUrl();
|
||||
ret = callback(resq);
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ex.Log();
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
private class AppveyorBuildResult
|
||||
{
|
||||
/// <summary>
|
||||
/// Appveyor 编译版本实例
|
||||
/// </summary>
|
||||
public Build Build { get; set; } = new Build();
|
||||
}
|
||||
|
||||
private class Build
|
||||
{
|
||||
/// <summary>
|
||||
/// Build 版本信息
|
||||
/// </summary>
|
||||
public string Version { get; set; } = "";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.Security;
|
||||
using Longbow.Cache;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Filters;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Bootstrap.Admin.Controllers.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// 网站设置控制器
|
||||
/// </summary>
|
||||
[Route("api/[controller]")]
|
||||
[Authorize]
|
||||
[ApiController]
|
||||
public class SettingsController : ControllerBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 保存网站设置方法
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ButtonAuthorize(Url = "~/Admin/Settings", Auth = "saveTitle,saveFooter,saveTheme,saveUISettings")]
|
||||
public bool Post([FromBody]BootstrapDict value) => DictHelper.SaveSettings(value);
|
||||
|
||||
/// <summary>
|
||||
/// 获取网站缓存站点集合
|
||||
/// </summary>
|
||||
[HttpGet]
|
||||
public IEnumerable<ICacheCorsItem> Get() => CacheManager.CorsSites;
|
||||
}
|
||||
}
|
|
@ -1,48 +0,0 @@
|
|||
using Bootstrap.DataAccess;
|
||||
using Longbow.Tasks;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Bootstrap.Admin.Controllers.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// 任务管理控制器
|
||||
/// </summary>
|
||||
[Route("api/[controller]")]
|
||||
[Authorize]
|
||||
[ApiController]
|
||||
public class TasksController : ControllerBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取所有任务数据
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public IEnumerable<object> Get()
|
||||
{
|
||||
return TaskServicesManager.ToList().Select(s => new { s.Name, Status = s.Status.ToString(), s.LastRuntime, s.CreatedTime, s.NextRuntime, LastRunResult = s.Triggers.First().LastResult.ToString(), TriggerExpression = s.Triggers.FirstOrDefault().ToString() }).OrderBy(s => s.Name);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 任务相关操作
|
||||
/// </summary>
|
||||
/// <param name="scheName">调度名称</param>
|
||||
/// <param name="operType">操作方式 pause run</param>
|
||||
[HttpPut("{scheName}")]
|
||||
public bool Put(string scheName, [FromQuery]string operType)
|
||||
{
|
||||
var sche = TaskServicesManager.Get(scheName);
|
||||
if (sche != null) sche.Status = operType == "pause" ? SchedulerStatus.Disabled : SchedulerStatus.Running;
|
||||
|
||||
// SQL 日志任务特殊处理
|
||||
if (scheName == "SQL日志")
|
||||
{
|
||||
if (operType == "pause") LogHelper.Pause();
|
||||
else LogHelper.Run();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
#Depending on the operating system of the host machines(s) that will build or run the containers, the image specified in the FROM statement may need to be changed.
|
||||
#For more information, please see https://aka.ms/containercompat
|
||||
|
||||
FROM microsoft/dotnet:3.0-aspnetcore-runtime-nanoserver-1903 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM microsoft/dotnet:3.0-sdk-nanoserver-1903 AS build
|
||||
WORKDIR /src
|
||||
COPY src/admin .
|
||||
|
||||
WORKDIR "/src/Bootstrap.Admin"
|
||||
FROM build AS publish
|
||||
RUN dotnet publish -c Release -o /app
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app .
|
||||
ENTRYPOINT ["dotnet", "Bootstrap.Admin.dll"]
|
|
@ -1,36 +0,0 @@
|
|||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.Security;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Bootstrap.Admin.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 侧边栏导航条 Model
|
||||
/// </summary>
|
||||
public class NavigatorBarModel : HeaderBarModel
|
||||
{
|
||||
/// <summary>
|
||||
/// 构造函数
|
||||
/// </summary>
|
||||
/// <param name="controller"></param>
|
||||
public NavigatorBarModel(ControllerBase controller) : base(controller.User.Identity.Name)
|
||||
{
|
||||
Navigations = MenuHelper.RetrieveSystemMenus(UserName, $"~{controller.HttpContext.Request.Path}");
|
||||
var authApps = AppHelper.RetrievesByUserName(controller.User.Identity.Name);
|
||||
Applications = DictHelper.RetrieveApps().Where(app => app.Key.IsNullOrEmpty() || authApps.Any(key => key.Equals(app.Key, StringComparison.OrdinalIgnoreCase)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得 网站菜单
|
||||
/// </summary>
|
||||
public IEnumerable<BootstrapMenu> Navigations { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获得 网站应用程序
|
||||
/// </summary>
|
||||
public IEnumerable<KeyValuePair<string, string>> Applications { get; private set; }
|
||||
}
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.Security;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Bootstrap.Admin.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 网站设置 Model 实体类
|
||||
/// </summary>
|
||||
public class SettingsModel : NavigatorBarModel
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="controller"></param>
|
||||
public SettingsModel(ControllerBase controller) : base(controller)
|
||||
{
|
||||
Themes = DictHelper.RetrieveThemes();
|
||||
AutoLockScreen = EnableAutoLockScreen ? "" : "lockScreen";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得 系统配置的所有样式表
|
||||
/// </summary>
|
||||
public IEnumerable<BootstrapDict> Themes { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 获得 是否开启自动锁屏
|
||||
/// </summary>
|
||||
public string AutoLockScreen { get; }
|
||||
}
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Bootstrap.Admin.Models
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class TaskModel : NavigatorBarModel
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="controller"></param>
|
||||
public TaskModel(ControllerBase controller) : base(controller)
|
||||
{
|
||||
Tasks = new string[] { "测试任务" };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得 系统配置的所有任务
|
||||
/// </summary>
|
||||
public IEnumerable<string> Tasks { get; }
|
||||
}
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
using Longbow.Web.SignalR;
|
||||
|
||||
namespace Bootstrap.Admin
|
||||
{
|
||||
/// <summary>
|
||||
/// 后台任务消息Hub
|
||||
/// </summary>
|
||||
public class TaskLogHub : SignalRHub
|
||||
{
|
||||
|
||||
}
|
||||
}
|
|
@ -1,135 +0,0 @@
|
|||
@model NavigatorBarModel
|
||||
@{
|
||||
ViewBag.Title = "程序异常";
|
||||
}
|
||||
@section css {
|
||||
<environment include="Development">
|
||||
<link href="~/lib/bootstrap-table/bootstrap-table.css" rel="stylesheet" />
|
||||
<link href="~/lib/datetimepicker/css/bootstrap-datetimepicker.css" rel="stylesheet" />
|
||||
</environment>
|
||||
<environment exclude="Development">
|
||||
<link href="~/lib/bootstrap-table/bootstrap-table.min.css" rel="stylesheet" />
|
||||
<link href="~/lib/datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet" />
|
||||
</environment>
|
||||
<link href="~/css/fa.css" rel="stylesheet" asp-append-version="true" />
|
||||
}
|
||||
@section javascript {
|
||||
<environment include="Development">
|
||||
<script src="~/lib/bootstrap-table/bootstrap-table.js"></script>
|
||||
<script src="~/lib/bootstrap-table/extensions/export/bootstrap-table-export.js"></script>
|
||||
<script src="~/lib/bootstrap-table/locale/bootstrap-table-zh-CN.js"></script>
|
||||
<script src="~/lib/tablexport/tableExport.js"></script>
|
||||
<script src="~/lib/datetimepicker/js/bootstrap-datetimepicker.js"></script>
|
||||
</environment>
|
||||
<environment exclude="Development">
|
||||
<script src="~/lib/bootstrap-table/bootstrap-table.min.js"></script>
|
||||
<script src="~/lib/bootstrap-table/extensions/export/bootstrap-table-export.min.js"></script>
|
||||
<script src="~/lib/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
|
||||
<script src="~/lib/tablexport/tableExport.min.js"></script>
|
||||
<script src="~/lib/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
|
||||
</environment>
|
||||
<script src="~/lib/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
|
||||
<script src="~/js/exceptions.js" asp-append-version="true"></script>
|
||||
}
|
||||
<div class="card">
|
||||
<div class="card-header">查询条件</div>
|
||||
<div class="card-body">
|
||||
<form class="form-inline">
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-auto">
|
||||
<label class="control-label" for="txt_operate_start">起始时间</label>
|
||||
<div class="input-group date">
|
||||
<input id="txt_operate_start" class="form-control" size="16" type="text" value="" readonly>
|
||||
<div class="input-group-append input-group-addon">
|
||||
<div class="input-group-text"><span class="fa fa-times"></span></div>
|
||||
</div>
|
||||
<div class="input-group-append input-group-addon">
|
||||
<div class="input-group-text"><span class="fa fa-calendar"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-sm-auto">
|
||||
<label class="control-label" for="txt_operate_end">终止时间</label>
|
||||
<div class="input-group date">
|
||||
<input id="txt_operate_end" class="form-control" size="16" type="text" value="" readonly>
|
||||
<div class="input-group-append input-group-addon">
|
||||
<div class="input-group-text"><span class="fa fa-times"></span></div>
|
||||
</div>
|
||||
<div class="input-group-append input-group-addon">
|
||||
<div class="input-group-text"><span class="fa fa-calendar"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-sm-auto flex-sm-fill justify-content-sm-end align-self-sm-end">
|
||||
<label class="sr-only"></label>
|
||||
<button type="button" id="btn_query" class="btn btn-primary btn-fill"><i class="fa fa-search" aria-hidden="true"></i><span>查询</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div id="toolbar" class="d-none">
|
||||
<div class="toolbar btn-group">
|
||||
<button id="btn_view" type="button" class="btn btn-danger" asp-auth="log">
|
||||
<i class="fa fa-file-text-o" aria-hidden="true"></i><span>服务器日志</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="gear btn-group dropdown">
|
||||
<button class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" type="button"><i class="fa fa-gear"></i></button>
|
||||
<div class="dropdown-menu">
|
||||
<a id="tb_view" href="#" title="查看明细" asp-auth="log"><i class="fa fa-file-text-o"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
查询结果
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table></table>
|
||||
</div>
|
||||
</div>
|
||||
@section modal {
|
||||
<div class="modal fade" id="dialogNew" tabindex="-1" role="dialog" data-backdrop="static" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div id="errorList" class="modal-dialog modal-dialog-centered modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="myModalLabel">程序异常日志窗口</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="form-inline" id="dataForm" name="dataForm"><div class="form-row"></div></form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
||||
<i class="fa fa-times"></i>
|
||||
<span>关闭</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="errorDetail" class="modal-content icon-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="myDetailModalLabel">程序异常日志窗口</h5>
|
||||
<button type="button" class="close" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="iconview">
|
||||
<i id="fa-top" class="fa-target"></i>
|
||||
<div class="affix">
|
||||
<div><a href="#fa-top" class="fa fa-arrow-circle-up"></a></div>
|
||||
<div><a href="#fa-bottom" class="fa fa-arrow-circle-down"></a></div>
|
||||
</div>
|
||||
<div id="dataFormDetail" class="ex-content"><div class="text-center"><i class="fa fa-spinner fa-pulse fa-3x fa-fw"></i></div></div>
|
||||
<i id="fa-bottom" class="fa-target"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary">
|
||||
<i class="fa fa-times"></i>
|
||||
<span>关闭</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
|
@ -1,156 +0,0 @@
|
|||
@model SettingsModel
|
||||
@{
|
||||
ViewBag.Title = "网站设置";
|
||||
}
|
||||
@section css {
|
||||
<environment include="Development">
|
||||
<link href="~/lib/bootstrap-toggle/css/bootstrap-toggle.css" rel="stylesheet" />
|
||||
</environment>
|
||||
<environment exclude="Development">
|
||||
<link href="~/lib/bootstrap-toggle/css/bootstrap-toggle.min.css" rel="stylesheet" />
|
||||
</environment>
|
||||
}
|
||||
@section javascript {
|
||||
<environment include="Development">
|
||||
<script src="~/lib/validate/jquery.validate.js"></script>
|
||||
<script src="~/lib/validate/localization/messages_zh.js"></script>
|
||||
<script src="~/lib/bootstrap-toggle/js/bootstrap-toggle.js"></script>
|
||||
</environment>
|
||||
<environment exclude="Development">
|
||||
<script src="~/lib/validate/jquery.validate.min.js"></script>
|
||||
<script src="~/lib/validate/localization/messages_zh.min.js"></script>
|
||||
<script src="~/lib/bootstrap-toggle/js/bootstrap-toggle.min.js"></script>
|
||||
</environment>
|
||||
<script src="~/lib/longbow/longbow.dataentity.js"></script>
|
||||
<script src="~/lib/longbow/longbow.validate.js"></script>
|
||||
<script src="~/js/settings.js" asp-append-version="true"></script>
|
||||
}
|
||||
<div class="card" asp-auth="saveTitle">
|
||||
<div class="card-header">系统名称设置</div>
|
||||
<div class="card-body" data-toggle="LgbValidate" data-valid-button="#sysSave">
|
||||
<div class="alert alert-danger" role="alert" asp-condition="@Model.IsDemo">
|
||||
<span>演示系统禁止更改系统名称</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" id="sysName" placeholder="请输入网站标题,50字以内" value="@Model.Title" maxlength="50" data-valid="true" />
|
||||
<div class="input-group-append" asp-condition="!@Model.IsDemo">
|
||||
<button class="btn btn-secondary" type="button" data-method="title">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card" asp-auth="saveFooter">
|
||||
<div class="card-header">页脚设置</div>
|
||||
<div class="card-body" data-toggle="LgbValidate" data-valid-button="#footSave">
|
||||
<div class="alert alert-danger" role="alert" asp-condition="@Model.IsDemo">
|
||||
<span>演示系统禁止更改页脚</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" id="sysFoot" placeholder="请输入网站页脚,50字以内" value="@Model.Footer" maxlength="50" data-valid="true" />
|
||||
<div class="input-group-append" asp-condition="!@Model.IsDemo">
|
||||
<button class="btn btn-secondary" type="button" data-method="footer">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card" asp-auth="saveTheme">
|
||||
<div class="card-header">网站样式</div>
|
||||
<div class="card-body">
|
||||
<div class="alert alert-info" role="alert">
|
||||
<span>注意:<b><a class="badge-pill" href="./Profiles">个人中心</a></b>中设置的网站样式覆盖本设置</span>
|
||||
</div>
|
||||
<div class="form-group text-right">
|
||||
<div class="btn-group" role="group">
|
||||
<div class="btn-group" role="group">
|
||||
<button id="dictCssDefine" class="btn btn-success dropdown-select dropdown-toggle" data-toggle="dropdown" data-default-val="" value="@Model.Theme">默认样式</button>
|
||||
<div class="dropdown-menu">
|
||||
<a href="#" data-val="">默认样式</a>
|
||||
@foreach (var css in Model.Themes)
|
||||
{
|
||||
<a href="#" data-val="@css.Code">@css.Name</a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn btn-secondary" type="button" data-method="css">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card" asp-auth="saveUISettings">
|
||||
<div class="card-header">网站调整</div>
|
||||
<div class="card-body">
|
||||
<div class="form-inline">
|
||||
<div class="row">
|
||||
<div class="form-group col-6">
|
||||
<label class="control-label" for="sider">侧边栏设置</label>
|
||||
<input id="sider" hidden type="checkbox" data-default-val="@Model.ShowSideBar" data-toggle="toggle" data-width="120" data-onstyle="success" data-on="展开" data-off="收缩" />
|
||||
</div>
|
||||
<div class="form-group col-6">
|
||||
<label class="control-label" for="cardTitle">标题设置</label>
|
||||
<input id="cardTitle" hidden type="checkbox" data-default-val="@Model.ShowCardTitle" data-toggle="toggle" data-width="120" data-onstyle="success" data-on="显示" data-off="关闭" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer text-right">
|
||||
<button data-method="UISettings" class="btn btn-secondary" type="button"><i class="fa fa-save"></i><span>保存</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card" asp-auth="loginSettings">
|
||||
<div class="card-header">登录设置</div>
|
||||
<div class="card-body">
|
||||
<div class="alert alert-danger" role="alert" asp-condition="@Model.IsDemo">
|
||||
<span>演示系统禁止更改登录设置</span>
|
||||
</div>
|
||||
<div class="form-inline">
|
||||
<div class="row">
|
||||
<div class="form-group col-6">
|
||||
<label class="control-label" for="mobile">手机登录</label>
|
||||
<input id="mobile" hidden type="checkbox" data-default-val="@Model.ShowMobile" data-toggle="toggle" data-width="120" data-onstyle="success" data-on="允许" data-off="关闭" />
|
||||
</div>
|
||||
<div class="form-group col-6">
|
||||
<label class="control-label" for="cardTitle">OAuth 认证</label>
|
||||
<input id="oauth" hidden type="checkbox" data-default-val="@Model.ShowOAuth" data-toggle="toggle" data-width="120" data-onstyle="success" data-on="允许" data-off="关闭" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer text-right" asp-condition="!@Model.IsDemo">
|
||||
<button data-method="loginSettings" class="btn btn-secondary" type="button"><i class="fa fa-save"></i><span>保存</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card" asp-auth="lockScreen">
|
||||
<div class="card-header">自动锁屏设置</div>
|
||||
<div class="card-body">
|
||||
<div class="form-inline">
|
||||
<div class="row">
|
||||
<div class="form-group col-6">
|
||||
<label class="control-label" for="lockScreen">自动锁屏</label>
|
||||
<input id="lockScreen" hidden type="checkbox" data-default-val="@Model.AutoLockScreen" data-toggle="toggle" data-width="120" data-onstyle="success" data-on="开启" data-off="关闭" />
|
||||
</div>
|
||||
<div class="form-group col-6">
|
||||
<label class="control-label" for="lockPeriod">时长间隔(秒)</label>
|
||||
<input id="lockPeriod" type="number" class="form-control" min="30" value="@Model.LockScreenPeriod" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer text-right">
|
||||
<button data-method="saveAutoLock" class="btn btn-secondary" type="button"><i class="fa fa-save"></i><span>保存</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="d-flex align-items-center">
|
||||
<span class="flex-fill">网站缓存</span>
|
||||
<a data-method="clear" href="#" class="fa fa-times-circle-o" title="全部清除" data-toggle="tooltip" data-placement="left" asp-auth="clearAllCache"></a>
|
||||
<a data-method="refresh" href="#" class="fa fa-refresh ml-3" title="点击刷新" data-toggle="tooltip"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body" id="sortable">
|
||||
</div>
|
||||
</div>
|
|
@ -1,152 +0,0 @@
|
|||
@model TaskModel
|
||||
@{
|
||||
ViewBag.Title = "任务管理";
|
||||
Layout = "_Admin";
|
||||
}
|
||||
@section css {
|
||||
<environment include="Development">
|
||||
<link href="~/lib/bootstrap-table/bootstrap-table.css" rel="stylesheet" />
|
||||
</environment>
|
||||
<environment exclude="Development">
|
||||
<link href="~/lib/bootstrap-table/bootstrap-table.min.css" rel="stylesheet" />
|
||||
</environment>
|
||||
<link href="~/lib/longbow-select/longbow-select.css" rel="stylesheet" />
|
||||
<link href="~/css/tasks.css" rel="stylesheet" asp-append-version="true" />
|
||||
}
|
||||
@section javascript {
|
||||
<environment include="Development">
|
||||
<script src="~/lib/bootstrap-table/bootstrap-table.js"></script>
|
||||
<script src="~/lib/bootstrap-table/extensions/export/bootstrap-table-export.js"></script>
|
||||
<script src="~/lib/bootstrap-table/locale/bootstrap-table-zh-CN.js"></script>
|
||||
<script src="~/lib/tablexport/tableExport.js"></script>
|
||||
<script src="~/lib/validate/jquery.validate.js"></script>
|
||||
<script src="~/lib/validate/localization/messages_zh.js"></script>
|
||||
</environment>
|
||||
<environment exclude="Development">
|
||||
<script src="~/lib/bootstrap-table/bootstrap-table.min.js"></script>
|
||||
<script src="~/lib/bootstrap-table/extensions/export/bootstrap-table-export.min.js"></script>
|
||||
<script src="~/lib/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
|
||||
<script src="~/lib/tablexport/tableExport.min.js"></script>
|
||||
<script src="~/lib/validate/jquery.validate.min.js"></script>
|
||||
<script src="~/lib/validate/localization/messages_zh.min.js"></script>
|
||||
</environment>
|
||||
<script src="~/lib/longbow-checkbox/longbow-checkbox.js"></script>
|
||||
<script src="~/lib/longbow-select/longbow-select.js"></script>
|
||||
<script src="~/lib/longbow/longbow.dataentity.js" asp-append-version="true"></script>
|
||||
<script src="~/lib/longbow/longbow.validate.js" asp-append-version="true"></script>
|
||||
<script src="~/js/tasks.js" asp-append-version="true"></script>
|
||||
}
|
||||
@section modal {
|
||||
<div class="modal fade" id="dialogNew" tabindex="-1" role="dialog" data-backdrop="static" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered modal-lg" role="document">
|
||||
<div class="modal-content" data-toggle="LgbValidate" data-valid-button="#btnSubmit" data-valid-modal="#dialogNew">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="myModalLabel">任务编辑窗口</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="form-inline">
|
||||
<div class="row">
|
||||
<input type="hidden" id="taskID" />
|
||||
<div class="form-group col-12">
|
||||
<label class="control-label" for="taskName">任务名称</label>
|
||||
<input type="text" class="form-control flex-sm-fill" id="taskName" placeholder="不可为空,50字以内" maxlength="50" data-valid="true" />
|
||||
</div>
|
||||
<div class="form-group col-12">
|
||||
<label class="control-label" for="taskCron">Cron表达式</label>
|
||||
<input type="text" class="form-control flex-sm-fill" id="taskCron" placeholder="不可为空,2000字以内" maxlength="2000" data-valid="true" />
|
||||
</div>
|
||||
<div class="form-group col-12">
|
||||
<label class="control-label" for="taskContent">内置任务</label>
|
||||
<select id="taskList" data-toggle="lgbSelect">
|
||||
@foreach (var name in Model.Tasks)
|
||||
{
|
||||
<option value="@name">@name</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
||||
<i class="fa fa-times"></i>
|
||||
<span>关闭</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary" id="btnSubmit">
|
||||
<i class="fa fa-save"></i>
|
||||
<span>保存</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="dialogLog" tabindex="-1" role="dialog" data-backdrop="static" aria-labelledby="taskModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="taskModalLabel">任务日志窗口</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="modal-body" style="background-color: #174482; color: #fff;">
|
||||
<div id="taskMsg" class="form-group" style="height: 500px; overflow: auto;">
|
||||
<div></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a class="btn"><i class="fa fa-check-square-o" style="width: 13px;"></i><span>自动滚屏</span></a>
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
||||
<i class="fa fa-times"></i>
|
||||
<span>关闭</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<div class="card">
|
||||
<div class="card-header">任务介绍</div>
|
||||
<div class="card-body">
|
||||
<div class="alert alert-info">
|
||||
<p class="font-weight-bold">后台任务说明:</p>
|
||||
<p>1. 默认任务 (立即执行,仅执行一次)</p>
|
||||
<p>
|
||||
<code>
|
||||
TaskServicesManager.GetOrAdd("简单任务", token => Task.Delay(1000));
|
||||
</code>
|
||||
</p>
|
||||
<p>2. 周期性任务 (1 分钟后间隔 5 秒执行 2 次任务)</p>
|
||||
<p>
|
||||
<code>
|
||||
var trigger = TriggerBuilder.Default.WithInterval(TimeSpan.FromSeconds(5)).WithRepeatCount(2).WithStartTime(DateTimeOffset.Now.AddMinutes(1)).Build();
|
||||
<br />
|
||||
TaskServicesManager.GetOrAdd("测试任务", token => Task.Delay(1000), trigger);
|
||||
</code>
|
||||
</p>
|
||||
<p>3. Cron 表达式任务 (间隔 5 秒循环执行任务)</p>
|
||||
<div>
|
||||
<code>
|
||||
TaskServicesManager.GetOrAdd("Cron 表达式任务", token => Task.Delay(1000), TriggerBuilder.Build("*/5 * * * * *"));
|
||||
</code>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
查询结果
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="alert alert-danger" role="alert" asp-condition="@Model.IsDemo">
|
||||
<span>演示系统禁止修改定时后台任务</span>
|
||||
</div>
|
||||
<table></table>
|
||||
</div>
|
||||
</div>
|
||||
<div id="tableButtons" class="d-none">
|
||||
<div class='btn-group'>
|
||||
<button class='pause btn btn-sm btn-danger' asp-auth="pause"><i class='fa fa-pause-circle'></i><span>暂停</span></button>
|
||||
<button class='run btn btn-sm btn-success' asp-auth="pause"><i class='fa fa-play-circle'></i><span>运行</span></button>
|
||||
<button class='info btn btn-sm btn-info' asp-auth="info"><i class='fa fa-info-circle'></i><span>日志</span></button>
|
||||
</div>
|
||||
</div>
|
|
@ -1,145 +0,0 @@
|
|||
$(function () {
|
||||
var dataBinder = new DataEntity({
|
||||
Title: "#sysName",
|
||||
Footer: "#sysFoot"
|
||||
});
|
||||
|
||||
$('button[data-method]').on('click', function (e) {
|
||||
var $this = $(this);
|
||||
var data = {};
|
||||
switch ($this.attr('data-method')) {
|
||||
case 'footer':
|
||||
data = dataBinder.get();
|
||||
$.bc({
|
||||
url: Settings.url, data: { name: '网站页脚', code: data.Footer, category: '网站设置' }, title: '保存网站页脚', method: "post",
|
||||
callback: function (result) {
|
||||
if (result) $('#websiteFooter').text(data.Footer);
|
||||
}
|
||||
});
|
||||
break;
|
||||
case 'title':
|
||||
data = dataBinder.get();
|
||||
$.bc({
|
||||
url: Settings.url, data: { name: '网站标题', code: data.Title, category: '网站设置' }, title: '保存网站标题', method: "post",
|
||||
callback: function (result) {
|
||||
if (result) $('#websiteTitle').text(data.Title);
|
||||
}
|
||||
});
|
||||
break;
|
||||
case 'css':
|
||||
var cssDefine = $css.val();
|
||||
$.bc({
|
||||
url: Settings.url, data: { name: '使用样式', code: cssDefine, category: '当前样式' }, title: '保存网站样式', method: "post",
|
||||
callback: function (result) {
|
||||
if (result) {
|
||||
window.setTimeout(function () { window.location.reload(true); }, 1000);
|
||||
}
|
||||
}
|
||||
});
|
||||
break;
|
||||
case 'UISettings':
|
||||
var uiSettings = $('#sider').prop('checked') ? "1" : "0";
|
||||
$.bc({
|
||||
url: Settings.url, data: { name: '侧边栏状态', code: uiSettings, category: '网站设置' }, method: "post"
|
||||
});
|
||||
var cardTitle = $('#cardTitle').prop('checked') ? "1" : "0";
|
||||
$.bc({
|
||||
url: Settings.url, data: { name: '卡片标题状态', code: cardTitle, category: '网站设置' }, title: '保存网站设置', method: "post",
|
||||
callback: function (result) {
|
||||
if (result) {
|
||||
window.setTimeout(function () { window.location.reload(true); }, 1000);
|
||||
}
|
||||
}
|
||||
});
|
||||
break;
|
||||
case 'loginSettings':
|
||||
var mobile = $('#mobile').prop('checked') ? "1" : "0";
|
||||
$.bc({
|
||||
url: Settings.url, data: { name: '短信验证码登录', code: mobile, category: '网站设置' }, method: "post"
|
||||
});
|
||||
var oauth = $('#oauth').prop('checked') ? "1" : "0";
|
||||
$.bc({
|
||||
url: Settings.url, data: { name: 'OAuth 认证登录', code: oauth, category: '网站设置' }, title: '登录设置', method: "post"
|
||||
});
|
||||
break;
|
||||
case 'saveAutoLock':
|
||||
var autoLock = $('#lockScreen').prop('checked') ? "1" : "0";
|
||||
$.bc({
|
||||
url: Settings.url, data: { name: '自动锁屏', code: autoLock, category: '网站设置' }, method: "post"
|
||||
});
|
||||
$.bc({
|
||||
url: Settings.url, data: { name: '自动锁屏时长', code: $('#lockPeriod').val(), category: '网站设置' }, title: '保存自动锁屏设置', method: "post",
|
||||
callback: function (result) {
|
||||
if (result) {
|
||||
window.setTimeout(function () { window.location.reload(true); }, 1000);
|
||||
}
|
||||
}
|
||||
});
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
var $sortable = $('#sortable');
|
||||
var $refresh = $('a[data-method="refresh"]');
|
||||
var listCacheUrl = function (options) {
|
||||
$refresh.addClass('fa-spin');
|
||||
options = $.extend({ clear: false }, options);
|
||||
$sortable.html('');
|
||||
$.bc({
|
||||
url: Settings.url,
|
||||
autoFooter: true,
|
||||
callback: function (urls) {
|
||||
if (urls && $.isArray(urls)) {
|
||||
$.each(urls, function (index, item) {
|
||||
if (options.clear) options.url = item.Url + "?cacheKey=*";
|
||||
else options.url = item.Url;
|
||||
$.bc({
|
||||
url: options.url,
|
||||
cors: !item.Self,
|
||||
autoFooter: true,
|
||||
callback: function (result) {
|
||||
if ($.isArray(result)) {
|
||||
var html = '<div class="cache-item"><i class="fa fa-ellipsis-v"></i><span data-toggle="tooltip" title="{2}">{2}</span><span class="badge badge-pill badge-success">{0}</span><span title="{3}">{3}</span><div><span>{6}</span><button class="btn btn-danger" title="{1}" data-url="{4}?cacheKey={1}" data-toggle="tooltip" data-self="{5}" data-placement="left"><i class="fa fa-trash-o"></i></button></div></div>';
|
||||
var content = result.sort(function (x, y) {
|
||||
return x.Key > y.Key ? 1 : -1;
|
||||
}).map(function (ele) {
|
||||
return $.format(html, ele.Interval / 1000, ele.Key, ele.Desc, ele.Value, $.format(item.Url, ele.Key), item.Self, ele.ElapsedSeconds);
|
||||
}).join('');
|
||||
|
||||
var cache = $('<div class="card-cache"></div>');
|
||||
cache.append($.format('<h6>{0}</h6>', item.Desc));
|
||||
cache.append(content);
|
||||
$sortable.append(cache);
|
||||
$sortable.find('[data-toggle="tooltip"]').tooltip();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
$refresh.removeClass('fa-spin');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$('a[data-method]').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
var $this = $(this).tooltip('hide');
|
||||
var options = {};
|
||||
switch ($this.attr('data-method')) {
|
||||
case 'clear':
|
||||
options.clear = true;
|
||||
break;
|
||||
case 'refresh':
|
||||
break;
|
||||
}
|
||||
listCacheUrl(options);
|
||||
}).last().trigger('click');
|
||||
$sortable.on('click', '.btn', function () {
|
||||
var $this = $(this).tooltip('dispose');
|
||||
$.bc({ url: $this.attr('data-url'), cors: $this.attr('data-self') === 'false' });
|
||||
listCacheUrl();
|
||||
});
|
||||
|
||||
var $css = $('#dictCssDefine').dropdown('val');
|
||||
});
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,16 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Bootstrap.Security" Version="3.0.1" />
|
||||
<PackageReference Include="MongoDB.Driver" Version="2.9.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Bootstrap.DataAccess\Bootstrap.DataAccess.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -1,26 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Bootstrap.Security.DataAccess" Version="3.0.1" />
|
||||
<PackageReference Include="Bootstrap.Security.Mvc" Version="3.0.2" />
|
||||
<PackageReference Include="Longbow" Version="3.0.1" />
|
||||
<PackageReference Include="Longbow.Cache" Version="3.0.3-beta1" />
|
||||
<PackageReference Include="Longbow.Data" Version="3.0.1" />
|
||||
<PackageReference Include="Longbow.GiteeAuth" Version="3.0.1" />
|
||||
<PackageReference Include="Longbow.GitHubAuth" Version="3.0.1" />
|
||||
<PackageReference Include="Longbow.OAuth" Version="3.0.2" />
|
||||
<PackageReference Include="Longbow.PetaPoco" Version="1.0.2" />
|
||||
<PackageReference Include="Longbow.Security.Cryptography" Version="1.3.0" />
|
||||
<PackageReference Include="Longbow.Tasks" Version="3.0.2-beta2" />
|
||||
<PackageReference Include="Longbow.Web" Version="3.0.1" />
|
||||
<PackageReference Include="Longbow.WeChatAuth" Version="3.0.1" />
|
||||
<PackageReference Include="Microsoft.Data.Sqlite" Version="3.0.0" />
|
||||
<PackageReference Include="System.Data.SqlClient" Version="4.7.0" />
|
||||
<PackageReference Include="PetaPoco.Extensions" Version="3.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -1,266 +0,0 @@
|
|||
using Bootstrap.Security;
|
||||
using Bootstrap.Security.DataAccess;
|
||||
using Longbow.Cache;
|
||||
using Longbow.Web;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Bootstrap.DataAccess
|
||||
{
|
||||
/// <summary>
|
||||
/// 字典配置数据操作帮助类
|
||||
/// </summary>
|
||||
public static class DictHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// 缓存索引,BootstrapAdmin后台清理缓存时使用
|
||||
/// </summary>
|
||||
public const string RetrieveDictsDataKey = DbHelper.RetrieveDictsDataKey;
|
||||
|
||||
/// <summary>
|
||||
/// 缓存索引,字典分类数据缓存键值 值为 DictHelper-RetrieveDictsCategory
|
||||
/// </summary>
|
||||
public const string RetrieveCategoryDataKey = "DictHelper-RetrieveDictsCategory";
|
||||
|
||||
/// <summary>
|
||||
/// 获得所有字典项配置数据集合方法 内部使用了缓存,缓存值 BootstrapMenu-RetrieveMenus
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static IEnumerable<BootstrapDict> RetrieveDicts() => CacheManager.GetOrAdd(RetrieveDictsDataKey, key => DbContextManager.Create<Dict>()?.RetrieveDicts()) ?? new BootstrapDict[0];
|
||||
|
||||
private static IEnumerable<BootstrapDict> RetrieveProtectedDicts() => RetrieveDicts().Where(d => d.Define == 0 || d.Category == "测试平台");
|
||||
|
||||
/// <summary>
|
||||
/// 获取网站 favicon 图标
|
||||
/// </summary>
|
||||
/// <param name="appId"></param>
|
||||
/// <returns></returns>
|
||||
public static string RetrieveWebIcon(string appId)
|
||||
{
|
||||
// 获取应用程序 logo
|
||||
var ditcs = RetrieveDicts();
|
||||
var platName = ditcs.FirstOrDefault(d => d.Category == "应用程序" && d.Code == appId)?.Name;
|
||||
return ditcs.FirstOrDefault(d => d.Category == platName && d.Name == "favicon")?.Code ?? $"~/favicon.ico";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取网站 logo 小图标
|
||||
/// </summary>
|
||||
/// <param name="appId"></param>
|
||||
/// <returns></returns>
|
||||
public static string RetrieveWebLogo(string appId)
|
||||
{
|
||||
// 获取应用程序 logo
|
||||
var ditcs = RetrieveDicts();
|
||||
var platName = ditcs.FirstOrDefault(d => d.Category == "应用程序" && d.Code == appId)?.Name;
|
||||
return ditcs.FirstOrDefault(d => d.Category == platName && d.Name == "网站图标")?.Code ?? $"~/favicon.png";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除字典中的数据
|
||||
/// </summary>
|
||||
/// <param name="value">需要删除的IDs</param>
|
||||
/// <returns></returns>
|
||||
public static bool Delete(IEnumerable<string> value)
|
||||
{
|
||||
if (!value.Any()) return true;
|
||||
|
||||
// 禁止删除系统数据与测试平台数据
|
||||
if (RetrieveSystemModel() && RetrieveProtectedDicts().Any(d => value.Any(v => v == d.Id))) return true;
|
||||
var ret = DbContextManager.Create<Dict>()?.Delete(value) ?? false;
|
||||
if (ret) CacheCleanUtility.ClearCache(dictIds: value);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存新建/更新的字典信息
|
||||
/// </summary>
|
||||
/// <param name="p"></param>
|
||||
/// <returns></returns>
|
||||
public static bool Save(BootstrapDict p)
|
||||
{
|
||||
if (RetrieveSystemModel() && !string.IsNullOrEmpty(p.Id) && RetrieveProtectedDicts().Any(m => m.Id == p.Id)) return true;
|
||||
|
||||
var ret = DbContextManager.Create<Dict>()?.Save(p) ?? false;
|
||||
if (ret) CacheCleanUtility.ClearCache(dictIds: new List<string>());
|
||||
return ret;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 配置 IP 地理位置查询配置项 注入方法调用此方法
|
||||
/// </summary>
|
||||
/// <param name="op"></param>
|
||||
public static void ConfigIPLocator(IPLocatorOption op)
|
||||
{
|
||||
var name = RetrieveLocaleIPSvr();
|
||||
if (!string.IsNullOrEmpty(name) && !name.Equals("None", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
var url = RetrieveLocaleIPSvrUrl(name);
|
||||
op.Locator = DefaultIPLocatorProvider.CreateLocator(name);
|
||||
op.Url = string.IsNullOrEmpty(url) ? string.Empty : $"{url}{op.IP}";
|
||||
op.Period = RetrieveLocaleIPSvrCachePeriod() * 60 * 1000;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存网站个性化设置
|
||||
/// </summary>
|
||||
/// <param name="dict"></param>
|
||||
/// <returns></returns>
|
||||
public static bool SaveSettings(BootstrapDict dict)
|
||||
{
|
||||
var ret = DbContextManager.Create<Dict>()?.SaveSettings(dict) ?? false;
|
||||
if (ret) CacheCleanUtility.ClearCache(dictIds: new List<string>());
|
||||
return ret;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取字典分类名称
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static IEnumerable<string> RetrieveCategories() => CacheManager.GetOrAdd(RetrieveCategoryDataKey, key => DbContextManager.Create<Dict>()?.RetrieveCategories()) ?? new string[0];
|
||||
|
||||
/// <summary>
|
||||
/// 获取站点 Title 配置信息
|
||||
/// </summary>
|
||||
/// <param name="appId"></param>
|
||||
/// <returns></returns>
|
||||
public static string RetrieveWebTitle(string appId) => DbContextManager.Create<Dict>()?.RetrieveWebTitle(appId) ?? string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取站点 Footer 配置信息
|
||||
/// </summary>
|
||||
/// <param name="appId"></param>
|
||||
/// <returns></returns>
|
||||
public static string RetrieveWebFooter(string appId) => DbContextManager.Create<Dict>()?.RetrieveWebFooter(appId) ?? string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获得系统中配置的可以使用的网站样式
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static IEnumerable<BootstrapDict> RetrieveThemes() => DbContextManager.Create<Dict>()?.RetrieveThemes() ?? new BootstrapDict[0];
|
||||
|
||||
/// <summary>
|
||||
/// 获得网站设置中的当前样式
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static string RetrieveActiveTheme() => DbContextManager.Create<Dict>()?.RetrieveActiveTheme() ?? string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取头像路径
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static string RetrieveIconFolderPath() => DbContextManager.Create<Dict>()?.RetrieveIconFolderPath() ?? "~/images/uploader/";
|
||||
|
||||
/// <summary>
|
||||
/// 获得默认的前台首页地址,默认为 ~/Home/Index
|
||||
/// </summary>
|
||||
/// <param name="appId">应用程序编码</param>
|
||||
/// <returns></returns>
|
||||
public static string RetrieveHomeUrl(string appId) => DbContextManager.Create<Dict>()?.RetrieveHomeUrl(appId) ?? "~/Home/Index";
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有应用程序数据方法
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static IEnumerable<KeyValuePair<string, string>> RetrieveApps() => DbContextManager.Create<Dict>()?.RetrieveApps() ?? new KeyValuePair<string, string>[0];
|
||||
|
||||
/// <summary>
|
||||
/// 程序异常时长 默认 1 个月
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int RetrieveExceptionsLogPeriod() => DbContextManager.Create<Dict>()?.RetrieveExceptionsLogPeriod() ?? 1;
|
||||
|
||||
/// <summary>
|
||||
/// 获得操作日志保留时长 默认 12 个月
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int RetrieveLogsPeriod() => DbContextManager.Create<Dict>()?.RetrieveLogsPeriod() ?? 12;
|
||||
|
||||
/// <summary>
|
||||
/// 获得登录日志保留时长 默认 12 个月
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int RetrieveLoginLogsPeriod() => DbContextManager.Create<Dict>()?.RetrieveLoginLogsPeriod() ?? 12;
|
||||
|
||||
/// <summary>
|
||||
/// 获取登录认证Cookie保留时长 默认 7 天
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int RetrieveCookieExpiresPeriod() => DbContextManager.Create<Dict>()?.RetrieveCookieExpiresPeriod() ?? 7;
|
||||
|
||||
/// <summary>
|
||||
/// 获取 IP 地址位置查询服务名称
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static string RetrieveLocaleIPSvr() => DbContextManager.Create<Dict>()?.RetrieveLocaleIPSvr() ?? string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 通过 IP 地理位置查询服务名称获得请求地址方法
|
||||
/// </summary>
|
||||
/// <param name="ipSvr">ip地址请求服务名称</param>
|
||||
/// <returns></returns>
|
||||
public static string RetrieveLocaleIPSvrUrl(string ipSvr) => DbContextManager.Create<Dict>()?.RetrieveLocaleIPSvrUrl(ipSvr) ?? string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取 IP 地理位置查询服务缓存时长
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int RetrieveLocaleIPSvrCachePeriod() => DbContextManager.Create<Dict>()?.RetrieveLocaleIPSvrCachePeriod() ?? 10;
|
||||
|
||||
/// <summary>
|
||||
/// 访问日志保留时长 默认 1 个月
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int RetrieveAccessLogPeriod() => DbContextManager.Create<Dict>()?.RetrieveAccessLogPeriod() ?? 1;
|
||||
|
||||
/// <summary>
|
||||
/// 获得 是否为演示系统 默认为 false 不是演示系统
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static bool RetrieveSystemModel() => DbContextManager.Create<Dict>()?.RetrieveSystemModel() ?? true;
|
||||
|
||||
/// <summary>
|
||||
/// 获得验证码图床地址
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static string RetrieveImagesLibUrl() => DbContextManager.Create<Dict>()?.RetrieveImagesLibUrl() ?? string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据区卡片标题是否显示
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static bool RetrieveCardTitleStatus() => DbContextManager.Create<Dict>()?.RetrieveCardTitleStatus() ?? true;
|
||||
|
||||
/// <summary>
|
||||
/// 获得侧边栏状态 为真时显示
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static bool RetrieveSidebarStatus() => DbContextManager.Create<Dict>()?.RetrieveSidebarStatus() ?? true;
|
||||
|
||||
/// <summary>
|
||||
/// 获得是否允许短信验证码登录
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static bool RetrieveMobileLogin() => DbContextManager.Create<Dict>()?.RetrieveMobileLogin() ?? false;
|
||||
|
||||
/// <summary>
|
||||
/// 获得是否允许 OAuth 认证登录
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static bool RetrieveOAuthLogin() => DbContextManager.Create<Dict>()?.RetrieveOAuthLogin() ?? false;
|
||||
|
||||
/// <summary>
|
||||
/// 获得自动锁屏时长 默认 30 秒
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int RetrieveAutoLockScreenPeriod() => DbContextManager.Create<Dict>()?.RetrieveAutoLockScreenPeriod() ?? 30;
|
||||
|
||||
/// <summary>
|
||||
/// 获得自动锁屏 默认关闭
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static bool RetrieveAutoLockScreen() => DbContextManager.Create<Dict>()?.RetrieveAutoLockScreen() ?? false;
|
||||
}
|
||||
}
|
|
@ -1,107 +0,0 @@
|
|||
using Longbow.Tasks;
|
||||
using Longbow.Web.Mvc;
|
||||
using PetaPoco;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
|
||||
namespace Bootstrap.DataAccess
|
||||
{
|
||||
/// <summary>
|
||||
/// 操作日志相关操作类
|
||||
/// </summary>
|
||||
public static class LogHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询所有日志信息
|
||||
/// </summary>
|
||||
/// <param name="op"></param>
|
||||
/// <param name="startTime"></param>
|
||||
/// <param name="endTime"></param>
|
||||
/// <param name="opType"></param>
|
||||
/// <returns></returns>
|
||||
public static Page<Log> RetrievePages(PaginationOption op, DateTime? startTime, DateTime? endTime, string? opType) => DbContextManager.Create<Log>()?.RetrievePages(op, startTime, endTime, opType) ?? new Page<Log>() { Items = new List<Log>() };
|
||||
|
||||
/// <summary>
|
||||
/// 查询所有日志信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static IEnumerable<Log> RetrieveAll(DateTime? startTime, DateTime? endTime, string? opType) => DbContextManager.Create<Log>()?.RetrieveAll(startTime, endTime, opType) ?? new Log[0];
|
||||
|
||||
/// <summary>
|
||||
/// 保存新增的日志信息
|
||||
/// </summary>
|
||||
/// <param name="log"></param>
|
||||
/// <returns></returns>
|
||||
public static bool Save(Log log)
|
||||
{
|
||||
log.LogTime = DateTime.Now;
|
||||
return DbContextManager.Create<Log>()?.Save(log) ?? false;
|
||||
}
|
||||
|
||||
#region 数据库脚本执行日志相关代码
|
||||
private static readonly BlockingCollection<DBLog> _messageQueue = new BlockingCollection<DBLog>(new ConcurrentQueue<DBLog>());
|
||||
/// <summary>
|
||||
/// 添加数据库日志实体类到内部集合中
|
||||
/// </summary>
|
||||
/// <param name="log"></param>
|
||||
public static System.Threading.Tasks.Task AddDBLog(DBLog log) => System.Threading.Tasks.Task.Run(() =>
|
||||
{
|
||||
if (!_messageQueue.IsAddingCompleted && !_pause)
|
||||
{
|
||||
_messageQueue.Add(log);
|
||||
}
|
||||
});
|
||||
|
||||
private static bool _pause;
|
||||
/// <summary>
|
||||
/// 暂停接收脚本执行日志
|
||||
/// </summary>
|
||||
public static void Pause() => _pause = true;
|
||||
|
||||
/// <summary>
|
||||
/// 开始接收脚本执行日志
|
||||
/// </summary>
|
||||
public static void Run() => _pause = false;
|
||||
|
||||
/// <summary>
|
||||
/// 查询所有SQL日志信息
|
||||
/// </summary>
|
||||
/// <param name="op"></param>
|
||||
/// <param name="startTime"></param>
|
||||
/// <param name="endTime"></param>
|
||||
/// <param name="userName"></param>
|
||||
/// <returns></returns>
|
||||
public static Page<DBLog> RetrieveDBLogs(PaginationOption op, DateTime? startTime, DateTime? endTime, string? userName) => DbContextManager.Create<DBLog>()?.RetrievePages(op, startTime, endTime, userName) ?? new Page<DBLog>() { Items = new List<DBLog>() };
|
||||
|
||||
/// <summary>
|
||||
/// 数据库脚本执行日志任务实体类
|
||||
/// </summary>
|
||||
public class DbLogTask : ITask
|
||||
{
|
||||
/// <summary>
|
||||
/// 任务执行方法
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public System.Threading.Tasks.Task Execute(CancellationToken cancellationToken)
|
||||
{
|
||||
var logs = new List<DBLog>();
|
||||
while (_messageQueue.TryTake(out var log))
|
||||
{
|
||||
if (log != null) logs.Add(log);
|
||||
if (logs.Count >= 100) break;
|
||||
}
|
||||
if (logs.Any())
|
||||
{
|
||||
using var db = DbManager.Create(enableLog: false);
|
||||
db.InsertBatch(logs);
|
||||
}
|
||||
return System.Threading.Tasks.Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,85 +0,0 @@
|
|||
using Longbow.OAuth;
|
||||
using Longbow.Security.Cryptography;
|
||||
using Longbow.WeChatAuth;
|
||||
using Microsoft.AspNetCore.Authentication.OAuth;
|
||||
using System;
|
||||
using System.Linq;
|
||||
#if NETCOREAPP3_0
|
||||
using System.Text.Json;
|
||||
#endif
|
||||
|
||||
namespace Bootstrap.DataAccess
|
||||
{
|
||||
/// <summary>
|
||||
/// 微信登陆帮助类
|
||||
/// </summary>
|
||||
public static class WeChatHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// 微信登陆配置方法
|
||||
/// </summary>
|
||||
/// <typeparam name="TOptions"></typeparam>
|
||||
/// <param name="option"></param>
|
||||
public static void Configure<TOptions>(TOptions option) where TOptions : LgbOAuthOptions
|
||||
{
|
||||
option.Events.OnCreatingTicket = context =>
|
||||
{
|
||||
// 生成用户
|
||||
var user = ParseUser(context);
|
||||
user.App = option.App;
|
||||
OAuthHelper.SaveUser(user, option.Roles);
|
||||
|
||||
// 记录登陆日志
|
||||
context.HttpContext.Log(user.DisplayName, true);
|
||||
return System.Threading.Tasks.Task.CompletedTask;
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 插入 Gitee 授权用户到数据库中
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
/// <returns></returns>
|
||||
private static User ParseUser(OAuthCreatingTicketContext context)
|
||||
{
|
||||
var user = context.User.ToObject<WeChatUser>();
|
||||
return new User()
|
||||
{
|
||||
ApprovedBy = "OAuth",
|
||||
ApprovedTime = DateTime.Now,
|
||||
DisplayName = user?.NickName ?? "",
|
||||
UserName = user?.UnionId ?? "",
|
||||
Password = LgbCryptography.GenerateSalt(),
|
||||
Icon = user?.HeadImgUrl ?? "",
|
||||
Description = $"{context.Scheme.Name}"
|
||||
};
|
||||
}
|
||||
|
||||
#if NETCOREAPP3_0
|
||||
private static T? ToObject<T>(this JsonElement element) where T : WeChatUser
|
||||
{
|
||||
var user = new WeChatUser();
|
||||
var target = element.EnumerateObject();
|
||||
user.OpenId = target.TryGetValue("OpenId");
|
||||
user.UnionId = target.TryGetValue("UnionId");
|
||||
user.NickName = target.TryGetValue("NickName");
|
||||
user.Privilege = target.TryGetValue("Privilege");
|
||||
user.Sex = target.TryGetValue("Sex");
|
||||
user.Province = target.TryGetValue("Province");
|
||||
user.City = target.TryGetValue("City");
|
||||
user.Country = target.TryGetValue("Country");
|
||||
user.HeadImgUrl = target.TryGetValue("HeadImgUrl");
|
||||
user.Privilege = target.TryGetValue("Privilege");
|
||||
return user as T;
|
||||
}
|
||||
|
||||
private static string TryGetValue(this JsonElement.ObjectEnumerator target, string propertyName)
|
||||
{
|
||||
var ret = string.Empty;
|
||||
var property = target.FirstOrDefault(t => t.Name.Equals(propertyName, StringComparison.OrdinalIgnoreCase));
|
||||
ret = property.Value.ToString();
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
<lgb><token>d9DQpRTdULRQDYkciXU+R2LrcHSPdJY+9eip5weQTVQfgX6m0sETBCqW5ymQ/A7lrEXkKHXmJpO9rs9xy3rpDX5FJ+wF1o66HROA28Arh26APC55IcL23n+ImKyZPEUHupHvPGZ0rrGPy18A6GTn65IrsfqFS2vyr5yrmnjssgA=</token></lgb>
|
|
@ -0,0 +1,15 @@
|
|||
<Project>
|
||||
|
||||
<Import Project="..\Directory.Build.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Using Include="System.Diagnostics.CodeAnalysis" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -0,0 +1,13 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\BootstrapAdmin.Caching\BootstrapAdmin.Caching.csproj" />
|
||||
<ProjectReference Include="..\BootstrapAdmin.Web.Core\BootstrapAdmin.Web.Core.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="BootstrapBlazor" Version="6.2.9-beta07" />
|
||||
<PackageReference Include="FreeSql.Provider.Sqlite" Version="3.0.100" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -0,0 +1,67 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
using FreeSql;
|
||||
using FreeSql.Internal.Model;
|
||||
|
||||
namespace BootStarpAdmin.DataAccess.FreeSql.Extensions;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
static class FilterExtensions
|
||||
{
|
||||
public static ISelect<TModel> PageIf<TModel>(this ISelect<TModel> source, int pageIndex, int pageItems, bool isPage) => isPage
|
||||
? source.Page(pageIndex, pageItems)
|
||||
: source;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="filters"></param>
|
||||
/// <returns></returns>
|
||||
public static DynamicFilterInfo ToDynamicFilter(this IEnumerable<IFilterAction> filters)
|
||||
{
|
||||
var ret = new DynamicFilterInfo() { Filters = new List<DynamicFilterInfo>() };
|
||||
|
||||
// 处理 过滤 高级搜索 自定义搜索
|
||||
foreach (var filter in filters)
|
||||
{
|
||||
var item = new DynamicFilterInfo() { Filters = new List<DynamicFilterInfo>() };
|
||||
var actions = filter.GetFilterConditions();
|
||||
foreach (var f in actions)
|
||||
{
|
||||
item.Logic = f.FilterLogic.ToDynamicFilterLogic();
|
||||
item.Filters.Add(new DynamicFilterInfo()
|
||||
{
|
||||
Field = f.FieldKey,
|
||||
Value = f.FieldValue,
|
||||
Operator = f.FilterAction.ToDynamicFilterOperator()
|
||||
});
|
||||
}
|
||||
ret.Filters.Add(item);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
private static DynamicFilterLogic ToDynamicFilterLogic(this FilterLogic logic) => logic switch
|
||||
{
|
||||
FilterLogic.And => DynamicFilterLogic.And,
|
||||
_ => DynamicFilterLogic.Or
|
||||
};
|
||||
|
||||
private static DynamicFilterOperator ToDynamicFilterOperator(this FilterAction action) => action switch
|
||||
{
|
||||
FilterAction.Equal => DynamicFilterOperator.Equal,
|
||||
FilterAction.NotEqual => DynamicFilterOperator.NotEqual,
|
||||
FilterAction.Contains => DynamicFilterOperator.Contains,
|
||||
FilterAction.NotContains => DynamicFilterOperator.NotContains,
|
||||
FilterAction.GreaterThan => DynamicFilterOperator.GreaterThan,
|
||||
FilterAction.GreaterThanOrEqual => DynamicFilterOperator.GreaterThanOrEqual,
|
||||
FilterAction.LessThan => DynamicFilterOperator.LessThan,
|
||||
FilterAction.LessThanOrEqual => DynamicFilterOperator.LessThanOrEqual,
|
||||
_ => throw new System.NotSupportedException()
|
||||
};
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using BootStarpAdmin.DataAccess.FreeSql.Models;
|
||||
using BootstrapAdmin.DataAccess.Models;
|
||||
|
||||
namespace BootStarpAdmin.DataAccess.FreeSql.Extensions;
|
||||
|
||||
static class FreeSqlExtensions
|
||||
{
|
||||
public static void Mapper(this IFreeSql freeSql)
|
||||
{
|
||||
freeSql.CodeFirst.ConfigEntity<Navigation>(i =>
|
||||
{
|
||||
i.Name("Navigations");
|
||||
i.Property(n => n.HasChildren).IsIgnore(true);
|
||||
});
|
||||
freeSql.CodeFirst.ConfigEntity<User>(i =>
|
||||
{
|
||||
i.Name("Users");
|
||||
i.Property(n => n.NewPassword).IsIgnore(true);
|
||||
i.Property(n => n.ConfirmPassword).IsIgnore(true);
|
||||
i.Property(n => n.Period).IsIgnore(true);
|
||||
i.Property(n => n.IsReset).IsIgnore(true);
|
||||
});
|
||||
freeSql.CodeFirst.ConfigEntity<Group>(i =>
|
||||
{
|
||||
i.Name("Groups");
|
||||
});
|
||||
freeSql.CodeFirst.ConfigEntity<Role>(i =>
|
||||
{
|
||||
i.Name("Roles");
|
||||
});
|
||||
freeSql.CodeFirst.ConfigEntity<Error>(i =>
|
||||
{
|
||||
i.Name("Exceptions");
|
||||
});
|
||||
freeSql.CodeFirst.ConfigEntity<UserRole>(i =>
|
||||
{
|
||||
i.Name("UserRole");
|
||||
i.Property(s => s.ID).IsIgnore(true);
|
||||
});
|
||||
freeSql.CodeFirst.ConfigEntity<NavigationRole>(i =>
|
||||
{
|
||||
i.Name("NavigationRole");
|
||||
i.Property(s => s.ID).IsIgnore(true);
|
||||
});
|
||||
freeSql.CodeFirst.ConfigEntity<UserGroup>(i =>
|
||||
{
|
||||
i.Name("UserGroup");
|
||||
i.Property(s => s.ID).IsIgnore(true);
|
||||
});
|
||||
freeSql.CodeFirst.ConfigEntity<RoleGroup>(i =>
|
||||
{
|
||||
i.Name("RoleGroup");
|
||||
i.Property(s => s.ID).IsIgnore(true);
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using BootStarpAdmin.DataAccess.FreeSql.Extensions;
|
||||
using BootStarpAdmin.DataAccess.FreeSql.Service;
|
||||
using BootstrapAdmin.Web.Core;
|
||||
using BootstrapBlazor.Components;
|
||||
using FreeSql;
|
||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
|
||||
namespace Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
/// <summary>
|
||||
/// FreeSql ORM 注入服务扩展类
|
||||
/// </summary>
|
||||
public static class ServiceCollectionExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// 注入 FreeSql 数据服务类
|
||||
/// </summary>
|
||||
/// <param name="services"></param>
|
||||
/// <param name="freeSqlBuilder"></param>
|
||||
/// <returns></returns>
|
||||
public static IServiceCollection AddFreeSql(this IServiceCollection services, Action<IServiceProvider, FreeSqlBuilder> freeSqlBuilder)
|
||||
{
|
||||
services.TryAddSingleton<IFreeSql>(provider =>
|
||||
{
|
||||
var builder = new FreeSqlBuilder();
|
||||
freeSqlBuilder(provider, builder);
|
||||
var instance = builder.Build();
|
||||
instance.Mapper();
|
||||
return instance;
|
||||
});
|
||||
|
||||
// 增加数据服务
|
||||
services.AddSingleton(typeof(IDataService<>), typeof(DefaultDataService<>));
|
||||
|
||||
// 增加业务服务
|
||||
services.AddSingleton<IApp, AppService>();
|
||||
services.AddSingleton<IDict, DictService>();
|
||||
services.AddSingleton<IException, ExceptionService>();
|
||||
services.AddSingleton<IGroup, GroupService>();
|
||||
services.AddSingleton<ILogin, LoginService>();
|
||||
services.AddSingleton<INavigation, NavigationService>();
|
||||
services.AddSingleton<IRole, RoleService>();
|
||||
services.AddSingleton<IUser, UserService>();
|
||||
return services;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
namespace BootStarpAdmin.DataAccess.FreeSql.Models;
|
||||
|
||||
class NavigationRole
|
||||
{
|
||||
public string? ID { get; set; }
|
||||
|
||||
public string? NavigationID { get; set; }
|
||||
|
||||
public string? RoleID { get; set; }
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
namespace BootStarpAdmin.DataAccess.FreeSql.Models;
|
||||
|
||||
class RoleApp
|
||||
{
|
||||
public string? RoleID { get; set; }
|
||||
|
||||
public string? AppID { get; set; }
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
namespace BootStarpAdmin.DataAccess.FreeSql.Models;
|
||||
|
||||
class RoleGroup
|
||||
{
|
||||
public string? ID { get; set; }
|
||||
|
||||
public string? RoleID { get; set; }
|
||||
|
||||
public string? GroupID { get; set; }
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
namespace BootStarpAdmin.DataAccess.FreeSql.Models;
|
||||
|
||||
class UserGroup
|
||||
{
|
||||
public string? ID { get; set; }
|
||||
|
||||
public string? UserID { get; set; }
|
||||
|
||||
public string? GroupID { get; set; }
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
namespace BootStarpAdmin.DataAccess.FreeSql.Models;
|
||||
|
||||
class UserRole
|
||||
{
|
||||
public string? ID { get; set; }
|
||||
|
||||
public string? UserID { get; set; }
|
||||
|
||||
public string? RoleID { get; set; }
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using BootStarpAdmin.DataAccess.FreeSql.Models;
|
||||
using BootstrapAdmin.Web.Core;
|
||||
|
||||
namespace BootStarpAdmin.DataAccess.FreeSql.Service;
|
||||
|
||||
class AppService : IApp
|
||||
{
|
||||
private IFreeSql FreeSql { get; }
|
||||
|
||||
public AppService(IFreeSql freeSql) => FreeSql = freeSql;
|
||||
|
||||
public List<string> GetAppsByRoleId(string? roleId) => FreeSql.Ado.Query<string>("select AppID from RoleApp where RoleID = @roleId", new { roleId });
|
||||
|
||||
public bool SaveAppsByRoleId(string? roleId, IEnumerable<string> appIds)
|
||||
{
|
||||
var ret = false;
|
||||
try
|
||||
{
|
||||
FreeSql.Transaction(() =>
|
||||
{
|
||||
FreeSql.Ado.ExecuteNonQuery("delete from RoleApp where RoleID = @roleId", new { roleId });
|
||||
FreeSql.Insert(appIds.Select(g => new RoleApp { AppID = g, RoleID = roleId })).ExecuteAffrows();
|
||||
ret = true;
|
||||
});
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using BootStarpAdmin.DataAccess.FreeSql.Extensions;
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
namespace BootStarpAdmin.DataAccess.FreeSql.Service;
|
||||
|
||||
class DefaultDataService<TModel> : DataServiceBase<TModel> where TModel : class, new()
|
||||
{
|
||||
private IFreeSql FreeSql { get; }
|
||||
|
||||
public DefaultDataService(IFreeSql freeSql) => FreeSql = freeSql;
|
||||
|
||||
/// <summary>
|
||||
/// 删除方法
|
||||
/// </summary>
|
||||
/// <param name="models"></param>
|
||||
/// <returns></returns>
|
||||
public override async Task<bool> DeleteAsync(IEnumerable<TModel> models)
|
||||
{
|
||||
await FreeSql.Delete<TModel>(models).ExecuteAffrowsAsync();
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存方法
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <param name="changedType"></param>
|
||||
/// <returns></returns>
|
||||
public override async Task<bool> SaveAsync(TModel model, ItemChangedType changedType)
|
||||
{
|
||||
if (changedType == ItemChangedType.Add)
|
||||
{
|
||||
await FreeSql.Insert<TModel>(model).ExecuteAffrowsAsync();
|
||||
}
|
||||
else if (changedType == ItemChangedType.Update)
|
||||
{
|
||||
await FreeSql.Update<TModel>(model).ExecuteAffrowsAsync();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override Task<QueryData<TModel>> QueryAsync(QueryPageOptions option)
|
||||
{
|
||||
var ret = new QueryData<TModel>()
|
||||
{
|
||||
IsSorted = true,
|
||||
IsFiltered = true,
|
||||
IsSearch = true,
|
||||
IsAdvanceSearch = option.AdvanceSearchs.Any() || option.CustomerSearchs.Any()
|
||||
};
|
||||
ret.Items = FreeSql.Select<TModel>()
|
||||
.WhereDynamicFilter(option.Searchs.ToDynamicFilter())
|
||||
.WhereDynamicFilter(option.Filters
|
||||
.Concat(option.AdvanceSearchs)
|
||||
.Concat(option.CustomerSearchs)
|
||||
.ToDynamicFilter())
|
||||
.OrderByPropertyNameIf(option.SortOrder != SortOrder.Unset, option.SortName, option.SortOrder == SortOrder.Asc)
|
||||
.Count(out var count)
|
||||
.PageIf(option.PageIndex, option.PageItems, option.IsPage)
|
||||
.ToList();
|
||||
ret.TotalCount = Convert.ToInt32(count);
|
||||
return Task.FromResult(ret);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,197 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using BootstrapAdmin.Caching;
|
||||
using BootstrapAdmin.DataAccess.Models;
|
||||
using BootstrapAdmin.Web.Core;
|
||||
using Longbow.Security.Cryptography;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
namespace BootStarpAdmin.DataAccess.FreeSql.Service;
|
||||
|
||||
class DictService : IDict
|
||||
{
|
||||
private const string DictServiceCacheKey = "DictService-GetAll";
|
||||
|
||||
private IFreeSql FreeSql { get; }
|
||||
|
||||
private string? AppId { get; set; }
|
||||
|
||||
public DictService(IFreeSql freeSql, IConfiguration configuration)
|
||||
{
|
||||
FreeSql = freeSql;
|
||||
AppId = configuration.GetValue("AppId", "BA");
|
||||
}
|
||||
|
||||
public bool AuthenticateDemo(string code)
|
||||
{
|
||||
var ret = false;
|
||||
if (!string.IsNullOrEmpty(code))
|
||||
{
|
||||
var dicts = GetAll();
|
||||
var salt = dicts.FirstOrDefault(d => d.Category == "网站设置" && d.Name == "授权盐值" && d.Define == EnumDictDefine.System)?.Code;
|
||||
var authCode = dicts.FirstOrDefault(d => d.Category == "网站设置" && d.Name == "哈希结果" && d.Define == EnumDictDefine.System)?.Code;
|
||||
if (!string.IsNullOrEmpty(salt))
|
||||
{
|
||||
ret = LgbCryptography.ComputeHash(code, salt) == authCode;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<Dict> GetAll() => CacheManager.GetOrAdd<List<Dict>>(DictServiceCacheKey, entry => FreeSql.Select<Dict>().ToList());
|
||||
|
||||
public Dictionary<string, string> GetApps()
|
||||
{
|
||||
var dicts = GetAll();
|
||||
|
||||
return dicts.Where(d => d.Category == "应用程序").Select(s => new KeyValuePair<string, string>(s.Code, s.Name)).ToDictionary(i => i.Key, i => i.Value);
|
||||
}
|
||||
|
||||
public int GetCookieExpiresPeriod()
|
||||
{
|
||||
var dicts = GetAll();
|
||||
var code = dicts.FirstOrDefault(d => d.Category == "网站设置" && d.Name == "Cookie保留时长" && d.Define == EnumDictDefine.System)?.Code ?? "0";
|
||||
_ = int.TryParse(code, out var ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public string GetCurrentLogin()
|
||||
{
|
||||
var dicts = GetAll();
|
||||
return dicts.FirstOrDefault(d => d.Category == "网站设置" && d.Name == "登录界面" && d.Define == EnumDictDefine.System)?.Code ?? "Login";
|
||||
}
|
||||
|
||||
public Dictionary<string, string> GetLogins()
|
||||
{
|
||||
var dicts = GetAll();
|
||||
return dicts.Where(d => d.Category == "系统首页").Select(d => new KeyValuePair<string, string>(d.Code, d.Name)).OrderBy(i => i.Value).ToDictionary(i => i.Key, i => i.Value);
|
||||
}
|
||||
|
||||
public string? GetNotificationUrl(string appId) => GetUrlByName(appId, "系统通知地址");
|
||||
|
||||
public string? GetProfileUrl(string appId) => GetUrlByName(appId, "个人中心地址");
|
||||
|
||||
public string? GetSettingsUrl(string appId) => GetUrlByName(appId, "系统设置地址");
|
||||
|
||||
public Dictionary<string, string> GetThemes()
|
||||
{
|
||||
var dicts = GetAll();
|
||||
return dicts.Where(d => d.Category == "网站样式").Select(d => new KeyValuePair<string, string>(d.Code, d.Name)).ToDictionary(i => i.Key, i => i.Value);
|
||||
}
|
||||
|
||||
public string GetWebFooter()
|
||||
{
|
||||
var dicts = GetAll();
|
||||
var title = "网站页脚";
|
||||
var name = dicts.FirstOrDefault(d => d.Category == "应用程序" && d.Code == AppId)?.Name;
|
||||
if (!string.IsNullOrEmpty(name))
|
||||
{
|
||||
var dict = dicts.FirstOrDefault(d => d.Category == name && d.Name == "网站页脚") ?? dicts.FirstOrDefault(d => d.Category == "网站设置" && d.Name == "网站页脚");
|
||||
title = dict?.Code ?? "网站标题";
|
||||
}
|
||||
return title;
|
||||
}
|
||||
|
||||
public string GetWebTitle()
|
||||
{
|
||||
var dicts = GetAll();
|
||||
var title = "网站标题";
|
||||
var name = dicts.FirstOrDefault(d => d.Category == "应用程序" && d.Code == AppId)?.Name;
|
||||
if (!string.IsNullOrEmpty(name))
|
||||
{
|
||||
var dict = dicts.FirstOrDefault(d => d.Category == name && d.Name == "网站标题") ?? dicts.FirstOrDefault(d => d.Category == "网站设置" && d.Name == "网站标题");
|
||||
title = dict?.Code ?? "网站标题";
|
||||
}
|
||||
return title;
|
||||
}
|
||||
|
||||
public bool IsDemo()
|
||||
{
|
||||
var dicts = GetAll();
|
||||
var code = dicts.FirstOrDefault(d => d.Category == "网站设置" && d.Name == "演示系统" && d.Define == EnumDictDefine.System)?.Code ?? "0";
|
||||
return code == "1";
|
||||
}
|
||||
|
||||
public string RetrieveIconFolderPath()
|
||||
{
|
||||
var dicts = GetAll();
|
||||
return dicts.FirstOrDefault(d => d.Name == "头像路径" && d.Category == "头像地址" && d.Define == EnumDictDefine.System)?.Code ?? "images/uploder/";
|
||||
}
|
||||
|
||||
private bool SaveDict(Dict dict)
|
||||
{
|
||||
var ret = FreeSql.Update<Dict>().Where(s => s.Category == dict.Category && s.Name == dict.Name).Set(s => s.Code, dict.Code).ExecuteAffrows() > 0;
|
||||
if (ret)
|
||||
{
|
||||
// 更新缓存
|
||||
CacheManager.Clear(DictServiceCacheKey);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
public bool SaveCookieExpiresPeriod(int expiresPeriod) => SaveDict(new Dict { Category = "网站设置", Name = "Cookie保留时长", Code = expiresPeriod.ToString() });
|
||||
|
||||
public bool SaveDemo(bool isDemo) => SaveDict(new Dict { Category = "网站设置", Name = "演示系统", Define = EnumDictDefine.System, Code = isDemo ? "1" : "0" });
|
||||
|
||||
public bool SaveHealthCheck(bool enable = true) => SaveDict(new Dict { Category = "网站设置", Name = "演示系统", Define = EnumDictDefine.System, Code = enable ? "1" : "0" });
|
||||
|
||||
public bool SaveLogin(string login) => SaveDict(new Dict { Category = "网站设置", Name = "登录界面", Code = login });
|
||||
|
||||
public bool SaveTheme(string theme) => SaveDict(new Dict { Category = "网站设置", Name = "使用样式", Code = theme });
|
||||
|
||||
public bool SaveWebFooter(string footer) => SaveDict(new Dict { Category = "网站设置", Name = "网站页脚", Code = footer });
|
||||
|
||||
public bool SaveWebTitle(string title) => SaveDict(new Dict { Category = "网站设置", Name = "网站标题", Code = title });
|
||||
|
||||
private string? GetUrlByName(string appId, string dictName)
|
||||
{
|
||||
string? url = null;
|
||||
var dicts = GetAll();
|
||||
var appName = dicts.FirstOrDefault(d => d.Category == "应用程序" && d.Code == appId && d.Define == EnumDictDefine.System)?.Name;
|
||||
if (!string.IsNullOrEmpty(appName))
|
||||
{
|
||||
url = dicts.FirstOrDefault(d => d.Category == appName && d.Name == dictName && d.Define == EnumDictDefine.Customer)?.Code;
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 通过指定 appId 获得配置首页地址
|
||||
/// </summary>
|
||||
/// <param name="appId"></param>
|
||||
/// <returns></returns>
|
||||
public string? GetHomeUrlByAppId(string appId)
|
||||
{
|
||||
string? url = null;
|
||||
var dicts = GetAll();
|
||||
// appId 为空时读取前台列表取第一个应用作为默认应用
|
||||
url = dicts.FirstOrDefault(d => d.Category == "应用首页" && d.Name.Equals(appId, StringComparison.OrdinalIgnoreCase) && d.Define == EnumDictDefine.System)?.Code;
|
||||
return url;
|
||||
}
|
||||
|
||||
public bool SavDefaultApp(bool enabled)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool GetEnableDefaultApp()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public string GetIconFolderPath()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public string GetDefaultIcon()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using BootstrapAdmin.DataAccess.Models;
|
||||
using BootstrapAdmin.Web.Core;
|
||||
|
||||
namespace BootStarpAdmin.DataAccess.FreeSql.Service;
|
||||
|
||||
class ExceptionService : IException
|
||||
{
|
||||
private IFreeSql FreeSql { get; }
|
||||
|
||||
public ExceptionService(IFreeSql freeSql) => FreeSql = freeSql;
|
||||
|
||||
public (IEnumerable<Error> Items, int ItemsCount) GetAll(string? searchText, ExceptionFilter filter, int pageIndex, int pageItems, List<string> sortList)
|
||||
{
|
||||
var items = FreeSql.Select<Error>();
|
||||
|
||||
if (!string.IsNullOrEmpty(searchText))
|
||||
{
|
||||
items.Where($"ErrorPage Like %@searchText% or Message Like %@searchText% or StackTrace Like %@searchText%", new { searchText });
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(filter.Category))
|
||||
{
|
||||
items.Where("Category = @Category", new { filter.Category });
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(filter.UserId))
|
||||
{
|
||||
items.Where("UserId Like %@UserId%", new { filter.UserId });
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(filter.ErrorPage))
|
||||
{
|
||||
items.Where("ErrorPage Like %{ErrorPage}%", new { filter.ErrorPage });
|
||||
}
|
||||
|
||||
items.Where("LogTime >= @Star and LogTime <= @End", new { filter.Star, filter.End });
|
||||
|
||||
if (sortList.Any())
|
||||
{
|
||||
items.OrderBy(string.Join(", ", sortList));
|
||||
}
|
||||
else
|
||||
{
|
||||
items.OrderBy("UserId, ErrorPage, Logtime desc");
|
||||
}
|
||||
var errors = items.Count(out var count).Page(pageIndex, pageItems).ToList();
|
||||
|
||||
return (errors, Convert.ToInt32(count));
|
||||
}
|
||||
|
||||
public bool Log(Error exception)
|
||||
{
|
||||
try
|
||||
{
|
||||
FreeSql.Insert(exception).ExecuteAffrows();
|
||||
}
|
||||
catch { }
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using BootStarpAdmin.DataAccess.FreeSql.Models;
|
||||
using BootstrapAdmin.DataAccess.Models;
|
||||
using BootstrapAdmin.Web.Core;
|
||||
|
||||
namespace BootStarpAdmin.DataAccess.FreeSql.Service;
|
||||
|
||||
class GroupService : IGroup
|
||||
{
|
||||
private IFreeSql FreeSql { get; }
|
||||
|
||||
public GroupService(IFreeSql freeSql) => FreeSql = freeSql;
|
||||
|
||||
public List<Group> GetAll() => FreeSql.Select<Group>().ToList();
|
||||
|
||||
public List<string> GetGroupsByRoleId(string? roleId) => FreeSql.Ado.Query<string>("select GroupID from RoleGroup where RoleID = @roleId", new { roleId });
|
||||
|
||||
public List<string> GetGroupsByUserId(string? userId) => FreeSql.Ado.Query<string>("select GroupID from UserGroup where UserID = @userId", new { userId });
|
||||
|
||||
public bool SaveGroupsByRoleId(string? roleId, IEnumerable<string> groupIds)
|
||||
{
|
||||
var ret = false;
|
||||
try
|
||||
{
|
||||
FreeSql.Transaction(() =>
|
||||
{
|
||||
FreeSql.Ado.ExecuteNonQuery("delete from RoleGroup where RoleID = @roleId", new { roleId });
|
||||
FreeSql.Insert(groupIds.Select(g => new RoleGroup { GroupID = g, RoleID = roleId })).ExecuteAffrows();
|
||||
ret = true;
|
||||
});
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
public bool SaveGroupsByUserId(string? userId, IEnumerable<string> groupIds)
|
||||
{
|
||||
var ret = false;
|
||||
try
|
||||
{
|
||||
FreeSql.Transaction(() =>
|
||||
{
|
||||
FreeSql.Ado.ExecuteNonQuery("delete from UserGroup where UserID = @userId", new { userId });
|
||||
FreeSql.Insert(groupIds.Select(g => new UserGroup { GroupID = g, UserID = userId }));
|
||||
ret = true;
|
||||
});
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using BootstrapAdmin.Web.Core;
|
||||
|
||||
namespace BootStarpAdmin.DataAccess.FreeSql.Service;
|
||||
|
||||
class LoginService : ILogin
|
||||
{
|
||||
public Task<bool> Log(string userName, bool result)
|
||||
{
|
||||
return Task.FromResult(true);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using BootStarpAdmin.DataAccess.FreeSql.Models;
|
||||
using BootstrapAdmin.DataAccess.Models;
|
||||
using BootstrapAdmin.Web.Core;
|
||||
|
||||
namespace BootStarpAdmin.DataAccess.FreeSql.Service;
|
||||
|
||||
class NavigationService : INavigation
|
||||
{
|
||||
private IFreeSql FreeSql { get; }
|
||||
|
||||
public NavigationService(IFreeSql freeSql) => FreeSql = freeSql;
|
||||
|
||||
public List<Navigation> GetAllMenus(string userName)
|
||||
{
|
||||
return FreeSql.Ado.Query<Navigation>($"select n.ID, n.ParentId, n.Name, n.[order], n.Icon, n.Url, n.Category, n.Target, n.IsResource, n.Application, ln.Name as ParentName from Navigations n inner join Dicts d on n.Category = d.Code and d.Category = @Category and d.Define = @Define left join Navigations ln on n.ParentId = ln.ID inner join (select nr.NavigationID from Users u inner join UserRole ur on ur.UserID = u.ID inner join NavigationRole nr on nr.RoleID = ur.RoleID where u.UserName = @UserName union select nr.NavigationID from Users u inner join UserGroup ug on u.ID = ug.UserID inner join RoleGroup rg on rg.GroupID = ug.GroupID inner join NavigationRole nr on nr.RoleID = rg.RoleID where u.UserName = @UserName union select n.ID from Navigations n where EXISTS (select UserName from Users u inner join UserRole ur on u.ID = ur.UserID inner join Roles r on ur.RoleID = r.ID where u.UserName = @UserName and r.RoleName = @RoleName)) nav on n.ID = nav.NavigationID ORDER BY n.Application, n.[order]", new { UserName = userName, Category = "菜单", RoleName = "Administrators", Define = EnumDictDefine.System });
|
||||
}
|
||||
|
||||
public List<string> GetMenusByRoleId(string? roleId) => FreeSql.Ado.Query<string>("select NavigationID from NavigationRole where RoleID = @roleId", new { roleId });
|
||||
|
||||
public bool SaveMenusByRoleId(string? roleId, List<string> menuIds)
|
||||
{
|
||||
var ret = false;
|
||||
try
|
||||
{
|
||||
FreeSql.Transaction(() =>
|
||||
{
|
||||
FreeSql.Ado.ExecuteNonQuery("delete from NavigationRole where RoleID = @roleId", new { roleId });
|
||||
FreeSql.Insert(menuIds.Select(g => new NavigationRole { NavigationID = g, RoleID = roleId })).ExecuteAffrows();
|
||||
ret = true;
|
||||
});
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,84 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using BootStarpAdmin.DataAccess.FreeSql.Models;
|
||||
using BootstrapAdmin.DataAccess.Models;
|
||||
using BootstrapAdmin.Web.Core;
|
||||
|
||||
namespace BootStarpAdmin.DataAccess.FreeSql.Service;
|
||||
|
||||
class RoleService : IRole
|
||||
{
|
||||
private IFreeSql FreeSql { get; }
|
||||
|
||||
public RoleService(IFreeSql freeSql) => FreeSql = freeSql;
|
||||
|
||||
public List<Role> GetAll()
|
||||
{
|
||||
return FreeSql.Select<Role>().ToList();
|
||||
}
|
||||
|
||||
public List<string> GetRolesByGroupId(string? groupId) => FreeSql.Ado.Query<string>("select RoleID from RoleGroup where GroupID = @groupId", new { groupId });
|
||||
|
||||
public List<string> GetRolesByMenuId(string? menuId) => FreeSql.Ado.Query<string>("select RoleID from NavigationRole where NavigationID = @menuId", new { menuId });
|
||||
|
||||
public List<string> GetRolesByUserId(string? userId) => FreeSql.Ado.Query<string>("select RoleID from UserRole where UserID = @userId", new { userId });
|
||||
|
||||
public bool SaveRolesByGroupId(string? groupId, IEnumerable<string> roleIds)
|
||||
{
|
||||
var ret = false;
|
||||
try
|
||||
{
|
||||
FreeSql.Transaction(() =>
|
||||
{
|
||||
FreeSql.Ado.ExecuteNonQuery("delete from RoleGroup where GroupID = @groupId", new { groupId });
|
||||
FreeSql.Insert(roleIds.Select(g => new RoleGroup { RoleID = g, GroupID = groupId })).ExecuteAffrows();
|
||||
ret = true;
|
||||
});
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
public bool SaveRolesByMenuId(string? menuId, IEnumerable<string> roleIds)
|
||||
{
|
||||
var ret = false;
|
||||
try
|
||||
{
|
||||
FreeSql.Transaction(() =>
|
||||
{
|
||||
FreeSql.Ado.ExecuteNonQuery("delete from NavigationRole where NavigationID = @menuId", new { menuId });
|
||||
FreeSql.Insert(roleIds.Select(g => new NavigationRole { RoleID = g, NavigationID = menuId })).ExecuteAffrows();
|
||||
ret = true;
|
||||
});
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
public bool SaveRolesByUserId(string? userId, IEnumerable<string> roleIds)
|
||||
{
|
||||
var ret = false;
|
||||
try
|
||||
{
|
||||
FreeSql.Transaction(() =>
|
||||
{
|
||||
FreeSql.Ado.ExecuteNonQuery("delete from UserRole where UserID = @userId", new { userId });
|
||||
FreeSql.Insert(roleIds.Select(g => new UserRole { RoleID = g, UserID = userId })).ExecuteAffrows();
|
||||
});
|
||||
ret = true;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,230 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using BootStarpAdmin.DataAccess.FreeSql.Models;
|
||||
using BootstrapAdmin.DataAccess.Models;
|
||||
using BootstrapAdmin.Web.Core;
|
||||
using Longbow.Security.Cryptography;
|
||||
|
||||
namespace BootStarpAdmin.DataAccess.FreeSql.Service;
|
||||
|
||||
class UserService : IUser
|
||||
{
|
||||
private IFreeSql FreeSql { get; }
|
||||
|
||||
public UserService(IFreeSql freeSql) => FreeSql = freeSql;
|
||||
|
||||
public bool Authenticate(string userName, string password)
|
||||
{
|
||||
var user = FreeSql.Select<User>().Where(s => s.ApprovedTime != null && s.UserName == userName).ToOne(s => new User
|
||||
{
|
||||
DisplayName = s.DisplayName,
|
||||
PassSalt = s.PassSalt,
|
||||
Password = s.Password
|
||||
});
|
||||
|
||||
var isAuth = false;
|
||||
if (user != null && !string.IsNullOrEmpty(user.PassSalt))
|
||||
{
|
||||
isAuth = user.Password == LgbCryptography.ComputeHash(password, user.PassSalt);
|
||||
}
|
||||
return isAuth;
|
||||
}
|
||||
|
||||
public List<User> GetAll()
|
||||
{
|
||||
return FreeSql.Select<User>().ToList();
|
||||
}
|
||||
|
||||
public List<string> GetApps(string userName)
|
||||
{
|
||||
return FreeSql.Ado.Query<string>($"select d.Code from Dicts d inner join RoleApp ra on d.Code = ra.AppId inner join (select r.Id from Roles r inner join UserRole ur on r.ID = ur.RoleID inner join Users u on ur.UserID = u.ID where u.UserName = @UserName union select r.Id from Roles r inner join RoleGroup rg on r.ID = rg.RoleID inner join Groups g on rg.GroupID = g.ID inner join UserGroup ug on ug.GroupID = g.ID inner join Users u on ug.UserID = u.ID where u.UserName = @UserName) r on ra.RoleId = r.ID union select Code from Dicts where Category = @Category and exists(select r.ID from Roles r inner join UserRole ur on r.ID = ur.RoleID inner join Users u on ur.UserID = u.ID where u.UserName = @UserName and r.RoleName = @RoleName union select r.ID from Roles r inner join RoleGroup rg on r.ID = rg.RoleID inner join Groups g on rg.GroupID = g.ID inner join UserGroup ug on ug.GroupID = g.ID inner join Users u on ug.UserID = u.ID where u.UserName = @UserName and r.RoleName = @RoleName)", new { UserName = userName, Category = "应用程序", RoleName = "Administrators" }).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 通过用户名获得指定的前台 AppId
|
||||
/// </summary>
|
||||
/// <param name="userName"></param>
|
||||
/// <returns></returns>
|
||||
public string? GetAppIdByUserName(string userName) => FreeSql.Select<User>().Where(s => s.UserName == userName).ToOne(s => s.App);
|
||||
|
||||
public string? GetDisplayName(string? userName)
|
||||
{
|
||||
return FreeSql.Select<User>().Where(s => s.UserName == userName).ToOne(s => s.DisplayName);
|
||||
}
|
||||
|
||||
public List<string> GetRoles(string userName)
|
||||
{
|
||||
return FreeSql.Ado.Query<string>($"select r.RoleName from Roles r inner join UserRole ur on r.ID=ur.RoleID inner join Users u on ur.UserID = u.ID and u.UserName = @userName union select r.RoleName from Roles r inner join RoleGroup rg on r.ID = rg.RoleID inner join Groups g on rg.GroupID = g.ID inner join UserGroup ug on ug.GroupID = g.ID inner join Users u on ug.UserID = u.ID and u.UserName = @userName", new { userName }).ToList();
|
||||
}
|
||||
|
||||
public User? GetUserByUserName(string? userName) => string.IsNullOrEmpty(userName) ? null : FreeSql.Select<User>().Where(i => i.UserName == userName).ToOne();
|
||||
|
||||
public List<string> GetUsersByGroupId(string? groupId)
|
||||
{
|
||||
return FreeSql.Ado.Query<string>("select UserID from UserGroup where GroupID = @groupId", new { groupId }).ToList();
|
||||
}
|
||||
|
||||
public List<string> GetUsersByRoleId(string? roleId)
|
||||
{
|
||||
return FreeSql.Ado.Query<string>("select UserID from UserRole where RoleID = @roleId", new { roleId }).ToList();
|
||||
}
|
||||
|
||||
public bool SaveUser(string userName, string displayName, string password)
|
||||
{
|
||||
var salt = LgbCryptography.GenerateSalt();
|
||||
var pwd = LgbCryptography.ComputeHash(password, salt);
|
||||
var user = FreeSql.Select<User>().Where(s => s.UserName == userName).ToOne();
|
||||
bool ret = default;
|
||||
if (user == null)
|
||||
{
|
||||
// 开始事务
|
||||
FreeSql.Transaction(() =>
|
||||
{
|
||||
user = new User()
|
||||
{
|
||||
Id = "0",
|
||||
ApprovedBy = "System",
|
||||
ApprovedTime = DateTime.Now,
|
||||
DisplayName = "手机用户",
|
||||
UserName = userName,
|
||||
Icon = "default.jpg",
|
||||
Description = "系统默认创建",
|
||||
PassSalt = salt,
|
||||
Password = pwd
|
||||
};
|
||||
FreeSql.Insert(user).ExecuteAffrows();
|
||||
// 授权 Default 角色
|
||||
FreeSql.Ado.ExecuteNonQuery("insert into UserRole (UserID, RoleID) select ID, (select ID from Roles where RoleName = 'Default') RoleId from Users where UserName = @userName", new { userName });
|
||||
ret = true;
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
user.DisplayName = displayName;
|
||||
user.PassSalt = salt;
|
||||
user.Password = pwd;
|
||||
FreeSql.Update<User>(user);
|
||||
ret = true;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
public bool SaveUsersByGroupId(string? groupId, IEnumerable<string> userIds)
|
||||
{
|
||||
var ret = false;
|
||||
try
|
||||
{
|
||||
FreeSql.Transaction(() =>
|
||||
{
|
||||
FreeSql.Ado.ExecuteNonQuery("delete from UserGroup where GroupId = @groupId", new { groupId });
|
||||
FreeSql.Insert(userIds.Select(g => new UserGroup { UserID = g, GroupID = groupId })).ExecuteAffrows();
|
||||
});
|
||||
|
||||
ret = true;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
public bool SaveUsersByRoleId(string? roleId, IEnumerable<string> userIds)
|
||||
{
|
||||
var ret = false;
|
||||
try
|
||||
{
|
||||
FreeSql.Transaction(() =>
|
||||
{
|
||||
FreeSql.Ado.ExecuteNonQuery("delete from UserRole where RoleID = @roleId", new { roleId });
|
||||
FreeSql.Insert(userIds.Select(g => new UserRole { UserID = g, RoleID = roleId })).ExecuteAffrows();
|
||||
ret = true;
|
||||
});
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="phone"></param>
|
||||
/// <param name="code"></param>
|
||||
/// <param name="appId"></param>
|
||||
/// <param name="roles"></param>
|
||||
/// <returns></returns>
|
||||
public bool TryCreateUserByPhone(string phone, string code, string appId, ICollection<string> roles)
|
||||
{
|
||||
var ret = false;
|
||||
try
|
||||
{
|
||||
var salt = LgbCryptography.GenerateSalt();
|
||||
var pwd = LgbCryptography.ComputeHash(code, salt);
|
||||
var user = FreeSql.Select<User>().Where(s => s.UserName == phone).ToOne();
|
||||
if (user == null)
|
||||
{
|
||||
FreeSql.Transaction(() =>
|
||||
{
|
||||
user = new User()
|
||||
{
|
||||
ApprovedBy = "Mobile",
|
||||
ApprovedTime = DateTime.Now,
|
||||
DisplayName = "手机用户",
|
||||
UserName = phone,
|
||||
Icon = "default.jpg",
|
||||
Description = "手机用户",
|
||||
PassSalt = salt,
|
||||
Password = LgbCryptography.ComputeHash(code, salt),
|
||||
App = appId
|
||||
};
|
||||
FreeSql.Insert(user).ExecuteAffrows();
|
||||
// Authorization
|
||||
var roleIds = FreeSql.Ado.Query<string>("select ID from Roles where RoleName in (@roles)", new { roles });
|
||||
FreeSql.Insert(roleIds.Select(g => new UserRole { RoleID = g, UserID = user.Id }));
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
user.PassSalt = salt;
|
||||
user.Password = pwd;
|
||||
FreeSql.Update<User>(user).ExecuteAffrows();
|
||||
}
|
||||
ret = true;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
public bool SaveApp(string userName, string app)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool ChangePassword(string userName, string password, string newPassword)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool SaveDisplayName(string userName, string displayName)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool SaveTheme(string userName, string theme)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool SaveLogo(string userName, string? logo)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="BootstrapBlazor" Version="6.2.9-beta07" />
|
||||
<PackageReference Include="SqlSugarCore" Version="5.0.5.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\BootstrapAdmin.Web.Core\BootstrapAdmin.Web.Core.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -0,0 +1,47 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using BootStarpAdmin.DataAccess.SqlSugar.Service;
|
||||
using BootstrapBlazor.Components;
|
||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
using SqlSugar;
|
||||
|
||||
namespace Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
/// <summary>
|
||||
/// FreeSql ORM 注入服务扩展类
|
||||
/// </summary>
|
||||
public static class ServiceCollectionExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// 注入 FreeSql 数据服务类
|
||||
/// </summary>
|
||||
/// <param name="services"></param>
|
||||
/// <param name="sqlSugarBuilder"></param>
|
||||
/// <returns></returns>
|
||||
public static IServiceCollection AddSqlSugar(this IServiceCollection services, Action<IServiceProvider, ConnectionConfig> sqlSugarBuilder)
|
||||
{
|
||||
services.TryAddSingleton<ISqlSugarClient>(provider =>
|
||||
{
|
||||
var builder = new ConnectionConfig();
|
||||
builder.IsAutoCloseConnection = true;
|
||||
sqlSugarBuilder(provider, builder);
|
||||
return new SqlSugarClient(builder);
|
||||
});
|
||||
|
||||
// 增加数据服务
|
||||
services.AddSingleton(typeof(IDataService<>), typeof(DefaultDataService<>));
|
||||
|
||||
// 增加业务服务
|
||||
//services.AddSingleton<IApp, AppService>();
|
||||
//services.AddSingleton<IDict, DictService>();
|
||||
//services.AddSingleton<IException, ExceptionService>();
|
||||
//services.AddSingleton<IGroup, GroupService>();
|
||||
//services.AddSingleton<ILogin, LoginService>();
|
||||
//services.AddSingleton<INavigation, NavigationService>();
|
||||
//services.AddSingleton<IRole, RoleService>();
|
||||
//services.AddSingleton<IUser, UserService>();
|
||||
return services;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
namespace BootStarpAdmin.DataAccess.SqlSugar.Extensions;
|
||||
|
||||
static class SqlSugarExtensions
|
||||
{
|
||||
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
using SqlSugar;
|
||||
|
||||
namespace BootStarpAdmin.DataAccess.SqlSugar.Service;
|
||||
|
||||
class DefaultDataService<TModel> : DataServiceBase<TModel> where TModel : class, new()
|
||||
{
|
||||
private ISqlSugarClient Client { get; }
|
||||
|
||||
public DefaultDataService(ISqlSugarClient client) => Client = client;
|
||||
|
||||
/// <summary>
|
||||
/// 删除方法
|
||||
/// </summary>
|
||||
/// <param name="models"></param>
|
||||
/// <returns></returns>
|
||||
public override async Task<bool> DeleteAsync(IEnumerable<TModel> models)
|
||||
{
|
||||
await Client.Deleteable<TModel>(models).ExecuteCommandAsync();
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存方法
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <param name="changedType"></param>
|
||||
/// <returns></returns>
|
||||
public override async Task<bool> SaveAsync(TModel model, ItemChangedType changedType)
|
||||
{
|
||||
if (changedType == ItemChangedType.Add)
|
||||
{
|
||||
await Client.Insertable<TModel>(model).ExecuteCommandAsync();
|
||||
}
|
||||
else if (changedType == ItemChangedType.Update)
|
||||
{
|
||||
await Client.Updateable<TModel>(model).ExecuteCommandAsync();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override Task<QueryData<TModel>> QueryAsync(QueryPageOptions option)
|
||||
{
|
||||
var ret = new QueryData<TModel>()
|
||||
{
|
||||
IsSorted = true,
|
||||
IsFiltered = true,
|
||||
IsSearch = true,
|
||||
IsAdvanceSearch = option.AdvanceSearchs.Any() || option.CustomerSearchs.Any()
|
||||
};
|
||||
if (option.IsPage)
|
||||
{
|
||||
var count = 0;
|
||||
ret.Items = Client.Queryable<TModel>()
|
||||
.ToPageList(option.PageIndex, option.PageItems, ref count);
|
||||
ret.TotalCount = count;
|
||||
}
|
||||
else
|
||||
{
|
||||
ret.Items = Client.Queryable<TModel>()
|
||||
.ToList();
|
||||
}
|
||||
return Task.FromResult(ret);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -0,0 +1,38 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using BootstrapAdmin.Caching.Services;
|
||||
using Microsoft.Extensions.Caching.Memory;
|
||||
|
||||
namespace BootstrapAdmin.Caching;
|
||||
|
||||
/// <summary>
|
||||
/// 缓存管理类
|
||||
/// </summary>
|
||||
public static class CacheManager
|
||||
{
|
||||
[NotNull]
|
||||
private static ICacheManager? Cache { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 由服务调用
|
||||
/// </summary>
|
||||
/// <param name="cache"></param>
|
||||
internal static void Init(ICacheManager cache) => Cache = cache;
|
||||
|
||||
/// <summary>
|
||||
/// 获得或者新建数据
|
||||
/// </summary>
|
||||
/// <typeparam name="TItem"></typeparam>
|
||||
/// <param name="key"></param>
|
||||
/// <param name="valueFactory"></param>
|
||||
/// <returns></returns>
|
||||
public static TItem GetOrAdd<TItem>(string key, Func<ICacheEntry, TItem> valueFactory) => Cache.GetOrAdd(key, valueFactory);
|
||||
|
||||
/// <summary>
|
||||
/// 清除指定键值缓存项
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
public static void Clear(string? key = null) => Cache.Clear(key);
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using BootstrapAdmin.Caching;
|
||||
using BootstrapAdmin.Caching.Services;
|
||||
using Microsoft.Extensions.Caching.Memory;
|
||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
|
||||
namespace Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static class ServiceCollectionExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// 注入 ICacheManager 服务
|
||||
/// </summary>
|
||||
/// <param name="services"></param>
|
||||
/// <returns></returns>
|
||||
public static IServiceCollection AddCacheManager(this IServiceCollection services)
|
||||
{
|
||||
services.AddMemoryCache();
|
||||
services.TryAddSingleton<ICacheManager>(provider =>
|
||||
{
|
||||
var cache = provider.GetRequiredService<IMemoryCache>();
|
||||
var cacheManager = new DefaultCacheManager(cache);
|
||||
CacheManager.Init(cacheManager);
|
||||
return cacheManager;
|
||||
});
|
||||
return services;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Microsoft.Extensions.Caching.Memory;
|
||||
|
||||
namespace BootstrapAdmin.Caching;
|
||||
|
||||
/// <summary>
|
||||
/// CacheManager 接口类
|
||||
/// </summary>
|
||||
public interface ICacheManager
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="key"></param>
|
||||
/// <param name="factory"></param>
|
||||
/// <returns></returns>
|
||||
T GetOrAdd<T>(string key, Func<ICacheEntry, T> factory);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="key"></param>
|
||||
/// <param name="factory"></param>
|
||||
/// <returns></returns>
|
||||
Task<T> GetOrAddAsync<T>(string key, Func<ICacheEntry, Task<T>> factory);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
void Clear(string? key = null);
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Microsoft.Extensions.Caching.Memory;
|
||||
using Microsoft.Extensions.Primitives;
|
||||
|
||||
namespace BootstrapAdmin.Caching.Services;
|
||||
|
||||
class DefaultCacheManager : ICacheManager
|
||||
{
|
||||
[NotNull]
|
||||
private IMemoryCache? Cache { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DefaultCacheManager(IMemoryCache cache) => Cache = cache;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="key"></param>
|
||||
/// <param name="factory"></param>
|
||||
/// <returns></returns>
|
||||
public T GetOrAdd<T>(string key, Func<ICacheEntry, T> factory) => Cache.GetOrCreate(key, entry =>
|
||||
{
|
||||
HandlerEntry(key, entry);
|
||||
return factory(entry);
|
||||
});
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="key"></param>
|
||||
/// <param name="factory"></param>
|
||||
/// <returns></returns>
|
||||
public Task<T> GetOrAddAsync<T>(string key, Func<ICacheEntry, Task<T>> factory) => Cache.GetOrCreate(key, entry =>
|
||||
{
|
||||
HandlerEntry(key, entry);
|
||||
return factory(entry);
|
||||
});
|
||||
|
||||
private static void HandlerEntry(string key, ICacheEntry entry, IChangeToken? token = null)
|
||||
{
|
||||
if (token != null)
|
||||
{
|
||||
entry.AddExpirationToken(token);
|
||||
}
|
||||
|
||||
// 内置缓存策略 缓存相对时间 10 分钟
|
||||
if (entry.AbsoluteExpiration == null && entry.SlidingExpiration == null && !entry.ExpirationTokens.Any())
|
||||
{
|
||||
#if DEBUG
|
||||
entry.SlidingExpiration = TimeSpan.FromMilliseconds(100);
|
||||
#else
|
||||
entry.SlidingExpiration = TimeSpan.FromMinutes(10);
|
||||
#endif
|
||||
}
|
||||
entry.RegisterPostEvictionCallback((key, value, reason, state) =>
|
||||
{
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
public void Clear(string? key)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(key))
|
||||
{
|
||||
Cache.Remove(key);
|
||||
}
|
||||
else if (Cache is MemoryCache c)
|
||||
{
|
||||
c.Compact(100);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="BootstrapBlazor" Version="6.2.9-beta07" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.1" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\BootstrapAdmin.Caching\BootstrapAdmin.Caching.csproj" />
|
||||
<ProjectReference Include="..\BootstrapAdmin.Web.Core\BootstrapAdmin.Web.Core.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -0,0 +1,95 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using BootstrapAdmin.DataAccess.EFCore.Models;
|
||||
using BootstrapAdmin.DataAccess.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace BootstrapAdmin.DataAccess.EFCore
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class BootstrapAdminContext : DbContext
|
||||
{
|
||||
/// <summary>
|
||||
/// 构造函数
|
||||
/// </summary>
|
||||
/// <param name="options"></param>
|
||||
public BootstrapAdminContext(DbContextOptions<BootstrapAdminContext> options) : base(options)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[NotNull]
|
||||
public DbSet<Dict>? Dicts { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[NotNull]
|
||||
public DbSet<User>? Users { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[NotNull]
|
||||
public DbSet<Role>? Roles { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[NotNull]
|
||||
public DbSet<UserRole>? UserRole { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[NotNull]
|
||||
public DbSet<Navigation>? Navigations { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[NotNull]
|
||||
public DbSet<NavigationRole>? NavigationRole { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[NotNull]
|
||||
public DbSet<Group>? Groups { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[NotNull]
|
||||
public DbSet<UserGroup>? UserGroup { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[NotNull]
|
||||
public DbSet<RoleGroup>? RoleGroup { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[NotNull]
|
||||
public DbSet<RoleApp>? RoleApp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="modelBuilder"></param>
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
base.OnModelCreating(modelBuilder);
|
||||
EntityConfiguration.Configure(modelBuilder);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using BootstrapAdmin.DataAccess.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.ChangeTracking;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Microsoft.EntityFrameworkCore.ValueGeneration;
|
||||
|
||||
namespace BootstrapAdmin.DataAccess.EFCore;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static class EntityConfiguration
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="builder"></param>
|
||||
public static void Configure(this ModelBuilder builder)
|
||||
{
|
||||
var converter = new ValueConverter<string?, int>(
|
||||
v => Convert.ToInt32(v),
|
||||
v => v.ToString(),
|
||||
new ConverterMappingHints(valueGeneratorFactory: (p, t) => new GuidStringGenerator()));
|
||||
|
||||
builder.Entity<User>().ToTable("Users");
|
||||
builder.Entity<User>().Ignore(u => u.Period);
|
||||
builder.Entity<User>().Ignore(u => u.NewPassword);
|
||||
builder.Entity<User>().Ignore(u => u.ConfirmPassword);
|
||||
builder.Entity<User>().Ignore(u => u.IsReset);
|
||||
builder.Entity<User>().Property(s => s.Id).HasConversion(converter).ValueGeneratedOnAdd();
|
||||
|
||||
builder.Entity<Role>().ToTable("Roles");
|
||||
builder.Entity<Role>().Property(s => s.Id).HasConversion(converter).ValueGeneratedOnAdd();
|
||||
|
||||
builder.Entity<Navigation>().ToTable("Navigations");
|
||||
builder.Entity<Navigation>().Property(s => s.Id).HasConversion(converter!).ValueGeneratedOnAdd();
|
||||
builder.Entity<Navigation>().Ignore(s => s.HasChildren);
|
||||
|
||||
builder.Entity<Dict>().ToTable("Dicts");
|
||||
builder.Entity<Dict>().Property(s => s.Id).HasConversion(converter).ValueGeneratedOnAdd();
|
||||
|
||||
builder.Entity<Group>().ToTable("Groups");
|
||||
builder.Entity<Group>().Property(s => s.Id).HasConversion(converter).ValueGeneratedOnAdd();
|
||||
|
||||
builder.Entity<Error>().ToTable("Exceptions");
|
||||
builder.Entity<LoginLog>().ToTable("LoginLogs");
|
||||
builder.Entity<Trace>().ToTable("Traces");
|
||||
}
|
||||
}
|
||||
|
||||
internal class GuidStringGenerator : ValueGenerator
|
||||
{
|
||||
|
||||
public override bool GeneratesTemporaryValues => false;
|
||||
|
||||
protected override object? NextValue(EntityEntry entry) => "0";
|
||||
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using BootstrapAdmin.DataAccess.EFCore;
|
||||
using BootstrapAdmin.DataAccess.EFCore.Services;
|
||||
using BootstrapAdmin.Web.Core;
|
||||
using BootstrapBlazor.Components;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static class ServicesExtensions
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="services"></param>
|
||||
/// <param name="optionConfigure"></param>
|
||||
/// <param name="lifetime"></param>
|
||||
/// <returns></returns>
|
||||
public static IServiceCollection AddEFCoreDataAccessServices(this IServiceCollection services, Action<IServiceProvider, DbContextOptionsBuilder> optionConfigure, ServiceLifetime lifetime = ServiceLifetime.Singleton)
|
||||
{
|
||||
services.AddDbContextFactory<BootstrapAdminContext>(optionConfigure, lifetime);
|
||||
|
||||
services.AddServices();
|
||||
return services;
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="services"></param>
|
||||
/// <param name="optionConfigure"></param>
|
||||
/// <param name="lifetime"></param>
|
||||
/// <returns></returns>
|
||||
public static IServiceCollection AddEFCoreDataAccessServices(this IServiceCollection services, Action<DbContextOptionsBuilder> optionConfigure, ServiceLifetime lifetime = ServiceLifetime.Singleton)
|
||||
{
|
||||
services.AddDbContextFactory<BootstrapAdminContext>(optionConfigure, lifetime);
|
||||
|
||||
services.AddServices();
|
||||
return services;
|
||||
}
|
||||
|
||||
private static IServiceCollection AddServices(this IServiceCollection services)
|
||||
{
|
||||
// 增加数据服务
|
||||
services.AddSingleton(typeof(IDataService<>), typeof(DefaultDataService<>));
|
||||
// 增加缓存服务
|
||||
services.AddCacheManager();
|
||||
services.AddSingleton<INavigation, NavigationService>();
|
||||
services.AddSingleton<IDict, DictService>();
|
||||
services.AddSingleton<IUser, UserService>();
|
||||
services.AddSingleton<IRole, RoleService>();
|
||||
services.AddSingleton<IGroup, GroupService>();
|
||||
services.AddSingleton<ILogin, LoginService>();
|
||||
return services;
|
||||
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue