提交 abca9724 authored 作者: zhanglibo's avatar zhanglibo

京东

上级 4bf303bb
......@@ -23,7 +23,7 @@ import (
)
//初始化配置【可在boot使用】
var conf *jingdong.Config
_ = g.Cfg().GetStruct("jd", &conf
_ = g.Cfg().GetStruct("jd", &conf)
jingdong.New(conf)
//订单详情
InfoRes,err:=jingdong.Order.GetOrderInfo(ctx, "236317795961")
......
......@@ -4,6 +4,7 @@ import (
"context"
"github.com/gogf/gf/container/garray"
"github.com/gogf/gf/encoding/gjson"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/util/gconv"
)
......@@ -16,7 +17,7 @@ type CheckSaleRes struct {
*CommonRes
Result []struct {
SkuId int `json:"skuid"` //商品编号
Name string `json:"name"` //销售名称
Name string `json:"name"` //商品名称
SaleState int `json:"saleState"` //是否可售 1:是,0:否
IsCanVAT int `json:"isCanVAT"` //是否可开增票,1:支持,0:不支持
Is7ToReturn int `json:"is7ToReturn"` //是否支持7天退货,1:是,0:不支持
......@@ -37,7 +38,13 @@ type GetStockRes struct {
SkuID int `json:"skuId"` //商品编号
AreaID string `json:"areaId"` //入参时传入的区域码area。因京东目前是3、4级地址均支持,存在areaId在传入的3级地址后填充4级地址“_0“后返回的情况。
StockStateID int `json:"stockStateId"` //存状态编号。 参考枚举值: 33,39,40,36,34,99
StockStateDesc string `json:"StockStateDesc"` //库存状态描述。以下为stockStateId不同时,此字段不同的返回值:
StockStateDesc string `json:"StockStateDesc"` /*库存状态描述。以下为stockStateId不同时,此字段不同的返回值:
33 有货 现货-下单立即发货
39 有货 在途-正在内部配货,预计2~6天到达本仓库
40 有货 可配货-下单后从有货仓库配货
36 预订
34 无货
99 无货开预定*/
} `json:"result"`
}
......@@ -49,23 +56,72 @@ type CheckAreaLimitRes struct {
} `json:"result"`
}
type GetUnionBalanceRes struct {
type GetProductsPriceRes struct {
*CommonRes
Result []struct {
SkuID int `json:"skuId"` //商品编码
Price float64 `json:"price"` //京东销售价
JdPrice float64 `json:"jdPrice"` //京东价
MarketPrice float64 `json:"marketPrice"` //京东的前台划线价
} `json:"result"`
}
type GetDetailRes struct {
*CommonRes
Result struct {
Balance struct {
Pin string `json:"pin"`
RemainLimit float64 `json:"remainLimit"`
} `json:"balance"`
}
SaleUnit string `json:"saleUnit"` //售卖单位
Weight string `json:"weight"` //重量
ProductArea string `json:"productArea"` //产地
WareQD string `json:"wareQD"` //包装清单
ImagePath string `json:"imagePath"` //主图
State int `json:"state"` //状态
Sku int `json:"sku"` //商品编号
BrandName string `json:"brandName"` //品牌名称
Category string `json:"category"` //分类 示例"670;729;4837"
Name string `json:"name"` //商品名称
Introduction string `json:"introduction"` //商品详情页大字段
IsFactoryShip string `json:"isFactoryShip"` //1 厂商直送;0 非厂商直送
IsSelf int `json:"isSelf"` //是否自营
LowestBuy interface{} `json:"LowestBuy"` //商品最低起购量
Wxintroduction string `json:"wxintroduction"` //微信小程序商品详情大字段,仅提供图片地址
} `json:"result"`
}
type GetProductsPriceRes struct {
type GetCategoryRes struct {
*CommonRes //异常代码(3422:获取分类列表信息失败;3423:分类列表不存在;1003:参数值不正确;5001:服务异常,请稍后重试;)
Result struct {
TotalRows int `json:"totalRows"`
PageNo int `json:"pageNo"`
PageSize int `json:"pageSize"`
Categorys []struct {
CatId int `json:"catId"` //分类ID
ParentId int `json:"parentId"` //父分类ID
Name string `json:"name"` //分类名称
CatClass int `json:"catClass"` //0:一级分类;1:二级分类;2:三级分类;
State int `json:"state"`
} `json:"categorys"`
} `json:"result"`
}
type GetSkuImageRes struct {
*CommonRes //异常代码(0010:返回数据为空;1001:参数为空;1003:参数值不正确/sku数量过多,目前最大支持100个商品)
Result map[string][]struct {
Id int `json:"id"` //编号
SkuId int `json:"skuId"` //商品编号
Path string `json:"path"` //图片路径
} `json:"result"`
}
type GetSimilarSkuRes struct {
*CommonRes
Result []struct {
SkuID int `json:"skuId"`
Price float64 `json:"price"`
JdPrice float64 `json:"jdPrice"`
MarketPrice float64 `json:"marketPrice"`
Dim int `json:"dim"` //维度
SaleName string `json:"saleName"` //销售名称
SaleAttrList []struct { //商品销售标签 销售属性下可能只有一个标签,此种场景可以选择显示销售名称和标签,也可以不显示
ImagePath string `json:"imagePath"` //标签图片地址
SaleValue string `json:"saleValue"` //标签名称
SkuIds []int `json:"skuIds"` //当前标签下的同类商品skuId
} `json:"saleAttrList"` //
} `json:"result"`
}
......@@ -132,7 +188,7 @@ func (goodsJD) CheckAreaLimit(ctx context.Context, skuIds *garray.Array, provinc
return
}
//GetProductsPrice 商品价格
//GetProductsPrice 查询商品价格
func (goodsJD) GetProductsPrice(ctx context.Context, skus *garray.Array) (res *GetProductsPriceRes, err error) {
method := "price/getSellPrice"
param := map[string]string{
......@@ -146,3 +202,61 @@ func (goodsJD) GetProductsPrice(ctx context.Context, skus *garray.Array) (res *G
err = gjson.New(result).Scan(&res)
return
}
//GetDetail 查询商品详情
func (goodsJD) GetDetail(ctx context.Context, skus *garray.Array) (res *GetDetailRes, err error) {
method := "product/getDetail"
param := map[string]string{
"sku": skus.Join(","),
"queryExts": "spuId,pName,isFactoryShip,isSelf,LowestBuy,wxintroduction",
}
result, err := server.requestApi(ctx, method, param)
if err != nil {
return
}
err = gjson.New(result).Scan(&res)
return
}
//GetCategory 查询分类列表
func (goodsJD) GetCategory(ctx context.Context, pageNo, pageSize interface{}) (res *GetCategoryRes, err error) {
method := "product/getCategorys"
param := g.MapStrStr{
"pageNo": gconv.String(pageNo),
"pageSize": gconv.String(pageSize),
}
result, err := server.requestApi(ctx, method, param)
if err != nil {
return
}
err = gjson.New(result).Scan(&res)
return
}
//GetSkuImage 查询商品图片
func (goodsJD) GetSkuImage(ctx context.Context, skus *garray.Array) (res *GetSkuImageRes, err error) {
method := "product/skuImage"
param := map[string]string{
"sku": skus.Join(","),
}
result, err := server.requestApi(ctx, method, param)
if err != nil {
return
}
err = gjson.New(result).Scan(&res)
return
}
//GetSimilarSku 查询同类商品
func (goodsJD) GetSimilarSku(ctx context.Context, skus *garray.Array) (res *GetSimilarSkuRes, err error) {
method := "product/getSimilarSku"
param := map[string]string{
"sku": skus.Join(","),
}
result, err := server.requestApi(ctx, method, param)
if err != nil {
return
}
err = gjson.New(result).Scan(&res)
return
}
......@@ -26,6 +26,32 @@ type DelPushMessages struct {
Result bool `json:"result"`
}
//GetPushMessages 获取消息 【每次是能获取100条,旧消息不删除不能获取最新消息】
//1:订单拆分消息{"id":推送id, "result" : {"pOrder" :父订单id} , "type": 1, "time":推送时间}
//2:商品价格变更{"id":推送id, "result":{"skuId" : 商品编号 }, "type": 2, "time":推送时间}
//4:商品上下架变更消息{"id":推送id, "result":{"skuId" : 商品编号 }, "type": 4 "time":推送时间}
//5:订单妥投消息{"id":推送id, "result":{"orderId":"京东订单编号", "state":"1是妥投,2是拒收"}, "type" : 5, "time":推送时间}
//6:商品池内商品添加、删除消息{"id":推送id, "result":{"skuId": 商品编号, "page_num":商品池编号, "state":"1添加,2删除"}, "type" : 6, "time":推送时间}
//10:订单取消消息{"id":推送id, "result":{" orderId": 京东订单编号 }, "type" : 10, "time":推送时间}
//11:发票开票进度消息{"id":推送id, "result":{"markId":"发票提报标识","state":"状态"}, "type" : 11, "time":推送时间}
//state状态:1:代表全部开票;2:代表驳回;3:部分开票;4:发票寄出
//12:配送单生成成功消息{"id":推送id, "result":{" orderId": 京东订单编号 }, "type" : 12, "time":推送时间}
//13:换新订单生成成功消息{"id":推送id, "result":{"afsServiceId": 服务单号, " orderId":换新订单号}, "type" : 13, "time":推送时间}
//14:支付失败消息{"id":推送id, "result":{" orderId": 京东订单编号}, "type" : 14, "time":推送时间}
//15:7天未支付取消消息/未确认取消消息{"id":推送id, "result":{"orderId": 京东订单编号, "cancelType": 取消类型}, "type" : 15, "time":推送时间}
//16:商品介绍及规格参数变更消息{"id":推送id, "result":{"skuId" : 商品编号 } "type" : 16, "time":推送时间}
//17:赠品促销变更消息{"id":推送id, "result":{"skuId" : 商品编号 } "type" : 17, "time":推送时间}
//18:订单等待确认收货消息{"id":推送id, "result":{"orderId":京东订单号} "type" : 18, "time":推送时间}
//23:订单配送退货消息{"id":推送id, "result":{"orderId":京东订单号} "type" : 23, "time":推送时间}
//25:新订单消息{"id":推送id, "result":{"orderId":京东订单号, "pin":"京东账号"} "type" : 25, "time":推送时间(订单创建时间)}
//26:预定订单消息{"id":推送id, "result":{"orderId":京东订单号} "type" : 26, "time":推送时间}
//28:售后服务单进度消息{"id":推送id, "result":{"orderId":京东订单号,"pin":"京东账号","skuId":商品编号,"afsServiceId":"服务单号","state":服务单状态} "type" : 28, "time":推送时间}
//31:订单完成消息{"orderId":123123123,"jdOrderState":19,"completeTime":"2018-09-20 16:21:21","pin":"测试pin"}
//48:商品池添加、删除消息{"id":推送id, "result":"{"poolType": "recommend", "page_num":"商品池编号", "state":"1添加,2删除"}", "type" : 28, "time":推送时间}
//49:折扣率变更消息{"id":推送id, "result":"{"oldRate":0.10,"category":"670-671-718","newRate":0.05,"type":1}" "type" : 28, "time":推送时间}
//50:京东地址变更消息[{ "id": "推送id", "result": { "areaId": "京东地址编码", "areaName": "京东地址名称", "parentId": "父京东ID编码", "areaLevel": “地址等级(行政级别:国家(1)、省(2)、市(3)、县(4)、镇(5))”, "operateType":”操作类型(插入数据为1,更新时为2,删除时为3)}”, "time":"消息推送时间", “type":”消息类型” } ]
//100:商品税率变更消息(目前未涵盖全部商品){"timestampLong": "1499136371666","features": "consumptionVAT:12,outputVAT:11,inputVAT:11","sku_id": "3213213"}
//102:专票资质审核进度消息 {"completeDate":"2019-01-09 00:19:14","pushDate":"2019-01-09 00:19:16","pins":"测试","reason":"财务审批通过","status":2,"unitName":"广州市翎唯营销策划有限公司","submitDate":"2018-09-25 15:56:47","taxpayerId":"914401055697802911","vatId":462260}
func (msgJD) GetPushMessages(ctx context.Context, id *garray.Array) (res *GetPushMessages, err error) {
method := "message/get"
param := map[string]string{
......@@ -39,6 +65,7 @@ func (msgJD) GetPushMessages(ctx context.Context, id *garray.Array) (res *GetPus
return
}
//DeletePushMessage 删除消息
func (msgJD) DeletePushMessage(ctx context.Context, id *garray.Array) (res *DelPushMessages, err error) {
method := "message/del"
param := map[string]string{
......
......@@ -17,15 +17,15 @@ type GetDeliveryRes struct {
*CommonRes
Result struct {
OrderTrack []struct {
Content string `json:"content"`
MsgTime string `json:"msgTime"`
Operator string `json:"operator"`
Content string `json:"content"` //操作内容明细
MsgTime string `json:"msgTime"` //操作时间。日期格式为“yyyy-MM-dd hh:mm:ss”
Operator string `json:"operator"` //操作员名称
} `json:"orderTrack"`
WaybillCode []struct {
OrderID string `json:"orderId"`
ParentID string `json:"parentId"`
Carrier string `json:"carrier"`
DeliveryOrderID string `json:"deliveryOrderId"`
OrderID string `json:"orderId"` //订单号
ParentID string `json:"parentId"` //父订单号。 此字段为0 未拆单
Carrier string `json:"carrier"` //承运商
DeliveryOrderID string `json:"deliveryOrderId"` //运单号
} `json:"waybillCode"`
JdOrderID int `json:"jdOrderId"`
} `json:"result"`
......@@ -33,83 +33,83 @@ type GetDeliveryRes struct {
//PriceSnap 商品价格
type PriceSnap struct {
SkuID int `json:"skuId"`
Price int `json:"price"`
SkuID int `json:"skuId"` //商品编号
Price int `json:"price"` //商品价格 格式:21.30
}
//PlaceOrderReq 下单
type PlaceOrderReq struct {
OrderSn string
OrderSn string //订单单号
SkuNums []*SkuNums
Consignee string
Phone string
Consignee string //收货人姓名,最多20个字符
Phone string //手机号,最多20个字符
Address *PlaceOrderAddress
PriceSnap []*PriceSnap
}
//PlaceOrderAddress 下单地址
type PlaceOrderAddress struct {
Province string
City string
County string
Town string
Desc string
Province string //一级地址编码
City string //二级地址编码
County string //三级地址编码
Town string //四级地址编码
Desc string //收货人详细地址,最多100个字符
}
//PlaceOrderRes 下单
type PlaceOrderRes struct {
*CommonRes
Result struct {
JdOrderID int64 `json:"jdOrderId"`
OrderPrice float64 `json:"orderPrice"`
OrderNakedPrice float64 `json:"orderNakedPrice"`
OrderTaxPrice float64 `json:"orderTaxPrice"`
JdOrderID int64 `json:"jdOrderId"` //京东订单号
OrderPrice float64 `json:"orderPrice"` //订单总金额
OrderNakedPrice float64 `json:"orderNakedPrice"` //订单未税金额
OrderTaxPrice float64 `json:"orderTaxPrice"` //订单税额
Sku []*OrderSkuItem `json:"sku"`
} `json:"result"`
}
//OrderSkuItem 订单商品
type OrderSkuItem struct {
SkuID int `json:"skuId"`
Num int `json:"num"`
Price float64 `json:"price"`
Name string `json:"name"`
NakedPrice float64 `json:"nakedPrice"`
SkuID int `json:"skuId"` //商品编号
Num int `json:"num"` //商品数量
Price float64 `json:"price"` //商品单价
Name string `json:"name"` //商品名称
NakedPrice float64 `json:"nakedPrice"` //商品未税价
}
//ReflectOrderRes 反查订单
type ReflectOrderRes struct {
*CommonRes
Result string `json:"result"`
Result string `json:"result"` //第三方订单号(非京东订单号)
}
//GetOrderRes 订单详情
type GetOrderRes struct {
*CommonRes
Result struct {
JdOrderID int64 `json:"jdOrderId"`
Type int `json:"type"`
Freight float64 `json:"freight"`
OrderPrice float64 `json:"orderPrice"`
OrderNakedPrice float64 `json:"orderNakedPrice"`
OrderTaxPrice float64 `json:"orderTaxPrice"`
Sku []*OrderSkuItem `json:"sku"`
OrderState int `json:"orderState"`
State int `json:"state"`
JdOrderID int64 `json:"jdOrderId"` //京东订单编号
Type int `json:"type"` //订单类型。1是父订单 2是子订单
Freight float64 `json:"freight"` //运费
OrderPrice float64 `json:"orderPrice"` //订单总金额
OrderNakedPrice float64 `json:"orderNakedPrice"` //订单未含税金额
OrderTaxPrice float64 `json:"orderTaxPrice"` //订单税额
Sku []*OrderSkuItem `json:"sku"` //商品列表
OrderState int `json:"orderState"` //订单状态。0为取消订单 1为有效
State int `json:"state"` //物流状态。0 是新建 1是妥投 2是拒收
POrder struct {
JdOrderID int64 `json:"jdOrderId"`
Freight float64 `json:"freight"`
OrderPrice float64 `json:"orderPrice"`
OrderNakedPrice float64 `json:"orderNakedPrice"`
Sku []*OrderSkuItem `json:"sku"`
JdOrderID int64 `json:"jdOrderId"` //京东订单编号
Freight float64 `json:"freight"` //运费
OrderPrice float64 `json:"orderPrice"` //订单总金额
OrderNakedPrice float64 `json:"orderNakedPrice"` //订单未含税金额
Sku []*OrderSkuItem `json:"sku"` //商品列表
} `json:"pOrder"`
COrder []struct {
POrder string `json:"pOrder"`
JdOrderID int `json:"jdOrderId"`
Freight float64 `json:"freight"`
OrderPrice float64 `json:"orderPrice"`
OrderNakedPrice float64 `json:"orderNakedPrice"`
Sku []OrderSkuItem `json:"sku"`
POrder string `json:"pOrder"` //父订单号。为0时,此订单为父单。
JdOrderID int `json:"jdOrderId"` //京东订单编号
Freight float64 `json:"freight"` //运费
OrderPrice float64 `json:"orderPrice"` //订单总金额
OrderNakedPrice float64 `json:"orderNakedPrice"` //订单未含税金额
Sku []OrderSkuItem `json:"sku"` //商品列表
} `json:"cOrder"`
} `json:"result"`
}
......@@ -118,16 +118,16 @@ type GetOrderRes struct {
type GetFreightRes struct {
*CommonRes
Result struct {
Freight float64 `json:"freight"`
BaseFreight float64 `json:"baseFreight"`
RemoteRegionFreight float64 `json:"remoteRegionFreight"`
Freight float64 `json:"freight"` //总运费
BaseFreight float64 `json:"baseFreight"` //基础运费
RemoteRegionFreight float64 `json:"remoteRegionFreight"` //偏远地区加收运费
} `json:"result"`
}
//SkuNums 商品数量
type SkuNums struct {
SkuID int `json:"skuId"`
Num int `json:"num"`
SkuID int `json:"skuId"` //商品编号
Num int `json:"num"` //商品数量
}
// GetDelivery 物流信息
......
......@@ -18,17 +18,17 @@ type RefundCancelRes struct {
}
type ApplyReq struct {
JdOrderId uint `json:"jdOrderId"`
CustomerExpect uint `json:"customerExpect"`
QuestionDesc string `json:"questionDesc"`
IsNeedDetectionReport bool `json:"isNeedDetectionReport"`
IsHasPackage bool `json:"isHasPackage"`
QuestionPic string `json:"questionPic"`
PackageDesc int `json:"packageDesc"`
UserInfoDto *AfterSaleCustomerDto `json:"asCustomerDto"`
PickDto *AfterSalePickwareDto `json:"asPickwareDto"`
ReturnDto *AfterSaleReturnwareDto `json:"asReturnwareDto"`
DetailDto *AfterSaleDetailDto `json:"asDetailDto"`
JdOrderId uint `json:"jdOrderId"` //京东订单号
CustomerExpect uint `json:"customerExpect"` //售后类型:退货(10)、换货(20)、维修(30)
QuestionDesc string `json:"questionDesc"` //产品问题描述,最多1000字符
IsNeedDetectionReport bool `json:"isNeedDetectionReport"` //是否需要检测报告
IsHasPackage bool `json:"isHasPackage"` //是否有包装
QuestionPic string `json:"questionPic"` //问题描述图片.最多2000字符
PackageDesc int `json:"packageDesc"` //包装描述:0 无包装 10 包装完整20 包装破损
UserInfoDto *AfterSaleCustomerDto `json:"asCustomerDto"` //客户信息实体
PickDto *AfterSalePickwareDto `json:"asPickwareDto"` //取件信息实体
ReturnDto *AfterSaleReturnwareDto `json:"asReturnwareDto"` //返件信息实体
DetailDto *AfterSaleDetailDto `json:"asDetailDto"` //申请单明细
}
type AfterSaleCustomerDto struct {
......@@ -61,22 +61,22 @@ type AfterSaleDetailDto struct {
}
type GetServiceListReq struct {
JdOrderID string `json:"jdOrderId"`
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
JdOrderID string `json:"jdOrderId"` //京东订单号
PageIndex int `json:"pageIndex"` //页码,1代表第一页
PageSize int `json:"pageSize"` //每页记录数, 大小取值范围[1,100]
}
type GetServiceListRes struct {
*CommonRes
Result struct {
TotalNum int `json:"totalNum"`
PageSize int `json:"pageSize"`
PageNum int `json:"pageNum"`
PageIndex int `json:"pageIndex"`
TotalNum int `json:"totalNum"` //总记录数
PageSize int `json:"pageSize"` //每页记录数
PageNum int `json:"pageNum"` //总页数
PageIndex int `json:"pageIndex"` //当前页数
ServiceInfoList []struct {
AfsServiceId int `json:"afsServiceId"`
WareId int `json:"wareId"`
Cancel int `json:"cancel"`
AfsServiceId int `json:"afsServiceId"` //服务单号
WareId int `json:"wareId"` //商品编号
Cancel int `json:"cancel"` //是否可取消: 0代表否,1代表是
} `json:"serviceInfoList"`
} `json:"result"`
}
......@@ -84,59 +84,59 @@ type GetServiceListRes struct {
type GetServiceDetailRes struct {
*CommonRes
Result struct {
AfsServiceId int `json:"afsServiceId"`
CustomerExpect int `json:"customerExpect"`
AfsApplyTime string `json:"afsApplyTime"`
OrderId int `json:"orderId"`
ApproveNotes string `json:"approveNotes"`
ApprovedResult int `json:"approvedResult"`
AfsServiceStep int `json:"afsServiceStep"`
ProcessResult int `json:"processResult"`
AfsServiceId int `json:"afsServiceId"` //京东售后服务单号
CustomerExpect int `json:"customerExpect"` //服务类型码:退货(10)、换货(20)、维修(20)
AfsApplyTime string `json:"afsApplyTime"` //服务单申请时间:格式为yyyy-MM-dd HH:mm:ss
OrderId int `json:"orderId"` //京东订单号
ApproveNotes string `json:"approveNotes"` //审核意见
ApprovedResult int `json:"approvedResult"` //审核结果:直赔积分 (11),直赔余额 (12),直赔优惠卷 (13),直赔京豆 (14),直赔商品 (21),上门换新 (22),自营取件 (31),客户送货(32),客户发货 (33),闪电退款 (34),虚拟退款 (35),大家电检测 (80),大家电安装 (81),大家电移机 (82),大家电维修 (83),大家电其它(84);
AfsServiceStep int `json:"afsServiceStep"` //服务单环节:申请阶段(10),审核不通过(20),客服审核(21),商家审核(22),京东收货(31),商家收货(32), 京东处理(33),商家处理(34), 用户确认(40),完成(50), 取消(60);
ProcessResult int `json:"processResult"` //处理结果:返修换新(23),退货(40), 换良(50),原返(60),病单(71),出检(72),维修(73),强制关单 (80),线下换新(90)
ServiceAftersalesAddressInfoDTO struct {
Address string `json:"address"`
Tel string `json:"tel"`
LinkMan string `json:"linkMan"`
PostCode string `json:"postCode"`
} `json:"serviceAftersalesAddressInfoDto"`
Address string `json:"address"` //售后地址
Tel string `json:"tel"` //售后电话
LinkMan string `json:"linkMan"` //售后联系人
PostCode string `json:"postCode"` //售后邮编
} `json:"serviceAftersalesAddressInfoDto"` //售后地址信息
ServiceFinanceDetailInfoDTOs []struct {
ServiceFinanceDetailInfoDTO
RefundPrice float64 `json:"refundPrice"`
} `json:"serviceFinanceDetailInfoDTOs"`
RefundPrice float64 `json:"refundPrice"` //退款金额
} `json:"serviceFinanceDetailInfoDTOs"` //退款明细
} `json:"result"`
}
type ServiceFinanceDetailInfoDTO struct {
RefundWay int `json:"refundWay"`
RefundWayName string `json:"refundWayName"`
Status int `json:"status"`
StatusName string `json:"statusName"`
WareName string `json:"wareName"`
WareId int `json:"wareId"`
RefundWay int `json:"refundWay"` //退款方式
RefundWayName string `json:"refundWayName"` //退款方式名称
Status int `json:"status"` //状态
StatusName string `json:"statusName"` //状态名称
WareName string `json:"wareName"` //商品名称
WareId int `json:"wareId"` //商品编号
}
type RefundCommonReq struct {
OrderID string `json:"jdOrderId"`
SkuID string `json:"skuId"`
OrderID string `json:"jdOrderId"` //订单编号
SkuID string `json:"skuId"` //商品编号
}
type CheckIsSupportRes struct {
*CommonRes
Result int `json:"result"`
Result int `json:"result"` //可申请时返回可申请数量
}
type GetSupportTypeRes struct {
*CommonRes
Result []*CodeItem `json:"result"`
Result []*CodeItem `json:"result"` //服务类型码:退货(10)、换货(20)、维修(30) 服务类型名称:退货、换货、维修
}
type CodeItem struct {
Code string `json:"code"`
Name string `json:"name"`
Code string `json:"code"` //编码
Name string `json:"name"` //名称
}
type GetReturnTypeRes struct {
*CommonRes
Result []*CodeItem `json:"result"`
Result []*CodeItem `json:"result"` //服务类型码:上门取件(4)、客户发货(40)、客户送货(7) 服务类型名称:上门取件、客户发货、客户送货
}
// UpdateSendSku 根据填写单号
......@@ -220,8 +220,10 @@ func (refundJD) GetServiceList(ctx context.Context, req string) (res *GetService
// GetServiceDetail 根据服务单号查询服务单明细信息
func (refundJD) GetServiceDetail(ctx context.Context, req string) (res *GetServiceDetailRes, err error) {
method := "afterSale/getServiceDetailInfo"
var reqJson = gjson.New("")
_ = reqJson.Set("afsServiceId", req)
param := g.MapStrStr{
"param": req,
"param": reqJson.MustToJsonString(),
}
result, err := server.requestApi(ctx, method, param)
if err != nil {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论