- ebai调整一些常量类型
This commit is contained in:
@@ -45,27 +45,27 @@ const (
|
||||
|
||||
const (
|
||||
// 订单下行 - order.partrefund.push-部分退款订单信息推送
|
||||
OrderPartRefuncTypeMerchant = "1" // 表示商户发起的部分退款
|
||||
OrderPartRefuncTypeCustomer = "2" // 表示用户发起的部分退款
|
||||
OrderPartRefuncTypeCS = "3" // 表示客服直接发起的部分退款
|
||||
OrderPartRefuncTypeMerchant = 1 // 表示商户发起的部分退款
|
||||
OrderPartRefuncTypeCustomer = 2 // 表示用户发起的部分退款
|
||||
OrderPartRefuncTypeCS = 3 // 表示客服直接发起的部分退款
|
||||
|
||||
OrderPartRefundApply = "10" // 表示商家/用户发起部分退款申请
|
||||
OrderPartRefundSuccess = "20" // 表示部分退款成功
|
||||
OrderPartRefundUserApplyArbitration = "30" // 用户申请仲裁,客服介入
|
||||
OrderPartRefundFailed = "40" // 表示部分退款失败
|
||||
OrderPartRefundMerchantRefused = "50" // 表示商家拒绝用户发起的部分退款申请
|
||||
OrderPartRefundApply = 10 // 表示商家/用户发起部分退款申请
|
||||
OrderPartRefundSuccess = 20 // 表示部分退款成功
|
||||
OrderPartRefundUserApplyArbitration = 30 // 用户申请仲裁,客服介入
|
||||
OrderPartRefundFailed = 40 // 表示部分退款失败
|
||||
OrderPartRefundMerchantRefused = 50 // 表示商家拒绝用户发起的部分退款申请
|
||||
|
||||
// 订单下行 - order.user.cancel-用户申请订单取消/退款
|
||||
OrderUserCancelApply = "10" // 发起申请
|
||||
OrderUserCancelCSIntervene = "20" // 客服介入
|
||||
OrderUserCancelCSRefused = "30" // 客服拒绝
|
||||
OrderUserCancelCSAgreed = "40" // 客服同意
|
||||
OrderUserCancelMerchantRefused = "50" // 商户拒绝
|
||||
OrderUserCancelMerchantAgreed = "60" // 商家同意
|
||||
OrderUserCancelInvalid = "70" // 申请失效
|
||||
OrderUserCancelApply = 10 // 发起申请
|
||||
OrderUserCancelCSIntervene = 20 // 客服介入
|
||||
OrderUserCancelCSRefused = 30 // 客服拒绝
|
||||
OrderUserCancelCSAgreed = 40 // 客服同意
|
||||
OrderUserCancelMerchantRefused = 50 // 商户拒绝
|
||||
OrderUserCancelMerchantAgreed = 60 // 商家同意
|
||||
OrderUserCancelInvalid = 70 // 申请失效
|
||||
|
||||
OrderUserCancelTypeBeforeSale = "1" // 表示订单完成前用户全单取消申请流程
|
||||
OrderUserCancelTypeAfterSale = "2" // 表示订单完成后用户全单退款申请流程
|
||||
OrderUserCancelTypeBeforeSale = 1 // 表示订单完成前用户全单取消申请流程
|
||||
OrderUserCancelTypeAfterSale = 2 // 表示订单完成后用户全单退款申请流程
|
||||
|
||||
SendImmediatelySelf = 6 // 饿百商家自送的配送状态
|
||||
)
|
||||
@@ -97,6 +97,62 @@ type RefundSku struct {
|
||||
Number string `json:"number"`
|
||||
}
|
||||
|
||||
type OrderDetailInfo struct {
|
||||
CustomSkuID string `json:"custom_sku_id"`
|
||||
Name string `json:"name"`
|
||||
Number int `json:"number"`
|
||||
ProductFeatures []interface{} `json:"product_features"`
|
||||
ProductFee int `json:"product_fee"`
|
||||
ProductPrice int `json:"product_price"`
|
||||
ProductSubsidy struct {
|
||||
AgentRate int `json:"agent_rate"`
|
||||
BaiduRate int `json:"baidu_rate"`
|
||||
Discount int `json:"discount"`
|
||||
DiscountDetail []*struct {
|
||||
ActivityID string `json:"activity_id"`
|
||||
BaiduRate int `json:"baidu_rate"`
|
||||
ShopRate int `json:"shop_rate"`
|
||||
Type string `json:"type"`
|
||||
} `json:"discount_detail"`
|
||||
LogisticsRate int `json:"logistics_rate"`
|
||||
ShopRate int `json:"shop_rate"`
|
||||
UserRate int `json:"user_rate"`
|
||||
} `json:"product_subsidy"`
|
||||
SkuID string `json:"sku_id"`
|
||||
TotalWeight int `json:"total_weight"`
|
||||
Upc string `json:"upc"`
|
||||
}
|
||||
|
||||
type RefundDetailInfo struct {
|
||||
ApplyTime string `json:"apply_time"`
|
||||
CustomSkuID string `json:"custom_sku_id"`
|
||||
Desc string `json:"desc"`
|
||||
Name string `json:"name"`
|
||||
Number int `json:"number"`
|
||||
RefundID string `json:"refund_id"`
|
||||
ShopEleRefund int `json:"shop_ele_refund"`
|
||||
SkuID string `json:"sku_id"`
|
||||
Status int `json:"status"`
|
||||
TotalRefund int `json:"total_refund"`
|
||||
Type int `json:"type"`
|
||||
Upc string `json:"upc"`
|
||||
}
|
||||
|
||||
type PartRefundInfo struct {
|
||||
Commission int `json:"commission"`
|
||||
Fee int `json:"fee"`
|
||||
OrderDetail []*OrderDetailInfo `json:"order_detail"`
|
||||
OrderID string `json:"order_id"`
|
||||
PackageFee int `json:"package_fee"`
|
||||
RefundDetail []*RefundDetailInfo `json:"refund_detail"`
|
||||
RefundPrice int `json:"refund_price"`
|
||||
SendFee int `json:"send_fee"`
|
||||
ShopFee int `json:"shop_fee"`
|
||||
TotalPrice int `json:"total_price"`
|
||||
Type int `json:"type"`
|
||||
UserFee int `json:"user_fee"`
|
||||
}
|
||||
|
||||
// 提供给合作方确认订单所用。 注:1、10分钟内未确认的订单系统自动取消。2、确认失败的订单请不要做餐。 2016年7月4号起,将由百度外卖负责完成订单。届时,对接方无需调用完成订单接口,继续调用可能导致订单结算有问题。
|
||||
func (a *API) OrderConfirm(orderID string) (err error) {
|
||||
_, err = a.AccessAPI("order.confirm", map[string]interface{}{
|
||||
@@ -226,8 +282,8 @@ func (a *API) OrderIdConvert(orderID string, isElemeOrder bool) (convertedOrderI
|
||||
return "", err
|
||||
}
|
||||
|
||||
// 查看售后订单详情
|
||||
func (a *API) OrderPartrefundGet(orderID string) (orderMap map[string]interface{}, err error) {
|
||||
// 查看部分退款订单详情
|
||||
func (a *API) OrderPartRefundGet(orderID string) (orderMap map[string]interface{}, err error) {
|
||||
result, err := a.AccessAPI("order.partrefund.get", map[string]interface{}{
|
||||
"order_id": orderID,
|
||||
})
|
||||
@@ -237,6 +293,14 @@ func (a *API) OrderPartrefundGet(orderID string) (orderMap map[string]interface{
|
||||
return nil, err
|
||||
}
|
||||
|
||||
func (a *API) OrderPartRefundGet2(orderID string) (partRefundInfo *CBPartRefundInfo, err error) {
|
||||
result, err := a.OrderPartRefundGet(orderID)
|
||||
if err == nil {
|
||||
err = utils.Map2StructByJson(result, &partRefundInfo, false)
|
||||
}
|
||||
return partRefundInfo, err
|
||||
}
|
||||
|
||||
func (a *API) SmartOrderIdConvert(orderID string) (convertedOrderID string, err error) {
|
||||
return a.OrderIdConvert(orderID, isOrderIDEleme(orderID))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user