| | |
| | | package com.xinquan.meditation.controller.client; |
| | | |
| | | |
| | | import com.xinquan.common.core.domain.R; |
| | | import com.xinquan.common.core.utils.page.PageDTO; |
| | | import com.xinquan.meditation.api.domain.Meditation; |
| | | import com.xinquan.meditation.domain.MeditationHall; |
| | | import com.xinquan.meditation.domain.vo.ClientMeditationQuestionVO; |
| | | import com.xinquan.meditation.service.MeditationHallService; |
| | | import com.xinquan.meditation.service.MeditationService; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | public class ClientMeditationController { |
| | | |
| | | private final MeditationService meditationService; |
| | | |
| | | private final MeditationHallService meditationHallService; |
| | | /** |
| | | * 获取冥想馆列表 |
| | | */ |
| | | @GetMapping("/getMeditationPage") |
| | | @ApiOperation(value = "获取冥想馆列表-分页") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "lon", value = "经度", dataType = "String", required = false), |
| | | @ApiImplicitParam(name = "lat", value = "纬度", dataType = "String", required = false), |
| | | @ApiImplicitParam(name = "name", value = "名称", dataType = "String", required = false), |
| | | @ApiImplicitParam(name = "pageCurr", value = "分页参数,当前页码", dataType = "Integer", required = true), |
| | | @ApiImplicitParam(name = "pageSize", value = "分页参数,每页数量", dataType = "Integer", required = true) |
| | | }) |
| | | public R<PageDTO<MeditationHall>> getMeditationPage( |
| | | String lon, |
| | | String lat, |
| | | String name, |
| | | Integer pageCurr, |
| | | Integer pageSize) { |
| | | PageDTO<MeditationHall> res = meditationService.getMeditationPage(lon,lat,name,pageCurr,pageSize); |
| | | return R.ok(res); |
| | | } |
| | | @GetMapping("/getMeditationInfo") |
| | | @ApiOperation(value = "获取冥想馆详情") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "id", dataType = "Long", required = true), |
| | | }) |
| | | public R<MeditationHall> getMeditationPage( |
| | | @RequestParam("id") Long id) |
| | | { |
| | | MeditationHall byId = meditationHallService.getById(id); |
| | | return R.ok(byId); |
| | | } |
| | | } |
| | | |