use of com.rainsoft.domain.RegContentFtp in project beijingThirdPeriod by weidongcao.
the class FtpDaoImpl method getFtpBydate.
@Override
public List<RegContentFtp> getFtpBydate(String date) {
JdbcTemplate jdbcTemplate = getJdbcTemplate();
jdbcTemplate.setFetchSize(1000);
String templeSql = "select * from REG_CONTENT_FTP where import_time >= to_date('${date}' ,'yyyy-mm-dd') and import_time < (to_date('${date}' ,'yyyy-mm-dd') + 1)";
String sql = templeSql.replace("${date}", date);
logger.info("FTP数据获取一天数据的sql: {}", sql);
return jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(RegContentFtp.class));
}
use of com.rainsoft.domain.RegContentFtp in project beijingThirdPeriod by weidongcao.
the class TestSpringOracle method testSpringConnectionOracle.
private static void testSpringConnectionOracle() {
AbstractApplicationContext context = new ClassPathXmlApplicationContext("spring-module.xml");
FtpDao ftpDao = (FtpDao) context.getBean("ftpDao");
// 获取数据库一天的数据
RegContentFtp ftp = ftpDao.getFtpById(1905067);
JSONObject jsonObject = JSONObject.fromObject(ftp);
System.out.println(jsonObject.toString());
context.close();
}
use of com.rainsoft.domain.RegContentFtp in project beijingThirdPeriod by weidongcao.
the class FtpDaoImpl method getFtpById.
@Override
public RegContentFtp getFtpById(int id) {
JdbcTemplate jdbcTemplate = getJdbcTemplate();
jdbcTemplate.setFetchSize(1000);
String sql = "select * from REG_CONTENT_FTP where id = ?";
List<RegContentFtp> list = jdbcTemplate.query(sql, new Object[] { id }, new BeanPropertyRowMapper<>(RegContentFtp.class));
return list.get(0);
}
Aggregations