feat: 添加店铺邀请列表查询接口并修复 responded_at 未写入

This commit is contained in:
zetaloop
2026-04-23 15:54:12 +08:00
parent d596d41e1a
commit 83a2f243f4
9 changed files with 300 additions and 13 deletions
@@ -0,0 +1,32 @@
// Code scaffolded by goctl. Safe to edit.
// goctl 1.10.1
package shop
import (
"net/http"
"github.com/zeromicro/go-zero/rest/httpx"
"juwan-backend/app/shop/api/internal/logic/shop"
"juwan-backend/app/shop/api/internal/svc"
"juwan-backend/app/shop/api/internal/types"
)
// 获取店铺邀请列表
func ListShopInvitationsHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.ShopIdReq
if err := httpx.Parse(r, &req); err != nil {
httpx.ErrorCtx(r.Context(), w, err)
return
}
l := shop.NewListShopInvitationsLogic(r.Context(), svcCtx)
resp, err := l.ListShopInvitations(&req)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}
@@ -0,0 +1,25 @@
// Code scaffolded by goctl. Safe to edit.
// goctl 1.10.1
package shop
import (
"net/http"
"github.com/zeromicro/go-zero/rest/httpx"
"juwan-backend/app/shop/api/internal/logic/shop"
"juwan-backend/app/shop/api/internal/svc"
)
// 获取我收到的邀请
func MyInvitationsHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
l := shop.NewMyInvitationsLogic(r.Context(), svcCtx)
resp, err := l.MyInvitations()
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}