XtBbxxDAOImpl.java 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. package com.huimv.xt.dao;
  2. import java.util.ArrayList;
  3. import java.util.List;
  4. import java.util.Map;
  5. import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
  6. import com.huimv.busi.base.dto.ResponseBean;
  7. import com.huimv.busi.xt.constant.XtSqlMapConstant;
  8. import com.huimv.web.base.PageBean;
  9. import com.huimv.xt.dataobject.XtBbxx;
  10. import com.huimv.xt.dataobject.XtBbxxExample;
  11. public class XtBbxxDAOImpl extends SqlMapClientDaoSupport implements XtBbxxDAO {
  12. /**
  13. * This method was generated by Apache iBATIS ibator.
  14. * This method corresponds to the database table xt_bbxx
  15. *
  16. * @ibatorgenerated Mon Aug 11 14:03:13 CST 2014
  17. */
  18. public XtBbxxDAOImpl() {
  19. super();
  20. }
  21. /**
  22. * This method was generated by Apache iBATIS ibator.
  23. * This method corresponds to the database table xt_bbxx
  24. *
  25. * @ibatorgenerated Mon Aug 11 14:03:13 CST 2014
  26. */
  27. public int countByExample(XtBbxxExample example) {
  28. Integer count = (Integer) getSqlMapClientTemplate().queryForObject("xt_bbxx.ibatorgenerated_countByExample", example);
  29. return count;
  30. }
  31. /**
  32. * This method was generated by Apache iBATIS ibator.
  33. * This method corresponds to the database table xt_bbxx
  34. *
  35. * @ibatorgenerated Mon Aug 11 14:03:13 CST 2014
  36. */
  37. public int deleteByExample(XtBbxxExample example) {
  38. int rows = getSqlMapClientTemplate().delete("xt_bbxx.ibatorgenerated_deleteByExample", example);
  39. return rows;
  40. }
  41. /**
  42. * This method was generated by Apache iBATIS ibator.
  43. * This method corresponds to the database table xt_bbxx
  44. *
  45. * @ibatorgenerated Mon Aug 11 14:03:13 CST 2014
  46. */
  47. public int deleteByPrimaryKey(Integer id) {
  48. XtBbxx key = new XtBbxx();
  49. key.setId(id);
  50. int rows = getSqlMapClientTemplate().delete("xt_bbxx.ibatorgenerated_deleteByPrimaryKey", key);
  51. return rows;
  52. }
  53. /**
  54. * This method was generated by Apache iBATIS ibator.
  55. * This method corresponds to the database table xt_bbxx
  56. *
  57. * @ibatorgenerated Mon Aug 11 14:03:13 CST 2014
  58. */
  59. public void insert(XtBbxx record) {
  60. getSqlMapClientTemplate().insert("xt_bbxx.ibatorgenerated_insert", record);
  61. }
  62. /**
  63. * This method was generated by Apache iBATIS ibator.
  64. * This method corresponds to the database table xt_bbxx
  65. *
  66. * @ibatorgenerated Mon Aug 11 14:03:13 CST 2014
  67. */
  68. public void insertSelective(XtBbxx record) {
  69. getSqlMapClientTemplate().insert("xt_bbxx.ibatorgenerated_insertSelective", record);
  70. }
  71. /**
  72. * This method was generated by Apache iBATIS ibator.
  73. * This method corresponds to the database table xt_bbxx
  74. *
  75. * @ibatorgenerated Mon Aug 11 14:03:13 CST 2014
  76. */
  77. @SuppressWarnings("unchecked")
  78. public List<XtBbxx> selectByExampleWithBLOBs(XtBbxxExample example) {
  79. List<XtBbxx> list = getSqlMapClientTemplate().queryForList("xt_bbxx.ibatorgenerated_selectByExampleWithBLOBs", example);
  80. return list;
  81. }
  82. /**
  83. * This method was generated by Apache iBATIS ibator.
  84. * This method corresponds to the database table xt_bbxx
  85. *
  86. * @ibatorgenerated Mon Aug 11 14:03:13 CST 2014
  87. */
  88. @SuppressWarnings("unchecked")
  89. public List<XtBbxx> selectByExampleWithoutBLOBs(XtBbxxExample example) {
  90. List<XtBbxx> list = getSqlMapClientTemplate().queryForList("xt_bbxx.ibatorgenerated_selectByExample", example);
  91. return list;
  92. }
  93. /**
  94. * This method was generated by Apache iBATIS ibator.
  95. * This method corresponds to the database table xt_bbxx
  96. *
  97. * @ibatorgenerated Mon Aug 11 14:03:13 CST 2014
  98. */
  99. public XtBbxx selectByPrimaryKey(Integer id) {
  100. XtBbxx key = new XtBbxx();
  101. key.setId(id);
  102. XtBbxx record = (XtBbxx) getSqlMapClientTemplate().queryForObject("xt_bbxx.ibatorgenerated_selectByPrimaryKey", key);
  103. return record;
  104. }
  105. /**
  106. * This method was generated by Apache iBATIS ibator.
  107. * This method corresponds to the database table xt_bbxx
  108. *
  109. * @ibatorgenerated Mon Aug 11 14:03:13 CST 2014
  110. */
  111. public int updateByExampleSelective(XtBbxx record, XtBbxxExample example) {
  112. UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
  113. int rows = getSqlMapClientTemplate().update("xt_bbxx.ibatorgenerated_updateByExampleSelective", parms);
  114. return rows;
  115. }
  116. /**
  117. * This method was generated by Apache iBATIS ibator.
  118. * This method corresponds to the database table xt_bbxx
  119. *
  120. * @ibatorgenerated Mon Aug 11 14:03:13 CST 2014
  121. */
  122. public int updateByExampleWithBLOBs(XtBbxx record, XtBbxxExample example) {
  123. UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
  124. int rows = getSqlMapClientTemplate().update("xt_bbxx.ibatorgenerated_updateByExampleWithBLOBs", parms);
  125. return rows;
  126. }
  127. /**
  128. * This method was generated by Apache iBATIS ibator.
  129. * This method corresponds to the database table xt_bbxx
  130. *
  131. * @ibatorgenerated Mon Aug 11 14:03:13 CST 2014
  132. */
  133. public int updateByExampleWithoutBLOBs(XtBbxx record, XtBbxxExample example) {
  134. UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
  135. int rows = getSqlMapClientTemplate().update("xt_bbxx.ibatorgenerated_updateByExample", parms);
  136. return rows;
  137. }
  138. /**
  139. * This method was generated by Apache iBATIS ibator.
  140. * This method corresponds to the database table xt_bbxx
  141. *
  142. * @ibatorgenerated Mon Aug 11 14:03:13 CST 2014
  143. */
  144. public int updateByPrimaryKeySelective(XtBbxx record) {
  145. int rows = getSqlMapClientTemplate().update("xt_bbxx.ibatorgenerated_updateByPrimaryKeySelective", record);
  146. return rows;
  147. }
  148. /**
  149. * This method was generated by Apache iBATIS ibator.
  150. * This method corresponds to the database table xt_bbxx
  151. *
  152. * @ibatorgenerated Mon Aug 11 14:03:13 CST 2014
  153. */
  154. public int updateByPrimaryKeyWithBLOBs(XtBbxx record) {
  155. int rows = getSqlMapClientTemplate().update("xt_bbxx.ibatorgenerated_updateByPrimaryKeyWithBLOBs", record);
  156. return rows;
  157. }
  158. /**
  159. * This method was generated by Apache iBATIS ibator.
  160. * This method corresponds to the database table xt_bbxx
  161. *
  162. * @ibatorgenerated Mon Aug 11 14:03:13 CST 2014
  163. */
  164. public int updateByPrimaryKeyWithoutBLOBs(XtBbxx record) {
  165. int rows = getSqlMapClientTemplate().update("xt_bbxx.ibatorgenerated_updateByPrimaryKey", record);
  166. return rows;
  167. }
  168. /**
  169. * This class was generated by Apache iBATIS ibator.
  170. * This class corresponds to the database table xt_bbxx
  171. *
  172. * @ibatorgenerated Mon Aug 11 14:03:13 CST 2014
  173. */
  174. private static class UpdateByExampleParms extends XtBbxxExample {
  175. private Object record;
  176. public UpdateByExampleParms(Object record, XtBbxxExample example) {
  177. super(example);
  178. this.record = record;
  179. }
  180. @SuppressWarnings("unused")
  181. public Object getRecord() {
  182. return record;
  183. }
  184. }
  185. /**
  186. * 根据参数搜索XtBbxx
  187. * @return
  188. * @throws Exception
  189. */
  190. @SuppressWarnings("unchecked")
  191. public ResponseBean selectXtBbxxByParam(Map<String, Object> paramMap, PageBean pageBean) throws Exception {
  192. ResponseBean rb = new ResponseBean();
  193. List<XtBbxx> xtBbxxs = new ArrayList<XtBbxx>();
  194. int count = (Integer) getSqlMapClientTemplate().queryForObject(XtSqlMapConstant.SQLMAP_COUNT_BBXX_BY_PARAM, paramMap);
  195. if(null != pageBean) {
  196. int startRecord = pageBean.getCurrentPageFirstRecord();
  197. int endRecord = pageBean.getPageSize();
  198. paramMap.put("startRecord", startRecord);
  199. paramMap.put("endRecord", endRecord);
  200. pageBean.setRecordCount(count);
  201. } else {
  202. paramMap.put("startRecord", 0);
  203. paramMap.put("endRecord", count);
  204. }
  205. xtBbxxs = (List<XtBbxx>) getSqlMapClientTemplate().queryForList(XtSqlMapConstant.SQLMAP_SELECT_BBXX_BY_PARAM, paramMap);
  206. rb.setResult(xtBbxxs);
  207. rb.setReturnCode(count);
  208. return rb;
  209. }
  210. /**
  211. * 获取fbsj最大的bbxx记录
  212. */
  213. public XtBbxx selectXtBbxxByMaxFbsj(Map<String, Object> map) throws Exception {
  214. return (XtBbxx) getSqlMapClientTemplate().queryForObject(XtSqlMapConstant.SQLMAP_SELECT_BBXX_BY_MAX_FBSJ, map);
  215. }
  216. }