小程序一些功能更新
This commit is contained in:
31
internal/controller/event_pub.go
Normal file
31
internal/controller/event_pub.go
Normal file
@@ -0,0 +1,31 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1 "tool-api/api/user/v1"
|
||||
"tool-api/internal/logic"
|
||||
)
|
||||
|
||||
// cEventPub 小程序端「年会」公开接口(免登录)。
|
||||
//
|
||||
// ⚠️ 挂到 cmd.go 的**公开组**(与 UserPub/AdminPub 同组)。该组最容易踩 group.Bind 自动注册坑:
|
||||
// GoFrame 会把控制器上所有 func(*ghttp.Request) 签名的方法也自动注册成路由。
|
||||
// → 本控制器**只有**标准签名方法 func(ctx, req) (res, err),不含任何 func(*ghttp.Request)。
|
||||
type cEventPub struct{}
|
||||
|
||||
// EventPub 公开查座控制器
|
||||
var EventPub = &cEventPub{}
|
||||
|
||||
func (c *cEventPub) EventInfo(ctx context.Context, req *v1.EventInfoReq) (res *v1.EventInfoRes, err error) {
|
||||
return logic.EventInfo(ctx, req)
|
||||
}
|
||||
|
||||
func (c *cEventPub) EventSeatQuery(ctx context.Context, req *v1.EventSeatQueryReq) (res *v1.EventSeatQueryRes, err error) {
|
||||
return logic.EventSeatQuery(ctx, req)
|
||||
}
|
||||
|
||||
// EventList 公开可查询活动列表(N4-A):只返已发布活动;无已发布 → {list:[]}
|
||||
func (c *cEventPub) EventList(ctx context.Context, req *v1.EventPublicListReq) (res *v1.EventPublicListRes, err error) {
|
||||
return logic.EventPublicList(ctx)
|
||||
}
|
||||
Reference in New Issue
Block a user