IndexImgDaoImpl.java 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. package com.enterprise.dao.impl;
  2. import com.enterprise.dao.BaseDao;
  3. import com.enterprise.entity.IndexImg;
  4. import com.enterprise.entity.page.PageModel;
  5. import com.enterprise.dao.IndexImgDao;
  6. import org.springframework.stereotype.Repository;
  7. import javax.annotation.Resource;
  8. import java.util.List;
  9. /**
  10. * Created by Cesiumai on 2016/5/27.
  11. */
  12. @Repository("indexImgDao")
  13. public class IndexImgDaoImpl implements IndexImgDao {
  14. @Resource
  15. private BaseDao dao;
  16. public void setDao(BaseDao dao) {
  17. this.dao = dao;
  18. }
  19. @Override
  20. public int insert(IndexImg indexImg) {
  21. return dao.insert("indeximg.insert",indexImg);
  22. }
  23. @Override
  24. public int delete(IndexImg indexImg) {
  25. return dao.delete("indeximg.delete",indexImg);
  26. }
  27. @Override
  28. public int update(IndexImg indexImg) {
  29. return dao.update("indeximg.update",indexImg);
  30. }
  31. @Override
  32. public IndexImg selectOne(IndexImg indexImg) {
  33. return (IndexImg) dao.selectOne("indeximg.selectOne",indexImg);
  34. }
  35. @Override
  36. public PageModel selectPageList(IndexImg indexImg) {
  37. return dao.selectPageList("indeximg.selectPageList","indeximg.selectPageCount",indexImg);
  38. }
  39. @Override
  40. public List<IndexImg> selectList(IndexImg indexImg) {
  41. return dao.selectList("indeximg.selectList",indexImg);
  42. }
  43. @Override
  44. public int deleteById(int id) {
  45. return dao.delete("indeximg.deleteById",id);
  46. }
  47. @Override
  48. public IndexImg selectById(int id) {
  49. return (IndexImg) dao.selectOne("indeximg.selectById",id);
  50. }
  51. }