9e36b35293eab331ae15c0461b28ffdfefbaf035.svn-base 810 B

12345678910111213141516171819202122
  1. package com.chinacreator.videoalliance.smc.dao;
  2. import java.sql.SQLException;
  3. import org.springframework.cache.annotation.Cacheable;
  4. import org.springframework.stereotype.Component;
  5. import com.chinacreator.common.support.cache.annotation.CacheName;
  6. import com.chinacreator.videoalliance.common.util.DataSource;
  7. import com.chinacreator.videoalliance.smc.bean.SmsSendBean;
  8. import com.frameworkset.common.poolman.SQLExecutor;
  9. @Component
  10. @CacheName("SmsSendDao")
  11. public class SmsSendDao {
  12. @Cacheable(value="SmsSendDao", key = "'findByChannel-' + #cpid")
  13. public SmsSendBean querySmsConfig(String channel) throws SQLException{
  14. String sql = "select * from TB_SMSSEND_CONFIG where status = 0 and channel = ?";
  15. return SQLExecutor.queryObjectWithDBName(SmsSendBean.class, DataSource.NET3G, sql,channel);
  16. }
  17. }