diff --git a/platformapi/jdapi/callback.go b/platformapi/jdapi/callback.go index de514a5a..a13f761b 100644 --- a/platformapi/jdapi/callback.go +++ b/platformapi/jdapi/callback.go @@ -39,6 +39,32 @@ type CallbackDeliveryStatusMsg struct { InputTime string `json:"inputTime"` } +const ( + OpenSourceJDLSP = 1 + OpenSourceJDMedicineCity = 2 + OpenSourceJDMerchantDirect = 3 + OpenSourceJDOne = 4 + OpenSourceStockCenter = 5 + OpenSourceOrderCenter = 6 + OpenSourceGoodsSystem = 7 + OpenSourcePrepositionWH = 8 + OpenSourceStoreSystem = 9 + OpenSourceMerchantCenter = 10 + OpenSourceOpenPlatform = 11 + OpenSourcePickupSystem = 13 + OpenSourceBatchTask = 14 +) + +type CallbackStoreStockMsg struct { + StationNo string `json:"stationNo"` + SkuId int64 `json:"skuId"` + Have bool `json:"have"` + Vendibility int `json:"vendibility"` + OperPin string `json:"operPin"` + OperTime int64 `json:"operTime"` + OperSource int `json:"operSource"` +} + var ( SuccessResponse = &CallbackResponse{Code: "0", Msg: "success", Data: ""} FormatErrorResponse = &CallbackResponse{Code: "-1", Msg: "failed", Data: ""} @@ -112,3 +138,9 @@ func (a *API) GetOrderDeliveryCallbackMsg(data []byte) (msg *CallbackDeliverySta callbackResponse = a.getCommonOrderCallbackMsg(data, msg, true) return msg, callbackResponse } + +func (a *API) GetStoreStockCallbackMsg(data []byte) (msg *CallbackStoreStockMsg, callbackResponse *CallbackResponse) { + msg = new(CallbackStoreStockMsg) + callbackResponse = a.getCommonOrderCallbackMsg(data, msg, true) + return msg, callbackResponse +}