提交 8a9aa538 authored 作者: gukai's avatar gukai

添加分销关系

上级 5dbdad9f
...@@ -88,7 +88,7 @@ func (s *Config) Post(ctx context.Context, method string, params g.Map) (str str ...@@ -88,7 +88,7 @@ func (s *Config) Post(ctx context.Context, method string, params g.Map) (str str
if err != nil { if err != nil {
g.Log().Cat(PkgName).Ctx(ctx).Infof("参数【%v】错误【%v】响应时间【%v】", paramStr, err.Error(), gtime.TimestampMilli()-Start) g.Log().Cat(PkgName).Ctx(ctx).Infof("参数【%v】错误【%v】响应时间【%v】", paramStr, err.Error(), gtime.TimestampMilli()-Start)
} else { } else {
g.Log().Cat(PkgName).Ctx(ctx).Infof("参数【%v】响应【%v】响应时间【%v】", str, gtime.TimestampMilli()-Start) g.Log().Cat(PkgName).Ctx(ctx).Infof("参数【%v】响应【%v】响应时间【%v】", paramStr,str, gtime.TimestampMilli()-Start)
} }
}() }()
str = resp.ReadAllString() str = resp.ReadAllString()
......
...@@ -4,6 +4,7 @@ import ( ...@@ -4,6 +4,7 @@ import (
"context" "context"
"github.com/gogf/gf/encoding/gjson" "github.com/gogf/gf/encoding/gjson"
"github.com/gogf/gf/frame/g" "github.com/gogf/gf/frame/g"
"github.com/gogf/gf/util/gconv"
) )
type orderAli struct { type orderAli struct {
...@@ -66,7 +67,7 @@ func (s *orderAli) Create(ctx context.Context, req *OrderCommonReq) (res *OrderC ...@@ -66,7 +67,7 @@ func (s *orderAli) Create(ctx context.Context, req *OrderCommonReq) (res *OrderC
//添加分销关系 //添加分销关系
for k,v:= range req.CargoParam { for k,v:= range req.CargoParam {
req.CargoParam[k].OutShopCode = "1" req.CargoParam[k].OutShopCode = "1"
req.CargoParam[k].OutItemCode = v.OutItemCode req.CargoParam[k].OutItemCode = gconv.String(v.OfferId)
req.CargoParam[k].Channel = "other" req.CargoParam[k].Channel = "other"
} }
result, err := server.Post(ctx, method, g.Map{ result, err := server.Post(ctx, method, g.Map{
...@@ -274,7 +275,7 @@ func (s *orderAli) Before(ctx context.Context, req *OrderCommonReq) (res *OrderB ...@@ -274,7 +275,7 @@ func (s *orderAli) Before(ctx context.Context, req *OrderCommonReq) (res *OrderB
//添加分销关系 //添加分销关系
for k,v:= range req.CargoParam { for k,v:= range req.CargoParam {
req.CargoParam[k].OutShopCode = "1" req.CargoParam[k].OutShopCode = "1"
req.CargoParam[k].OutItemCode = v.OutItemCode req.CargoParam[k].OutItemCode = gconv.String(v.OfferId)
req.CargoParam[k].Channel = "other" req.CargoParam[k].Channel = "other"
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论