提交 c4d0d5ef authored 作者: 屈传平's avatar 屈传平

Merge branch 'featrue/suning'

......@@ -2,7 +2,7 @@ package suning
import (
"context"
"encoding/json"
"github.com/gogf/gf/encoding/gjson"
)
//
......@@ -52,7 +52,7 @@ func GetGoodsList(ctx context.Context, page, pageSize, startTime, endTime string
if nil != err {
return
}
err = json.Unmarshal([]byte(result), &res)
err = gjson.New(result).Scan(&res)
return
}
......@@ -107,7 +107,7 @@ func GetGoodsDetail(ctx context.Context, skuId, supplierCode string) (res GoodsD
if nil != err {
return
}
err = json.Unmarshal([]byte(result), &res)
err = gjson.New(result).Scan(&res)
return
}
......@@ -156,7 +156,7 @@ func GetGoodsBaseDetail(ctx context.Context, skuId, supplierCode string) (res Go
if nil != err {
return
}
err = json.Unmarshal([]byte(result), &res)
err = gjson.New(result).Scan(&res)
return
}
......@@ -194,7 +194,7 @@ func GetGoodsDetailImage(ctx context.Context, skuId, supplierCode string) (res G
if nil != err {
return
}
err = json.Unmarshal([]byte(result), &res)
err = gjson.New(result).Scan(&res)
return
}
......@@ -235,7 +235,7 @@ func GetMinOrderQuantity(ctx context.Context, req []*MinOrderSkus) (res GoodsMin
if nil != err {
return
}
err = json.Unmarshal([]byte(result), &res)
err = gjson.New(result).Scan(&res)
return
}
......@@ -280,6 +280,6 @@ func GetGoodsPassPartProductInfo(ctx context.Context, spuId, supplierCode string
if nil != err {
return
}
err = json.Unmarshal([]byte(result), &res)
err = gjson.New(result).Scan(&res)
return
}
......@@ -2,7 +2,7 @@ package suning
import (
"context"
"encoding/json"
"github.com/gogf/gf/encoding/gjson"
)
type CmmdtyInfoList struct {
......@@ -53,7 +53,7 @@ func GetGoodsListPrice(ctx context.Context, goodsList []*CmmdtyInfoList, cityCod
if nil != err {
return
}
err = json.Unmarshal([]byte(result), &res)
err = gjson.New(result).Scan(&res)
return
}
......@@ -108,6 +108,6 @@ func GetGoodsCatPrice(ctx context.Context, goodsList []*CmmdtyCatInfoList, cityC
if nil != err {
return
}
err = json.Unmarshal([]byte(result), &res)
err = gjson.New(result).Scan(&res)
return
}
......@@ -2,7 +2,7 @@ package suning
import (
"context"
"encoding/json"
"github.com/gogf/gf/encoding/gjson"
)
type QueryMessageReq struct {
......@@ -70,7 +70,7 @@ func QueryMessage(ctx context.Context, msgType, pageNo, pageSize string) (res Qu
if nil != err {
return
}
err = json.Unmarshal([]byte(result), &res)
err = gjson.New(result).Scan(&res)
return
}
......@@ -107,6 +107,6 @@ func MessageDel(ctx context.Context, msgType string, msgList []*MessageDelReqMsg
if nil != err {
return
}
err = json.Unmarshal([]byte(result), &res)
err = gjson.New(result).Scan(&res)
return
}
......@@ -2,7 +2,7 @@ package suning
import (
"context"
"encoding/json"
"github.com/gogf/gf/encoding/gjson"
)
type OrderCreateReq struct {
......@@ -80,7 +80,7 @@ func OrderCreate(ctx context.Context, req *OrderCreateReq) (res OrderCreateRes,
if nil != err {
return
}
err = json.Unmarshal([]byte(result), &res)
err = gjson.New(result).Scan(&res)
return
}
......@@ -112,7 +112,7 @@ func OrderConfirm(ctx context.Context, orderId string) (res OrderConfirmRes, err
if nil != err {
return
}
err = json.Unmarshal([]byte(result), &res)
err = gjson.New(result).Scan(&res)
return
}
......@@ -150,6 +150,6 @@ func GetOrderStatus(ctx context.Context, orderId string) (res OrderStatusRes, er
if nil != err {
return
}
err = json.Unmarshal([]byte(result), &res)
err = gjson.New(result).Scan(&res)
return
}
......@@ -2,7 +2,7 @@ package suning
import (
"context"
"encoding/json"
"github.com/gogf/gf/encoding/gjson"
)
type AllAddressServiceReq struct {
......@@ -38,6 +38,6 @@ func AllAddressService(ctx context.Context) (res AllAddressServiceRes, err error
if nil != err {
return
}
err = json.Unmarshal([]byte(result), &res)
err = gjson.New(result).Scan(&res)
return
}
......@@ -2,7 +2,7 @@ package suning
import (
"context"
"encoding/json"
"github.com/gogf/gf/encoding/gjson"
)
type OrderLogistReq struct {
......@@ -40,7 +40,7 @@ func GetOrderLogist(ctx context.Context, OrderItemId string) (res OrderLogistRes
if nil != err {
return
}
err = json.Unmarshal([]byte(result), &res)
err = gjson.New(result).Scan(&res)
return
}
......@@ -82,6 +82,6 @@ func OrderConfirmReceipt(ctx context.Context, OrderId string, SkuConfirmList []*
if nil != err {
return
}
err = json.Unmarshal([]byte(result), &res)
err = gjson.New(result).Scan(&res)
return
}
......@@ -2,7 +2,7 @@ package suning
import (
"context"
"encoding/json"
"github.com/gogf/gf/encoding/gjson"
)
type OrderReturnGoodsSubmitReq struct {
......@@ -42,7 +42,7 @@ func OrderReturnGoodsSubmit(ctx context.Context, req *OrderReturnGoodsSubmitReq)
if nil != err {
return
}
err = json.Unmarshal([]byte(result), &res)
err = gjson.New(result).Scan(&res)
return
}
......@@ -74,7 +74,7 @@ func OrderReturnCancel(ctx context.Context, OrderItemId string) (res OrderReturn
if nil != err {
return
}
err = json.Unmarshal([]byte(result), &res)
err = gjson.New(result).Scan(&res)
return
}
......@@ -123,7 +123,7 @@ func OrderReturnExchangeDetailInfo(ctx context.Context, OrderItemId string) (res
if nil != err {
return
}
err = json.Unmarshal([]byte(result), &res)
err = gjson.New(result).Scan(&res)
return
}
......@@ -175,7 +175,7 @@ func OrderReturnAfterSaleService(ctx context.Context, OrderItemId string) (res O
if nil != err {
return
}
err = json.Unmarshal([]byte(result), &res)
err = gjson.New(result).Scan(&res)
return
}
......@@ -232,7 +232,7 @@ func OrderReturnCurrentEventOperation(ctx context.Context, OrderItemId string) (
if nil != err {
return
}
err = json.Unmarshal([]byte(result), &res)
err = gjson.New(result).Scan(&res)
return
}
......@@ -268,7 +268,7 @@ func OrderReturnLogNumSubmit(ctx context.Context, OrderItemId, ExpressOrderId, E
if nil != err {
return
}
err = json.Unmarshal([]byte(result), &res)
err = gjson.New(result).Scan(&res)
return
}
......@@ -300,6 +300,6 @@ func OerReturnConfirmGoods(ctx context.Context, OrderItemId string) (res OerRetu
if nil != err {
return
}
err = json.Unmarshal([]byte(result), &res)
err = gjson.New(result).Scan(&res)
return
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论