32 lines
795 B
Go
32 lines
795 B
Go
|
package logic
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"trasfer_middleware/until/common"
|
||
|
|
||
|
"trasfer_middleware/cmd/rpc/internal/svc"
|
||
|
"trasfer_middleware/cmd/rpc/pb/transfer"
|
||
|
|
||
|
"github.com/zeromicro/go-zero/core/logx"
|
||
|
)
|
||
|
|
||
|
type PhysicalGoodsDetailLogic struct {
|
||
|
ctx context.Context
|
||
|
svcCtx *svc.ServiceContext
|
||
|
logx.Logger
|
||
|
}
|
||
|
|
||
|
func NewPhysicalGoodsDetailLogic(ctx context.Context, svcCtx *svc.ServiceContext) *PhysicalGoodsDetailLogic {
|
||
|
return &PhysicalGoodsDetailLogic{
|
||
|
ctx: ctx,
|
||
|
svcCtx: svcCtx,
|
||
|
Logger: logx.WithContext(ctx),
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func (l *PhysicalGoodsDetailLogic) PhysicalGoodsDetail(in *transfer.PhysicalGoodsDetailReq) (*transfer.GoodsStructWithChild, error) {
|
||
|
res, err := l.svcCtx.Physical.SetData(l.ctx, in.AppId, common.StructToMap(in), &l.svcCtx.Config.Mq).GoodsDetail()
|
||
|
|
||
|
return res, err
|
||
|
}
|