无关风月
2024-07-11 eb6b6dbb35a9f029e0b7d269773685c19fd40976
cloud-server-management/src/main/java/com/dsh/course/feignClient/account/CoachClient.java
@@ -1,8 +1,14 @@
package com.dsh.course.feignClient.account;
import com.dsh.course.feignClient.account.model.Coach;
import com.dsh.course.feignClient.account.model.CoachSerchVO;
import com.dsh.guns.modular.system.model.CoachChangeStateVO;
import com.dsh.guns.modular.system.model.CoachQuery;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
@@ -13,6 +19,39 @@
@FeignClient("mb-cloud-account")
public interface CoachClient {
    /**根据运营商id查询教练
     */
    @PostMapping("/coach/queryCoachByOperatorId")
    List<Coach> queryCoachByOperatorId(@RequestBody Integer operatorId);
    /**
     * 上/下架、删除常见问题 type=1为上架 2为下架 3为删除
     */
    @RequestMapping("/coach/changeState")
    Object changeState(@RequestBody CoachChangeStateVO vo);
    /**
     * 获取教练列表数据
     */
    @PostMapping("/coach/listAll")
    List<CoachSerchVO> listAll(@RequestBody CoachQuery query);
    /**
     * 添加教练
     * @return
     */
    @RequestMapping("/base/site/addCoach")
    Object addCoach(@RequestBody Coach coach);
    /**
     * 获取所有省
     */
    @PostMapping("/coach/getProvince")
    List<Coach> getProvince();
    /**
     * 根据选择的省获取对应的市
     */
    @PostMapping("/coach/getCity")
    List<Coach> getCity(@RequestBody String city);
    /**
     * 获取城市下的所有教练
@@ -21,4 +60,13 @@
     */
    @PostMapping("/coach/queryCoachByCity")
    List<Coach> queryCoachByCity(String cityCode);
    /**
     * 根据id获取教练
     * @param id
     * @return
     */
    @PostMapping("/coach/queryCoachById")
    Coach queryCoachById(Integer id);
}