Compare commits
1453 Commits
main
...
fix-cjy-ad
| Author | SHA1 | Date | |
|---|---|---|---|
| 57e7629e2f | |||
| 7ffede212d | |||
| 1d36eea47c | |||
| 4773caf295 | |||
| 54f4b5d62e | |||
| 015ed265e6 | |||
| 93502cb589 | |||
| 8c2299ff38 | |||
| 68de4b6c54 | |||
| da49041b5b | |||
| 60beab01be | |||
| 46b7762471 | |||
| bb326bfe0d | |||
| 0bdf0f9648 | |||
| f68e099d6e | |||
| ca4a5772d2 | |||
| 6690717e77 | |||
| 762fdd4b05 | |||
| 4e4ab14d5a | |||
| 41f1a807a9 | |||
| 81c28c0bd4 | |||
| cf2e4067b9 | |||
| cf709742b2 | |||
| 9fb4b01590 | |||
|
|
47699dec97 | ||
|
|
16d6d4bd29 | ||
| 38117c3a08 | |||
| fee7728da9 | |||
|
|
ee190b4a96 | ||
|
|
63e3991f23 | ||
| fbe32fb485 | |||
| d0d5cd50a2 | |||
|
|
bfd2dcd3cd | ||
| 9ba37adb6b | |||
| 2aa0a73041 | |||
| 084df09c9b | |||
| 1d2ba64a22 | |||
| be1b0d24ec | |||
| 51f0d2b687 | |||
| 748ceb5d63 | |||
| 35bc4a04c3 | |||
| d92d4199c7 | |||
| c82f137ac1 | |||
| 15338ca7c8 | |||
| 5d27d502c8 | |||
|
|
529e5e3f3c | ||
|
|
20af43c9e2 | ||
|
|
41880fd840 | ||
|
|
e6af927159 | ||
| e0ff2b542a | |||
| 3940e5f9eb | |||
|
|
63e772596c | ||
|
|
4e37040f9e | ||
|
|
8962c73bfb | ||
|
|
28f1a9326d | ||
|
|
43b93c5443 | ||
|
|
cf4af5a71a | ||
|
|
5ded15fbb0 | ||
|
|
c5e36a2ae9 | ||
|
|
0a7e169a7e | ||
|
|
94a1c30acd | ||
|
|
566773b0f6 | ||
|
|
e1271f7caf | ||
| e767e47277 | |||
| 7cca30c2a5 | |||
| d3ae7e0b85 | |||
|
|
38c1667614 | ||
|
|
bdecb8a05f | ||
|
|
531fddc629 | ||
|
|
4a2263fba9 | ||
|
|
13ea22fae8 | ||
| f0253f9805 | |||
| 48aa714706 | |||
| c85fbb0b81 | |||
| e323325a57 | |||
| bf09640ff0 | |||
| 54b15344e0 | |||
|
|
3e454b4348 | ||
| 1344e1da8b | |||
|
|
3befb95827 | ||
|
|
6f86e07650 | ||
|
|
b4e95bc134 | ||
|
|
62c8cb0fa1 | ||
|
|
b047ed5056 | ||
|
|
717ae05cc8 | ||
| 573ad1b147 | |||
| a947556202 | |||
| 5a89ad139f | |||
| 8197ac4b57 | |||
| a0ad992ab1 | |||
|
|
5eb27a0b49 | ||
|
|
25905062f6 | ||
| 62fa35b029 | |||
| 0802c372b0 | |||
|
|
b0c725a68b | ||
| bb9c22e1aa | |||
|
|
368078c543 | ||
|
|
982558afe3 | ||
| 103fe91e8f | |||
|
|
e9d67c5cdc | ||
|
|
a9201e794c | ||
|
|
0cb451338c | ||
|
|
6110dce131 | ||
|
|
267b0d6ab8 | ||
|
|
34810300da | ||
|
|
9704208f9d | ||
|
|
b385b83824 | ||
|
|
63e57f1140 | ||
|
|
59f45258eb | ||
|
|
802510ed45 | ||
|
|
81346d611a | ||
|
|
cba570d832 | ||
|
|
6031afe227 | ||
|
|
d56ed7577b | ||
|
|
c16c41f65c | ||
|
|
48a4539f4b | ||
|
|
1431646900 | ||
|
|
638ff85367 | ||
|
|
350259c208 | ||
|
|
652e23e1e9 | ||
|
|
33d9193f1d | ||
|
|
3d40d77080 | ||
|
|
24c73d39a5 | ||
| 1096dde762 | |||
| 71420b3c1c | |||
| afc0007984 | |||
| f39ca2179d | |||
|
|
e3075e48b9 | ||
|
|
a1d75feb94 | ||
|
|
e4c21ef020 | ||
|
|
8941f59432 | ||
|
|
3d7b70840a | ||
|
|
1a069a7136 | ||
|
|
1b06517403 | ||
|
|
7df053aa39 | ||
|
|
3cd8deb84b | ||
|
|
b18c9d6a8f | ||
|
|
91cd370d27 | ||
|
|
b47b872ab4 | ||
|
|
fa67b49c53 | ||
|
|
faf4a85e2e | ||
|
|
1ead1952a1 | ||
|
|
3c0ddfe06b | ||
|
|
ac776576f2 | ||
|
|
3a156b08f0 | ||
|
|
bcbddbec6f | ||
|
|
a8e79d0877 | ||
| f4f75a06ca | |||
| 579fcb3667 | |||
| c9543cfad2 | |||
| e5dedcaf91 | |||
|
|
dbb8cd4615 | ||
|
|
e85de27321 | ||
| b62d412022 | |||
| 7373026f48 | |||
|
|
c9e7850b8a | ||
|
|
29948203d6 | ||
|
|
101dc38ed8 | ||
|
|
7dee667a97 | ||
|
|
a5dcdf2a75 | ||
|
|
47b103a8c4 | ||
|
|
275b94d555 | ||
|
|
0d54572111 | ||
|
|
3f3344ee5b | ||
|
|
bc1ff822eb | ||
|
|
4e97d3903b | ||
|
|
7391e4c845 | ||
|
|
b64800aa49 | ||
|
|
5a8a75b8ed | ||
| 5e762104d9 | |||
| e7f652371b | |||
| 61dbcd23ba | |||
|
|
9f3d4fab99 | ||
|
|
46b9225298 | ||
| 28ea5ec412 | |||
|
|
fdf6a967bf | ||
| c87c1be186 | |||
| 8c18af01a8 | |||
| c8c2202538 | |||
| e57dd03269 | |||
| 6f1277ec9b | |||
| f6c5f53002 | |||
| dee2b9d50c | |||
| 248d8f50ef | |||
| def4c797f2 | |||
| ba19e65e7f | |||
| 8e7a3643d2 | |||
| 61aa8af162 | |||
| df8fbfbc43 | |||
| a2703f907e | |||
| 6619c99be7 | |||
|
|
60a01e996a | ||
| f7ba1e75ca | |||
| 80941aacfb | |||
| 971c3a8ea4 | |||
| 55267abc89 | |||
| 08e3bcd658 | |||
| 2de4164875 | |||
| ebd1b52326 | |||
| 2eb82a21cb | |||
| 84ba139fc8 | |||
| 2e6c77cf88 | |||
| e57c664ec0 | |||
|
|
ab6349d438 | ||
| a5ffa3e8b5 | |||
| 8eb2476f95 | |||
| e59c4f5487 | |||
| df0df7b652 | |||
|
|
e4e2e303ea | ||
|
|
973c95c76d | ||
| c02af4d3ae | |||
|
|
b05a300aa9 | ||
| 74bc61a51b | |||
|
|
0e79282724 | ||
|
|
bc27434bed | ||
|
|
c0d8c07a90 | ||
| 254d85ced3 | |||
|
|
8371c5944a | ||
| 5bb04327d4 | |||
| 83285387e3 | |||
| 7c45999a40 | |||
| 2929e03eaf | |||
| 4e69ab9731 | |||
| c6cf13465c | |||
| e4c88feaef | |||
| 12870fbf94 | |||
| 7564af8220 | |||
|
|
abcd4609c7 | ||
| 451fe4b2e2 | |||
| 4ce735d4de | |||
| 889acc4e78 | |||
| c6f4385991 | |||
| 82fd06139a | |||
| c0ea800511 | |||
| 5a8e155807 | |||
| 6c7e27ce78 | |||
| 294f3b8d95 | |||
| 7ba69a3afd | |||
| ea7134053c | |||
| e7f90a304b | |||
| bd5eb45371 | |||
| d20a124e14 | |||
| cebf10a3e6 | |||
| cccee7f86e | |||
| 1277e0da8d | |||
| adf3b5ee89 | |||
| 5df90b156e | |||
| ffdc047d15 | |||
| acaa112c5b | |||
| 89bf59d878 | |||
| 5179c9e597 | |||
| 6845ea1736 | |||
| 861bafc837 | |||
| 351709d08e | |||
| b9b2ccbe0b | |||
| 11c8d63789 | |||
| 28934436fe | |||
| c96bb04e55 | |||
| c273a2650c | |||
| 193f6cd226 | |||
| c8397bcfe9 | |||
| 136af31283 | |||
| 91f7b54581 | |||
| fb2c5d0405 | |||
| 6381076912 | |||
| 7227f1b05e | |||
| bd0722bd86 | |||
| eec3c75c75 | |||
| 4d8e91822f | |||
| 684e324238 | |||
| c29f26e582 | |||
| 3806c57e90 | |||
| e9fa67ae00 | |||
| e2dadb5bc9 | |||
| 4d82fb6f96 | |||
| ffaf09f4e2 | |||
| 445eb6a751 | |||
|
|
f10c36d9fa | ||
|
|
e5782e4e6e | ||
|
|
6106253c98 | ||
| 637b12d90f | |||
| ee9bbde2a7 | |||
| fbf649b8b1 | |||
| 22de3d0ce9 | |||
| 58aca68cd8 | |||
| 3180c3c476 | |||
| 18fd0e56ce | |||
| 3c11449f6d | |||
| 9050f98e67 | |||
| a7b2de6ed9 | |||
| 4f9a38693d | |||
| a2ea3e1143 | |||
| 46eef08995 | |||
| 5bc1b12d9c | |||
| bd2f776a7f | |||
| 557e16a706 | |||
| 3c6705a9b0 | |||
| 7bb508ab4a | |||
| 564007d45d | |||
| 1922ab583e | |||
| bc9e8b62db | |||
| 07d2925278 | |||
| 549bdb0c66 | |||
| 10662c9ad3 | |||
| 3bb30bb087 | |||
| ba3c821ff1 | |||
| 192a6643d1 | |||
| 6a2e27f39e | |||
|
|
9b0fbcae61 | ||
| 196c244f8e | |||
| c5b86b862f | |||
| 4e2bb84419 | |||
| 817ded18c7 | |||
| a6271840ef | |||
| d097e9a20e | |||
| 8ecead8ac8 | |||
| b7e7b44741 | |||
| 5f2089fa53 | |||
| e60ca9c65f | |||
| 11e22d6e5f | |||
| a2cd6774b1 | |||
| b952752e9d | |||
| a2d46c4463 | |||
| 222b294101 | |||
| 9170c77e32 | |||
|
|
ab79cd8833 | ||
|
|
76a08f9ad8 | ||
|
|
8688bd6abd | ||
| e9cd6876c2 | |||
| 9bd8e67116 | |||
| a4bff4284a | |||
| d811235da5 | |||
| bdf3fa6144 | |||
| dfb2e5e037 | |||
| 6b52775913 | |||
| 9d1adef700 | |||
|
|
8d36aeb751 | ||
| 0226b0af12 | |||
| ae76287088 | |||
| 2425920d34 | |||
| 13fa87ec2b | |||
| fbf24995b8 | |||
| 145935ba04 | |||
| a3e617a87f | |||
|
|
a9dd32e450 | ||
| 8fa9f89db9 | |||
|
|
b474856f35 | ||
|
|
0fd6319e34 | ||
| beac4f775d | |||
|
|
1886935f4d | ||
| edebd161a1 | |||
| f05e792b83 | |||
| e6ca737fb1 | |||
| 49caaa73c6 | |||
| 2156a6fb59 | |||
|
|
dca004ecc6 | ||
| 79f37993c1 | |||
| ff3c5c0312 | |||
| b079b597c3 | |||
|
|
6ab28792ec | ||
| b7f8524861 | |||
| 0881472841 | |||
| 4a3be6bdd4 | |||
|
|
c5f7903c6c | ||
|
|
065db45cdc | ||
|
|
3d67be4e09 | ||
|
|
e75e6b7ce9 | ||
| 789af8f0db | |||
| 09f598a1f4 | |||
| cf6a932dbb | |||
| a6e5d38a43 | |||
| e5362cb262 | |||
| e2e4df84fc | |||
| 26c59ee54c | |||
| 17215e758b | |||
|
|
f23e68f948 | ||
|
|
4c8db9bec8 | ||
| 71aecaf454 | |||
| d2b7064dc0 | |||
| c3eabff227 | |||
| 48e55a7d32 | |||
| 627b08f0cd | |||
| fa069d0d7d | |||
| c019547992 | |||
| d189ce2eae | |||
|
|
ba402065dd | ||
| ec2de470c4 | |||
| c53ec47ac7 | |||
| 71c3e61b65 | |||
|
|
13b66debf3 | ||
| 869817f43c | |||
| e54af0d278 | |||
| 266e4a6b94 | |||
| 628d2b64fc | |||
| 9c6808ec53 | |||
| 7833d399fc | |||
|
|
62c0bfcf3e | ||
|
|
e2d8114144 | ||
| a3485401f5 | |||
| f6be7d7c82 | |||
| 156459cf32 | |||
| 66287ee0d0 | |||
| 1714702304 | |||
| c69f7ddba8 | |||
| df06768936 | |||
| 771ec86506 | |||
|
|
29d6a2e022 | ||
| b6ed2e4eac | |||
|
|
34aea49f68 | ||
| 5f3a8b6906 | |||
| 1f7b864434 | |||
| 30591a3014 | |||
| 73661824e7 | |||
|
|
5e94f5efb8 | ||
|
|
5e25b846cb | ||
| ceb8a372ff | |||
| 26b406f136 | |||
| 82db383a96 | |||
|
|
0bd919e3f0 | ||
| b14d665f61 | |||
| 4797a03196 | |||
|
|
e340c8beab | ||
|
|
f60487123e | ||
| 6e78b8fa4e | |||
| 4192424b3c | |||
|
|
9820cabd21 | ||
|
|
d040842181 | ||
| cfde535ac3 | |||
| 4e56dd50b1 | |||
|
|
a81a85998b | ||
| f66fe79f20 | |||
| 685930523b | |||
| 10957d6ca7 | |||
| 2ac7a2a56c | |||
| 52ba00be76 | |||
| 67ded6e19a | |||
| d5460ef912 | |||
|
|
b981dcbede | ||
|
|
3dcaae2dca | ||
|
|
c21c308be5 | ||
| 3086a9fa52 | |||
| 2e47045d31 | |||
| fb93b0d227 | |||
| 57c0dcc019 | |||
| 8169a3ece8 | |||
| 0cdb696c9a | |||
|
|
49c5fb6196 | ||
|
|
b6de8e0ee9 | ||
|
|
8efd9b6296 | ||
| 3b6d843d12 | |||
| 4840f86791 | |||
| ebdd4aa6f0 | |||
| fe5a648441 | |||
|
|
28d2e2f06c | ||
| ad11e9d61e | |||
| 3ec3bf097b | |||
|
|
f1a094bb6d | ||
| 639435a6f4 | |||
| ac46520b88 | |||
|
|
1612144609 | ||
|
|
96e0422038 | ||
|
|
b1223375b5 | ||
|
|
6d9c515a7b | ||
| 580c532c2f | |||
|
|
f5db257a20 | ||
|
|
daad39d53c | ||
|
|
bf4ccd87dd | ||
|
|
b52190f021 | ||
|
|
4b581cce83 | ||
| 7ac9106589 | |||
| f505603710 | |||
| a888868e5f | |||
| b9406c7f8a | |||
|
|
2a38ed44b0 | ||
| d1269f9ec1 | |||
| 5b6e72ee96 | |||
| 236f3c0203 | |||
| d36f923418 | |||
| b33c2af027 | |||
| 73c164ca63 | |||
| cf3e9e10c5 | |||
| 51fe54a99d | |||
| bfbaed3895 | |||
| 5cafeeaf3a | |||
| 346c76f307 | |||
| ad3794a1dd | |||
| 9924e74633 | |||
| decf8ded5e | |||
| 3ca58286b1 | |||
| 6b575dac0d | |||
| 2465eaf56f | |||
| 8319451cb4 | |||
| 5b489327e0 | |||
| 039852b9a7 | |||
| 445a81e198 | |||
| 539aee6fab | |||
| 7d1aee048a | |||
| 1de1540b15 | |||
| 51b981b10c | |||
| 06bc301d80 | |||
|
|
7d8f65fe07 | ||
| 9574f77eb7 | |||
| 4e9d043bd1 | |||
|
|
df7b7183cf | ||
|
|
16929ac88d | ||
| 020de78e1b | |||
| 6032b977b1 | |||
| e81b30ac6c | |||
| 792a07057c | |||
| d5746221fb | |||
| ae0639a0de | |||
| f017aaa32e | |||
| 77c71b135d | |||
| 2c0cc0a075 | |||
| 37e05c5e70 | |||
| a8ccc3ba74 | |||
| f490c4e42e | |||
| 4494e80665 | |||
| 4587bcb73c | |||
| b8258c611f | |||
| 384d67f56d | |||
| 1a4d3224a1 | |||
| 5e17ed3890 | |||
| 943a3f58b7 | |||
| dce69e150b | |||
| fa68bf9ed4 | |||
| d3e91575f0 | |||
| 6aac31847b | |||
|
|
6e64748577 | ||
| 2b493c1647 | |||
| 058ed862e0 | |||
| bf48f09be0 | |||
| b2c0de3ef9 | |||
| 5e42dd2b7c | |||
| 498bdbebc2 | |||
| 751ccce50b | |||
| c4ef8becb2 | |||
| 0f0df7b23c | |||
| 7fbf05349e | |||
| 9538fe3dd0 | |||
| 1aa0967f5b | |||
| 60eac91c61 | |||
| c48849f1c8 | |||
|
|
0b3344e367 | ||
| 9b7eb1c0b6 | |||
| f5d17f6821 | |||
| 539609d264 | |||
| a3a737ba88 | |||
| 5711e56111 | |||
| 49fa119e80 | |||
| beec2958f2 | |||
| 35d3a1f0ad | |||
| 2e52be7d9b | |||
|
|
d8aeacb3a8 | ||
| d5cb145bdd | |||
| ad788732be | |||
| 1f81b6da70 | |||
| b48b74abb4 | |||
| 2109c916e8 | |||
| d613c33322 | |||
| 87f9195baf | |||
| fcbbdd8bba | |||
| 4248cc091e | |||
| cab082a94a | |||
| 4d13d5c1ab | |||
| 1a460e4dac | |||
| 3983a27d4d | |||
| a04dae089e | |||
| 0ce34d54a1 | |||
| c6568fb76b | |||
| fe2d1fc250 | |||
| 06fde11152 | |||
| 3cfc2e46e6 | |||
| 291eb674f3 | |||
| 15d11999c2 | |||
| bc42315df6 | |||
| c1ba416722 | |||
| 2a6f855d27 | |||
| 5cd2b0e378 | |||
| ab8e20f8f3 | |||
| 4e4a432e9a | |||
| a06f8d7ccc | |||
| 5f44a81c55 | |||
| af825ab37d | |||
| 7d6777c332 | |||
| 7b60c31a7f | |||
| bef316c85b | |||
| e060bd78e3 | |||
| bc3587f3b1 | |||
| 7223c24d5b | |||
| 32737d322a | |||
|
|
60b20b6328 | ||
| 42f247efe7 | |||
| 9cfa4316f0 | |||
| 45f8f3cd5a | |||
| 86fc7c1316 | |||
| b04753237f | |||
| 6bbe41429d | |||
|
|
4a479763ce | ||
| 56c3b9b5e3 | |||
| c0a820af4b | |||
| 9e6acf716d | |||
| 8ef7d57791 | |||
| 1239128a52 | |||
| 1a31f0874a | |||
| b80bb34494 | |||
| f61063e7a0 | |||
| 5ee42b7137 | |||
| 8e68bbe543 | |||
|
|
1e19761356 | ||
| ee749bac65 | |||
| d122130196 | |||
|
|
33d7bde337 | ||
|
|
2ebfe14652 | ||
| 000341d13a | |||
|
|
6cd2077886 | ||
| 10ba57a049 | |||
|
|
682007dc8f | ||
| e8daefc672 | |||
| be1af84920 | |||
| baf12aff14 | |||
|
|
ec394c57f1 | ||
|
|
11b278045d | ||
|
|
9ea6cbdbd7 | ||
|
|
090625935e | ||
|
|
ae5f9aea6f | ||
|
|
0556ab0109 | ||
|
|
60d141d892 | ||
| 766f1eddd1 | |||
| 5463e7f44c | |||
| 0191ed1219 | |||
| fc0484370a | |||
|
|
c2b4114bd5 | ||
| e2abc91367 | |||
| ea4e66a2a3 | |||
| 4e48fb3742 | |||
| 62572aa23e | |||
|
|
d53eee5f9e | ||
| 13fa310b57 | |||
|
|
41ff630b60 | ||
|
|
6817a5bdf3 | ||
|
|
0eac0276f9 | ||
|
|
345bf66c43 | ||
|
|
eda7b21dcc | ||
| 8f14755364 | |||
| 8a8e983dd2 | |||
| 77e42deae0 | |||
| f954df6bd6 | |||
| 4357edb29f | |||
| e481f61a53 | |||
| 399aa08dd0 | |||
| 43404ae283 | |||
| f234a97213 | |||
| a130bc03c8 | |||
|
|
7687495842 | ||
| 1cb27a6589 | |||
| 34a84bd481 | |||
| 5a534936f6 | |||
| fb851cc393 | |||
| a4c48a1dba | |||
|
|
6e5a914152 | ||
| 77d3f53039 | |||
| bd9df0a02b | |||
| 094fbb78ca | |||
| 626a4a4ed4 | |||
| 4eb7a09df5 | |||
| 90df2b1a9e | |||
| 30c1edd959 | |||
|
|
d958a9e100 | ||
|
|
8fc0336932 | ||
|
|
9f808bbcd4 | ||
|
|
bd1b57ddb2 | ||
|
|
3f81b11945 | ||
| cd6806b562 | |||
| 3672dc876a | |||
|
|
6223a476b1 | ||
| 80da315d7b | |||
| 4195330c0c | |||
| e89e1f35de | |||
| 64b9753ca1 | |||
| 7cdd27ca03 | |||
|
|
ad00b442df | ||
|
|
01d54a8f96 | ||
|
|
5bb7dbd802 | ||
|
|
403dd045ef | ||
|
|
db36eaca42 | ||
| e399d2ef24 | |||
| 3e29816950 | |||
| 53b26a3972 | |||
|
|
560617806d | ||
| 91c6918e77 | |||
| e7e93ca3b0 | |||
|
|
48916e945a | ||
| ce80e5f21e | |||
| 32b334afe1 | |||
| 345b417810 | |||
|
|
cfcb39eb72 | ||
|
|
53513764c8 | ||
| d00a71708d | |||
| 48343298ae | |||
|
|
0253043903 | ||
|
|
27f40676d8 | ||
| 4e658732da | |||
| 6354c95bde | |||
| d89404c607 | |||
| 2aa015e5a7 | |||
|
|
ac9a180948 | ||
|
|
292550973e | ||
|
|
582522a146 | ||
| bb7c80b716 | |||
|
|
62e66da4d7 | ||
|
|
2900dddc2f | ||
| cc0bccc584 | |||
| 00014cd6e5 | |||
| 59697ee6f0 | |||
| ecce83737b | |||
|
|
1794da7f35 | ||
|
|
80de4346ad | ||
|
|
5eda55648f | ||
| 6cc472a8f8 | |||
|
|
4a72b37ae4 | ||
|
|
61a7af83fc | ||
|
|
85936fc340 | ||
| a92dd6961f | |||
| 889b524f8f | |||
| 77265be8f1 | |||
| 137e4c9789 | |||
| 99db707c85 | |||
| 7375df728c | |||
| dac129d12e | |||
| bc33671ac6 | |||
| 2927a4f179 | |||
| 137829c50a | |||
|
|
3af150054f | ||
|
|
7708e5c9a4 | ||
| 3f170c4091 | |||
| 39235ebc3c | |||
|
|
25df768960 | ||
|
|
66d5d9c114 | ||
|
|
001bd4337b | ||
|
|
ed9a384b9d | ||
|
|
b9b4c16c12 | ||
|
|
180a9ab2d5 | ||
|
|
07198e000d | ||
|
|
43f62ea2c5 | ||
|
|
9f55832cae | ||
|
|
3fb3b684f4 | ||
|
|
0040dd1502 | ||
|
|
feb176680d | ||
|
|
014a1fe478 | ||
|
|
36905994f9 | ||
|
|
c7546c8372 | ||
|
|
8954360414 | ||
|
|
b9a24ea0e6 | ||
|
|
da43d8e174 | ||
|
|
100155a9fc | ||
|
|
da8c8a61d2 | ||
|
|
1efe6848d7 | ||
|
|
aa7b228dc5 | ||
|
|
ac68f3c4d0 | ||
|
|
4db2456430 | ||
| bfa1716fe1 | |||
|
|
4eb8d2d055 | ||
|
|
41e7dc9d75 | ||
|
|
7c2e68c309 | ||
|
|
c1c94d6f13 | ||
| 6083ed9272 | |||
|
|
9027c81697 | ||
|
|
f7fcd96762 | ||
|
|
fb372200bb | ||
|
|
fa5cd158dd | ||
|
|
f9b4da20f6 | ||
| 3a298a6d3a | |||
| df6f0b791d | |||
|
|
a18463be54 | ||
|
|
e57faa2948 | ||
|
|
e8f5dcecc3 | ||
|
|
17b91fc579 | ||
|
|
06f7246d35 | ||
|
|
2d03a13227 | ||
|
|
3f55338f1d | ||
|
|
de730bf9de | ||
|
|
44bdbbf3c2 | ||
|
|
2e8dd27aff | ||
|
|
0b93a23d4e | ||
|
|
bbf81de56e | ||
|
|
9d35de6b11 | ||
|
|
60a8ff39a6 | ||
|
|
d509b15973 | ||
|
|
f5a97aee08 | ||
| 8a1cac312e | |||
| 2c8ee193c3 | |||
|
|
9859b1ec0d | ||
|
|
fc4c5d6f93 | ||
|
|
d57089a79f | ||
| 0db7945192 | |||
| 3bbcc9f763 | |||
|
|
da7e390fe8 | ||
| 50ec31cbb5 | |||
| ac91a11820 | |||
| 312f73c215 | |||
| 19d95d6efe | |||
| 7eda9a3d0b | |||
| 066c0b2067 | |||
| 9b68c2434c | |||
|
|
469fac745d | ||
|
|
c5ff922830 | ||
|
|
88ef2fc64f | ||
|
|
f9d15bf2e2 | ||
|
|
615739b8fb | ||
|
|
d7ea21e0ef | ||
|
|
e6802835da | ||
|
|
6b8b993ceb | ||
| 360ff4652f | |||
| 245281849f | |||
| de465b1503 | |||
|
|
1a7cd0e135 | ||
|
|
e37a2fe3db | ||
| 554be2058d | |||
|
|
47500a2028 | ||
| a2abf42113 | |||
| 54f42c2b5d | |||
| 9835138f5a | |||
| 634d143e2b | |||
| e0b8d5cc6c | |||
| e9a455eab8 | |||
| 5c764a9ee3 | |||
|
|
540aeb23ea | ||
|
|
1f4f24f9ef | ||
|
|
1ae5d89d29 | ||
|
|
4b21bfd759 | ||
| b95507f3fd | |||
| fa8b4f7fb0 | |||
| 047fd667ac | |||
| 36c559b5de | |||
| be872194a4 | |||
| f96492dd37 | |||
| e174adbfe3 | |||
| 6cd77785cf | |||
| 479ae3a3d4 | |||
| 9bbee05199 | |||
| c7db716f70 | |||
|
|
3cec6a41bf | ||
| aeda4ecb61 | |||
| 6937b16808 | |||
| 36218b8ba6 | |||
| 5bd9c6fbac | |||
| ebfe9f69e0 | |||
| acc03e03a6 | |||
| ede34caddf | |||
| 3af6401b88 | |||
| d593f9812b | |||
| 4865ce955b | |||
| a8166a0cd2 | |||
| 5585ab8c1c | |||
| b186705454 | |||
| 8b9b067145 | |||
| f356e389f5 | |||
| d482d7757e | |||
| d22aaa719e | |||
| e36caaaff4 | |||
| a1a3d229c5 | |||
| 5d087d092b | |||
| 3dbcfe23ea | |||
| 0bb3edd373 | |||
| 4ea64ebd95 | |||
| bf9d22c0a3 | |||
| 572e01fa9b | |||
| e74d95b70a | |||
| 7c473dd6a5 | |||
| 8bc95908a8 | |||
|
|
97f01bc40a | ||
|
|
023fbfbde5 | ||
| f47d9480fd | |||
| 1e61a5d7c4 | |||
|
|
05a6693156 | ||
|
|
7b5d166ffa | ||
| 0e45102207 | |||
| 1849d742c1 | |||
|
|
dd76259175 | ||
| 1b4f86d57e | |||
| aede8cbe97 | |||
| 3afabc639b | |||
| 7009d57f65 | |||
| ec958a88b3 | |||
| e32b2e8b9a | |||
| 5dfef7b70a | |||
| f6bad1d8e1 | |||
| 4eb64cde93 | |||
| 4e0becfd5c | |||
| 616e98fcec | |||
| c31f3f8376 | |||
| c50b19fd10 | |||
| ca296bca49 | |||
| c9f032948e | |||
| 5473324d2d | |||
| 7b035e00d6 | |||
| 13c27da618 | |||
| 82ed8b6c94 | |||
| af03cc8f5b | |||
| 0974d2631e | |||
| 6dc9f7469e | |||
| fb9315a201 | |||
| f9ee8101bf | |||
| c0ef075cfa | |||
| 0dfc2b2daf | |||
| 0c573ce93b | |||
| f84bc42bd6 | |||
| 0ba2a78f73 | |||
| ce833dadf5 | |||
| 6e0721e923 | |||
| 8d3d21d0ea | |||
| 3bdf010ed5 | |||
| f372b6953a | |||
| ae6f033a90 | |||
| ef876cb63c | |||
| 6e475cd1e9 | |||
| e76541de23 | |||
| 31d394627c | |||
| 4040d22fe5 | |||
| 5c43a2fa7b | |||
| 70e60407e9 | |||
|
|
5b801a546b | ||
| 9d8d900f74 | |||
| 90bf6de27d | |||
| 14e5b3c49c | |||
| acb845a55f | |||
| b0adf39e00 | |||
| d4646b3fbb | |||
| 517ee67733 | |||
| 3119718387 | |||
| 9ef9ba8850 | |||
| 45769d59f9 | |||
| a820439b7a | |||
| 251829bab3 | |||
| 20f8af09cb | |||
| 23394a11b8 | |||
| e6082f61d9 | |||
| d7d20dbd0d | |||
| 36f1e4c609 | |||
| cdbb266503 | |||
| a34636ac80 | |||
| 103986b319 | |||
| 5a076cd523 | |||
| d81c6b7aad | |||
| 2b7ad29482 | |||
| 3ac392f9d8 | |||
| f0c8044cc8 | |||
| 6dd2a5a62b | |||
| dca97173bf | |||
| b6929b602b | |||
| 36c32752f9 | |||
| afec2dcc61 | |||
| 3e1334bc3a | |||
| 0a084828d6 | |||
| 1623e06e13 | |||
| 4047d10ed4 | |||
| 2d44d0ba4d | |||
| e35c6365f4 | |||
| f17c039c1e | |||
| a1b4472e7f | |||
| 1e6acd8c8e | |||
| cad92c6651 | |||
| f0ffd00a7d | |||
|
|
03efe6030a | ||
|
|
d8d840185f | ||
|
|
6527dbb5a3 | ||
|
|
4edbf3f58b | ||
|
|
625ccc125f | ||
|
|
51d79406db | ||
| 98ce498830 | |||
| afdc647139 | |||
|
|
6de56772dd | ||
|
|
dc28c258b9 | ||
| 11eda60e20 | |||
| 10ce40fc64 | |||
| 2a030ca4a5 | |||
| e47c36692a | |||
| 30f653728d | |||
|
|
6aa54dc7af | ||
|
|
db1e91d888 | ||
|
|
4a96a61958 | ||
|
|
9d2cac4587 | ||
| b8409502ee | |||
| be45de4046 | |||
| cc94f9bbe3 | |||
|
|
f2d9a913ab | ||
|
|
1bc900c6b1 | ||
|
|
e969c95b8c | ||
|
|
94732f1fb4 | ||
|
|
634a993e16 | ||
|
|
c3cfc2b6e0 | ||
| 9c9879553d | |||
| c153b9b8eb | |||
|
|
46521b10ca | ||
|
|
98c1476944 | ||
|
|
5fcadaf742 | ||
|
|
0119505418 | ||
| 866049d95d | |||
| bf973fa948 | |||
|
|
9752b6584f | ||
|
|
663c8e235c | ||
|
|
1aa4f73bdc | ||
|
|
2fdcb9b131 | ||
| 9d43a3c098 | |||
|
|
9486aad885 | ||
| 2e58f305fd | |||
| a0eb009b07 | |||
|
|
c977c9d435 | ||
|
|
c4aca47508 | ||
|
|
5db101dde2 | ||
|
|
7aef40402e | ||
|
|
72c21ba4a0 | ||
|
|
722d05bd7a | ||
| 9a6f83c0ee | |||
| cd1bee8ac7 | |||
| 7ff98e4fe8 | |||
| 2cf68ad47c | |||
|
|
6e29a1ed60 | ||
|
|
d82f148687 | ||
| 2d524b2a0b | |||
|
|
4d153bcb37 | ||
|
|
9492a186e2 | ||
| 18524598d4 | |||
| 7359d9cd57 | |||
| c573defa3b | |||
| f3367ccf22 | |||
| 5a672d72c4 | |||
| 36a2da8e7c | |||
| 8b0e0edae8 | |||
| c4436f9be0 | |||
| 79ecb8c90d | |||
| c8d656bb62 | |||
| 8b0ac8df10 | |||
| e3bc1a992f | |||
| 971e6f5976 | |||
| f9597a2eac | |||
| 010cf9b126 | |||
| 3b96a4bef8 | |||
| 7008642797 | |||
| 46f1a12dee | |||
| 7deff19fca | |||
| 2784ef0144 | |||
| 6090cf92d6 | |||
|
|
b88339488d | ||
|
|
e527740ba3 | ||
|
|
14a198ccac | ||
|
|
94f156981c | ||
|
|
b3b4e861aa | ||
|
|
17a017616e | ||
| c6bc85ecaa | |||
| 9b07b6b973 | |||
|
|
93abf25796 | ||
| 4174a69ad7 | |||
|
|
0cb5d6e9ef | ||
| 4a97727775 | |||
| 7af0704d49 | |||
| a5df6f06bf | |||
| 2b98fefa69 | |||
| 9a9cb3b1f0 | |||
| 1ff87b20da | |||
| 6d8af40575 | |||
| 5f059c1d7c | |||
| 14956c06de | |||
| a264630b2c | |||
| 0488918026 | |||
| 4616d066d8 | |||
| 69bbc5a090 | |||
| db0c064828 | |||
| 6773cc62e7 | |||
| 454d40cfd9 | |||
| 935dc4bc2c | |||
| 2151020f1a | |||
| d48b6fae1b | |||
| 0e458dc4e7 | |||
| a8e2e4dfe2 | |||
| 1a9d6c0ede | |||
| 11592d8c90 | |||
| 2846cdc1b2 | |||
| a68ba46e51 | |||
| 11bc39be1b | |||
| ac7dd44fd9 | |||
| b33a776f93 | |||
| 866cce5bb6 | |||
| fe6ac1be55 | |||
| 2c2c9499cc | |||
| b2012fbaba | |||
| bc9d7fe7ba | |||
| 8e4a087310 | |||
| e9c46e4a64 | |||
| d55abc66db | |||
| 4177a676b9 | |||
| 2bc6a4f77c | |||
| d8c083f5b6 | |||
| 0f1559f1cf | |||
| d4bc9bae54 | |||
| 82e5f92be2 | |||
| 9f03ac444e | |||
| dd25bb3f4e | |||
| cd9cd0dbd1 | |||
| eda4d7dd91 | |||
| b761411203 | |||
| 07309ab587 | |||
| 852d2fbed4 | |||
| b458105c4c | |||
| db193ce55a | |||
| a16f0b6d54 | |||
| 87db2d6ce3 | |||
| 5ae25cabc6 | |||
| e4d6b5de90 | |||
| afcc29ba80 | |||
| df3c90476b | |||
| 4cc70d4b2f | |||
| ada34794e3 | |||
| ea89bdbe02 | |||
| 0a9d8f628d | |||
| f26492218b | |||
| 8f987dff52 | |||
| 0545372341 | |||
| ac18e084f3 | |||
| b2133c6d90 | |||
| 749ce934e8 | |||
| cd726f2987 | |||
| 00a9acdb9b | |||
| b46400d15c | |||
| 2b5dd8d977 | |||
| e48016fc4c | |||
| 953eb4b419 | |||
| b4c90f4d18 | |||
| f8b5df1f42 | |||
| 1d3f2cd0f7 | |||
| cdf2af27ba | |||
| c60e04454a | |||
| 9c97c426d6 | |||
| 4f0fcc77a1 | |||
| 5291bb489a | |||
| 8082f229f4 | |||
| 19baa34ca5 | |||
| d5546933f9 | |||
| 80759ec111 | |||
| 5c92a1fef7 | |||
| 08a12459e6 | |||
| c34cc285bb | |||
| c0ff047f66 | |||
| ae33bf910a | |||
| df829bb4d9 | |||
| 96b04aa609 | |||
| 74f71fb0b6 | |||
| 9cd32ec899 | |||
| 18161e8528 | |||
| fa898aee00 | |||
| c56465dd18 | |||
| 2b6c2123c9 | |||
| c478f4015a | |||
| 1334fcaa4c | |||
| f1d81778d0 | |||
| 9bb1cbc840 | |||
| 139901467f | |||
| 851fdc5098 | |||
| 8c2cff4973 | |||
| af9c443686 | |||
| 0885aa1ed0 | |||
| 5d8b72b499 | |||
| 9f7f818e79 | |||
| 60498f8af9 | |||
| cf95f2b9fe | |||
| f3882fd709 | |||
| de98e69033 | |||
| e03bd54b11 | |||
| 4c842559a7 | |||
| ef57eb0e89 | |||
| e994c11e29 | |||
| b1a7e1f2de | |||
| d1191753f3 | |||
| 1723ba99dd | |||
| e66f33b1a9 | |||
| a6c7544b91 | |||
| 9bb4bec9f8 | |||
| 0e99dc7a0b | |||
| ebaeac28fb | |||
| fe755bbe13 | |||
| 5c8a7ac056 | |||
| bc795d3f20 | |||
| 55b6ae810d | |||
| e0b15430be | |||
| c4a50362f5 | |||
| 2455067913 | |||
| 24b5560c9c | |||
| d2eefbb646 | |||
| 4afa15ee3f | |||
| a093585416 | |||
| 9e1080659a | |||
| c0148238f0 | |||
| c33833b008 | |||
| bacedd206f | |||
| 8ad6668748 | |||
| ca70a92538 | |||
| 789c1dc81c | |||
| 49c9232323 | |||
| 98bd564928 | |||
| d8a43a6720 | |||
| e28cdceb50 | |||
| 76a0ea3c01 | |||
| 8cd7d57488 | |||
| bfe244450b | |||
| b858a599d0 | |||
| 345a93b149 | |||
| b3900e0735 | |||
| 3983538606 | |||
| 4664da0d1c | |||
| 492fdfeee2 | |||
| e47651247f | |||
| 79ec11f0de | |||
| 97753f0578 | |||
| 2b013f5269 | |||
| 244901bf6a | |||
| 9b13f753e6 | |||
| 50851aa303 | |||
| b89b86be5d | |||
| f1db70cd83 | |||
| 59ba69477b | |||
| 577e4d399c | |||
| e4554dd0ad | |||
| 4e9091bd4b | |||
| b4960fb7c2 | |||
| b2e9b0c2d1 | |||
| ec7be8fde0 | |||
| cb707c96e1 | |||
| 90504c8c0c | |||
| 13e19d8650 | |||
| 64f151d87f | |||
| d4eebacbda | |||
| 8311d0cc99 | |||
| 57b2e587e7 | |||
| fad92b5991 | |||
| 086fe399e4 | |||
| dc8a872e5e | |||
| 79a61043e9 | |||
| 17b8f61968 | |||
| b59f4e9395 | |||
| cc295e64b5 | |||
| 268bb183f4 | |||
| 96ed290f62 | |||
| 96db32a381 | |||
| 6d975266a6 | |||
| dded072bad | |||
| 55a2197ad4 | |||
| 47da1435ae | |||
| 7c75f0722a | |||
| aecacb623b | |||
| 0af5d7b5dc | |||
| a38cc36e51 | |||
| 2dcdd8fb7f | |||
| de557a8ac0 | |||
| 5a6c8591d2 | |||
| 7fbf4864f1 | |||
| 6d3ec1ac10 | |||
| 4e44c0ca06 | |||
| cfaaf818c8 | |||
| 48a85b000c | |||
| 4c758f2045 | |||
| cebf285f8e | |||
| 16661dfe33 | |||
| 24c3d1c894 | |||
| 653fe27066 | |||
| bef76dc3f0 | |||
| d0a93eb229 | |||
| 2d793324f1 | |||
| 909a44682b | |||
| 98b0893b0c | |||
| 467b126590 | |||
| 505216a1b3 | |||
| 8247a52343 | |||
| 7dcf40675f | |||
| a5d6e45cd1 | |||
| 40c0a9d65f | |||
| 033d9ba023 | |||
| fe8f3498cd | |||
| 35712fdbe2 | |||
| 248d707026 | |||
| eea71f6e5a | |||
| d543628d86 | |||
| d93c911334 | |||
| 5954f86213 | |||
| 7747672842 | |||
| 1648689c02 | |||
| 43d3e83593 | |||
| 808f7cce3e | |||
| f9807d039a | |||
| 33ce4c7123 | |||
| 6bbe1319b8 | |||
| f3eba25a43 | |||
| b3c8008b29 | |||
| 49137828da | |||
| 1988c49b82 | |||
| 3b6e0e6310 | |||
| e0644769f5 | |||
| 5fd70717d4 | |||
| 5131c182a5 | |||
| c094790cd3 | |||
| 01bd9736e0 | |||
| 98c6a72f96 | |||
| aa6dca6f1f | |||
| ce95cface5 | |||
| 13b51cadf8 | |||
| 63620fdda4 | |||
| e23f39c6ac | |||
| 2276144fc4 | |||
| c347c7d81d | |||
| 8817680689 | |||
| e6920fe595 | |||
| 21b0c2cc49 | |||
| 1979ac7530 | |||
| a295762f37 | |||
| 2151a8e42b | |||
| f60f7c4a6a | |||
| 7e9f25fffe | |||
| 729c9e661c | |||
| aa08c15e2a | |||
| 8ad73a8874 | |||
| c84fb621a9 | |||
| 325d14d913 | |||
| 45a3751914 | |||
| 1dd8ccf3b7 | |||
| 2734e4572f | |||
| 15ddf58f55 | |||
| 4b9e6eb7bd | |||
| 549a557bf2 | |||
| 966790326e | |||
| ef18264bf8 | |||
| 426b65537f | |||
| 0d46dd75d8 | |||
| 3fbc1e6ef4 | |||
| 3a00260038 | |||
| 26c0056b12 | |||
| e8645e6515 | |||
| a413806363 | |||
| f1d411c6bc | |||
| 71ef73bec6 | |||
| 3f43441c4f | |||
| c665b2190c | |||
| abc498f656 | |||
| 5cfbfb687d | |||
| 0839151de0 | |||
| 5f1b85bbb4 | |||
| 64f73ca075 | |||
| ec631334d6 | |||
| 87ebd0be56 | |||
| 342b49ab18 | |||
| 0b1c014533 | |||
| 2177d33587 | |||
| f199ff7b3d | |||
| eb5e30be88 | |||
| e879989ef6 | |||
| c1ba3f348a | |||
| 8bacafbdfe | |||
| 0f59144fa8 | |||
| e100345bb8 | |||
| f4ae80f326 | |||
| 25d9db05ef | |||
| bc8d915944 | |||
| b06f24d06e | |||
| 9a0a28b633 | |||
| dcf041ad9d | |||
| 623584225d | |||
| 9301c78060 | |||
| fe3f693925 | |||
| cbded7c26a | |||
| 8a441851b3 | |||
| d564fd2c59 | |||
| 1a207a8d53 | |||
| 380c7b95ce | |||
| 9f27882072 | |||
| b523c46cde | |||
| 2b212d2903 | |||
| 13fc02b8ba | |||
| 8f137abf30 | |||
| 5706c238a4 | |||
| 75231bab91 | |||
| cef7e50112 | |||
| 8de086333c | |||
| dbe63508f7 | |||
| 0084f27e1b | |||
| d1468434b6 | |||
| 4e89a5830a | |||
| 58b0ca77e1 | |||
| 4f9f8e66db | |||
| 8196e14159 | |||
| d4e00229fa | |||
| 36dc2dd194 | |||
| 2b30a246c4 | |||
| ec0ad25aec | |||
| 829928da9b | |||
| fb4afd8441 | |||
| 2e46cfaacd | |||
| 8570541f76 | |||
| 4cb62a474e | |||
| 1b1db8e0aa | |||
| e0415bb4a2 | |||
| d8ef69090d | |||
| ebe28dc56c | |||
| fd6d763431 | |||
| c22977816b | |||
| 126360113d | |||
| 3e80d15355 | |||
| 7ea561bb01 | |||
| efdebf8949 | |||
| 0c7db6d312 | |||
| 71e504afc5 | |||
| 896145b718 | |||
| f381ffa185 | |||
| 637cad4298 | |||
| f1100ddfc9 | |||
| 952d803bf8 | |||
| 9718cd7c67 | |||
| 3fb1c12bef | |||
| a1679a8a24 | |||
| 7edf18a252 | |||
| 08434eca48 | |||
| 860da58df4 | |||
| b65f78dc12 | |||
| 7241ff16c9 | |||
| 4311ce978a | |||
| da7b5edb6e | |||
| 2efd3f2b21 | |||
| df8f611f5a | |||
| 30a2a9d57c | |||
| b8355c0e27 | |||
| 080b475826 | |||
| e1f4d82f31 | |||
| 949be8efaa | |||
| 5aa145bf1a | |||
| 329098d07b | |||
| 56f2a8d40b | |||
| 7dbef64c91 | |||
| 53127451c9 | |||
| 3e62057d29 | |||
| 0ff31f98d3 | |||
| 382f7fe980 | |||
| feefda874a | |||
| a725fb7d98 | |||
| 9289953613 | |||
| 1b4e4e72a9 | |||
| 7edf15d6a1 | |||
| 7eb9c9cfe7 | |||
| 1e9fdf8bb8 | |||
| 5d19fb261d | |||
| 69212549c5 | |||
| fb60eba3e9 | |||
| 1fa862b85d | |||
| 8629decdc0 | |||
| b9a6923511 | |||
| 289c5937c5 |
@ -946,8 +946,8 @@ type UserListInfo struct {
|
||||
DateOfBirth string `protobuf:"bytes,22,opt,name=dateOfBirth,proto3" json:"dateOfBirth"`
|
||||
Age string `protobuf:"bytes,23,opt,name=age,proto3" json:"age"`
|
||||
Email string `protobuf:"bytes,24,opt,name=email,proto3" json:"email"`
|
||||
AbroadTelAreaCode string `protobuf:"bytes,25,opt,name=AbroadTelAreaCode,proto3" json:"AbroadTelAreaCode"`
|
||||
AbroadTel string `protobuf:"bytes,26,opt,name=AbroadTel,proto3" json:"AbroadTel"`
|
||||
AbroadTelAreaCode string `protobuf:"bytes,25,opt,name=abroadTelAreaCode,proto3" json:"abroadTelAreaCode"`
|
||||
AbroadTel string `protobuf:"bytes,26,opt,name=abroadTel,proto3" json:"abroadTel"`
|
||||
InviterName string `protobuf:"bytes,27,opt,name=inviterName,proto3" json:"inviterName"`
|
||||
InviterCode string `protobuf:"bytes,28,opt,name=inviterCode,proto3" json:"inviterCode"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
@ -1195,6 +1195,8 @@ type UserListRequest struct {
|
||||
Ids []int64 `protobuf:"varint,11,rep,packed,name=ids,proto3" json:"ids"`
|
||||
Nationality string `protobuf:"bytes,12,opt,name=nationality,proto3" json:"nationality"`
|
||||
NameAndNumber string `protobuf:"bytes,13,opt,name=nameAndNumber,proto3" json:"nameAndNumber"`
|
||||
Email string `protobuf:"bytes,14,opt,name=email,proto3" json:"email"`
|
||||
AbroadTel string `protobuf:"bytes,15,opt,name=abroadTel,proto3" json:"abroadTel"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@ -1320,6 +1322,20 @@ func (x *UserListRequest) GetNameAndNumber() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UserListRequest) GetEmail() string {
|
||||
if x != nil {
|
||||
return x.Email
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UserListRequest) GetAbroadTel() string {
|
||||
if x != nil {
|
||||
return x.AbroadTel
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type UserInfoResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id"`
|
||||
@ -1344,8 +1360,8 @@ type UserInfoResponse struct {
|
||||
IdNumber string `protobuf:"bytes,20,opt,name=idNumber,proto3" json:"idNumber"`
|
||||
DateOfBirth string `protobuf:"bytes,21,opt,name=dateOfBirth,proto3" json:"dateOfBirth"`
|
||||
Email string `protobuf:"bytes,22,opt,name=email,proto3" json:"email"`
|
||||
AbroadTelAreaCode string `protobuf:"bytes,23,opt,name=AbroadTelAreaCode,proto3" json:"AbroadTelAreaCode"`
|
||||
AbroadTel string `protobuf:"bytes,24,opt,name=AbroadTel,proto3" json:"AbroadTel"`
|
||||
AbroadTelAreaCode string `protobuf:"bytes,23,opt,name=abroadTelAreaCode,proto3" json:"abroadTelAreaCode"`
|
||||
AbroadTel string `protobuf:"bytes,24,opt,name=abroadTel,proto3" json:"abroadTel"`
|
||||
InviterId uint64 `protobuf:"varint,25,opt,name=inviterId,proto3" json:"inviterId"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
@ -10374,10 +10390,10 @@ const file_api_accountFiee_accountFiee_proto_rawDesc = "" +
|
||||
"\vdateOfBirth\x18\x16 \x01(\tR\vdateOfBirth\x12\x10\n" +
|
||||
"\x03age\x18\x17 \x01(\tR\x03age\x12\x14\n" +
|
||||
"\x05email\x18\x18 \x01(\tR\x05email\x12,\n" +
|
||||
"\x11AbroadTelAreaCode\x18\x19 \x01(\tR\x11AbroadTelAreaCode\x12\x1c\n" +
|
||||
"\tAbroadTel\x18\x1a \x01(\tR\tAbroadTel\x12 \n" +
|
||||
"\x11abroadTelAreaCode\x18\x19 \x01(\tR\x11abroadTelAreaCode\x12\x1c\n" +
|
||||
"\tabroadTel\x18\x1a \x01(\tR\tabroadTel\x12 \n" +
|
||||
"\vinviterName\x18\x1b \x01(\tR\vinviterName\x12 \n" +
|
||||
"\vinviterCode\x18\x1c \x01(\tR\vinviterCode\"\xff\x02\n" +
|
||||
"\vinviterCode\x18\x1c \x01(\tR\vinviterCode\"\xb3\x03\n" +
|
||||
"\x0fUserListRequest\x12\x16\n" +
|
||||
"\x06domain\x18\x01 \x01(\tR\x06domain\x12\x16\n" +
|
||||
"\x06subNum\x18\x02 \x01(\tR\x06subNum\x12$\n" +
|
||||
@ -10392,7 +10408,9 @@ const file_api_accountFiee_accountFiee_proto_rawDesc = "" +
|
||||
" \x01(\tR\vblurNameTel\x12\x10\n" +
|
||||
"\x03ids\x18\v \x03(\x03R\x03ids\x12 \n" +
|
||||
"\vnationality\x18\f \x01(\tR\vnationality\x12$\n" +
|
||||
"\rnameAndNumber\x18\r \x01(\tR\rnameAndNumber\"\x92\x06\n" +
|
||||
"\rnameAndNumber\x18\r \x01(\tR\rnameAndNumber\x12\x14\n" +
|
||||
"\x05email\x18\x0e \x01(\tR\x05email\x12\x1c\n" +
|
||||
"\tabroadTel\x18\x0f \x01(\tR\tabroadTel\"\x92\x06\n" +
|
||||
"\x10UserInfoResponse\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\x04R\x02id\x12\x16\n" +
|
||||
"\x06status\x18\x02 \x01(\x05R\x06status\x12\x12\n" +
|
||||
@ -10421,8 +10439,8 @@ const file_api_accountFiee_accountFiee_proto_rawDesc = "" +
|
||||
"\bidNumber\x18\x14 \x01(\tR\bidNumber\x12 \n" +
|
||||
"\vdateOfBirth\x18\x15 \x01(\tR\vdateOfBirth\x12\x14\n" +
|
||||
"\x05email\x18\x16 \x01(\tR\x05email\x12,\n" +
|
||||
"\x11AbroadTelAreaCode\x18\x17 \x01(\tR\x11AbroadTelAreaCode\x12\x1c\n" +
|
||||
"\tAbroadTel\x18\x18 \x01(\tR\tAbroadTel\x12\x1c\n" +
|
||||
"\x11abroadTelAreaCode\x18\x17 \x01(\tR\x11abroadTelAreaCode\x12\x1c\n" +
|
||||
"\tabroadTel\x18\x18 \x01(\tR\tabroadTel\x12\x1c\n" +
|
||||
"\tinviterId\x18\x19 \x01(\x04R\tinviterId\":\n" +
|
||||
"\x10RealNameResponse\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\x04R\x02id\x12\x16\n" +
|
||||
|
||||
@ -201,8 +201,8 @@ message UserListInfo{
|
||||
string dateOfBirth = 22;
|
||||
string age = 23;
|
||||
string email = 24;
|
||||
string AbroadTelAreaCode = 25;
|
||||
string AbroadTel = 26;
|
||||
string abroadTelAreaCode = 25;
|
||||
string abroadTel = 26;
|
||||
string inviterName = 27;
|
||||
string inviterCode = 28;
|
||||
}
|
||||
@ -220,6 +220,8 @@ message UserListRequest{
|
||||
repeated int64 ids = 11;
|
||||
string nationality = 12;
|
||||
string nameAndNumber = 13;
|
||||
string email = 14;
|
||||
string abroadTel = 15;
|
||||
}
|
||||
message UserInfoResponse{
|
||||
uint64 id = 1;
|
||||
@ -244,8 +246,8 @@ message UserInfoResponse{
|
||||
string idNumber = 20;
|
||||
string dateOfBirth = 21;
|
||||
string email = 22;
|
||||
string AbroadTelAreaCode = 23;
|
||||
string AbroadTel = 24;
|
||||
string abroadTelAreaCode = 23;
|
||||
string abroadTel = 24;
|
||||
uint64 inviterId = 25;
|
||||
|
||||
}
|
||||
|
||||
12090
api/bundle/bundle.pb.go
12090
api/bundle/bundle.pb.go
File diff suppressed because it is too large
Load Diff
@ -368,6 +368,12 @@ func (this *BatchGetValueAddServiceLangResponse) Validate() error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *UpdateBundleBalanceReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UpdateBundleBalanceResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *BundleExtendRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
@ -815,6 +821,218 @@ func (this *MetricsVideoSubmitExportItem) Validate() error {
|
||||
func (this *MetricsBalanceDetailExportReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CustomerListRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CustomerListResponse) Validate() error {
|
||||
for _, item := range this.List {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("List", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *CustomerDetailRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CustomerDetailResponse) Validate() error {
|
||||
if this.Customer != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Customer); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Customer", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *CustomerUpdateRequest) Validate() error {
|
||||
if this.Customer != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Customer); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Customer", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *CustomerInfo) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *Customer) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ReferralPersonListRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ReferralPersonListResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ContractUpdateRequest) Validate() error {
|
||||
if this.Contract != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Contract); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Contract", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *ContractListRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ContractListResponse) Validate() error {
|
||||
for _, item := range this.List {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("List", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *ContractDetailRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ContractDetailResponse) Validate() error {
|
||||
if this.Contract != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Contract); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Contract", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *GetDevelopmentCyclesByContractUUIDRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetDevelopmentCyclesByContractUUIDResponse) Validate() error {
|
||||
for _, item := range this.List {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("List", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *GetPaymentCyclesByContractUUIDRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetPaymentCyclesByContractUUIDResponse) Validate() error {
|
||||
for _, item := range this.List {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("List", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *AttachmentItem) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ContractInfo) Validate() error {
|
||||
for _, item := range this.ContractAttachments {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("ContractAttachments", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, item := range this.OtherAttachments {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("OtherAttachments", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *Contract) Validate() error {
|
||||
for _, item := range this.ContractAttachments {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("ContractAttachments", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, item := range this.OtherAttachments {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("OtherAttachments", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, item := range this.PaymentCycles {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("PaymentCycles", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, item := range this.DevelopmentCycles {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("DevelopmentCycles", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *ContractPaymentCycle) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DevelopmentCycle) Validate() error {
|
||||
for _, item := range this.Attachments {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Attachments", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *CreateInvoiceReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CreateInvoiceResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CreatePaperInvoiceAddressReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CreatePaperInvoiceAddressResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *InvoiceInfo) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetInvoiceListReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetInvoiceListResp) Validate() error {
|
||||
for _, item := range this.Data {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *UpdateInvoiceExpressInfoReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UpdateInvoiceExpressInfoResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetInvoiceExpressInfoReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetInvoiceExpressInfoResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetOrderInfoByOrderNoReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetOrderInfoByOrderNoResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *WorkCastInfo) Validate() error {
|
||||
return nil
|
||||
}
|
||||
@ -831,3 +1049,28 @@ func (this *ExportWorkCastInfoResp) Validate() error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *GetInvoiceInfoByOrderNoReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *InvoiceInfoByOrderNo) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetInvoiceInfoByOrderNoResp) Validate() error {
|
||||
for _, item := range this.Data {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *GetLastInvoiceNoReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetLastInvoiceNoResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *OrderInfoByOrderUuidRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
13420
api/cast/cast.pb.go
13420
api/cast/cast.pb.go
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-triple v1.0.8
|
||||
// - protoc v6.32.0--rc2
|
||||
// - protoc v3.21.1
|
||||
// source: pb/fiee/cast.proto
|
||||
|
||||
package cast
|
||||
|
||||
@ -9,6 +9,7 @@ package cron
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
@ -2069,7 +2070,7 @@ var File_pb_cron_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_pb_cron_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\rpb/cron.proto\x12\x04cron\"!\n" +
|
||||
"\rpb/cron.proto\x12\x04cron\x1a\x1bgoogle/protobuf/empty.proto\"!\n" +
|
||||
"\x0fCommonIDRequest\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\rR\x02id\">\n" +
|
||||
"\x0eCommonResponse\x12\x12\n" +
|
||||
@ -2299,7 +2300,18 @@ const file_pb_cron_proto_rawDesc = "" +
|
||||
"\x1dGetScheduleTaskStatusResponse\x12\x12\n" +
|
||||
"\x04code\x18\x01 \x01(\x05R\x04code\x12\x18\n" +
|
||||
"\amessage\x18\x02 \x01(\tR\amessage\x12$\n" +
|
||||
"\x04data\x18\x03 \x03(\v2\x10.cron.TaskStatusR\x04dataB\bZ\x06./cronb\x06proto3"
|
||||
"\x04data\x18\x03 \x03(\v2\x10.cron.TaskStatusR\x04data2\xd5\x06\n" +
|
||||
"\x04Cron\x12Y\n" +
|
||||
"\x12CreateScheduleTask\x12\x1f.cron.CreateScheduleTaskRequest\x1a .cron.CreateScheduleTaskResponse\"\x00\x12Y\n" +
|
||||
"\x12UpdateScheduleTask\x12\x1f.cron.UpdateScheduleTaskRequest\x1a .cron.UpdateScheduleTaskResponse\"\x00\x12C\n" +
|
||||
"\x12DeleteScheduleTask\x12\x15.cron.CommonIDRequest\x1a\x14.cron.CommonResponse\"\x00\x12\\\n" +
|
||||
"\x13GetListScheduleTask\x12 .cron.GetListScheduleTaskRequest\x1a!.cron.GetListScheduleTaskResponse\"\x00\x12e\n" +
|
||||
"\x16GetListExecutionRecord\x12#.cron.GetListExecutionRecordRequest\x1a$.cron.GetListExecutionRecordResponse\"\x00\x12e\n" +
|
||||
"\x16GetListExecutionResult\x12#.cron.GetListExecutionResultRequest\x1a$.cron.GetListExecutionResultResponse\"\x00\x12V\n" +
|
||||
"\x15GetScheduleTaskStatus\x12\x16.google.protobuf.Empty\x1a#.cron.GetScheduleTaskStatusResponse\"\x00\x12B\n" +
|
||||
"\x11PauseScheduleTask\x12\x15.cron.CommonIDRequest\x1a\x14.cron.CommonResponse\"\x00\x12B\n" +
|
||||
"\x11StartScheduleTask\x12\x15.cron.CommonIDRequest\x1a\x14.cron.CommonResponse\"\x00\x12F\n" +
|
||||
"\x15RepublishScheduleTask\x12\x15.cron.CommonIDRequest\x1a\x14.cron.CommonResponse\"\x00B\bZ\x06./cronb\x06proto3"
|
||||
|
||||
var (
|
||||
file_pb_cron_proto_rawDescOnce sync.Once
|
||||
@ -2337,6 +2349,7 @@ var file_pb_cron_proto_goTypes = []any{
|
||||
(*TaskStatus)(nil), // 19: cron.TaskStatus
|
||||
(*GetScheduleTaskStatusResponse)(nil), // 20: cron.GetScheduleTaskStatusResponse
|
||||
nil, // 21: cron.GetListScheduleTaskRequest.SortsEntry
|
||||
(*emptypb.Empty)(nil), // 22: google.protobuf.Empty
|
||||
}
|
||||
var file_pb_cron_proto_depIdxs = []int32{
|
||||
3, // 0: cron.ScheduleTask.task_detail:type_name -> cron.TaskDetail
|
||||
@ -2354,8 +2367,28 @@ var file_pb_cron_proto_depIdxs = []int32{
|
||||
5, // 12: cron.GetListExecutionRecordResponse.data:type_name -> cron.ExecutionRecord
|
||||
6, // 13: cron.GetListExecutionResultResponse.data:type_name -> cron.ExecutionResult
|
||||
19, // 14: cron.GetScheduleTaskStatusResponse.data:type_name -> cron.TaskStatus
|
||||
15, // [15:15] is the sub-list for method output_type
|
||||
15, // [15:15] is the sub-list for method input_type
|
||||
7, // 15: cron.Cron.CreateScheduleTask:input_type -> cron.CreateScheduleTaskRequest
|
||||
10, // 16: cron.Cron.UpdateScheduleTask:input_type -> cron.UpdateScheduleTaskRequest
|
||||
0, // 17: cron.Cron.DeleteScheduleTask:input_type -> cron.CommonIDRequest
|
||||
13, // 18: cron.Cron.GetListScheduleTask:input_type -> cron.GetListScheduleTaskRequest
|
||||
15, // 19: cron.Cron.GetListExecutionRecord:input_type -> cron.GetListExecutionRecordRequest
|
||||
17, // 20: cron.Cron.GetListExecutionResult:input_type -> cron.GetListExecutionResultRequest
|
||||
22, // 21: cron.Cron.GetScheduleTaskStatus:input_type -> google.protobuf.Empty
|
||||
0, // 22: cron.Cron.PauseScheduleTask:input_type -> cron.CommonIDRequest
|
||||
0, // 23: cron.Cron.StartScheduleTask:input_type -> cron.CommonIDRequest
|
||||
0, // 24: cron.Cron.RepublishScheduleTask:input_type -> cron.CommonIDRequest
|
||||
9, // 25: cron.Cron.CreateScheduleTask:output_type -> cron.CreateScheduleTaskResponse
|
||||
12, // 26: cron.Cron.UpdateScheduleTask:output_type -> cron.UpdateScheduleTaskResponse
|
||||
1, // 27: cron.Cron.DeleteScheduleTask:output_type -> cron.CommonResponse
|
||||
14, // 28: cron.Cron.GetListScheduleTask:output_type -> cron.GetListScheduleTaskResponse
|
||||
16, // 29: cron.Cron.GetListExecutionRecord:output_type -> cron.GetListExecutionRecordResponse
|
||||
18, // 30: cron.Cron.GetListExecutionResult:output_type -> cron.GetListExecutionResultResponse
|
||||
20, // 31: cron.Cron.GetScheduleTaskStatus:output_type -> cron.GetScheduleTaskStatusResponse
|
||||
1, // 32: cron.Cron.PauseScheduleTask:output_type -> cron.CommonResponse
|
||||
1, // 33: cron.Cron.StartScheduleTask:output_type -> cron.CommonResponse
|
||||
1, // 34: cron.Cron.RepublishScheduleTask:output_type -> cron.CommonResponse
|
||||
25, // [25:35] is the sub-list for method output_type
|
||||
15, // [15:25] is the sub-list for method input_type
|
||||
15, // [15:15] is the sub-list for extension type_name
|
||||
15, // [15:15] is the sub-list for extension extendee
|
||||
0, // [0:15] is the sub-list for field type_name
|
||||
@ -2374,7 +2407,7 @@ func file_pb_cron_proto_init() {
|
||||
NumEnums: 0,
|
||||
NumMessages: 22,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_pb_cron_proto_goTypes,
|
||||
DependencyIndexes: file_pb_cron_proto_depIdxs,
|
||||
|
||||
@ -7,6 +7,7 @@ import (
|
||||
fmt "fmt"
|
||||
math "math"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
_ "google.golang.org/protobuf/types/known/emptypb"
|
||||
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
|
||||
)
|
||||
|
||||
|
||||
@ -31,13 +31,14 @@ const _ = grpc_go.SupportPackageIsVersion7
|
||||
type CronClient interface {
|
||||
CreateScheduleTask(ctx context.Context, in *CreateScheduleTaskRequest, opts ...grpc_go.CallOption) (*CreateScheduleTaskResponse, common.ErrorWithAttachment)
|
||||
UpdateScheduleTask(ctx context.Context, in *UpdateScheduleTaskRequest, opts ...grpc_go.CallOption) (*UpdateScheduleTaskResponse, common.ErrorWithAttachment)
|
||||
DeleteScheduleTask(ctx context.Context, in *CommonIDRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
||||
GetListScheduleTask(ctx context.Context, in *GetListScheduleTaskRequest, opts ...grpc_go.CallOption) (*GetListScheduleTaskResponse, common.ErrorWithAttachment)
|
||||
GetListExecutionRecord(ctx context.Context, in *GetListExecutionRecordRequest, opts ...grpc_go.CallOption) (*GetListExecutionRecordResponse, common.ErrorWithAttachment)
|
||||
GetListExecutionResult(ctx context.Context, in *GetListExecutionResultRequest, opts ...grpc_go.CallOption) (*GetListExecutionResultResponse, common.ErrorWithAttachment)
|
||||
GetScheduleTaskStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc_go.CallOption) (*GetScheduleTaskStatusResponse, common.ErrorWithAttachment)
|
||||
PauseScheduleTask(ctx context.Context, in *CommonIDRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
||||
StartScheduleTask(ctx context.Context, in *CommonIDRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
||||
DeleteScheduleTask(ctx context.Context, in *CommonIDRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
||||
GetScheduleTaskStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc_go.CallOption) (*GetScheduleTaskStatusResponse, common.ErrorWithAttachment)
|
||||
RepublishScheduleTask(ctx context.Context, in *CommonIDRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
||||
}
|
||||
|
||||
type cronClient struct {
|
||||
@ -47,13 +48,14 @@ type cronClient struct {
|
||||
type CronClientImpl struct {
|
||||
CreateScheduleTask func(ctx context.Context, in *CreateScheduleTaskRequest) (*CreateScheduleTaskResponse, error)
|
||||
UpdateScheduleTask func(ctx context.Context, in *UpdateScheduleTaskRequest) (*UpdateScheduleTaskResponse, error)
|
||||
DeleteScheduleTask func(ctx context.Context, in *CommonIDRequest) (*CommonResponse, error)
|
||||
GetListScheduleTask func(ctx context.Context, in *GetListScheduleTaskRequest) (*GetListScheduleTaskResponse, error)
|
||||
GetListExecutionRecord func(ctx context.Context, in *GetListExecutionRecordRequest) (*GetListExecutionRecordResponse, error)
|
||||
GetListExecutionResult func(ctx context.Context, in *GetListExecutionResultRequest) (*GetListExecutionResultResponse, error)
|
||||
GetScheduleTaskStatus func(ctx context.Context, in *emptypb.Empty) (*GetScheduleTaskStatusResponse, error)
|
||||
PauseScheduleTask func(ctx context.Context, in *CommonIDRequest) (*CommonResponse, error)
|
||||
StartScheduleTask func(ctx context.Context, in *CommonIDRequest) (*CommonResponse, error)
|
||||
DeleteScheduleTask func(ctx context.Context, in *CommonIDRequest) (*CommonResponse, error)
|
||||
GetScheduleTaskStatus func(ctx context.Context, in *emptypb.Empty) (*GetScheduleTaskStatusResponse, error)
|
||||
RepublishScheduleTask func(ctx context.Context, in *CommonIDRequest) (*CommonResponse, error)
|
||||
}
|
||||
|
||||
func (c *CronClientImpl) GetDubboStub(cc *triple.TripleConn) CronClient {
|
||||
@ -80,6 +82,11 @@ func (c *cronClient) UpdateScheduleTask(ctx context.Context, in *UpdateScheduleT
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateScheduleTask", in, out)
|
||||
}
|
||||
|
||||
func (c *cronClient) DeleteScheduleTask(ctx context.Context, in *CommonIDRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
|
||||
out := new(CommonResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DeleteScheduleTask", in, out)
|
||||
}
|
||||
func (c *cronClient) GetListScheduleTask(ctx context.Context, in *GetListScheduleTaskRequest, opts ...grpc_go.CallOption) (*GetListScheduleTaskResponse, common.ErrorWithAttachment) {
|
||||
out := new(GetListScheduleTaskResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
@ -98,6 +105,12 @@ func (c *cronClient) GetListExecutionResult(ctx context.Context, in *GetListExec
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetListExecutionResult", in, out)
|
||||
}
|
||||
|
||||
func (c *cronClient) GetScheduleTaskStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc_go.CallOption) (*GetScheduleTaskStatusResponse, common.ErrorWithAttachment) {
|
||||
out := new(GetScheduleTaskStatusResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetScheduleTaskStatus", in, out)
|
||||
}
|
||||
|
||||
func (c *cronClient) PauseScheduleTask(ctx context.Context, in *CommonIDRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
|
||||
out := new(CommonResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
@ -110,16 +123,10 @@ func (c *cronClient) StartScheduleTask(ctx context.Context, in *CommonIDRequest,
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/StartScheduleTask", in, out)
|
||||
}
|
||||
|
||||
func (c *cronClient) DeleteScheduleTask(ctx context.Context, in *CommonIDRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
|
||||
func (c *cronClient) RepublishScheduleTask(ctx context.Context, in *CommonIDRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
|
||||
out := new(CommonResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DeleteScheduleTask", in, out)
|
||||
}
|
||||
|
||||
func (c *cronClient) GetScheduleTaskStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc_go.CallOption) (*GetScheduleTaskStatusResponse, common.ErrorWithAttachment) {
|
||||
out := new(GetScheduleTaskStatusResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetScheduleTaskStatus", in, out)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/RepublishScheduleTask", in, out)
|
||||
}
|
||||
|
||||
// CronServer is the server API for Cron service.
|
||||
@ -128,13 +135,14 @@ func (c *cronClient) GetScheduleTaskStatus(ctx context.Context, in *emptypb.Empt
|
||||
type CronServer interface {
|
||||
CreateScheduleTask(context.Context, *CreateScheduleTaskRequest) (*CreateScheduleTaskResponse, error)
|
||||
UpdateScheduleTask(context.Context, *UpdateScheduleTaskRequest) (*UpdateScheduleTaskResponse, error)
|
||||
DeleteScheduleTask(context.Context, *CommonIDRequest) (*CommonResponse, error)
|
||||
GetListScheduleTask(context.Context, *GetListScheduleTaskRequest) (*GetListScheduleTaskResponse, error)
|
||||
GetListExecutionRecord(context.Context, *GetListExecutionRecordRequest) (*GetListExecutionRecordResponse, error)
|
||||
GetListExecutionResult(context.Context, *GetListExecutionResultRequest) (*GetListExecutionResultResponse, error)
|
||||
GetScheduleTaskStatus(context.Context, *emptypb.Empty) (*GetScheduleTaskStatusResponse, error)
|
||||
PauseScheduleTask(context.Context, *CommonIDRequest) (*CommonResponse, error)
|
||||
StartScheduleTask(context.Context, *CommonIDRequest) (*CommonResponse, error)
|
||||
DeleteScheduleTask(context.Context, *CommonIDRequest) (*CommonResponse, error)
|
||||
GetScheduleTaskStatus(context.Context, *emptypb.Empty) (*GetScheduleTaskStatusResponse, error)
|
||||
RepublishScheduleTask(context.Context, *CommonIDRequest) (*CommonResponse, error)
|
||||
mustEmbedUnimplementedCronServer()
|
||||
}
|
||||
|
||||
@ -149,6 +157,9 @@ func (UnimplementedCronServer) CreateScheduleTask(context.Context, *CreateSchedu
|
||||
func (UnimplementedCronServer) UpdateScheduleTask(context.Context, *UpdateScheduleTaskRequest) (*UpdateScheduleTaskResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateScheduleTask not implemented")
|
||||
}
|
||||
func (UnimplementedCronServer) DeleteScheduleTask(context.Context, *CommonIDRequest) (*CommonResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteScheduleTask not implemented")
|
||||
}
|
||||
func (UnimplementedCronServer) GetListScheduleTask(context.Context, *GetListScheduleTaskRequest) (*GetListScheduleTaskResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetListScheduleTask not implemented")
|
||||
}
|
||||
@ -158,17 +169,17 @@ func (UnimplementedCronServer) GetListExecutionRecord(context.Context, *GetListE
|
||||
func (UnimplementedCronServer) GetListExecutionResult(context.Context, *GetListExecutionResultRequest) (*GetListExecutionResultResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetListExecutionResult not implemented")
|
||||
}
|
||||
func (UnimplementedCronServer) GetScheduleTaskStatus(context.Context, *emptypb.Empty) (*GetScheduleTaskStatusResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetScheduleTaskStatus not implemented")
|
||||
}
|
||||
func (UnimplementedCronServer) PauseScheduleTask(context.Context, *CommonIDRequest) (*CommonResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method PauseScheduleTask not implemented")
|
||||
}
|
||||
func (UnimplementedCronServer) StartScheduleTask(context.Context, *CommonIDRequest) (*CommonResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method StartScheduleTask not implemented")
|
||||
}
|
||||
func (UnimplementedCronServer) DeleteScheduleTask(context.Context, *CommonIDRequest) (*CommonResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteScheduleTask not implemented")
|
||||
}
|
||||
func (UnimplementedCronServer) GetScheduleTaskStatus(context.Context, *emptypb.Empty) (*GetScheduleTaskStatusResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetScheduleTaskStatus not implemented")
|
||||
func (UnimplementedCronServer) RepublishScheduleTask(context.Context, *CommonIDRequest) (*CommonResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RepublishScheduleTask not implemented")
|
||||
}
|
||||
func (s *UnimplementedCronServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
||||
s.proxyImpl = impl
|
||||
@ -256,6 +267,35 @@ func _Cron_UpdateScheduleTask_Handler(srv interface{}, ctx context.Context, dec
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Cron_DeleteScheduleTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CommonIDRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("DeleteScheduleTask", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Cron_GetListScheduleTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetListScheduleTaskRequest)
|
||||
if err := dec(in); err != nil {
|
||||
@ -343,6 +383,35 @@ func _Cron_GetListExecutionResult_Handler(srv interface{}, ctx context.Context,
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Cron_GetScheduleTaskStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(emptypb.Empty)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("GetScheduleTaskStatus", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Cron_PauseScheduleTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CommonIDRequest)
|
||||
if err := dec(in); err != nil {
|
||||
@ -401,7 +470,7 @@ func _Cron_StartScheduleTask_Handler(srv interface{}, ctx context.Context, dec f
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Cron_DeleteScheduleTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _Cron_RepublishScheduleTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CommonIDRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
@ -414,36 +483,7 @@ func _Cron_DeleteScheduleTask_Handler(srv interface{}, ctx context.Context, dec
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("DeleteScheduleTask", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Cron_GetScheduleTaskStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(emptypb.Empty)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("GetScheduleTaskStatus", args, invAttachment)
|
||||
invo := invocation.NewRPCInvocation("RepublishScheduleTask", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
@ -474,6 +514,10 @@ var Cron_ServiceDesc = grpc_go.ServiceDesc{
|
||||
MethodName: "UpdateScheduleTask",
|
||||
Handler: _Cron_UpdateScheduleTask_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteScheduleTask",
|
||||
Handler: _Cron_DeleteScheduleTask_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetListScheduleTask",
|
||||
Handler: _Cron_GetListScheduleTask_Handler,
|
||||
@ -486,6 +530,10 @@ var Cron_ServiceDesc = grpc_go.ServiceDesc{
|
||||
MethodName: "GetListExecutionResult",
|
||||
Handler: _Cron_GetListExecutionResult_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetScheduleTaskStatus",
|
||||
Handler: _Cron_GetScheduleTaskStatus_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "PauseScheduleTask",
|
||||
Handler: _Cron_PauseScheduleTask_Handler,
|
||||
@ -495,12 +543,8 @@ var Cron_ServiceDesc = grpc_go.ServiceDesc{
|
||||
Handler: _Cron_StartScheduleTask_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteScheduleTask",
|
||||
Handler: _Cron_DeleteScheduleTask_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetScheduleTaskStatus",
|
||||
Handler: _Cron_GetScheduleTaskStatus_Handler,
|
||||
MethodName: "RepublishScheduleTask",
|
||||
Handler: _Cron_RepublishScheduleTask_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc_go.StreamDesc{},
|
||||
|
||||
644
api/emailAlerts/emailAlerts.pb.go
Normal file
644
api/emailAlerts/emailAlerts.pb.go
Normal file
@ -0,0 +1,644 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v5.26.0
|
||||
// source: api/emailAlerts/emailAlerts.proto
|
||||
|
||||
package emailAlerts
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type EmailAlertsSubmitReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
FirstName string `protobuf:"bytes,1,opt,name=firstName,proto3" json:"firstName"`
|
||||
LastName string `protobuf:"bytes,2,opt,name=lastName,proto3" json:"lastName"`
|
||||
Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email"`
|
||||
Company string `protobuf:"bytes,4,opt,name=company,proto3" json:"company"`
|
||||
Phone string `protobuf:"bytes,5,opt,name=phone,proto3" json:"phone"`
|
||||
}
|
||||
|
||||
func (x *EmailAlertsSubmitReq) Reset() {
|
||||
*x = EmailAlertsSubmitReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *EmailAlertsSubmitReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*EmailAlertsSubmitReq) ProtoMessage() {}
|
||||
|
||||
func (x *EmailAlertsSubmitReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use EmailAlertsSubmitReq.ProtoReflect.Descriptor instead.
|
||||
func (*EmailAlertsSubmitReq) Descriptor() ([]byte, []int) {
|
||||
return file_api_emailAlerts_emailAlerts_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *EmailAlertsSubmitReq) GetFirstName() string {
|
||||
if x != nil {
|
||||
return x.FirstName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *EmailAlertsSubmitReq) GetLastName() string {
|
||||
if x != nil {
|
||||
return x.LastName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *EmailAlertsSubmitReq) GetEmail() string {
|
||||
if x != nil {
|
||||
return x.Email
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *EmailAlertsSubmitReq) GetCompany() string {
|
||||
if x != nil {
|
||||
return x.Company
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *EmailAlertsSubmitReq) GetPhone() string {
|
||||
if x != nil {
|
||||
return x.Phone
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type EmailAlertsSubmitResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg"`
|
||||
}
|
||||
|
||||
func (x *EmailAlertsSubmitResp) Reset() {
|
||||
*x = EmailAlertsSubmitResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *EmailAlertsSubmitResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*EmailAlertsSubmitResp) ProtoMessage() {}
|
||||
|
||||
func (x *EmailAlertsSubmitResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use EmailAlertsSubmitResp.ProtoReflect.Descriptor instead.
|
||||
func (*EmailAlertsSubmitResp) Descriptor() ([]byte, []int) {
|
||||
return file_api_emailAlerts_emailAlerts_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *EmailAlertsSubmitResp) GetMsg() string {
|
||||
if x != nil {
|
||||
return x.Msg
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// ========================= EmailInformatio ==============================
|
||||
type Filtrate struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
|
||||
Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email"`
|
||||
Company string `protobuf:"bytes,3,opt,name=company,proto3" json:"company"`
|
||||
}
|
||||
|
||||
func (x *Filtrate) Reset() {
|
||||
*x = Filtrate{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Filtrate) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Filtrate) ProtoMessage() {}
|
||||
|
||||
func (x *Filtrate) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Filtrate.ProtoReflect.Descriptor instead.
|
||||
func (*Filtrate) Descriptor() ([]byte, []int) {
|
||||
return file_api_emailAlerts_emailAlerts_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *Filtrate) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Filtrate) GetEmail() string {
|
||||
if x != nil {
|
||||
return x.Email
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Filtrate) GetCompany() string {
|
||||
if x != nil {
|
||||
return x.Company
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type GetEmailInformationListReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page"`
|
||||
PageSize int32 `protobuf:"varint,2,opt,name=pageSize,proto3" json:"pageSize"`
|
||||
Filtrate *Filtrate `protobuf:"bytes,3,opt,name=filtrate,proto3" json:"filtrate"`
|
||||
}
|
||||
|
||||
func (x *GetEmailInformationListReq) Reset() {
|
||||
*x = GetEmailInformationListReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GetEmailInformationListReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetEmailInformationListReq) ProtoMessage() {}
|
||||
|
||||
func (x *GetEmailInformationListReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetEmailInformationListReq.ProtoReflect.Descriptor instead.
|
||||
func (*GetEmailInformationListReq) Descriptor() ([]byte, []int) {
|
||||
return file_api_emailAlerts_emailAlerts_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *GetEmailInformationListReq) GetPage() int32 {
|
||||
if x != nil {
|
||||
return x.Page
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GetEmailInformationListReq) GetPageSize() int32 {
|
||||
if x != nil {
|
||||
return x.PageSize
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GetEmailInformationListReq) GetFiltrate() *Filtrate {
|
||||
if x != nil {
|
||||
return x.Filtrate
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type GetEmailInformationListResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg"`
|
||||
Page int32 `protobuf:"varint,2,opt,name=page,proto3" json:"page"`
|
||||
PageSize int32 `protobuf:"varint,3,opt,name=pageSize,proto3" json:"pageSize"`
|
||||
Total int32 `protobuf:"varint,4,opt,name=total,proto3" json:"total"`
|
||||
Data []*EmailInformation `protobuf:"bytes,5,rep,name=data,proto3" json:"data"`
|
||||
}
|
||||
|
||||
func (x *GetEmailInformationListResp) Reset() {
|
||||
*x = GetEmailInformationListResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GetEmailInformationListResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetEmailInformationListResp) ProtoMessage() {}
|
||||
|
||||
func (x *GetEmailInformationListResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetEmailInformationListResp.ProtoReflect.Descriptor instead.
|
||||
func (*GetEmailInformationListResp) Descriptor() ([]byte, []int) {
|
||||
return file_api_emailAlerts_emailAlerts_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *GetEmailInformationListResp) GetMsg() string {
|
||||
if x != nil {
|
||||
return x.Msg
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetEmailInformationListResp) GetPage() int32 {
|
||||
if x != nil {
|
||||
return x.Page
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GetEmailInformationListResp) GetPageSize() int32 {
|
||||
if x != nil {
|
||||
return x.PageSize
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GetEmailInformationListResp) GetTotal() int32 {
|
||||
if x != nil {
|
||||
return x.Total
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GetEmailInformationListResp) GetData() []*EmailInformation {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type EmailInformation struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"`
|
||||
FullName string `protobuf:"bytes,2,opt,name=fullName,proto3" json:"fullName"`
|
||||
Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email"`
|
||||
Company string `protobuf:"bytes,4,opt,name=company,proto3" json:"company"`
|
||||
Phone string `protobuf:"bytes,5,opt,name=phone,proto3" json:"phone"`
|
||||
CreatedAt string `protobuf:"bytes,6,opt,name=createdAt,proto3" json:"createdAt"`
|
||||
}
|
||||
|
||||
func (x *EmailInformation) Reset() {
|
||||
*x = EmailInformation{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *EmailInformation) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*EmailInformation) ProtoMessage() {}
|
||||
|
||||
func (x *EmailInformation) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use EmailInformation.ProtoReflect.Descriptor instead.
|
||||
func (*EmailInformation) Descriptor() ([]byte, []int) {
|
||||
return file_api_emailAlerts_emailAlerts_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *EmailInformation) GetId() int32 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *EmailInformation) GetFullName() string {
|
||||
if x != nil {
|
||||
return x.FullName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *EmailInformation) GetEmail() string {
|
||||
if x != nil {
|
||||
return x.Email
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *EmailInformation) GetCompany() string {
|
||||
if x != nil {
|
||||
return x.Company
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *EmailInformation) GetPhone() string {
|
||||
if x != nil {
|
||||
return x.Phone
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *EmailInformation) GetCreatedAt() string {
|
||||
if x != nil {
|
||||
return x.CreatedAt
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_api_emailAlerts_emailAlerts_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_api_emailAlerts_emailAlerts_proto_rawDesc = []byte{
|
||||
0x0a, 0x21, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74,
|
||||
0x73, 0x2f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73,
|
||||
0x22, 0x96, 0x01, 0x0a, 0x14, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73,
|
||||
0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x69, 0x72,
|
||||
0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69,
|
||||
0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x4e,
|
||||
0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x4e,
|
||||
0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d,
|
||||
0x70, 0x61, 0x6e, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x70,
|
||||
0x61, 0x6e, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x05, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x22, 0x29, 0x0a, 0x15, 0x45, 0x6d, 0x61,
|
||||
0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65,
|
||||
0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x03, 0x6d, 0x73, 0x67, 0x22, 0x4e, 0x0a, 0x08, 0x46, 0x69, 0x6c, 0x74, 0x72, 0x61, 0x74, 0x65,
|
||||
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f,
|
||||
0x6d, 0x70, 0x61, 0x6e, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d,
|
||||
0x70, 0x61, 0x6e, 0x79, 0x22, 0x7f, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x45, 0x6d, 0x61, 0x69, 0x6c,
|
||||
0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52,
|
||||
0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69,
|
||||
0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69,
|
||||
0x7a, 0x65, 0x12, 0x31, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x74, 0x72, 0x61, 0x74, 0x65, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72,
|
||||
0x74, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x72, 0x61, 0x74, 0x65, 0x52, 0x08, 0x66, 0x69, 0x6c,
|
||||
0x74, 0x72, 0x61, 0x74, 0x65, 0x22, 0xa8, 0x01, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x45, 0x6d, 0x61,
|
||||
0x69, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73,
|
||||
0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70,
|
||||
0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70,
|
||||
0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c,
|
||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x31, 0x0a,
|
||||
0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6d,
|
||||
0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x2e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x49,
|
||||
0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61,
|
||||
0x22, 0xa2, 0x01, 0x0a, 0x10, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d,
|
||||
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d,
|
||||
0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x70, 0x61,
|
||||
0x6e, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e,
|
||||
0x79, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74,
|
||||
0x65, 0x64, 0x41, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61,
|
||||
0x74, 0x65, 0x64, 0x41, 0x74, 0x32, 0xd7, 0x01, 0x0a, 0x0b, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41,
|
||||
0x6c, 0x65, 0x72, 0x74, 0x73, 0x12, 0x5a, 0x0a, 0x11, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c,
|
||||
0x65, 0x72, 0x74, 0x73, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x12, 0x21, 0x2e, 0x65, 0x6d, 0x61,
|
||||
0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x2e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c,
|
||||
0x65, 0x72, 0x74, 0x73, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e,
|
||||
0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x2e, 0x45, 0x6d, 0x61, 0x69,
|
||||
0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73,
|
||||
0x70, 0x12, 0x6c, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x49, 0x6e, 0x66,
|
||||
0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x27, 0x2e, 0x65,
|
||||
0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6d,
|
||||
0x61, 0x69, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69,
|
||||
0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x28, 0x2e, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65,
|
||||
0x72, 0x74, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x49, 0x6e, 0x66, 0x6f,
|
||||
0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x42,
|
||||
0x10, 0x5a, 0x0e, 0x2e, 0x2f, 0x3b, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74,
|
||||
0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_api_emailAlerts_emailAlerts_proto_rawDescOnce sync.Once
|
||||
file_api_emailAlerts_emailAlerts_proto_rawDescData = file_api_emailAlerts_emailAlerts_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_api_emailAlerts_emailAlerts_proto_rawDescGZIP() []byte {
|
||||
file_api_emailAlerts_emailAlerts_proto_rawDescOnce.Do(func() {
|
||||
file_api_emailAlerts_emailAlerts_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_emailAlerts_emailAlerts_proto_rawDescData)
|
||||
})
|
||||
return file_api_emailAlerts_emailAlerts_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_api_emailAlerts_emailAlerts_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||
var file_api_emailAlerts_emailAlerts_proto_goTypes = []interface{}{
|
||||
(*EmailAlertsSubmitReq)(nil), // 0: emailAlerts.EmailAlertsSubmitReq
|
||||
(*EmailAlertsSubmitResp)(nil), // 1: emailAlerts.EmailAlertsSubmitResp
|
||||
(*Filtrate)(nil), // 2: emailAlerts.Filtrate
|
||||
(*GetEmailInformationListReq)(nil), // 3: emailAlerts.GetEmailInformationListReq
|
||||
(*GetEmailInformationListResp)(nil), // 4: emailAlerts.GetEmailInformationListResp
|
||||
(*EmailInformation)(nil), // 5: emailAlerts.EmailInformation
|
||||
}
|
||||
var file_api_emailAlerts_emailAlerts_proto_depIdxs = []int32{
|
||||
2, // 0: emailAlerts.GetEmailInformationListReq.filtrate:type_name -> emailAlerts.Filtrate
|
||||
5, // 1: emailAlerts.GetEmailInformationListResp.data:type_name -> emailAlerts.EmailInformation
|
||||
0, // 2: emailAlerts.EmailAlerts.EmailAlertsSubmit:input_type -> emailAlerts.EmailAlertsSubmitReq
|
||||
3, // 3: emailAlerts.EmailAlerts.GetEmailInformationList:input_type -> emailAlerts.GetEmailInformationListReq
|
||||
1, // 4: emailAlerts.EmailAlerts.EmailAlertsSubmit:output_type -> emailAlerts.EmailAlertsSubmitResp
|
||||
4, // 5: emailAlerts.EmailAlerts.GetEmailInformationList:output_type -> emailAlerts.GetEmailInformationListResp
|
||||
4, // [4:6] is the sub-list for method output_type
|
||||
2, // [2:4] is the sub-list for method input_type
|
||||
2, // [2:2] is the sub-list for extension type_name
|
||||
2, // [2:2] is the sub-list for extension extendee
|
||||
0, // [0:2] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_api_emailAlerts_emailAlerts_proto_init() }
|
||||
func file_api_emailAlerts_emailAlerts_proto_init() {
|
||||
if File_api_emailAlerts_emailAlerts_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_api_emailAlerts_emailAlerts_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*EmailAlertsSubmitReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_emailAlerts_emailAlerts_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*EmailAlertsSubmitResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_emailAlerts_emailAlerts_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Filtrate); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_emailAlerts_emailAlerts_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetEmailInformationListReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_emailAlerts_emailAlerts_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetEmailInformationListResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_emailAlerts_emailAlerts_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*EmailInformation); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_api_emailAlerts_emailAlerts_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 6,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_api_emailAlerts_emailAlerts_proto_goTypes,
|
||||
DependencyIndexes: file_api_emailAlerts_emailAlerts_proto_depIdxs,
|
||||
MessageInfos: file_api_emailAlerts_emailAlerts_proto_msgTypes,
|
||||
}.Build()
|
||||
File_api_emailAlerts_emailAlerts_proto = out.File
|
||||
file_api_emailAlerts_emailAlerts_proto_rawDesc = nil
|
||||
file_api_emailAlerts_emailAlerts_proto_goTypes = nil
|
||||
file_api_emailAlerts_emailAlerts_proto_depIdxs = nil
|
||||
}
|
||||
47
api/emailAlerts/emailAlerts.validator.pb.go
Normal file
47
api/emailAlerts/emailAlerts.validator.pb.go
Normal file
@ -0,0 +1,47 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: api/emailAlerts/emailAlerts.proto
|
||||
|
||||
package emailAlerts
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
math "math"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
func (this *EmailAlertsSubmitReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *EmailAlertsSubmitResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *Filtrate) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetEmailInformationListReq) Validate() error {
|
||||
if this.Filtrate != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Filtrate); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Filtrate", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *GetEmailInformationListResp) Validate() error {
|
||||
for _, item := range this.Data {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *EmailInformation) Validate() error {
|
||||
return nil
|
||||
}
|
||||
194
api/emailAlerts/emailAlerts_triple.pb.go
Normal file
194
api/emailAlerts/emailAlerts_triple.pb.go
Normal file
@ -0,0 +1,194 @@
|
||||
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-triple v1.0.5
|
||||
// - protoc v5.26.0
|
||||
// source: api/emailAlerts/emailAlerts.proto
|
||||
|
||||
package emailAlerts
|
||||
|
||||
import (
|
||||
context "context"
|
||||
protocol "dubbo.apache.org/dubbo-go/v3/protocol"
|
||||
dubbo3 "dubbo.apache.org/dubbo-go/v3/protocol/dubbo3"
|
||||
invocation "dubbo.apache.org/dubbo-go/v3/protocol/invocation"
|
||||
grpc_go "github.com/dubbogo/grpc-go"
|
||||
codes "github.com/dubbogo/grpc-go/codes"
|
||||
metadata "github.com/dubbogo/grpc-go/metadata"
|
||||
status "github.com/dubbogo/grpc-go/status"
|
||||
common "github.com/dubbogo/triple/pkg/common"
|
||||
constant "github.com/dubbogo/triple/pkg/common/constant"
|
||||
triple "github.com/dubbogo/triple/pkg/triple"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc_go.SupportPackageIsVersion7
|
||||
|
||||
// EmailAlertsClient is the client API for EmailAlerts service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type EmailAlertsClient interface {
|
||||
EmailAlertsSubmit(ctx context.Context, in *EmailAlertsSubmitReq, opts ...grpc_go.CallOption) (*EmailAlertsSubmitResp, common.ErrorWithAttachment)
|
||||
// ========================= EmailInformatio ==============================
|
||||
GetEmailInformationList(ctx context.Context, in *GetEmailInformationListReq, opts ...grpc_go.CallOption) (*GetEmailInformationListResp, common.ErrorWithAttachment)
|
||||
}
|
||||
|
||||
type emailAlertsClient struct {
|
||||
cc *triple.TripleConn
|
||||
}
|
||||
|
||||
type EmailAlertsClientImpl struct {
|
||||
EmailAlertsSubmit func(ctx context.Context, in *EmailAlertsSubmitReq) (*EmailAlertsSubmitResp, error)
|
||||
GetEmailInformationList func(ctx context.Context, in *GetEmailInformationListReq) (*GetEmailInformationListResp, error)
|
||||
}
|
||||
|
||||
func (c *EmailAlertsClientImpl) GetDubboStub(cc *triple.TripleConn) EmailAlertsClient {
|
||||
return NewEmailAlertsClient(cc)
|
||||
}
|
||||
|
||||
func (c *EmailAlertsClientImpl) XXX_InterfaceName() string {
|
||||
return "emailAlerts.EmailAlerts"
|
||||
}
|
||||
|
||||
func NewEmailAlertsClient(cc *triple.TripleConn) EmailAlertsClient {
|
||||
return &emailAlertsClient{cc}
|
||||
}
|
||||
|
||||
func (c *emailAlertsClient) EmailAlertsSubmit(ctx context.Context, in *EmailAlertsSubmitReq, opts ...grpc_go.CallOption) (*EmailAlertsSubmitResp, common.ErrorWithAttachment) {
|
||||
out := new(EmailAlertsSubmitResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/EmailAlertsSubmit", in, out)
|
||||
}
|
||||
|
||||
func (c *emailAlertsClient) GetEmailInformationList(ctx context.Context, in *GetEmailInformationListReq, opts ...grpc_go.CallOption) (*GetEmailInformationListResp, common.ErrorWithAttachment) {
|
||||
out := new(GetEmailInformationListResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetEmailInformationList", in, out)
|
||||
}
|
||||
|
||||
// EmailAlertsServer is the server API for EmailAlerts service.
|
||||
// All implementations must embed UnimplementedEmailAlertsServer
|
||||
// for forward compatibility
|
||||
type EmailAlertsServer interface {
|
||||
EmailAlertsSubmit(context.Context, *EmailAlertsSubmitReq) (*EmailAlertsSubmitResp, error)
|
||||
// ========================= EmailInformatio ==============================
|
||||
GetEmailInformationList(context.Context, *GetEmailInformationListReq) (*GetEmailInformationListResp, error)
|
||||
mustEmbedUnimplementedEmailAlertsServer()
|
||||
}
|
||||
|
||||
// UnimplementedEmailAlertsServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedEmailAlertsServer struct {
|
||||
proxyImpl protocol.Invoker
|
||||
}
|
||||
|
||||
func (UnimplementedEmailAlertsServer) EmailAlertsSubmit(context.Context, *EmailAlertsSubmitReq) (*EmailAlertsSubmitResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method EmailAlertsSubmit not implemented")
|
||||
}
|
||||
func (UnimplementedEmailAlertsServer) GetEmailInformationList(context.Context, *GetEmailInformationListReq) (*GetEmailInformationListResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetEmailInformationList not implemented")
|
||||
}
|
||||
func (s *UnimplementedEmailAlertsServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
||||
s.proxyImpl = impl
|
||||
}
|
||||
|
||||
func (s *UnimplementedEmailAlertsServer) XXX_GetProxyImpl() protocol.Invoker {
|
||||
return s.proxyImpl
|
||||
}
|
||||
|
||||
func (s *UnimplementedEmailAlertsServer) XXX_ServiceDesc() *grpc_go.ServiceDesc {
|
||||
return &EmailAlerts_ServiceDesc
|
||||
}
|
||||
func (s *UnimplementedEmailAlertsServer) XXX_InterfaceName() string {
|
||||
return "emailAlerts.EmailAlerts"
|
||||
}
|
||||
|
||||
func (UnimplementedEmailAlertsServer) mustEmbedUnimplementedEmailAlertsServer() {}
|
||||
|
||||
// UnsafeEmailAlertsServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to EmailAlertsServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeEmailAlertsServer interface {
|
||||
mustEmbedUnimplementedEmailAlertsServer()
|
||||
}
|
||||
|
||||
func RegisterEmailAlertsServer(s grpc_go.ServiceRegistrar, srv EmailAlertsServer) {
|
||||
s.RegisterService(&EmailAlerts_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _EmailAlerts_EmailAlertsSubmit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(EmailAlertsSubmitReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("EmailAlertsSubmit", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _EmailAlerts_GetEmailInformationList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetEmailInformationListReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("GetEmailInformationList", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// EmailAlerts_ServiceDesc is the grpc_go.ServiceDesc for EmailAlerts service.
|
||||
// It's only intended for direct use with grpc_go.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var EmailAlerts_ServiceDesc = grpc_go.ServiceDesc{
|
||||
ServiceName: "emailAlerts.EmailAlerts",
|
||||
HandlerType: (*EmailAlertsServer)(nil),
|
||||
Methods: []grpc_go.MethodDesc{
|
||||
{
|
||||
MethodName: "EmailAlertsSubmit",
|
||||
Handler: _EmailAlerts_EmailAlertsSubmit_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetEmailInformationList",
|
||||
Handler: _EmailAlerts_GetEmailInformationList_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc_go.StreamDesc{},
|
||||
Metadata: "api/emailAlerts/emailAlerts.proto",
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -9,20 +9,53 @@ service Governance{
|
||||
rpc List(ListReq) returns (ListResp) {}
|
||||
rpc Delete(DeleteReq) returns (DeleteResp) {}
|
||||
rpc Edit(EditReq) returns (EditResp) {}
|
||||
rpc UpdataStatus(UpdataStatusReq) returns (UpdataStatusResp) {}
|
||||
rpc GetGovernanceInfo(GetGovernanceInfoReq) returns (GetGovernanceInfoResp) {}
|
||||
rpc Create(CreateReq) returns (CreateResp) {}
|
||||
rpc Display(DisplayReq) returns (DisplayResp) {}
|
||||
}
|
||||
|
||||
message LangSetting {
|
||||
string langType = 1;//语言类型
|
||||
int32 isSetting = 2;//是否设置
|
||||
}
|
||||
|
||||
message GovernanceLangData{
|
||||
string title = 1;//标题
|
||||
string attachment = 2;//附件
|
||||
string attachmentName = 3;//附件名称
|
||||
int32 isSetting = 4;//是否设置
|
||||
}
|
||||
|
||||
message GovernanceLang{
|
||||
string langType = 1;//语言类型
|
||||
GovernanceLangData data = 2;//语言数据
|
||||
}
|
||||
|
||||
message GovernanceInfo{
|
||||
string uuid = 1;
|
||||
repeated GovernanceLang dataByLang = 2;//语言数据
|
||||
int32 sort = 3;//排序
|
||||
int32 status = 4;//状态
|
||||
}
|
||||
|
||||
message Item{
|
||||
int32 id = 1;
|
||||
string uuid = 1;
|
||||
string title = 2;
|
||||
string attachment = 3;
|
||||
string attachmentName = 4;
|
||||
int32 sort = 5;
|
||||
int32 status = 6;
|
||||
int64 updatedAt = 7;
|
||||
string operator = 8;
|
||||
int32 operatorId = 9;
|
||||
repeated LangSetting langSetting = 5;//语言设置
|
||||
int32 sort = 6;
|
||||
int32 status = 7;
|
||||
int64 updatedAt = 8;
|
||||
string operator = 9;
|
||||
int32 operatorId = 10;
|
||||
}
|
||||
|
||||
message DisplayItem{
|
||||
string title = 1;
|
||||
string attachment = 2;
|
||||
string attachmentName = 3;
|
||||
}
|
||||
|
||||
message ListReq{
|
||||
@ -38,34 +71,48 @@ message ListResp{
|
||||
}
|
||||
|
||||
message DeleteReq{
|
||||
int32 id = 1;
|
||||
string uuid = 1;
|
||||
}
|
||||
|
||||
message DeleteResp{
|
||||
}
|
||||
|
||||
message EditReq{
|
||||
uint32 id = 1;
|
||||
string title = 2;
|
||||
string attachment = 3;
|
||||
string attachmentName = 4;
|
||||
int32 sort = 5;
|
||||
int32 status = 6;
|
||||
string operator = 7;
|
||||
int32 operatorId = 8;
|
||||
string uuid = 1;
|
||||
repeated GovernanceLang dataByLang = 2;
|
||||
int32 sort = 3;
|
||||
string operator = 4;
|
||||
int32 operatorId = 5;
|
||||
}
|
||||
|
||||
message EditResp{
|
||||
}
|
||||
|
||||
message UpdataStatusReq{
|
||||
string uuid = 1;
|
||||
int32 status = 2;
|
||||
string operator = 3;
|
||||
int32 operatorId = 4;
|
||||
}
|
||||
message UpdataStatusResp{
|
||||
string msg = 1;
|
||||
}
|
||||
|
||||
message GetGovernanceInfoReq{
|
||||
string uuid = 1;
|
||||
}
|
||||
message GetGovernanceInfoResp{
|
||||
string msg = 1;
|
||||
GovernanceInfo data = 2;
|
||||
}
|
||||
|
||||
message CreateReq{
|
||||
string title = 1;
|
||||
uint32 sort = 2;
|
||||
string attachment = 3;
|
||||
string attachmentName = 4;
|
||||
int32 status = 5;
|
||||
string operator = 6;
|
||||
int32 operatorId = 7;
|
||||
string uuid = 1;
|
||||
repeated GovernanceLang dataByLang = 2;
|
||||
uint32 sort = 3;
|
||||
int32 status = 4;
|
||||
string operator = 5;
|
||||
int32 operatorId = 6;
|
||||
}
|
||||
|
||||
message CreateResp{
|
||||
@ -73,9 +120,9 @@ message CreateResp{
|
||||
}
|
||||
|
||||
message DisplayReq{
|
||||
|
||||
string langType = 1;//语言类型
|
||||
}
|
||||
|
||||
message DisplayResp{
|
||||
repeated Item data = 1;
|
||||
repeated DisplayItem data = 1;
|
||||
}
|
||||
@ -1,5 +1,5 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: governance.proto
|
||||
// source: api/governance/governance.proto
|
||||
|
||||
package governance
|
||||
|
||||
@ -15,7 +15,41 @@ var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
func (this *LangSetting) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GovernanceLangData) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GovernanceLang) Validate() error {
|
||||
if this.Data != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *GovernanceInfo) Validate() error {
|
||||
for _, item := range this.DataByLang {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *Item) Validate() error {
|
||||
for _, item := range this.LangSetting {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("LangSetting", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *DisplayItem) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ListReq) Validate() error {
|
||||
@ -38,12 +72,43 @@ func (this *DeleteResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *EditReq) Validate() error {
|
||||
for _, item := range this.DataByLang {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *EditResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UpdataStatusReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UpdataStatusResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetGovernanceInfoReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetGovernanceInfoResp) Validate() error {
|
||||
if this.Data != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *CreateReq) Validate() error {
|
||||
for _, item := range this.DataByLang {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *CreateResp) Validate() error {
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-triple v1.0.8
|
||||
// - protoc v3.20.3
|
||||
// source: governance.proto
|
||||
// - protoc-gen-go-triple v1.0.5
|
||||
// - protoc v5.26.0
|
||||
// source: api/governance/governance.proto
|
||||
|
||||
package governance
|
||||
|
||||
@ -31,6 +31,8 @@ type GovernanceClient interface {
|
||||
List(ctx context.Context, in *ListReq, opts ...grpc_go.CallOption) (*ListResp, common.ErrorWithAttachment)
|
||||
Delete(ctx context.Context, in *DeleteReq, opts ...grpc_go.CallOption) (*DeleteResp, common.ErrorWithAttachment)
|
||||
Edit(ctx context.Context, in *EditReq, opts ...grpc_go.CallOption) (*EditResp, common.ErrorWithAttachment)
|
||||
UpdataStatus(ctx context.Context, in *UpdataStatusReq, opts ...grpc_go.CallOption) (*UpdataStatusResp, common.ErrorWithAttachment)
|
||||
GetGovernanceInfo(ctx context.Context, in *GetGovernanceInfoReq, opts ...grpc_go.CallOption) (*GetGovernanceInfoResp, common.ErrorWithAttachment)
|
||||
Create(ctx context.Context, in *CreateReq, opts ...grpc_go.CallOption) (*CreateResp, common.ErrorWithAttachment)
|
||||
Display(ctx context.Context, in *DisplayReq, opts ...grpc_go.CallOption) (*DisplayResp, common.ErrorWithAttachment)
|
||||
}
|
||||
@ -40,11 +42,13 @@ type governanceClient struct {
|
||||
}
|
||||
|
||||
type GovernanceClientImpl struct {
|
||||
List func(ctx context.Context, in *ListReq) (*ListResp, error)
|
||||
Delete func(ctx context.Context, in *DeleteReq) (*DeleteResp, error)
|
||||
Edit func(ctx context.Context, in *EditReq) (*EditResp, error)
|
||||
Create func(ctx context.Context, in *CreateReq) (*CreateResp, error)
|
||||
Display func(ctx context.Context, in *DisplayReq) (*DisplayResp, error)
|
||||
List func(ctx context.Context, in *ListReq) (*ListResp, error)
|
||||
Delete func(ctx context.Context, in *DeleteReq) (*DeleteResp, error)
|
||||
Edit func(ctx context.Context, in *EditReq) (*EditResp, error)
|
||||
UpdataStatus func(ctx context.Context, in *UpdataStatusReq) (*UpdataStatusResp, error)
|
||||
GetGovernanceInfo func(ctx context.Context, in *GetGovernanceInfoReq) (*GetGovernanceInfoResp, error)
|
||||
Create func(ctx context.Context, in *CreateReq) (*CreateResp, error)
|
||||
Display func(ctx context.Context, in *DisplayReq) (*DisplayResp, error)
|
||||
}
|
||||
|
||||
func (c *GovernanceClientImpl) GetDubboStub(cc *triple.TripleConn) GovernanceClient {
|
||||
@ -77,6 +81,18 @@ func (c *governanceClient) Edit(ctx context.Context, in *EditReq, opts ...grpc_g
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Edit", in, out)
|
||||
}
|
||||
|
||||
func (c *governanceClient) UpdataStatus(ctx context.Context, in *UpdataStatusReq, opts ...grpc_go.CallOption) (*UpdataStatusResp, common.ErrorWithAttachment) {
|
||||
out := new(UpdataStatusResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdataStatus", in, out)
|
||||
}
|
||||
|
||||
func (c *governanceClient) GetGovernanceInfo(ctx context.Context, in *GetGovernanceInfoReq, opts ...grpc_go.CallOption) (*GetGovernanceInfoResp, common.ErrorWithAttachment) {
|
||||
out := new(GetGovernanceInfoResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetGovernanceInfo", in, out)
|
||||
}
|
||||
|
||||
func (c *governanceClient) Create(ctx context.Context, in *CreateReq, opts ...grpc_go.CallOption) (*CreateResp, common.ErrorWithAttachment) {
|
||||
out := new(CreateResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
@ -96,6 +112,8 @@ type GovernanceServer interface {
|
||||
List(context.Context, *ListReq) (*ListResp, error)
|
||||
Delete(context.Context, *DeleteReq) (*DeleteResp, error)
|
||||
Edit(context.Context, *EditReq) (*EditResp, error)
|
||||
UpdataStatus(context.Context, *UpdataStatusReq) (*UpdataStatusResp, error)
|
||||
GetGovernanceInfo(context.Context, *GetGovernanceInfoReq) (*GetGovernanceInfoResp, error)
|
||||
Create(context.Context, *CreateReq) (*CreateResp, error)
|
||||
Display(context.Context, *DisplayReq) (*DisplayResp, error)
|
||||
mustEmbedUnimplementedGovernanceServer()
|
||||
@ -115,6 +133,12 @@ func (UnimplementedGovernanceServer) Delete(context.Context, *DeleteReq) (*Delet
|
||||
func (UnimplementedGovernanceServer) Edit(context.Context, *EditReq) (*EditResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Edit not implemented")
|
||||
}
|
||||
func (UnimplementedGovernanceServer) UpdataStatus(context.Context, *UpdataStatusReq) (*UpdataStatusResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdataStatus not implemented")
|
||||
}
|
||||
func (UnimplementedGovernanceServer) GetGovernanceInfo(context.Context, *GetGovernanceInfoReq) (*GetGovernanceInfoResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetGovernanceInfo not implemented")
|
||||
}
|
||||
func (UnimplementedGovernanceServer) Create(context.Context, *CreateReq) (*CreateResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
|
||||
}
|
||||
@ -236,6 +260,64 @@ func _Governance_Edit_Handler(srv interface{}, ctx context.Context, dec func(int
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Governance_UpdataStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdataStatusReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("UpdataStatus", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Governance_GetGovernanceInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetGovernanceInfoReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("GetGovernanceInfo", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Governance_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateReq)
|
||||
if err := dec(in); err != nil {
|
||||
@ -313,6 +395,14 @@ var Governance_ServiceDesc = grpc_go.ServiceDesc{
|
||||
MethodName: "Edit",
|
||||
Handler: _Governance_Edit_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdataStatus",
|
||||
Handler: _Governance_UpdataStatus_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetGovernanceInfo",
|
||||
Handler: _Governance_GetGovernanceInfo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Create",
|
||||
Handler: _Governance_Create_Handler,
|
||||
@ -323,5 +413,5 @@ var Governance_ServiceDesc = grpc_go.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc_go.StreamDesc{},
|
||||
Metadata: "governance.proto",
|
||||
Metadata: "api/governance/governance.proto",
|
||||
}
|
||||
|
||||
5111
api/members/members.pb.go
Normal file
5111
api/members/members.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
341
api/members/members.validator.pb.go
Normal file
341
api/members/members.validator.pb.go
Normal file
@ -0,0 +1,341 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: api/members/members.proto
|
||||
|
||||
package members
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
math "math"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
func (this *Filtrate) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *LangSetting) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ManagementLangData) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ManagementLang) Validate() error {
|
||||
if this.Data != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *Management) Validate() error {
|
||||
for _, item := range this.LangSetting {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("LangSetting", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *AddManagementReq) Validate() error {
|
||||
for _, item := range this.DataByLang {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *AddManagementResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *SortAndStatusManagementReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *SortAndStatusManagementResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *EditManagementReq) Validate() error {
|
||||
for _, item := range this.DataByLang {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *EditManagementResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DeleteManagementReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DeleteManagementResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetManagementListReq) Validate() error {
|
||||
if this.Filtrate != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Filtrate); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Filtrate", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *GetManagementListResp) Validate() error {
|
||||
for _, item := range this.Data {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *GetManagementInfoReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetManagementInfoResp) Validate() error {
|
||||
for _, item := range this.DataByLang {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *DisplayManagementReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DisplayManagementResp) Validate() error {
|
||||
for _, item := range this.Item {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Item", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *DisplayManagementItem) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *BoardOfDirectorsLang) Validate() error {
|
||||
if this.Data != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *BoardOfDirectorsLangData) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *BoardOfDirectors) Validate() error {
|
||||
for _, item := range this.LangSetting {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("LangSetting", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *AddBoardOfDirectorsReq) Validate() error {
|
||||
for _, item := range this.DataByLang {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *AddBoardOfDirectorsResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *SortAndStatusBoardOfDirectorsReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *SortAndStatusBoardOfDirectorsResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *EditBoardOfDirectorsReq) Validate() error {
|
||||
for _, item := range this.DataByLang {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *EditBoardOfDirectorsResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DeleteBoardOfDirectorsReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DeleteBoardOfDirectorsResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetBoardOfDirectorsListReq) Validate() error {
|
||||
if this.Filtrate != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Filtrate); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Filtrate", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *GetBoardOfDirectorsListResp) Validate() error {
|
||||
for _, item := range this.Data {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *GetBoardOfDirectorsInfoReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetBoardOfDirectorsInfoResp) Validate() error {
|
||||
for _, item := range this.DataByLang {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *DisplayBoardOfDirectorsReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DisplayBoardOfDirectorsResp) Validate() error {
|
||||
for _, item := range this.Item {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Item", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *DisplayBoardOfDirectorItem) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CommitteeAppointments) Validate() error {
|
||||
for _, item := range this.LangSetting {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("LangSetting", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *CommitteeAppointmentsLang) Validate() error {
|
||||
if this.Data != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *CommitteeAppointmentsLangData) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *AddCommitteeAppointmentsReq) Validate() error {
|
||||
for _, item := range this.DataByLang {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *AddCommitteeAppointmentsResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *SortAndStatusCommitteeAppointmentsReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *SortAndStatusCommitteeAppointmentsResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *EditCommitteeAppointmentsReq) Validate() error {
|
||||
for _, item := range this.DataByLang {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *EditCommitteeAppointmentsResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DeleteCommitteeAppointmentsReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DeleteCommitteeAppointmentsResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetCommitteeAppointmentsListReq) Validate() error {
|
||||
if this.Filtrate != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Filtrate); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Filtrate", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *GetCommitteeAppointmentsListResp) Validate() error {
|
||||
for _, item := range this.Data {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *GetCommitteeAppointmentsInfoReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetCommitteeAppointmentsInfoResp) Validate() error {
|
||||
for _, item := range this.DataByLang {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *DisplayCommitteeAppointmentsReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DisplayCommitteeAppointmentsResp) Validate() error {
|
||||
for _, item := range this.Item {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Item", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *DisplayCommitteeAppointmentsItem) Validate() error {
|
||||
return nil
|
||||
}
|
||||
1095
api/members/members_triple.pb.go
Normal file
1095
api/members/members_triple.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,119 +0,0 @@
|
||||
syntax = "proto3";
|
||||
package pressreleases;
|
||||
//import "descriptor.proto";
|
||||
//import "validator.proto";
|
||||
|
||||
option go_package = "./;pressreleases";
|
||||
|
||||
service PressReleases{
|
||||
rpc List(ListReq) returns (ListResp) {}
|
||||
rpc Display(DisplayReq) returns (DisplayResp) {}
|
||||
rpc Edit(EditReq) returns (EditResp) {}
|
||||
rpc Create(CreateReq) returns (CreateResp) {}
|
||||
rpc Delete(DeleteReq) returns (DeleteResp) {}
|
||||
rpc Get(GetReq) returns (GetResp) {}
|
||||
}
|
||||
|
||||
message Item{
|
||||
uint32 id = 1;
|
||||
string title = 2;
|
||||
uint64 createdAt = 3;
|
||||
uint32 sort = 4;
|
||||
string content = 5;
|
||||
string attachment = 6;
|
||||
string attachmentName = 7;
|
||||
uint64 updatedAt = 8;
|
||||
uint32 status = 9;
|
||||
uint32 display = 10;
|
||||
string summary = 11;
|
||||
string operator = 12;
|
||||
int32 operatorId = 13;
|
||||
}
|
||||
|
||||
message ListReq{
|
||||
string title = 1;
|
||||
uint64 startTime = 2;
|
||||
uint64 endTime = 3;
|
||||
uint32 status = 4;
|
||||
uint32 display = 5;
|
||||
int32 page = 6;
|
||||
int32 pageSize = 7;
|
||||
}
|
||||
|
||||
message ListResp{
|
||||
uint64 total = 1;
|
||||
repeated Item data = 2;
|
||||
}
|
||||
|
||||
message DisplayReq{
|
||||
string query = 1;
|
||||
uint32 page = 2;
|
||||
uint32 pageSize = 3;
|
||||
int64 timeStart = 4;
|
||||
int64 timeEnd = 5;
|
||||
int32 display = 6;
|
||||
}
|
||||
|
||||
message DisplayResp{
|
||||
int64 total = 1;
|
||||
repeated Item data = 2;
|
||||
}
|
||||
|
||||
message EditReq{
|
||||
uint32 id = 1;
|
||||
string title = 2;
|
||||
uint64 createdAt = 3;
|
||||
uint32 sort = 4;
|
||||
string content = 5;
|
||||
string attachment = 6;
|
||||
string attachmentName = 7;
|
||||
uint32 status = 8;
|
||||
uint32 display = 9;
|
||||
string summary = 10;
|
||||
string operator = 11;
|
||||
int32 operatorId = 12;
|
||||
|
||||
}
|
||||
|
||||
message EditResp{
|
||||
}
|
||||
|
||||
message CreateReq{
|
||||
string title = 1;
|
||||
uint64 createdAt = 2;
|
||||
uint32 sort = 3;
|
||||
string content = 4;
|
||||
string attachment = 5;
|
||||
string attachmentName = 6;
|
||||
uint32 status = 7;
|
||||
uint32 display = 8;
|
||||
string summary = 9;
|
||||
string operator = 10;
|
||||
int32 operatorId = 11;
|
||||
}
|
||||
|
||||
message CreateResp{
|
||||
|
||||
}
|
||||
|
||||
message DeleteReq{
|
||||
uint32 id = 1;
|
||||
}
|
||||
|
||||
message DeleteResp{
|
||||
|
||||
}
|
||||
|
||||
message GetReq{
|
||||
int64 id = 1;
|
||||
}
|
||||
|
||||
message GetResp{
|
||||
uint32 id = 1;
|
||||
string title = 2;
|
||||
uint64 createdAt = 3;
|
||||
string content = 4;
|
||||
string attachment = 5;
|
||||
string attachmentName = 6;
|
||||
string summary = 7;
|
||||
}
|
||||
@ -1,5 +1,5 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: press_releases.proto
|
||||
// source: api/pressreleases/press_releases.proto
|
||||
|
||||
package pressreleases
|
||||
|
||||
@ -15,7 +15,37 @@ var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
func (this *Item) Validate() error {
|
||||
func (this *LangSetting) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *PressReleasesLang) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *PressReleasesData) Validate() error {
|
||||
for _, item := range this.LangSetting {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("LangSetting", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, item := range this.Files {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Files", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *DisplayItem) Validate() error {
|
||||
for _, item := range this.Files {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Files", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *ListReq) Validate() error {
|
||||
@ -31,6 +61,32 @@ func (this *ListResp) Validate() error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *SortAndStatusReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *SortAndStatusResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *InfoReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *InfoResp) Validate() error {
|
||||
for _, item := range this.DataByLang {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, item := range this.Files {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Files", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *DisplayReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
@ -44,13 +100,44 @@ func (this *DisplayResp) Validate() error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *Files) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *EditReq) Validate() error {
|
||||
for _, item := range this.DataByLang {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, item := range this.Files {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Files", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *EditResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CreateReq) Validate() error {
|
||||
for _, item := range this.DataByLang {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, item := range this.Files {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Files", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *CreateResp) Validate() error {
|
||||
@ -66,5 +153,10 @@ func (this *GetReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetResp) Validate() error {
|
||||
if this.Data != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-triple v1.0.8
|
||||
// - protoc v3.20.3
|
||||
// source: press_releases.proto
|
||||
// - protoc-gen-go-triple v1.0.5
|
||||
// - protoc v5.26.0
|
||||
// source: api/pressreleases/press_releases.proto
|
||||
|
||||
package pressreleases
|
||||
|
||||
@ -29,6 +29,8 @@ const _ = grpc_go.SupportPackageIsVersion7
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type PressReleasesClient interface {
|
||||
List(ctx context.Context, in *ListReq, opts ...grpc_go.CallOption) (*ListResp, common.ErrorWithAttachment)
|
||||
SortAndStatus(ctx context.Context, in *SortAndStatusReq, opts ...grpc_go.CallOption) (*SortAndStatusResp, common.ErrorWithAttachment)
|
||||
Info(ctx context.Context, in *InfoReq, opts ...grpc_go.CallOption) (*InfoResp, common.ErrorWithAttachment)
|
||||
Display(ctx context.Context, in *DisplayReq, opts ...grpc_go.CallOption) (*DisplayResp, common.ErrorWithAttachment)
|
||||
Edit(ctx context.Context, in *EditReq, opts ...grpc_go.CallOption) (*EditResp, common.ErrorWithAttachment)
|
||||
Create(ctx context.Context, in *CreateReq, opts ...grpc_go.CallOption) (*CreateResp, common.ErrorWithAttachment)
|
||||
@ -41,12 +43,14 @@ type pressReleasesClient struct {
|
||||
}
|
||||
|
||||
type PressReleasesClientImpl struct {
|
||||
List func(ctx context.Context, in *ListReq) (*ListResp, error)
|
||||
Display func(ctx context.Context, in *DisplayReq) (*DisplayResp, error)
|
||||
Edit func(ctx context.Context, in *EditReq) (*EditResp, error)
|
||||
Create func(ctx context.Context, in *CreateReq) (*CreateResp, error)
|
||||
Delete func(ctx context.Context, in *DeleteReq) (*DeleteResp, error)
|
||||
Get func(ctx context.Context, in *GetReq) (*GetResp, error)
|
||||
List func(ctx context.Context, in *ListReq) (*ListResp, error)
|
||||
SortAndStatus func(ctx context.Context, in *SortAndStatusReq) (*SortAndStatusResp, error)
|
||||
Info func(ctx context.Context, in *InfoReq) (*InfoResp, error)
|
||||
Display func(ctx context.Context, in *DisplayReq) (*DisplayResp, error)
|
||||
Edit func(ctx context.Context, in *EditReq) (*EditResp, error)
|
||||
Create func(ctx context.Context, in *CreateReq) (*CreateResp, error)
|
||||
Delete func(ctx context.Context, in *DeleteReq) (*DeleteResp, error)
|
||||
Get func(ctx context.Context, in *GetReq) (*GetResp, error)
|
||||
}
|
||||
|
||||
func (c *PressReleasesClientImpl) GetDubboStub(cc *triple.TripleConn) PressReleasesClient {
|
||||
@ -67,6 +71,18 @@ func (c *pressReleasesClient) List(ctx context.Context, in *ListReq, opts ...grp
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/List", in, out)
|
||||
}
|
||||
|
||||
func (c *pressReleasesClient) SortAndStatus(ctx context.Context, in *SortAndStatusReq, opts ...grpc_go.CallOption) (*SortAndStatusResp, common.ErrorWithAttachment) {
|
||||
out := new(SortAndStatusResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/SortAndStatus", in, out)
|
||||
}
|
||||
|
||||
func (c *pressReleasesClient) Info(ctx context.Context, in *InfoReq, opts ...grpc_go.CallOption) (*InfoResp, common.ErrorWithAttachment) {
|
||||
out := new(InfoResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Info", in, out)
|
||||
}
|
||||
|
||||
func (c *pressReleasesClient) Display(ctx context.Context, in *DisplayReq, opts ...grpc_go.CallOption) (*DisplayResp, common.ErrorWithAttachment) {
|
||||
out := new(DisplayResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
@ -102,6 +118,8 @@ func (c *pressReleasesClient) Get(ctx context.Context, in *GetReq, opts ...grpc_
|
||||
// for forward compatibility
|
||||
type PressReleasesServer interface {
|
||||
List(context.Context, *ListReq) (*ListResp, error)
|
||||
SortAndStatus(context.Context, *SortAndStatusReq) (*SortAndStatusResp, error)
|
||||
Info(context.Context, *InfoReq) (*InfoResp, error)
|
||||
Display(context.Context, *DisplayReq) (*DisplayResp, error)
|
||||
Edit(context.Context, *EditReq) (*EditResp, error)
|
||||
Create(context.Context, *CreateReq) (*CreateResp, error)
|
||||
@ -118,6 +136,12 @@ type UnimplementedPressReleasesServer struct {
|
||||
func (UnimplementedPressReleasesServer) List(context.Context, *ListReq) (*ListResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
|
||||
}
|
||||
func (UnimplementedPressReleasesServer) SortAndStatus(context.Context, *SortAndStatusReq) (*SortAndStatusResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SortAndStatus not implemented")
|
||||
}
|
||||
func (UnimplementedPressReleasesServer) Info(context.Context, *InfoReq) (*InfoResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Info not implemented")
|
||||
}
|
||||
func (UnimplementedPressReleasesServer) Display(context.Context, *DisplayReq) (*DisplayResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Display not implemented")
|
||||
}
|
||||
@ -190,6 +214,64 @@ func _PressReleases_List_Handler(srv interface{}, ctx context.Context, dec func(
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _PressReleases_SortAndStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SortAndStatusReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("SortAndStatus", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _PressReleases_Info_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(InfoReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("Info", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _PressReleases_Display_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DisplayReq)
|
||||
if err := dec(in); err != nil {
|
||||
@ -346,6 +428,14 @@ var PressReleases_ServiceDesc = grpc_go.ServiceDesc{
|
||||
MethodName: "List",
|
||||
Handler: _PressReleases_List_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SortAndStatus",
|
||||
Handler: _PressReleases_SortAndStatus_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Info",
|
||||
Handler: _PressReleases_Info_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Display",
|
||||
Handler: _PressReleases_Display_Handler,
|
||||
@ -368,5 +458,5 @@ var PressReleases_ServiceDesc = grpc_go.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc_go.StreamDesc{},
|
||||
Metadata: "press_releases.proto",
|
||||
Metadata: "api/pressreleases/press_releases.proto",
|
||||
}
|
||||
|
||||
3439
api/reports/reports.pb.go
Normal file
3439
api/reports/reports.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
227
api/reports/reports.validator.pb.go
Normal file
227
api/reports/reports.validator.pb.go
Normal file
@ -0,0 +1,227 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: api/reports/reports.proto
|
||||
|
||||
package reports
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
math "math"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
func (this *Filtrate) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *FiltrateWeb) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *LangSetting) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *AnnualReport) Validate() error {
|
||||
for _, item := range this.LangSetting {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("LangSetting", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *AnnualReportLang) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *QuarterlyReport) Validate() error {
|
||||
for _, item := range this.LangSetting {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("LangSetting", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *QuarterlyReportLang) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetAnnualReportListReq) Validate() error {
|
||||
if this.Filtrate != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Filtrate); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Filtrate", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *GetAnnualReportListResp) Validate() error {
|
||||
for _, item := range this.Data {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *GetAnnualReportInfoReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetAnnualReportInfoResp) Validate() error {
|
||||
for _, item := range this.DataByLang {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *AddAnnualReportReq) Validate() error {
|
||||
for _, item := range this.DataByLang {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *AddAnnualReportResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *SortAndStatusAnnualReportReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *SortAndStatusAnnualReportResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *EditAnnualReportReq) Validate() error {
|
||||
for _, item := range this.DataByLang {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *EditAnnualReportResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DeleteAnnualReportReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DeleteAnnualReportResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DisplayAnnualReportReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DisplayAnnualReportResp) Validate() error {
|
||||
for _, item := range this.Item {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Item", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *DisplayAnnualReportItem) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetQuarterlyReportListReq) Validate() error {
|
||||
if this.Filtrate != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Filtrate); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Filtrate", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *GetQuarterlyReportListResp) Validate() error {
|
||||
for _, item := range this.Data {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *GetQuarterlyReportInfoReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetQuarterlyReportInfoResp) Validate() error {
|
||||
for _, item := range this.DataByLang {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *AddQuarterlyReportReq) Validate() error {
|
||||
for _, item := range this.DataByLang {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *AddQuarterlyReportResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *SortAndStatusQuarterlyReportReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *SortAndStatusQuarterlyReportResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *EditQuarterlyReportReq) Validate() error {
|
||||
for _, item := range this.DataByLang {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *EditQuarterlyReportResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DeleteQuarterlyReportReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DeleteQuarterlyReportResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DisplayQuarterlyReportReq) Validate() error {
|
||||
if this.Filtrate != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Filtrate); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Filtrate", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *DisplayQuarterlyReportResp) Validate() error {
|
||||
for _, item := range this.Item {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Item", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *DisplayQuarterlyReportItem) Validate() error {
|
||||
return nil
|
||||
}
|
||||
736
api/reports/reports_triple.pb.go
Normal file
736
api/reports/reports_triple.pb.go
Normal file
@ -0,0 +1,736 @@
|
||||
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-triple v1.0.5
|
||||
// - protoc v5.26.0
|
||||
// source: api/reports/reports.proto
|
||||
|
||||
package reports
|
||||
|
||||
import (
|
||||
context "context"
|
||||
protocol "dubbo.apache.org/dubbo-go/v3/protocol"
|
||||
dubbo3 "dubbo.apache.org/dubbo-go/v3/protocol/dubbo3"
|
||||
invocation "dubbo.apache.org/dubbo-go/v3/protocol/invocation"
|
||||
grpc_go "github.com/dubbogo/grpc-go"
|
||||
codes "github.com/dubbogo/grpc-go/codes"
|
||||
metadata "github.com/dubbogo/grpc-go/metadata"
|
||||
status "github.com/dubbogo/grpc-go/status"
|
||||
common "github.com/dubbogo/triple/pkg/common"
|
||||
constant "github.com/dubbogo/triple/pkg/common/constant"
|
||||
triple "github.com/dubbogo/triple/pkg/triple"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc_go.SupportPackageIsVersion7
|
||||
|
||||
// ReportsClient is the client API for Reports service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type ReportsClient interface {
|
||||
// ==================================年度报告======================================
|
||||
GetAnnualReportList(ctx context.Context, in *GetAnnualReportListReq, opts ...grpc_go.CallOption) (*GetAnnualReportListResp, common.ErrorWithAttachment)
|
||||
GetAnnualReportInfo(ctx context.Context, in *GetAnnualReportInfoReq, opts ...grpc_go.CallOption) (*GetAnnualReportInfoResp, common.ErrorWithAttachment)
|
||||
AddAnnualReport(ctx context.Context, in *AddAnnualReportReq, opts ...grpc_go.CallOption) (*AddAnnualReportResp, common.ErrorWithAttachment)
|
||||
SortAndStatusAnnualReport(ctx context.Context, in *SortAndStatusAnnualReportReq, opts ...grpc_go.CallOption) (*SortAndStatusAnnualReportResp, common.ErrorWithAttachment)
|
||||
EditAnnualReport(ctx context.Context, in *EditAnnualReportReq, opts ...grpc_go.CallOption) (*EditAnnualReportResp, common.ErrorWithAttachment)
|
||||
DeleteAnnualReport(ctx context.Context, in *DeleteAnnualReportReq, opts ...grpc_go.CallOption) (*DeleteAnnualReportResp, common.ErrorWithAttachment)
|
||||
DisplayAnnualReport(ctx context.Context, in *DisplayAnnualReportReq, opts ...grpc_go.CallOption) (*DisplayAnnualReportResp, common.ErrorWithAttachment)
|
||||
// ==================================季度报告======================================
|
||||
GetQuarterlyReportList(ctx context.Context, in *GetQuarterlyReportListReq, opts ...grpc_go.CallOption) (*GetQuarterlyReportListResp, common.ErrorWithAttachment)
|
||||
GetQuarterlyReportInfo(ctx context.Context, in *GetQuarterlyReportInfoReq, opts ...grpc_go.CallOption) (*GetQuarterlyReportInfoResp, common.ErrorWithAttachment)
|
||||
AddQuarterlyReport(ctx context.Context, in *AddQuarterlyReportReq, opts ...grpc_go.CallOption) (*AddQuarterlyReportResp, common.ErrorWithAttachment)
|
||||
SortAndStatusQuarterlyReport(ctx context.Context, in *SortAndStatusQuarterlyReportReq, opts ...grpc_go.CallOption) (*SortAndStatusQuarterlyReportResp, common.ErrorWithAttachment)
|
||||
EditQuarterlyReport(ctx context.Context, in *EditQuarterlyReportReq, opts ...grpc_go.CallOption) (*EditQuarterlyReportResp, common.ErrorWithAttachment)
|
||||
DeleteQuarterlyReport(ctx context.Context, in *DeleteQuarterlyReportReq, opts ...grpc_go.CallOption) (*DeleteQuarterlyReportResp, common.ErrorWithAttachment)
|
||||
DisplayQuarterlyReport(ctx context.Context, in *DisplayQuarterlyReportReq, opts ...grpc_go.CallOption) (*DisplayQuarterlyReportResp, common.ErrorWithAttachment)
|
||||
}
|
||||
|
||||
type reportsClient struct {
|
||||
cc *triple.TripleConn
|
||||
}
|
||||
|
||||
type ReportsClientImpl struct {
|
||||
GetAnnualReportList func(ctx context.Context, in *GetAnnualReportListReq) (*GetAnnualReportListResp, error)
|
||||
GetAnnualReportInfo func(ctx context.Context, in *GetAnnualReportInfoReq) (*GetAnnualReportInfoResp, error)
|
||||
AddAnnualReport func(ctx context.Context, in *AddAnnualReportReq) (*AddAnnualReportResp, error)
|
||||
SortAndStatusAnnualReport func(ctx context.Context, in *SortAndStatusAnnualReportReq) (*SortAndStatusAnnualReportResp, error)
|
||||
EditAnnualReport func(ctx context.Context, in *EditAnnualReportReq) (*EditAnnualReportResp, error)
|
||||
DeleteAnnualReport func(ctx context.Context, in *DeleteAnnualReportReq) (*DeleteAnnualReportResp, error)
|
||||
DisplayAnnualReport func(ctx context.Context, in *DisplayAnnualReportReq) (*DisplayAnnualReportResp, error)
|
||||
GetQuarterlyReportList func(ctx context.Context, in *GetQuarterlyReportListReq) (*GetQuarterlyReportListResp, error)
|
||||
GetQuarterlyReportInfo func(ctx context.Context, in *GetQuarterlyReportInfoReq) (*GetQuarterlyReportInfoResp, error)
|
||||
AddQuarterlyReport func(ctx context.Context, in *AddQuarterlyReportReq) (*AddQuarterlyReportResp, error)
|
||||
SortAndStatusQuarterlyReport func(ctx context.Context, in *SortAndStatusQuarterlyReportReq) (*SortAndStatusQuarterlyReportResp, error)
|
||||
EditQuarterlyReport func(ctx context.Context, in *EditQuarterlyReportReq) (*EditQuarterlyReportResp, error)
|
||||
DeleteQuarterlyReport func(ctx context.Context, in *DeleteQuarterlyReportReq) (*DeleteQuarterlyReportResp, error)
|
||||
DisplayQuarterlyReport func(ctx context.Context, in *DisplayQuarterlyReportReq) (*DisplayQuarterlyReportResp, error)
|
||||
}
|
||||
|
||||
func (c *ReportsClientImpl) GetDubboStub(cc *triple.TripleConn) ReportsClient {
|
||||
return NewReportsClient(cc)
|
||||
}
|
||||
|
||||
func (c *ReportsClientImpl) XXX_InterfaceName() string {
|
||||
return "reports.Reports"
|
||||
}
|
||||
|
||||
func NewReportsClient(cc *triple.TripleConn) ReportsClient {
|
||||
return &reportsClient{cc}
|
||||
}
|
||||
|
||||
func (c *reportsClient) GetAnnualReportList(ctx context.Context, in *GetAnnualReportListReq, opts ...grpc_go.CallOption) (*GetAnnualReportListResp, common.ErrorWithAttachment) {
|
||||
out := new(GetAnnualReportListResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetAnnualReportList", in, out)
|
||||
}
|
||||
|
||||
func (c *reportsClient) GetAnnualReportInfo(ctx context.Context, in *GetAnnualReportInfoReq, opts ...grpc_go.CallOption) (*GetAnnualReportInfoResp, common.ErrorWithAttachment) {
|
||||
out := new(GetAnnualReportInfoResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetAnnualReportInfo", in, out)
|
||||
}
|
||||
|
||||
func (c *reportsClient) AddAnnualReport(ctx context.Context, in *AddAnnualReportReq, opts ...grpc_go.CallOption) (*AddAnnualReportResp, common.ErrorWithAttachment) {
|
||||
out := new(AddAnnualReportResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/AddAnnualReport", in, out)
|
||||
}
|
||||
|
||||
func (c *reportsClient) SortAndStatusAnnualReport(ctx context.Context, in *SortAndStatusAnnualReportReq, opts ...grpc_go.CallOption) (*SortAndStatusAnnualReportResp, common.ErrorWithAttachment) {
|
||||
out := new(SortAndStatusAnnualReportResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/SortAndStatusAnnualReport", in, out)
|
||||
}
|
||||
|
||||
func (c *reportsClient) EditAnnualReport(ctx context.Context, in *EditAnnualReportReq, opts ...grpc_go.CallOption) (*EditAnnualReportResp, common.ErrorWithAttachment) {
|
||||
out := new(EditAnnualReportResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/EditAnnualReport", in, out)
|
||||
}
|
||||
|
||||
func (c *reportsClient) DeleteAnnualReport(ctx context.Context, in *DeleteAnnualReportReq, opts ...grpc_go.CallOption) (*DeleteAnnualReportResp, common.ErrorWithAttachment) {
|
||||
out := new(DeleteAnnualReportResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DeleteAnnualReport", in, out)
|
||||
}
|
||||
|
||||
func (c *reportsClient) DisplayAnnualReport(ctx context.Context, in *DisplayAnnualReportReq, opts ...grpc_go.CallOption) (*DisplayAnnualReportResp, common.ErrorWithAttachment) {
|
||||
out := new(DisplayAnnualReportResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DisplayAnnualReport", in, out)
|
||||
}
|
||||
|
||||
func (c *reportsClient) GetQuarterlyReportList(ctx context.Context, in *GetQuarterlyReportListReq, opts ...grpc_go.CallOption) (*GetQuarterlyReportListResp, common.ErrorWithAttachment) {
|
||||
out := new(GetQuarterlyReportListResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetQuarterlyReportList", in, out)
|
||||
}
|
||||
|
||||
func (c *reportsClient) GetQuarterlyReportInfo(ctx context.Context, in *GetQuarterlyReportInfoReq, opts ...grpc_go.CallOption) (*GetQuarterlyReportInfoResp, common.ErrorWithAttachment) {
|
||||
out := new(GetQuarterlyReportInfoResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetQuarterlyReportInfo", in, out)
|
||||
}
|
||||
|
||||
func (c *reportsClient) AddQuarterlyReport(ctx context.Context, in *AddQuarterlyReportReq, opts ...grpc_go.CallOption) (*AddQuarterlyReportResp, common.ErrorWithAttachment) {
|
||||
out := new(AddQuarterlyReportResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/AddQuarterlyReport", in, out)
|
||||
}
|
||||
|
||||
func (c *reportsClient) SortAndStatusQuarterlyReport(ctx context.Context, in *SortAndStatusQuarterlyReportReq, opts ...grpc_go.CallOption) (*SortAndStatusQuarterlyReportResp, common.ErrorWithAttachment) {
|
||||
out := new(SortAndStatusQuarterlyReportResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/SortAndStatusQuarterlyReport", in, out)
|
||||
}
|
||||
|
||||
func (c *reportsClient) EditQuarterlyReport(ctx context.Context, in *EditQuarterlyReportReq, opts ...grpc_go.CallOption) (*EditQuarterlyReportResp, common.ErrorWithAttachment) {
|
||||
out := new(EditQuarterlyReportResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/EditQuarterlyReport", in, out)
|
||||
}
|
||||
|
||||
func (c *reportsClient) DeleteQuarterlyReport(ctx context.Context, in *DeleteQuarterlyReportReq, opts ...grpc_go.CallOption) (*DeleteQuarterlyReportResp, common.ErrorWithAttachment) {
|
||||
out := new(DeleteQuarterlyReportResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DeleteQuarterlyReport", in, out)
|
||||
}
|
||||
|
||||
func (c *reportsClient) DisplayQuarterlyReport(ctx context.Context, in *DisplayQuarterlyReportReq, opts ...grpc_go.CallOption) (*DisplayQuarterlyReportResp, common.ErrorWithAttachment) {
|
||||
out := new(DisplayQuarterlyReportResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DisplayQuarterlyReport", in, out)
|
||||
}
|
||||
|
||||
// ReportsServer is the server API for Reports service.
|
||||
// All implementations must embed UnimplementedReportsServer
|
||||
// for forward compatibility
|
||||
type ReportsServer interface {
|
||||
// ==================================年度报告======================================
|
||||
GetAnnualReportList(context.Context, *GetAnnualReportListReq) (*GetAnnualReportListResp, error)
|
||||
GetAnnualReportInfo(context.Context, *GetAnnualReportInfoReq) (*GetAnnualReportInfoResp, error)
|
||||
AddAnnualReport(context.Context, *AddAnnualReportReq) (*AddAnnualReportResp, error)
|
||||
SortAndStatusAnnualReport(context.Context, *SortAndStatusAnnualReportReq) (*SortAndStatusAnnualReportResp, error)
|
||||
EditAnnualReport(context.Context, *EditAnnualReportReq) (*EditAnnualReportResp, error)
|
||||
DeleteAnnualReport(context.Context, *DeleteAnnualReportReq) (*DeleteAnnualReportResp, error)
|
||||
DisplayAnnualReport(context.Context, *DisplayAnnualReportReq) (*DisplayAnnualReportResp, error)
|
||||
// ==================================季度报告======================================
|
||||
GetQuarterlyReportList(context.Context, *GetQuarterlyReportListReq) (*GetQuarterlyReportListResp, error)
|
||||
GetQuarterlyReportInfo(context.Context, *GetQuarterlyReportInfoReq) (*GetQuarterlyReportInfoResp, error)
|
||||
AddQuarterlyReport(context.Context, *AddQuarterlyReportReq) (*AddQuarterlyReportResp, error)
|
||||
SortAndStatusQuarterlyReport(context.Context, *SortAndStatusQuarterlyReportReq) (*SortAndStatusQuarterlyReportResp, error)
|
||||
EditQuarterlyReport(context.Context, *EditQuarterlyReportReq) (*EditQuarterlyReportResp, error)
|
||||
DeleteQuarterlyReport(context.Context, *DeleteQuarterlyReportReq) (*DeleteQuarterlyReportResp, error)
|
||||
DisplayQuarterlyReport(context.Context, *DisplayQuarterlyReportReq) (*DisplayQuarterlyReportResp, error)
|
||||
mustEmbedUnimplementedReportsServer()
|
||||
}
|
||||
|
||||
// UnimplementedReportsServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedReportsServer struct {
|
||||
proxyImpl protocol.Invoker
|
||||
}
|
||||
|
||||
func (UnimplementedReportsServer) GetAnnualReportList(context.Context, *GetAnnualReportListReq) (*GetAnnualReportListResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetAnnualReportList not implemented")
|
||||
}
|
||||
func (UnimplementedReportsServer) GetAnnualReportInfo(context.Context, *GetAnnualReportInfoReq) (*GetAnnualReportInfoResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetAnnualReportInfo not implemented")
|
||||
}
|
||||
func (UnimplementedReportsServer) AddAnnualReport(context.Context, *AddAnnualReportReq) (*AddAnnualReportResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AddAnnualReport not implemented")
|
||||
}
|
||||
func (UnimplementedReportsServer) SortAndStatusAnnualReport(context.Context, *SortAndStatusAnnualReportReq) (*SortAndStatusAnnualReportResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SortAndStatusAnnualReport not implemented")
|
||||
}
|
||||
func (UnimplementedReportsServer) EditAnnualReport(context.Context, *EditAnnualReportReq) (*EditAnnualReportResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method EditAnnualReport not implemented")
|
||||
}
|
||||
func (UnimplementedReportsServer) DeleteAnnualReport(context.Context, *DeleteAnnualReportReq) (*DeleteAnnualReportResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteAnnualReport not implemented")
|
||||
}
|
||||
func (UnimplementedReportsServer) DisplayAnnualReport(context.Context, *DisplayAnnualReportReq) (*DisplayAnnualReportResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DisplayAnnualReport not implemented")
|
||||
}
|
||||
func (UnimplementedReportsServer) GetQuarterlyReportList(context.Context, *GetQuarterlyReportListReq) (*GetQuarterlyReportListResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetQuarterlyReportList not implemented")
|
||||
}
|
||||
func (UnimplementedReportsServer) GetQuarterlyReportInfo(context.Context, *GetQuarterlyReportInfoReq) (*GetQuarterlyReportInfoResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetQuarterlyReportInfo not implemented")
|
||||
}
|
||||
func (UnimplementedReportsServer) AddQuarterlyReport(context.Context, *AddQuarterlyReportReq) (*AddQuarterlyReportResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AddQuarterlyReport not implemented")
|
||||
}
|
||||
func (UnimplementedReportsServer) SortAndStatusQuarterlyReport(context.Context, *SortAndStatusQuarterlyReportReq) (*SortAndStatusQuarterlyReportResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SortAndStatusQuarterlyReport not implemented")
|
||||
}
|
||||
func (UnimplementedReportsServer) EditQuarterlyReport(context.Context, *EditQuarterlyReportReq) (*EditQuarterlyReportResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method EditQuarterlyReport not implemented")
|
||||
}
|
||||
func (UnimplementedReportsServer) DeleteQuarterlyReport(context.Context, *DeleteQuarterlyReportReq) (*DeleteQuarterlyReportResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteQuarterlyReport not implemented")
|
||||
}
|
||||
func (UnimplementedReportsServer) DisplayQuarterlyReport(context.Context, *DisplayQuarterlyReportReq) (*DisplayQuarterlyReportResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DisplayQuarterlyReport not implemented")
|
||||
}
|
||||
func (s *UnimplementedReportsServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
||||
s.proxyImpl = impl
|
||||
}
|
||||
|
||||
func (s *UnimplementedReportsServer) XXX_GetProxyImpl() protocol.Invoker {
|
||||
return s.proxyImpl
|
||||
}
|
||||
|
||||
func (s *UnimplementedReportsServer) XXX_ServiceDesc() *grpc_go.ServiceDesc {
|
||||
return &Reports_ServiceDesc
|
||||
}
|
||||
func (s *UnimplementedReportsServer) XXX_InterfaceName() string {
|
||||
return "reports.Reports"
|
||||
}
|
||||
|
||||
func (UnimplementedReportsServer) mustEmbedUnimplementedReportsServer() {}
|
||||
|
||||
// UnsafeReportsServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to ReportsServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeReportsServer interface {
|
||||
mustEmbedUnimplementedReportsServer()
|
||||
}
|
||||
|
||||
func RegisterReportsServer(s grpc_go.ServiceRegistrar, srv ReportsServer) {
|
||||
s.RegisterService(&Reports_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Reports_GetAnnualReportList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetAnnualReportListReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("GetAnnualReportList", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Reports_GetAnnualReportInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetAnnualReportInfoReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("GetAnnualReportInfo", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Reports_AddAnnualReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AddAnnualReportReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("AddAnnualReport", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Reports_SortAndStatusAnnualReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SortAndStatusAnnualReportReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("SortAndStatusAnnualReport", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Reports_EditAnnualReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(EditAnnualReportReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("EditAnnualReport", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Reports_DeleteAnnualReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteAnnualReportReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("DeleteAnnualReport", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Reports_DisplayAnnualReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DisplayAnnualReportReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("DisplayAnnualReport", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Reports_GetQuarterlyReportList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetQuarterlyReportListReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("GetQuarterlyReportList", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Reports_GetQuarterlyReportInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetQuarterlyReportInfoReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("GetQuarterlyReportInfo", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Reports_AddQuarterlyReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AddQuarterlyReportReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("AddQuarterlyReport", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Reports_SortAndStatusQuarterlyReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SortAndStatusQuarterlyReportReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("SortAndStatusQuarterlyReport", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Reports_EditQuarterlyReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(EditQuarterlyReportReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("EditQuarterlyReport", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Reports_DeleteQuarterlyReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteQuarterlyReportReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("DeleteQuarterlyReport", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Reports_DisplayQuarterlyReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DisplayQuarterlyReportReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("DisplayQuarterlyReport", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Reports_ServiceDesc is the grpc_go.ServiceDesc for Reports service.
|
||||
// It's only intended for direct use with grpc_go.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Reports_ServiceDesc = grpc_go.ServiceDesc{
|
||||
ServiceName: "reports.Reports",
|
||||
HandlerType: (*ReportsServer)(nil),
|
||||
Methods: []grpc_go.MethodDesc{
|
||||
{
|
||||
MethodName: "GetAnnualReportList",
|
||||
Handler: _Reports_GetAnnualReportList_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetAnnualReportInfo",
|
||||
Handler: _Reports_GetAnnualReportInfo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "AddAnnualReport",
|
||||
Handler: _Reports_AddAnnualReport_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SortAndStatusAnnualReport",
|
||||
Handler: _Reports_SortAndStatusAnnualReport_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "EditAnnualReport",
|
||||
Handler: _Reports_EditAnnualReport_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteAnnualReport",
|
||||
Handler: _Reports_DeleteAnnualReport_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DisplayAnnualReport",
|
||||
Handler: _Reports_DisplayAnnualReport_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetQuarterlyReportList",
|
||||
Handler: _Reports_GetQuarterlyReportList_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetQuarterlyReportInfo",
|
||||
Handler: _Reports_GetQuarterlyReportInfo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "AddQuarterlyReport",
|
||||
Handler: _Reports_AddQuarterlyReport_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SortAndStatusQuarterlyReport",
|
||||
Handler: _Reports_SortAndStatusQuarterlyReport_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "EditQuarterlyReport",
|
||||
Handler: _Reports_EditQuarterlyReport_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteQuarterlyReport",
|
||||
Handler: _Reports_DeleteQuarterlyReport_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DisplayQuarterlyReport",
|
||||
Handler: _Reports_DisplayQuarterlyReport_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc_go.StreamDesc{},
|
||||
Metadata: "api/reports/reports.proto",
|
||||
}
|
||||
@ -190,9 +190,9 @@ type IsSecFilingExistReq struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
FilingDate string `protobuf:"bytes,1,opt,name=filingDate,proto3" json:"filingDate,omitempty"`
|
||||
Form string `protobuf:"bytes,2,opt,name=form,proto3" json:"form,omitempty"`
|
||||
FinalLink string `protobuf:"bytes,3,opt,name=finalLink,proto3" json:"finalLink,omitempty"`
|
||||
FilingDate string `protobuf:"bytes,1,opt,name=filingDate,proto3" json:"filingDate"`
|
||||
Form string `protobuf:"bytes,2,opt,name=form,proto3" json:"form"`
|
||||
FinalLink string `protobuf:"bytes,3,opt,name=finalLink,proto3" json:"finalLink"`
|
||||
}
|
||||
|
||||
func (x *IsSecFilingExistReq) Reset() {
|
||||
@ -253,7 +253,7 @@ type IsSecFilingExistResp struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Exist bool `protobuf:"varint,1,opt,name=exist,proto3" json:"exist,omitempty"`
|
||||
Exist bool `protobuf:"varint,1,opt,name=exist,proto3" json:"exist"`
|
||||
}
|
||||
|
||||
func (x *IsSecFilingExistResp) Reset() {
|
||||
@ -300,8 +300,8 @@ type CommonResp struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
|
||||
FilingKey string `protobuf:"bytes,2,opt,name=filingKey,json=filing_key,proto3" json:"filingKey,omitempty"`
|
||||
Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg"`
|
||||
FilingKey string `protobuf:"bytes,2,opt,name=filingKey,json=filing_key,proto3" json:"filingKey"`
|
||||
}
|
||||
|
||||
func (x *CommonResp) Reset() {
|
||||
@ -355,22 +355,22 @@ type SecFiling struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Idx int32 `protobuf:"varint,1,opt,name=idx,proto3" json:"idx,omitempty"`
|
||||
FilingKey string `protobuf:"bytes,2,opt,name=filingKey,json=filing_key,proto3" json:"filingKey,omitempty"`
|
||||
FilingDate string `protobuf:"bytes,3,opt,name=filingDate,json=filing_date,proto3" json:"filingDate,omitempty"`
|
||||
Form string `protobuf:"bytes,4,opt,name=form,proto3" json:"form,omitempty"`
|
||||
Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
|
||||
FormDescription string `protobuf:"bytes,6,opt,name=formDescription,json=form_description,proto3" json:"formDescription,omitempty"`
|
||||
FileLink string `protobuf:"bytes,7,opt,name=fileLink,json=file_link,proto3" json:"fileLink,omitempty"`
|
||||
DataFiles []*DataFiles `protobuf:"bytes,8,rep,name=dataFiles,json=data_files,proto3" json:"dataFiles,omitempty"`
|
||||
PdfFile string `protobuf:"bytes,9,opt,name=pdfFile,json=pdf_file,proto3" json:"pdfFile,omitempty"`
|
||||
WordFile string `protobuf:"bytes,10,opt,name=wordFile,json=word_file,proto3" json:"wordFile,omitempty"`
|
||||
ExcelFile string `protobuf:"bytes,11,opt,name=excelFile,json=excel_file,proto3" json:"excelFile,omitempty"`
|
||||
Status int32 `protobuf:"varint,12,opt,name=status,proto3" json:"status,omitempty"`
|
||||
Operator string `protobuf:"bytes,13,opt,name=operator,proto3" json:"operator,omitempty"`
|
||||
OperatorId int32 `protobuf:"varint,14,opt,name=operatorId,json=operator_id,proto3" json:"operatorId,omitempty"`
|
||||
CreatedAt string `protobuf:"bytes,15,opt,name=createdAt,json=created_at,proto3" json:"createdAt,omitempty"`
|
||||
UpdatedAt string `protobuf:"bytes,16,opt,name=updatedAt,json=updated_at,proto3" json:"updatedAt,omitempty"`
|
||||
Idx int32 `protobuf:"varint,1,opt,name=idx,proto3" json:"idx"`
|
||||
FilingKey string `protobuf:"bytes,2,opt,name=filingKey,json=filing_key,proto3" json:"filingKey"`
|
||||
FilingDate string `protobuf:"bytes,3,opt,name=filingDate,json=filing_date,proto3" json:"filingDate"`
|
||||
Form string `protobuf:"bytes,4,opt,name=form,proto3" json:"form"`
|
||||
Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description"`
|
||||
FormDescription string `protobuf:"bytes,6,opt,name=formDescription,json=form_description,proto3" json:"formDescription"`
|
||||
FileLink string `protobuf:"bytes,7,opt,name=fileLink,json=file_link,proto3" json:"fileLink"`
|
||||
DataFiles []*DataFiles `protobuf:"bytes,8,rep,name=dataFiles,json=data_files,proto3" json:"dataFiles"`
|
||||
PdfFile string `protobuf:"bytes,9,opt,name=pdfFile,json=pdf_file,proto3" json:"pdfFile"`
|
||||
WordFile string `protobuf:"bytes,10,opt,name=wordFile,json=word_file,proto3" json:"wordFile"`
|
||||
ExcelFile string `protobuf:"bytes,11,opt,name=excelFile,json=excel_file,proto3" json:"excelFile"`
|
||||
Status int32 `protobuf:"varint,12,opt,name=status,proto3" json:"status"`
|
||||
Operator string `protobuf:"bytes,13,opt,name=operator,proto3" json:"operator"`
|
||||
OperatorId int32 `protobuf:"varint,14,opt,name=operatorId,json=operator_id,proto3" json:"operatorId"`
|
||||
CreatedAt string `protobuf:"bytes,15,opt,name=createdAt,json=created_at,proto3" json:"createdAt"`
|
||||
UpdatedAt string `protobuf:"bytes,16,opt,name=updatedAt,json=updated_at,proto3" json:"updatedAt"`
|
||||
}
|
||||
|
||||
func (x *SecFiling) Reset() {
|
||||
@ -522,8 +522,8 @@ type DataFiles struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
|
||||
FileUrl string `protobuf:"bytes,2,opt,name=fileUrl,json=file_url,proto3" json:"fileUrl,omitempty"`
|
||||
Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description"`
|
||||
FileUrl string `protobuf:"bytes,2,opt,name=fileUrl,json=file_url,proto3" json:"fileUrl"`
|
||||
}
|
||||
|
||||
func (x *DataFiles) Reset() {
|
||||
@ -577,17 +577,17 @@ type CreateSecFilingReq struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
FilingDate string `protobuf:"bytes,1,opt,name=filingDate,proto3" json:"filingDate,omitempty"`
|
||||
Form string `protobuf:"bytes,2,opt,name=form,proto3" json:"form,omitempty"`
|
||||
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
|
||||
FormDescription string `protobuf:"bytes,4,opt,name=formDescription,proto3" json:"formDescription,omitempty"`
|
||||
FileLink string `protobuf:"bytes,5,opt,name=fileLink,proto3" json:"fileLink,omitempty"`
|
||||
DataFiles []*DataFiles `protobuf:"bytes,6,rep,name=dataFiles,proto3" json:"dataFiles,omitempty"`
|
||||
PdfFile string `protobuf:"bytes,7,opt,name=pdfFile,proto3" json:"pdfFile,omitempty"`
|
||||
WordFile string `protobuf:"bytes,8,opt,name=wordFile,proto3" json:"wordFile,omitempty"`
|
||||
ExcelFile string `protobuf:"bytes,9,opt,name=excelFile,proto3" json:"excelFile,omitempty"`
|
||||
Operator string `protobuf:"bytes,10,opt,name=operator,proto3" json:"operator,omitempty"`
|
||||
OperatorId int32 `protobuf:"varint,11,opt,name=operatorId,proto3" json:"operatorId,omitempty"`
|
||||
FilingDate string `protobuf:"bytes,1,opt,name=filingDate,proto3" json:"filingDate"`
|
||||
Form string `protobuf:"bytes,2,opt,name=form,proto3" json:"form"`
|
||||
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description"`
|
||||
FormDescription string `protobuf:"bytes,4,opt,name=formDescription,proto3" json:"formDescription"`
|
||||
FileLink string `protobuf:"bytes,5,opt,name=fileLink,proto3" json:"fileLink"`
|
||||
DataFiles []*DataFiles `protobuf:"bytes,6,rep,name=dataFiles,proto3" json:"dataFiles"`
|
||||
PdfFile string `protobuf:"bytes,7,opt,name=pdfFile,proto3" json:"pdfFile"`
|
||||
WordFile string `protobuf:"bytes,8,opt,name=wordFile,proto3" json:"wordFile"`
|
||||
ExcelFile string `protobuf:"bytes,9,opt,name=excelFile,proto3" json:"excelFile"`
|
||||
Operator string `protobuf:"bytes,10,opt,name=operator,proto3" json:"operator"`
|
||||
OperatorId int32 `protobuf:"varint,11,opt,name=operatorId,proto3" json:"operatorId"`
|
||||
}
|
||||
|
||||
func (x *CreateSecFilingReq) Reset() {
|
||||
@ -704,18 +704,18 @@ type UpdateSecFilingReq struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
FilingKey string `protobuf:"bytes,1,opt,name=filingKey,proto3" json:"filingKey,omitempty"`
|
||||
Form string `protobuf:"bytes,2,opt,name=form,proto3" json:"form,omitempty"`
|
||||
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
|
||||
FormDescription string `protobuf:"bytes,4,opt,name=formDescription,proto3" json:"formDescription,omitempty"`
|
||||
FileLink string `protobuf:"bytes,5,opt,name=fileLink,proto3" json:"fileLink,omitempty"`
|
||||
DataFiles []*DataFiles `protobuf:"bytes,6,rep,name=dataFiles,proto3" json:"dataFiles,omitempty"`
|
||||
PdfFile string `protobuf:"bytes,7,opt,name=pdfFile,proto3" json:"pdfFile,omitempty"`
|
||||
WordFile string `protobuf:"bytes,8,opt,name=wordFile,proto3" json:"wordFile,omitempty"`
|
||||
ExcelFile string `protobuf:"bytes,9,opt,name=excelFile,proto3" json:"excelFile,omitempty"`
|
||||
Operator string `protobuf:"bytes,10,opt,name=operator,proto3" json:"operator,omitempty"`
|
||||
OperatorId int32 `protobuf:"varint,11,opt,name=operatorId,proto3" json:"operatorId,omitempty"`
|
||||
FilingDate string `protobuf:"bytes,12,opt,name=filingDate,proto3" json:"filingDate,omitempty"`
|
||||
FilingKey string `protobuf:"bytes,1,opt,name=filingKey,proto3" json:"filingKey"`
|
||||
Form string `protobuf:"bytes,2,opt,name=form,proto3" json:"form"`
|
||||
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description"`
|
||||
FormDescription string `protobuf:"bytes,4,opt,name=formDescription,proto3" json:"formDescription"`
|
||||
FileLink string `protobuf:"bytes,5,opt,name=fileLink,proto3" json:"fileLink"`
|
||||
DataFiles []*DataFiles `protobuf:"bytes,6,rep,name=dataFiles,proto3" json:"dataFiles"`
|
||||
PdfFile string `protobuf:"bytes,7,opt,name=pdfFile,proto3" json:"pdfFile"`
|
||||
WordFile string `protobuf:"bytes,8,opt,name=wordFile,proto3" json:"wordFile"`
|
||||
ExcelFile string `protobuf:"bytes,9,opt,name=excelFile,proto3" json:"excelFile"`
|
||||
Operator string `protobuf:"bytes,10,opt,name=operator,proto3" json:"operator"`
|
||||
OperatorId int32 `protobuf:"varint,11,opt,name=operatorId,proto3" json:"operatorId"`
|
||||
FilingDate string `protobuf:"bytes,12,opt,name=filingDate,proto3" json:"filingDate"`
|
||||
}
|
||||
|
||||
func (x *UpdateSecFilingReq) Reset() {
|
||||
@ -839,7 +839,7 @@ type DetailSecFilingReq struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
FilingKey string `protobuf:"bytes,1,opt,name=filingKey,proto3" json:"filingKey,omitempty"`
|
||||
FilingKey string `protobuf:"bytes,1,opt,name=filingKey,proto3" json:"filingKey"`
|
||||
}
|
||||
|
||||
func (x *DetailSecFilingReq) Reset() {
|
||||
@ -886,8 +886,8 @@ type SecFilingDetailResp struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
|
||||
Data *SecFiling `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
|
||||
Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg"`
|
||||
Data *SecFiling `protobuf:"bytes,2,opt,name=data,proto3" json:"data"`
|
||||
}
|
||||
|
||||
func (x *SecFilingDetailResp) Reset() {
|
||||
@ -941,12 +941,12 @@ type ListSecFilingReq struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Page uint32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"`
|
||||
PageSize uint32 `protobuf:"varint,2,opt,name=pageSize,proto3" json:"pageSize,omitempty"`
|
||||
Form string `protobuf:"bytes,3,opt,name=form,proto3" json:"form,omitempty"`
|
||||
FilingDateBegin string `protobuf:"bytes,4,opt,name=filingDateBegin,proto3" json:"filingDateBegin,omitempty"`
|
||||
FilingDateEnd string `protobuf:"bytes,5,opt,name=filingDateEnd,proto3" json:"filingDateEnd,omitempty"`
|
||||
Status int32 `protobuf:"varint,6,opt,name=status,proto3" json:"status,omitempty"`
|
||||
Page uint32 `protobuf:"varint,1,opt,name=page,proto3" json:"page"`
|
||||
PageSize uint32 `protobuf:"varint,2,opt,name=pageSize,proto3" json:"pageSize"`
|
||||
Form string `protobuf:"bytes,3,opt,name=form,proto3" json:"form"`
|
||||
FilingDateBegin string `protobuf:"bytes,4,opt,name=filingDateBegin,proto3" json:"filingDateBegin"`
|
||||
FilingDateEnd string `protobuf:"bytes,5,opt,name=filingDateEnd,proto3" json:"filingDateEnd"`
|
||||
Status int32 `protobuf:"varint,6,opt,name=status,proto3" json:"status"`
|
||||
}
|
||||
|
||||
func (x *ListSecFilingReq) Reset() {
|
||||
@ -1028,9 +1028,9 @@ type SecFilingListResp struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
|
||||
Total uint32 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`
|
||||
Data []*SecFiling `protobuf:"bytes,3,rep,name=data,proto3" json:"data,omitempty"`
|
||||
Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg"`
|
||||
Total uint32 `protobuf:"varint,2,opt,name=total,proto3" json:"total"`
|
||||
Data []*SecFiling `protobuf:"bytes,3,rep,name=data,proto3" json:"data"`
|
||||
}
|
||||
|
||||
func (x *SecFilingListResp) Reset() {
|
||||
@ -1233,9 +1233,9 @@ type DeleteSecFilingReq struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
FilingKey string `protobuf:"bytes,1,opt,name=filingKey,proto3" json:"filingKey,omitempty"`
|
||||
Operator string `protobuf:"bytes,2,opt,name=operator,proto3" json:"operator,omitempty"`
|
||||
OperatorId int32 `protobuf:"varint,3,opt,name=operatorId,proto3" json:"operatorId,omitempty"`
|
||||
FilingKey string `protobuf:"bytes,1,opt,name=filingKey,proto3" json:"filingKey"`
|
||||
Operator string `protobuf:"bytes,2,opt,name=operator,proto3" json:"operator"`
|
||||
OperatorId int32 `protobuf:"varint,3,opt,name=operatorId,proto3" json:"operatorId"`
|
||||
}
|
||||
|
||||
func (x *DeleteSecFilingReq) Reset() {
|
||||
@ -1296,10 +1296,10 @@ type UpdateSecFilingStatusReq struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
FilingKey string `protobuf:"bytes,1,opt,name=filingKey,proto3" json:"filingKey,omitempty"`
|
||||
Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"`
|
||||
Operator string `protobuf:"bytes,3,opt,name=operator,proto3" json:"operator,omitempty"`
|
||||
OperatorId int32 `protobuf:"varint,4,opt,name=operatorId,proto3" json:"operatorId,omitempty"`
|
||||
FilingKey string `protobuf:"bytes,1,opt,name=filingKey,proto3" json:"filingKey"`
|
||||
Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status"`
|
||||
Operator string `protobuf:"bytes,3,opt,name=operator,proto3" json:"operator"`
|
||||
OperatorId int32 `protobuf:"varint,4,opt,name=operatorId,proto3" json:"operatorId"`
|
||||
}
|
||||
|
||||
func (x *UpdateSecFilingStatusReq) Reset() {
|
||||
|
||||
BIN
data/SourceHanSansSC-VF.ttf
Normal file
BIN
data/SourceHanSansSC-VF.ttf
Normal file
Binary file not shown.
BIN
data/invoice.pdf
Normal file
BIN
data/invoice.pdf
Normal file
Binary file not shown.
BIN
data/竞品报告导入模板.xlsx
Normal file
BIN
data/竞品报告导入模板.xlsx
Normal file
Binary file not shown.
@ -19,6 +19,7 @@ BosUrl = ".bj.bcebos.com"
|
||||
BosBaseDir = "fiee"
|
||||
BosHttp = "https://"
|
||||
BosDomain = "cdns.fontree.cn"
|
||||
|
||||
[oss]
|
||||
AccessKeyId = "OSS_AK"
|
||||
AccessKeySecret = "OSS_SK"
|
||||
@ -29,7 +30,7 @@ CdnHost = "OSS_CDN"
|
||||
|
||||
[redis]
|
||||
RedisDB = "2"
|
||||
RedisAddr = "172.16.100.114:6379"
|
||||
RedisAddr = "svc-fontree-redis-service:6379"
|
||||
RedisPW = "kP6tW4tS3qB2dW4aE6uI5cX2"
|
||||
RedisDBNAme = "2"
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ dubbo:
|
||||
protocol: zookeeper
|
||||
timeout: 3s
|
||||
# address: 121.229.45.214:9004
|
||||
address: 172.16.100.93:2181
|
||||
address: zookeeper:2181
|
||||
# address: 127.0.0.1:2181
|
||||
# address: 114.218.158.24:2181
|
||||
consumer:
|
||||
@ -47,13 +47,6 @@ dubbo:
|
||||
protocol: tri
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.fiee.SecFiling
|
||||
AyrshareClientImpl:
|
||||
request-timeout: 1800s
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.fiee.ayrshare
|
||||
FieeCronClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.fiee.cron
|
||||
FileClientImpl:
|
||||
protocol: tri
|
||||
retries: 0
|
||||
@ -61,6 +54,13 @@ dubbo:
|
||||
methods:
|
||||
- name: SecurityScan
|
||||
timeout: 120000
|
||||
AyrshareClientImpl:
|
||||
request-timeout: 1800s
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.fiee.ayrshare
|
||||
FieeCronClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.fiee.cron
|
||||
SupplierClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.supplier
|
||||
|
||||
5
go.mod
5
go.mod
@ -114,8 +114,10 @@ require (
|
||||
github.com/fonchain_enterprise/utils/objstorage v0.0.0-00010101000000-000000000000
|
||||
github.com/gin-contrib/pprof v1.4.0
|
||||
github.com/go-redis/redis v6.15.9+incompatible
|
||||
github.com/google/uuid v1.6.0
|
||||
github.com/mholt/archiver v3.1.1+incompatible
|
||||
github.com/natefinch/lumberjack v2.0.0+incompatible
|
||||
github.com/phpdave11/gofpdf v1.4.3
|
||||
github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd
|
||||
github.com/samber/lo v1.52.0
|
||||
github.com/shopspring/decimal v1.4.0
|
||||
@ -165,7 +167,6 @@ require (
|
||||
github.com/go-logr/stdr v1.2.2 // indirect
|
||||
github.com/go-resty/resty/v2 v2.7.0 // indirect
|
||||
github.com/golang/mock v1.5.0 // indirect
|
||||
github.com/google/uuid v1.6.0 // indirect
|
||||
github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect
|
||||
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||
@ -180,7 +181,7 @@ require (
|
||||
github.com/nxadm/tail v1.4.11 // indirect
|
||||
github.com/onsi/ginkgo v1.16.5 // indirect
|
||||
github.com/onsi/gomega v1.18.1 // indirect
|
||||
github.com/phpdave11/gofpdi v1.0.14-0.20211212211723-1f10f9844311 // indirect
|
||||
github.com/phpdave11/gofpdi v1.0.15 // indirect
|
||||
github.com/pierrec/lz4 v2.5.2+incompatible // indirect
|
||||
github.com/polarismesh/polaris-go v1.1.0 // indirect
|
||||
github.com/richardlehane/mscfb v1.0.4 // indirect
|
||||
|
||||
9
go.sum
9
go.sum
@ -168,6 +168,7 @@ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kB
|
||||
github.com/bits-and-blooms/bitset v1.2.0 h1:Kn4yilvwNtMACtf1eYDlG8H77R07mZSPbMjLyS07ChA=
|
||||
github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA=
|
||||
github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84=
|
||||
github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
|
||||
github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s=
|
||||
github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs=
|
||||
github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=
|
||||
@ -583,6 +584,7 @@ github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7
|
||||
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
|
||||
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
|
||||
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
|
||||
github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes=
|
||||
github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes=
|
||||
github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 h1:uC1QfSlInpQF+M0ao65imhwqKnz3Q2z/d8PWZRMQvDM=
|
||||
github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k=
|
||||
@ -747,8 +749,11 @@ github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZO
|
||||
github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ=
|
||||
github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4=
|
||||
github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac=
|
||||
github.com/phpdave11/gofpdi v1.0.14-0.20211212211723-1f10f9844311 h1:zyWXQ6vu27ETMpYsEMAsisQ+GqJ4e1TPvSNfdOPF0no=
|
||||
github.com/phpdave11/gofpdf v1.4.3 h1:M/zHvS8FO3zh9tUd2RCOPEjyuVcs281FCyF22Qlz/IA=
|
||||
github.com/phpdave11/gofpdf v1.4.3/go.mod h1:MAwzoUIgD3J55u0rxIG2eu37c+XWhBtXSpPAhnQXf/o=
|
||||
github.com/phpdave11/gofpdi v1.0.14-0.20211212211723-1f10f9844311/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI=
|
||||
github.com/phpdave11/gofpdi v1.0.15 h1:iJazY1BQ07I9s7N5EWjBO1YbhmKfHGxNligUv/Rw4Lc=
|
||||
github.com/phpdave11/gofpdi v1.0.15/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI=
|
||||
github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc=
|
||||
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
|
||||
github.com/pierrec/lz4 v2.5.2+incompatible h1:WCjObylUIOlKy/+7Abdn34TLIkXiA4UWUMhxq9m9ZXI=
|
||||
@ -827,6 +832,7 @@ github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTE
|
||||
github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8=
|
||||
github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE=
|
||||
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w=
|
||||
github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd h1:CmH9+J6ZSsIjUK3dcGsnCnO41eRBOnY12zwkn5qVwgc=
|
||||
github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd/go.mod h1:hPqNNc0+uJM6H+SuU8sEs5K5IQeKccPqeSjfgcKGgPk=
|
||||
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
|
||||
@ -1081,6 +1087,7 @@ golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8H
|
||||
golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs=
|
||||
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
|
||||
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
golang.org/x/image v0.25.0 h1:Y6uW6rH1y5y/LK1J8BPWZtr6yZ7hrsy6hFrXjgsc2fQ=
|
||||
golang.org/x/image v0.25.0/go.mod h1:tCAmOEGthTtkalusGp1g3xa2gke8J6c2N565dTyl9Rs=
|
||||
|
||||
@ -182,6 +182,30 @@ var EnMessages = map[string]string{
|
||||
"未知增值服务": "Unknown value-added service",
|
||||
"套餐未绑定增值服务": "Bundle not bound to value-added service",
|
||||
"网络错误": "Network error",
|
||||
|
||||
// Website report related messages
|
||||
"创建官网报告失败": "Failed to create website report",
|
||||
"删除官网报告失败": "Failed to delete website report",
|
||||
"官网报告列表查询失败": "Failed to query website report list",
|
||||
"编辑官网报告失败": "Failed to edit website report",
|
||||
"显示官网报告失败": "Failed to display website report",
|
||||
|
||||
// Website member management related messages
|
||||
"创建官网成员失败": "Failed to create website member",
|
||||
"删除官网成员失败": "Failed to delete website member",
|
||||
"官网成员列表查询失败": "Failed to query website member list",
|
||||
"编辑官网成员失败": "Failed to edit website member",
|
||||
"显示官网成员失败": "Failed to display website member",
|
||||
"编辑董事会成员失败": "Failed to edit board of directors member",
|
||||
"编辑委员会成员失败": "Failed to edit committee member",
|
||||
"显示委员会成员失败": "Failed to display committee member",
|
||||
"编辑管理员失败": "Failed to edit administrator",
|
||||
"显示管理员失败": "Failed to display administrator",
|
||||
"显示董事会成员失败": "Failed to display board of directors member",
|
||||
|
||||
// Website email alert related messages
|
||||
"提交邮箱通知失败": "Failed to submit email alert",
|
||||
"获取邮箱通知列表失败": "Failed to get email information list",
|
||||
}
|
||||
|
||||
var DeDEMessages = map[string]string{
|
||||
@ -220,63 +244,7 @@ var DeDEMessages = map[string]string{
|
||||
"系统提示:已经发送过,验证码尚可用": "Systemnachricht: Bereits gesendet, Verifizierungscode ist noch verfügbar",
|
||||
"您的手机号当天发送次数过多,请联系管理员通过密码登录": "Ihre Telefonnummer wurde an diesem Tag zu oft gesendet. Bitte wenden Sie sich an den Administrator, um sich über das Passwort anzumelden",
|
||||
"您的手机号验证码错误,请确认之后注册": "Ihre Telefonnummer Verifizierungscode ist falsch, bitte bestätigen und registrieren",
|
||||
"手机号不合法": "Telefonnummer ungültig",
|
||||
"手机号未更改": "Telefonnummer wurde nicht geändert",
|
||||
"新手机号过期": "Neue Telefonnummer abgelaufen",
|
||||
"验证码错误": "Verifizierungscode falsch",
|
||||
"验证码未发送": "Der Verifizierungscode wurde nicht gesendet",
|
||||
"账号不存在": "Konto existiert nicht",
|
||||
"已实名": "In echt",
|
||||
"实名审核中,请勿重复提交": "Während der Echtheitsprüfung bitte nicht wiederholen",
|
||||
"用户状态异常,无法进行审核": "Der Benutzer ist abnorm und kann nicht geprüft werden. Verfahren",
|
||||
"验证码已失效": "Der Verifizierungscode ist ungültig",
|
||||
"服务器错误": "Serverfehler",
|
||||
"验证失败,请控制拼图对齐缺口": "Überprüfung fehlgeschlagen, bitte Steuerung Puzzle-Ausrichtungslücke",
|
||||
"滑块验证状态不存在,请退出重试": "Die krümmbestätigung existiert nicht. Bitte beenden sie den vorgang",
|
||||
"语言不能为空": "Sprache darf nicht leer sein",
|
||||
"排序参数需为正整数": "Sortierparameter muss eine positive ganze Zahl sein",
|
||||
"请先创建中文版本套餐": "Bitte erstelle das Chinese Version-Paket",
|
||||
"增值服务不存在": "Der Werbeangebot existiert nicht",
|
||||
"所选增值服务币种与套餐币种不一致": "Die ausgewählte Währung des Werbeangebots stimmt nicht mit der Währung des Pakets überein",
|
||||
"文件转换失败": "Datei-Umwandlung fehlgeschlagen",
|
||||
"每种增值服务类型只可选择一个": "Jeder Werbeangebotstyp kann nur einmal ausgewählt werden",
|
||||
"保存套餐与增值服务关联失败": "Fehler beim Speichern des Pakets mit Werbeangebot",
|
||||
"删除套餐与增值服务关联失败": "Fehler beim Löschen des Pakets mit Werbeangebot",
|
||||
"查询套餐与增值服务关联失败": "Fehler beim Abrufen des Pakets mit Werbeangebot",
|
||||
"更新套餐与增值服务关联失败": "Fehler beim Aktualisieren des Pakets mit Werbeangebot",
|
||||
"查询增值服务失败": "Fehler beim Abrufen des Werbeangebots",
|
||||
"更新套餐状态失败": "Fehler beim Aktualisieren des Paketstatus",
|
||||
"查询增值服务详情失败": "Fehler beim Abrufen der Werbeangebotsdetails",
|
||||
"序列化转换失败": "Fehler beim Serialisieren",
|
||||
"保存套餐历史记录失败": "Fehler beim Speichern des Pakethistorie",
|
||||
"原价不能为空": "Der reguläre Preis darf nicht leer sein",
|
||||
"原价格式转换失败": "Fehler beim Umwandeln des regulären Preises",
|
||||
"数量参数需为0-99": "Die Anzahlsmusterparameter muss eine positive ganze Zahl sein",
|
||||
"优惠单价需小于等于原价": "Der Rabattpreis muss kleiner oder gleich dem regulären Preis sein",
|
||||
"请先创建中文版本增值服务": "Bitte erstelle das Chinese Version-Werbeangebot",
|
||||
"保存增值服务失败": "Fehler beim Speichern des Werbeangebots",
|
||||
"保存增值服务历史记录失败": "Fehler beim Speichern des Werbeangebots-Historie",
|
||||
"更新增值服务失败": "Fehler beim Aktualisieren des Werbeangebots",
|
||||
"查询增值服务列表失败": "Fehler beim Abrufen der Werbeangebotsliste",
|
||||
"计算价格失败": "Fehler beim Berechnen des Preises",
|
||||
"更新成功": "Aktualisierung erfolgreich",
|
||||
"保存成功": "Speichern erfolgreich",
|
||||
"优惠单价转换失败": "Rabatt-Einzelpreisumrechnung fehlgeschlagen",
|
||||
"符号错误": "Symbolfehler",
|
||||
"条件存在冲突,请重新设置": "Bedingungskonflikt vorhanden, bitte neu konfigurieren",
|
||||
"币种已修改,已取消关联部分增值服务": "Währung wurde geändert, einige Mehrwertdienste wurden getrennt",
|
||||
"币种已修改,已取消关联部分套餐": "Währung wurde geändert, einige Pakete wurden getrennt",
|
||||
"新增增值服务成功": "Mehrwertdienst erfolgreich hinzugefügt",
|
||||
"状态值无效": "Ungültiger Statuswert",
|
||||
"套餐已上架,请勿重复操作": "Paket ist bereits veröffentlicht, bitte nicht wiederholen",
|
||||
"套餐已下架,请勿重复操作": "Paket ist bereits zurückgezogen, bitte nicht wiederholen",
|
||||
"请先实名": "Bitte, nur der name",
|
||||
"实名审核中": "Contest läuft",
|
||||
"实名审核失败": "Die confirmation hat versagt",
|
||||
"未知实名状态": "Noch nicht registriert",
|
||||
|
||||
// Bundle related messages
|
||||
"创建增值套餐失败": "Fehler beim Erstellen des Mehrwert-Bundles",
|
||||
"增值套餐列表查询失败": "Fehler beim Abfragen der Mehrwert-Bundle-Liste",
|
||||
"增值套餐详情查询失败": "Fehler beim Abfragen der Mehrwert-Bundle-Details",
|
||||
"保存增值套餐失败": "Fehler beim Speichern des Mehrwert-Bundles",
|
||||
@ -358,6 +326,85 @@ var DeDEMessages = map[string]string{
|
||||
"未知增值服务": "Unbekannter Mehrwertdienst",
|
||||
"套餐未绑定增值服务": "Bundle nicht an Mehrwertdienst gebunden",
|
||||
"网络错误": "Netzwerkfehler",
|
||||
|
||||
"手机号不合法": "Telefonnummer ungültig",
|
||||
"手机号未更改": "Telefonnummer wurde nicht geändert",
|
||||
"新手机号过期": "Neue Telefonnummer abgelaufen",
|
||||
"验证码错误": "Verifizierungscode falsch",
|
||||
"验证码未发送": "Der Verifizierungscode wurde nicht gesendet",
|
||||
"账号不存在": "Konto existiert nicht",
|
||||
"已实名": "In echt",
|
||||
"实名审核中,请勿重复提交": "Während der Echtheitsprüfung bitte nicht wiederholen",
|
||||
"用户状态异常,无法进行审核": "Der Benutzer ist abnorm und kann nicht geprüft werden. Verfahren",
|
||||
"验证码已失效": "Der Verifizierungscode ist ungültig",
|
||||
"服务器错误": "Serverfehler",
|
||||
"验证失败,请控制拼图对齐缺口": "Überprüfung fehlgeschlagen, bitte Steuerung Puzzle-Ausrichtungslücke",
|
||||
"滑块验证状态不存在,请退出重试": "Die krümmbestätigung existiert nicht. Bitte beenden sie den vorgang",
|
||||
"语言不能为空": "Sprache darf nicht leer sein",
|
||||
"排序参数需为正整数": "Sortierparameter muss eine positive ganze Zahl sein",
|
||||
"请先创建中文版本套餐": "Bitte erstelle das Chinese Version-Paket",
|
||||
"增值服务不存在": "Der Werbeangebot existiert nicht",
|
||||
"所选增值服务币种与套餐币种不一致": "Die ausgewählte Währung des Werbeangebots stimmt nicht mit der Währung des Pakets überein",
|
||||
"文件转换失败": "Datei-Umwandlung fehlgeschlagen",
|
||||
"每种增值服务类型只可选择一个": "Jeder Werbeangebotstyp kann nur einmal ausgewählt werden",
|
||||
"保存套餐与增值服务关联失败": "Fehler beim Speichern des Pakets mit Werbeangebot",
|
||||
"删除套餐与增值服务关联失败": "Fehler beim Löschen des Pakets mit Werbeangebot",
|
||||
"查询套餐与增值服务关联失败": "Fehler beim Abrufen des Pakets mit Werbeangebot",
|
||||
"更新套餐与增值服务关联失败": "Fehler beim Aktualisieren des Pakets mit Werbeangebot",
|
||||
"查询增值服务失败": "Fehler beim Abrufen des Werbeangebots",
|
||||
"更新套餐状态失败": "Fehler beim Aktualisieren des Paketstatus",
|
||||
"查询增值服务详情失败": "Fehler beim Abrufen der Werbeangebotsdetails",
|
||||
"序列化转换失败": "Fehler beim Serialisieren",
|
||||
"保存套餐历史记录失败": "Fehler beim Speichern des Pakethistorie",
|
||||
"原价不能为空": "Der reguläre Preis darf nicht leer sein",
|
||||
"原价格式转换失败": "Fehler beim Umwandeln des regulären Preises",
|
||||
"数量参数需为0-99": "Die Anzahlsmusterparameter muss eine positive ganze Zahl sein",
|
||||
"优惠单价需小于等于原价": "Der Rabattpreis muss kleiner oder gleich dem regulären Preis sein",
|
||||
"请先创建中文版本增值服务": "Bitte erstelle das Chinese Version-Werbeangebot",
|
||||
"保存增值服务失败": "Fehler beim Speichern des Werbeangebots",
|
||||
"保存增值服务历史记录失败": "Fehler beim Speichern des Werbeangebots-Historie",
|
||||
"更新增值服务失败": "Fehler beim Aktualisieren des Werbeangebots",
|
||||
"查询增值服务列表失败": "Fehler beim Abrufen der Werbeangebotsliste",
|
||||
"计算价格失败": "Fehler beim Berechnen des Preises",
|
||||
"更新成功": "Aktualisierung erfolgreich",
|
||||
"保存成功": "Speichern erfolgreich",
|
||||
"优惠单价转换失败": "Rabatt-Einzelpreisumrechnung fehlgeschlagen",
|
||||
"符号错误": "Symbolfehler",
|
||||
"条件存在冲突,请重新设置": "Bedingungskonflikt vorhanden, bitte neu konfigurieren",
|
||||
"币种已修改,已取消关联部分增值服务": "Währung wurde geändert, einige Mehrwertdienste wurden getrennt",
|
||||
"币种已修改,已取消关联部分套餐": "Währung wurde geändert, einige Pakete wurden getrennt",
|
||||
"新增增值服务成功": "Mehrwertdienst erfolgreich hinzugefügt",
|
||||
"状态值无效": "Ungültiger Statuswert",
|
||||
"套餐已上架,请勿重复操作": "Paket ist bereits veröffentlicht, bitte nicht wiederholen",
|
||||
"套餐已下架,请勿重复操作": "Paket ist bereits zurückgezogen, bitte nicht wiederholen",
|
||||
"请先实名": "Bitte, nur der name",
|
||||
"实名审核中": "Contest läuft",
|
||||
"实名审核失败": "Die confirmation hat versagt",
|
||||
"未知实名状态": "Noch nicht registriert",
|
||||
|
||||
// Website report related messages
|
||||
"创建官网报告失败": "Fehler beim Erstellen des Website-Berichts",
|
||||
"删除官网报告失败": "Fehler beim Löschen des Website-Berichts",
|
||||
"官网报告列表查询失败": "Fehler beim Abfragen der Website-Berichtsliste",
|
||||
"编辑官网报告失败": "Fehler beim Bearbeiten des Website-Berichts",
|
||||
"显示官网报告失败": "Fehler beim Anzeigen des Website-Berichts",
|
||||
|
||||
// Website member management related messages
|
||||
"创建官网成员失败": "Fehler beim Erstellen des Website-Mitglieds",
|
||||
"删除官网成员失败": "Fehler beim Löschen des Website-Mitglieds",
|
||||
"官网成员列表查询失败": "Fehler beim Abfragen der Website-Mitgliederliste",
|
||||
"编辑官网成员失败": "Fehler beim Bearbeiten des Website-Mitglieds",
|
||||
"显示官网成员失败": "Fehler beim Anzeigen des Website-Mitglieds",
|
||||
"编辑董事会成员失败": "Fehler beim Bearbeiten des Vorstandsmitglieds",
|
||||
"编辑委员会成员失败": "Fehler beim Bearbeiten des Ausschussmitglieds",
|
||||
"显示委员会成员失败": "Fehler beim Anzeigen des Ausschussmitglieds",
|
||||
"编辑管理员失败": "Fehler beim Bearbeiten des Administrators",
|
||||
"显示管理员失败": "Fehler beim Anzeigen des Administrators",
|
||||
"显示董事会成员失败": "Fehler beim Anzeigen des Vorstandsmitglieds",
|
||||
|
||||
// Website email alert related messages
|
||||
"提交邮箱通知失败": "Fehler beim Senden der E-Mail-Benachrichtigung",
|
||||
"获取邮箱通知列表失败": "Fehler beim Abrufen der E-Mail-Informationsliste",
|
||||
}
|
||||
|
||||
var JaJPMessages = map[string]string{
|
||||
@ -415,7 +462,6 @@ var JaJPMessages = map[string]string{
|
||||
"请先创建中文版本套餐": "最初に中国語バージョンのパッケージを作成してください",
|
||||
"增值服务不存在": "付加サービスは存在しません",
|
||||
"所选增值服务币种与套餐币种不一致": "選択した付加サービスの通貨とパッケージの通貨が一致しません",
|
||||
"文件转换失败": "ファイル変換に失敗しました",
|
||||
"每种增值服务类型只可选择一个": "各種付加サービスタイプは一つしか選択できません",
|
||||
"保存套餐与增值服务关联失败": "パッケージと付加サービスの関連付けの保存に失敗しました",
|
||||
"删除套餐与增值服务关联失败": "パッケージと付加サービスの関連付けの削除に失敗しました",
|
||||
@ -535,6 +581,30 @@ var JaJPMessages = map[string]string{
|
||||
"未知增值服务": "未知の付加価値サービス",
|
||||
"套餐未绑定增值服务": "バンドルが付加価値サービスにバインドされていません",
|
||||
"网络错误": "ネットワークエラー",
|
||||
|
||||
// Website report related messages
|
||||
"创建官网报告失败": "ウェブサイトレポートの作成に失敗しました",
|
||||
"删除官网报告失败": "ウェブサイトレポートの削除に失敗しました",
|
||||
"官网报告列表查询失败": "ウェブサイトレポートリストの検索に失敗しました",
|
||||
"编辑官网报告失败": "ウェブサイトレポートの編集に失敗しました",
|
||||
"显示官网报告失败": "ウェブサイトレポートの表示に失敗しました",
|
||||
|
||||
// Website member management related messages
|
||||
"创建官网成员失败": "ウェブサイトメンバーの作成に失敗しました",
|
||||
"删除官网成员失败": "ウェブサイトメンバーの削除に失敗しました",
|
||||
"官网成员列表查询失败": "ウェブサイトメンバーリストの検索に失敗しました",
|
||||
"编辑官网成员失败": "ウェブサイトメンバーの編集に失敗しました",
|
||||
"显示官网成员失败": "ウェブサイトメンバーの表示に失敗しました",
|
||||
"编辑董事会成员失败": "取締役会メンバーの編集に失敗しました",
|
||||
"编辑委员会成员失败": "委員会メンバーの編集に失敗しました",
|
||||
"显示委员会成员失败": "委員会メンバーの表示に失敗しました",
|
||||
"编辑管理员失败": "管理者の編集に失敗しました",
|
||||
"显示管理员失败": "管理者の表示に失敗しました",
|
||||
"显示董事会成员失败": "取締役会メンバーの表示に失敗しました",
|
||||
|
||||
// Website email alert related messages
|
||||
"提交邮箱通知失败": "メール通知の送信に失敗しました",
|
||||
"获取邮箱通知列表失败": "メール情報リストの取得に失敗しました",
|
||||
}
|
||||
|
||||
var ZhTWMessages = map[string]string{
|
||||
@ -546,17 +616,6 @@ var ZhTWMessages = map[string]string{
|
||||
"删除套餐信息失败": "刪除套餐信息失敗",
|
||||
"删除套餐信息成功": "刪除套餐信息成功",
|
||||
"获取套餐信息失败": "獲取套餐信息失敗",
|
||||
"创建订单信息失败": "創建訂單信息失敗",
|
||||
"创建订单信息成功": "創建訂單信息成功",
|
||||
"更新订单信息失败": "更新訂單信息失敗",
|
||||
"更新订单信息成功": "更新訂單信息成功",
|
||||
"获取订单信息失败": "獲取訂單信息失敗",
|
||||
"获取订单列表失败": "獲取訂單列表失敗",
|
||||
"缺少套餐UUID": "缺少套餐UUID",
|
||||
"缺少客户签名信息": "缺少客戶簽名信息",
|
||||
"插入签名失败": "插入簽名失敗",
|
||||
"缺少订单号": "缺少訂單號",
|
||||
"缺少订单信息": "缺少訂單信息",
|
||||
"非当前用户订单信息不可操作": "非當前用戶訂單信息不可操作",
|
||||
"订单已支付": "訂單已支付",
|
||||
"您已购买过套餐,无法再次购买": "您已購買過套餐,無法再次購買",
|
||||
@ -650,7 +709,6 @@ var ZhTWMessages = map[string]string{
|
||||
"创建套餐失败": "創建套餐失敗",
|
||||
"更新套餐失败": "更新套餐失敗",
|
||||
"删除套餐失败": "刪除套餐失敗",
|
||||
"套餐列表查询失败": "套餐列表查詢失敗",
|
||||
"套餐详情查询失败": "套餐詳情查詢失敗",
|
||||
"更新套餐上下架失败": "更新套餐上下架失敗",
|
||||
"根据订单号查询增值套餐失败": "根據訂單號查詢增值套餐失敗",
|
||||
@ -722,4 +780,27 @@ var ZhTWMessages = map[string]string{
|
||||
"未知增值服务": "未知增值服務",
|
||||
"套餐未绑定增值服务": "套餐未綁定增值服務",
|
||||
"网络错误": "網絡錯誤",
|
||||
// Website report related messages
|
||||
"创建官网报告失败": "創建官網報告失敗",
|
||||
"删除官网报告失败": "刪除官網報告失敗",
|
||||
"官网报告列表查询失败": "官網報告列表查詢失敗",
|
||||
"编辑官网报告失败": "編輯官網報告失敗",
|
||||
"显示官网报告失败": "顯示官網報告失敗",
|
||||
|
||||
// Website member management related messages
|
||||
"创建官网成员失败": "創建官網成員失敗",
|
||||
"删除官网成员失败": "刪除官網成員失敗",
|
||||
"官网成员列表查询失败": "官網成員列表查詢失敗",
|
||||
"编辑官网成员失败": "編輯官網成員失敗",
|
||||
"显示官网成员失败": "顯示官網成員失敗",
|
||||
"编辑董事会成员失败": "編輯董事會成員失敗",
|
||||
"编辑委员会成员失败": "編輯委員會成員失敗",
|
||||
"显示委员会成员失败": "顯示委員會成員失敗",
|
||||
"编辑管理员失败": "編輯管理員失敗",
|
||||
"显示管理员失败": "顯示管理員失敗",
|
||||
"显示董事会成员失败": "顯示董事會成員失敗",
|
||||
|
||||
// Website email alert related messages
|
||||
"提交邮箱通知失败": "提交郵箱通知失敗",
|
||||
"获取邮箱通知列表失败": "獲取郵箱通知列表失敗",
|
||||
}
|
||||
|
||||
109
pkg/common/qwen/qwen_vl.go
Normal file
109
pkg/common/qwen/qwen_vl.go
Normal file
@ -0,0 +1,109 @@
|
||||
package qwen
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
modelQwen "fonchain-fiee/pkg/model/qwen"
|
||||
"fonchain-fiee/pkg/utils"
|
||||
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
// VL 调用通义千问视觉多模态API,支持多个视频、多张图片和文本
|
||||
func VL(videoURLs []string, imageURLs []string, text string, model string) (resp *modelQwen.VLResponse, err error) {
|
||||
// 设置默认模型
|
||||
if model == "" {
|
||||
model = "qwen3-vl-plus"
|
||||
}
|
||||
|
||||
// 构建内容列表
|
||||
content := make([]modelQwen.VLContent, 0)
|
||||
|
||||
// 添加视频内容,支持自定义fps
|
||||
for _, videoURL := range videoURLs {
|
||||
fps := 2 // 默认fps为2
|
||||
content = append(content, modelQwen.VLContent{
|
||||
Type: "video_url",
|
||||
VideoURL: &modelQwen.VideoURL{
|
||||
URL: videoURL,
|
||||
},
|
||||
FPS: fps,
|
||||
})
|
||||
}
|
||||
|
||||
// 添加图片内容
|
||||
for _, imageURL := range imageURLs {
|
||||
content = append(content, modelQwen.VLContent{
|
||||
Type: "image_url",
|
||||
ImageURL: &modelQwen.ImageURL{
|
||||
URL: imageURL,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
// 添加文本内容
|
||||
if text != "" {
|
||||
content = append(content, modelQwen.VLContent{
|
||||
Type: "text",
|
||||
Text: text,
|
||||
})
|
||||
}
|
||||
|
||||
// 构建请求
|
||||
req := modelQwen.VLRequest{
|
||||
Model: model,
|
||||
Messages: []modelQwen.VLMessage{
|
||||
{
|
||||
Role: "user",
|
||||
Content: content,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
// 序列化请求
|
||||
jsonData, err := json.Marshal(req)
|
||||
if err != nil {
|
||||
zap.L().Error("VL Marshal failed", zap.Error(err))
|
||||
return nil, errors.New("序列化请求失败")
|
||||
}
|
||||
|
||||
// 发送请求,使用PostBytesHeader获取状态码和响应体
|
||||
statusCode, body, err := utils.PostBytesHeader(modelQwen.DashscopeVLURL, map[string]interface{}{
|
||||
"Authorization": "Bearer " + modelQwen.DashscopeAPIKey,
|
||||
"Content-Type": "application/json",
|
||||
// "X-DashScope-OssResourceResolve": "enable", // 启用OSS资源解析
|
||||
}, jsonData)
|
||||
if err != nil {
|
||||
zap.L().Error("VL Post failed", zap.Error(err))
|
||||
return nil, errors.New("请求视觉AI失败")
|
||||
}
|
||||
|
||||
// 检查状态码,如果不是200,尝试解析错误响应
|
||||
if statusCode != 200 {
|
||||
// 尝试解析错误响应
|
||||
var errorResp struct {
|
||||
Error struct {
|
||||
Message string `json:"message"`
|
||||
Type string `json:"type"`
|
||||
Code string `json:"code"`
|
||||
} `json:"error"`
|
||||
}
|
||||
if err := json.Unmarshal(body, &errorResp); err == nil && errorResp.Error.Message != "" {
|
||||
zap.L().Error("VL API error", zap.Int("status", statusCode), zap.String("message", errorResp.Error.Message))
|
||||
return nil, fmt.Errorf("%s", errorResp.Error.Message)
|
||||
}
|
||||
// 如果无法解析错误响应,返回通用错误
|
||||
zap.L().Error("VL API error", zap.Int("status", statusCode), zap.String("body", string(body)))
|
||||
return nil, fmt.Errorf("接口返回错误")
|
||||
}
|
||||
|
||||
// 解析响应
|
||||
var result modelQwen.VLResponse
|
||||
if err = json.Unmarshal(body, &result); err != nil {
|
||||
zap.L().Error("VL Unmarshal failed", zap.Error(err), zap.String("body", string(body)))
|
||||
return nil, fmt.Errorf("解析响应失败: %v", err)
|
||||
}
|
||||
|
||||
return &result, nil
|
||||
}
|
||||
@ -33,9 +33,14 @@ func InitTasks() error {
|
||||
err = cm.AddTask("scheduledPublish", "0 */1 * * * *", ScheduledPublishTask) //FIXME正式30分钟一次
|
||||
|
||||
err = cm.AddTask("artistAutoConfirmAnalysis", "0 */1 * * * *", ArtistAutoConfirmAnalysisTask)
|
||||
err = cm.AddTask("refreshWorkAnalysisApprovalStatus", "0 */1 * * * *", RefreshWorkAnalysisApprovalStatusTask)
|
||||
err = cm.AddTask("refreshWorkAnalysisApprovalStatus", "0 */5 * * * *", RefreshWorkAnalysisApprovalStatusTask)
|
||||
err = cm.AddTask("artistAutoConfirmReport", "0 */1 * * * *", ArtistAutoConfirmReportTask)
|
||||
err = cm.AddTask("refreshCompetitiveReportApprovalStatus", "0 */5 * * * *", RefreshCompetitiveReportApprovalStatusTask)
|
||||
err = cm.AddTask("refreshArtistOrder", "0 */5 * * * *", RefreshArtistOrderTask)
|
||||
|
||||
//余量表每月1号更新定时任务
|
||||
err = cm.AddTask("updateBundleBalance", "0 0 0 1 * *", UpdateBundleBalance)
|
||||
|
||||
// 每天 00:30 和 12:30 执行 Ayrshare 指标采集任务
|
||||
// err = cm.AddTask("ayrshareMetricsCollector", "0 30 0,12 * * *", AyrshareMetricsCollectorTask)
|
||||
err = cm.AddTask("ayrshareMetricsCollector", "0 30 0 * * *", AyrshareMetricsCollectorTask)
|
||||
@ -161,6 +166,23 @@ func AutoManuallyConfirmWorkTask() {
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
|
||||
if balanceInfoRes.PurchaseType == 1 {
|
||||
//判断作品对应订单是否相同
|
||||
if wordInfoRes.BundleOrderUuid != balanceInfoRes.OrderUUID {
|
||||
//订单号不相同
|
||||
//新购买的,直接扣除失败
|
||||
_, err = service.CastProvider.UpdateStatus(context.Background(), &cast.UpdateStatusReq{
|
||||
WorkAction: cast.WorkActionENUM_CONFIRM,
|
||||
WorkUuid: req.WorkUuid,
|
||||
ConfirmRemark: req.ConfirmRemark,
|
||||
ConfirmStatus: 3,
|
||||
})
|
||||
log.Printf("订单号不相同,作品uuid:"+req.WorkUuid, zap.Error(err))
|
||||
continue
|
||||
}
|
||||
//相同着正常走流程
|
||||
}
|
||||
if wordInfoRes.WorkStatus != 4 {
|
||||
continue
|
||||
}
|
||||
@ -225,7 +247,7 @@ func RefreshWorkAnalysisApprovalStatusTask() {
|
||||
resp, err := service.CastProvider.ListWorkAnalysis(context.Background(), &cast.ListWorkAnalysisReq{
|
||||
Page: 1,
|
||||
StatusList: []uint32{2}, // 状态为2表示待审批
|
||||
PageSize: 999999,
|
||||
PageSize: 9999,
|
||||
})
|
||||
if err != nil {
|
||||
log.Printf("获取数据分析列表失败: %v", err)
|
||||
@ -278,6 +300,28 @@ func RefreshPublishStatusTask() {
|
||||
//zap.L().Info("刷新发布状态成功")
|
||||
}
|
||||
|
||||
func ArtistAutoConfirmAnalysisTask() {
|
||||
now := float64(time.Now().Unix())
|
||||
opt := redis.ZRangeBy{
|
||||
Min: fmt.Sprintf("%d", 0),
|
||||
Max: fmt.Sprintf("%f", now),
|
||||
}
|
||||
analysisUuids, err := cache.RedisClient.ZRangeByScore(modelCast.AutoConfirmAnalysisQueueKey, opt).Result()
|
||||
if err != nil {
|
||||
zap.L().Error("获取到期数据分析任务失败", zap.Error(err))
|
||||
return
|
||||
}
|
||||
if len(analysisUuids) == 0 {
|
||||
zap.L().Debug("没有到期的数据分析任务")
|
||||
return
|
||||
}
|
||||
zap.L().Info("发现到期数据分析任务", zap.Int("count", len(analysisUuids)))
|
||||
for _, analysisUuid := range analysisUuids {
|
||||
serverCast.ProcessAnalysisTask(context.Background(), analysisUuid)
|
||||
}
|
||||
}
|
||||
|
||||
// ScheduledPublishTask 定时发布任务,从Redis Sorted Set中获取所有workUuid并根据score判断处理
|
||||
// PublishTask 定时发布任务,从Redis Sorted Set中获取所有workUuid并根据score判断处理
|
||||
func PublishTask() {
|
||||
go RefreshPublishStatusTask() // 刷新发布状态
|
||||
@ -551,27 +595,47 @@ func processBatchWorkPublishQueueData(batchData []string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func ArtistAutoConfirmAnalysisTask() {
|
||||
func UpdateBundleBalance() {
|
||||
service.BundleProvider.UpdateBundleBalance(context.Background(), &bundle.UpdateBundleBalanceReq{})
|
||||
}
|
||||
|
||||
func ArtistAutoConfirmReportTask() {
|
||||
now := float64(time.Now().Unix())
|
||||
opt := redis.ZRangeBy{
|
||||
Min: fmt.Sprintf("%d", 0),
|
||||
Max: fmt.Sprintf("%f", now),
|
||||
}
|
||||
analysisUuids, err := cache.RedisClient.ZRangeByScore(modelCast.AutoConfirmAnalysisQueueKey, opt).Result()
|
||||
reportUuids, err := cache.RedisClient.ZRangeByScore(modelCast.AutoConfirmReportQueueKey, opt).Result()
|
||||
if err != nil {
|
||||
zap.L().Error("获取到期数据分析任务失败", zap.Error(err))
|
||||
zap.L().Error("获取到期竞品报告任务失败", zap.Error(err))
|
||||
return
|
||||
}
|
||||
if len(analysisUuids) == 0 {
|
||||
zap.L().Debug("没有到期的数据分析任务")
|
||||
if len(reportUuids) == 0 {
|
||||
zap.L().Debug("没有到期的竞品报告任务")
|
||||
return
|
||||
}
|
||||
zap.L().Info("发现到期数据分析任务", zap.Int("count", len(analysisUuids)))
|
||||
for _, analysisUuid := range analysisUuids {
|
||||
serverCast.ProcessAnalysisTask(context.Background(), analysisUuid)
|
||||
zap.L().Info("发现到期竞品报告任务", zap.Int("count", len(reportUuids)))
|
||||
for _, reportUuid := range reportUuids {
|
||||
serverCast.ProcessReportTask(context.Background(), reportUuid)
|
||||
}
|
||||
}
|
||||
|
||||
func RefreshCompetitiveReportApprovalStatusTask() {
|
||||
resp, err := service.CastProvider.ListCompetitiveReport(context.Background(), &cast.ListCompetitiveReportReq{
|
||||
Page: 1,
|
||||
StatusList: []uint32{2}, // 状态为2表示待审批
|
||||
PageSize: 9999,
|
||||
})
|
||||
if err != nil {
|
||||
log.Printf("获取竞品报告列表失败: %v", err)
|
||||
return
|
||||
}
|
||||
if resp.Data == nil || len(resp.Data) == 0 {
|
||||
return
|
||||
}
|
||||
serverCast.RefreshCompetitiveReportApproval(nil, resp.Data)
|
||||
}
|
||||
|
||||
// AyrshareMetricsCollectorTask Ayrshare 指标采集定时任务(每天 00:30 和 12:30 执行)
|
||||
func AyrshareMetricsCollectorTask() {
|
||||
serverCast.ExecuteAyrshareMetricsCollector()
|
||||
|
||||
@ -163,7 +163,6 @@ func CheckWebLogin(provider *account.AccountClientImpl) gin.HandlerFunc {
|
||||
Domain: info.Domain,
|
||||
ID: info.ID,
|
||||
Name: info.NickName,
|
||||
//Account: info.Account,
|
||||
//NickName: info.NickName,
|
||||
//PositionUsers: qres.PositionUsers,
|
||||
//Extend: infoRes.Info.Extend,
|
||||
|
||||
@ -13,7 +13,6 @@ type UserWorkAnalysisConfirmReq struct {
|
||||
}
|
||||
|
||||
type GetBundleBalanceListResp struct {
|
||||
|
||||
Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total"`
|
||||
Data []*BundleBalanceItem `protobuf:"bytes,2,rep,name=data,proto3" json:"data"`
|
||||
}
|
||||
@ -33,6 +32,8 @@ type BundleBalanceItem struct {
|
||||
ImageConsumptionNumber int32 `protobuf:"varint,12,opt,name=imageConsumptionNumber,proto3" json:"imageConsumptionNumber"`
|
||||
DataAnalysisNumber int32 `protobuf:"varint,13,opt,name=dataAnalysisNumber,proto3" json:"dataAnalysisNumber"`
|
||||
DataAnalysisConsumptionNumber int32 `protobuf:"varint,14,opt,name=dataAnalysisConsumptionNumber,proto3" json:"dataAnalysisConsumptionNumber"`
|
||||
ExpansionPacksNumber int32 `protobuf:"varint,15,opt,name=expansionPacksNumber,proto3" json:"expansionPacksNumber"`
|
||||
Bought int32 `protobuf:"varint,16,opt,name=bought,proto3" json:"bought"`
|
||||
CompetitiveNumber int32 `protobuf:"varint,15,opt,name=competitiveNumber,proto3" json:"competitiveNumber"`
|
||||
CompetitiveConsumptionNumber int32 `protobuf:"varint,16,opt,name=competitiveConsumptionNumber,proto3" json:"competitiveConsumptionNumber"`
|
||||
ExpansionPacksNumber int32 `protobuf:"varint,17,opt,name=expansionPacksNumber,proto3" json:"expansionPacksNumber"`
|
||||
Bought int32 `protobuf:"varint,18,opt,name=bought,proto3" json:"bought"`
|
||||
}
|
||||
|
||||
@ -8,10 +8,11 @@ type SyncAsProfileReq struct {
|
||||
|
||||
// 定义枚举值
|
||||
const (
|
||||
BalanceTypeAccountValue BalanceTypeEnum = 1
|
||||
BalanceTypeImageValue BalanceTypeEnum = 2
|
||||
BalanceTypeVideoValue BalanceTypeEnum = 3
|
||||
BalanceTypeDataValue BalanceTypeEnum = 4
|
||||
BalanceTypeAccountValue BalanceTypeEnum = 1 //账号
|
||||
BalanceTypeImageValue BalanceTypeEnum = 2 //图文
|
||||
BalanceTypeVideoValue BalanceTypeEnum = 3 //视频
|
||||
BalanceTypeDataValue BalanceTypeEnum = 4 //数据分析
|
||||
BalanceTypeCompetitiveValue BalanceTypeEnum = 5 //竞品数
|
||||
)
|
||||
|
||||
var PlatformNameKv = map[uint32]string{
|
||||
|
||||
@ -21,6 +21,8 @@ const (
|
||||
AutoConfirmAnalysisQueueKey = "auto_confirm:analysis:queue"
|
||||
AutoConfirmAnalysisLockKey = "auto_confirm:analysis:lock:%s"
|
||||
|
||||
AutoConfirmReportQueueKey = "auto_confirm:report:queue"
|
||||
AutoConfirmReportLockKey = "auto_confirm:report:lock:%s"
|
||||
// AyrshareMetricsCollectorLockKey Ayrshare 指标采集任务锁
|
||||
AyrshareMetricsCollectorLockKey = "ayrshare:metrics:collector:lock"
|
||||
)
|
||||
@ -52,7 +54,7 @@ var WorkStatusMM = map[int]string{
|
||||
6: "发布成功",
|
||||
7: "发布失败",
|
||||
8: "未知",
|
||||
9: "验收确认",
|
||||
9: "验证确认",
|
||||
}
|
||||
var ConfirmTypeMM = map[int]string{
|
||||
1: "艺人确认",
|
||||
|
||||
@ -4,6 +4,7 @@ const (
|
||||
DashscopeAPIKey string = "sk-5ae9df5d3bcf4755ad5d12012058a2e7"
|
||||
DashscopeText2ImageURL string = "https://dashscope.aliyuncs.com/api/v1/services/aigc/text2image/image-synthesis"
|
||||
DashscopeEditImageURL string = "https://dashscope.aliyuncs.com/api/v1/services/aigc/image2image/image-synthesis"
|
||||
DashscopeVLURL string = "https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions"
|
||||
)
|
||||
|
||||
// QwenImageRequest 通义千问文生图请求
|
||||
|
||||
47
pkg/model/qwen/qwen_vl.go
Normal file
47
pkg/model/qwen/qwen_vl.go
Normal file
@ -0,0 +1,47 @@
|
||||
package qwen
|
||||
|
||||
// VLContent 视觉多模态内容结构,支持文本、图片和视频
|
||||
type VLContent struct {
|
||||
Type string `json:"type"` // text, image_url, video_url
|
||||
Text string `json:"text,omitempty"` // type=text 时使用
|
||||
ImageURL *ImageURL `json:"image_url,omitempty"` // type=image_url 时使用
|
||||
VideoURL *VideoURL `json:"video_url,omitempty"` // type=video_url 时使用
|
||||
FPS int `json:"fps,omitempty"` // type=video_url 时可选,视频帧率
|
||||
}
|
||||
|
||||
// VideoURL 视频URL结构
|
||||
type VideoURL struct {
|
||||
URL string `json:"url"`
|
||||
}
|
||||
|
||||
// VLRequest 视觉多模态请求结构
|
||||
type VLRequest struct {
|
||||
Model string `json:"model"` // 模型名称,如 qwen3-vl-plus
|
||||
Messages []VLMessage `json:"messages"` // 消息列表
|
||||
Seed int64 `json:"seed,omitempty"` // 随机种子
|
||||
EnableSearch bool `json:"enable_search,omitempty"` // 是否启用搜索
|
||||
}
|
||||
|
||||
// VLMessage 视觉多模态消息结构
|
||||
type VLMessage struct {
|
||||
Role string `json:"role"` // user, assistant, system
|
||||
Content []VLContent `json:"content"` // 内容列表,可包含文本、图片、视频
|
||||
}
|
||||
|
||||
// VLResponse 视觉多模态响应结构
|
||||
type VLResponse struct {
|
||||
Choices []VLChoice `json:"choices"`
|
||||
Model string `json:"model,omitempty"`
|
||||
ID string `json:"id,omitempty"`
|
||||
}
|
||||
|
||||
// VLChoice 视觉多模态选择结果
|
||||
type VLChoice struct {
|
||||
Message struct {
|
||||
Content string `json:"content"`
|
||||
ReasoningContent string `json:"reasoning_content"`
|
||||
Role string `json:"role"`
|
||||
} `json:"message"`
|
||||
FinishReason string `json:"finish_reason"`
|
||||
Index int `json:"index,omitempty"`
|
||||
}
|
||||
@ -33,18 +33,41 @@ func AnalysisRouter(r *gin.RouterGroup) {
|
||||
analysis.POST("update-approval-id", serviceCast.UpdateWorkAnalysisApprovalID) // 更新作品分析审批ID
|
||||
|
||||
analysis.POST("trigger-ayrshare-metrics", serviceCast.TriggerAyrshareMetricsCollector) // 手动触发 Ayrshare 指标采集任务
|
||||
}
|
||||
|
||||
competitiveReport := r.Group("report")
|
||||
competitiveReport.Use(middleware.CheckWebLogin(service.AccountProvider))
|
||||
{
|
||||
competitiveReport.POST("create", serviceCast.CreateCompetitiveReport) // 创建竞品报告
|
||||
competitiveReport.POST("import-batch", serviceCast.ImportCompetitiveReportBatch) // 批量导入竞品报告
|
||||
competitiveReport.POST("update-status", serviceCast.UpdateCompetitiveReportStatus) // 更新竞品报告状态
|
||||
competitiveReport.POST("detail", serviceCast.GetCompetitiveReport) // 获取竞品报告详情
|
||||
competitiveReport.POST("list", serviceCast.ListCompetitiveReport) // 获取竞品报告列表
|
||||
competitiveReport.POST("single-list", serviceCast.ListCompetitiveReportByArtistUuid) // 根据艺人UUID获取竞品报告列表
|
||||
competitiveReport.POST("delete", serviceCast.DeleteCompetitiveReport) // 删除竞品报告
|
||||
competitiveReport.POST("update-approval-id", serviceCast.UpdateCompetitiveReportApprovalID) // 更新竞品报告审批ID
|
||||
competitiveReport.POST("count-by-work-uuids", serviceCast.CountCompetitiveReportByWorkUuids) // 根据作品UUID统计竞品报告数量
|
||||
competitiveReport.POST("export-list", serviceCast.ListCompetitiveReportExport) // 竞品报告列表导出
|
||||
competitiveReport.POST("export-single-list", serviceCast.ListCompetitiveReportSingleExport) // 竞品报告单个列表导出
|
||||
}
|
||||
|
||||
// 员工任务相关路由(需要App登录验证
|
||||
analysisAppRoute := r.Group("app/analysis")
|
||||
analysisAppRoute.Use(middleware.CheckLogin(service.AccountFieeProvider))
|
||||
{
|
||||
analysisAppRoute.POST("list", serviceCast.ListWorkAnalysis) // 作品列表
|
||||
analysisAppRoute.POST("list", serviceCast.ListWorkAnalysisForApp) // 作品列表
|
||||
analysisAppRoute.POST("detail", serviceCast.GetWorkAnalysis) // 作品分析详情
|
||||
analysisAppRoute.POST("update-status", serviceCast.UpdateWorkAnalysisStatus) // 用户确认
|
||||
analysisAppRoute.POST("check-balance", serviceCast.CheckBundleBalance) // 检查套餐余量
|
||||
analysisAppRoute.POST("tobe-confirmed-list", serviceCast.TobeConfirmedList) // 待确认数据列表
|
||||
analysisAppRoute.POST("work-analysis-confirm", bundle.WorkAnalysisConfirm)
|
||||
}
|
||||
|
||||
competitiveReportAppRoute := r.Group("app/report")
|
||||
competitiveReportAppRoute.Use(middleware.CheckLogin(service.AccountFieeProvider))
|
||||
{
|
||||
competitiveReportAppRoute.POST("detail", serviceCast.GetCompetitiveReportForApp) // 获取竞品报告详情(App端)
|
||||
competitiveReportAppRoute.POST("list", serviceCast.ListReportByArtistUuidForApp) // 根据艺人UUID获取竞品报告列表(App端)
|
||||
competitiveReportAppRoute.POST("update-status", serviceCast.UpdateCompetitiveReportStatus) // 更新竞品报告状态(App端)
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,8 +14,13 @@ func BundleRouter(r *gin.RouterGroup) {
|
||||
bundleAppRoute := r.Group("bundle")
|
||||
bundleAppNoAuthRoute := r.Group("bundle")
|
||||
bundleAppRoute.Use(middleware.CheckLogin(service.AccountFieeProvider))
|
||||
bundleClientNoAuthRoute := r.Group("bundle/no-auth")
|
||||
// 套餐
|
||||
{
|
||||
{
|
||||
bundleClientNoAuthRoute.POST("export/work-cast-info", bundle.ExportWorkCastInfo)
|
||||
bundleClientNoAuthRoute.POST("export/bundle-price-info", bundle.ExportBundlePriceInfo)
|
||||
}
|
||||
bundleClientRoute := bundleRoute.Group("system")
|
||||
{
|
||||
bundleClientRoute.POST("create", bundle.CreateBundle)
|
||||
@ -50,6 +55,7 @@ func BundleRouter(r *gin.RouterGroup) {
|
||||
metrics.POST("export/balance-detail", bundle.MetricsBalanceDetailExport)
|
||||
metrics.POST("export/balance-metrics", bundle.BalanceMetricsExport)
|
||||
}
|
||||
|
||||
}
|
||||
bundleClientRouteV2 := bundleRoute.Group("system/v2")
|
||||
{
|
||||
|
||||
@ -16,10 +16,12 @@ func BundleOrderRouter(r *gin.RouterGroup) {
|
||||
bundleOrderRoute := r.Group("bundle-order")
|
||||
bundleOrderRoute.Use(middleware.CheckLogin(service.AccountFieeProvider))
|
||||
bundleOrderWebRoute := r.Group("bundle-order")
|
||||
bundleOrderWebRoute.POST("password-free/bundle-order-list-download", bundle.OrderRecordsListPasswordFreeDownload)
|
||||
bundleOrderWebRoute.Use(middleware.CheckWebLogin(service.AccountProvider))
|
||||
|
||||
bundleOrderNoAuthRoute := r.Group("bundle-order")
|
||||
// 套餐
|
||||
{
|
||||
bundleOrderNoAuthRoute.POST("common/web/no-auth/reconciliation-list-download", bundle.GetReconciliationListDownload)
|
||||
bundleOrderClientWebRoute := bundleOrderWebRoute.Group("common/web")
|
||||
{
|
||||
bundleOrderClientWebRoute.POST("bundle-order-list", bundle.OrderRecordsList)
|
||||
@ -30,10 +32,21 @@ func BundleOrderRouter(r *gin.RouterGroup) {
|
||||
bundleOrderClientWebRoute.POST("query-order-snapshot-information", bundle.QueryTheOrderSnapshotInformation)
|
||||
// 自动创建用户和订单
|
||||
bundleOrderClientWebRoute.POST("auto-create-user-order", bundle.AutoCreateUserAndOrder)
|
||||
// 发票管理相关接口
|
||||
bundleOrderClientWebRoute.POST("invoice-list", bundle.GetBundleInvoiceList)
|
||||
bundleOrderClientWebRoute.POST("invoice-express-info", bundle.GetInvoiceExpressInfo)
|
||||
bundleOrderClientWebRoute.POST("updata-invoice-express-info", bundle.UpdateInvoiceExpressInfo)
|
||||
bundleOrderClientWebRoute.GET("country-list", bundle.GetCountryList)
|
||||
bundleOrderClientWebRoute.POST("export-invoice", bundle.ExportInvoice)
|
||||
}
|
||||
bundleOrderClientAppRoute := bundleOrderRoute.Group("common/app")
|
||||
{
|
||||
bundleOrderClientAppRoute.POST("bundle-order-list", bundle.OrderRecordsList)
|
||||
//发票管理
|
||||
bundleOrderClientAppRoute.POST("creat-paper-invoice", bundle.CreatePaperInvoiceAddress)
|
||||
bundleOrderClientAppRoute.POST("invoice-express-info", bundle.GetInvoiceExpressInfo)
|
||||
bundleOrderClientAppRoute.POST("invoice-list", bundle.GetInvoiceList)
|
||||
bundleOrderClientAppRoute.GET("country-list", bundle.GetCountryList)
|
||||
}
|
||||
|
||||
//bundleOrderWebRoute := bundleOrderRoute.Group("web")
|
||||
|
||||
@ -17,6 +17,7 @@ func cronRouter(r *gin.RouterGroup) {
|
||||
cron.POST("updateScheduleTask", cronService.UpdateScheduleTask)
|
||||
cron.POST("pauseScheduleTask", cronService.PauseScheduleTask)
|
||||
cron.POST("startScheduleTask", cronService.StartScheduleTask)
|
||||
cron.POST("republishScheduleTask", cronService.RepublishScheduleTask)
|
||||
cron.POST("deleteScheduleTask", cronService.DeleteScheduleTask)
|
||||
cron.POST("getListScheduleTask", cronService.GetListScheduleTask)
|
||||
cron.POST("getListExecutionResult", cronService.GetListExecutionResult)
|
||||
|
||||
35
pkg/router/customerContract.go
Normal file
35
pkg/router/customerContract.go
Normal file
@ -0,0 +1,35 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"fonchain-fiee/pkg/middleware"
|
||||
"fonchain-fiee/pkg/service"
|
||||
serviceCustomerContract "fonchain-fiee/pkg/service/customerContract"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// CustomerContractRouter 客户与合同管理路由,参考 MediaRouter 实现
|
||||
func CustomerContractRouter(r *gin.RouterGroup) {
|
||||
auth := r.Group("")
|
||||
auth.Use(middleware.CheckWebLogin(service.AccountProvider))
|
||||
|
||||
// 客户管理
|
||||
customer := auth.Group("customer")
|
||||
{
|
||||
customer.POST("list", serviceCustomerContract.GetCustomerList)
|
||||
customer.POST("detail", serviceCustomerContract.GetCustomerDetail)
|
||||
customer.POST("update", serviceCustomerContract.UpdateCustomer)
|
||||
customer.POST("list/referral-person", serviceCustomerContract.GetReferralPersonList)
|
||||
}
|
||||
|
||||
// 合同管理
|
||||
contract := auth.Group("contract")
|
||||
{
|
||||
contract.POST("list", serviceCustomerContract.GetContractList)
|
||||
contract.POST("detail", serviceCustomerContract.GetContractDetail)
|
||||
contract.POST("update", serviceCustomerContract.UpdateContract)
|
||||
contract.POST("development-cycles", serviceCustomerContract.GetDevelopmentCyclesByContractUUID)
|
||||
contract.POST("payment-cycles", serviceCustomerContract.GetPaymentCyclesByContractUUID)
|
||||
contract.POST("upload-attachment", serviceCustomerContract.UploadContractAttachment)
|
||||
}
|
||||
}
|
||||
@ -48,6 +48,8 @@ func MediaRouter(r *gin.RouterGroup) {
|
||||
work.POST("remind", serviceCast.Remind)
|
||||
work.POST("publish-info", serviceCast.PublishInfo)
|
||||
work.POST("import-batch", serviceCast.ImportWorkBatch)
|
||||
work.POST("list-published", serviceCast.WorkListPublished)
|
||||
work.POST("update-work-script", serviceCast.UpdateWorkScript)
|
||||
}
|
||||
|
||||
script := auth.Group("script")
|
||||
@ -99,11 +101,13 @@ func MediaRouter(r *gin.RouterGroup) {
|
||||
{
|
||||
aiNoAuth.POST("image-generate", serviceAI.AIImageGenerate)
|
||||
aiNoAuth.POST("text-generate", serviceAI.AIChat)
|
||||
aiNoAuth.POST("video-vl", serviceAI.AIVideoVL)
|
||||
}
|
||||
aiAuth := auth.Group("ai")
|
||||
{
|
||||
aiAuth.POST("one-text", serviceAI.OneText)
|
||||
aiAuth.POST("more-text", serviceAI.MoreText)
|
||||
aiAuth.POST("generate-report", serviceAI.AICompetitorReport)
|
||||
}
|
||||
|
||||
social := noAuth.Group("social")
|
||||
|
||||
@ -8,13 +8,16 @@ import (
|
||||
"fonchain-fiee/pkg/service/asChat"
|
||||
"fonchain-fiee/pkg/service/auth"
|
||||
"fonchain-fiee/pkg/service/bundle"
|
||||
emailAlert "fonchain-fiee/pkg/service/emailAlerts"
|
||||
"fonchain-fiee/pkg/service/file"
|
||||
"fonchain-fiee/pkg/service/governance"
|
||||
imports "fonchain-fiee/pkg/service/import"
|
||||
"fonchain-fiee/pkg/service/lang"
|
||||
"fonchain-fiee/pkg/service/members"
|
||||
"fonchain-fiee/pkg/service/pressreleases"
|
||||
"fonchain-fiee/pkg/service/qr"
|
||||
"fonchain-fiee/pkg/service/redirect"
|
||||
"fonchain-fiee/pkg/service/reports"
|
||||
"fonchain-fiee/pkg/service/upload"
|
||||
"fonchain-fiee/pkg/service/version"
|
||||
"net/http"
|
||||
@ -54,6 +57,7 @@ func NewRouter() *gin.Engine {
|
||||
ValueAddBundleRouter(privateGroup)
|
||||
TaskBenchRouter(privateGroup) // 新增任务台路由
|
||||
MediaRouter(privateGroup)
|
||||
CustomerContractRouter(privateGroup)
|
||||
AnalysisRouter(privateGroup)
|
||||
SecFilingRouter(privateGroup)
|
||||
app.MediaAppRouter(privateGroup)
|
||||
@ -182,11 +186,13 @@ func NewRouter() *gin.Engine {
|
||||
governanceRoute := v1.Group("/governance")
|
||||
governanceRouteLogin := governanceRoute.Group("", middleware.CheckWebLogin(service.AccountProvider))
|
||||
|
||||
governanceRoute.GET("/display", middleware.Cors(), governance.Display)
|
||||
governanceRoute.POST("/display", middleware.Cors(), governance.Display)
|
||||
governanceRouteLogin.POST("/list", governance.List)
|
||||
governanceRouteLogin.POST("", governance.Create)
|
||||
governanceRouteLogin.POST("/edit", governance.Edit)
|
||||
governanceRouteLogin.POST("/delete", governance.Delete)
|
||||
governanceRouteLogin.POST("/updataStatus", governance.UpdataStatus)
|
||||
governanceRouteLogin.POST("/getGovernanceInfo", governance.GetGovernanceInfo)
|
||||
|
||||
}
|
||||
{
|
||||
@ -196,12 +202,72 @@ func NewRouter() *gin.Engine {
|
||||
|
||||
pressreleasesRoute.POST("/display", middleware.Cors(), pressreleases.Display)
|
||||
pressreleasesRoute.GET("", middleware.Cors(), pressreleases.Get)
|
||||
pressreleasesRouteLogin.POST("/sortAndStatus", pressreleases.SortAndStatus)
|
||||
pressreleasesRouteLogin.POST("/info", pressreleases.Info)
|
||||
pressreleasesRouteLogin.POST("/list", pressreleases.List)
|
||||
pressreleasesRouteLogin.POST("", pressreleases.Create)
|
||||
pressreleasesRouteLogin.POST("/edit", pressreleases.Edit)
|
||||
pressreleasesRouteLogin.POST("/delete", pressreleases.Delete)
|
||||
|
||||
}
|
||||
{
|
||||
// 官网报告
|
||||
reportsRoute := v1.Group("/reports")
|
||||
reportsRouteLogin := reportsRoute.Group("", middleware.CheckWebLogin(service.AccountProvider))
|
||||
// 年度报告
|
||||
reportsRoute.POST("/annual/display", middleware.Cors(), reports.AnnualReportDisplay)
|
||||
reportsRouteLogin.POST("/annual/create", reports.AnnualReportCreate)
|
||||
reportsRouteLogin.POST("/annual/sortAndStatus", reports.AnnualReportSortAndStatus)
|
||||
reportsRouteLogin.POST("/annual/info", reports.AnnualReportInfo)
|
||||
reportsRouteLogin.POST("/annual/list", reports.AnnualReportList)
|
||||
reportsRouteLogin.POST("/annual/delete", reports.AnnualReportDelete)
|
||||
reportsRouteLogin.POST("/annual/edit", reports.AnnualReportEdit)
|
||||
// 季度报告
|
||||
reportsRoute.POST("/quarterly/display", middleware.Cors(), reports.QuarterlyReportDisplay)
|
||||
reportsRouteLogin.POST("/quarterly/create", reports.QuarterlyReportCreate)
|
||||
reportsRouteLogin.POST("/quarterly/sortAndStatus", reports.QuarterlyReportSortAndStatus)
|
||||
reportsRouteLogin.POST("/quarterly/info", reports.QuarterlyReportInfo)
|
||||
reportsRouteLogin.POST("/quarterly/list", reports.QuarterlyReportList)
|
||||
reportsRouteLogin.POST("/quarterly/delete", reports.QuarterlyReportDelete)
|
||||
reportsRouteLogin.POST("/quarterly/edit", reports.QuarterlyReportEdit)
|
||||
}
|
||||
{
|
||||
// 邮箱通知
|
||||
emailAlertsRoute := v1.Group("/emailalerts")
|
||||
emailAlertsRouteLogin := emailAlertsRoute.Group("", middleware.CheckWebLogin(service.AccountProvider))
|
||||
|
||||
emailAlertsRoute.POST("/submit", middleware.Cors(), emailAlert.EmailAlertSubmit)
|
||||
emailAlertsRouteLogin.POST("/list", emailAlert.GetEmailInformationList)
|
||||
}
|
||||
{
|
||||
// 成员管理
|
||||
membersRoute := v1.Group("/members")
|
||||
membersRouteLogin := membersRoute.Group("", middleware.CheckWebLogin(service.AccountProvider))
|
||||
// 成员部门信息管理
|
||||
membersRouteLogin.POST("/management/add", members.AddManagement)
|
||||
membersRouteLogin.POST("/management/list", members.GetManagementList)
|
||||
membersRouteLogin.POST("/management/info", members.GetManagementInfo)
|
||||
membersRouteLogin.POST("/management/delete", members.DeleteManagement)
|
||||
membersRouteLogin.POST("/management/updata", members.UpdataManagement)
|
||||
membersRouteLogin.POST("/management/edit", members.EditManagement)
|
||||
membersRoute.POST("/management/display", middleware.Cors(), members.DisplayManagement)
|
||||
// 董事会信息管理
|
||||
membersRouteLogin.POST("/boardofdirectors/add", members.AddBoardOfDirectors)
|
||||
membersRouteLogin.POST("/boardofdirectors/list", members.GetBoardOfDirectorsList)
|
||||
membersRouteLogin.POST("/boardofdirectors/info", members.GetBoardOfDirectorsInfo)
|
||||
membersRouteLogin.POST("/boardofdirectors/delete", members.DeleteBoardOfDirectors)
|
||||
membersRouteLogin.POST("/boardofdirectors/updata", members.UpdataBoardOfDirectors)
|
||||
membersRouteLogin.POST("/boardofdirectors/edit", members.EditBoardOfDirectors)
|
||||
membersRoute.POST("/boardofdirectors/display", middleware.Cors(), members.DisplayBoardOfDirectors)
|
||||
// 委员会任命管理
|
||||
membersRouteLogin.POST("/committeeappointments/add", members.AddCommitteeAppointments)
|
||||
membersRouteLogin.POST("/committeeappointments/list", members.GetCommitteeAppointmentsList)
|
||||
membersRouteLogin.POST("/committeeappointments/info", members.GetCommitteeAppointmentsInfo)
|
||||
membersRouteLogin.POST("/committeeappointments/delete", members.DeleteCommitteeAppointments)
|
||||
membersRouteLogin.POST("/committeeappointments/updata", members.UpdataCommitteeAppointments)
|
||||
membersRouteLogin.POST("/committeeappointments/edit", members.EditCommitteeAppointments)
|
||||
membersRoute.POST("/committeeappointments/display", middleware.Cors(), members.DisplayCommitteeAppointments)
|
||||
}
|
||||
{
|
||||
importRoute := v1.Group("/import")
|
||||
importRoute.Use(middleware.CheckWebLogin(service.AccountProvider))
|
||||
|
||||
@ -16,28 +16,22 @@ func TaskBenchRouter(r *gin.RouterGroup) {
|
||||
taskBenchRoute.Use(middleware.CheckWebLogin(service.AccountProvider))
|
||||
// 任务台管理
|
||||
{
|
||||
// 查询待指派任务记录
|
||||
taskBenchRoute.POST("pending-task-list", taskbench.GetPendingTaskList)
|
||||
|
||||
// 待指派任务布局
|
||||
taskBenchRoute.POST("pending-task-layout", taskbench.GetPendingTaskLayout)
|
||||
taskBenchRoute.POST("set-pending-task-layout", taskbench.SetPendingTaskLayout)
|
||||
|
||||
// 指派某位员工完成某个艺人的任务
|
||||
// 指派
|
||||
taskBenchRoute.POST("assign-task", taskbench.AssignTask)
|
||||
|
||||
// 批量指派任务
|
||||
// 批量指派
|
||||
taskBenchRoute.POST("batch-assign-task", taskbench.BatchAssignTask)
|
||||
|
||||
// 中止指派任务(根据任务指派记录UUID)
|
||||
// 中止指派
|
||||
taskBenchRoute.POST("terminate-task-by-uuid", taskbench.TerminateTaskByUUID)
|
||||
|
||||
// 批量中止指派任务(根据多个任务指派记录UUID)
|
||||
// 批量中止指派
|
||||
taskBenchRoute.POST("batch-terminate-task", taskbench.BatchTerminateTask)
|
||||
|
||||
// 修改待发数量
|
||||
taskBenchRoute.POST("update-pending-count", taskbench.UpdatePendingCount)
|
||||
|
||||
// 查询最近被指派记录
|
||||
taskBenchRoute.POST("recent-assign-records", taskbench.GetRecentAssignRecords)
|
||||
|
||||
@ -62,12 +56,6 @@ func TaskBenchRouter(r *gin.RouterGroup) {
|
||||
// 员工手动点击完成任务
|
||||
taskBenchRoute.POST("complete-manually", taskbench.CompleteTaskManually)
|
||||
|
||||
// 查询艺人套餐剩余数量
|
||||
taskBenchRoute.POST("artist-bundle-balance", taskbench.GetArtistBundleBalance)
|
||||
|
||||
// 批量查询艺人待上传数量
|
||||
taskBenchRoute.POST("batch-get-pending-upload", taskbench.GetPendingUploadBreakdown)
|
||||
|
||||
// 查询艺人待上传列表
|
||||
taskBenchRoute.POST("pending-upload-list", taskbench.GetArtistUploadStatsList)
|
||||
|
||||
@ -81,12 +69,4 @@ func TaskBenchRouter(r *gin.RouterGroup) {
|
||||
taskBenchRoute.POST("pending-data-list", taskbench.GetPendingAssign)
|
||||
}
|
||||
|
||||
// 员工任务相关路由(需要App登录验证)
|
||||
taskBenchAppRoute := r.Group("task-bench")
|
||||
taskBenchAppRoute.Use(middleware.CheckLogin(service.AccountFieeProvider))
|
||||
|
||||
{
|
||||
// 员工实际完成任务状态更新
|
||||
taskBenchAppRoute.POST("update-progress", taskbench.UpdateTaskProgress)
|
||||
}
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ func UserExcelDownload(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
titleList := []string{
|
||||
"用户编号", "姓名", "性别", "国籍", "手机号", "证件类型", "有效期至", "证件号码", "出生日期", "年龄", "现所在地", "注册时间", "审核时间", "审核状态", "不通过备注",
|
||||
"用户编号", "姓名", "性别", "国籍", "手机号", "证件类型", "有效期至", "证件号码", "出生日期", "年龄", "现所在地", "注册时间", "审核时间", "审核状态", "不通过备注", "非大陆手机号", "邮箱",
|
||||
}
|
||||
var dataList []interface{}
|
||||
|
||||
@ -59,6 +59,8 @@ func UserExcelDownload(c *gin.Context) {
|
||||
i.AuditTime,
|
||||
Status,
|
||||
i.NotPassRemarks,
|
||||
i.AbroadTelAreaCode + i.AbroadTel,
|
||||
i.Email,
|
||||
}
|
||||
dataList = append(dataList, &data)
|
||||
}
|
||||
|
||||
277
pkg/service/ai/video_vl.go
Normal file
277
pkg/service/ai/video_vl.go
Normal file
@ -0,0 +1,277 @@
|
||||
package ai
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"fonchain-fiee/pkg/common/qwen"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"strings"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// VideoVLRequest 视频/图片理解请求参数
|
||||
type VideoVLRequest struct {
|
||||
Videos []string `json:"videos"` // 视频URL列表
|
||||
Images []string `json:"images"` // 图片URL列表
|
||||
Text string `json:"text"` // 可选的文本提示
|
||||
Model string `json:"model"` // 可选的模型名称,默认使用 qwen3-vl-plus
|
||||
}
|
||||
|
||||
// AIVideoVL AI理解视频/图片接口
|
||||
func AIVideoVL(ctx *gin.Context) {
|
||||
var req VideoVLRequest
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, errors.New("参数错误"))
|
||||
return
|
||||
}
|
||||
|
||||
// 检查是否至少提供了视频或图片
|
||||
if len(req.Videos) == 0 && len(req.Images) == 0 {
|
||||
service.Error(ctx, errors.New("至少需要提供一个视频或图片"))
|
||||
return
|
||||
}
|
||||
|
||||
if len(req.Videos) > 1 {
|
||||
service.Error(ctx, errors.New("当前只能选一个视频"))
|
||||
return
|
||||
}
|
||||
|
||||
Prompt := "请你详细描述视频和图片中的内容分别是什么"
|
||||
|
||||
// 调用VL函数进行AI理解
|
||||
result, err := qwen.VL(req.Videos, req.Images, Prompt, req.Model)
|
||||
if err != nil {
|
||||
// 检查是否是文件下载超时错误(内容过大)
|
||||
errMsg := err.Error()
|
||||
if contains(errMsg, "Download multimodal file timed out") || contains(errMsg, "timed out") {
|
||||
service.Error(ctx, errors.New("内容过大,请重新选择"))
|
||||
} else {
|
||||
service.Error(ctx, errors.New("ai分析帖子内容失败"))
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 返回AI返回的数据
|
||||
service.Success(ctx, result)
|
||||
}
|
||||
|
||||
// contains 检查字符串是否包含子字符串(不区分大小写)
|
||||
func contains(s, substr string) bool {
|
||||
return strings.Contains(strings.ToLower(s), strings.ToLower(substr))
|
||||
}
|
||||
|
||||
// CompetitorReportRequest 竞品报告请求参数
|
||||
type CompetitorReportRequest struct {
|
||||
Videos []string `json:"videos"` // 视频URL列表
|
||||
Images []string `json:"images"` // 图片URL列表
|
||||
TextPrompt string `json:"textPrompt"` // 竞品报告要求文本
|
||||
ImagePrompt string `json:"imagePrompt"` // 图片URL
|
||||
Model string `json:"model"` // 可选的模型名称,默认使用 qwen3-vl-plus
|
||||
}
|
||||
|
||||
// CompetitorReportResponse 竞品报告响应数据
|
||||
type CompetitorReportResponse struct {
|
||||
ImageURL string `json:"image_url,omitempty"` // 生成的图片URL(1024*1024),非必须返回
|
||||
Text string `json:"text,omitempty"` // 竞品报告文本内容,非必须返回
|
||||
}
|
||||
|
||||
// AICompetitorReport 生成竞品报告接口
|
||||
func AICompetitorReport(ctx *gin.Context) {
|
||||
var req CompetitorReportRequest
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, errors.New("参数错误"))
|
||||
return
|
||||
}
|
||||
|
||||
if req.TextPrompt == "" && req.ImagePrompt == "" {
|
||||
service.Error(ctx, errors.New("文本和图片提示词不能同时为空"))
|
||||
return
|
||||
}
|
||||
|
||||
// 检查是否至少提供了视频或图片
|
||||
if len(req.Videos) == 0 && len(req.Images) == 0 {
|
||||
service.Error(ctx, errors.New("至少需要提供一个视频或图片"))
|
||||
return
|
||||
}
|
||||
|
||||
if len(req.Videos) > 1 {
|
||||
service.Error(ctx, errors.New("当前只能选一个视频"))
|
||||
return
|
||||
}
|
||||
|
||||
// 第一步:调用AI理解视频/图片内容
|
||||
vlPrompt := "请你详细描述这些视频或者这些图片中的内容分别是什么,请详细描述,不要遗漏任何细节"
|
||||
vlResult, err := qwen.VL(req.Videos, req.Images, vlPrompt, req.Model)
|
||||
if err != nil {
|
||||
// 检查是否是文件下载超时错误(内容过大)
|
||||
errMsg := err.Error()
|
||||
if contains(errMsg, "Download multimodal file timed out") || contains(errMsg, "timed out") {
|
||||
service.Error(ctx, errors.New("内容过大,请重新选择"))
|
||||
} else {
|
||||
service.Error(ctx, fmt.Errorf("AI理解视频图片失败: %v", err))
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 获取理解后的内容
|
||||
if len(vlResult.Choices) == 0 {
|
||||
service.Error(ctx, errors.New("AI理解返回结果为空"))
|
||||
return
|
||||
}
|
||||
vlContent := vlResult.Choices[0].Message.Content
|
||||
|
||||
// 定义协程结果结构
|
||||
type textResult struct {
|
||||
text string
|
||||
err error
|
||||
}
|
||||
|
||||
type imageResult struct {
|
||||
imageURL string
|
||||
err error
|
||||
}
|
||||
|
||||
// 根据 TextPrompt 和 ImagePrompt 是否为空决定启动哪些协程
|
||||
needText := req.TextPrompt != ""
|
||||
needImage := req.ImagePrompt != ""
|
||||
|
||||
var textChan chan textResult
|
||||
var imageChan chan imageResult
|
||||
|
||||
// 如果需要生成文本,启动文本生成协程
|
||||
if needText {
|
||||
textChan = make(chan textResult, 1)
|
||||
go func() {
|
||||
// 构建文本生成提示词:理解内容 + 用户要求
|
||||
textPrompt := fmt.Sprintf("基于以下视频和图片的内容描述:\n%s\n\n请根据以下要求生成竞品报告:注意不要输出markdown格式来进行排版,请直接输出纯文本。只需要回复竞品报告的内容,其他无关的内容不要输出,输出的内容第一行不要标题,直接输出竞品报告的正文即可\n我的要求是:\n%s", vlContent, req.TextPrompt)
|
||||
|
||||
chatReq, err := buildChatRequest(textPrompt, nil)
|
||||
if err != nil {
|
||||
textChan <- textResult{err: err}
|
||||
return
|
||||
}
|
||||
|
||||
chatResp, err := qwen.Chat(*chatReq)
|
||||
if err != nil {
|
||||
textChan <- textResult{err: err}
|
||||
return
|
||||
}
|
||||
|
||||
if len(chatResp.Choices) == 0 {
|
||||
textChan <- textResult{err: errors.New("文本生成返回结果为空")}
|
||||
return
|
||||
}
|
||||
|
||||
textChan <- textResult{text: chatResp.Choices[0].Message.Content}
|
||||
}()
|
||||
}
|
||||
|
||||
// 如果需要生成图片,启动图片生成协程
|
||||
if needImage {
|
||||
imageChan = make(chan imageResult, 1)
|
||||
go func() {
|
||||
// 先请求聊天获取图片提示词
|
||||
imagePromptText := fmt.Sprintf("基于以下视频和图片的内容描述:\n%s\n\n请根据以下要求生成竞品报告图片的提示词:\n%s", vlContent, req.ImagePrompt)
|
||||
|
||||
chatReq, err := buildChatRequest(imagePromptText, nil)
|
||||
if err != nil {
|
||||
imageChan <- imageResult{err: err}
|
||||
return
|
||||
}
|
||||
|
||||
chatResp, err := qwen.Chat(*chatReq)
|
||||
if err != nil {
|
||||
imageChan <- imageResult{err: err}
|
||||
return
|
||||
}
|
||||
|
||||
if len(chatResp.Choices) == 0 {
|
||||
imageChan <- imageResult{err: errors.New("图片提示词生成返回结果为空")}
|
||||
return
|
||||
}
|
||||
|
||||
imagePrompt := chatResp.Choices[0].Message.Content
|
||||
|
||||
// 生成图片(1024*1024),基于理解后的内容使用文生图
|
||||
size := "1024*1024"
|
||||
resultTask, err := qwen.GenerateTextImage(imagePrompt, size)
|
||||
|
||||
if err != nil {
|
||||
imageChan <- imageResult{err: err}
|
||||
return
|
||||
}
|
||||
|
||||
if resultTask.Code != "" {
|
||||
imageChan <- imageResult{err: errors.New("文生图失败: " + resultTask.Message)}
|
||||
return
|
||||
}
|
||||
|
||||
// 等待图片生成完成
|
||||
result, err := qwen.ImgTaskResult(resultTask.Output.TaskID)
|
||||
if err != nil {
|
||||
imageChan <- imageResult{err: err}
|
||||
return
|
||||
}
|
||||
|
||||
if result == nil || len(result.Output.Results) == 0 {
|
||||
imageChan <- imageResult{err: errors.New("图片生成失败")}
|
||||
return
|
||||
}
|
||||
|
||||
// 返回第一张图片的URL
|
||||
imageChan <- imageResult{imageURL: result.Output.Results[0].URL}
|
||||
}()
|
||||
}
|
||||
|
||||
// 等待所有启动的协程完成
|
||||
var textRes textResult
|
||||
var imageRes imageResult
|
||||
|
||||
// 根据实际启动的协程数量等待结果
|
||||
if needText && needImage {
|
||||
// 两个协程都启动了,使用循环等待两个都完成
|
||||
completed := 0
|
||||
for completed < 2 {
|
||||
select {
|
||||
case textRes = <-textChan:
|
||||
completed++
|
||||
case imageRes = <-imageChan:
|
||||
completed++
|
||||
}
|
||||
}
|
||||
} else if needText {
|
||||
// 只启动文本生成协程
|
||||
textRes = <-textChan
|
||||
} else if needImage {
|
||||
// 只启动图片生成协程
|
||||
imageRes = <-imageChan
|
||||
}
|
||||
|
||||
// 处理文本结果(如果生成了文本)
|
||||
if needText {
|
||||
if textRes.err != nil {
|
||||
service.Error(ctx, fmt.Errorf("生成竞品报告文本失败: %v", textRes.err))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// 处理图片结果(如果生成了图片)
|
||||
if needImage {
|
||||
if imageRes.err != nil {
|
||||
service.Error(ctx, fmt.Errorf("生成竞品报告图片失败: %v", imageRes.err))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// 返回结果(只返回实际生成的内容)
|
||||
result := CompetitorReportResponse{}
|
||||
if needText {
|
||||
result.Text = textRes.text
|
||||
}
|
||||
if needImage {
|
||||
result.ImageURL = imageRes.imageURL
|
||||
}
|
||||
|
||||
service.Success(ctx, result)
|
||||
}
|
||||
@ -134,6 +134,9 @@ func (cr ChatHandler) NewMessage(c *gin.Context) {
|
||||
service.ErrWithCode(c, code)
|
||||
return
|
||||
}
|
||||
if request.LocalStamp == 0 {
|
||||
request.LocalStamp = time.Now().Unix()
|
||||
}
|
||||
err := logic.NewMessage(c, &cr.cache, chatUser, request)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
@ -260,8 +263,9 @@ func (cr ChatHandler) MessageList(c *gin.Context) {
|
||||
// return
|
||||
// }
|
||||
//}
|
||||
messages := cr.cache.GetChatRecord(request.SessionId)
|
||||
//messages := []*accountFiee.ChatRecordData{}
|
||||
// 启用或禁用缓存
|
||||
//messages := cr.cache.GetChatRecord(request.SessionId)
|
||||
messages := []*accountFiee.ChatRecordData{}
|
||||
var returnDataIdList = make([]int64, 0)
|
||||
defer func() {
|
||||
//获取最新数据时,重置新消息数量统计
|
||||
@ -277,6 +281,7 @@ func (cr ChatHandler) MessageList(c *gin.Context) {
|
||||
}
|
||||
}
|
||||
}
|
||||
fmt.Println("defer CoverChatRecord , message len:", len(messages))
|
||||
err := cr.cache.CoverChatRecord(request.SessionId, messages)
|
||||
if err != nil {
|
||||
log.Print("设置消息已读失败", zap.Error(err))
|
||||
@ -302,6 +307,7 @@ func (cr ChatHandler) MessageList(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
messages = recordResp.List
|
||||
fmt.Println("GetChatRecordList len:", len(messages))
|
||||
err = cr.cache.CoverChatRecord(request.SessionId, messages)
|
||||
if err != nil {
|
||||
log.Print("覆盖聊天记录失败", zap.Error(err))
|
||||
@ -332,7 +338,7 @@ func (cr ChatHandler) MessageList(c *gin.Context) {
|
||||
return messages[i].ID > messages[j].ID
|
||||
}
|
||||
})
|
||||
fmt.Printf("data is %+v\n", messages)
|
||||
//fmt.Printf("data is %+v\n", messages)
|
||||
total := 0
|
||||
for i, message := range messages {
|
||||
switch request.Direction {
|
||||
@ -367,8 +373,6 @@ func (cr ChatHandler) MessageList(c *gin.Context) {
|
||||
resp[i].Message.Media = []dto.MessageMedia{}
|
||||
}
|
||||
}
|
||||
if accessUser.Role == 1 {
|
||||
}
|
||||
service.Success(c, resp)
|
||||
}
|
||||
|
||||
|
||||
@ -42,6 +42,7 @@ func NewMessage(ctx context.Context, cache *chatCache.ChatCache, sender *account
|
||||
fmt.Println(request.LocalStamp - msgRecord.LocalStamp)
|
||||
if msgRecord.Message.Text == request.Message.Text && request.LocalStamp-msgRecord.LocalStamp < 1 { //秒级
|
||||
cacheMap[request.AtUserId] = request
|
||||
fmt.Println("\n\n跳过消息发送\n\t跳过消息发送\n\t\t跳过消息发送\n\n")
|
||||
return nil
|
||||
} else {
|
||||
cacheMap[request.AtUserId] = request
|
||||
|
||||
@ -177,10 +177,12 @@ func (r *Robot) Run() {
|
||||
if hit {
|
||||
hasHit = true
|
||||
if rule.RunTime().IsZero() {
|
||||
err := rule.Run(r.cache)
|
||||
if err != nil {
|
||||
log.Printf("robot 执行任务失败:%v\n", err)
|
||||
}
|
||||
go func() {
|
||||
err := rule.Run(r.cache)
|
||||
if err != nil {
|
||||
log.Printf("robot 执行任务失败:%v\n", err)
|
||||
}
|
||||
}()
|
||||
} else {
|
||||
r.RegisterDelayTask(rule)
|
||||
}
|
||||
|
||||
@ -27,6 +27,12 @@ func NewReplyWhenHitKeywords(title string, keywords []string) IRobotTask {
|
||||
return &RobotTaskWithKeyworkds{title: title, keywords: keywords}
|
||||
}
|
||||
func (r *RobotTaskWithKeyworkds) Hit(event ws.ListenEventData, sender *accountFiee.ChatUserData) (hit bool) {
|
||||
//fmt.Printf("event.EventType != ws.EventChatMessage:%v\n", event.EventType != ws.EventChatMessage)
|
||||
//fmt.Printf("event.Msg: %v\n", event.Msg == "")
|
||||
//fmt.Printf("event.Client == nil: %v\n", event.Client == nil)
|
||||
//fmt.Printf("event.ChatUser == nil: %v\n", event.ChatUser == nil)
|
||||
//fmt.Printf("event.ChatUser.Role != 1: %v\n", event.ChatUser.Role != 1)
|
||||
//fmt.Printf("r.keywords: %+v\n", r.keywords)
|
||||
if event.EventType != ws.EventChatMessage || event.Msg == "" || event.Client == nil || event.ChatUser == nil {
|
||||
return
|
||||
}
|
||||
|
||||
387
pkg/service/bundle/BundleInvoice.go
Normal file
387
pkg/service/bundle/BundleInvoice.go
Normal file
@ -0,0 +1,387 @@
|
||||
package bundle
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"fonchain-fiee/api/bundle"
|
||||
"fonchain-fiee/pkg/model/login"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/service/bundle/common"
|
||||
"fonchain-fiee/pkg/utils"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/xuri/excelize/v2"
|
||||
)
|
||||
|
||||
// 创建发票
|
||||
func CreateBundleInvoice(c *gin.Context) {
|
||||
var req bundle.CreateInvoiceReq
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
res, err := service.BundleProvider.CreateInvoice(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
// 创建纸质发票地址
|
||||
func CreatePaperInvoiceAddress(c *gin.Context) {
|
||||
var req bundle.CreatePaperInvoiceAddressReq
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
userInfo := login.GetUserInfoFromC(c)
|
||||
req.UserId = strconv.FormatInt(int64(userInfo.ID), 10)
|
||||
req.ApplyTime = time.Now().Format("2006-01-02 15:04:05")
|
||||
res, err := service.BundleProvider.CreatePaperInvoiceAddress(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
// 获取发票列表
|
||||
func GetBundleInvoiceList(c *gin.Context) {
|
||||
var req bundle.GetInvoiceListReq
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
res, err := service.BundleProvider.GetInvoiceList(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
// 获取用户信息
|
||||
func GetUserInfo(c *gin.Context) {
|
||||
userInfo := login.GetUserInfoFromC(c)
|
||||
service.Success(c, userInfo)
|
||||
}
|
||||
|
||||
// 获取纸质发票地址列表
|
||||
func GetInvoiceExpressInfo(c *gin.Context) {
|
||||
var req bundle.GetInvoiceExpressInfoReq
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
res, err := service.BundleProvider.GetInvoiceExpressInfo(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
// 更新纸质发票地址
|
||||
func UpdateInvoiceExpressInfo(c *gin.Context) {
|
||||
var req bundle.UpdateInvoiceExpressInfoReq
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
res, err := service.BundleProvider.UpdateInvoiceExpressInfo(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
// H5获取用户的发票列表
|
||||
func GetInvoiceList(c *gin.Context) {
|
||||
var req bundle.GetInvoiceInfoByOrderNoReq
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
userInfo := login.GetUserInfoFromC(c)
|
||||
req.UserId = strconv.FormatInt(int64(userInfo.ID), 10)
|
||||
res, err := service.BundleProvider.GetInvoiceInfoByOrderNo(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
func ExportInvoice(c *gin.Context) {
|
||||
var req bundle.GetInvoiceListReq
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
exportFileName := "FIEE订单发票列表_" + time.Now().Format("20060102150405") + ".xlsx"
|
||||
|
||||
userInfo := login.GetUserInfoFromC(c)
|
||||
filePath := fmt.Sprintf("./runtime/%d/%s", userInfo.ID, exportFileName)
|
||||
utils.CheckDirPath("./runtime/"+fmt.Sprint(userInfo.ID), true)
|
||||
|
||||
res, err := service.BundleProvider.GetInvoiceList(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, errors.New(common.ExportInvoiceFailed))
|
||||
return
|
||||
}
|
||||
fmt.Println("开始写入Excel:", filePath)
|
||||
if err := writeToExcelInvoiceInfo(filePath, res.Data); err != nil {
|
||||
fmt.Println("写入Excel失败:", err)
|
||||
service.Error(c, errors.New(common.ExportInvoiceFailed))
|
||||
return
|
||||
}
|
||||
var scheme string
|
||||
if c.GetHeader("X-Forwarded-Proto") == "https" {
|
||||
scheme = "https"
|
||||
} else {
|
||||
scheme = "http"
|
||||
}
|
||||
|
||||
var exportUrl string = fmt.Sprintf("%s://%s/api/fiee/static/%s", scheme, c.Request.Host, strings.Replace(filePath, "./runtime/", "", 1))
|
||||
service.Success(c, gin.H{
|
||||
"url": exportUrl,
|
||||
})
|
||||
}
|
||||
|
||||
func writeToExcelInvoiceInfo(filePath string, data []*bundle.InvoiceInfo) error {
|
||||
f := excelize.NewFile()
|
||||
sheet := "Sheet1"
|
||||
|
||||
// 手动表头(顺序与写入字段顺序必须一致)
|
||||
headers := []string{
|
||||
"是否申请纸质发票", "是否寄出", "姓名", "手机号", "国家",
|
||||
"详细地址", "申请时间", "操作艺人", "艺人编号",
|
||||
}
|
||||
|
||||
// 写表头
|
||||
for i, h := range headers {
|
||||
col, _ := excelize.ColumnNumberToName(i + 1)
|
||||
cell := col + "1"
|
||||
if err := f.SetCellValue(sheet, cell, h); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// 从第2行开始写数据
|
||||
for r, it := range data {
|
||||
row := r + 2
|
||||
// 逐列写入(注意顺序必须和 headers 一致)
|
||||
write := func(colIdx int, v interface{}) error {
|
||||
col, _ := excelize.ColumnNumberToName(colIdx)
|
||||
cell := fmt.Sprintf("%s%d", col, row)
|
||||
return f.SetCellValue(sheet, cell, v)
|
||||
}
|
||||
isApplyPaperInvoice := ""
|
||||
isExpress := ""
|
||||
if it.PaperInvocieStatus == 1 {
|
||||
isApplyPaperInvoice = "未申请"
|
||||
isExpress = "未寄出"
|
||||
} else if it.PaperInvocieStatus == 2 {
|
||||
isApplyPaperInvoice = "已申请"
|
||||
isExpress = "未寄出"
|
||||
} else if it.PaperInvocieStatus == 3 {
|
||||
isApplyPaperInvoice = "已申请"
|
||||
isExpress = "已寄出"
|
||||
}
|
||||
|
||||
_ = write(1, isApplyPaperInvoice)
|
||||
_ = write(2, isExpress)
|
||||
_ = write(3, it.Name)
|
||||
_ = write(4, it.Phone)
|
||||
_ = write(5, it.Country)
|
||||
_ = write(6, it.Address)
|
||||
_ = write(7, formatApplyTime(it.ApplyTime))
|
||||
_ = write(8, it.UserName)
|
||||
_ = write(9, it.UserNum)
|
||||
|
||||
}
|
||||
|
||||
// 可选:设置列宽,使表格更美观
|
||||
_ = f.SetColWidth(sheet, "A", "AZ", 15)
|
||||
|
||||
// 保存文件
|
||||
if err := f.SaveAs(filePath); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// 获取国家列表
|
||||
func GetCountryList(c *gin.Context) {
|
||||
list := getCountryList()
|
||||
service.Success(c, map[string]interface{}{"data": list})
|
||||
}
|
||||
|
||||
func getCountryList() []struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
} {
|
||||
return []struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
}{
|
||||
{Code: "CN", Name: "中国"},
|
||||
{Code: "JP", Name: "日本"},
|
||||
{Code: "US", Name: "美国"},
|
||||
{Code: "HK", Name: "中国香港"},
|
||||
{Code: "MO", Name: "中国澳门"},
|
||||
{Code: "TW", Name: "中国台湾"},
|
||||
{Code: "GB", Name: "英国"},
|
||||
{Code: "KR", Name: "韩国"},
|
||||
{Code: "SG", Name: "新加坡"},
|
||||
{Code: "DE", Name: "德国"},
|
||||
{Code: "FR", Name: "法国"},
|
||||
{Code: "AU", Name: "澳大利亚"},
|
||||
{Code: "CA", Name: "加拿大"},
|
||||
{Code: "IT", Name: "意大利"},
|
||||
{Code: "ES", Name: "西班牙"},
|
||||
{Code: "NL", Name: "荷兰"},
|
||||
{Code: "BE", Name: "比利时"},
|
||||
{Code: "CH", Name: "瑞士"},
|
||||
{Code: "AT", Name: "奥地利"},
|
||||
{Code: "SE", Name: "瑞典"},
|
||||
{Code: "NO", Name: "挪威"},
|
||||
{Code: "DK", Name: "丹麦"},
|
||||
{Code: "FI", Name: "芬兰"},
|
||||
{Code: "IE", Name: "爱尔兰"},
|
||||
{Code: "PT", Name: "葡萄牙"},
|
||||
{Code: "GR", Name: "希腊"},
|
||||
{Code: "PL", Name: "波兰"},
|
||||
{Code: "CZ", Name: "捷克"},
|
||||
{Code: "HU", Name: "匈牙利"},
|
||||
{Code: "RO", Name: "罗马尼亚"},
|
||||
{Code: "RU", Name: "俄罗斯"},
|
||||
{Code: "UA", Name: "乌克兰"},
|
||||
{Code: "TR", Name: "土耳其"},
|
||||
{Code: "IL", Name: "以色列"},
|
||||
{Code: "AE", Name: "阿联酋"},
|
||||
{Code: "SA", Name: "沙特阿拉伯"},
|
||||
{Code: "IN", Name: "印度"},
|
||||
{Code: "MY", Name: "马来西亚"},
|
||||
{Code: "TH", Name: "泰国"},
|
||||
{Code: "VN", Name: "越南"},
|
||||
{Code: "PH", Name: "菲律宾"},
|
||||
{Code: "ID", Name: "印度尼西亚"},
|
||||
{Code: "NZ", Name: "新西兰"},
|
||||
{Code: "ZA", Name: "南非"},
|
||||
{Code: "EG", Name: "埃及"},
|
||||
{Code: "NG", Name: "尼日利亚"},
|
||||
{Code: "KE", Name: "肯尼亚"},
|
||||
{Code: "AR", Name: "阿根廷"},
|
||||
{Code: "BR", Name: "巴西"},
|
||||
{Code: "MX", Name: "墨西哥"},
|
||||
{Code: "CL", Name: "智利"},
|
||||
{Code: "CO", Name: "哥伦比亚"},
|
||||
{Code: "PE", Name: "秘鲁"},
|
||||
{Code: "LU", Name: "卢森堡"},
|
||||
{Code: "SK", Name: "斯洛伐克"},
|
||||
{Code: "BG", Name: "保加利亚"},
|
||||
{Code: "HR", Name: "克罗地亚"},
|
||||
{Code: "SI", Name: "斯洛文尼亚"},
|
||||
{Code: "LT", Name: "立陶宛"},
|
||||
{Code: "LV", Name: "拉脱维亚"},
|
||||
{Code: "EE", Name: "爱沙尼亚"},
|
||||
{Code: "RS", Name: "塞尔维亚"},
|
||||
{Code: "PK", Name: "巴基斯坦"},
|
||||
{Code: "BD", Name: "孟加拉国"},
|
||||
{Code: "LK", Name: "斯里兰卡"},
|
||||
{Code: "QA", Name: "卡塔尔"},
|
||||
{Code: "KW", Name: "科威特"},
|
||||
{Code: "BH", Name: "巴林"},
|
||||
{Code: "OM", Name: "阿曼"},
|
||||
{Code: "JO", Name: "约旦"},
|
||||
{Code: "LB", Name: "黎巴嫩"},
|
||||
{Code: "IR", Name: "伊朗"},
|
||||
{Code: "IQ", Name: "伊拉克"},
|
||||
{Code: "KZ", Name: "哈萨克斯坦"},
|
||||
{Code: "UZ", Name: "乌兹别克斯坦"},
|
||||
{Code: "GE", Name: "格鲁吉亚"},
|
||||
{Code: "AZ", Name: "阿塞拜疆"},
|
||||
{Code: "AM", Name: "亚美尼亚"},
|
||||
{Code: "MN", Name: "蒙古"},
|
||||
{Code: "MM", Name: "缅甸"},
|
||||
{Code: "KH", Name: "柬埔寨"},
|
||||
{Code: "LA", Name: "老挝"},
|
||||
{Code: "BN", Name: "文莱"},
|
||||
{Code: "NP", Name: "尼泊尔"},
|
||||
{Code: "AF", Name: "阿富汗"},
|
||||
{Code: "ET", Name: "埃塞俄比亚"},
|
||||
{Code: "GH", Name: "加纳"},
|
||||
{Code: "TZ", Name: "坦桑尼亚"},
|
||||
{Code: "UG", Name: "乌干达"},
|
||||
{Code: "MA", Name: "摩洛哥"},
|
||||
{Code: "TN", Name: "突尼斯"},
|
||||
{Code: "AL", Name: "阿尔巴尼亚"},
|
||||
{Code: "MK", Name: "北马其顿"},
|
||||
{Code: "BA", Name: "波黑"},
|
||||
{Code: "ME", Name: "黑山"},
|
||||
{Code: "CY", Name: "塞浦路斯"},
|
||||
{Code: "MT", Name: "马耳他"},
|
||||
{Code: "IS", Name: "冰岛"},
|
||||
{Code: "EC", Name: "厄瓜多尔"},
|
||||
{Code: "VE", Name: "委内瑞拉"},
|
||||
{Code: "CR", Name: "哥斯达黎加"},
|
||||
{Code: "PA", Name: "巴拿马"},
|
||||
{Code: "GT", Name: "危地马拉"},
|
||||
{Code: "CU", Name: "古巴"},
|
||||
{Code: "DO", Name: "多米尼加"},
|
||||
{Code: "JM", Name: "牙买加"},
|
||||
{Code: "PR", Name: "波多黎各"},
|
||||
{Code: "UY", Name: "乌拉圭"},
|
||||
{Code: "BO", Name: "玻利维亚"},
|
||||
{Code: "PY", Name: "巴拉圭"},
|
||||
{Code: "SV", Name: "萨尔瓦多"},
|
||||
{Code: "HN", Name: "洪都拉斯"},
|
||||
{Code: "NI", Name: "尼加拉瓜"},
|
||||
{Code: "TT", Name: "特立尼达和多巴哥"},
|
||||
{Code: "BS", Name: "巴哈马"},
|
||||
{Code: "BB", Name: "巴巴多斯"},
|
||||
{Code: "GY", Name: "圭亚那"},
|
||||
{Code: "SR", Name: "苏里南"},
|
||||
{Code: "BW", Name: "博茨瓦纳"},
|
||||
{Code: "ZW", Name: "津巴布韦"},
|
||||
{Code: "MZ", Name: "莫桑比克"},
|
||||
{Code: "AO", Name: "安哥拉"},
|
||||
{Code: "CM", Name: "喀麦隆"},
|
||||
{Code: "CI", Name: "科特迪瓦"},
|
||||
{Code: "SN", Name: "塞内加尔"},
|
||||
{Code: "LY", Name: "利比亚"},
|
||||
{Code: "SD", Name: "苏丹"},
|
||||
{Code: "DZ", Name: "阿尔及利亚"},
|
||||
{Code: "BY", Name: "白俄罗斯"},
|
||||
{Code: "MD", Name: "摩尔多瓦"},
|
||||
}
|
||||
}
|
||||
|
||||
// 时间格式化函数
|
||||
func formatApplyTime(s string) string {
|
||||
if s == "" {
|
||||
return s
|
||||
}
|
||||
beijing, err := time.LoadLocation("Asia/Shanghai")
|
||||
if err != nil {
|
||||
return s
|
||||
}
|
||||
layouts := []string{
|
||||
time.RFC3339, // 2026-02-03T23:01:29+08:00
|
||||
"2006-01-02 15:04:05",
|
||||
"2006-01-02T15:04:05Z07:00",
|
||||
}
|
||||
for _, layout := range layouts {
|
||||
if t, err := time.Parse(layout, s); err == nil {
|
||||
return t.In(beijing).Format("2006-01-02 15:04:05")
|
||||
}
|
||||
}
|
||||
return s
|
||||
}
|
||||
@ -11,6 +11,7 @@ import (
|
||||
"fonchain-fiee/pkg/service/bundle/common"
|
||||
"fonchain-fiee/pkg/utils"
|
||||
"io"
|
||||
"log"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
@ -166,7 +167,7 @@ func WorkConfirm(c *gin.Context) { // 确认作品并扣除余量
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
log.Print("req.ConfirmRemark:", req.ConfirmRemark)
|
||||
if req.ConfirmStatus == 2 { // 驳回完直接结束
|
||||
res, err := service.CastProvider.UpdateStatus(c, &cast.UpdateStatusReq{
|
||||
WorkAction: cast.WorkActionENUM_CONFIRM,
|
||||
@ -189,6 +190,22 @@ func WorkConfirm(c *gin.Context) { // 确认作品并扣除余量
|
||||
service.Error(c, errors.New(common.GetUserBalanceFailed))
|
||||
return
|
||||
}
|
||||
//判断套餐是否过期
|
||||
if balanceInfoRes.BundleStatus == common.BundleExpired {
|
||||
_, err = service.CastProvider.UpdateStatus(c, &cast.UpdateStatusReq{
|
||||
WorkAction: cast.WorkActionENUM_CONFIRM,
|
||||
WorkUuid: req.WorkUuid,
|
||||
ConfirmRemark: req.ConfirmRemark,
|
||||
ConfirmStatus: 3,
|
||||
ConfirmFailType: cast.ConfirmFailENUM_ConfirmFailENUM_EXPIRED,
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(c, errors.New(common.UpdateWorkStatusFailed))
|
||||
return
|
||||
}
|
||||
service.Error(c, errors.New("套餐已过期"))
|
||||
return
|
||||
}
|
||||
|
||||
wordInfoRes, err := service.CastProvider.WorkDetail(c, &cast.WorkDetailReq{
|
||||
WorkUuid: req.WorkUuid,
|
||||
@ -209,6 +226,22 @@ func WorkConfirm(c *gin.Context) { // 确认作品并扣除余量
|
||||
return
|
||||
}
|
||||
|
||||
if balanceInfoRes.PurchaseType == 1 {
|
||||
//判断作品对应订单是否相同
|
||||
if wordInfoRes.BundleOrderUuid != balanceInfoRes.OrderUUID {
|
||||
//订单号不相同
|
||||
//新购买的,直接扣除失败
|
||||
_, err = service.CastProvider.UpdateStatus(c, &cast.UpdateStatusReq{
|
||||
WorkAction: cast.WorkActionENUM_CONFIRM,
|
||||
WorkUuid: req.WorkUuid,
|
||||
ConfirmRemark: req.ConfirmRemark,
|
||||
ConfirmStatus: 3,
|
||||
})
|
||||
service.Error(c, errors.New("套餐为新套餐,确认失败"))
|
||||
return
|
||||
}
|
||||
//相同着正常走流程
|
||||
}
|
||||
if wordInfoRes.WorkStatus != 4 {
|
||||
service.Error(c, errors.New("作品不是待确认状态"))
|
||||
return
|
||||
@ -221,12 +254,17 @@ func WorkConfirm(c *gin.Context) { // 确认作品并扣除余量
|
||||
case 1:
|
||||
{
|
||||
if balanceInfoRes.ImageExtendConsumptionNumber >= balanceInfoRes.ImageExtendNumber { // 图文余量不足
|
||||
_, err = service.CastProvider.UpdateStatus(c, &cast.UpdateStatusReq{
|
||||
WorkAction: cast.WorkActionENUM_CONFIRM,
|
||||
WorkUuid: req.WorkUuid,
|
||||
ConfirmRemark: req.ConfirmRemark,
|
||||
ConfirmStatus: 3,
|
||||
_, err = service.CastProvider.UpdateStatus(context.Background(), &cast.UpdateStatusReq{
|
||||
WorkAction: cast.WorkActionENUM_CONFIRM,
|
||||
WorkUuid: req.WorkUuid,
|
||||
ConfirmRemark: req.ConfirmRemark,
|
||||
ConfirmStatus: 3,
|
||||
ConfirmFailType: cast.ConfirmFailENUM_ConfirmFailENUM_NOTENOUGH,
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(c, errors.New(common.UpdateWorkStatusFailed))
|
||||
return
|
||||
}
|
||||
service.Error(c, errors.New("图文余量不足"))
|
||||
return
|
||||
}
|
||||
@ -235,12 +273,17 @@ func WorkConfirm(c *gin.Context) { // 确认作品并扣除余量
|
||||
case 2:
|
||||
{
|
||||
if balanceInfoRes.VideoExtendConsumptionNumber >= balanceInfoRes.VideoExtendNumber { // 视频余量不足
|
||||
_, err = service.CastProvider.UpdateStatus(c, &cast.UpdateStatusReq{
|
||||
WorkAction: cast.WorkActionENUM_CONFIRM,
|
||||
WorkUuid: req.WorkUuid,
|
||||
ConfirmRemark: req.ConfirmRemark,
|
||||
ConfirmStatus: 3,
|
||||
_, err = service.CastProvider.UpdateStatus(context.Background(), &cast.UpdateStatusReq{
|
||||
WorkAction: cast.WorkActionENUM_CONFIRM,
|
||||
WorkUuid: req.WorkUuid,
|
||||
ConfirmRemark: req.ConfirmRemark,
|
||||
ConfirmStatus: 3,
|
||||
ConfirmFailType: cast.ConfirmFailENUM_ConfirmFailENUM_NOTENOUGH,
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(c, errors.New(common.UpdateWorkStatusFailed))
|
||||
return
|
||||
}
|
||||
service.Error(c, errors.New("视频余量不足"))
|
||||
return
|
||||
}
|
||||
@ -287,7 +330,7 @@ func WorkAnalysisConfirm(c *gin.Context) { // 确认数据分析并扣除余量
|
||||
fmt.Println("res:", res)
|
||||
fmt.Println("err:", err)
|
||||
if err != nil {
|
||||
service.Error(c, errors.New(common.UpdateWorkStatusFailed))
|
||||
service.Error(c, errors.New("驳回失败"))
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
@ -302,6 +345,22 @@ func WorkAnalysisConfirm(c *gin.Context) { // 确认数据分析并扣除余量
|
||||
return
|
||||
}
|
||||
|
||||
if balanceInfoRes.BundleStatus == common.BundleExpired {
|
||||
// 套餐过期的话直接失败
|
||||
_, err := service.CastProvider.UpdateWorkAnalysisStatus(c, &cast.UpdateWorkAnalysisStatusReq{
|
||||
WorkAction: cast.WorkActionENUM_CONFIRM,
|
||||
Uuid: req.Uuid,
|
||||
ConfirmRemark: req.ConfirmRemark,
|
||||
ConfirmStatus: 3,
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(c, errors.New(common.UpdateWorkStatusFailed))
|
||||
return
|
||||
}
|
||||
service.Error(c, errors.New("套餐已过期"))
|
||||
return
|
||||
}
|
||||
|
||||
analysisInfoRes, err := service.CastProvider.GetWorkAnalysis(c, &cast.GetWorkAnalysisDetailReq{
|
||||
Uuid: req.Uuid,
|
||||
})
|
||||
@ -313,6 +372,32 @@ func WorkAnalysisConfirm(c *gin.Context) { // 确认数据分析并扣除余量
|
||||
service.Error(c, errors.New("数据分析不是待确认状态"))
|
||||
return
|
||||
}
|
||||
artistID, _ := strconv.ParseUint(analysisInfoRes.ArtistID, 10, 64)
|
||||
if artistID != uint64(userInfo.ID) {
|
||||
service.Error(c, errors.New("非本人数据分析,无法操作"))
|
||||
return
|
||||
}
|
||||
|
||||
if balanceInfoRes.PurchaseType == 1 {
|
||||
// 判断数据分析对应订单是否相同
|
||||
if analysisInfoRes.BundleOrderUuid != balanceInfoRes.OrderUUID {
|
||||
// 订单号不同
|
||||
// 说明是新购买的,直接扣除失败
|
||||
_, err := service.CastProvider.UpdateWorkAnalysisStatus(c, &cast.UpdateWorkAnalysisStatusReq{
|
||||
WorkAction: cast.WorkActionENUM_CONFIRM,
|
||||
Uuid: req.Uuid,
|
||||
ConfirmRemark: req.ConfirmRemark,
|
||||
ConfirmStatus: 3,
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(c, errors.New(common.UpdateWorkStatusFailed))
|
||||
return
|
||||
}
|
||||
service.Error(c, errors.New("套餐为新套餐,确认失败"))
|
||||
return
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var addBalanceReq bundle.AddBundleBalanceReq
|
||||
addBalanceReq.UserId = int32(userInfo.ID)
|
||||
@ -338,7 +423,7 @@ func WorkAnalysisConfirm(c *gin.Context) { // 确认数据分析并扣除余量
|
||||
fmt.Println("res:", res)
|
||||
fmt.Println("err:", err)
|
||||
if err != nil {
|
||||
service.Error(c, errors.New(common.UpdateWorkStatusFailed))
|
||||
service.Error(c, errors.New("确认失败"))
|
||||
return
|
||||
}
|
||||
// 如果是艺人手动确认,确认操作后,自动标记为待阅读状态
|
||||
@ -457,7 +542,8 @@ func writeToExcel(filename string, items []*bundle.BundleBalanceExportItem) erro
|
||||
"当前可用套餐视频数", "当前可用增值视频数", "当前已用套餐视频数", "当前已用增值视频数", "当前作废套餐视频数", "当前作废增值视频数", "当月新增可用套餐视频数", "当月新增可用增值视频数", "当月使用套餐视频数", "当月使用增值视频数", "当月作废套餐视频数", "当月作废增值视频数",
|
||||
"当前可用套餐图文数", "当前可用增值图文数", "当前已用套餐图文数", "当前已用增值图文数", "当前作废套餐图文数", "当前作废增值图文数", "当月新增可用套餐图文数", "当月新增可用增值图文数", "当月使用套餐图文数", "当月使用增值图文数", "当月作废套餐图文数", "当月作废增值图文数",
|
||||
"当前可用套餐数据分析数", "当前可用增值数据分析数", "当前已用套餐数据分析数", "当前已用增值数据分析数", "当前作废套餐数据分析数", "当前作废增值数据分析数", "当月新增可用套餐数据分析数", "当月新增可用增值数据分析数", "当月使用套餐数据分析数", "当月使用增值数据分析数", "当月作废套餐数据分析数", "当月作废增值数据分析数",
|
||||
"当月手动扩展账号新增数", "当月手动扩展视频新增数", "当月手动扩展图文新增数", "当月手动扩展数据分析新增数", "当月新增手动扩展时长(天)", "当月手动扩展账号使用数", "当月手动扩展视频使用数", "当月手动扩展图文使用数", "当月手动扩展数据分析使用数",
|
||||
"当前可用套餐竞品数", "当前可用增值竞品数", "当前已用套餐竞品数", "当前已用增值竞品数", "当前作废套餐竞品数", "当前作废增值竞品数", "当月新增可用套餐竞品数", "当月新增可用增值竞品数", "当月使用套餐竞品数", "当月使用增值竞品数", "当月作废套餐竞品数", "当月作废增值竞品数",
|
||||
"当月手动扩展账号新增数", "当月手动扩展视频新增数", "当月手动扩展图文新增数", "当月手动扩展数据分析新增数", "当月新增手动扩展时长(天)", "当月手动扩展账号使用数", "当月手动扩展视频使用数", "当月手动扩展图文使用数", "当月手动扩展数据分析使用数", "当月手动扩展竞品数", "当月手动扩展竞品使用数",
|
||||
}
|
||||
|
||||
// 写表头
|
||||
@ -555,21 +641,37 @@ func writeToExcel(filename string, items []*bundle.BundleBalanceExportItem) erro
|
||||
_ = write(55, int(it.MonthlyInvalidBundleDataAnalysisNumber))
|
||||
_ = write(56, int(it.MonthlyInvalidIncreaseDataAnalysisNumber))
|
||||
|
||||
// 竞品数
|
||||
_ = write(57, int(it.MonthlyBundleCompetitiveNumber))
|
||||
_ = write(58, int(it.MonthlyIncreaseCompetitiveNumber))
|
||||
_ = write(59, int(it.BundleCompetitiveConsumptionNumber))
|
||||
_ = write(60, int(it.IncreaseCompetitiveConsumptionNumber))
|
||||
_ = write(61, int(it.InvalidBundleCompetitiveNumber))
|
||||
_ = write(62, int(it.InvalidIncreaseCompetitiveNumber))
|
||||
_ = write(63, int(it.MonthlyNewBundleCompetitiveNumber))
|
||||
_ = write(64, int(it.MonthlyNewIncreaseCompetitiveNumber))
|
||||
_ = write(65, int(it.MonthlyBundleCompetitiveConsumptionNumber))
|
||||
_ = write(66, int(it.MonthlyIncreaseCompetitiveConsumptionNumber))
|
||||
_ = write(67, int(it.MonthlyInvalidBundleCompetitiveNumber))
|
||||
_ = write(68, int(it.MonthlyInvalidIncreaseCompetitiveNumber))
|
||||
|
||||
// 手动扩展类
|
||||
_ = write(57, int(it.MonthlyNewManualAccountNumber))
|
||||
_ = write(58, int(it.MonthlyNewManualVideoNumber))
|
||||
_ = write(59, int(it.MonthlyNewManualImageNumber))
|
||||
_ = write(60, int(it.MonthlyNewManualDataAnalysisNumber))
|
||||
_ = write(61, int(it.MonthlyNewDurationNumber))
|
||||
_ = write(62, int(it.MonthlyManualAccountConsumptionNumber))
|
||||
_ = write(63, int(it.MonthlyManualVideoConsumptionNumber))
|
||||
_ = write(64, int(it.MonthlyManualImageConsumptionNumber))
|
||||
_ = write(65, int(it.MonthlyManualDataAnalysisConsumptionNumber))
|
||||
_ = write(69, int(it.MonthlyNewManualAccountNumber))
|
||||
_ = write(70, int(it.MonthlyNewManualVideoNumber))
|
||||
_ = write(71, int(it.MonthlyNewManualImageNumber))
|
||||
_ = write(72, int(it.MonthlyNewManualDataAnalysisNumber))
|
||||
_ = write(73, int(it.MonthlyNewDurationNumber))
|
||||
_ = write(74, int(it.MonthlyManualAccountConsumptionNumber))
|
||||
_ = write(75, int(it.MonthlyManualVideoConsumptionNumber))
|
||||
_ = write(76, int(it.MonthlyManualImageConsumptionNumber))
|
||||
_ = write(77, int(it.MonthlyManualDataAnalysisConsumptionNumber))
|
||||
_ = write(78, int(it.MonthlyNewManualCompetitiveNumber))
|
||||
_ = write(79, int(it.MonthlyManualCompetitiveConsumptionNumber))
|
||||
|
||||
}
|
||||
|
||||
// 可选:设置列宽,使表格更美观
|
||||
_ = f.SetColWidth(sheet, "A", "AZ", 15)
|
||||
_ = f.SetColWidth(sheet, "A", "BZ", 15)
|
||||
|
||||
// 保存文件
|
||||
if err := f.SaveAs(filename); err != nil {
|
||||
@ -609,8 +711,152 @@ func GetAccountBundleBalance(c *gin.Context) {
|
||||
ImageConsumptionNumber: item.BundleImageConsumptionNumber + item.IncreaseImageConsumptionNumber + item.ManualImageNumber,
|
||||
DataAnalysisNumber: item.BundleDataAnalysisNumber + item.IncreaseDataAnalysisNumber + item.ManualDataAnalysisNumber,
|
||||
DataAnalysisConsumptionNumber: item.BundleDataAnalysisConsumptionNumber + item.IncreaseDataAnalysisConsumptionNumber + item.ManualDataAnalysisNumber,
|
||||
CompetitiveNumber: item.BundleCompetitiveNumber + item.IncreaseCompetitiveNumber + item.ManualCompetitiveNumber,
|
||||
CompetitiveConsumptionNumber: item.BundleCompetitiveConsumptionNumber + item.IncreaseCompetitiveConsumptionNumber + item.ManualCompetitiveConsumptionNumber,
|
||||
Bought: item.Bought,
|
||||
}
|
||||
})
|
||||
service.Success(c, result)
|
||||
}
|
||||
|
||||
func writeToExcelCast(filename string, items []*bundle.WorkCastInfo) error {
|
||||
f := excelize.NewFile()
|
||||
sheet := "Sheet1"
|
||||
|
||||
// 手动表头(顺序与写入字段顺序必须一致)
|
||||
headers := []string{
|
||||
"用户名称", "用户编号", "套餐名称", "下单时间",
|
||||
"作品标题", "消费类型", "作品类型", "验收类型",
|
||||
"作品上传时间", "艺人待确认时间", "艺人验收确认时间",
|
||||
}
|
||||
|
||||
// 写表头
|
||||
for i, h := range headers {
|
||||
col, _ := excelize.ColumnNumberToName(i + 1)
|
||||
cell := col + "1"
|
||||
if err := f.SetCellValue(sheet, cell, h); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// 从第2行开始写数据
|
||||
for r, it := range items {
|
||||
row := r + 2
|
||||
// 逐列写入(注意顺序必须和 headers 一致)
|
||||
write := func(colIdx int, v interface{}) error {
|
||||
col, _ := excelize.ColumnNumberToName(colIdx)
|
||||
cell := fmt.Sprintf("%s%d", col, row)
|
||||
return f.SetCellValue(sheet, cell, v)
|
||||
}
|
||||
costType := ""
|
||||
if it.CostType == 1 {
|
||||
costType = "套餐"
|
||||
} else if it.CostType == 2 {
|
||||
costType = "增值"
|
||||
}
|
||||
workCategory := ""
|
||||
if it.WorkCategory == 1 {
|
||||
workCategory = "图文"
|
||||
} else if it.WorkCategory == 2 {
|
||||
workCategory = "视频"
|
||||
}
|
||||
confirmType := ""
|
||||
if it.ConfirmType == 2 {
|
||||
confirmType = "系统确认"
|
||||
} else if it.ConfirmType == 1 {
|
||||
confirmType = "艺人确认"
|
||||
} else {
|
||||
confirmType = "未确认"
|
||||
}
|
||||
_ = write(1, it.CustomerName)
|
||||
_ = write(2, it.CustomerNum)
|
||||
_ = write(3, it.BundleName)
|
||||
_ = write(4, it.SignedTime)
|
||||
_ = write(5, it.Title)
|
||||
_ = write(6, costType)
|
||||
_ = write(7, workCategory)
|
||||
_ = write(8, confirmType)
|
||||
_ = write(9, it.SubmitTime)
|
||||
_ = write(10, it.WaitingTime)
|
||||
_ = write(11, it.ConfirmTime)
|
||||
}
|
||||
|
||||
// 可选:设置列宽,使表格更美观
|
||||
_ = f.SetColWidth(sheet, "A", "AZ", 15)
|
||||
|
||||
// 保存文件
|
||||
if err := f.SaveAs(filename); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func writeToExcelPriceInfo(filename string, items []*bundle.BundleBalanceExportItem) error {
|
||||
f := excelize.NewFile()
|
||||
sheet := "Sheet1"
|
||||
|
||||
// 手动表头(顺序与写入字段顺序必须一致)
|
||||
headers := []string{
|
||||
"所属月份", "用户编号", "姓名", "手机号", "手续费",
|
||||
"套餐视频总数", "增值服务视频总数", "套餐视频单价", "增值视频单价",
|
||||
"当月使用套餐视频数", "当月使用增值视频数",
|
||||
"当月消耗套餐金额($)", "当月消耗增值金额($)",
|
||||
}
|
||||
|
||||
// 写表头
|
||||
for i, h := range headers {
|
||||
col, _ := excelize.ColumnNumberToName(i + 1)
|
||||
cell := col + "1"
|
||||
if err := f.SetCellValue(sheet, cell, h); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// 从第2行开始写数据
|
||||
for r, it := range items {
|
||||
row := r + 2
|
||||
// 逐列写入(注意顺序必须和 headers 一致)
|
||||
write := func(colIdx int, v interface{}) error {
|
||||
col, _ := excelize.ColumnNumberToName(colIdx)
|
||||
cell := fmt.Sprintf("%s%d", col, row)
|
||||
return f.SetCellValue(sheet, cell, v)
|
||||
}
|
||||
_ = write(1, it.Month)
|
||||
_ = write(2, it.CustomerNum)
|
||||
_ = write(3, it.UserName)
|
||||
_ = write(4, it.UserPhoneNumber)
|
||||
_ = write(5, it.Fee)
|
||||
|
||||
// 套餐视频数量及单价
|
||||
_ = write(6, int(it.BundleVideoNumber))
|
||||
_ = write(7, int(it.IncreaseVideoNumber))
|
||||
_ = write(8, fmt.Sprintf("%.2f", it.BundleVideoUnitPrice))
|
||||
_ = write(9, fmt.Sprintf("%.2f", it.IncreaseVideoUnitPrice))
|
||||
|
||||
// 视频类
|
||||
_ = write(10, int(it.MonthlyBundleVideoConsumptionNumber))
|
||||
_ = write(11, int(it.MonthlyIncreaseVideoConsumptionNumber))
|
||||
|
||||
// 当月视频消耗金额($)
|
||||
monthlyBundleVideoConsumptionPrice, err := strconv.ParseFloat(it.MonthlyBundleVideoConsumptionPrice, 64)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
monthlyIncreaseVideoConsumptionPrice, err := strconv.ParseFloat(it.MonthlyIncreaseVideoConsumptionPrice, 64)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_ = write(12, fmt.Sprintf("%.2f", monthlyBundleVideoConsumptionPrice))
|
||||
_ = write(13, fmt.Sprintf("%.2f", monthlyIncreaseVideoConsumptionPrice))
|
||||
|
||||
}
|
||||
|
||||
// 可选:设置列宽,使表格更美观
|
||||
_ = f.SetColWidth(sheet, "A", "AZ", 15)
|
||||
|
||||
// 保存文件
|
||||
if err := f.SaveAs(filename); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -13,6 +13,7 @@ import (
|
||||
"fonchain-fiee/pkg/service/bundle/common"
|
||||
serviceCast "fonchain-fiee/pkg/service/cast"
|
||||
"fonchain-fiee/pkg/utils"
|
||||
"log"
|
||||
"reflect"
|
||||
"strings"
|
||||
"time"
|
||||
@ -247,36 +248,65 @@ func MetricsArtistAccountExport(ctx *gin.Context) {
|
||||
|
||||
func MetricsVideoSubmitExport(ctx *gin.Context) {
|
||||
var req bundle.MetricsVideoSubmitExportReq
|
||||
var (
|
||||
resp *cast.WorkListResp
|
||||
)
|
||||
var err error
|
||||
if err = ctx.ShouldBind(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
newCtx := serviceCast.NewCtxWithUserInfo(ctx)
|
||||
|
||||
const batchSize = 5000
|
||||
var allData []*cast.WorkListResp_Info
|
||||
page := int32(1)
|
||||
if len(req.Month) > 0 {
|
||||
resp, err = service.CastProvider.WorkList(newCtx, &cast.WorkListReq{
|
||||
SubmitTimeMonths: req.Month,
|
||||
Page: 1,
|
||||
PageSize: 99999,
|
||||
})
|
||||
fmt.Printf("resp.Count: %v\n", resp.Count)
|
||||
for {
|
||||
resp, err := service.CastProvider.WorkList(newCtx, &cast.WorkListReq{
|
||||
SubmitTimeMonths: req.Month, // 有 Month 时带上
|
||||
Page: page,
|
||||
PageSize: batchSize,
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(ctx, errors.New(common.MetricsVideoSubmitExportFailed))
|
||||
return
|
||||
}
|
||||
if resp == nil || len(resp.Data) == 0 {
|
||||
break
|
||||
}
|
||||
allData = append(allData, resp.Data...)
|
||||
if len(resp.Data) < batchSize {
|
||||
break
|
||||
}
|
||||
page++
|
||||
}
|
||||
} else {
|
||||
resp, err = service.CastProvider.WorkList(newCtx, &cast.WorkListReq{
|
||||
Page: 1,
|
||||
PageSize: 99999,
|
||||
})
|
||||
fmt.Printf("resp.Count: %v\n", resp.Count)
|
||||
for {
|
||||
resp, err := service.CastProvider.WorkList(newCtx, &cast.WorkListReq{
|
||||
Page: page,
|
||||
PageSize: batchSize,
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(ctx, errors.New(common.MetricsVideoSubmitExportFailed))
|
||||
return
|
||||
}
|
||||
if resp == nil || len(resp.Data) == 0 {
|
||||
break
|
||||
}
|
||||
allData = append(allData, resp.Data...)
|
||||
if len(resp.Data) < batchSize {
|
||||
break
|
||||
}
|
||||
page++
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
log.Printf("获取作品列表err: %v\n", err)
|
||||
service.Error(ctx, errors.New(common.MetricsVideoSubmitExportFailed))
|
||||
return
|
||||
}
|
||||
var loigcCastWork = new(logicCast.Work)
|
||||
excelFile, err := loigcCastWork.ExportExcelWorkList(resp.Data)
|
||||
excelFile, err := loigcCastWork.ExportExcelWorkList(allData)
|
||||
if err != nil {
|
||||
log.Printf("导出作品列表err: %v\n", err)
|
||||
service.Error(ctx, errors.New(common.MetricsVideoSubmitExportFailed))
|
||||
return
|
||||
}
|
||||
@ -394,8 +424,8 @@ func MetricsBalanceDetailExport(ctx *gin.Context) {
|
||||
MonthlyNewIncreaseVideoNumber int32
|
||||
BundleVideoConsumptionNumber int32
|
||||
IncreaseVideoConsumptionNumber int32
|
||||
BundleVideoUsedPrice float32
|
||||
IncreaseVideoUsedPrice float32
|
||||
BundleVideoUsedPrice decimal.Decimal
|
||||
IncreaseVideoUsedPrice decimal.Decimal
|
||||
}
|
||||
items := lo.Map(resp.Data, func(item *bundle.BundleBalanceExportItem, _ int) itemStruct {
|
||||
payTime, _ := time.Parse(time.DateTime, item.PayTime)
|
||||
@ -418,8 +448,8 @@ func MetricsBalanceDetailExport(ctx *gin.Context) {
|
||||
MonthlyNewIncreaseVideoNumber: item.MonthlyIncreaseVideoNumber,
|
||||
BundleVideoConsumptionNumber: item.BundleVideoConsumptionNumber,
|
||||
IncreaseVideoConsumptionNumber: item.IncreaseVideoConsumptionNumber,
|
||||
BundleVideoUsedPrice: float32(item.BundleVideoConsumptionNumber) * item.BundleVideoUnitPrice,
|
||||
IncreaseVideoUsedPrice: float32(item.IncreaseVideoConsumptionNumber) * item.IncreaseVideoUnitPrice,
|
||||
BundleVideoUsedPrice: decimal.NewFromInt32(item.BundleVideoConsumptionNumber).Mul(decimal.NewFromFloat(float64(item.BundleVideoUnitPrice))),
|
||||
IncreaseVideoUsedPrice: decimal.NewFromInt32(item.IncreaseVideoConsumptionNumber).Mul(decimal.NewFromFloat(float64(item.IncreaseVideoUnitPrice))),
|
||||
}
|
||||
})
|
||||
|
||||
@ -431,9 +461,9 @@ func MetricsBalanceDetailExport(ctx *gin.Context) {
|
||||
sumIncrease := decimal.Zero
|
||||
sumTotal := decimal.Zero
|
||||
|
||||
for _, i := range items {
|
||||
sumBundle = sumBundle.Add(decimal.NewFromFloat(float64(i.BundleVideoUsedPrice)))
|
||||
sumIncrease = sumIncrease.Add(decimal.NewFromFloat(float64(i.IncreaseVideoUsedPrice)))
|
||||
for _, i := range data {
|
||||
sumBundle = sumBundle.Add(i.BundleVideoUsedPrice.Round(2))
|
||||
sumIncrease = sumIncrease.Add(i.IncreaseVideoUsedPrice.Round(2))
|
||||
}
|
||||
|
||||
sumTotal = sumBundle.Add(sumIncrease)
|
||||
@ -644,6 +674,12 @@ func exportStructToExcel[T any](data []T, headers []string, filename string, exp
|
||||
|
||||
var cellValue any
|
||||
switch field.Kind() {
|
||||
case reflect.Struct:
|
||||
if field.Type() == reflect.TypeOf(decimal.Decimal{}) {
|
||||
cellValue = "$" + field.Interface().(decimal.Decimal).StringFixed(2)
|
||||
} else {
|
||||
cellValue = field.Interface()
|
||||
}
|
||||
case reflect.Float32, reflect.Float64:
|
||||
cellValue = fmt.Sprintf("$%.2f", field.Float()) // 保留两位小数
|
||||
default:
|
||||
@ -672,3 +708,61 @@ func tsToStr(ts int64, layout string) string {
|
||||
t := time.Unix(ts, 0).In(time.Local)
|
||||
return t.Format(layout)
|
||||
}
|
||||
|
||||
func ExportWorkCastInfo(ctx *gin.Context) {
|
||||
var req bundle.ExportWorkCastInfoReq
|
||||
req.StartTime = "2025-01-01 00:00:00"
|
||||
req.EndTime = "2025-12-31 23:59:59"
|
||||
resp, err := service.BundleProvider.ExportWorkCastInfo(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
|
||||
exportFileName := "作品上传数据_2025-12-31_" + time.Now().Format("20060102150405") + ".xlsx"
|
||||
|
||||
filePath := fmt.Sprintf("./runtime/%d/%s", 9999, exportFileName)
|
||||
utils.CheckDirPath("./runtime/"+fmt.Sprint(9999), true)
|
||||
if err := writeToExcelCast(filePath, resp.Data); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
var scheme string
|
||||
if ctx.GetHeader("X-Forwarded-Proto") == "https" {
|
||||
scheme = "https"
|
||||
} else {
|
||||
scheme = "http"
|
||||
}
|
||||
var exportUrl string = fmt.Sprintf("%s://%s/api/fiee/static/%s", scheme, ctx.Request.Host, strings.Replace(filePath, "./runtime/", "", 1))
|
||||
service.Success(ctx, gin.H{
|
||||
"url": exportUrl,
|
||||
})
|
||||
}
|
||||
|
||||
func ExportBundlePriceInfo(ctx *gin.Context) {
|
||||
var req bundle.BundleBalanceExportReq
|
||||
exportFileName := "业务收入大表2025.1.1-2025.12.31_" + time.Now().Format("20060102150405") + ".xlsx"
|
||||
filePath := fmt.Sprintf("./runtime/%d/%s", 9999, exportFileName)
|
||||
utils.CheckDirPath("./runtime/"+fmt.Sprint(9999), true)
|
||||
req.Month = []string{"2025-03", "2025-04", "2025-05", "2025-06", "2025-07", "2025-08", "2025-09", "2025-10", "2025-11", "2025-12"}
|
||||
res, err := service.BundleProvider.BundleBalanceExport(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, errors.New(common.BalanceMetricsExportFailed))
|
||||
return
|
||||
}
|
||||
if err := writeToExcelPriceInfo(filePath, res.Data); err != nil {
|
||||
service.Error(ctx, errors.New(common.BalanceMetricsExportFailed))
|
||||
return
|
||||
}
|
||||
var scheme string
|
||||
if ctx.GetHeader("X-Forwarded-Proto") == "https" {
|
||||
scheme = "https"
|
||||
} else {
|
||||
scheme = "http"
|
||||
}
|
||||
|
||||
var exportUrl string = fmt.Sprintf("%s://%s/api/fiee/static/%s", scheme, ctx.Request.Host, strings.Replace(filePath, "./runtime/", "", 1))
|
||||
service.Success(ctx, gin.H{
|
||||
"url": exportUrl,
|
||||
})
|
||||
}
|
||||
|
||||
@ -7,6 +7,7 @@ import (
|
||||
"fonchain-fiee/api/accountFiee"
|
||||
"fonchain-fiee/api/bundle"
|
||||
"fonchain-fiee/api/order"
|
||||
"fonchain-fiee/pkg/cache"
|
||||
"fonchain-fiee/pkg/model/login"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/service/bundle/common"
|
||||
@ -213,6 +214,14 @@ func CreateBundleOrderSignature(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
// Redis 防重复提交:同一用户5秒内只能提交一次订单
|
||||
lockKey := fmt.Sprintf("create_bundle_order_%d", userInfo.ID)
|
||||
reply := cache.RedisClient.SetNX(lockKey, 1, 5*time.Second)
|
||||
if !reply.Val() {
|
||||
service.Error(c, errors.New("请勿重复提交订单,请稍后再试"))
|
||||
return
|
||||
}
|
||||
|
||||
// 校验套餐是否已购买
|
||||
if err := logic.CheckUserOrder(userInfo.ID); err != nil {
|
||||
service.Error(c, err)
|
||||
@ -239,9 +248,9 @@ func CreateBundleOrderSignature(c *gin.Context) {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
startDate := time.Now().Format("2006-01-02")
|
||||
// 签合同(金额 + 有效期)
|
||||
signContract, err := logic.SignContractV2(req.CustomerNum, bundleDetail.Contract, bundleDetail.Price+addTotalPrice, expirationDay, userInfo.Name, userInfo.IdNumber, userInfo.PlaceOfResidence)
|
||||
signContract, err := logic.SignContractV2(req.CustomerNum, bundleDetail.Contract, bundleDetail.Price+addTotalPrice, expirationDay, userInfo.Name, userInfo.IdNumber, userInfo.PlaceOfResidence, startDate)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
@ -250,8 +259,10 @@ func CreateBundleOrderSignature(c *gin.Context) {
|
||||
req.InviterId = userInfo.InviterID
|
||||
}
|
||||
// 组装订单信息
|
||||
req = logic.BuildOrderRequest(req, userInfo, bundleDetail, addRecords, addTotalPrice, lastContractNo, signContract)
|
||||
|
||||
if err := logic.BuildOrderRequest(&req, userInfo, bundleDetail, addRecords, addTotalPrice, lastContractNo, signContract); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
// 校验发布平台
|
||||
if len(req.PlatformIds) == 0 {
|
||||
req.PlatformIds = []uint32{1, 4, 5}
|
||||
@ -312,6 +323,11 @@ func VerificationSignature(c *gin.Context) {
|
||||
service.Success(c, res)
|
||||
return
|
||||
}
|
||||
payTime, err := time.Parse("2006-01-02 15:04:05", order.PayTime)
|
||||
if err != nil {
|
||||
service.Success(c, res)
|
||||
return
|
||||
}
|
||||
if expirationTime.Before(time.Now()) {
|
||||
service.Success(c, res)
|
||||
return
|
||||
@ -320,7 +336,8 @@ func VerificationSignature(c *gin.Context) {
|
||||
res.Signature = true
|
||||
contract := ContractUrl
|
||||
expirationDate := expirationTime.Format("2006-01-02")
|
||||
signContract, err := logic.SignContractV2(userInfo.SubNum, contract, 0, expirationDate, userInfo.Name, userInfo.IdNumber, userInfo.PlaceOfResidence)
|
||||
payDate := payTime.Format("2006-01-02")
|
||||
signContract, err := logic.SignContractV2(userInfo.SubNum, contract, 0, expirationDate, userInfo.Name, userInfo.IdNumber, userInfo.PlaceOfResidence, payDate)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
@ -354,11 +371,17 @@ func RestartSignature(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
payTime, err := time.Parse("2006-01-02 15:04:05", order.PayTime)
|
||||
if err != nil {
|
||||
service.Error(c, errors.New("获取订单支付日期错误"))
|
||||
return
|
||||
}
|
||||
if expirationTime.Before(time.Now()) {
|
||||
service.Error(c, errors.New("订单已过期"))
|
||||
return
|
||||
}
|
||||
expirationDate := expirationTime.Format("2006-01-02")
|
||||
payDate := payTime.Format("2006-01-02")
|
||||
|
||||
if order.ReSignature == 2 {
|
||||
service.Error(c, errors.New("订单无需重新签署"))
|
||||
@ -371,7 +394,7 @@ func RestartSignature(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
contract := ContractUrl
|
||||
signContract, err := logic.SignContractV2(userInfo.SubNum, contract, 0, expirationDate, userInfo.Name, userInfo.IdNumber, userInfo.PlaceOfResidence)
|
||||
signContract, err := logic.SignContractV2(userInfo.SubNum, contract, 0, expirationDate, userInfo.Name, userInfo.IdNumber, userInfo.PlaceOfResidence, payDate)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
@ -648,13 +671,136 @@ func OrderRecordsListDownload(c *gin.Context) {
|
||||
_ = excelFile.Write(c.Writer)
|
||||
|
||||
}
|
||||
func OrderRecordsListPasswordFreeDownload(c *gin.Context) {
|
||||
var req bundle.OrderRecordsRequestV2
|
||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
res := &bundle.OrderRecordsResponseV2{}
|
||||
|
||||
// Step 1: 如果有姓名/电话筛选,先查用户列表
|
||||
if req.CustomerName != "" {
|
||||
userListResp, err := service.AccountFieeProvider.UserList(context.Background(), &accountFiee.UserListRequest{
|
||||
BlurNameTel: req.CustomerName,
|
||||
Domain: "app",
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
if len(userListResp.UserList) == 0 {
|
||||
// 没查到用户,直接返回空结果
|
||||
res.Page = req.Page
|
||||
res.PageSize = req.PageSize
|
||||
res.Total = 0
|
||||
service.Success(c, res)
|
||||
return
|
||||
}
|
||||
|
||||
// 提取用户ID列表
|
||||
for _, u := range userListResp.UserList {
|
||||
req.UserIds = append(req.UserIds, int64(u.Id))
|
||||
}
|
||||
}
|
||||
|
||||
// Step 2: 查询订单列表
|
||||
orderList, err := service.BundleProvider.OrderRecordsListV2(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
// Step 3: 如果订单不为空,查一次用户信息填充(只查一次)
|
||||
if len(orderList.BundleInfo) > 0 {
|
||||
// 先过滤掉 InviterId == 0 的记录
|
||||
var filtered []*bundle.OrderBundleRecordInfo
|
||||
for _, item := range orderList.BundleInfo {
|
||||
if item.InviterId != 0 {
|
||||
filtered = append(filtered, item)
|
||||
}
|
||||
}
|
||||
|
||||
// 如果过滤后为空,直接导出空结果
|
||||
if len(filtered) == 0 {
|
||||
excelFile, err := exportExcel(filtered)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
c.Header("Content-Type", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
|
||||
c.Header("Content-Disposition", "attachment; filename=order_list.xlsx")
|
||||
c.Header("File-Name", "order_list.xlsx")
|
||||
c.Header("Access-Control-Expose-Headers", "File-Name")
|
||||
_ = excelFile.Write(c.Writer)
|
||||
return
|
||||
}
|
||||
|
||||
// 收集订单里的所有用户ID(仅限过滤后的)
|
||||
userIdSet := make(map[int64]struct{})
|
||||
for _, i := range filtered {
|
||||
userIdSet[i.CustomerId] = struct{}{}
|
||||
}
|
||||
var userIds []int64
|
||||
for id := range userIdSet {
|
||||
userIds = append(userIds, id)
|
||||
}
|
||||
|
||||
userListResp, err := service.AccountFieeProvider.UserList(context.Background(), &accountFiee.UserListRequest{
|
||||
Ids: userIds,
|
||||
Domain: "app",
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
// 建立用户ID -> 用户信息映射
|
||||
userMap := make(map[int64]*accountFiee.UserListInfo, len(userListResp.UserList))
|
||||
for _, u := range userListResp.UserList {
|
||||
userMap[int64(u.Id)] = u
|
||||
}
|
||||
|
||||
// 填充订单中的用户信息(仅限过滤后的)
|
||||
for _, item := range filtered {
|
||||
if u, ok := userMap[item.CustomerId]; ok {
|
||||
item.CustomerName = u.Name
|
||||
item.TelNum = u.TelNum
|
||||
item.SubNum = u.SubNum
|
||||
if item.InviterId != 0 {
|
||||
item.InviterCode = u.InviterCode
|
||||
item.InviterName = u.InviterName
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 用过滤后的数据覆盖原数据用于导出
|
||||
orderList.BundleInfo = filtered
|
||||
}
|
||||
excelFile, err := exportExcel(orderList.BundleInfo)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
// 返回 Excel 文件流给前端
|
||||
c.Header("Content-Type", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
|
||||
c.Header("Content-Disposition", "attachment; filename=order_list.xlsx")
|
||||
c.Header("File-Name", "order_list.xlsx")
|
||||
c.Header("Access-Control-Expose-Headers", "File-Name")
|
||||
_ = excelFile.Write(c.Writer)
|
||||
|
||||
}
|
||||
|
||||
func exportExcel(orderList []*bundle.OrderBundleRecordInfo) (*excelize.File, error) {
|
||||
f := excelize.NewFile()
|
||||
sheetName := "Sheet1"
|
||||
f.SetSheetName("Sheet1", sheetName)
|
||||
|
||||
headers := []string{
|
||||
"套餐订单号", "套餐类型", "套餐付款状态", "艺人手机号", "用户编号", "艺人", "套餐订单创建时间", "套餐支付时间", "套餐金额",
|
||||
"套餐订单号", "套餐类型", "购买类型", "套餐付款状态", "艺人手机号", "用户编号", "艺人", "套餐订单创建时间", "套餐支付时间", "套餐金额",
|
||||
"增值服务订单号", "增值税服务金额", "支付金额", "币种", "手续费", "增值订单创建时间", "增值付款状态", "邀请码", "邀请码所属人",
|
||||
}
|
||||
for i, h := range headers {
|
||||
@ -682,26 +828,27 @@ func exportExcel(orderList []*bundle.OrderBundleRecordInfo) (*excelize.File, err
|
||||
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("A%d", rowIndex), bundleInfo.OrderNo)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("B%d", rowIndex), bundleInfo.BundleName)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("C%d", rowIndex), GetPayStatusText(bundleInfo.PayStatus))
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("D%d", rowIndex), bundleInfo.TelNum)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("E%d", rowIndex), bundleInfo.SubNum)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("F%d", rowIndex), bundleInfo.CustomerName)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("G%d", rowIndex), bundleInfo.BundleCreateAt)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("H%d", rowIndex), bundleInfo.PayTime)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("I%d", rowIndex), bundleInfo.Amount)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("Q%d", rowIndex), bundleInfo.InviterCode)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("R%d", rowIndex), bundleInfo.InviterName)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("C%d", rowIndex), GetPurchaseType(bundleInfo.PurchaseType))
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("D%d", rowIndex), GetPayStatusText(bundleInfo.PayStatus))
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("E%d", rowIndex), bundleInfo.TelNum)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("F%d", rowIndex), bundleInfo.SubNum)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("G%d", rowIndex), bundleInfo.CustomerName)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("H%d", rowIndex), bundleInfo.BundleCreateAt)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("I%d", rowIndex), bundleInfo.PayTime)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("J%d", rowIndex), bundleInfo.Amount)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("R%d", rowIndex), bundleInfo.InviterCode)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("S%d", rowIndex), bundleInfo.InviterName)
|
||||
|
||||
if addCount > 0 {
|
||||
for i, add := range bundleInfo.AddBundleInfo {
|
||||
r := rowIndex + i
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("J%d", r), add.OrderAddNo)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("K%d", r), add.Amount)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("L%d", r), add.SettlementAmount)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("M%d", r), GetCurrencyTypeText(add.CurrencyType))
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("N%d", r), add.HandlingFee)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("O%d", r), add.OrderAddCreateAt)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("P%d", r), GetPayStatusText(add.AddPayStatus))
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("K%d", r), add.OrderAddNo)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("L%d", r), add.Amount)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("M%d", r), add.SettlementAmount)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("N%d", r), GetCurrencyTypeText(add.CurrencyType))
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("O%d", r), add.HandlingFee)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("P%d", r), add.OrderAddCreateAt)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("Q%d", r), GetPayStatusText(add.AddPayStatus))
|
||||
}
|
||||
} else {
|
||||
for i := 8; i <= 15; i++ {
|
||||
@ -725,6 +872,16 @@ func GetPayStatusText(status int32) string {
|
||||
return strconv.Itoa(int(status))
|
||||
}
|
||||
}
|
||||
func GetPurchaseType(status uint64) string {
|
||||
switch status {
|
||||
case 1:
|
||||
return "新购"
|
||||
case 2:
|
||||
return "续费"
|
||||
default:
|
||||
return strconv.Itoa(int(status))
|
||||
}
|
||||
}
|
||||
|
||||
// 辅助函数:获取货币类型文本
|
||||
func GetCurrencyTypeText(currencyType int32) string {
|
||||
|
||||
@ -21,7 +21,7 @@ const (
|
||||
OnlyAddValueListByOrderNoFailed = "根据订单号查询增值套餐失败"
|
||||
)
|
||||
|
||||
//官网报告
|
||||
// 官网报告
|
||||
const (
|
||||
ErrorCreateReportFailed = "创建官网报告失败"
|
||||
ErrorDeleteReportFailed = "删除官网报告失败"
|
||||
@ -30,7 +30,7 @@ const (
|
||||
ErrorDisplayReportFailed = "显示官网报告失败"
|
||||
)
|
||||
|
||||
//官网成员管理
|
||||
// 官网成员管理
|
||||
const (
|
||||
ErrorCreateMemberFailed = "创建官网成员失败"
|
||||
ErrorDeleteMemberFailed = "删除官网成员失败"
|
||||
@ -45,7 +45,7 @@ const (
|
||||
ErrorDisplayBoardOfDirectorsFailed = "显示董事会成员失败"
|
||||
)
|
||||
|
||||
//官网邮箱通知
|
||||
// 官网邮箱通知
|
||||
const (
|
||||
ErrorEmailAlertSubmitFailed = "提交邮箱通知失败"
|
||||
ErrorGetEmailInformationListFailed = "获取邮箱通知列表失败"
|
||||
@ -66,6 +66,7 @@ const (
|
||||
InvalidValueAddBundleNum = "套餐数量无效"
|
||||
ThePackageHasExpired = "当前套餐已过期"
|
||||
ErrorPermanentPackage = "永久套餐无需购买"
|
||||
ErrPurchaseType = "购买类型错误"
|
||||
)
|
||||
const (
|
||||
OrderTypePackage = 1 // 套餐
|
||||
@ -75,6 +76,10 @@ const (
|
||||
TimeUnitMonth = 2
|
||||
TimeUnitYear = 3
|
||||
)
|
||||
const (
|
||||
NewPurchaseOrder = 1 //新购
|
||||
RenewalOrder = 2 //续费
|
||||
)
|
||||
const (
|
||||
ErrorExportOrderInfo = "导出订单信息失败"
|
||||
)
|
||||
@ -105,8 +110,6 @@ const (
|
||||
GetWorkDetailFailed = "获取作品详情失败"
|
||||
)
|
||||
|
||||
//用户套餐状态
|
||||
|
||||
// 余量
|
||||
const (
|
||||
BundleExtendFailed = "套餐扩展失败"
|
||||
@ -124,7 +127,7 @@ const (
|
||||
InsufficientBalance = "余量不足"
|
||||
)
|
||||
|
||||
//用户套餐状态
|
||||
// 用户套餐状态
|
||||
const (
|
||||
BundleExpired = 1 //已过期
|
||||
BundleNotExpired = 0 //未过期
|
||||
@ -141,6 +144,11 @@ const (
|
||||
BalanceMetricsExportFailed = "服务使用明细数据导出失败"
|
||||
)
|
||||
|
||||
// 发票管理
|
||||
const (
|
||||
ExportInvoiceFailed = "发票导出失败"
|
||||
)
|
||||
|
||||
// 素材库
|
||||
const (
|
||||
FileListFailed = "素材库列表查询失败"
|
||||
|
||||
@ -177,4 +177,5 @@ func HealthCheck(c *gin.Context) {
|
||||
}
|
||||
|
||||
c.JSON(httpStatus, healthStatus)
|
||||
// service.Success(c, healthStatus)
|
||||
}
|
||||
|
||||
@ -25,6 +25,9 @@ func ValidateRequest(c *gin.Context, req *bundle.OrderCreateRecord) error {
|
||||
return errors.New(common.MissLanguageTypes)
|
||||
}
|
||||
}
|
||||
if req.PurchaseType != common.NewPurchaseOrder && req.PurchaseType != common.RenewalOrder {
|
||||
return errors.New(common.ErrPurchaseType)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -200,9 +203,9 @@ func buildAddRecord(addService *bundle.ValueAddServiceLang, uid string, price fl
|
||||
}
|
||||
|
||||
// 组装订单请求
|
||||
func BuildOrderRequest(req bundle.OrderCreateRecord, userInfo login.Info,
|
||||
func BuildOrderRequest(req *bundle.OrderCreateRecord, userInfo login.Info,
|
||||
bundleDetail *bundle.BundleProfileLang, addRecords []*bundle.OrderCreateAddRecord,
|
||||
addTotalPrice float32, lastContractNo, signContract string) bundle.OrderCreateRecord {
|
||||
addTotalPrice float32, lastContractNo, signContract string) error {
|
||||
|
||||
req.CustomerNum = userInfo.SubNum
|
||||
req.CustomerName = userInfo.Name
|
||||
@ -217,7 +220,18 @@ func BuildOrderRequest(req bundle.OrderCreateRecord, userInfo login.Info,
|
||||
req.Status = bundleModel.OrderSigned
|
||||
req.AddRecords = addRecords
|
||||
req.PayType = 1
|
||||
return req
|
||||
|
||||
//确认购买类型
|
||||
if req.PurchaseType == common.RenewalOrder {
|
||||
currentOrder, err := service.BundleProvider.GetInEffectOrderRecord(context.Background(), &bundle.GetInEffectOrderRecordRequest{
|
||||
UserID: userInfo.ID,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
req.RenewalOrderUUID = currentOrder.Uuid
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func calculateExpirationDate(startDate time.Time, num int32, unit string) string {
|
||||
//now := time.Now()
|
||||
|
||||
@ -10,11 +10,12 @@ import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/signintech/gopdf"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
func SignContractV2(customerNum, contract string, price float32, expirationDate string, nickName string, idCard string, address string) (outputUrl string, err error) {
|
||||
func SignContractV2(customerNum, contract string, price float32, expirationDate string, nickName string, idCard string, address string, startDate string) (outputUrl string, err error) {
|
||||
filePath := model.MediaPath + customerNum + time.Now().Format("20060102150405") + ".pdf"
|
||||
downloadFileErr := DownloadFile(filePath, contract)
|
||||
if downloadFileErr != nil {
|
||||
@ -23,7 +24,7 @@ func SignContractV2(customerNum, contract string, price float32, expirationDate
|
||||
return outputUrl, errors.New(common.ErrorDownloadFile)
|
||||
}
|
||||
|
||||
signFile := model.MediaPath + customerNum + "signed" + time.Now().Format("20060102150405") + ".pdf"
|
||||
signFile := model.MediaPath + customerNum + "signed" + uuid.New().String() + ".pdf"
|
||||
|
||||
/*signErr := InsertSignature(filePath, signFile, signImgPath, contractNo, idNo, telNum, address, price)
|
||||
if signErr != nil {
|
||||
@ -31,7 +32,7 @@ func SignContractV2(customerNum, contract string, price float32, expirationDate
|
||||
return outputUrl, errors.New(common.ErrorInsertSignature)
|
||||
}*/
|
||||
|
||||
signErr := InsertSignatureV2(filePath, signFile, price, expirationDate, nickName, idCard, address)
|
||||
signErr := InsertSignatureV2(filePath, signFile, price, expirationDate, nickName, idCard, address, startDate)
|
||||
if signErr != nil {
|
||||
zap.L().Error("insert signature error: ", zap.Error(signErr))
|
||||
return outputUrl, errors.New(common.ErrorInsertSignature)
|
||||
@ -46,7 +47,7 @@ func SignContractV2(customerNum, contract string, price float32, expirationDate
|
||||
return outputUrl, nil
|
||||
}
|
||||
|
||||
func InsertSignatureV2(templatePath, outputPath string, price float32, expirationDate string, nickName string, idCard string, address string) error {
|
||||
func InsertSignatureV2(templatePath, outputPath string, price float32, expirationDate string, nickName string, idCard string, address string, startDate string) error {
|
||||
fmt.Println("================================templatePath:", templatePath)
|
||||
fmt.Println("================================outputPath:", outputPath)
|
||||
fmt.Println("================================price:", price)
|
||||
@ -84,24 +85,30 @@ func InsertSignatureV2(templatePath, outputPath string, price float32, expiratio
|
||||
// 英文格式的时间
|
||||
parsedTime, err := time.Parse("2006-01-02", expirationDate)
|
||||
if err != nil {
|
||||
fmt.Println("时间解析错误: %v", err)
|
||||
fmt.Println(expirationDate)
|
||||
return errors.New("时间解析错误")
|
||||
}
|
||||
// 英文格式的时间
|
||||
startTime, err := time.Parse("2006-01-02", startDate)
|
||||
if err != nil {
|
||||
return errors.New("时间解析错误")
|
||||
}
|
||||
year := parsedTime.Format("2006") // "2006"
|
||||
month := parsedTime.Format("01") // "01"
|
||||
day := parsedTime.Format("02") // "02"
|
||||
startYear := startTime.Format("2006")
|
||||
startMonth := startTime.Format("01")
|
||||
startDay := startTime.Format("02")
|
||||
// 填 第一页 日期-姓名-身份证号
|
||||
pdf.SetPage(onePage)
|
||||
pdf.SetX(232)
|
||||
pdf.SetY(152)
|
||||
pdf.Cell(nil, year)
|
||||
pdf.Cell(nil, startYear)
|
||||
pdf.SetX(279)
|
||||
pdf.SetY(152)
|
||||
pdf.Cell(nil, month)
|
||||
pdf.Cell(nil, startMonth)
|
||||
pdf.SetX(313)
|
||||
pdf.SetY(152)
|
||||
pdf.Cell(nil, day)
|
||||
pdf.Cell(nil, startDay)
|
||||
pdf.SetX(370)
|
||||
pdf.SetY(152)
|
||||
pdf.Cell(nil, nickName)
|
||||
|
||||
@ -8,6 +8,7 @@ import (
|
||||
"fonchain-fiee/api/accountFiee"
|
||||
"fonchain-fiee/api/bundle"
|
||||
"fonchain-fiee/api/cast"
|
||||
castProto "fonchain-fiee/api/cast"
|
||||
"fonchain-fiee/api/order"
|
||||
"fonchain-fiee/api/payment"
|
||||
"fonchain-fiee/pkg/cache"
|
||||
@ -16,6 +17,7 @@ import (
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/service/bundle/common"
|
||||
bundleModel "fonchain-fiee/pkg/service/bundle/model"
|
||||
"fonchain-fiee/pkg/service/invoice"
|
||||
"io"
|
||||
"math"
|
||||
"net/http"
|
||||
@ -366,6 +368,25 @@ func CreateAntomPay(c *gin.Context) {
|
||||
service.Error(c, updateStatusErr)
|
||||
return
|
||||
}
|
||||
// //生成发票
|
||||
// fmt.Println("开始生成发票")
|
||||
// orderRecord, err := service.BundleProvider.GetOrderInfoByOrderNo(context.Background(), &bundle.GetOrderInfoByOrderNoReq{
|
||||
// Uuid: req.OutTradeNo, //因为需求更新,实际传入的是订单的uuid
|
||||
// })
|
||||
// if err != nil {
|
||||
// service.Error(c, err)
|
||||
// return
|
||||
// }
|
||||
|
||||
// amountType := strconv.FormatInt(orderRecord.AmountType, 10)
|
||||
|
||||
// // 将当前时间转换为北京时间
|
||||
// applyTime := common.GetBeijingTime()
|
||||
// payTime, _ := time.Parse("2006-01-02 15:04:05", applyTime)
|
||||
// payTimeString := payTime.Format("20060102")
|
||||
// fmt.Println("发票payTimeString :", payTimeString, "发票applyTime :", applyTime, "发票payTime :", payTime)
|
||||
// fmt.Println("发票时间数据获取完成")
|
||||
// err = createInvoice(orderRecord.UserId, orderRecord.UserNum, orderRecord.UserName, orderRecord.Address, orderRecord.Phone, orderRecord.BundleName, orderRecord.OrderNo, "1", amountType, orderRecord.TotalAmount, payTimeString, payTimeString, applyTime)
|
||||
|
||||
switch orderLimit.Type {
|
||||
case common.OrderTypePackage:
|
||||
@ -451,7 +472,15 @@ func CreateAntomPay(c *gin.Context) {
|
||||
antomReq.Domain = "fiee"
|
||||
antomReq.Amount = req.ProductAllPrice
|
||||
antomReq.Currency = req.ProductPriceCurrency
|
||||
antomReq.OutTradeNo = req.OutTradeNo
|
||||
//antomReq.OutTradeNo = req.OutTradeNo
|
||||
//uuidV4, err := uuid.NewV4()
|
||||
//if err != nil {
|
||||
// fmt.Println("生成错误", err)
|
||||
// service.Error(c, errors.New("订单编号生成失败"))
|
||||
// return
|
||||
//}
|
||||
//antomReq.OutTradeNo = uuidV4.String()
|
||||
antomReq.OutTradeNo = orderLimit.OrderUUID
|
||||
antomReq.ReturnUrl = req.SuccessUrl
|
||||
|
||||
//调用微服务获取支付地址
|
||||
@ -494,7 +523,7 @@ func CreateAntomPay(c *gin.Context) {
|
||||
CurrencyType: int32(currencyType),
|
||||
PayStatus: 1,
|
||||
UserID: userInfo.ID,
|
||||
SerialNumber: result.CheckoutSessionId,
|
||||
SerialNumber: req.OutTradeNo,
|
||||
})
|
||||
if err != nil {
|
||||
fmt.Println("=============== antom创建支付,创建对账单报错:", err)
|
||||
@ -606,9 +635,23 @@ func AntomWebhook(c *gin.Context) {
|
||||
}
|
||||
fmt.Println("resp.Status:", resp.Status)
|
||||
if resp.Status == "paid" {
|
||||
//添加余额
|
||||
orderLimit, err := service.BundleProvider.OrderListByOrderUuid(context.Background(), &bundle.OrderInfoByOrderUuidRequest{
|
||||
OrderUuid: resp.OutTradeNo,
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
//获取上一笔订单信息:如果没有查询到代表首次购买 需要判断异常情况
|
||||
lastOrderInfo, _ := service.BundleProvider.OrderRecordsDetail(context.Background(), &bundle.OrderRecordsDetailRequest{
|
||||
CustomerID: strconv.FormatUint(orderLimit.UserId, 10),
|
||||
Status: 2,
|
||||
})
|
||||
|
||||
//支付成功
|
||||
_, updateStatusErr := service.BundleProvider.UpdateOrderRecordByOrderNo(context.Background(), &bundle.OrderRecord{
|
||||
OrderNo: resp.OutTradeNo,
|
||||
_, updateStatusErr := service.BundleProvider.UpdateOrderRecordByOrderUuid(context.Background(), &bundle.OrderRecord{
|
||||
Uuid: resp.OutTradeNo,
|
||||
PayTime: common.GetBeijingTime(),
|
||||
Status: bundleModel.OrderPaid,
|
||||
})
|
||||
@ -618,9 +661,9 @@ func AntomWebhook(c *gin.Context) {
|
||||
}
|
||||
// 更新对账单
|
||||
_, err = service.BundleProvider.UpdateReconciliationStatusBySerialNumber(context.Background(), &bundle.UpdateStatusAndPayTimeBySerialNumber{
|
||||
PayTime: paymentTime,
|
||||
PayTime: common.GetBeijingTime(),
|
||||
PaymentStatus: 2,
|
||||
SerialNumber: requestId,
|
||||
SerialNumber: resp.OutTradeNo,
|
||||
})
|
||||
if err != nil {
|
||||
fmt.Println("=============== antom回调,更新对账单报错:", err)
|
||||
@ -629,19 +672,33 @@ func AntomWebhook(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
//生成发票
|
||||
fmt.Println("开始生成发票")
|
||||
//添加余额
|
||||
orderLimit, err := service.BundleProvider.OrderListByOrderNo(context.Background(), &bundle.OrderInfoByOrderNoRequest{
|
||||
OrderNo: resp.OutTradeNo,
|
||||
orderRecord, err := service.BundleProvider.GetOrderInfoByOrderNo(context.Background(), &bundle.GetOrderInfoByOrderNoReq{
|
||||
Uuid: resp.OutTradeNo, //因为需求更新,实际传入的是订单的uuid
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
amountType := strconv.FormatInt(orderRecord.AmountType, 10)
|
||||
applyTime := common.GetBeijingTime()
|
||||
payTime, _ := time.Parse("2006-01-02 15:04:05", applyTime)
|
||||
payTimeString := payTime.Format("20060102")
|
||||
fmt.Println("发票payTimeString :", payTimeString, "发票applyTime :", applyTime, "发票payTime :", payTime)
|
||||
fmt.Println("发票时间数据获取完成")
|
||||
err = createInvoice(orderRecord.UserId, orderRecord.UserNum, orderRecord.UserName, orderRecord.Address, orderRecord.Phone, orderRecord.BundleName, orderRecord.OrderNo, "1", amountType, orderRecord.TotalAmount, payTimeString, payTimeString, applyTime)
|
||||
|
||||
go func() {
|
||||
_, _ = service.CastProvider.Tools(context.Background(), &cast.ToolsReq{Action: "artistOrderInfo", ArtistUuid: fmt.Sprint(orderLimit.UserId)})
|
||||
}()
|
||||
|
||||
//购买套餐
|
||||
switch orderLimit.Type {
|
||||
case common.OrderTypePackage:
|
||||
fmt.Println("开始创建套餐信息OrderUUID:", orderLimit.OrderUUID)
|
||||
//如果是购买套餐 1:创建新的余量信息CreateBundleBalance 2 添加扩展记录BundleExtend
|
||||
_, err = service.BundleProvider.CreateBundleBalance(context.Background(), &bundle.CreateBundleBalanceReq{
|
||||
UserId: int32(orderLimit.UserId),
|
||||
@ -653,9 +710,11 @@ func AntomWebhook(c *gin.Context) {
|
||||
ExpansionPacksNumber: 1,
|
||||
})
|
||||
if err != nil {
|
||||
fmt.Println("=============== antom回调,创建套餐信息报错:", err)
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
fmt.Println("创建套餐信息完成")
|
||||
case common.OrderTypeAddon:
|
||||
//如果是购买增值服务 1:修改余量信息AddBundleBalance 2 添加扩展记录BundleExtend
|
||||
//_, err = service.BundleProvider.AddBundleBalance(context.Background(), &bundle.AddBundleBalanceReq{
|
||||
@ -701,11 +760,15 @@ func AntomWebhook(c *gin.Context) {
|
||||
Type: 2, //自行购买
|
||||
OperatorName: orderLimit.UserName,
|
||||
OperatorId: orderLimit.UserId,
|
||||
CompetitiveAdditional: uint32(orderLimit.CompetitiveAdditional), //添加竞品数
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
// 处理媒体账号绑定逻辑
|
||||
handleMediaAccountBinding(orderLimit.UserId, orderLimit.PurchaseType, int(orderLimit.AccountNumber), lastOrderInfo)
|
||||
|
||||
}
|
||||
service.Success(c)
|
||||
}
|
||||
@ -768,3 +831,250 @@ func HomePageRoll(c *gin.Context) {
|
||||
service.Success(c, roll)
|
||||
return
|
||||
}
|
||||
|
||||
// MediaAccount 媒体账号信息
|
||||
type MediaAccount struct {
|
||||
UUID string
|
||||
PlatformID uint32
|
||||
}
|
||||
|
||||
// handleMediaAccountBinding 处理媒体账号绑定逻辑(统一解绑方法)
|
||||
// userId: 用户ID
|
||||
// purchaseType: 购买类型(新购/续费)
|
||||
// currentAccountNum: 本次购买的账号数
|
||||
// lastOrderInfo: 上次订单信息
|
||||
func handleMediaAccountBinding(userId uint64, purchaseType int32, currentAccountNum int, lastOrderInfo *bundle.OrderRecordsDetailResponse) {
|
||||
// 1. 获取用户的媒体账号列表
|
||||
MediaList, err := service.CastProvider.MediaUserList(context.Background(), &castProto.MediaUserListReq{
|
||||
Page: 1,
|
||||
PageSize: 999,
|
||||
ArtistUuid: strconv.FormatUint(userId, 10),
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
logger.Warnf("Failed to get media list for user %d: %v", userId, err)
|
||||
return
|
||||
}
|
||||
|
||||
if MediaList == nil || len(MediaList.Data) == 0 {
|
||||
logger.Infof("No media accounts found for user %d", userId)
|
||||
return
|
||||
}
|
||||
|
||||
// 2. 收集过期的媒体账号信息(包含平台ID)
|
||||
var expiredAccounts []MediaAccount
|
||||
for _, media := range MediaList.Data {
|
||||
if media.Expired == 1 {
|
||||
expiredAccounts = append(expiredAccounts, MediaAccount{
|
||||
UUID: media.MediaAccountUuid,
|
||||
PlatformID: media.PlatformID,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
if len(expiredAccounts) == 0 {
|
||||
logger.Infof("No expired media accounts found for user %d", userId)
|
||||
return
|
||||
}
|
||||
|
||||
// 3. 判断是否首次购买
|
||||
isFirstPurchase := lastOrderInfo == nil || lastOrderInfo.OrderRecord == nil || len(lastOrderInfo.OrderRecord.AddInfos) == 0
|
||||
|
||||
// 4. 根据购买类型处理解绑逻辑
|
||||
var accountsToUnbind []string
|
||||
|
||||
if purchaseType == common.NewPurchaseOrder {
|
||||
// 新购订单
|
||||
if isFirstPurchase {
|
||||
logger.Infof("First time purchase for user %d, no need to unbind accounts", userId)
|
||||
return
|
||||
}
|
||||
// 非首次购买的新购:解绑所有过期账号
|
||||
for _, account := range expiredAccounts {
|
||||
accountsToUnbind = append(accountsToUnbind, account.UUID)
|
||||
}
|
||||
logger.Infof("New purchase for user %d, will unbind all %d expired accounts", userId, len(accountsToUnbind))
|
||||
|
||||
} else if purchaseType == common.RenewalOrder {
|
||||
// 续费订单
|
||||
if isFirstPurchase {
|
||||
logger.Infof("No previous order found for renewal user %d, no need to unbind accounts", userId)
|
||||
return
|
||||
}
|
||||
|
||||
// 获取上次购买的账号数
|
||||
var lastAccountNum int
|
||||
for _, addInfo := range lastOrderInfo.OrderRecord.AddInfos {
|
||||
if addInfo.ServiceType == 4 { // ServiceType 4 表示账号服务
|
||||
lastAccountNum += int(addInfo.Num)
|
||||
}
|
||||
}
|
||||
|
||||
logger.Infof("Renewal order for user %d: current=%d, last=%d, expired=%d",
|
||||
userId, currentAccountNum, lastAccountNum, len(expiredAccounts))
|
||||
|
||||
// 如果当前购买数量 >= 上次购买数量,不需要解绑
|
||||
if currentAccountNum >= lastAccountNum {
|
||||
logger.Infof("No need to unbind accounts for renewal user %d: current(%d) >= last(%d)",
|
||||
userId, currentAccountNum, lastAccountNum)
|
||||
return
|
||||
}
|
||||
|
||||
// 当前购买数量 < 上次购买数量,按优先级解绑差额部分
|
||||
needUnbindCount := lastAccountNum - currentAccountNum
|
||||
|
||||
// 定义平台优先级(数字越小优先级越高,优先保留)
|
||||
// TikTok(1) > DM(4) > Bluesky(5) > Instagram(3) > YouTube(2)
|
||||
platformPriority := map[uint32]int{
|
||||
1: 1, // TikTok - 最高优先级,最后解绑
|
||||
4: 2, // DM
|
||||
5: 3, // Bluesky
|
||||
3: 4, // Instagram
|
||||
2: 5, // YouTube - 最低优先级,最先解绑
|
||||
}
|
||||
|
||||
// 按优先级排序(优先级低的排在前面,先解绑)
|
||||
sortedAccounts := make([]MediaAccount, len(expiredAccounts))
|
||||
copy(sortedAccounts, expiredAccounts)
|
||||
|
||||
for i := 0; i < len(sortedAccounts)-1; i++ {
|
||||
for j := 0; j < len(sortedAccounts)-i-1; j++ {
|
||||
priority1 := platformPriority[sortedAccounts[j].PlatformID]
|
||||
priority2 := platformPriority[sortedAccounts[j+1].PlatformID]
|
||||
if priority1 == 0 {
|
||||
priority1 = 999
|
||||
}
|
||||
if priority2 == 0 {
|
||||
priority2 = 999
|
||||
}
|
||||
// 降序排列:优先级数字大的排在前面(先解绑)
|
||||
if priority1 < priority2 {
|
||||
sortedAccounts[j], sortedAccounts[j+1] = sortedAccounts[j+1], sortedAccounts[j]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 取前needUnbindCount个账号进行解绑
|
||||
if needUnbindCount > len(sortedAccounts) {
|
||||
needUnbindCount = len(sortedAccounts)
|
||||
}
|
||||
|
||||
for i := 0; i < needUnbindCount; i++ {
|
||||
accountsToUnbind = append(accountsToUnbind, sortedAccounts[i].UUID)
|
||||
}
|
||||
logger.Infof("Renewal downgrade for user %d, will unbind %d accounts by priority", userId, len(accountsToUnbind))
|
||||
}
|
||||
|
||||
// 5. 执行解绑操作
|
||||
if len(accountsToUnbind) > 0 {
|
||||
successCount := 0
|
||||
failCount := 0
|
||||
for _, accountUUID := range accountsToUnbind {
|
||||
if _, err := service.CastProvider.UpdateMediaAccInfo(context.Background(), &castProto.UpdateMediaAccInfoReq{
|
||||
MediaAccountUuid: accountUUID,
|
||||
Expired: 2,
|
||||
ExpiredSource: castProto.ExpiredMediaSourceENUM_UpdateMediaSource_CHARGE,
|
||||
}); err != nil {
|
||||
logger.Errorf("Failed to unbind account %s for user %d: %v", accountUUID, userId, err)
|
||||
failCount++
|
||||
} else {
|
||||
successCount++
|
||||
}
|
||||
}
|
||||
logger.Infof("Unbind completed for user %d: success=%d, fail=%d", userId, successCount, failCount)
|
||||
}
|
||||
}
|
||||
|
||||
func createInvoice(userId, userNum, userName, address, phone, bundleName, orderNo, spec, priceType, totalAmount, transactionDate, invoiceDate, applyTime string) error {
|
||||
// InvoiceInfo 发票信息
|
||||
fmt.Println("发票applyTime :", applyTime, "发票transactionDate :", transactionDate, "发票invoiceDate :", invoiceDate)
|
||||
InvoiceResp, err := service.BundleProvider.GetLastInvoiceNo(context.Background(), &bundle.GetLastInvoiceNoReq{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
lastestInvoiceNo := ""
|
||||
|
||||
if InvoiceResp.LastNo != "" {
|
||||
lastestInvoiceNo = InvoiceResp.LastNo
|
||||
}
|
||||
|
||||
currentInvoiceNo := ""
|
||||
// 获取 lastestInvoiceNo CNY-ART-202501010001的 长度
|
||||
if priceType == "1" {
|
||||
priceType = "CNY"
|
||||
//人民币
|
||||
if lastestInvoiceNo == "" {
|
||||
currentInvoiceNo = fmt.Sprintf("CNY-MDA-%s0001", transactionDate)
|
||||
} else {
|
||||
lastestSeq := lastestInvoiceNo[16:]
|
||||
var seqNum int
|
||||
_, err = fmt.Sscanf(lastestSeq, "%d", &seqNum)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
seqNum++
|
||||
currentInvoiceNo = fmt.Sprintf("CNY-MDA-%s%04d", transactionDate, seqNum)
|
||||
}
|
||||
} else if priceType == "2" {
|
||||
priceType = "USD"
|
||||
//美元
|
||||
if lastestInvoiceNo == "" {
|
||||
currentInvoiceNo = fmt.Sprintf("USD-MDA-%s0001", transactionDate)
|
||||
} else {
|
||||
lastestSeq := lastestInvoiceNo[16:]
|
||||
var seqNum int
|
||||
_, err = fmt.Sscanf(lastestSeq, "%d", &seqNum)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
seqNum++
|
||||
currentInvoiceNo = fmt.Sprintf("USD-MDA-%s%04d", transactionDate, seqNum)
|
||||
}
|
||||
} else {
|
||||
//默认美元
|
||||
priceType = "USD"
|
||||
if lastestInvoiceNo == "" {
|
||||
currentInvoiceNo = fmt.Sprintf("USD-MDA-%s0001", transactionDate)
|
||||
} else {
|
||||
lastestSeq := lastestInvoiceNo[16:]
|
||||
var seqNum int
|
||||
_, err = fmt.Sscanf(lastestSeq, "%d", &seqNum)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
seqNum++
|
||||
currentInvoiceNo = fmt.Sprintf("USD-MDA-%s%04d", transactionDate, seqNum)
|
||||
}
|
||||
}
|
||||
|
||||
fmt.Println("当前发票号码:", currentInvoiceNo)
|
||||
|
||||
invoiceDate = time.Now().Format("20060102")
|
||||
|
||||
invoiceUrl, err := invoice.MakeInvoice(currentInvoiceNo, userName, address, phone, bundleName, spec, priceType, totalAmount, transactionDate, invoiceDate)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
fmt.Println("发票生成成功,URL:", invoiceUrl)
|
||||
_, err = service.BundleProvider.CreateInvoice(context.Background(), &bundle.CreateInvoiceReq{
|
||||
UserId: userId,
|
||||
UserNum: userNum,
|
||||
UserName: userName,
|
||||
OrderNo: orderNo,
|
||||
ApplyTime: applyTime,
|
||||
InvoiceType: 1,
|
||||
InvoiceNo: currentInvoiceNo,
|
||||
InvoiceUrl: invoiceUrl,
|
||||
PaperInvocieStatus: 1,
|
||||
Remark: "系统自动生成发票",
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
fmt.Println("创建发票数据成功")
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -253,16 +253,14 @@ func AutoCreateUserAndOrder(c *gin.Context) {
|
||||
reportUuid := ""
|
||||
accountUuid := ""
|
||||
durationUuid := ""
|
||||
bundleVideoUuid := ""
|
||||
if config.AppConfig.System.AppMode == "prod" {
|
||||
BundleName = "全球尊享版"
|
||||
BundleUuid = "ac4c99c2951c2fcdbf417928d321554d"
|
||||
videoUuid = "355aae784d77280197c92ff56733459d" // 增值视频
|
||||
textAndImagesUuid = "41a7753d210d22f8972dc273ff1360c4" // 套餐图文
|
||||
reportUuid = "069497de55852c24a3b0f702c1250900" // 套餐数据
|
||||
accountUuid = "1e04078d2a8824d18be1c281bc3167a8" // 套餐账号
|
||||
durationUuid = "e3ad8f15aa022b12afe47170c9051db9" // 套餐时长
|
||||
bundleVideoUuid = "fdbef018707e2a8ebc82a22e257abaff" // 套餐视频
|
||||
videoUuid = "a29a1fa2862b2cdda1377b19066c8eb7"
|
||||
textAndImagesUuid = "dfba176a40ae2d23aa4ef9b30b646bc8"
|
||||
reportUuid = "1727557a85c92957a3e3332d18c713aa"
|
||||
accountUuid = "e1cc219e4f682b3d8cb85929e540a0de"
|
||||
durationUuid = "f002449ac57a2e71b0673da938c0354e"
|
||||
} else {
|
||||
BundleName = "测试导入全球尊享版"
|
||||
BundleUuid = "5e84f86cb7f92a4ab785271e4a383aa5"
|
||||
@ -309,21 +307,7 @@ func AutoCreateUserAndOrder(c *gin.Context) {
|
||||
f64, err := strconv.ParseFloat(unfinishInfo.OrderPayAmount, 32)
|
||||
TotalPrice = float32(f64)
|
||||
addRecords = append(addRecords,
|
||||
&bundle.OrderCreateAddRecord{ // 套餐视频
|
||||
ServiceType: 1,
|
||||
ValueUid: bundleVideoUuid,
|
||||
CurrencyType: 2, //美元
|
||||
Amount: 0, //增值服务金额
|
||||
Num: 24,
|
||||
Unit: "个",
|
||||
Source: 1,
|
||||
PaymentStatus: 1,
|
||||
HandlingFee: unfinishInfo.OrderFeeAmount,
|
||||
EquityType: 1,
|
||||
QuotaType: 2,
|
||||
QuotaValue: 2,
|
||||
},
|
||||
&bundle.OrderCreateAddRecord{ //视频增值
|
||||
&bundle.OrderCreateAddRecord{
|
||||
ServiceType: 1,
|
||||
ValueUid: videoUuid,
|
||||
CurrencyType: 2, //美元
|
||||
@ -333,8 +317,6 @@ func AutoCreateUserAndOrder(c *gin.Context) {
|
||||
Source: 1,
|
||||
PaymentStatus: 1,
|
||||
HandlingFee: unfinishInfo.OrderFeeAmount,
|
||||
EquityType: 2,
|
||||
QuotaType: 1,
|
||||
}, &bundle.OrderCreateAddRecord{ //图文
|
||||
ServiceType: 2,
|
||||
ValueUid: textAndImagesUuid,
|
||||
@ -345,9 +327,6 @@ func AutoCreateUserAndOrder(c *gin.Context) {
|
||||
Source: 1,
|
||||
PaymentStatus: 1,
|
||||
HandlingFee: unfinishInfo.OrderFeeAmount,
|
||||
EquityType: 1,
|
||||
QuotaType: 2,
|
||||
QuotaValue: 10,
|
||||
}, &bundle.OrderCreateAddRecord{ //数据报表
|
||||
ServiceType: 3,
|
||||
ValueUid: reportUuid,
|
||||
@ -358,9 +337,6 @@ func AutoCreateUserAndOrder(c *gin.Context) {
|
||||
Source: 1,
|
||||
PaymentStatus: 1,
|
||||
HandlingFee: unfinishInfo.OrderFeeAmount,
|
||||
EquityType: 1,
|
||||
QuotaType: 2,
|
||||
QuotaValue: 1,
|
||||
}, &bundle.OrderCreateAddRecord{ //账号数
|
||||
ServiceType: 4,
|
||||
ValueUid: accountUuid,
|
||||
@ -371,27 +347,23 @@ func AutoCreateUserAndOrder(c *gin.Context) {
|
||||
Source: 1,
|
||||
PaymentStatus: 1,
|
||||
HandlingFee: unfinishInfo.OrderFeeAmount,
|
||||
EquityType: 1,
|
||||
QuotaType: 1,
|
||||
}, &bundle.OrderCreateAddRecord{ //可用时长
|
||||
ServiceType: 5,
|
||||
ValueUid: durationUuid,
|
||||
CurrencyType: 2, //美元
|
||||
Amount: 0, //增值服务金额
|
||||
Num: 1,
|
||||
Num: 10,
|
||||
Unit: "年",
|
||||
Source: 1,
|
||||
PaymentStatus: 1,
|
||||
HandlingFee: unfinishInfo.OrderFeeAmount,
|
||||
EquityType: 1,
|
||||
QuotaType: 1,
|
||||
},
|
||||
)
|
||||
// 当前 未将 签名 写入合同中 todo 金额和有效时间待修改
|
||||
contract := ContractUrl
|
||||
expirationDay = t.AddDate(1, 0, 0).Format("2006-01-02")
|
||||
|
||||
signContract, signContractErr := logic.SignContractV2(userReq.UserNum, contract, TotalPrice, expirationDay, unfinishInfo.UserName, unfinishInfo.CardNum, unfinishInfo.PlaceOfResidence)
|
||||
startDate := t.Format("2006-01-02")
|
||||
signContract, signContractErr := logic.SignContractV2(userReq.UserNum, contract, TotalPrice, expirationDay, unfinishInfo.UserName, unfinishInfo.CardNum, unfinishInfo.PlaceOfResidence, startDate)
|
||||
if signContractErr != nil {
|
||||
service.Error(c, signContractErr)
|
||||
return
|
||||
@ -419,6 +391,7 @@ func AutoCreateUserAndOrder(c *gin.Context) {
|
||||
//expirationTime := t.AddDate(10, 0, 0).Format("2006-01-02 15:04:05")
|
||||
//orderReq.ExpirationTime = expirationTime
|
||||
orderReq.PlatformIds = []uint32{1, 4, 5}
|
||||
orderReq.PurchaseType = common.NewPurchaseOrder
|
||||
_, err = service.BundleProvider.CreateOrderRecord(context.Background(), &orderReq)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package cast
|
||||
package cast
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -13,7 +13,9 @@ import (
|
||||
modelCast "fonchain-fiee/pkg/model/cast"
|
||||
"fonchain-fiee/pkg/model/login"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/service/bundle/common"
|
||||
"fonchain-fiee/pkg/utils"
|
||||
"fonchain-fiee/pkg/utils/stime"
|
||||
"strconv"
|
||||
"sync"
|
||||
"time"
|
||||
@ -42,6 +44,20 @@ func CreateWorkAnalysis(ctx *gin.Context) {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
// 获取套餐订单uuid
|
||||
resp1, err := service.BundleProvider.GetBundleBalanceByUserId(context.Background(), &bundle.GetBundleBalanceByUserIdReq{UserId: int32(artistID)})
|
||||
if err != nil {
|
||||
err = errors.New("获取套餐订单失败")
|
||||
service.Error(ctx, err)
|
||||
zap.L().Error("CheckUserBundleBalance", zap.Any("err", err))
|
||||
return
|
||||
}
|
||||
if resp1.OrderUUID == "" {
|
||||
err = errors.New("订单不存在")
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
req.BundleOrderUuid = resp1.OrderUUID
|
||||
resp, err := service.CastProvider.CreateWorkAnalysis(newCtx, req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
@ -60,6 +76,17 @@ func UpdateWorkAnalysis(ctx *gin.Context) {
|
||||
return
|
||||
}
|
||||
newCtx := NewCtxWithUserInfo(ctx)
|
||||
artistID, _ := strconv.ParseUint(req.ArtistUUID, 10, 64)
|
||||
resp1, err := service.BundleProvider.GetBundleBalanceByUserId(context.Background(), &bundle.GetBundleBalanceByUserIdReq{UserId: int32(artistID)})
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
if resp1.OrderUUID == "" {
|
||||
service.Error(ctx, errors.New("订单不存在"))
|
||||
return
|
||||
}
|
||||
req.BundleOrderUuid = resp1.OrderUUID
|
||||
_, err = service.CastProvider.UpdateWorkAnalysis(newCtx, req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
@ -138,7 +165,46 @@ func ListWorkAnalysis(ctx *gin.Context) {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
RefreshWorkAnalysisApproval(ctx, resp.Data)
|
||||
// RefreshWorkAnalysisApproval(ctx, resp.Data)
|
||||
service.Success(ctx, resp)
|
||||
return
|
||||
}
|
||||
|
||||
// ListWorkAnalysis 获取作品分析列表
|
||||
func ListWorkAnalysisForApp(ctx *gin.Context) {
|
||||
var req *cast.ListWorkAnalysisReq
|
||||
var err error
|
||||
if err = ctx.ShouldBind(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
newCtx := NewCtxWithUserInfo(ctx)
|
||||
loginInfo := login.GetUserInfoFromC(ctx)
|
||||
// 查询用户套餐有没有过期
|
||||
balanceInfoRes, err := service.BundleProvider.GetBundleBalanceByUserId(context.Background(), &bundle.GetBundleBalanceByUserIdReq{
|
||||
UserId: int32(loginInfo.ID),
|
||||
})
|
||||
if err != nil {
|
||||
zap.L().Error("ListWorkAnalysisForApp GetBundleBalanceByUserId", zap.Any("err", err))
|
||||
service.Error(ctx, errors.New(common.GetUserBalanceFailed))
|
||||
return
|
||||
}
|
||||
// 套餐未过期的话,传入 subNum ,只获取该套餐的有效期内数据
|
||||
if balanceInfoRes.BundleStatus == common.BundleNotExpired {
|
||||
zap.L().Info("ListWorkAnalysisForApp BundleNotExpired", zap.Any("loginInfo", loginInfo))
|
||||
req.SubNum = loginInfo.SubNum
|
||||
}
|
||||
if balanceInfoRes.BundleStatus == common.BundleExpired {
|
||||
req.SubmitStartTime = time.Unix(balanceInfoRes.PayTime, 0).Format("2006-01-02 15:04:05")
|
||||
req.SubmitEndTime = time.Unix(balanceInfoRes.ExpiredTime, 0).Format("2006-01-02 15:04:05")
|
||||
}
|
||||
resp, err := service.CastProvider.ListWorkAnalysis(newCtx, req)
|
||||
if err != nil {
|
||||
zap.L().Error("ListWorkAnalysisForApp ListWorkAnalysis", zap.Any("err", err))
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
// RefreshWorkAnalysisApproval(ctx, resp.Data)
|
||||
service.Success(ctx, resp)
|
||||
return
|
||||
}
|
||||
@ -181,7 +247,7 @@ func RefreshWorkAnalysisApprovalStatus(ctx *gin.Context, approvalIDAnalysisUuidM
|
||||
for _, v := range approvalIDs {
|
||||
newData[v] = data[v]
|
||||
}
|
||||
newCtx := NewCtxWithUserInfo(ctx)
|
||||
newCtx := NewCtxWithUserInfo(ctx, "业务部门")
|
||||
if len(newData) > 0 {
|
||||
for approvalId, v := range newData {
|
||||
if v.ID == 0 {
|
||||
@ -190,11 +256,13 @@ func RefreshWorkAnalysisApprovalStatus(ctx *gin.Context, approvalIDAnalysisUuidM
|
||||
Uuid: approvalIDAnalysisUuidMap[approvalId],
|
||||
ApprovalID: fmt.Sprint(approvalId),
|
||||
ApprovalReply: "",
|
||||
ApprovalTime: v.UpdatedAt,
|
||||
})
|
||||
continue
|
||||
}
|
||||
var workAction cast.WorkActionENUM
|
||||
if v.Status == 2 {
|
||||
uTimes, _ := stime.DatetimeToTimes(v.UpdatedAt, "2006-01-02 15:04:05")
|
||||
if v.Status == 2 && int64(uTimes) <= time.Now().Unix() {
|
||||
workAction = cast.WorkActionENUM_APPROVAL_PASS
|
||||
} else if v.Status == 3 {
|
||||
workAction = cast.WorkActionENUM_APPROVAL_REJECT
|
||||
@ -206,6 +274,7 @@ func RefreshWorkAnalysisApprovalStatus(ctx *gin.Context, approvalIDAnalysisUuidM
|
||||
Uuid: approvalIDAnalysisUuidMap[approvalId],
|
||||
ApprovalID: fmt.Sprint(approvalId),
|
||||
ApprovalReply: v.Reply,
|
||||
ApprovalTime: v.UpdatedAt,
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -538,6 +607,12 @@ func CheckBundleBalance(ctx *gin.Context) {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
case modelCast.BalanceTypeCompetitiveValue:
|
||||
if resp.CompetitiveExtendNumber-resp.CompetitiveExtendConsumptionNumber <= 0 {
|
||||
err = errors.New(e.ErrorBalanceInsufficient)
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
service.Success(ctx, resp)
|
||||
@ -603,6 +678,41 @@ func autoConfirmAnalysis(ctx context.Context, analysisUuid string) (err error) {
|
||||
isFailed = true
|
||||
}
|
||||
|
||||
if balanceInfoRes.BundleStatus == common.BundleExpired {
|
||||
confirmRemark = "套餐已过期"
|
||||
// 直接提交
|
||||
_, err = service.CastProvider.UpdateWorkAnalysisStatus(context.Background(), &cast.UpdateWorkAnalysisStatusReq{
|
||||
WorkAction: cast.WorkActionENUM_CONFIRM,
|
||||
Uuid: analysisUuid,
|
||||
ConfirmRemark: confirmRemark,
|
||||
ConfirmStatus: 3,
|
||||
})
|
||||
if err != nil {
|
||||
zap.L().Error("autoConfirmAnalysis UpdateWorkAnalysisStatus", zap.Any("err", err))
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if balanceInfoRes.PurchaseType == 1 {
|
||||
// 判断数据分析对应订单是否相同
|
||||
if infoResp.BundleOrderUuid != balanceInfoRes.OrderUUID {
|
||||
// 订单号不同
|
||||
// 说明是新购买的,直接扣除失败
|
||||
_, err = service.CastProvider.UpdateWorkAnalysisStatus(context.Background(), &cast.UpdateWorkAnalysisStatusReq{
|
||||
WorkAction: cast.WorkActionENUM_CONFIRM,
|
||||
Uuid: analysisUuid,
|
||||
ConfirmRemark: "套餐为新套餐,确认失败",
|
||||
ConfirmStatus: 3,
|
||||
})
|
||||
if err != nil {
|
||||
return
|
||||
zap.L().Error("autoConfirmAnalysis UpdateWorkAnalysisStatus", zap.Any("err", err))
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
var addBalanceReq bundle.AddBundleBalanceReq
|
||||
addBalanceReq.UserId = int32(userID)
|
||||
// 检查数据分析余量
|
||||
|
||||
1164
pkg/service/cast/report.go
Normal file
1164
pkg/service/cast/report.go
Normal file
File diff suppressed because it is too large
Load Diff
@ -12,7 +12,7 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func NewCtxWithUserInfo(ctx *gin.Context) (newCtx context.Context) {
|
||||
func NewCtxWithUserInfo(ctx *gin.Context, customVals ...string) (newCtx context.Context) {
|
||||
var userInfo = login.Info{}
|
||||
if config.AppConfig.System.AppMode == "prod" || config.AppConfig.System.AppMode == "test" {
|
||||
//_, ok := ctx.Get("jwtInfo")
|
||||
@ -37,6 +37,9 @@ func NewCtxWithUserInfo(ctx *gin.Context) (newCtx context.Context) {
|
||||
mm["userid"] = fmt.Sprintf("%d", userInfo.ID)
|
||||
mm["name"] = userInfo.Name
|
||||
mm["phone"] = userInfo.TelNum
|
||||
if len(customVals) > 0 {
|
||||
mm["name"] = customVals[0]
|
||||
}
|
||||
newCtx = context.WithValue(context.Background(), constant.DubboCtxKey("attachment"), mm)
|
||||
return
|
||||
}
|
||||
|
||||
@ -122,7 +122,6 @@ func UpdateWorkImageCore(ctx *gin.Context, req *cast.UpdateWorkImageReq) (*cast.
|
||||
//if _, err = CheckUserBundleBalance(int32(artistID), modelCast.BalanceTypeImageValue); err != nil {
|
||||
// return nil, err
|
||||
//}
|
||||
|
||||
// 处理内容中的标签:提取、验证并批量导入,以及自动生成标签
|
||||
content, err := processContentAndAutoTags(ctx, req.Content)
|
||||
if err != nil {
|
||||
@ -130,6 +129,7 @@ func UpdateWorkImageCore(ctx *gin.Context, req *cast.UpdateWorkImageReq) (*cast.
|
||||
}
|
||||
// 将自动生成标签后的内容更新到请求中
|
||||
req.Content = content
|
||||
zap.L().Debug("UpdateWorkImage infoResp3", zap.Any("infoResp", req))
|
||||
newCtx := NewCtxWithUserInfo(ctx)
|
||||
req.Source = 1
|
||||
resp, err := service.CastProvider.UpdateWorkImage(newCtx, req)
|
||||
@ -270,6 +270,7 @@ func processContentAndAutoTags(ctx *gin.Context, content string) (string, error)
|
||||
if resp.Post == "" {
|
||||
return content, nil
|
||||
}
|
||||
zap.L().Info("processContentAndAutoTags ", zap.Any("resp", resp))
|
||||
return resp.Post, nil
|
||||
}
|
||||
|
||||
@ -545,6 +546,12 @@ func CheckUserBundleBalance(userID int32, balanceType modelCast.BalanceTypeEnum,
|
||||
// err = errors.New(e.ErrorBalanceInsufficient)
|
||||
return
|
||||
}
|
||||
case modelCast.BalanceTypeCompetitiveValue:
|
||||
if resp.CompetitiveExtendNumber-resp.CompetitiveExtendConsumptionNumber <= 0 {
|
||||
err = errors.New("该艺人竞品数可用次数为0")
|
||||
// err = errors.New(e.ErrorBalanceInsufficient)
|
||||
return
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
@ -717,7 +724,7 @@ func PostAS(ctx context.Context, workUuid string, publishSource cast.PublishSour
|
||||
zap.L().Info("post 2", zap.Any("workUuid", workUuid))
|
||||
var mediaUrls []string
|
||||
var isVideo bool
|
||||
//var urlResp *UploadMediaResponse
|
||||
// var urlResp *UploadMediaResponse
|
||||
if workDetail.WorkCategory == 1 {
|
||||
isVideo = false
|
||||
// 先用服务器上的文件,不上传到第三方
|
||||
@ -1097,7 +1104,7 @@ func RefreshWorkApprovalStatus(ctx *gin.Context, approvalIDWorkUuidMap map[int]s
|
||||
for _, v := range approvalIDs {
|
||||
newData[v] = data[v]
|
||||
}
|
||||
newCtx := NewCtxWithUserInfo(ctx)
|
||||
newCtx := NewCtxWithUserInfo(ctx, "业务部门")
|
||||
if len(newData) > 0 {
|
||||
for approvalId, v := range newData {
|
||||
if v.ID == 0 {
|
||||
@ -1236,7 +1243,7 @@ func WorkListExport(ctx *gin.Context) {
|
||||
)
|
||||
var err error
|
||||
if err = ctx.ShouldBind(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
//service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
loginInfo := login.GetUserInfoFromC(ctx)
|
||||
@ -1244,7 +1251,7 @@ func WorkListExport(ctx *gin.Context) {
|
||||
lockKey := "WorkListExport" + fmt.Sprint(loginInfo.ID)
|
||||
replay := cache.RedisClient.SetNX(lockKey, time.Now().Unix(), time.Minute*30)
|
||||
if !replay.Val() {
|
||||
service.Error(ctx, errors.New("请勿重复导出"))
|
||||
//service.Error(ctx, errors.New("请勿重复导出"))
|
||||
return
|
||||
}
|
||||
defer cache.RedisClient.Del(lockKey)
|
||||
@ -1269,7 +1276,7 @@ func WorkListExport(ctx *gin.Context) {
|
||||
resp, err := service.CastProvider.WorkList(newCtx, req)
|
||||
if err != nil {
|
||||
zap.L().Error("获取作品列表失败", zap.Error(err), zap.Int32("page", page))
|
||||
service.Error(ctx, errors.New("获取数据失败"))
|
||||
//service.Error(ctx, errors.New("获取数据失败"))
|
||||
return
|
||||
}
|
||||
|
||||
@ -1294,7 +1301,7 @@ func WorkListExport(ctx *gin.Context) {
|
||||
req.PageSize = originalPageSize
|
||||
zap.L().Info("数据获取完成,开始生成Excel", zap.Int("总数据量", len(allData)))
|
||||
if len(allData) == 0 {
|
||||
service.Error(ctx, errors.New("没有可导出的数据"))
|
||||
//service.Error(ctx, errors.New("没有可导出的数据"))
|
||||
return
|
||||
}
|
||||
|
||||
@ -1302,7 +1309,7 @@ func WorkListExport(ctx *gin.Context) {
|
||||
excelFile, err := logicCastWork.ExportExcelWorkList(allData)
|
||||
if err != nil {
|
||||
zap.L().Error("生成Excel失败", zap.Error(err))
|
||||
service.Error(ctx, err)
|
||||
//service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
|
||||
@ -1567,6 +1574,7 @@ func ImportWorkBatch(ctx *gin.Context) {
|
||||
temp.ArtistPhoneAreaCode = subInfoResp.TelAreaCode
|
||||
temp.ArtistSubNum = subInfoResp.SubNum
|
||||
}
|
||||
|
||||
if len(row) > 7 {
|
||||
temp.Title = utils.CleanString(row[7])
|
||||
ok, _err := check.SecurityText(temp.Title)
|
||||
@ -1643,6 +1651,11 @@ func ImportWorkBatch(ctx *gin.Context) {
|
||||
req.ImageWorks = append(req.ImageWorks, temp)
|
||||
continue
|
||||
}
|
||||
if mediaInfoResp.Info.Expired != 1 {
|
||||
temp.Remark = fmt.Sprintf("TIKTOK账号名的套餐已过期")
|
||||
req.ImageWorks = append(req.ImageWorks, temp)
|
||||
continue
|
||||
}
|
||||
temp.PublishConfig1 = &cast.PublishConfig{
|
||||
ForbidComment: 1,
|
||||
PublicType: 1,
|
||||
@ -1667,6 +1680,11 @@ func ImportWorkBatch(ctx *gin.Context) {
|
||||
req.ImageWorks = append(req.ImageWorks, temp)
|
||||
continue
|
||||
}
|
||||
if mediaInfoResp.Info.Expired != 1 {
|
||||
temp.Remark = fmt.Sprintf("INS账号名的套餐已过期")
|
||||
req.ImageWorks = append(req.ImageWorks, temp)
|
||||
continue
|
||||
}
|
||||
temp.PublishConfig1 = &cast.PublishConfig{
|
||||
ForbidComment: 1,
|
||||
PublicType: 1,
|
||||
@ -1749,6 +1767,11 @@ func ImportWorkBatch(ctx *gin.Context) {
|
||||
req.ImageWorks = append(req.ImageWorks, temp)
|
||||
continue
|
||||
}
|
||||
if mediaInfoResp.Info.Expired != 1 {
|
||||
temp.Remark = fmt.Sprintf("Bluesky账号名的套餐已过期")
|
||||
req.ImageWorks = append(req.ImageWorks, temp)
|
||||
continue
|
||||
}
|
||||
temp.PublishConfig1 = &cast.PublishConfig{
|
||||
ForbidComment: 1,
|
||||
PublicType: 1,
|
||||
@ -2076,6 +2099,26 @@ func checkAndReuploadImage(imageUrl string, mediaType string) (string, error) {
|
||||
return compressUrl, nil
|
||||
}
|
||||
|
||||
// WorkListPublished 获取已发布的作品列表
|
||||
func WorkListPublished(ctx *gin.Context) {
|
||||
var (
|
||||
req *cast.WorkListPublishedReq
|
||||
resp *cast.WorkListPublishedResp
|
||||
)
|
||||
var err error
|
||||
if err = ctx.ShouldBind(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
newCtx := NewCtxWithUserInfo(ctx)
|
||||
resp, err = service.CastProvider.WorkListPublished(newCtx, req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
return
|
||||
}
|
||||
func ProcessImg(imgs []string) ([]string, error) {
|
||||
var newImgs []string
|
||||
for _, img := range imgs {
|
||||
@ -2110,3 +2153,22 @@ func ProcessImg(imgs []string) ([]string, error) {
|
||||
}
|
||||
return newImgs, nil
|
||||
}
|
||||
|
||||
func UpdateWorkScript(ctx *gin.Context) {
|
||||
var (
|
||||
req *cast.UpdateWorkScriptReq
|
||||
)
|
||||
var err error
|
||||
if err = ctx.ShouldBind(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
newCtx := NewCtxWithUserInfo(ctx)
|
||||
_, err = service.CastProvider.UpdateWorkScript(newCtx, req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, nil)
|
||||
return
|
||||
}
|
||||
|
||||
@ -178,6 +178,23 @@ func StartScheduleTask(c *gin.Context) {
|
||||
}
|
||||
service.Success(c, res)
|
||||
}
|
||||
func RepublishScheduleTask(c *gin.Context) {
|
||||
var req cron.CommonIDRequest
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, errors.New("参数错误"))
|
||||
return
|
||||
}
|
||||
res, err := service.CronProvider.RepublishScheduleTask(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, errors.New("网络超时,请重试"))
|
||||
return
|
||||
}
|
||||
if res.Code != 200 {
|
||||
service.Error(c, errors.New(res.Message))
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
func PauseScheduleTask(c *gin.Context) {
|
||||
var req cron.CommonIDRequest
|
||||
|
||||
238
pkg/service/customerContract/customerContract.go
Normal file
238
pkg/service/customerContract/customerContract.go
Normal file
@ -0,0 +1,238 @@
|
||||
package customerContract
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"fonchain-fiee/api/bundle"
|
||||
"fonchain-fiee/pkg/model"
|
||||
"fonchain-fiee/pkg/model/login"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/service/upload"
|
||||
"fonchain-fiee/pkg/utils"
|
||||
"path"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
uuid "github.com/satori/go.uuid"
|
||||
)
|
||||
|
||||
// GetCustomerList 客户列表
|
||||
func GetCustomerList(ctx *gin.Context) {
|
||||
var req *bundle.CustomerListRequest
|
||||
if err := ctx.ShouldBind(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
// 如果客户名称不为空,就清除前后空格
|
||||
if req.CustomerName != "" {
|
||||
req.CustomerName = strings.TrimSpace(req.CustomerName)
|
||||
}
|
||||
if req.ReferralPerson != "" {
|
||||
req.ReferralPerson = strings.TrimSpace(req.ReferralPerson)
|
||||
}
|
||||
resp, err := service.BundleProvider.GetCustomerList(ctx, req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
// GetCustomerDetail 客户详情
|
||||
func GetCustomerDetail(ctx *gin.Context) {
|
||||
var req *bundle.CustomerDetailRequest
|
||||
if err := ctx.ShouldBind(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.BundleProvider.GetCustomerDetail(ctx, req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
// UpdateCustomer 更新客户
|
||||
func UpdateCustomer(ctx *gin.Context) {
|
||||
var req *bundle.CustomerUpdateRequest
|
||||
if err := ctx.ShouldBind(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
// 从token中获取用户信息
|
||||
user := login.GetUserInfoFromC(ctx)
|
||||
req.Customer.Operator = user.Name
|
||||
req.Customer.OperatorID = strconv.FormatUint(uint64(user.ID), 10)
|
||||
req.Customer.OperatorNum = user.TelNum
|
||||
resp, err := service.BundleProvider.UpdateCustomer(ctx, req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
// GetReferralPersonList 获取推荐人列表,支持关键字模糊查询
|
||||
func GetReferralPersonList(ctx *gin.Context) {
|
||||
var req *bundle.ReferralPersonListRequest
|
||||
if err := ctx.ShouldBind(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
if req.Keyword != "" {
|
||||
req.Keyword = strings.TrimSpace(req.Keyword)
|
||||
}
|
||||
resp, err := service.BundleProvider.GetReferralPersonList(ctx, req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
// GetContractList 合同列表
|
||||
func GetContractList(ctx *gin.Context) {
|
||||
var req *bundle.ContractListRequest
|
||||
if err := ctx.ShouldBind(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
if req.ContractName != "" {
|
||||
req.ContractName = strings.TrimSpace(req.ContractName)
|
||||
}
|
||||
if req.ProjectName != "" {
|
||||
req.ProjectName = strings.TrimSpace(req.ProjectName)
|
||||
}
|
||||
if req.CustomerName != "" {
|
||||
req.CustomerName = strings.TrimSpace(req.CustomerName)
|
||||
}
|
||||
resp, err := service.BundleProvider.GetContractList(ctx, req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
// GetContractDetail 合同详情
|
||||
func GetContractDetail(ctx *gin.Context) {
|
||||
var req *bundle.ContractDetailRequest
|
||||
if err := ctx.ShouldBind(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.BundleProvider.GetContractDetail(ctx, req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
// UpdateContract 更新合同
|
||||
func UpdateContract(ctx *gin.Context) {
|
||||
var req *bundle.ContractUpdateRequest
|
||||
if err := ctx.ShouldBind(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
// 从token中获取用户信息
|
||||
user := login.GetUserInfoFromC(ctx)
|
||||
req.Contract.Operator = user.Name
|
||||
req.Contract.OperatorID = strconv.FormatUint(uint64(user.ID), 10)
|
||||
req.Contract.OperatorNum = user.TelNum
|
||||
resp, err := service.BundleProvider.UpdateContract(ctx, req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
// GetDevelopmentCyclesByContractUUID 根据合同UUID获取开发周期列表
|
||||
func GetDevelopmentCyclesByContractUUID(ctx *gin.Context) {
|
||||
var req *bundle.GetDevelopmentCyclesByContractUUIDRequest
|
||||
if err := ctx.ShouldBind(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.BundleProvider.GetDevelopmentCyclesByContractUUID(ctx, req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
// GetPaymentCyclesByContractUUID 根据合同UUID获取付款周期列表
|
||||
func GetPaymentCyclesByContractUUID(ctx *gin.Context) {
|
||||
var req *bundle.GetPaymentCyclesByContractUUIDRequest
|
||||
if err := ctx.ShouldBind(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.BundleProvider.GetPaymentCyclesByContractUUID(ctx, req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
// 合同附件允许的扩展名:word、pdf、excel
|
||||
var allowedAttachmentExt = map[string]bool{
|
||||
".doc": true, ".docx": true,
|
||||
".pdf": true,
|
||||
".xls": true, ".xlsx": true,
|
||||
}
|
||||
|
||||
const maxAttachmentSize = 50 * 1024 * 1024 // 50M
|
||||
|
||||
// UploadContractAttachment 上传合同附件,仅支持 word/pdf/excel,单文件不超过 50M,上传后写入 OSS 并返回访问 URL
|
||||
func UploadContractAttachment(ctx *gin.Context) {
|
||||
file, err := ctx.FormFile("file")
|
||||
if err != nil {
|
||||
service.Error(ctx, errors.New("请选择要上传的文件"))
|
||||
return
|
||||
}
|
||||
// 校验大小:不超过 50M
|
||||
if file.Size > maxAttachmentSize {
|
||||
service.Error(ctx, errors.New("单个文件大小不超过50M"))
|
||||
return
|
||||
}
|
||||
ext := strings.ToLower(path.Ext(file.Filename))
|
||||
if !allowedAttachmentExt[ext] {
|
||||
service.Error(ctx, errors.New("仅支持 Word、PDF、Excel 格式"))
|
||||
return
|
||||
}
|
||||
// 本地临时目录:runtime/contract/attachment/(使用 / 以与 PutBos 内 model.MediaPath 替换一致)
|
||||
basePath := model.MediaPath + "contract/attachment"
|
||||
if _, err = utils.CheckDirPath(basePath, true); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
// 对象名:上传的文件名_UUID.扩展名,便于识别且不重名
|
||||
originalBase := path.Base(file.Filename)
|
||||
nameWithoutExt := strings.TrimSuffix(originalBase, ext)
|
||||
nameWithoutExt = strings.ReplaceAll(strings.ReplaceAll(nameWithoutExt, "/", "_"), "\\", "_")
|
||||
newUuid, _ := uuid.NewV4()
|
||||
var filename string
|
||||
if nameWithoutExt == "" {
|
||||
filename = fmt.Sprintf("%s%s", newUuid.String(), ext)
|
||||
} else {
|
||||
filename = fmt.Sprintf("%s_%s%s", nameWithoutExt, newUuid.String(), ext)
|
||||
}
|
||||
dst := basePath + "/" + filename
|
||||
if err = ctx.SaveUploadedFile(file, dst); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
url, err := upload.PutBos(dst, "attachment", true)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, gin.H{"url": url})
|
||||
}
|
||||
38
pkg/service/emailAlerts/emailAlerts.go
Normal file
38
pkg/service/emailAlerts/emailAlerts.go
Normal file
@ -0,0 +1,38 @@
|
||||
package emailalerts
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fonchain-fiee/api/emailAlerts"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/service/bundle/common"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func EmailAlertSubmit(ctx *gin.Context) {
|
||||
var req emailAlerts.EmailAlertsSubmitReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.EmailAlertsProvider.EmailAlertsSubmit(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, errors.New(common.ErrorEmailAlertSubmitFailed))
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func GetEmailInformationList(ctx *gin.Context) {
|
||||
var req emailAlerts.GetEmailInformationListReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.EmailAlertsProvider.GetEmailInformationList(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, errors.New(common.ErrorGetEmailInformationListFailed))
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
@ -47,7 +47,12 @@ func Delete(ctx *gin.Context) {
|
||||
}
|
||||
|
||||
func Display(ctx *gin.Context) {
|
||||
resp, err := service.GovernanceProvider.Display(ctx, &governance.DisplayReq{})
|
||||
var req governance.DisplayReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.GovernanceProvider.Display(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, errors.New(common.DisplayGovernanceFailed))
|
||||
return
|
||||
@ -85,3 +90,34 @@ func Edit(ctx *gin.Context) {
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func UpdataStatus(ctx *gin.Context) {
|
||||
var req governance.UpdataStatusReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
user := login.GetUserInfoFromC(ctx)
|
||||
req.Operator = user.Name
|
||||
req.OperatorId = int32(user.ID)
|
||||
resp, err := service.GovernanceProvider.UpdataStatus(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func GetGovernanceInfo(ctx *gin.Context) {
|
||||
var req governance.GetGovernanceInfoReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.GovernanceProvider.GetGovernanceInfo(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
@ -297,35 +297,36 @@ func (p *BatchProcessor) submitTask(req *excelData) error {
|
||||
if !tiktokFound {
|
||||
return fmt.Errorf("未找到匹配的TikTok账号: %s", req.TikTok)
|
||||
}
|
||||
|
||||
// 获取 Instagram 自媒体账号
|
||||
accountListIns, err := service.CastProvider.MediaUserList(context.Background(), &apiCast.MediaUserListReq{
|
||||
ArtistVal: req.ArtistName,
|
||||
PlatformID: 3,
|
||||
Page: 1,
|
||||
PageSize: 10,
|
||||
ArtistUuid: strconv.FormatUint(list.UserList[0].Id, 10),
|
||||
})
|
||||
if err != nil {
|
||||
return fmt.Errorf("获取 Instagram 账号失败: %s", err.Error())
|
||||
}
|
||||
if accountListIns == nil || len(accountListIns.Data) == 0 {
|
||||
return fmt.Errorf("ins自媒体账号数量为0")
|
||||
}
|
||||
// 查找 Instagram 账号
|
||||
insFound := false
|
||||
for _, user := range accountListIns.Data {
|
||||
if user.PlatformUserName == req.Instagram {
|
||||
req.MediaAccountNames = append(req.MediaAccountNames, user.PlatformUserName)
|
||||
req.MediaAccountUuids = append(req.MediaAccountUuids, user.MediaAccountUuid)
|
||||
insFound = true
|
||||
break
|
||||
if req.Instagram != "" {
|
||||
// 获取 Instagram 自媒体账号
|
||||
accountListIns, err := service.CastProvider.MediaUserList(context.Background(), &apiCast.MediaUserListReq{
|
||||
ArtistVal: req.ArtistName,
|
||||
PlatformID: 3,
|
||||
Page: 1,
|
||||
PageSize: 10,
|
||||
ArtistUuid: strconv.FormatUint(list.UserList[0].Id, 10),
|
||||
})
|
||||
if err != nil {
|
||||
return fmt.Errorf("获取 Instagram 账号失败: %s", err.Error())
|
||||
}
|
||||
if accountListIns == nil || len(accountListIns.Data) == 0 {
|
||||
return fmt.Errorf("ins自媒体账号数量为0")
|
||||
}
|
||||
// 查找 Instagram 账号
|
||||
insFound := false
|
||||
for _, user := range accountListIns.Data {
|
||||
if user.PlatformUserName == req.Instagram {
|
||||
req.MediaAccountNames = append(req.MediaAccountNames, user.PlatformUserName)
|
||||
req.MediaAccountUuids = append(req.MediaAccountUuids, user.MediaAccountUuid)
|
||||
insFound = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !insFound {
|
||||
return fmt.Errorf("未找到匹配的Instagram账号: %s", req.Instagram)
|
||||
}
|
||||
}
|
||||
if !insFound {
|
||||
return fmt.Errorf("未找到匹配的Instagram账号: %s", req.Instagram)
|
||||
}
|
||||
|
||||
}
|
||||
// 获取 Bluesky 自媒体账号
|
||||
accountListBlueSky, err := service.CastProvider.MediaUserList(context.Background(), &apiCast.MediaUserListReq{
|
||||
ArtistVal: req.ArtistName,
|
||||
|
||||
@ -8,11 +8,14 @@ import (
|
||||
"fonchain-fiee/api/bundle"
|
||||
"fonchain-fiee/api/cast"
|
||||
"fonchain-fiee/api/cron"
|
||||
"fonchain-fiee/api/emailAlerts"
|
||||
"fonchain-fiee/api/files"
|
||||
"fonchain-fiee/api/governance"
|
||||
"fonchain-fiee/api/members"
|
||||
"fonchain-fiee/api/order"
|
||||
"fonchain-fiee/api/payment"
|
||||
"fonchain-fiee/api/pressreleases"
|
||||
"fonchain-fiee/api/reports"
|
||||
"fonchain-fiee/api/secFilings"
|
||||
"fonchain-fiee/api/supplier"
|
||||
pkConfig "fonchain-fiee/pkg/config"
|
||||
@ -36,6 +39,9 @@ var PressReleasesProvider = new(pressreleases.PressReleasesClientImpl)
|
||||
var SecFilingProvider = new(secFilings.SecFilingsClientImpl)
|
||||
var AyrshareProvider = new(aryshare.AyrshareClientImpl)
|
||||
var CronProvider = new(cron.CronClientImpl)
|
||||
var ReportsProvider = new(reports.ReportsClientImpl)
|
||||
var EmailAlertsProvider = new(emailAlerts.EmailAlertsClientImpl)
|
||||
var MembersProvider = new(members.MembersClientImpl)
|
||||
var SupplierProvider = new(supplier.SupplierClientImpl)
|
||||
|
||||
func init() {
|
||||
@ -49,6 +55,9 @@ func init() {
|
||||
config.SetConsumerService(GovernanceProvider)
|
||||
config.SetConsumerService(PressReleasesProvider)
|
||||
config.SetConsumerService(SecFilingProvider)
|
||||
config.SetConsumerService(ReportsProvider)
|
||||
config.SetConsumerService(EmailAlertsProvider)
|
||||
config.SetConsumerService(MembersProvider)
|
||||
config.SetConsumerService(AyrshareProvider)
|
||||
config.SetConsumerService(CronProvider)
|
||||
config.SetConsumerService(SupplierProvider)
|
||||
|
||||
136
pkg/service/invoice/inovice.go
Normal file
136
pkg/service/invoice/inovice.go
Normal file
@ -0,0 +1,136 @@
|
||||
package invoice
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"fonchain-fiee/pkg/service/upload"
|
||||
|
||||
"dubbo.apache.org/dubbo-go/v3/common/logger"
|
||||
"github.com/signintech/gopdf"
|
||||
)
|
||||
|
||||
func MakeInvoice(invoiceNo, customerName, address, phone, bundleName, spec, priceType, totalAmount, transactionDate, invoiceDate string) (string, error) {
|
||||
pdf := gopdf.GoPdf{}
|
||||
pdf.Start(gopdf.Config{PageSize: *gopdf.PageSizeA4})
|
||||
|
||||
templatePath := "./data/invoice.pdf"
|
||||
|
||||
// 导入模板文件中的页面
|
||||
err := pdf.ImportPagesFromSource(templatePath, "/MediaBox")
|
||||
if err != nil {
|
||||
logger.Fatalf("无法导入页面: %v", err)
|
||||
return "", errors.New("error loading template PDF")
|
||||
}
|
||||
|
||||
// 获取模板文件的总页数
|
||||
totalPages := pdf.GetNumberOfPages()
|
||||
fmt.Printf("模板文件的总页数: %d\n", totalPages)
|
||||
|
||||
customerPage := 1
|
||||
|
||||
// 生成 发票编号
|
||||
// JP-ART- + time.Now().Format("20060102") + 7 位随机数
|
||||
//invoiceNo := fmt.Sprintf("JP-ART-%s%s", time.Now().Format("20060102"))
|
||||
|
||||
tffErr := pdf.AddTTFFont("SourceHanSansSC-VF", "./data/SourceHanSansSC-VF.ttf")
|
||||
if tffErr != nil {
|
||||
logger.Fatalf("加载中文字体失败: %v", tffErr)
|
||||
return "", errors.New("error loading font")
|
||||
}
|
||||
|
||||
// 设置字体和字号
|
||||
err = pdf.SetFont("SourceHanSansSC-VF", "", 12)
|
||||
if err != nil {
|
||||
logger.Fatalf("设置字体失败: %v", err)
|
||||
return "", errors.New("error setting font")
|
||||
}
|
||||
|
||||
// 填 用户信息
|
||||
pdf.SetPage(customerPage)
|
||||
|
||||
pdf.SetX(443)
|
||||
pdf.SetY(95)
|
||||
pdf.Cell(nil, invoiceNo)
|
||||
|
||||
pdf.SetX(80)
|
||||
pdf.SetY(162)
|
||||
pdf.Cell(nil, customerName)
|
||||
|
||||
const (
|
||||
addressX = 90
|
||||
addressStartY = 182
|
||||
addressLineH = 20 // 行高,按模板微调
|
||||
maxAddressRunes = 16 // 每行最多字符数,按模板宽度调
|
||||
)
|
||||
|
||||
lines := splitStringByRune(address, maxAddressRunes)
|
||||
for i, line := range lines {
|
||||
pdf.SetX(addressX)
|
||||
pdf.SetY(addressStartY + float64(i)*addressLineH)
|
||||
pdf.Cell(nil, line)
|
||||
}
|
||||
|
||||
pdf.SetX(70)
|
||||
pdf.SetY(268)
|
||||
pdf.Cell(nil, phone)
|
||||
|
||||
pdf.SetX(80)
|
||||
pdf.SetY(345)
|
||||
pdf.Cell(nil, bundleName)
|
||||
|
||||
pdf.SetX(310)
|
||||
pdf.SetY(345)
|
||||
pdf.Cell(nil, spec)
|
||||
|
||||
pdf.SetX(410)
|
||||
pdf.SetY(345)
|
||||
pdf.Cell(nil, priceType+" "+totalAmount)
|
||||
|
||||
pdf.SetX(437)
|
||||
pdf.SetY(388)
|
||||
pdf.Cell(nil, priceType+" "+totalAmount)
|
||||
|
||||
pdf.SetX(125)
|
||||
pdf.SetY(772)
|
||||
pdf.Cell(nil, transactionDate)
|
||||
|
||||
pdf.SetX(495)
|
||||
pdf.SetY(772)
|
||||
pdf.Cell(nil, invoiceDate)
|
||||
|
||||
outputPath := fmt.Sprintf("./data/invoice_%s.pdf", invoiceNo)
|
||||
|
||||
// 生成新的 PDF
|
||||
if err = pdf.WritePdf(outputPath); err != nil {
|
||||
//zap.L().Error("WritePdf err", zap.Error(err))
|
||||
return "", errors.New("error writing final PDF")
|
||||
}
|
||||
fmt.Println("生成发票成功,开始上传oss")
|
||||
// 上传 至 oss
|
||||
ossUrl, err := upload.PutBos(outputPath, "fieeInvoice", true)
|
||||
if err != nil {
|
||||
//zap.L().Error("UploadFileToOss err", zap.Error(err))
|
||||
return "", errors.New("error uploading PDF to OSS")
|
||||
}
|
||||
logger.Infof("Agreement uploaded to OSS: %s", ossUrl)
|
||||
|
||||
return ossUrl, nil
|
||||
}
|
||||
|
||||
// 按每行最大字符数拆分,中文、英文都按 1 个 rune 计
|
||||
func splitStringByRune(s string, maxRunesPerLine int) []string {
|
||||
runes := []rune(s)
|
||||
if len(runes) <= maxRunesPerLine {
|
||||
return []string{s}
|
||||
}
|
||||
var lines []string
|
||||
for i := 0; i < len(runes); i += maxRunesPerLine {
|
||||
end := i + maxRunesPerLine
|
||||
if end > len(runes) {
|
||||
end = len(runes)
|
||||
}
|
||||
lines = append(lines, string(runes[i:end]))
|
||||
}
|
||||
return lines
|
||||
}
|
||||
319
pkg/service/members/members.go
Normal file
319
pkg/service/members/members.go
Normal file
@ -0,0 +1,319 @@
|
||||
package members
|
||||
|
||||
import (
|
||||
"fonchain-fiee/api/members"
|
||||
"fonchain-fiee/pkg/model/login"
|
||||
"fonchain-fiee/pkg/service"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// =======================成员管理==============================
|
||||
func AddManagement(ctx *gin.Context) {
|
||||
var req members.AddManagementReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
user := login.GetUserInfoFromC(ctx)
|
||||
req.Operator = user.Name
|
||||
req.OperatorId = int32(user.ID)
|
||||
resp, err := service.MembersProvider.AddManagement(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
func GetManagementList(ctx *gin.Context) {
|
||||
var req members.GetManagementListReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.MembersProvider.GetManagementList(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
func GetManagementInfo(ctx *gin.Context) {
|
||||
var req members.GetManagementInfoReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.MembersProvider.GetManagementInfo(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
func DeleteManagement(ctx *gin.Context) {
|
||||
var req members.DeleteManagementReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.MembersProvider.DeleteManagement(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func UpdataManagement(ctx *gin.Context) {
|
||||
var req members.SortAndStatusManagementReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
user := login.GetUserInfoFromC(ctx)
|
||||
req.Operator = user.Name
|
||||
req.OperatorId = int32(user.ID)
|
||||
resp, err := service.MembersProvider.SortAndStatusManagement(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
func EditManagement(ctx *gin.Context) {
|
||||
var req members.EditManagementReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
user := login.GetUserInfoFromC(ctx)
|
||||
req.Operator = user.Name
|
||||
req.OperatorId = int32(user.ID)
|
||||
resp, err := service.MembersProvider.EditManagement(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
func DisplayManagement(ctx *gin.Context) {
|
||||
var req members.DisplayManagementReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.MembersProvider.DisplayManagement(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
// ======================董事会管理===========================
|
||||
func AddBoardOfDirectors(ctx *gin.Context) {
|
||||
var req members.AddBoardOfDirectorsReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
user := login.GetUserInfoFromC(ctx)
|
||||
req.Operator = user.Name
|
||||
req.OperatorId = int32(user.ID)
|
||||
resp, err := service.MembersProvider.AddBoardOfDirectors(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func GetBoardOfDirectorsList(ctx *gin.Context) {
|
||||
var req members.GetBoardOfDirectorsListReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.MembersProvider.GetBoardOfDirectorsList(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
func GetBoardOfDirectorsInfo(ctx *gin.Context) {
|
||||
var req members.GetBoardOfDirectorsInfoReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.MembersProvider.GetBoardOfDirectorsInfo(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
func DeleteBoardOfDirectors(ctx *gin.Context) {
|
||||
var req members.DeleteBoardOfDirectorsReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.MembersProvider.DeleteBoardOfDirectors(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func UpdataBoardOfDirectors(ctx *gin.Context) {
|
||||
var req members.SortAndStatusBoardOfDirectorsReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
user := login.GetUserInfoFromC(ctx)
|
||||
req.Operator = user.Name
|
||||
req.OperatorId = int32(user.ID)
|
||||
resp, err := service.MembersProvider.SortAndStatusBoardOfDirectors(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
func EditBoardOfDirectors(ctx *gin.Context) {
|
||||
var req members.EditBoardOfDirectorsReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
user := login.GetUserInfoFromC(ctx)
|
||||
req.Operator = user.Name
|
||||
req.OperatorId = int32(user.ID)
|
||||
resp, err := service.MembersProvider.EditBoardOfDirectors(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
func DisplayBoardOfDirectors(ctx *gin.Context) {
|
||||
var req members.DisplayBoardOfDirectorsReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.MembersProvider.DisplayBoardOfDirectors(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
// ======================委员会任命管理===========================
|
||||
func AddCommitteeAppointments(ctx *gin.Context) {
|
||||
var req members.AddCommitteeAppointmentsReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
user := login.GetUserInfoFromC(ctx)
|
||||
req.Operator = user.Name
|
||||
req.OperatorId = int32(user.ID)
|
||||
resp, err := service.MembersProvider.AddCommitteeAppointments(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
func GetCommitteeAppointmentsList(ctx *gin.Context) {
|
||||
var req members.GetCommitteeAppointmentsListReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.MembersProvider.GetCommitteeAppointmentsList(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
func GetCommitteeAppointmentsInfo(ctx *gin.Context) {
|
||||
var req members.GetCommitteeAppointmentsInfoReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.MembersProvider.GetCommitteeAppointmentsInfo(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
func DeleteCommitteeAppointments(ctx *gin.Context) {
|
||||
var req members.DeleteCommitteeAppointmentsReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.MembersProvider.DeleteCommitteeAppointments(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
func UpdataCommitteeAppointments(ctx *gin.Context) {
|
||||
var req members.SortAndStatusCommitteeAppointmentsReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
user := login.GetUserInfoFromC(ctx)
|
||||
req.Operator = user.Name
|
||||
req.OperatorId = int32(user.ID)
|
||||
resp, err := service.MembersProvider.SortAndStatusCommitteeAppointments(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
func EditCommitteeAppointments(ctx *gin.Context) {
|
||||
var req members.EditCommitteeAppointmentsReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
user := login.GetUserInfoFromC(ctx)
|
||||
req.Operator = user.Name
|
||||
req.OperatorId = int32(user.ID)
|
||||
resp, err := service.MembersProvider.EditCommitteeAppointments(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func DisplayCommitteeAppointments(ctx *gin.Context) {
|
||||
var req members.DisplayCommitteeAppointmentsReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.MembersProvider.DisplayCommitteeAppointments(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
@ -2,14 +2,12 @@ package pressreleases
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"strconv"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"fonchain-fiee/api/pressreleases"
|
||||
"fonchain-fiee/pkg/model/login"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/service/bundle/common"
|
||||
)
|
||||
|
||||
func Create(ctx *gin.Context) {
|
||||
@ -23,7 +21,7 @@ func Create(ctx *gin.Context) {
|
||||
req.OperatorId = int32(user.ID)
|
||||
resp, err := service.PressReleasesProvider.Create(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, errors.New(common.CreatePressReleasesFailed))
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
@ -37,7 +35,7 @@ func Delete(ctx *gin.Context) {
|
||||
}
|
||||
resp, err := service.PressReleasesProvider.Delete(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, errors.New(common.DisplayPressReleasesFailed))
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
@ -49,9 +47,41 @@ func Display(ctx *gin.Context) {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
if req.LangType == "" {
|
||||
service.Error(ctx, errors.New("语言类型为空"))
|
||||
return
|
||||
}
|
||||
resp, err := service.PressReleasesProvider.Display(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, errors.New(common.ListPressReleasesFailed))
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func SortAndStatus(ctx *gin.Context) {
|
||||
var req pressreleases.SortAndStatusReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.PressReleasesProvider.SortAndStatus(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func Info(ctx *gin.Context) {
|
||||
var req pressreleases.InfoReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.PressReleasesProvider.Info(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
@ -65,7 +95,7 @@ func List(ctx *gin.Context) {
|
||||
}
|
||||
resp, err := service.PressReleasesProvider.List(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, errors.New(common.EditPressReleasesFailed))
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
@ -82,24 +112,30 @@ func Edit(ctx *gin.Context) {
|
||||
req.OperatorId = int32(user.ID)
|
||||
resp, err := service.PressReleasesProvider.Edit(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, errors.New(common.EditPressReleasesFailed))
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func Get(ctx *gin.Context) {
|
||||
id, err := strconv.Atoi(ctx.Query("id"))
|
||||
var req pressreleases.GetReq
|
||||
uuid := ctx.Query("uuid")
|
||||
if uuid == "" {
|
||||
service.Error(ctx, errors.New("uuid 参数不能为空"))
|
||||
return
|
||||
}
|
||||
langType := ctx.Query("langType")
|
||||
if langType == "" {
|
||||
service.Error(ctx, errors.New("langType 参数不能为空"))
|
||||
return
|
||||
}
|
||||
req.Uuid = uuid
|
||||
req.LangType = langType
|
||||
resp, err := service.PressReleasesProvider.Get(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.PressReleasesProvider.Get(ctx, &pressreleases.GetReq{
|
||||
Id: int64(id),
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(ctx, errors.New(common.GetPressReleasesFailed))
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
132
pkg/service/reports/annualReports.go
Normal file
132
pkg/service/reports/annualReports.go
Normal file
@ -0,0 +1,132 @@
|
||||
package reports
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fonchain-fiee/api/reports"
|
||||
"fonchain-fiee/pkg/model/login"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/service/bundle/common"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func AnnualReportCreate(ctx *gin.Context) {
|
||||
var req reports.AddAnnualReportReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
user := login.GetUserInfoFromC(ctx)
|
||||
req.Operator = user.Name
|
||||
req.OperatorId = int32(user.ID)
|
||||
resp, err := service.ReportsProvider.AddAnnualReport(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, errors.New(common.ErrorCreateReportFailed))
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
// 修改年度报告排序和状态
|
||||
func AnnualReportSortAndStatus(ctx *gin.Context) {
|
||||
var req reports.SortAndStatusAnnualReportReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.ReportsProvider.SortAndStatusAnnualReport(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
// 获取年度报告信息
|
||||
func AnnualReportInfo(ctx *gin.Context) {
|
||||
var req reports.GetAnnualReportInfoReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.ReportsProvider.GetAnnualReportInfo(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
// 获取年度报告列表
|
||||
func AnnualReportList(ctx *gin.Context) {
|
||||
var req reports.GetAnnualReportListReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.ReportsProvider.GetAnnualReportList(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, errors.New(common.ErrorListReportFailed))
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func AnnualReportDelete(ctx *gin.Context) {
|
||||
var req reports.DeleteAnnualReportReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.ReportsProvider.DeleteAnnualReport(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, errors.New(common.ErrorDeleteReportFailed))
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func AnnualReportEdit(ctx *gin.Context) {
|
||||
var req reports.EditAnnualReportReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
user := login.GetUserInfoFromC(ctx)
|
||||
req.Operator = user.Name
|
||||
req.OperatorId = int32(user.ID)
|
||||
resp, err := service.ReportsProvider.EditAnnualReport(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, errors.New(common.ErrorEditReportFailed))
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func AnnualReportDisplay(ctx *gin.Context) {
|
||||
var req reports.DisplayAnnualReportReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.ReportsProvider.DisplayAnnualReport(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, errors.New(common.ErrorDisplayReportFailed))
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func QuarterlyReportDisplay(ctx *gin.Context) {
|
||||
var req reports.DisplayQuarterlyReportReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.ReportsProvider.DisplayQuarterlyReport(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, errors.New(common.ErrorDisplayReportFailed))
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
103
pkg/service/reports/quarterlyReports.go
Normal file
103
pkg/service/reports/quarterlyReports.go
Normal file
@ -0,0 +1,103 @@
|
||||
package reports
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fonchain-fiee/api/reports"
|
||||
"fonchain-fiee/pkg/model/login"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/service/bundle/common"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func QuarterlyReportCreate(ctx *gin.Context) {
|
||||
var req reports.AddQuarterlyReportReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
user := login.GetUserInfoFromC(ctx)
|
||||
req.Operator = user.Name
|
||||
req.OperatorId = int32(user.ID)
|
||||
resp, err := service.ReportsProvider.AddQuarterlyReport(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, errors.New(common.ErrorCreateReportFailed))
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
// 修改季度报告排序和状态
|
||||
func QuarterlyReportSortAndStatus(ctx *gin.Context) {
|
||||
var req reports.SortAndStatusQuarterlyReportReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.ReportsProvider.SortAndStatusQuarterlyReport(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
// 获取季度报告信息
|
||||
func QuarterlyReportInfo(ctx *gin.Context) {
|
||||
var req reports.GetQuarterlyReportInfoReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.ReportsProvider.GetQuarterlyReportInfo(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func QuarterlyReportList(ctx *gin.Context) {
|
||||
var req reports.GetQuarterlyReportListReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.ReportsProvider.GetQuarterlyReportList(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, errors.New(common.ErrorListReportFailed))
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func QuarterlyReportDelete(ctx *gin.Context) {
|
||||
var req reports.DeleteQuarterlyReportReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.ReportsProvider.DeleteQuarterlyReport(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, errors.New(common.ErrorDeleteReportFailed))
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func QuarterlyReportEdit(ctx *gin.Context) {
|
||||
var req reports.EditQuarterlyReportReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
user := login.GetUserInfoFromC(ctx)
|
||||
req.Operator = user.Name
|
||||
req.OperatorId = int32(user.ID)
|
||||
resp, err := service.ReportsProvider.EditQuarterlyReport(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, errors.New(common.ErrorEditReportFailed))
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
@ -22,23 +22,6 @@ import (
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
// GetPendingTaskList 查询待指派任务记录
|
||||
func GetPendingTaskList(c *gin.Context) {
|
||||
var req bundle.TaskQueryRequest
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
res, err := service.BundleProvider.GetPendingTaskList(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
func GetPendingTaskLayout(c *gin.Context) {
|
||||
res, err := service.BundleProvider.GetPendingTaskLayout(context.Background(), &bundle.GetPendingTaskLayoutReq{})
|
||||
if err != nil {
|
||||
@ -144,26 +127,6 @@ func BatchTerminateTask(c *gin.Context) {
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
// UpdatePendingCount 修改待发数量
|
||||
func UpdatePendingCount(c *gin.Context) {
|
||||
var req bundle.UpdatePendingCountRequest
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
userInfo := login.GetUserInfoFromC(c)
|
||||
req.OperatorNum = userInfo.TelNum
|
||||
req.Operator = userInfo.Name
|
||||
|
||||
res, err := service.BundleProvider.UpdatePendingCount(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
// GetRecentAssignRecords 查询最近被指派记录
|
||||
func GetRecentAssignRecords(c *gin.Context) {
|
||||
var req bundle.RecentAssignRecordsRequest
|
||||
@ -238,23 +201,6 @@ func CompleteTaskManually(c *gin.Context) {
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
// UpdateTaskProgress 员工实际完成任务状态更新
|
||||
func UpdateTaskProgress(c *gin.Context) {
|
||||
var req bundle.UpdateTaskProgressRequest
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
res, err := service.BundleProvider.UpdateTaskProgress(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
// GetTaskAssignRecordsList 多条件查询操作记录表
|
||||
func GetTaskAssignRecordsList(c *gin.Context) {
|
||||
var req bundle.TaskAssignRecordsQueryRequest
|
||||
@ -532,23 +478,6 @@ func UpdateWorkVideoWithUUID(ctx *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
// GetArtistBundleBalance 查询艺人套餐剩余数量
|
||||
func GetArtistBundleBalance(c *gin.Context) {
|
||||
var req bundle.ArtistBundleBalanceRequest
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
res, err := service.BundleProvider.GetArtistBundleBalance(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
// GetArtistUploadStatsList 查询艺人待上传列表
|
||||
func GetArtistUploadStatsList(c *gin.Context) {
|
||||
var req bundle.TaskQueryRequest
|
||||
@ -566,22 +495,6 @@ func GetArtistUploadStatsList(c *gin.Context) {
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
func GetPendingUploadBreakdown(c *gin.Context) {
|
||||
var req bundle.PendingUploadBreakdownRequest
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
res, err := service.BundleProvider.GetPendingUploadBreakdown(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
// GetArtistUploadStatsListDownload 导出艺人待上传列表为Excel
|
||||
func GetArtistUploadStatsListDownload(c *gin.Context) {
|
||||
var req bundle.TaskQueryRequest
|
||||
@ -718,7 +631,7 @@ func UpdateVideoScriptWithUUID(ctx *gin.Context) {
|
||||
TelNum: infoResp.TelNum,
|
||||
ArtistName: infoResp.Name,
|
||||
OperationType: 3, // 3:完成任务
|
||||
TaskType: 1, // 1:视频(脚本属于视频类型)
|
||||
TaskType: 4, // 4:视频脚本
|
||||
TaskCount: 1,
|
||||
OperatorName: userInfo.Name,
|
||||
OperatorNum: userInfo.TelNum,
|
||||
|
||||
78
pkg/service/upload/bos.go
Normal file
78
pkg/service/upload/bos.go
Normal file
@ -0,0 +1,78 @@
|
||||
package upload
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/fonchain_enterprise/utils/objstorage"
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
type OssVal struct {
|
||||
obj objstorage.API
|
||||
bos Bos
|
||||
}
|
||||
|
||||
var ossObj OssVal
|
||||
|
||||
// Oss 对象存储配置信息
|
||||
type Bos struct {
|
||||
AccessKeyId string
|
||||
AccessKeySecret string
|
||||
Endpoint string
|
||||
Host string
|
||||
CdnHost string
|
||||
BucketName string
|
||||
BosBaseDir string
|
||||
}
|
||||
|
||||
func LoadEnv(bos Bos) (err error) {
|
||||
v, err := objstorage.NewBOS(bos.AccessKeyId, bos.AccessKeySecret, bos.Endpoint)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
ossObj.bos = bos
|
||||
ossObj.obj = v
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// UploadLocal 上传本地
|
||||
// UploadLocal("art_block_chain/files/artwork/1.png")
|
||||
func UploadLocal(ossFile string, localFile string) (string, error) {
|
||||
api := ossObj.obj
|
||||
ossConfig := ossObj.bos
|
||||
fmt.Printf("%+v", ossConfig)
|
||||
|
||||
//eTag, err := api.PutObjectFromFile(ossConfig.Endpoint, "art_block_chain/files/artwork/"+tmp1+"_artworkal.jpg", ossConfig.Endpoint)
|
||||
_, err := api.PutObjectFromFile(ossConfig.BucketName, ossFile, localFile)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return ossConfig.Host + "/" + ossConfig.BucketName + "/" + ossFile, nil
|
||||
}
|
||||
|
||||
func UploadToBos(suffix string, fileBytes []byte) (string, error) {
|
||||
api := ossObj.obj
|
||||
ossConfig := ossObj.bos
|
||||
fmt.Printf("1-------------%+v", ossConfig)
|
||||
|
||||
newUUid, uerror := uuid.NewUUID()
|
||||
if uerror != nil {
|
||||
return "", uerror
|
||||
}
|
||||
|
||||
ossFile := ossConfig.BosBaseDir + "/files/img/" + newUUid.String() + suffix
|
||||
|
||||
//eTag, err := api.PutObjectFromFile(ossConfig.Endpoint, "art_block_chain/files/artwork/"+tmp1+"_artworkal.jpg", ossConfig.Endpoint)
|
||||
_, err := api.PutObjectFromBytes(ossConfig.BucketName, ossFile, fileBytes)
|
||||
fmt.Println("1---", err)
|
||||
fmt.Println("1---", ossConfig.BucketName)
|
||||
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return ossConfig.CdnHost + "/" + ossFile, nil
|
||||
}
|
||||
68
pkg/service/upload/oss.go
Normal file
68
pkg/service/upload/oss.go
Normal file
@ -0,0 +1,68 @@
|
||||
package upload
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/fonchain_enterprise/utils/objstorage"
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
type AliOssVal struct {
|
||||
obj objstorage.API
|
||||
bos Bos
|
||||
}
|
||||
|
||||
var aliOssObj AliOssVal
|
||||
|
||||
func LoadOssEnv(bos Bos) (err error) {
|
||||
v, err := objstorage.NewOSS(bos.AccessKeyId, bos.AccessKeySecret, bos.Endpoint)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
aliOssObj.bos = bos
|
||||
aliOssObj.obj = v
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// UploadLocal 上传本地
|
||||
// UploadLocal("art_block_chain/files/artwork/1.png")
|
||||
func OssUploadLocal(ossFile string, localFile string) (string, error) {
|
||||
api := aliOssObj.obj
|
||||
ossConfig := aliOssObj.bos
|
||||
fmt.Printf("%+v", ossConfig)
|
||||
|
||||
//eTag, err := api.PutObjectFromFile(ossConfig.Endpoint, "art_block_chain/files/artwork/"+tmp1+"_artworkal.jpg", ossConfig.Endpoint)
|
||||
fmt.Println("这边看看", ossFile, localFile)
|
||||
_, err := api.PutObjectFromFile(ossConfig.BucketName, ossFile, localFile)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return ossConfig.CdnHost + "/" + ossFile, nil
|
||||
}
|
||||
|
||||
func OssUploadToBos(suffix string, fileBytes []byte) (string, error) {
|
||||
api := aliOssObj.obj
|
||||
ossConfig := aliOssObj.bos
|
||||
fmt.Printf("1-------------%+v", ossConfig, "文件类型", suffix)
|
||||
|
||||
newUUid, uerror := uuid.NewUUID()
|
||||
if uerror != nil {
|
||||
return "", uerror
|
||||
}
|
||||
|
||||
ossFile := ossConfig.BosBaseDir + "/files/img/" + newUUid.String() + suffix
|
||||
|
||||
//eTag, err := api.PutObjectFromFile(ossConfig.Endpoint, "art_block_chain/files/artwork/"+tmp1+"_artworkal.jpg", ossConfig.Endpoint)
|
||||
_, err := api.PutObjectFromBytes(ossConfig.BucketName, ossFile, fileBytes)
|
||||
fmt.Println("1---", err)
|
||||
fmt.Println("1---", ossConfig.BucketName)
|
||||
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return ossConfig.CdnHost + "/" + ossFile, nil
|
||||
}
|
||||
@ -15,7 +15,6 @@ import (
|
||||
"io"
|
||||
|
||||
cmdConf "fonchain-fiee/cmd/config"
|
||||
|
||||
"github.com/disintegration/imaging"
|
||||
"github.com/fonchain_enterprise/utils/objstorage"
|
||||
"github.com/gin-gonic/gin"
|
||||
@ -271,6 +270,7 @@ func BaiduCheckImage(imageByte []byte) (err error) {
|
||||
}
|
||||
func PutBos(filePath string, mediaType string, needRemove bool) (url string, err error) {
|
||||
BOSClient, err := objstorage.NewOSS(os.Getenv(config.ConfigData.Oss.AccessKeyId), os.Getenv(config.ConfigData.Oss.AccessKeySecret), os.Getenv(config.ConfigData.Oss.Endpoint))
|
||||
//BOSClient, err := objstorage.NewOSS(config.ConfigData.Oss.AccessKeyId, config.ConfigData.Oss.AccessKeySecret, config.ConfigData.Oss.Endpoint)
|
||||
if err != nil {
|
||||
fmt.Println("=== PutBos NewOss err ", err)
|
||||
//logger.Errorf("PutBos NewOss err ", err)
|
||||
@ -296,6 +296,7 @@ func PutBos(filePath string, mediaType string, needRemove bool) (url string, err
|
||||
filePath = strings.Replace(filePath, model.MediaPath, "", 1)
|
||||
var objectName string = fmt.Sprintf("%s/%s%s", config.ConfigData.Oss.BaseDir, cmdConf.AppConfig.System.AppMode, filePath)
|
||||
_, err = BOSClient.PutObjectFromBytes(os.Getenv(config.ConfigData.Oss.BucketName), objectName, fileBytes)
|
||||
//_, err = BOSClient.PutObjectFromBytes(config.ConfigData.Oss.BucketName, objectName, fileBytes)
|
||||
if err != nil {
|
||||
fmt.Println("=== PutBos PutObject err ", err)
|
||||
//logger.Errorf("PutBos PutObject err %+v", err.Error())
|
||||
@ -304,6 +305,7 @@ func PutBos(filePath string, mediaType string, needRemove bool) (url string, err
|
||||
}
|
||||
//url = fmt.Sprintf("%s%s%s/%s", config.BosHttp, config.BosBucketName, config.BosUrl, objectName)
|
||||
url = fmt.Sprintf("%s/%s", os.Getenv(config.ConfigData.Oss.CdnHost), objectName)
|
||||
//url = fmt.Sprintf("%s/%s", config.ConfigData.Oss.CdnHost, objectName)
|
||||
return
|
||||
}
|
||||
func GetSnapshot(videoPath, snapshotPath string, frameNum int) (snapshotName string, err error) {
|
||||
|
||||
@ -7,6 +7,7 @@ import (
|
||||
"io"
|
||||
"net/http"
|
||||
"os"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"go.uber.org/zap"
|
||||
@ -50,3 +51,50 @@ func SaveUrlFileDisk(url string, path string, filename string) (fullPath string,
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// GetRemoteFileSize 通过HTTP HEAD请求获取远程文件大小(不下载文件)
|
||||
func GetRemoteFileSize(url string) (size int64, err error) {
|
||||
// 创建HEAD请求
|
||||
req, err := http.NewRequest("HEAD", url, nil)
|
||||
if err != nil {
|
||||
zap.L().Error("GetRemoteFileSize create request err", zap.String("url", url), zap.Error(err))
|
||||
err = errors.New(e.GetMsg(e.ERROR_DOWNLOAD_FILE))
|
||||
return
|
||||
}
|
||||
|
||||
// 发送请求
|
||||
client := &http.Client{}
|
||||
resp, err := client.Do(req)
|
||||
if err != nil {
|
||||
zap.L().Error("GetRemoteFileSize request err", zap.String("url", url), zap.Error(err))
|
||||
err = errors.New(e.GetMsg(e.ERROR_DOWNLOAD_FILE))
|
||||
return
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
// 检查HTTP状态码
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
zap.L().Error("GetRemoteFileSize status code err", zap.String("url", url), zap.Int("status", resp.StatusCode))
|
||||
err = errors.New(e.GetMsg(e.ERROR_DOWNLOAD_FILE))
|
||||
return
|
||||
}
|
||||
|
||||
// 获取Content-Length头部
|
||||
contentLength := resp.Header.Get("Content-Length")
|
||||
if contentLength == "" {
|
||||
zap.L().Error("GetRemoteFileSize Content-Length header not found", zap.String("url", url))
|
||||
err = errors.New("无法获取文件大小")
|
||||
return
|
||||
}
|
||||
|
||||
// 解析文件大小
|
||||
size, err = strconv.ParseInt(contentLength, 10, 64)
|
||||
size = size / 1024 / 1024
|
||||
if err != nil {
|
||||
zap.L().Error("GetRemoteFileSize parse size err", zap.String("url", url), zap.String("contentLength", contentLength), zap.Error(err))
|
||||
err = errors.New("解析文件大小失败")
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
174
pkg/utils/pdf.go
Normal file
174
pkg/utils/pdf.go
Normal file
@ -0,0 +1,174 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"unicode"
|
||||
|
||||
"github.com/phpdave11/gofpdf"
|
||||
)
|
||||
|
||||
// cleanTextForPDF 清理文本,移除PDF不支持的字符(如emoji)
|
||||
// gofpdf库不支持某些特殊字符
|
||||
func cleanTextForPDF(text string) string {
|
||||
var result []rune
|
||||
for _, r := range text {
|
||||
// 保留基本多文种平面(BMP)内的字符(码点 <= 0xFFFF)
|
||||
// 这样可以保留中文、英文、数字等常用字符,但过滤掉emoji等特殊字符
|
||||
if r <= 0xFFFF && (unicode.IsPrint(r) || unicode.IsSpace(r)) {
|
||||
result = append(result, r)
|
||||
}
|
||||
}
|
||||
return string(result)
|
||||
}
|
||||
|
||||
// loadChineseFont 加载中文字体
|
||||
func loadChineseFont(pdf *gofpdf.Fpdf, fontPath string) error {
|
||||
var fontData []byte
|
||||
var err error
|
||||
|
||||
// 如果提供了本地字体路径,优先使用本地字体
|
||||
if fontPath == "" {
|
||||
return errors.New("字体文件路径不能为空")
|
||||
}
|
||||
|
||||
fontData, err = os.ReadFile(fontPath)
|
||||
if err != nil {
|
||||
return fmt.Errorf("读取字体文件失败: %v", err)
|
||||
}
|
||||
// 使用本地字体文件
|
||||
pdf.AddUTF8FontFromBytes("Chinese", "", fontData)
|
||||
return nil
|
||||
}
|
||||
|
||||
// GeneratePDF 生成PDF文件
|
||||
func GeneratePDF(text, imageURL, outputPath, fontPath string) error {
|
||||
if text == "" {
|
||||
return errors.New("文本不能为空")
|
||||
}
|
||||
// 创建PDF实例,P=纵向,mm=毫米单位,A4=页面大小
|
||||
pdf := gofpdf.New("P", "mm", "A4", "")
|
||||
|
||||
// 加载中文字体
|
||||
err := loadChineseFont(pdf, fontPath)
|
||||
if err != nil {
|
||||
return fmt.Errorf("加载中文字体失败: %v", err)
|
||||
}
|
||||
|
||||
// 添加新页面
|
||||
pdf.AddPage()
|
||||
|
||||
// 设置字体,使用中文字体,12号字体
|
||||
pdf.SetFont("Chinese", "", 12)
|
||||
|
||||
// 设置页面边距(左、上、右)
|
||||
pdf.SetMargins(20, 10, 20)
|
||||
|
||||
// 设置当前位置(x, y),从左上角开始
|
||||
pdf.SetXY(20, 10)
|
||||
|
||||
// 清理文本,移除PDF不支持的字符(如emoji)
|
||||
cleanedText := cleanTextForPDF(text)
|
||||
|
||||
// 添加文本内容
|
||||
// 使用MultiCell方法处理多行文本,支持自动换行
|
||||
// 参数:宽度、行高、文本内容、边框、对齐方式、是否填充
|
||||
// A4页面宽度210mm,减去左右边距40mm,可用宽度170mm
|
||||
textWidth := 170.0
|
||||
lineHeight := 7.0
|
||||
pdf.MultiCell(textWidth, lineHeight, cleanedText, "", "L", false)
|
||||
|
||||
// 如果提供了图片URL,则添加图片
|
||||
if imageURL != "" {
|
||||
// 添加一些间距
|
||||
pdf.Ln(5)
|
||||
|
||||
// 解析URL获取文件扩展名
|
||||
u, err := url.Parse(imageURL)
|
||||
if err != nil {
|
||||
return fmt.Errorf("图片链接解析错误: %v", err)
|
||||
}
|
||||
fileExt := filepath.Ext(u.Path)
|
||||
// 如果没有扩展名,默认使用.jpg
|
||||
if fileExt == "" {
|
||||
fileExt = ".jpg"
|
||||
}
|
||||
|
||||
// 下载图片
|
||||
resp, err := http.Get(imageURL)
|
||||
if err != nil {
|
||||
return fmt.Errorf("下载图片失败: %v", err)
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
// 读取图片数据
|
||||
imageData, err := io.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return fmt.Errorf("读取图片数据失败: %v", err)
|
||||
}
|
||||
|
||||
// 将图片数据保存到临时文件(gofpdf需要文件路径)
|
||||
tmpFile, err := os.CreateTemp("", "pdf_image_*"+fileExt)
|
||||
if err != nil {
|
||||
return fmt.Errorf("创建临时文件失败: %v", err)
|
||||
}
|
||||
defer os.Remove(tmpFile.Name()) // 使用完后删除临时文件
|
||||
defer tmpFile.Close()
|
||||
|
||||
// 写入图片数据到临时文件
|
||||
_, err = tmpFile.Write(imageData)
|
||||
if err != nil {
|
||||
return fmt.Errorf("写入临时文件失败: %v", err)
|
||||
}
|
||||
tmpFile.Close()
|
||||
|
||||
// A4纵向页面宽度210mm,减去左右边距40mm,可用宽度170mm
|
||||
// 图片宽度设为可用宽度的70%
|
||||
imageWidth := textWidth * 0.7
|
||||
// 计算居中位置:页面宽度210mm,图片居中
|
||||
imageX := (210.0 - imageWidth) / 2
|
||||
currentY := pdf.GetY()
|
||||
|
||||
// 注册图片并获取原始尺寸,用于计算缩放后的高度
|
||||
imgInfo := pdf.RegisterImageOptions(tmpFile.Name(), gofpdf.ImageOptions{})
|
||||
if imgInfo == nil {
|
||||
return fmt.Errorf("注册图片失败")
|
||||
}
|
||||
|
||||
// 计算缩放后的图片高度(按比例缩放)
|
||||
// 原始宽度:原始高度 = 缩放后宽度:缩放后高度
|
||||
originalWidth, originalHeight := imgInfo.Extent()
|
||||
imageHeight := (imageWidth / originalWidth) * originalHeight
|
||||
|
||||
// A4页面高度297mm,底部边距10mm,计算可用的最大Y坐标
|
||||
pageHeight := 297.0
|
||||
bottomMargin := 10.0
|
||||
maxY := pageHeight - bottomMargin
|
||||
|
||||
// 检查当前页面剩余空间是否足够放下图片
|
||||
// 如果图片底部会超出页面可用区域,则添加新页面
|
||||
if currentY+imageHeight > maxY {
|
||||
pdf.AddPage()
|
||||
// 新页面从顶部边距开始
|
||||
currentY = 10.0
|
||||
}
|
||||
|
||||
// 添加图片
|
||||
// ImageOptions参数:图片路径、x坐标、y坐标、宽度、高度、是否流式布局、选项、链接
|
||||
// 高度设为0表示按比例自动计算
|
||||
pdf.ImageOptions(tmpFile.Name(), imageX, currentY, imageWidth, 0, false, gofpdf.ImageOptions{}, 0, "")
|
||||
}
|
||||
|
||||
// 生成并保存PDF文件
|
||||
err = pdf.OutputFileAndClose(outputPath)
|
||||
if err != nil {
|
||||
return fmt.Errorf("生成PDF失败: %v", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user