576be86f598d54bfe8012e46b33c21ee35333333.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 RedeemUserDao {
  10. public List<HashMap> getRedeemUserList() throws SQLException {
  11. String sql="select t.id,t.userid,t.retrycnt,t.spid,t.cpid,b.smscof from TD_REDEEM_USER t join TB_REDEEM_CONF b on t.smstype is null and t.spid=b.spid and b.STATUS='0' where t.status in ('2','3') and t.retrycnt<3 and t.updatetime < sysdate-1/144";
  12. return SQLExecutor.queryListWithDBName(HashMap.class, DataSource.NET3G, sql,null);
  13. }
  14. public void updateType(String id) throws SQLException {
  15. String sql="update TD_REDEEM_USER t set t.smstype='0' where id= ?";
  16. SQLExecutor.updateWithDBName(DataSource.NET3G,sql,id);
  17. }
  18. public void updateRetry(String id,String retry) throws SQLException {
  19. String sql="update TD_REDEEM_USER t set t.RETRYCNT= ? where id= ?";
  20. SQLExecutor.updateWithDBName(DataSource.NET3G,sql,retry,id);
  21. }
  22. }