8343f625fc014fd6fee9a412c08a42dba9131f25.svn-base 897 B

123456789101112131415161718192021
  1. package com.chinacreator.videoalliance.smc.dao;
  2. import com.chinacreator.common.support.cache.annotation.CacheName;
  3. import com.chinacreator.videoalliance.common.util.DataSource;
  4. import com.frameworkset.common.poolman.SQLExecutor;
  5. import org.springframework.cache.annotation.Cacheable;
  6. import org.springframework.stereotype.Component;
  7. import java.sql.SQLException;
  8. @Component
  9. @CacheName("SmsContentDao")
  10. public class SmsContentDao {
  11. @Cacheable(value="SmsContentDao", key = "#cpid.concat(#spid).concat(#channel) + 'SmsContent'")
  12. public String getContent(String cpid,String spid,String channel) throws SQLException {
  13. String sql = "select CONTENT from TB_SMSCONTENT_INFO where cpid in (?,'0') and spid in (?,'0') and status=1 " +
  14. " and channel in (?,'0') order by cpid desc,spid desc,channel desc";
  15. return SQLExecutor.queryFieldWithDBName(DataSource.NET3G, sql, cpid,spid,channel);
  16. }
  17. }