7593e1533b759061cf8cfa83ad8036555f441534.svn-base 709 B

123456789101112131415161718
  1. package com.chinacreator.videoalliance.query.dao;
  2. import java.sql.SQLException;
  3. import org.apache.commons.lang.math.NumberUtils;
  4. import org.springframework.stereotype.Component;
  5. import com.chinacreator.videoalliance.common.util.DataSource;
  6. import com.frameworkset.common.poolman.SQLExecutor;
  7. @Component
  8. public class ActiveDao {
  9. public boolean query(String cpid,String spid,String province,String activetype) throws SQLException {
  10. String sql = "select count(1) from TB_ACTIVITY_CONFIG where province in ('0',?) and cpid=? and spid=? and activetype=? and endtime > sysdate";
  11. return NumberUtils.toInt(SQLExecutor.queryFieldWithDBName(DataSource.NET3G, sql,province,cpid,spid,activetype), 0) > 0;
  12. }
  13. }