58 lines
1.2 KiB
Java
58 lines
1.2 KiB
Java
package com.baiyun.service.admin.impl;
|
|
|
|
import java.util.List;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import com.baiyun.dao.DoctorDao;
|
|
import com.baiyun.enity.Doctors;
|
|
import com.baiyun.service.admin.DoctorService;
|
|
|
|
/**
|
|
* @Description: TODO
|
|
* @author: bilibili
|
|
* @Date: 2021年6月14日
|
|
*/
|
|
@Service
|
|
public class DoctorServiceImpl implements DoctorService {
|
|
|
|
@Autowired
|
|
private DoctorDao doctorDao;
|
|
|
|
// 列出所有医生
|
|
@Override
|
|
public List<Doctors> listDoctors() {
|
|
List<Doctors> doctors = doctorDao.listDoctors();
|
|
return doctors;
|
|
}
|
|
|
|
// 根据id查询医生
|
|
@Override
|
|
public Doctors findDoctorById(int id) {
|
|
Doctors doctor = doctorDao.findDoctorById(id);
|
|
return doctor;
|
|
}
|
|
|
|
@Override
|
|
public List<Doctors> findDoctorByDptId(int departmentId) {
|
|
List<Doctors> doctors = doctorDao.findDoctorByDptId(departmentId);
|
|
return doctors;
|
|
}
|
|
|
|
// 根据id更新医生
|
|
@Override
|
|
public int updateDoctor(Doctors doctor) {
|
|
int i = doctorDao.updateDoctor(doctor);
|
|
return i;
|
|
}
|
|
|
|
// 添加医生
|
|
@Override
|
|
public int addDoctor(Doctors doctor) {
|
|
int i = doctorDao.addDoctor(doctor);
|
|
return i;
|
|
}
|
|
|
|
}
|