- GetStores添加订单相关的查询条件

This commit is contained in:
gazebo
2019-06-28 11:25:26 +08:00
parent 7e3d13d62b
commit 9db43e273a
4 changed files with 100 additions and 40 deletions

View File

@@ -30,6 +30,10 @@ type StoreController struct {
// @Param mapLongitude query string false "地图中心经度"
// @Param mapLatitude query string false "地图中心纬度"
// @Param mapRadius query int false "地图半径(单位为米)"
// @Param orderTimeFrom query string false "订单创建起始时间"
// @Param orderTimeTo query string false "订单创建结束时间"
// @Param orderCountFrom query int false "订单量起始"
// @Param orderCountTo query int false "订单量结束"
// @Param offset query int false "门店列表起始序号以0开始缺省为0"
// @Param pageSize query int false "门店列表页大小缺省为50-1表示全部"
// @Success 200 {object} controllers.CallResult
@@ -37,7 +41,10 @@ type StoreController struct {
// @router /GetStores [get]
func (c *StoreController) GetStores() {
c.callGetStores(func(params *tStoreGetStoresParams) (retVal interface{}, errCode string, err error) {
retVal, err = cms.GetStores(params.Ctx, params.Keyword, params.MapData, params.Offset, params.PageSize)
timeList, err := jxutils.BatchStr2Time(params.OrderTimeFrom, params.OrderTimeTo)
if err == nil {
retVal, err = cms.GetStores(params.Ctx, params.Keyword, params.MapData, params.Offset, params.PageSize, timeList[0], timeList[1], params.OrderCountFrom, params.OrderCountTo)
}
return retVal, "", err
})
}