31 lines
603 B
Go
31 lines
603 B
Go
|
package logic
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
|
||
|
"fusenapi/data-transfer/internal/svc"
|
||
|
"fusenapi/data-transfer/internal/types"
|
||
|
|
||
|
"github.com/zeromicro/go-zero/core/logx"
|
||
|
)
|
||
|
|
||
|
type GreetLogic struct {
|
||
|
logx.Logger
|
||
|
ctx context.Context
|
||
|
svcCtx *svc.ServiceContext
|
||
|
}
|
||
|
|
||
|
func NewGreetLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GreetLogic {
|
||
|
return &GreetLogic{
|
||
|
Logger: logx.WithContext(ctx),
|
||
|
ctx: ctx,
|
||
|
svcCtx: svcCtx,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func (l *GreetLogic) Greet() (resp *types.Response) {
|
||
|
// 返回值必须调用Set重新返回, resp可以空指针调用 resp.SetStatus(basic.CodeOK, data)
|
||
|
|
||
|
return resp
|
||
|
}
|