33 lines
706 B
Go
33 lines
706 B
Go
package logic
|
|
|
|
import (
|
|
"context"
|
|
|
|
"lone-services/pkg/utils"
|
|
payment "lone-services/rpc/payment/pb"
|
|
"lone-services/services/payment/internal/svc"
|
|
|
|
"github.com/zeromicro/go-zero/core/logx"
|
|
)
|
|
|
|
type CloseLogic struct {
|
|
ctx context.Context
|
|
svcCtx *svc.ServiceContext
|
|
logx.Logger
|
|
}
|
|
|
|
func NewCloseLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CloseLogic {
|
|
return &CloseLogic{
|
|
ctx: ctx,
|
|
svcCtx: svcCtx,
|
|
Logger: logx.WithContext(ctx),
|
|
}
|
|
}
|
|
|
|
func (l *CloseLogic) Close(in *payment.CloseReq) (*payment.Response, error) {
|
|
if in == nil || in.OrderSn == utils.StringEmpty {
|
|
return failResponse(utils.ErrorParams), nil
|
|
}
|
|
return outResponse(utils.Fail, "close not implemented"), nil
|
|
}
|