package com.ruoyi.web.work.api;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.web.work.api.config.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/app/doctor")
public class Api_DoctorController extends BaseController {

    @Autowired
    private ISysUserService userService;

    @GetMapping("/list")
    public AjaxResult list(SysUser user) {
        return AjaxResult.success(userService.selectDoctor(user));
    }

    @GetMapping(value = "/detail/{id}")
    public AjaxResult detail(@PathVariable("id") Long id) {
        return AjaxResult.success(userService.detail(id));
    }


}

