package com.chinacreator.videoalliance.order.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.order.bean.ChannelOrgBean; import com.frameworkset.common.poolman.SQLExecutor; @Component @CacheName("ChannelDao") public class ChannelDao { @Cacheable(value={"ChannelDao"}, key="'findById-' + #id") public ChannelOrgBean findByChannelId(String id) throws SQLException { String sql = "select * from TB_CHANNEL_ORG where id=?"; return SQLExecutor.queryObjectWithDBName(ChannelOrgBean.class, DataSource.NET3G, sql, id); } }