小程序一些功能更新
This commit is contained in:
46
internal/controller/note.go
Normal file
46
internal/controller/note.go
Normal file
@@ -0,0 +1,46 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1 "tool-api/api/user/v1"
|
||||
"tool-api/internal/logic"
|
||||
)
|
||||
|
||||
// cNote 笔记域接口(需用户登录,绑定在 UserAuth 分组下)。
|
||||
//
|
||||
// 注意:所有方法必须是标准签名 func(ctx, req) (res, err)。
|
||||
// 不要写 func(*ghttp.Request) 签名的方法 —— GoFrame 的 group.Bind 会把这类方法
|
||||
// 一并自动注册成路由(见 controller/member.go PayNotify 注释)。
|
||||
type cNote struct{}
|
||||
|
||||
// Note 笔记控制器
|
||||
var Note = &cNote{}
|
||||
|
||||
func (c *cNote) NoteList(ctx context.Context, req *v1.NoteListReq) (res *v1.NoteListRes, err error) {
|
||||
return logic.NoteList(ctx, req)
|
||||
}
|
||||
|
||||
func (c *cNote) NoteDetail(ctx context.Context, req *v1.NoteDetailReq) (res *v1.NoteDetailRes, err error) {
|
||||
return logic.NoteDetail(ctx, req)
|
||||
}
|
||||
|
||||
func (c *cNote) NoteSave(ctx context.Context, req *v1.NoteSaveReq) (res *v1.NoteSaveRes, err error) {
|
||||
return logic.SaveNote(ctx, req)
|
||||
}
|
||||
|
||||
func (c *cNote) NoteDelete(ctx context.Context, req *v1.NoteDeleteReq) (res *v1.NoteDeleteRes, err error) {
|
||||
return logic.DeleteNote(ctx, req)
|
||||
}
|
||||
|
||||
func (c *cNote) NoteRestore(ctx context.Context, req *v1.NoteRestoreReq) (res *v1.NoteRestoreRes, err error) {
|
||||
return logic.RestoreNote(ctx, req)
|
||||
}
|
||||
|
||||
func (c *cNote) NoteRemindCancel(ctx context.Context, req *v1.NoteRemindCancelReq) (res *v1.NoteRemindCancelRes, err error) {
|
||||
return logic.CancelRemind(ctx, req)
|
||||
}
|
||||
|
||||
func (c *cNote) NoteSubscribeReport(ctx context.Context, req *v1.NoteSubscribeReportReq) (res *v1.NoteSubscribeReportRes, err error) {
|
||||
return logic.ReportSubscribe(ctx, req)
|
||||
}
|
||||
Reference in New Issue
Block a user