提交 3317ba7c authored 作者: zhanglibo's avatar zhanglibo

京东

上级 55562f53
......@@ -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),
......
......@@ -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,
......
......@@ -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(","),
......
......@@ -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,
......
......@@ -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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论