Refactor super module: Move HTTP handlers to new super/v1 package

- Deleted old super.go file and moved all related HTTP handlers to new package structure under backend/app/http/super/v1.
- Updated service imports in super.go and super_test.go to reflect new DTO paths.
- Created new auth, contents, orders, tenants, and users handlers with corresponding routes and methods.
- Added new DTO definitions for authentication and content management in the super/v1/dto directory.
- Implemented new migration for content_access table and created model for it.
This commit is contained in:
2025-12-29 17:17:07 +08:00
parent bdf20fb0c6
commit 33e1921e17
18 changed files with 665 additions and 443 deletions

View File

@@ -6,7 +6,7 @@ import (
"time"
"quyun/v2/app/errorx"
super_dto "quyun/v2/app/http/v1/dto"
super_dto "quyun/v2/app/http/super/v1/dto"
"quyun/v2/app/requests"
"quyun/v2/database/models"
"quyun/v2/pkg/consts"

View File

@@ -5,7 +5,7 @@ import (
"testing"
"quyun/v2/app/commands/testx"
super_dto "quyun/v2/app/http/v1/dto"
super_dto "quyun/v2/app/http/super/v1/dto"
"quyun/v2/app/requests"
"quyun/v2/database"
"quyun/v2/database/models"
@@ -54,7 +54,7 @@ func (s *SuperTestSuite) Test_ListUsers() {
res, err := Super.ListUsers(ctx, filter)
So(err, ShouldBeNil)
So(res.Total, ShouldEqual, 2)
items := res.Items.([]super_dto.UserItem)
So(items[0].Username, ShouldEqual, "user2") // Desc order
})
@@ -97,4 +97,4 @@ func (s *SuperTestSuite) Test_CreateTenant() {
So(t.Status, ShouldEqual, consts.TenantStatusVerified)
})
})
}
}