package com.fs.app.controller;


import com.fs.common.core.domain.R;
import com.fs.store.domain.FsDepartment;
import com.fs.store.service.IFsDepartmentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@Api("科室接口")
@RestController
@RequestMapping(value="/app/department")
public class DepartmentController {
	@Autowired
	private IFsDepartmentService departmentService;

	@ApiOperation("获取科室列表")
	@GetMapping("/getDepartmentList")
	public R getDepartmentList(FsDepartment param){
		try {
			param.setStatus(1);
			List<FsDepartment> list=departmentService.selectFsDepartmentList(param);
			return R.ok().put("data",list);
		} catch (Exception e){
			return R.error("操作异常");
		}
	}



}
