package com.chinacreator.videoalliance.sdk.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.bean.CPInfo; import com.chinacreator.videoalliance.common.util.DataSource; import com.frameworkset.common.poolman.SQLExecutor; @Component @CacheName("CPMess") public class CpinfoDao { @Cacheable(value="CPMess", key="#cpid") public CPInfo findById(String cpid) throws SQLException { 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=?"; return SQLExecutor.queryObjectWithDBName(CPInfo.class, DataSource.NET3G175, sql, cpid); } }