订单修改
This commit is contained in:
@@ -25,6 +25,7 @@ type CallBackResult struct {
|
||||
OrderSource string `json:"orderSource"`
|
||||
FreightPrice string `json:"freightPrice"`
|
||||
MsgType string `json:"msgType"`
|
||||
Pin string `json:"pin"`
|
||||
ConsigneeInfo *CallBackConsigneeInfo `json:"consigneeInfo"`
|
||||
ItemInfoList []*CallBackItemInfoList `json:"itemInfoList"`
|
||||
}
|
||||
|
||||
@@ -11,6 +11,12 @@ import (
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
)
|
||||
|
||||
const (
|
||||
OrderStatusPopPause = "POP_ORDER_PAUSE"
|
||||
OrderStatusPause = "PAUSE"
|
||||
OrderStatusWait = "WAIT_SELLER_STOCK_OUT"
|
||||
)
|
||||
|
||||
//订单出库
|
||||
//https://open.jd.com/home/home#/doc/api?apiCateId=55&apiId=1948&apiName=jingdong.pop.order.shipment
|
||||
func (a *API) OrderShipment(orderID int64, logiCoprId, logiNo string) (err error) {
|
||||
@@ -86,6 +92,7 @@ type GetOrderResult struct {
|
||||
OrderID string `json:"orderId"`
|
||||
OrderSource string `json:"orderSource"`
|
||||
FreightPrice string `json:"freightPrice"`
|
||||
Pin string `json:"pin"`
|
||||
}
|
||||
|
||||
//查询单个订单
|
||||
@@ -96,7 +103,7 @@ func (a *API) GetOrder(orderID int64) (getOrderResult *GetOrderResult, err error
|
||||
"optional_fields": `orderType,payType,orderTotalPrice,orderSellerPrice,
|
||||
orderPayment,freightPrice,orderState,orderStateRemark,
|
||||
orderStartTime,orderEndTime,orderRemark,consigneeInfo,
|
||||
itemInfoList,pauseBizInfo`,
|
||||
itemInfoList,pauseBizInfo,pin`,
|
||||
// "order_state": "WAIT_SELLER_STOCK_OUT,PAUSE",
|
||||
})
|
||||
if err == nil {
|
||||
|
||||
@@ -360,7 +360,7 @@ func TestDeleteSku(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestFindSkuById(t *testing.T) {
|
||||
result, err := api.FindSkuById(69948250090)
|
||||
result, err := api.FindSkuById(71538612626)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ func TestTryGetCookie(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestAAADS(t *testing.T) {
|
||||
str := "AASWvkdk5a60bjm3lFqaoCyzJprhJZvabCAbNtGu14Lu/ZBGNYf/MdPCEIcIN9oVbEw="
|
||||
str := "AASWvkdk5a60bjm3lFqaoCyzBFIjrHQjoKSY+LN5VcswOzDkqjbjxVyK1Psdqcj3ci0+4I9v3evrtrJHLuUSo3eEfT3+psX6DF45CILeq0VbKxwxkE+AS1WTxr9RTHqaM3g="
|
||||
data, _ := base64.StdEncoding.DecodeString(str)
|
||||
data2, _ := base64.StdEncoding.DecodeString("XsGNdyDyDHnR79iKU6d5LTSJYaQyWAEssDoD7VM5Kks=")
|
||||
b := bytes.NewBuffer(data)
|
||||
@@ -113,7 +113,8 @@ func TestAAADS(t *testing.T) {
|
||||
b.Read(iv)
|
||||
main := make([]byte, len(data)-18-16)
|
||||
b.Read(main)
|
||||
decryptedData, err := Decrypt(main, data2[:16], iv)
|
||||
decryptedData, err := utils.AESCBCDecpryt(main, data2[:16], iv)
|
||||
// decryptedData, err := Decrypt(main, data2[:16], iv)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -135,27 +136,3 @@ func PKCS5UnPadding(decrypted []byte) []byte {
|
||||
unPadding := int(decrypted[length-1])
|
||||
return decrypted[:(length - unPadding)]
|
||||
}
|
||||
|
||||
func TestAUS(t *testing.T) {
|
||||
str = `
|
||||
{
|
||||
"consigneeInfo": "map[city:丰台区 cityId:2805 county:三环到四环之间 countyId:2855 fullAddress:AASWvkdk5a60bjm3lFqaoCyzGU2pgGw0Mc968Xbceeuuur8Il0tvS5LpWP0iiwxMlnsjuCvooqgcrwXLf/EqIpgmHOyV2n1UApCLdSaPAyt20D4mGqmqIHIQwUSVZm/RxWM= fullname:AASWvkdk5a60bjm3lFqaoCyzDcRkyHzNfI X/q1aFI1yPZP1k3suF6YXD8H KWhuKGo= mobile:AASWvkdk5a60bjm3lFqaoCyzyWkFBtaTbjNTqZc6TzQhYdfQcEOaeHur1JNVg0rPSLA= province:北京 provinceId:1 telephone:AASWvkdk5a60bjm3lFqaoCyz2oKxkxWmBWybvDIbcX4qcGf2tQG7Q0nBIwAkrgVza/c= town: townId:0]",
|
||||
"freightPrice": "0.00",
|
||||
"itemInfoList": "[map[giftPoint:0 invoiceContentId: itemExt:{\"skuUuid\":\"30_0_10374877_71027198959_2_0\",\"isVMI\":0,\"newStoreId\":\"0\"} itemTotal:1 jdPrice:40.00 newStoreId:0 outerSkuId:6045739 productNo: skuId:71027198959 skuName:小台农芒果新鲜当季水果 5斤 wareId:14650176651]]",
|
||||
"orderExt": "{\"road\":\"2\",\"aerfaTime.idSopShipmentType\":\"67\"}",
|
||||
"orderId": "129337563399",
|
||||
"orderPayment": "8.40",
|
||||
"orderRemark": "",
|
||||
"orderSellerPrice": "8.40",
|
||||
"orderSource": "移动端订单",
|
||||
"orderStartTime": "2020-07-29 12:08:39",
|
||||
"orderState": "WAIT_GOODS_RECEIVE_CONFIRM",
|
||||
"orderStateRemark": "等待确认收货",
|
||||
"orderTotalPrice": "40.00",
|
||||
"orderType": "22",
|
||||
"payType": "4-在线支付",
|
||||
"storeId": "0",
|
||||
"storeOrder": ""
|
||||
}
|
||||
`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user