Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录
切换导航
L
library
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
stbz
library
Commits
3317ba7c
提交
3317ba7c
authored
5月 13, 2022
作者:
zhanglibo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
京东
上级
55562f53
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
28 行增加
和
28 行删除
+28
-28
jingdong_address.go
upstream/jingdong/jingdong_address.go
+3
-3
jingdong_goods.go
upstream/jingdong/jingdong_goods.go
+9
-9
jingdong_msg.go
upstream/jingdong/jingdong_msg.go
+2
-2
jingdong_order.go
upstream/jingdong/jingdong_order.go
+5
-5
jingdong_refund.go
upstream/jingdong/jingdong_refund.go
+9
-9
没有找到文件。
upstream/jingdong/jingdong_address.go
浏览文件 @
3317ba7c
...
...
@@ -34,7 +34,7 @@ type GetTownRes struct {
}
//Parse 地址详情转换京东地址编码
func
(
addressJD
)
Parse
(
ctx
context
.
Context
,
address
string
)
(
res
*
ParseRes
,
err
error
)
{
func
(
*
addressJD
)
Parse
(
ctx
context
.
Context
,
address
string
)
(
res
*
ParseRes
,
err
error
)
{
method
:=
"area/getJDAddressFromAddress"
param
:=
g
.
Map
{
"address"
:
address
,
...
...
@@ -49,7 +49,7 @@ func (addressJD) Parse(ctx context.Context, address string) (res *ParseRes, err
}
// CheckArea 验证地址有效性
func
(
addressJD
)
CheckArea
(
ctx
context
.
Context
,
provinceId
,
cityId
,
countyId
,
townId
interface
{})
(
res
*
CommonRes
,
err
error
)
{
func
(
*
addressJD
)
CheckArea
(
ctx
context
.
Context
,
provinceId
,
cityId
,
countyId
,
townId
interface
{})
(
res
*
CommonRes
,
err
error
)
{
method
:=
"area/checkArea"
param
:=
g
.
Map
{
"provinceId"
:
gconv
.
String
(
provinceId
),
...
...
@@ -67,7 +67,7 @@ func (addressJD) CheckArea(ctx context.Context, provinceId, cityId, countyId, to
}
// GetTown 查询四级地址
func
(
addressJD
)
GetTown
(
ctx
context
.
Context
,
id
interface
{})
(
res
*
GetTownRes
,
err
error
)
{
func
(
*
addressJD
)
GetTown
(
ctx
context
.
Context
,
id
interface
{})
(
res
*
GetTownRes
,
err
error
)
{
method
:=
"area/getTown"
param
:=
g
.
Map
{
"id"
:
gconv
.
String
(
id
),
...
...
upstream/jingdong/jingdong_goods.go
浏览文件 @
3317ba7c
...
...
@@ -138,7 +138,7 @@ type GetSimilarSkuRes struct {
}
// CheckSale 商品可售验证接口
func
(
goodsJD
)
CheckSale
(
ctx
context
.
Context
,
req
*
garray
.
Array
)
(
res
*
CheckSaleRes
,
err
error
)
{
func
(
*
goodsJD
)
CheckSale
(
ctx
context
.
Context
,
req
*
garray
.
Array
)
(
res
*
CheckSaleRes
,
err
error
)
{
method
:=
"product/check"
param
:=
g
.
Map
{
"skuIds"
:
req
.
Join
(
","
),
...
...
@@ -153,7 +153,7 @@ func (goodsJD) CheckSale(ctx context.Context, req *garray.Array) (res *CheckSale
}
// CheckOnSale 查询商品上下架状态
func
(
goodsJD
)
CheckOnSale
(
ctx
context
.
Context
,
req
*
garray
.
Array
)
(
res
*
CheckOnSaleRes
,
err
error
)
{
func
(
*
goodsJD
)
CheckOnSale
(
ctx
context
.
Context
,
req
*
garray
.
Array
)
(
res
*
CheckOnSaleRes
,
err
error
)
{
method
:=
"product/skuState"
param
:=
g
.
Map
{
"sku"
:
req
.
Join
(
","
),
...
...
@@ -167,7 +167,7 @@ func (goodsJD) CheckOnSale(ctx context.Context, req *garray.Array) (res *CheckOn
}
//GetStock 查询商品库存
func
(
goodsJD
)
GetStock
(
ctx
context
.
Context
,
req
[]
*
SkuNums
,
area
string
)
(
res
*
GetStockRes
,
err
error
)
{
func
(
*
goodsJD
)
GetStock
(
ctx
context
.
Context
,
req
[]
*
SkuNums
,
area
string
)
(
res
*
GetStockRes
,
err
error
)
{
method
:=
"stock/getNewStockById"
param
:=
g
.
Map
{
"skuNums"
:
gjson
.
New
(
req
)
.
MustToJsonString
(),
...
...
@@ -192,7 +192,7 @@ func (goodsJD) GetStock(ctx context.Context, req []*SkuNums, area string) (res *
}
// CheckAreaLimit 查询商品区域购买限制
func
(
goodsJD
)
CheckAreaLimit
(
ctx
context
.
Context
,
skuIds
*
garray
.
Array
,
provinceID
,
cityID
,
countyID
,
townID
interface
{})
(
res
*
CheckAreaLimitRes
,
err
error
)
{
func
(
*
goodsJD
)
CheckAreaLimit
(
ctx
context
.
Context
,
skuIds
*
garray
.
Array
,
provinceID
,
cityID
,
countyID
,
townID
interface
{})
(
res
*
CheckAreaLimitRes
,
err
error
)
{
method
:=
"product/checkAreaLimit"
param
:=
g
.
Map
{
"skuIds"
:
skuIds
.
Join
(
","
),
...
...
@@ -219,7 +219,7 @@ func (goodsJD) CheckAreaLimit(ctx context.Context, skuIds *garray.Array, provinc
}
//GetProductsPrice 查询商品价格
func
(
goodsJD
)
GetProductsPrice
(
ctx
context
.
Context
,
skus
*
garray
.
Array
)
(
res
*
GetProductsPriceRes
,
err
error
)
{
func
(
*
goodsJD
)
GetProductsPrice
(
ctx
context
.
Context
,
skus
*
garray
.
Array
)
(
res
*
GetProductsPriceRes
,
err
error
)
{
method
:=
"price/getSellPrice"
param
:=
g
.
Map
{
"sku"
:
skus
.
Join
(
","
),
...
...
@@ -234,7 +234,7 @@ func (goodsJD) GetProductsPrice(ctx context.Context, skus *garray.Array) (res *G
}
//GetDetail 查询商品详情
func
(
goodsJD
)
GetDetail
(
ctx
context
.
Context
,
skus
*
garray
.
Array
)
(
res
*
GetDetailRes
,
err
error
)
{
func
(
*
goodsJD
)
GetDetail
(
ctx
context
.
Context
,
skus
*
garray
.
Array
)
(
res
*
GetDetailRes
,
err
error
)
{
method
:=
"product/getDetail"
param
:=
g
.
Map
{
"sku"
:
skus
.
Join
(
","
),
...
...
@@ -249,7 +249,7 @@ func (goodsJD) GetDetail(ctx context.Context, skus *garray.Array) (res *GetDetai
}
//GetCategory 查询分类列表
func
(
goodsJD
)
GetCategory
(
ctx
context
.
Context
,
pageNo
,
pageSize
interface
{})
(
res
*
GetCategoryRes
,
err
error
)
{
func
(
*
goodsJD
)
GetCategory
(
ctx
context
.
Context
,
pageNo
,
pageSize
interface
{})
(
res
*
GetCategoryRes
,
err
error
)
{
method
:=
"product/getCategorys"
param
:=
g
.
Map
{
"pageNo"
:
gconv
.
String
(
pageNo
),
...
...
@@ -264,7 +264,7 @@ func (goodsJD) GetCategory(ctx context.Context, pageNo, pageSize interface{}) (r
}
//GetSkuImage 查询商品图片
func
(
goodsJD
)
GetSkuImage
(
ctx
context
.
Context
,
skus
*
garray
.
Array
)
(
res
*
GetSkuImageRes
,
err
error
)
{
func
(
*
goodsJD
)
GetSkuImage
(
ctx
context
.
Context
,
skus
*
garray
.
Array
)
(
res
*
GetSkuImageRes
,
err
error
)
{
method
:=
"product/skuImage"
param
:=
g
.
Map
{
"sku"
:
skus
.
Join
(
","
),
...
...
@@ -278,7 +278,7 @@ func (goodsJD) GetSkuImage(ctx context.Context, skus *garray.Array) (res *GetSku
}
//GetSimilarSku 查询同类商品
func
(
goodsJD
)
GetSimilarSku
(
ctx
context
.
Context
,
skus
interface
{})
(
res
*
GetSimilarSkuRes
,
err
error
)
{
func
(
*
goodsJD
)
GetSimilarSku
(
ctx
context
.
Context
,
skus
interface
{})
(
res
*
GetSimilarSkuRes
,
err
error
)
{
method
:=
"product/getSimilarSku"
param
:=
g
.
Map
{
"skuId"
:
skus
,
...
...
upstream/jingdong/jingdong_msg.go
浏览文件 @
3317ba7c
...
...
@@ -53,7 +53,7 @@ type DelPushMessages struct {
//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
)
{
func
(
*
msgJD
)
GetPushMessages
(
ctx
context
.
Context
,
id
*
garray
.
Array
)
(
res
*
GetPushMessages
,
err
error
)
{
method
:=
"message/get"
param
:=
g
.
Map
{
"type"
:
id
.
Join
(
","
),
...
...
@@ -67,7 +67,7 @@ func (msgJD) GetPushMessages(ctx context.Context, id *garray.Array) (res *GetPus
}
//DeletePushMessage 删除消息
func
(
msgJD
)
DeletePushMessage
(
ctx
context
.
Context
,
id
*
garray
.
Array
)
(
res
*
DelPushMessages
,
err
error
)
{
func
(
*
msgJD
)
DeletePushMessage
(
ctx
context
.
Context
,
id
*
garray
.
Array
)
(
res
*
DelPushMessages
,
err
error
)
{
method
:=
"message/del"
param
:=
g
.
Map
{
"id"
:
id
.
Join
(
","
),
...
...
upstream/jingdong/jingdong_order.go
浏览文件 @
3317ba7c
...
...
@@ -147,7 +147,7 @@ func (*orderJD) GetDelivery(ctx context.Context, OrderID string) (res *GetDelive
}
// PlaceOrder 下单
func
(
orderJD
)
PlaceOrder
(
ctx
context
.
Context
,
req
*
PlaceOrderReq
)
(
res
*
PlaceOrderRes
,
err
error
)
{
func
(
*
orderJD
)
PlaceOrder
(
ctx
context
.
Context
,
req
*
PlaceOrderReq
)
(
res
*
PlaceOrderRes
,
err
error
)
{
method
:=
"order/submitOrder"
var
param
=
g
.
Map
{
"thirdOrder"
:
req
.
OrderSn
,
...
...
@@ -181,7 +181,7 @@ func (orderJD) PlaceOrder(ctx context.Context, req *PlaceOrderReq) (res *PlaceOr
}
// ReflectOrder 反查订单
func
(
orderJD
)
ReflectOrder
(
ctx
context
.
Context
,
thirdOrder
string
)
(
res
*
ReflectOrderRes
,
err
error
)
{
func
(
*
orderJD
)
ReflectOrder
(
ctx
context
.
Context
,
thirdOrder
string
)
(
res
*
ReflectOrderRes
,
err
error
)
{
method
:=
"order/selectJdOrderIdByThirdOrder"
param
:=
g
.
Map
{
"thirdOrder"
:
thirdOrder
,
...
...
@@ -195,7 +195,7 @@ func (orderJD) ReflectOrder(ctx context.Context, thirdOrder string) (res *Reflec
}
// GetOrderInfo 订单详情
func
(
orderJD
)
GetOrderInfo
(
ctx
context
.
Context
,
OrderID
string
)
(
res
*
GetOrderRes
,
err
error
)
{
func
(
*
orderJD
)
GetOrderInfo
(
ctx
context
.
Context
,
OrderID
string
)
(
res
*
GetOrderRes
,
err
error
)
{
method
:=
"order/selectJdOrder"
param
:=
g
.
Map
{
"jdOrderId"
:
OrderID
,
...
...
@@ -209,7 +209,7 @@ func (orderJD) GetOrderInfo(ctx context.Context, OrderID string) (res *GetOrderR
}
// GetFreight 查询运费
func
(
orderJD
)
GetFreight
(
ctx
context
.
Context
,
sku
[]
*
SkuNums
,
province
,
city
,
county
,
town
string
)
(
res
*
GetFreightRes
,
err
error
)
{
func
(
*
orderJD
)
GetFreight
(
ctx
context
.
Context
,
sku
[]
*
SkuNums
,
province
,
city
,
county
,
town
string
)
(
res
*
GetFreightRes
,
err
error
)
{
method
:=
"order/getFreight"
param
:=
g
.
Map
{
"sku"
:
gjson
.
New
(
sku
)
.
MustToJsonString
(),
...
...
@@ -228,7 +228,7 @@ func (orderJD) GetFreight(ctx context.Context, sku []*SkuNums, province, city, c
}
// ConfirmReceived 确认收货
func
(
orderJD
)
ConfirmReceived
(
ctx
context
.
Context
,
OrderID
string
)
(
res
*
CommonRes
,
err
error
)
{
func
(
*
orderJD
)
ConfirmReceived
(
ctx
context
.
Context
,
OrderID
string
)
(
res
*
CommonRes
,
err
error
)
{
method
:=
"order/confirmReceived"
param
:=
g
.
Map
{
"jdOrderId"
:
OrderID
,
...
...
upstream/jingdong/jingdong_refund.go
浏览文件 @
3317ba7c
...
...
@@ -148,7 +148,7 @@ type UpdateSendSkuReq struct {
}
// UpdateSendSku 根据填写单号
func
(
refundJD
)
UpdateSendSku
(
ctx
context
.
Context
,
req
*
UpdateSendSkuReq
)
(
res
*
CommonRes
,
err
error
)
{
func
(
*
refundJD
)
UpdateSendSku
(
ctx
context
.
Context
,
req
*
UpdateSendSkuReq
)
(
res
*
CommonRes
,
err
error
)
{
method
:=
"afterSale/updateSendSku"
param
:=
g
.
Map
{
"param"
:
gjson
.
New
(
req
)
.
MustToJsonString
(),
...
...
@@ -162,7 +162,7 @@ func (refundJD) UpdateSendSku(ctx context.Context, req *UpdateSendSkuReq) (res *
}
//AuditCancel 取消服务单
func
(
refundJD
)
AuditCancel
(
ctx
context
.
Context
,
postData
string
)
(
res
*
CommonRes
,
err
error
)
{
func
(
*
refundJD
)
AuditCancel
(
ctx
context
.
Context
,
postData
string
)
(
res
*
CommonRes
,
err
error
)
{
method
:=
"afterSale/auditCancel"
param
:=
g
.
Map
{
"param"
:
postData
,
...
...
@@ -176,7 +176,7 @@ func (refundJD) AuditCancel(ctx context.Context, postData string) (res *CommonRe
}
//RefundCancel 取消售后
func
(
refundJD
)
RefundCancel
(
ctx
context
.
Context
,
id
interface
{})
(
res
*
RefundCancelRes
,
err
error
)
{
func
(
*
refundJD
)
RefundCancel
(
ctx
context
.
Context
,
id
interface
{})
(
res
*
RefundCancelRes
,
err
error
)
{
method
:=
"afterSale/auditCancel"
req
:=
g
.
Map
{
"serviceIdList"
:
gconv
.
Ints
(
id
),
...
...
@@ -194,7 +194,7 @@ func (refundJD) RefundCancel(ctx context.Context, id interface{}) (res *RefundCa
}
// Apply 申请售后服务(退货、换货、维修)
func
(
refundJD
)
Apply
(
ctx
context
.
Context
,
req
*
ApplyReq
)
(
res
*
CommonRes
,
err
error
)
{
func
(
*
refundJD
)
Apply
(
ctx
context
.
Context
,
req
*
ApplyReq
)
(
res
*
CommonRes
,
err
error
)
{
method
:=
"afterSale/createAfsApply"
param
:=
g
.
Map
{
"param"
:
gjson
.
New
(
req
)
.
MustToJsonString
(),
...
...
@@ -208,7 +208,7 @@ func (refundJD) Apply(ctx context.Context, req *ApplyReq) (res *CommonRes, err e
}
// GetServiceList 查询服务单根据客户账号和订单号分页查询服务单概要信息
func
(
refundJD
)
GetServiceList
(
ctx
context
.
Context
,
OrderSn
string
)
(
res
*
GetServiceListRes
,
err
error
)
{
func
(
*
refundJD
)
GetServiceList
(
ctx
context
.
Context
,
OrderSn
string
)
(
res
*
GetServiceListRes
,
err
error
)
{
method
:=
"afterSale/getServiceListPage"
param
:=
g
.
Map
{
"param"
:
gjson
.
New
(
&
GetServiceListReq
{
...
...
@@ -226,7 +226,7 @@ func (refundJD) GetServiceList(ctx context.Context, OrderSn string) (res *GetSer
}
// GetServiceDetail 根据服务单号查询服务单明细信息
func
(
refundJD
)
GetServiceDetail
(
ctx
context
.
Context
,
req
string
)
(
res
*
GetServiceDetailRes
,
err
error
)
{
func
(
*
refundJD
)
GetServiceDetail
(
ctx
context
.
Context
,
req
string
)
(
res
*
GetServiceDetailRes
,
err
error
)
{
method
:=
"afterSale/getServiceDetailInfo"
var
reqJson
=
gjson
.
New
(
""
)
_
=
reqJson
.
Set
(
"afsServiceId"
,
req
)
...
...
@@ -242,7 +242,7 @@ func (refundJD) GetServiceDetail(ctx context.Context, req string) (res *GetServi
}
// CheckIsSupport 查询订单商品是否允许售后
func
(
refundJD
)
CheckIsSupport
(
ctx
context
.
Context
,
req
*
RefundCommonReq
)
(
res
*
CheckIsSupportRes
,
err
error
)
{
func
(
*
refundJD
)
CheckIsSupport
(
ctx
context
.
Context
,
req
*
RefundCommonReq
)
(
res
*
CheckIsSupportRes
,
err
error
)
{
method
:=
"afterSale/getAvailableNumberComp"
param
:=
g
.
Map
{
"param"
:
gjson
.
New
(
req
)
.
MustToJsonString
(),
...
...
@@ -256,7 +256,7 @@ func (refundJD) CheckIsSupport(ctx context.Context, req *RefundCommonReq) (res *
}
// GetSupportType 查询订单商品售后类型
func
(
refundJD
)
GetSupportType
(
ctx
context
.
Context
,
req
*
RefundCommonReq
)
(
res
*
GetSupportTypeRes
,
err
error
)
{
func
(
*
refundJD
)
GetSupportType
(
ctx
context
.
Context
,
req
*
RefundCommonReq
)
(
res
*
GetSupportTypeRes
,
err
error
)
{
method
:=
"afterSale/getCustomerExpectComp"
param
:=
g
.
Map
{
"param"
:
gjson
.
New
(
req
)
.
MustToJsonString
(),
...
...
@@ -271,7 +271,7 @@ func (refundJD) GetSupportType(ctx context.Context, req *RefundCommonReq) (res *
}
// GetReturnType 查询支持的商品返回京东方式
func
(
refundJD
)
GetReturnType
(
ctx
context
.
Context
,
req
*
RefundCommonReq
)
(
res
*
GetReturnTypeRes
,
err
error
)
{
func
(
*
refundJD
)
GetReturnType
(
ctx
context
.
Context
,
req
*
RefundCommonReq
)
(
res
*
GetReturnTypeRes
,
err
error
)
{
method
:=
"afterSale/getWareReturnJdComp"
param
:=
g
.
Map
{
"param"
:
gjson
.
New
(
req
)
.
MustToJsonString
(),
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论