2f749fac563e1f1380527c6348d8087ee20bb7a4.svn-base 801 B

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