package com.jxust.svsh.service; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.jxust.svsh.dao.PersonDAO; import com.jxust.svsh.entity.Person; @Transactional @Service public class PersonService { //进行自动装配,无需get/set方法 @Autowired public PersonDAO personDAO; /** * 添加 * @param person */ public void addPerson(Person person) { personDAO.addPerson(person); } /** * 根据id查询 * @param id * @return */ public Person getPersonById(String id){ return personDAO.getPersonById(id); } /** * 更新 * @param person */ public void updatePerson(Person person) { personDAO.updatePerson(person); } /** * 删除 * @param id */ public void deletePersonById(String id) { personDAO.deletePersonById(id); } /** * 查询所有 * @return */ public List<Person> getPersons() { return personDAO.getPersons(); } }
最近下载更多
zhengwei_147 LV1
2023年6月11日
3516569014 LV5
2023年5月7日
lvchengliang LV4
2022年6月15日
1798139161 LV4
2022年2月7日
大彬 LV2
2021年12月13日
漫长的白日梦 LV8
2021年12月4日
没有鱼 LV3
2021年8月17日
8 LV1
2021年6月24日
吹星落雨 LV1
2021年6月22日
和味道江森 LV1
2021年4月17日