d2f034d634c1fb4882dc36e7fcce91c97d2bcd20.svn-base 868 B

1234567891011121314151617181920212223
  1. package com.chinacreator.videoalliance.sdk.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.bean.CPInfo;
  7. import com.chinacreator.videoalliance.common.util.DataSource;
  8. import com.frameworkset.common.poolman.SQLExecutor;
  9. @Component
  10. @CacheName("CPMess")
  11. public class CpinfoDao {
  12. @Cacheable(value="CPMess", key="#cpid")
  13. public CPInfo findById(String cpid) throws SQLException {
  14. String sql = "select a.cpid, a.cpname, a.status, b.syncaddr, b.netpwd, b.mobtype, b.sdspid from tb_cp_info a, TB_CP_ACCOUNT_CONFIG b where a.cpid = b.cpid and a.cptype=0 and a.cpid=?";
  15. return SQLExecutor.queryObjectWithDBName(CPInfo.class, DataSource.NET3G175, sql, cpid);
  16. }
  17. }