package com.dsh.account.controller; 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.*; @RestController @RequestMapping("") public class CoachController { @Autowired private CoachService service; /** * 根据门店 * @param id * @return */ @ResponseBody @PostMapping("/coach/queryCoachById") public Coach queryCoachById( Integer id){ try { return service.getById(id); }catch (Exception e){ e.printStackTrace(); return null; } } }