From 521a6f0661303de0c86458ace484d1ff4c7aa419 Mon Sep 17 00:00:00 2001 From: gazebo Date: Thu, 19 Sep 2019 17:25:47 +0800 Subject: [PATCH] =?UTF-8?q?-=20CloseStatus=E4=B8=8D=E8=83=BD=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0omitempty=E6=A0=87=E5=BF=97=EF=BC=8C=E5=9B=A0=E4=B8=BA?= =?UTF-8?q?0=E6=98=AF=E6=9C=89=E6=84=8F=E4=B9=89=E7=9A=84=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platformapi/jdapi/store.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/platformapi/jdapi/store.go b/platformapi/jdapi/store.go index 336d531d..2281249a 100644 --- a/platformapi/jdapi/store.go +++ b/platformapi/jdapi/store.go @@ -78,7 +78,7 @@ type OpStoreParams struct { CoordinateType int `json:"coordinateType,omitempty"` // 返回值无,使用的地图类型(1,谷歌), (2,百度), (3,高德), (4,腾讯) DeliveryRangeRadius int `json:"deliveryRangeRadius,omitempty"` // 返回值无,时效服务范围半径(单位:米)(如果服务范围为类型3的话,该字段有值) CoordinatePoints string `json:"coordinatePoints,omitempty"` // 返回值无,坐标点集合(如果服务范围为类型2的话,该字段有值),每个点以:经度,纬度 的格式表示,用“;”隔开多个点;对于腾讯地图、谷歌地图和高德地图,整个coordinatePoints的长度必须小于2k;对于百度地图,整个coordinatePoints的长度必须小于1k - CloseStatus int `json:"closeStatus,omitempty"` + CloseStatus int `json:"closeStatus"` StoreNotice string `json:"storeNotice,omitempty"` StandByPhone string `json:"standByPhone,omitempty"` } @@ -287,8 +287,12 @@ func (a *API) UpdateStoreInfo4Open(storeNo, userName string, addParams map[strin return err } -func (a *API) UpdateStoreInfo4Open2(updateParams *OpStoreParams) (err error) { - _, err = a.AccessAPINoPage("store/updateStoreInfo4Open", utils.Struct2MapByJson(updateParams), nil, nil, nullResultParser) +func (a *API) UpdateStoreInfo4Open2(updateParams *OpStoreParams, modifyCloseStatus bool) (err error) { + mapData := utils.Struct2MapByJson(updateParams) + if !modifyCloseStatus { + delete(mapData, "closeStatus") + } + _, err = a.AccessAPINoPage("store/updateStoreInfo4Open", mapData, nil, nil, nullResultParser) return err }