299e4d544f2781e7c29f4af6f1429e00c0a9a00d.svn-base 804 B

1234567891011121314151617181920
  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.CustomSpInfo;
  8. import com.frameworkset.common.poolman.SQLExecutor;
  9. @Component
  10. @CacheName("CustomDao")
  11. public class CustomDao {
  12. @Cacheable(value="CustomDao", key = "'findCp-' + #cpid")
  13. public CustomSpInfo findByCP(String cpid,String spid) throws SQLException {
  14. String sql = "select * from tb_customsp_info where cpid=? and spid =?";
  15. return SQLExecutor.queryObjectWithDBName(CustomSpInfo.class, DataSource.NET3G, sql, cpid,spid);
  16. }
  17. }