getplace
This commit is contained in:
@@ -114,3 +114,34 @@ func (c *CmsController) InitPlace() {
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 得到地点(省,城市,区)信息
|
||||
// @Description 得到地点(省,城市,区)信息。
|
||||
// @Param token header string false "认证token"
|
||||
// @Param keyword query string false "查询关键字(可以为空,为空表示不限制)"
|
||||
// @Param parentCode query int false "上级地点code,这个指的是国家标准CODE(中国为:100000,北京为:110000,北京市为:110100),不是数据库中的ID"
|
||||
// @Param level query int false "地点级别:省为1,市为2,区为3,注意直辖市也要分省与市级"
|
||||
// @Param includeDisabled query bool false "是否包括禁用的城市(缺省不包括)"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /GetPlaces [get]
|
||||
func (c *CmsController) GetPlaces() {
|
||||
c.callGetPlaces(func(params *tCmsGetPlacesParams) (retVal interface{}, errCode string, err error) {
|
||||
retVal, err = cms.GetPlaces(params.Ctx, params.Keyword, params.IncludeDisabled, params.MapData)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 修改地点信息
|
||||
// @Description 只支持修改enabled, jd_code和mtps_price这三个属性
|
||||
// @Param token header string true "认证token"
|
||||
// @Param code formData int true "地点编号,注意是code不是ID"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /UpdatePlace [put]
|
||||
func (c *CmsController) UpdatePlace() {
|
||||
c.callUpdatePlace(func(params *tCmsUpdatePlaceParams) (retVal interface{}, errCode string, err error) {
|
||||
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user