From 34c4690f80ad32e1e39579c67dbcccb66c39ab65 Mon Sep 17 00:00:00 2001 From: landaiqing <3517283258@qq.com> Date: Fri, 15 Nov 2024 02:02:19 +0800 Subject: [PATCH] :sparkles: code migration --- .idea/GOHCache.xml | 799 ++++++++++++++++-- .idea/JavaSceneConfigState.xml | 2 +- .../generate/generate_basic_text_captcha.go | 44 + .../generate/generate_click_shape_captcha.go | 44 + .../generate/generate_rotate_captcha.go | 42 + .../generate/generate_slide_basic_captcha.go | 50 ++ .../generate/generate_slide_region_captcha.go | 50 ++ .../verify/verify_basic_text_captcha.go | 48 ++ app/core/api/common/constant/oauth_type.go | 8 + app/core/api/common/constant/redis_prefix.go | 17 + .../api/common/utils/gen_validate_code.go | 20 + app/core/api/core.api | 123 ++- app/core/api/core.go | 3 + app/core/api/etc/core.yaml | 54 +- app/core/api/internal/config/config.go | 39 + .../generate_rotate_captcha_handler.go | 21 + .../generate_slide_basic_captcha_handler.go | 21 + .../oauth/get_gitee_oauth_url_handler.go | 21 + .../oauth/get_github_oauth_url_handler.go | 28 + .../handler/oauth/get_qq_oauth_url_handler.go | 28 + .../oauth/get_wechat_qrcode_handler.go | 29 + .../handler/oauth/gitee_callback_handler.go | 29 + .../handler/oauth/github_callback_handler.go | 29 + .../handler/oauth/qq_callback_handler.go | 29 + .../handler/oauth/wechat_callback_handler.go | 22 + app/core/api/internal/handler/routes.go | 132 ++- .../handler/sms/send_sms_by_aliyun_handler.go | 28 + .../handler/sms/send_sms_by_smsbao_handler.go | 28 + .../handler/sms/send_sms_by_test_handler.go | 28 + .../handler/user/get_user_device_handler.go | 22 + .../websocket/message_websocket_handler.go | 22 + .../websocket/qrcode_websocket_handler.go | 22 + .../captcha/generate_rotate_captcha_logic.go | 34 + .../generate_slide_basic_captcha_logic.go | 34 + .../logic/oauth/get_gitee_oauth_url_logic.go | 32 + .../logic/oauth/get_github_oauth_url_logic.go | 32 + .../logic/oauth/get_qq_oauth_url_logic.go | 32 + .../logic/oauth/get_wechat_qrcode_logic.go | 64 ++ .../logic/oauth/gitee_callback_logic.go | 257 ++++++ .../logic/oauth/github_callback_logic.go | 236 ++++++ .../internal/logic/oauth/qq_callback_logic.go | 252 ++++++ .../logic/oauth/wechat_callback_logic.go | 201 +++++ .../logic/sms/send_sms_by_aliyun_logic.go | 73 ++ .../logic/sms/send_sms_by_smsbao_logic.go | 66 ++ .../logic/sms/send_sms_by_test_logic.go | 50 ++ .../logic/user/account_login_logic.go | 82 +- .../logic/user/get_user_device_logic.go | 133 +++ .../internal/logic/user/phone_login_logic.go | 23 +- .../websocket/message_websocket_logic.go | 193 +++++ .../logic/websocket/qrcode_websocket_logic.go | 134 +++ app/core/api/internal/svc/service_context.go | 15 + app/core/api/internal/types/types.go | 18 + .../repository/captcha/click_shape_captcha.go | 38 + .../api/repository/captcha/rotate_captcha.go | 26 + .../api/repository/captcha/slide_captcha.go | 44 + .../captcha/slide_region_captcha.go | 43 + .../api/repository/captcha/text_captcha.go | 97 +++ .../repository/mysql/ent/migrate/schema.go | 18 +- app/core/api/repository/mysql/ent/mutation.go | 140 ++- app/core/api/repository/mysql/ent/runtime.go | 8 - .../mysql/ent/scaauthrole/scaauthrole.go | 2 - .../repository/mysql/ent/scaauthrole/where.go | 20 +- .../mysql/ent/scaauthrole_create.go | 8 +- .../mysql/ent/scaauthrole_update.go | 40 +- .../mysql/ent/scaauthuser/scaauthuser.go | 2 - .../repository/mysql/ent/scaauthuser/where.go | 20 +- .../mysql/ent/scaauthuser_create.go | 8 +- .../mysql/ent/scaauthuser_update.go | 40 +- .../scaauthuserdevice/scaauthuserdevice.go | 2 - .../mysql/ent/scaauthuserdevice/where.go | 20 +- .../mysql/ent/scaauthuserdevice_create.go | 8 +- .../mysql/ent/scaauthuserdevice_update.go | 40 +- .../scaauthusersocial/scaauthusersocial.go | 2 - .../mysql/ent/scaauthusersocial/where.go | 20 +- .../mysql/ent/scaauthusersocial_create.go | 8 +- .../mysql/ent/scaauthusersocial_update.go | 40 +- app/core/api/repository/mysql/init.go | 2 - .../mysql/model/mixin/default_mixin.go | 3 +- .../repository/mysql/model/sca_auth_user.go | 2 +- app/core/api/repository/sensitivex/inti.go | 34 + app/core/api/repository/wechat_public/init.go | 34 + .../api/resources/language/active.en.toml | 8 +- .../api/resources/language/active.zh.toml | 8 +- go.mod | 50 +- go.sum | 92 ++ 85 files changed, 4349 insertions(+), 421 deletions(-) create mode 100644 app/core/api/common/captcha/generate/generate_basic_text_captcha.go create mode 100644 app/core/api/common/captcha/generate/generate_click_shape_captcha.go create mode 100644 app/core/api/common/captcha/generate/generate_rotate_captcha.go create mode 100644 app/core/api/common/captcha/generate/generate_slide_basic_captcha.go create mode 100644 app/core/api/common/captcha/generate/generate_slide_region_captcha.go create mode 100644 app/core/api/common/captcha/verify/verify_basic_text_captcha.go create mode 100644 app/core/api/common/constant/oauth_type.go create mode 100644 app/core/api/common/utils/gen_validate_code.go create mode 100644 app/core/api/internal/handler/captcha/generate_rotate_captcha_handler.go create mode 100644 app/core/api/internal/handler/captcha/generate_slide_basic_captcha_handler.go create mode 100644 app/core/api/internal/handler/oauth/get_gitee_oauth_url_handler.go create mode 100644 app/core/api/internal/handler/oauth/get_github_oauth_url_handler.go create mode 100644 app/core/api/internal/handler/oauth/get_qq_oauth_url_handler.go create mode 100644 app/core/api/internal/handler/oauth/get_wechat_qrcode_handler.go create mode 100644 app/core/api/internal/handler/oauth/gitee_callback_handler.go create mode 100644 app/core/api/internal/handler/oauth/github_callback_handler.go create mode 100644 app/core/api/internal/handler/oauth/qq_callback_handler.go create mode 100644 app/core/api/internal/handler/oauth/wechat_callback_handler.go create mode 100644 app/core/api/internal/handler/sms/send_sms_by_aliyun_handler.go create mode 100644 app/core/api/internal/handler/sms/send_sms_by_smsbao_handler.go create mode 100644 app/core/api/internal/handler/sms/send_sms_by_test_handler.go create mode 100644 app/core/api/internal/handler/user/get_user_device_handler.go create mode 100644 app/core/api/internal/handler/websocket/message_websocket_handler.go create mode 100644 app/core/api/internal/handler/websocket/qrcode_websocket_handler.go create mode 100644 app/core/api/internal/logic/captcha/generate_rotate_captcha_logic.go create mode 100644 app/core/api/internal/logic/captcha/generate_slide_basic_captcha_logic.go create mode 100644 app/core/api/internal/logic/oauth/get_gitee_oauth_url_logic.go create mode 100644 app/core/api/internal/logic/oauth/get_github_oauth_url_logic.go create mode 100644 app/core/api/internal/logic/oauth/get_qq_oauth_url_logic.go create mode 100644 app/core/api/internal/logic/oauth/get_wechat_qrcode_logic.go create mode 100644 app/core/api/internal/logic/oauth/gitee_callback_logic.go create mode 100644 app/core/api/internal/logic/oauth/github_callback_logic.go create mode 100644 app/core/api/internal/logic/oauth/qq_callback_logic.go create mode 100644 app/core/api/internal/logic/oauth/wechat_callback_logic.go create mode 100644 app/core/api/internal/logic/sms/send_sms_by_aliyun_logic.go create mode 100644 app/core/api/internal/logic/sms/send_sms_by_smsbao_logic.go create mode 100644 app/core/api/internal/logic/sms/send_sms_by_test_logic.go create mode 100644 app/core/api/internal/logic/user/get_user_device_logic.go create mode 100644 app/core/api/internal/logic/websocket/message_websocket_logic.go create mode 100644 app/core/api/internal/logic/websocket/qrcode_websocket_logic.go create mode 100644 app/core/api/repository/captcha/click_shape_captcha.go create mode 100644 app/core/api/repository/captcha/rotate_captcha.go create mode 100644 app/core/api/repository/captcha/slide_captcha.go create mode 100644 app/core/api/repository/captcha/slide_region_captcha.go create mode 100644 app/core/api/repository/captcha/text_captcha.go create mode 100644 app/core/api/repository/sensitivex/inti.go create mode 100644 app/core/api/repository/wechat_public/init.go diff --git a/.idea/GOHCache.xml b/.idea/GOHCache.xml index 3e954df..8bd259f 100644 --- a/.idea/GOHCache.xml +++ b/.idea/GOHCache.xml @@ -36,6 +36,22 @@ + + + + + + + + + + + + @@ -86,6 +102,7 @@ @@ -96,6 +113,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -117,6 +211,20 @@ + + + + + + + + + + + + @@ -138,6 +246,27 @@ + + + + + + + + + + + + + + + + + + @@ -159,6 +288,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -718,6 +884,27 @@ + + + + + + + + + + + + + + + + + + @@ -733,6 +920,13 @@ + + + + + + @@ -747,6 +941,21 @@ + + + + + + + + + + + + @@ -807,6 +1016,48 @@ + + + + + + @@ -1126,6 +1447,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1138,10 +1497,148 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + - + + + + + + + + + + + + + + @@ -1201,7 +1736,7 @@ -