package com.chinacreator.videoalliance.smc.dao; import java.sql.SQLException; import org.springframework.cache.annotation.Cacheable; import org.springframework.stereotype.Component; import com.chinacreator.common.support.cache.annotation.CacheName; import com.chinacreator.videoalliance.common.util.DataSource; import com.chinacreator.videoalliance.smc.bean.SmsSendBean; import com.frameworkset.common.poolman.SQLExecutor; @Component @CacheName("SmsSendDao") public class SmsSendDao { @Cacheable(value="SmsSendDao", key = "'findByChannel-' + #cpid") public SmsSendBean querySmsConfig(String channel) throws SQLException{ String sql = "select * from TB_SMSSEND_CONFIG where status = 0 and channel = ?"; return SQLExecutor.queryObjectWithDBName(SmsSendBean.class, DataSource.NET3G, sql,channel); } }