饿百的评价尝试
This commit is contained in:
@@ -782,7 +782,7 @@ func (a *API) getCommentList(isElm bool, fromTime, toTime time.Time, shopID, sup
|
||||
}
|
||||
|
||||
func (a *API) GetEleCommentList(fromTime, toTime time.Time, shopID, supplierID string, replyStatus, level, nonEmpty int) (commentList []map[string]interface{}, err error) {
|
||||
return a.getCommentList(true, fromTime, toTime, shopID, supplierID, replyStatus, level, nonEmpty)
|
||||
return a.getCommentList(false, fromTime, toTime, shopID, supplierID, replyStatus, level, nonEmpty)
|
||||
}
|
||||
|
||||
func (a *API) GetCommentList(fromTime, toTime time.Time, shopID, supplierID string, replyStatus, level, nonEmpty int) (commentList []map[string]interface{}, err error) {
|
||||
|
||||
@@ -16,6 +16,8 @@ const (
|
||||
OrderStatusPause = "PAUSE"
|
||||
OrderStatusWait = "WAIT_SELLER_STOCK_OUT"
|
||||
OrderStatusCancel = "TRADE_CANCELED"
|
||||
|
||||
IdSopShipmenttypeTC = "71" //同城配送,需要调其他接口获取期望送货时间
|
||||
)
|
||||
|
||||
//订单出库
|
||||
@@ -105,7 +107,7 @@ func (a *API) GetOrder(orderID int64, isStatus bool) (getOrderResult *GetOrderRe
|
||||
params["optional_fields"] = `orderType,payType,orderTotalPrice,orderSellerPrice,
|
||||
orderPayment,freightPrice,orderState,orderStateRemark,
|
||||
orderStartTime,orderEndTime,orderRemark,consigneeInfo,
|
||||
itemInfoList,pauseBizInfo,pin,idSopShipmenttype,scDT`
|
||||
itemInfoList,pauseBizInfo,pin,idSopShipmenttype`
|
||||
if isStatus {
|
||||
params["order_state"] = "WAIT_SELLER_STOCK_OUT,TRADE_CANCELED"
|
||||
}
|
||||
@@ -218,3 +220,18 @@ func (a *API) KeyGet() (keyGetResult *KeyGetResult, err error) {
|
||||
}
|
||||
return keyGetResult, err
|
||||
}
|
||||
|
||||
//获取期望送货时间
|
||||
func (a *API) GetOrderExtInfoByOrderId() (err error) {
|
||||
_, err = a.AccessAPI("jingdong.pop.order.getOrderExtInfoByOrderId", prodURL, map[string]interface{}{
|
||||
"orderId": "124162661622",
|
||||
})
|
||||
if err == nil {
|
||||
// data, err2 := base64.StdEncoding.DecodeString(result["jingdong_jos_voucher_info_get_responce"].(map[string]interface{})["response"].(map[string]interface{})["data"].(map[string]interface{})["voucher"].(string))
|
||||
// if err2 == nil {
|
||||
// json.Unmarshal(data, &voucherInfoGetResult)
|
||||
// }
|
||||
// err = err2
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -45,3 +45,11 @@ func TestKeyGet(t *testing.T) {
|
||||
}
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
func TestGetOrderExtInfoByOrderId(t *testing.T) {
|
||||
err := api.GetOrderExtInfoByOrderId()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
// t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ func TestOrderViewStatus(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestOrderGetOrderDetail(t *testing.T) {
|
||||
result, err := api.OrderGetOrderDetail(69760842061320598, false)
|
||||
result, err := api.OrderGetOrderDetail(73322892924405911, false)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -27,7 +27,7 @@ func TestOrderGetOrderDetail(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestOrderGetOrderDetail2(t *testing.T) {
|
||||
result, err := api.OrderGetOrderDetail2(69760842061320598, false)
|
||||
result, err := api.OrderGetOrderDetail2(73322892924405911, false)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user