- GetPlaces support keyword.

This commit is contained in:
gazebo
2018-09-19 09:56:45 +08:00
parent 8593e8b44b
commit 57b60208e2
5 changed files with 110 additions and 47 deletions

View File

@@ -11,16 +11,18 @@ type CmsController struct {
}
// @Title 得到地点(省,城市,区)信息
// @Description parentCode与vendorID必传入一个vendorID的意思是得到所有与这个厂商相关的城市列表。地点级别省为1市为2区为3注意直辖市也要分省与市级
// @Param token header string true "认证token"
// @Param parentCode query int true "上级地点code这个指的是国家标准CODE中国为100000北京为110000北京市为110100不是数据库中的ID"
// @Description 得到地点(省,城市,区)信息。
// @Param token header string true "认证token"// @Param keyword query string false "查询关键字(可以为空,为空表示不限制)"
// @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.ParentCode, params.IncludeDisabled)
retVal, err = cms.GetPlaces(params.Keyword, params.IncludeDisabled, params.MapData)
return retVal, "", err
})
}