34 lines
836 B
Go
34 lines
836 B
Go
package logic
|
|
|
|
import (
|
|
"context"
|
|
"github.com/jinzhu/copier"
|
|
"trasfer_middleware/until/common"
|
|
|
|
"trasfer_middleware/cmd/rpc/internal/svc"
|
|
"trasfer_middleware/cmd/rpc/pb/transfer"
|
|
|
|
"github.com/zeromicro/go-zero/core/logx"
|
|
)
|
|
|
|
type ZltxOrderSmsLogic struct {
|
|
ctx context.Context
|
|
svcCtx *svc.ServiceContext
|
|
logx.Logger
|
|
}
|
|
|
|
func NewZltxOrderSmsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ZltxOrderSmsLogic {
|
|
return &ZltxOrderSmsLogic{
|
|
ctx: ctx,
|
|
svcCtx: svcCtx,
|
|
Logger: logx.WithContext(ctx),
|
|
}
|
|
}
|
|
|
|
func (l *ZltxOrderSmsLogic) ZltxOrderSms(in *transfer.ZltxOrderSmsReq) (*transfer.ZltxOrderSmsRes, error) {
|
|
var result = &transfer.ZltxOrderSmsRes{}
|
|
res, err := l.svcCtx.ZltxOrder.SetData(l.ctx, common.StructToMap(in), &l.svcCtx.Config.Mq).OrderSendSms()
|
|
_ = copier.Copy(result, &res)
|
|
return result, err
|
|
}
|