refactor(api/api):符合gf gen ctrl规范

This commit is contained in:
mh-swift
2024-08-14 16:47:38 +08:00
parent 09026a606b
commit d9b57e6c62
16 changed files with 192 additions and 107 deletions

View File

@@ -1,16 +1,15 @@
// Package member
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package member
import "github.com/gogf/gf/v2/frame/g"
import (
"context"
// GetIdByCodeReq 通过邀请码获取用户ID
type GetIdByCodeReq struct {
g.Meta `path:"/member/getIdByCode" method:"post" tags:"用户" summary:"通过邀请码获取用户ID"`
Code string `json:"code" dc:"邀请码"`
"hotgo/api/api/member/v1"
)
type IMemberV1 interface {
GetIdByCode(ctx context.Context, req *v1.GetIdByCodeReq) (res *v1.GetIdByCodeRes, err error)
}
type GetIdByCodeRes struct{}

View File

@@ -0,0 +1,16 @@
// Package member
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package v1
import "github.com/gogf/gf/v2/frame/g"
// GetIdByCodeReq 通过邀请码获取用户ID
type GetIdByCodeReq struct {
g.Meta `path:"/member/getIdByCode" method:"post" tags:"用户" summary:"通过邀请码获取用户ID"`
Code string `json:"code" dc:"邀请码"`
}
type GetIdByCodeRes struct{}

17
server/api/api/pay/pay.go Normal file
View File

@@ -0,0 +1,17 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package pay
import (
"context"
"hotgo/api/api/pay/v1"
)
type IPayV1 interface {
NotifyAliPay(ctx context.Context, req *v1.NotifyAliPayReq) (res *v1.NotifyAliPayRes, err error)
NotifyWxPay(ctx context.Context, req *v1.NotifyWxPayReq) (res *v1.NotifyWxPayRes, err error)
NotifyQQPay(ctx context.Context, req *v1.NotifyQQPayReq) (res *v1.NotifyQQPayRes, err error)
}

View File

@@ -3,11 +3,12 @@
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package pay
package v1
import (
"github.com/gogf/gf/v2/frame/g"
"hotgo/internal/model/input/payin"
"github.com/gogf/gf/v2/frame/g"
)
// NotifyAliPayReq 支付宝回调