聚推客订单返回数据结构修改
This commit is contained in:
parent
84fadc17b0
commit
cdb09a992f
@ -6,6 +6,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
"github.com/zywaited/xcopy"
|
||||||
|
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/client"
|
"gitee.com/chengdu-lenntc/third-platform-sdk/client"
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/util"
|
"gitee.com/chengdu-lenntc/third-platform-sdk/util"
|
||||||
@ -80,6 +81,9 @@ func (a *jutuikeApiImpl) QueryOrderList(ctx context.Context, req QueryOrderListR
|
|||||||
Errorf("[jutuikeApiImpl][QueryOrderList] response result error: %s", response.Msg)
|
Errorf("[jutuikeApiImpl][QueryOrderList] response result error: %s", response.Msg)
|
||||||
return nil, errors.New(response.Msg)
|
return nil, errors.New(response.Msg)
|
||||||
}
|
}
|
||||||
result := response.Data.(QueryOrderListData)
|
var responseData *QueryOrderListData
|
||||||
return &result, nil
|
if err := xcopy.Copy(&responseData, response.Data); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return responseData, nil
|
||||||
}
|
}
|
||||||
|
|||||||
@ -48,8 +48,8 @@ func (a *apiClientSuite) Test_GenerateLink() {
|
|||||||
|
|
||||||
func (a *apiClientSuite) Test_QueryOrderList() {
|
func (a *apiClientSuite) Test_QueryOrderList() {
|
||||||
req := QueryOrderListRequest{
|
req := QueryOrderListRequest{
|
||||||
StartTime: time.Now().Add(-1 * time.Minute).Format(time.DateTime),
|
StartTime: time.Unix(1718726400, 0).Format(time.DateTime),
|
||||||
EndTime: time.Now().Format(time.DateTime),
|
EndTime: time.Unix(1718812799, 0).Format(time.DateTime),
|
||||||
PageSize: 1,
|
PageSize: 1,
|
||||||
}
|
}
|
||||||
result, err := a.api.QueryOrderList(context.Background(), req)
|
result, err := a.api.QueryOrderList(context.Background(), req)
|
||||||
@ -62,5 +62,5 @@ func (a *apiClientSuite) Test_QueryOrderList() {
|
|||||||
a.T().Errorf("========[Test_QueryOrderList] json_marshal error:%s", err)
|
a.T().Errorf("========[Test_QueryOrderList] json_marshal error:%s", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
a.T().Logf("=====[Test_QueryOrderList] result: %s", string(resultByte))
|
a.T().Logf("================[Test_QueryOrderList] result: %s", string(resultByte))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -57,22 +57,27 @@ type QueryOrderListData struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type OrderItem struct {
|
type OrderItem struct {
|
||||||
ActName string `json:"act_name"` // 美团外卖 活动名称
|
ActName string `json:"act_name"` // 美团外卖 活动名称
|
||||||
ActId int32 `json:"act_id"` // 活动id,jd:19 、考拉:35、 pdd:14 、 淘宝:40 、vip:39 、47-高德打车 对应该接口 https://www.jutuike.com/doc/34
|
ActId int32 `json:"act_id"` // 活动id,jd:19 、考拉:35、 pdd:14 、 淘宝:40 、vip:39 、47-高德打车 对应该接口 https://www.jutuike.com/doc/34
|
||||||
Sid string `json:"sid"` // 123456 渠道标识
|
Sid string `json:"sid"` // 123456 渠道标识
|
||||||
PubId int32 `json:"pub_id"` // 推广者id,平台用户唯一id
|
PubId int32 `json:"pub_id"` // 推广者id,平台用户唯一id
|
||||||
JtkShareRate string `json:"jtk_share_rate"` // 佣金比例,0.1 则代表10% (实际佣金比率 = 比例x100)
|
JtkShareRate string `json:"jtk_share_rate"` // 佣金比例,0.1 则代表10% (实际佣金比率 = 比例x100)
|
||||||
JtkShareFee string `json:"jtk_share_fee"` // 佣金, 如1.2
|
JtkShareFee string `json:"jtk_share_fee"` // 佣金, 如1.2
|
||||||
OrderSn string `json:"order_sn"` // 订单号,如12345678
|
OrderSn string `json:"order_sn"` // 订单号,如12345678
|
||||||
OrderTitle string `json:"order_title"` // 北京烤鸭 商品名称
|
OrderTitle string `json:"order_title"` // 北京烤鸭 商品名称
|
||||||
CreateTime string `json:"create_time"` // 2021-06-05 21:41:52 下单时间
|
CreateTime string `json:"create_time"` // 2021-06-05 21:41:52 下单时间
|
||||||
PayTime string `json:"pay_time"` // 2021-06-05 21:41:52 付款时间
|
PayTime string `json:"pay_time"` // 2021-06-05 21:41:52 付款时间
|
||||||
ModifiedTime string `json:"modified_time"` // 2021-06-05 21:41:52 最后一次更新时间
|
ModifiedTime string `json:"modified_time"` // 2021-06-05 21:41:52 最后一次更新时间
|
||||||
OrderPrice string `json:"order_price"` // 商品单价
|
OrderPrice string `json:"order_price"` // 商品单价
|
||||||
PayPrice string `json:"pay_price"` // 实际付款金额
|
PayPrice string `json:"pay_price"` // 实际付款金额
|
||||||
Status int32 `json:"status"` // 订单统一状态,0:未付款 1:已付款 2:待结算 3:已结算 4:无效订单
|
Status int32 `json:"status"` // 订单统一状态,0:未付款 1:已付款 2:待结算 3:已结算 4:无效订单
|
||||||
StatusDesc string `json:"status_desc"` // 状态描述,如已付款
|
StatusDesc string `json:"status_desc"` // 状态描述,如已付款
|
||||||
Extension string `json:"extension"` // 扩展参数,可根据需要解析
|
Extension *OrderExtension `json:"extension"` // 扩展参数,可根据需要解析
|
||||||
BrandId int32 `json:"brand_id"` // 品牌id 1 美团 2 饿了么 3 拼多多 4 京东 5 肯德基 6 电影 7 麦当劳 8 话费充值 9 百果园 10 奈雪的茶 11 瑞幸咖啡 12 星巴克 13 喜茶 14 唯品会 15 滴滴/花小猪 16 汉堡王 17 高德打车 18 电费充值 19 会员充值 20 特价快递 21 联联周边游 22 抖音联盟 23 必胜客 24 旅划算 25 大牌餐券 26 千千惠生活 27 流量卡 28 同程出行 29 华莱士 30 T3出行 31 景点门票 32 淘宝
|
BrandId int32 `json:"brand_id"` // 品牌id 1 美团 2 饿了么 3 拼多多 4 京东 5 肯德基 6 电影 7 麦当劳 8 话费充值 9 百果园 10 奈雪的茶 11 瑞幸咖啡 12 星巴克 13 喜茶 14 唯品会 15 滴滴/花小猪 16 汉堡王 17 高德打车 18 电费充值 19 会员充值 20 特价快递 21 联联周边游 22 抖音联盟 23 必胜客 24 旅划算 25 大牌餐券 26 千千惠生活 27 流量卡 28 同程出行 29 华莱士 30 T3出行 31 景点门票 32 淘宝
|
||||||
InvalidReason string `json:"invalid_reason"` // 失效原因
|
InvalidReason string `json:"invalid_reason"` // 失效原因
|
||||||
|
}
|
||||||
|
|
||||||
|
type OrderExtension struct {
|
||||||
|
PicUrl string `json:"pic_url"` // 图片url
|
||||||
|
ShopName string `json:"shop_name"` // 店铺名
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user