|
@@ -5,7 +5,6 @@ import com.uas.platform.b2c.common.account.model.Enterprise;
|
|
|
import com.uas.platform.b2c.common.base.dao.CommonDao;
|
|
import com.uas.platform.b2c.common.base.dao.CommonDao;
|
|
|
import com.uas.platform.b2c.common.search.rpc.service.SearchService;
|
|
import com.uas.platform.b2c.common.search.rpc.service.SearchService;
|
|
|
import com.uas.platform.b2c.common.search.util.SPage;
|
|
import com.uas.platform.b2c.common.search.util.SPage;
|
|
|
-import com.uas.platform.b2c.core.constant.IntegerConstant;
|
|
|
|
|
import com.uas.platform.b2c.core.support.SystemSession;
|
|
import com.uas.platform.b2c.core.support.SystemSession;
|
|
|
import com.uas.platform.b2c.prod.commodity.dao.V_ProductPrivateDao;
|
|
import com.uas.platform.b2c.prod.commodity.dao.V_ProductPrivateDao;
|
|
|
import com.uas.platform.b2c.prod.commodity.model.V_ProductPrivate;
|
|
import com.uas.platform.b2c.prod.commodity.model.V_ProductPrivate;
|
|
@@ -150,7 +149,8 @@ public class VendorIntroductionServiceImpl implements VendorIntroductionService
|
|
|
*/
|
|
*/
|
|
|
@Override
|
|
@Override
|
|
|
public Integer getVendorProductCount(Long vendUU) {
|
|
public Integer getVendorProductCount(Long vendUU) {
|
|
|
- return v_productPrivateDao.getCountByEnuuAndEnabled(vendUU, IntegerConstant.YES_SHORT);
|
|
|
|
|
|
|
+ Integer ifCount = v_productPrivateDao.hasValidProduct(vendUU);
|
|
|
|
|
+ return null != ifCount ? ifCount : 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -196,11 +196,9 @@ public class VendorIntroductionServiceImpl implements VendorIntroductionService
|
|
|
// 查找非供应商的卖当前商品的企业UU
|
|
// 查找非供应商的卖当前商品的企业UU
|
|
|
StringBuilder vendorIntroductionUusSql = new StringBuilder();
|
|
StringBuilder vendorIntroductionUusSql = new StringBuilder();
|
|
|
// 行数 控制
|
|
// 行数 控制
|
|
|
- String rownumSql = ") s order by isStore desc,prodCounts desc,enUU asc limit " + (page - 1) * size + "," + size ;
|
|
|
|
|
- vendorIntroductionUusSql.append("select s.*, if( st_uuid is not null and st_status = 'OPENED', 1, null) isStore");
|
|
|
|
|
- vendorIntroductionUusSql.append(",(select count(1) from ( select pr_enuu from v$product$private where ").append(productCondition)
|
|
|
|
|
- .append(" and ifnull(pr_b2cenabled, 1) = 1 and pr_pbranden is not null and pr_pcmpcode is not null) p1 where pr_enuu = enUU) prodCounts");
|
|
|
|
|
- vendorIntroductionUusSql.append(" from (").append(enterpriseSql).append(rownumSql);
|
|
|
|
|
|
|
+ String rownumSql = ") s order by isStore desc,enUU asc limit " + (page - 1) * size + "," + size ;
|
|
|
|
|
+ vendorIntroductionUusSql.append("select s.*, if( st_uuid is not null and st_status = 'OPENED', 1, null) isStore from (")
|
|
|
|
|
+ .append(enterpriseSql).append(rownumSql);
|
|
|
return commonDao.query(vendorIntroductionUusSql.toString(), VendorIntroduction.class);
|
|
return commonDao.query(vendorIntroductionUusSql.toString(), VendorIntroduction.class);
|
|
|
}
|
|
}
|
|
|
|
|
|