33 lines
759 B
Go
33 lines
759 B
Go
|
package logic
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"trasfer_middleware/pkg/common"
|
||
|
|
||
|
"trasfer_middleware/cmd/rpc/internal/svc"
|
||
|
"trasfer_middleware/cmd/rpc/pb/transfer"
|
||
|
|
||
|
"github.com/zeromicro/go-zero/core/logx"
|
||
|
)
|
||
|
|
||
|
type ZltxRechargeInfoLogic struct {
|
||
|
ctx context.Context
|
||
|
svcCtx *svc.ServiceContext
|
||
|
logx.Logger
|
||
|
}
|
||
|
|
||
|
func NewZltxRechargeInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ZltxRechargeInfoLogic {
|
||
|
return &ZltxRechargeInfoLogic{
|
||
|
ctx: ctx,
|
||
|
svcCtx: svcCtx,
|
||
|
Logger: logx.WithContext(ctx),
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func (l *ZltxRechargeInfoLogic) ZltxRechargeInfo(in *transfer.DefaultReq) (*transfer.ZltxRechargeInfoRes, error) {
|
||
|
|
||
|
res, err := l.svcCtx.ZltxOrder.SetData(common.StructToMap(in)).RechargeInfo()
|
||
|
//_ = copier.Copy(result, &res)
|
||
|
return res, err
|
||
|
}
|