- CloseStatus不能添加omitempty标志,因为0是有意义的值
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user