123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275 |
- package com.huimv.sjlr.dao;
- import java.sql.SQLException;
- import java.util.List;
- import java.util.Map;
- import org.springframework.orm.ibatis.SqlMapClientCallback;
- import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
- import com.huimv.busi.xt.constant.XtSqlMapConstant;
- import com.huimv.sjlr.dataobject.SjlrMzda;
- import com.huimv.sjlr.dataobject.SjlrZzxs;
- import com.huimv.sjlr.dataobject.SjlrZzxsExample;
- import com.ibatis.sqlmap.client.SqlMapExecutor;
- public class SjlrZzxsDAOImpl extends SqlMapClientDaoSupport implements SjlrZzxsDAO {
- /**
- * This method was generated by Apache iBATIS ibator.
- * This method corresponds to the database table sjlr_zzxs
- *
- * @ibatorgenerated Wed Mar 08 10:45:12 CST 2017
- */
- public SjlrZzxsDAOImpl() {
- super();
- }
- /**
- * This method was generated by Apache iBATIS ibator.
- * This method corresponds to the database table sjlr_zzxs
- *
- * @ibatorgenerated Wed Mar 08 10:45:12 CST 2017
- */
- public int countByExample(SjlrZzxsExample example) {
- Integer count = (Integer) getSqlMapClientTemplate().queryForObject("sjlr_zzxs.ibatorgenerated_countByExample", example);
- return count;
- }
- /**
- * This method was generated by Apache iBATIS ibator.
- * This method corresponds to the database table sjlr_zzxs
- *
- * @ibatorgenerated Wed Mar 08 10:45:12 CST 2017
- */
- public int deleteByExample(SjlrZzxsExample example) {
- int rows = getSqlMapClientTemplate().delete("sjlr_zzxs.ibatorgenerated_deleteByExample", example);
- return rows;
- }
- /**
- * This method was generated by Apache iBATIS ibator.
- * This method corresponds to the database table sjlr_zzxs
- *
- * @ibatorgenerated Wed Mar 08 10:45:12 CST 2017
- */
- public int deleteByPrimaryKey(Integer id) {
- SjlrZzxs key = new SjlrZzxs();
- key.setId(id);
- int rows = getSqlMapClientTemplate().delete("sjlr_zzxs.ibatorgenerated_deleteByPrimaryKey", key);
- return rows;
- }
- /**
- * This method was generated by Apache iBATIS ibator.
- * This method corresponds to the database table sjlr_zzxs
- *
- * @ibatorgenerated Wed Mar 08 10:45:12 CST 2017
- */
- public void insert(SjlrZzxs record) {
- getSqlMapClientTemplate().insert("sjlr_zzxs.ibatorgenerated_insert", record);
- }
- /**
- * This method was generated by Apache iBATIS ibator.
- * This method corresponds to the database table sjlr_zzxs
- *
- * @ibatorgenerated Wed Mar 08 10:45:12 CST 2017
- */
- public void insertSelective(SjlrZzxs record) {
- getSqlMapClientTemplate().insert("sjlr_zzxs.ibatorgenerated_insertSelective", record);
- }
- /**
- * This method was generated by Apache iBATIS ibator.
- * This method corresponds to the database table sjlr_zzxs
- *
- * @ibatorgenerated Wed Mar 08 10:45:12 CST 2017
- */
- @SuppressWarnings("unchecked")
- public List<SjlrZzxs> selectByExample(SjlrZzxsExample example) {
- List<SjlrZzxs> list = getSqlMapClientTemplate().queryForList("sjlr_zzxs.ibatorgenerated_selectByExample", example);
- return list;
- }
- /**
- * This method was generated by Apache iBATIS ibator.
- * This method corresponds to the database table sjlr_zzxs
- *
- * @ibatorgenerated Wed Mar 08 10:45:12 CST 2017
- */
- public SjlrZzxs selectByPrimaryKey(Integer id) {
- SjlrZzxs key = new SjlrZzxs();
- key.setId(id);
- SjlrZzxs record = (SjlrZzxs) getSqlMapClientTemplate().queryForObject("sjlr_zzxs.ibatorgenerated_selectByPrimaryKey", key);
- return record;
- }
- /**
- * This method was generated by Apache iBATIS ibator.
- * This method corresponds to the database table sjlr_zzxs
- *
- * @ibatorgenerated Wed Mar 08 10:45:12 CST 2017
- */
- public int updateByExampleSelective(SjlrZzxs record, SjlrZzxsExample example) {
- UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
- int rows = getSqlMapClientTemplate().update("sjlr_zzxs.ibatorgenerated_updateByExampleSelective", parms);
- return rows;
- }
- /**
- * This method was generated by Apache iBATIS ibator.
- * This method corresponds to the database table sjlr_zzxs
- *
- * @ibatorgenerated Wed Mar 08 10:45:12 CST 2017
- */
- public int updateByExample(SjlrZzxs record, SjlrZzxsExample example) {
- UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
- int rows = getSqlMapClientTemplate().update("sjlr_zzxs.ibatorgenerated_updateByExample", parms);
- return rows;
- }
- /**
- * This method was generated by Apache iBATIS ibator.
- * This method corresponds to the database table sjlr_zzxs
- *
- * @ibatorgenerated Wed Mar 08 10:45:12 CST 2017
- */
- public int updateByPrimaryKeySelective(SjlrZzxs record) {
- int rows = getSqlMapClientTemplate().update("sjlr_zzxs.ibatorgenerated_updateByPrimaryKeySelective", record);
- return rows;
- }
- /**
- * This method was generated by Apache iBATIS ibator.
- * This method corresponds to the database table sjlr_zzxs
- *
- * @ibatorgenerated Wed Mar 08 10:45:12 CST 2017
- */
- public int updateByPrimaryKey(SjlrZzxs record) {
- int rows = getSqlMapClientTemplate().update("sjlr_zzxs.ibatorgenerated_updateByPrimaryKey", record);
- return rows;
- }
- /**
- * This class was generated by Apache iBATIS ibator.
- * This class corresponds to the database table sjlr_zzxs
- *
- * @ibatorgenerated Wed Mar 08 10:45:12 CST 2017
- */
- private static class UpdateByExampleParms extends SjlrZzxsExample {
- private Object record;
- public UpdateByExampleParms(Object record, SjlrZzxsExample example) {
- super(example);
- this.record = record;
- }
- public Object getRecord() {
- return record;
- }
- }
-
- @Override
- public List<SjlrZzxs> selectZzxsListByParam(Map<String, Object> paramMap) {
- @SuppressWarnings("unchecked")
- List<SjlrZzxs> zzxsList = getSqlMapClientTemplate().queryForList(XtSqlMapConstant.SQLMAP_SELECT_SJLR_ZZXS_BY_PARAM, paramMap);
- return zzxsList;
- }
- @Override
- public List<SjlrMzda> selectZzxsDaListByParam(Map<String, Object> paramMap) {
- @SuppressWarnings("unchecked")
- List<SjlrMzda> zzxsList = getSqlMapClientTemplate().queryForList(XtSqlMapConstant.SQLMAP_SELECT_SJLR_ZZXS_DA_BY_PARAM, paramMap);
- return zzxsList;
- }
- @Override
- public List<SjlrZzxs> selectZzdsListByParam(Map<String, Object> paramMap) {
- @SuppressWarnings("unchecked")
- List<SjlrZzxs> zzdsList = getSqlMapClientTemplate().queryForList(XtSqlMapConstant.SQLMAP_SELECT_SJLR_ZZDS_BY_PARAM, paramMap);
- return zzdsList;
- }
- @Override
- public List<SjlrMzda> selectZzdsDaListByParam(Map<String, Object> paramMap) {
- @SuppressWarnings("unchecked")
- List<SjlrMzda> zzdsList = getSqlMapClientTemplate().queryForList(XtSqlMapConstant.SQLMAP_SELECT_SJLR_ZZDS_BY_PARAM, paramMap);
- return zzdsList;
- }
- /**
- * 更新待售种猪
- */
- public void updateZzdsByParam(List<SjlrZzxs> paramMapList) {
- HpSjlrZzdsupSqlMapClientCallback hpSjlrZzdsupSqlMapClientCallback = new HpSjlrZzdsupSqlMapClientCallback();
- hpSjlrZzdsupSqlMapClientCallback.setParamMapList(paramMapList);
- getSqlMapClientTemplate().execute(hpSjlrZzdsupSqlMapClientCallback);
- }
-
- /**
- * 更新数据的回调类
- */
- private class HpSjlrZzdsupSqlMapClientCallback implements SqlMapClientCallback {
- private List<SjlrZzxs> paramMapList;
-
- public void setParamMapList(List<SjlrZzxs> paramMapList) {
- this.paramMapList = paramMapList;
- }
- @Override
- public Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException {
- executor.startBatch();
- for (SjlrZzxs sjlrZzxs : paramMapList) {
- executor.update("sjlr_zzxs.ibatorgenerated_updateByExampleSelective", sjlrZzxs);
- }
- executor.executeBatch();
- return null;
- }
- }
- /**
- * 上传待售种猪
- */
- public void insertZzdsByParam(List<SjlrZzxs> paramMapList) {
- HpSjlrZzdsSqlMapClientCallback hpSjlrZzdsSqlMapClientCallback = new HpSjlrZzdsSqlMapClientCallback();
- hpSjlrZzdsSqlMapClientCallback.setParamMapList(paramMapList);
- getSqlMapClientTemplate().execute(hpSjlrZzdsSqlMapClientCallback);
- }
-
- /**
- *上传数据的回调类
- */
- private class HpSjlrZzdsSqlMapClientCallback implements SqlMapClientCallback {
- private List<SjlrZzxs> paramMapList;
-
- public void setParamMapList(List<SjlrZzxs> paramMapList) {
- this.paramMapList = paramMapList;
- }
- @Override
- public Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException {
- executor.startBatch();
- for (SjlrZzxs sjlrZzxs : paramMapList) {
- executor.insert("sjlr_zzxs.ibatorgenerated_insertSelective", sjlrZzxs);
- }
- executor.executeBatch();
- return null;
- }
- }
- @Override
- public List<SjlrZzxs> selectZzdsAlltByParam(Map<String, Object> paramMap) {
- @SuppressWarnings("unchecked")
- List<SjlrZzxs> zzdsList = getSqlMapClientTemplate().queryForList(XtSqlMapConstant.SQLMAP_SELECT_SJLR_ZZDSTJ_BY_PARAM, paramMap);
- return zzdsList;
- }
- @Override
- public List<SjlrZzxs> selectZzxsAllListByParam(Map<String, Object> paramMap) {
- @SuppressWarnings("unchecked")
- List<SjlrZzxs> zzdsList = getSqlMapClientTemplate().queryForList(XtSqlMapConstant.SQLMAP_SELECT_SJLR_ZZXSlIST_BY_PARAM, paramMap);
- return zzdsList;
- }
-
-
- }
|