- change format in GetStoreStockCallbackMsg
This commit is contained in:
@@ -141,6 +141,21 @@ func (a *API) GetOrderDeliveryCallbackMsg(data []byte) (msg *CallbackDeliverySta
|
||||
|
||||
func (a *API) GetStoreStockCallbackMsg(data []byte) (msg *CallbackStoreStockMsg, callbackResponse *CallbackResponse) {
|
||||
msg = new(CallbackStoreStockMsg)
|
||||
callbackResponse = a.getCommonOrderCallbackMsg(data, msg, true)
|
||||
tmpMsg := make(map[string]interface{})
|
||||
callbackResponse = a.getCommonOrderCallbackMsg(data, tmpMsg, true)
|
||||
if callbackResponse == nil {
|
||||
msg.StationNo = utils.Interface2String(tmpMsg["stationNo"])
|
||||
msg.SkuId = utils.Str2Int64(utils.Interface2String(tmpMsg["skuId"]))
|
||||
msg.Vendibility = int(utils.Str2Int64(utils.Interface2String(tmpMsg["vendibility"])))
|
||||
msg.OperPin = utils.Interface2String(tmpMsg["operPin"])
|
||||
msg.OperTime = utils.Str2Int64(utils.Interface2String(tmpMsg["operTime"]))
|
||||
msg.OpenSource = int( utils.Str2Int64((utils.Interface2String(tmpMsg["openSource"])))
|
||||
have := utils.Interface2String(tmpMsg["have"])
|
||||
if have == "true"{
|
||||
msg.Have = true
|
||||
} else {
|
||||
msg.Have = false
|
||||
}
|
||||
}
|
||||
return msg, callbackResponse
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user