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