From 6a83e63cd4bf7b4f26384f774ce1942522a08dff Mon Sep 17 00:00:00 2001 From: 陆恒 Date: Fri, 12 Jun 2020 11:52:20 +0800 Subject: [PATCH] 提亀 --- src/HttpServer/logic/datadef.go | 2 +- src/HttpServer/logic/logic.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/HttpServer/logic/datadef.go b/src/HttpServer/logic/datadef.go index 512a04f..8df403a 100644 --- a/src/HttpServer/logic/datadef.go +++ b/src/HttpServer/logic/datadef.go @@ -364,7 +364,7 @@ type PutWareHouseResp struct { } type TakeWareHouseReq struct { - CatId int `json:"catId"` + CatId string `json:"catId"` } type TakeWareHouseResp struct { Code int `json:"code"` diff --git a/src/HttpServer/logic/logic.go b/src/HttpServer/logic/logic.go index 33e794c..1d3a6b9 100644 --- a/src/HttpServer/logic/logic.go +++ b/src/HttpServer/logic/logic.go @@ -1415,7 +1415,8 @@ func HandlerTakeCatoutfromWareHouse(w http.ResponseWriter, data string, uuid int resp.Message = "get userinfo failed" break } - wpos := udata.GetWarePosById(rdata.CatId) + cid, _ := strconv.Atoi(rdata.CatId) + wpos := udata.GetWarePosById(cid) if wpos == -1 { logger.Error("HandlerTakeCatoutfromWareHouse wpos failed=%v", err) resp.Code = 1 -- libgit2 0.21.0