| | |
| | | package com.dsh.account.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.dsh.account.entity.Coach; |
| | | import com.dsh.account.service.CoachService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @RequestMapping("") |
| | |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取城市下的所有教练 |
| | | * @param cityCode |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/coach/queryCoachByCity") |
| | | public List<Coach> queryCoachByCity(@RequestBody String cityCode){ |
| | | return service.list(new QueryWrapper<Coach>().eq("cityCode", cityCode).eq("state", 1)); |
| | | } |
| | | } |