puzhibing
2023-07-07 0be58dbf7774fef98ddac83c3f454b49c6d5a6c1
cloud-server-account/src/main/java/com/dsh/account/controller/CoachController.java
New file
@@ -0,0 +1,31 @@
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;
        }
    }
}