develop basic APIs / optimize database organization

This commit is contained in:
2025-02-13 18:13:08 +08:00
parent 3e51ab8e3f
commit ab4e9c4d59
23 changed files with 1159 additions and 246 deletions

View File

@@ -17,7 +17,6 @@ func GetAlbumDetailHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
return
}
l := storage.NewGetAlbumDetailLogic(r.Context(), svcCtx)
resp, err := l.GetAlbumDetail(&req)
if err != nil {

View File

@@ -3,15 +3,23 @@ package storage
import (
"net/http"
"github.com/zeromicro/go-zero/rest/httpx"
"schisandra-album-cloud-microservices/app/auth/api/internal/logic/storage"
"schisandra-album-cloud-microservices/app/auth/api/internal/svc"
"schisandra-album-cloud-microservices/app/auth/api/internal/types"
"schisandra-album-cloud-microservices/common/xhttp"
)
func QueryLocationImageListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.LocationListRequest
if err := httpx.Parse(r, &req); err != nil {
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
return
}
l := storage.NewQueryLocationImageListLogic(r.Context(), svcCtx)
resp, err := l.QueryLocationImageList()
resp, err := l.QueryLocationImageList(&req)
if err != nil {
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
} else {

View File

@@ -3,15 +3,23 @@ package storage
import (
"net/http"
"github.com/zeromicro/go-zero/rest/httpx"
"schisandra-album-cloud-microservices/app/auth/api/internal/logic/storage"
"schisandra-album-cloud-microservices/app/auth/api/internal/svc"
"schisandra-album-cloud-microservices/app/auth/api/internal/types"
"schisandra-album-cloud-microservices/common/xhttp"
)
func QueryThingImageListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.ThingListRequest
if err := httpx.Parse(r, &req); err != nil {
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
return
}
l := storage.NewQueryThingImageListLogic(r.Context(), svcCtx)
resp, err := l.QueryThingImageList()
resp, err := l.QueryThingImageList(&req)
if err != nil {
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
} else {