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

Merge branch 'featrue/suning'

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