f06d934a8ac910c1e460a09d63d7cd9c7da69ef2.svn-base 1.1 KB

123456789101112131415161718192021222324252627
  1. package com.chinacreator.process.dao;
  2. import com.chinacreator.process.util.DataSource;
  3. import com.frameworkset.common.poolman.SQLExecutor;
  4. import org.springframework.stereotype.Component;
  5. import java.sql.SQLException;
  6. import java.util.HashMap;
  7. import java.util.List;
  8. @Component
  9. public class QueryCapOrderDao {
  10. public List<HashMap> findCapList()throws SQLException {
  11. String sql = " select * from TL_QUERYCAP_ORDER where INSERTTIME>sysdate-1/24/60 and CEIL((sysdate-INSERTTIME)*24*60*60)>5 and status!='0' and RESPPARAMS is null and cnt=0\n" +
  12. "union \n" +
  13. "select * from TL_QUERYCAP_ORDER where INSERTTIME>sysdate-1/24/60 and CEIL((sysdate-INSERTTIME)*24*60*60)>19 and status!='0' and RESPPARAMS is null and cnt=1 ";
  14. return SQLExecutor.queryListWithDBName(HashMap.class, DataSource.NET3G, sql);
  15. }
  16. public void updateStatus(String status ,String id) throws SQLException {
  17. String sql="update TL_QUERYCAP_ORDER set status= ? , cnt=cnt+1 , QRYTIME=SYSDATE where id= ? ";
  18. SQLExecutor.updateWithDBName(DataSource.NET3G,sql,status,id);
  19. }
  20. }