This commit is contained in:
Hiven
2023-07-20 15:55:01 +08:00
parent 810f4fbee7
commit b93c2d4708
5 changed files with 41 additions and 13 deletions

View File

@@ -18,21 +18,21 @@ import (
"gorm.io/gorm"
)
type GetUserOrderListLogic struct {
type UserOrderListLogic struct {
logx.Logger
ctx context.Context
svcCtx *svc.ServiceContext
}
func NewGetUserOrderListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetUserOrderListLogic {
return &GetUserOrderListLogic{
func NewUserOrderListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UserOrderListLogic {
return &UserOrderListLogic{
Logger: logx.WithContext(ctx),
ctx: ctx,
svcCtx: svcCtx,
}
}
func (l *GetUserOrderListLogic) GetUserOrderList(req *types.GetUserOrderListReq, userinfo *auth.UserInfo) (resp *basic.Response) {
func (l *UserOrderListLogic) UserOrderList(req *types.UserOrderListReq, userinfo *auth.UserInfo) (resp *basic.Response) {
// 返回值必须调用Set重新返回, resp可以空指针调用 resp.SetStatus(basic.CodeOK, data)
// userinfo 传入值时, 一定不为null
@@ -136,7 +136,7 @@ func (l *GetUserOrderListLogic) GetUserOrderList(req *types.GetUserOrderListReq,
}
return resp.SetStatusWithMessage(basic.CodeOK, "success", types.GetUserOrderListRsp{
return resp.SetStatusWithMessage(basic.CodeOK, "success", types.UserOrderListRsp{
Items: respList,
Meta: types.Meta{
TotalCount: total,