packagecom.org.dao.impl;importjava.sql.Connection;importjava.sql.PreparedStatement;importjava.sql.ResultSet;importjava.sql.SQLException;importjava.util.ArrayList;importjava.util.List;importjava.util.Map;importorg.springframework.jdbc.core.BeanPropertyRowMapper;importorg.springframework.jdbc.core.PreparedStatementCreator;importorg.springframework.jdbc.core.RowCallbackHandler;importorg.springframework.jdbc.support.GeneratedKeyHolder;importorg.springframework.stereotype.Repository;importcom.org.JdbcTempBaseDao;importcom.org.dao.IUserDao;importcom.org.model.User;@Repository@SuppressWarnings("all")publicclassUserDaoImplextendsJdbcTempBaseDaoimplementsIUserDao{ @Override publicListgetUserList(){ Stringsql="select*fromuser"; finalListlist=newArrayList(); jdbcTemplate.query(sql,newRowCallbackHandler(){ @Override publicvoidprocessRow(ResultSetrs)throwsSQLException{ Useru=newUser(); u.setId(rs.getInt("id")); u.setUsername(rs.getString("username")); u.setPassword(rs.getString("password")); u.setCreateDate(rs.getString("createDate")); u.setModifyDate(rs.getString("modifyDate")); u.setType(rs.getString("type")); list.add(u); } }); returnlist; } @Override publicListgetUserLists(Mapmap){ returnnull; } @Override publicIntegergetUserCount(Mapmap){ Stringsql="selectcount(1)fromUserwhereid=?"; returngetJdbcTemplate().queryForObject(sql,Integer.class,map); } @Override publicUsergetUserById(IntegerprimaryKeyId){ Stringsql="selectid,username,password,createDate,modifyDate,typefromUserwhereid=?";ListuserList=getJdbcTemplate().query(sql,newBeanPropertyRowMapper(User.class),primaryKeyId);if(userList.size()==0){returnnull;}returnuserList.get(0); } @Override publicvoiddelUserById(Int
1