PayFeeDetailMonthServiceDaoImpl.java 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. package com.java110.fee.dao.impl;
  2. import com.alibaba.fastjson.JSONObject;
  3. import com.java110.core.base.dao.BaseServiceDao;
  4. import com.java110.fee.dao.IPayFeeDetailMonthServiceDao;
  5. import com.java110.utils.constant.ResponseConstant;
  6. import com.java110.utils.exception.DAOException;
  7. import org.slf4j.Logger;
  8. import com.java110.core.log.LoggerFactory;
  9. import org.springframework.stereotype.Service;
  10. import java.util.List;
  11. import java.util.Map;
  12. /**
  13. * 月缴费表服务 与数据库交互
  14. * Created by wuxw on 2017/4/5.
  15. */
  16. @Service("payFeeDetailMonthServiceDaoImpl")
  17. //@Transactional
  18. public class PayFeeDetailMonthServiceDaoImpl extends BaseServiceDao implements IPayFeeDetailMonthServiceDao {
  19. private static Logger logger = LoggerFactory.getLogger(PayFeeDetailMonthServiceDaoImpl.class);
  20. /**
  21. * 保存月缴费表信息 到 instance
  22. *
  23. * @param info bId 信息
  24. * @throws DAOException DAO异常
  25. */
  26. @Override
  27. public void savePayFeeDetailMonthInfo(Map info) throws DAOException {
  28. logger.debug("保存月缴费表信息Instance 入参 info : {}", info);
  29. int saveFlag = sqlSessionTemplate.insert("payFeeDetailMonthServiceDaoImpl.savePayFeeDetailMonthInfo", info);
  30. if (saveFlag < 1) {
  31. throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存月缴费表信息Instance数据失败:" + JSONObject.toJSONString(info));
  32. }
  33. }
  34. @Override
  35. public int savePayFeeDetailMonthInfos(Map info) {
  36. logger.debug("保存月缴费表信息Instance 入参 info : {}", info);
  37. int saveFlag = sqlSessionTemplate.insert("payFeeDetailMonthServiceDaoImpl.savePayFeeDetailMonthInfos", info);
  38. return saveFlag;
  39. }
  40. /**
  41. * 查询月缴费表信息(instance)
  42. *
  43. * @param info bId 信息
  44. * @return List<Map>
  45. * @throws DAOException DAO异常
  46. */
  47. @Override
  48. public List<Map> getPayFeeDetailMonthInfo(Map info) throws DAOException {
  49. logger.debug("查询月缴费表信息 入参 info : {}", info);
  50. List<Map> businessPayFeeDetailMonthInfos = sqlSessionTemplate.selectList("payFeeDetailMonthServiceDaoImpl.getPayFeeDetailMonthInfo", info);
  51. return businessPayFeeDetailMonthInfos;
  52. }
  53. /**
  54. * 修改月缴费表信息
  55. *
  56. * @param info 修改信息
  57. * @throws DAOException DAO异常
  58. */
  59. @Override
  60. public void updatePayFeeDetailMonthInfo(Map info) throws DAOException {
  61. logger.debug("修改月缴费表信息Instance 入参 info : {}", info);
  62. sqlSessionTemplate.update("payFeeDetailMonthServiceDaoImpl.updatePayFeeDetailMonthInfo", info);
  63. // if (saveFlag < 1) {
  64. // throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "修改月缴费表信息Instance数据失败:" + JSONObject.toJSONString(info));
  65. // }
  66. }
  67. /**
  68. * 查询月缴费表数量
  69. *
  70. * @param info 月缴费表信息
  71. * @return 月缴费表数量
  72. */
  73. @Override
  74. public int queryPayFeeDetailMonthsCount(Map info) {
  75. logger.debug("查询月缴费表数据 入参 info : {}", info);
  76. List<Map> businessPayFeeDetailMonthInfos = sqlSessionTemplate.selectList("payFeeDetailMonthServiceDaoImpl.queryPayFeeDetailMonthsCount", info);
  77. if (businessPayFeeDetailMonthInfos.size() < 1) {
  78. return 0;
  79. }
  80. return Integer.parseInt(businessPayFeeDetailMonthInfos.get(0).get("count").toString());
  81. }
  82. @Override
  83. public List<Map> queryPayFeeDetailMaxMonths(Map info) {
  84. logger.debug("查询queryPayFeeDetailMaxMonths信息 入参 info : {}", info);
  85. List<Map> businessPayFeeDetailMonthInfos = sqlSessionTemplate.selectList("payFeeDetailMonthServiceDaoImpl.queryPayFeeDetailMaxMonths", info);
  86. return businessPayFeeDetailMonthInfos;
  87. }
  88. @Override
  89. public List<Map> getWaitDispersedFeeDetail(Map info) {
  90. logger.debug("查询getWaitDispersedFeeDetail信息 入参 info : {}", info);
  91. List<Map> businessPayFeeDetailMonthInfos = sqlSessionTemplate.selectList("payFeeDetailMonthServiceDaoImpl.getWaitDispersedFeeDetail", info);
  92. return businessPayFeeDetailMonthInfos;
  93. }
  94. @Override
  95. public void deletePayFeeDetailMonthInfo(Map info) {
  96. sqlSessionTemplate.update("payFeeDetailMonthServiceDaoImpl.deletePayFeeDetailMonthInfo", info);
  97. }
  98. @Override
  99. public List<Map> queryPagePayFeeDetailMonths(Map info) {
  100. logger.debug("查询 queryPagePayFeeDetailMonths 信息 入参 info : {}", info);
  101. List<Map> infos = sqlSessionTemplate.selectList("payFeeDetailMonthServiceDaoImpl.queryPagePayFeeDetailMonths", info);
  102. return infos;
  103. }
  104. /**
  105. * 查询月缴费表数量
  106. *
  107. * @param info 月缴费表信息
  108. * @return 月缴费表数量
  109. */
  110. @Override
  111. public int queryPagePayFeeDetailMonthsCount(Map info) {
  112. logger.debug("查询月缴费表数据 入参 info : {}", info);
  113. List<Map> businessPayFeeDetailMonthInfos = sqlSessionTemplate.selectList("payFeeDetailMonthServiceDaoImpl.queryPagePayFeeDetailMonthsCount", info);
  114. if (businessPayFeeDetailMonthInfos.size() < 1) {
  115. return 0;
  116. }
  117. return Integer.parseInt(businessPayFeeDetailMonthInfos.get(0).get("count").toString());
  118. }
  119. }