feat: rename qiniu to oss, add admin upload proxy with thumbnail, add dev-login

- Rename all QINIU_* config/code/docs to OSS_* to match actual Alibaba Cloud OSS
- Refactor upload module from internal/common/qiniu to internal/common/upload
- Add backend proxy upload endpoint (POST /api/admin/marketing/upload) to avoid CORS
- Auto-generate compressed thumbnail (800px, JPEG 80%) on admin image upload
- Add dev-login endpoint (POST /api/v1/auth/dev-login) for H5 debugging
- Add imageutil package for server-side image resizing

Made-with: Cursor
This commit is contained in:
nepiedg
2026-04-04 02:52:16 +08:00
parent aeaf6a04c2
commit 1eab1b99c1
21 changed files with 1023 additions and 191 deletions
+4 -4
View File
@@ -11,8 +11,8 @@ import (
adminmodule "wx_service/internal/admin"
authhandler "wx_service/internal/common/auth/handler"
authservice "wx_service/internal/common/auth/service"
qiniuhandler "wx_service/internal/common/qiniu/handler"
qiniuservice "wx_service/internal/common/qiniu/service"
uploadhandler "wx_service/internal/common/upload/handler"
uploadservice "wx_service/internal/common/upload/service"
rediscache "wx_service/internal/common/redis/cache"
redisservice "wx_service/internal/common/redis/service"
oahandler "wx_service/internal/common/wechat_official/handler"
@@ -123,8 +123,8 @@ func main() {
redeemCodeService := membershipservice.NewRedeemCodeService(database.DB, config.AppConfig.Admin.Token)
redeemCodeHandler := membershiphandler.NewRedeemCodeHandler(redeemCodeService)
qiniuService := qiniuservice.NewQiniuService(config.AppConfig.Qiniu)
uploadHandler := qiniuhandler.NewUploadHandler(qiniuService)
uploadSvc := uploadservice.NewUploadService(config.AppConfig.OSS)
uploadHandler := uploadhandler.NewUploadHandler(uploadSvc)
oaService := oaservice.NewWeChatOAService(config.AppConfig.WeChatOA)
oaOAuthHandler := oahandler.NewOAuthHandler(oaService)