12345678910111213141516171819202122 |
- package com.chinacreator.videoalliance.order.dao;
- import com.chinacreator.common.support.cache.annotation.CacheName;
- import com.chinacreator.videoalliance.common.util.DataSource;
- import com.frameworkset.common.poolman.SQLExecutor;
- import org.apache.commons.lang.math.NumberUtils;
- import org.springframework.cache.annotation.Cacheable;
- import org.springframework.stereotype.Component;
- import java.sql.SQLException;
- @Component
- @CacheName("EcbOrderWhite")
- public class EcbOrderWhiteDao {
- @Cacheable(value={"EcbOrderWhite"}, key="#phone.concat(#cpid) + 'order'")
- public boolean queryEcbJoinWhite(String cpid, String spid, String province, String phone) throws SQLException {
- String sql = "select count(*) from TB_ORDERWHITE_CONFIG where status =0 and (spid = ? or spid='0' ) and (cpid = ? or cpid='0') and (province = ? or province='0') and phone=?";
- return NumberUtils.toLong(SQLExecutor.queryFieldWithDBName(DataSource.NET3G, sql, spid,cpid,province,phone))>0;
- }
- }
|