Browse Source

品牌产品数和品类产品数取值更新为从products表中获取

hejq 7 years ago
parent
commit
7040f44d1b

+ 2 - 2
src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/GoodsServiceImpl.java

@@ -4067,7 +4067,7 @@ public class GoodsServiceImpl implements GoodsService {
     public com.uas.sso.support.Page<BrandCount> getBrandProductsCount(Pageable pageable, Date startTime, Date endTime) {
         java.sql.Date startDate = assignStartDate(startTime);
         java.sql.Date endDate = assignEndDate(endTime);
-        StringBuffer sql = new StringBuffer("select br_name_en as brand, count(1) as count from trade$goods where br_name_en is not null and go_createddate between ? and ? group by br_name_en");
+        StringBuffer sql = new StringBuffer("select pr_brand as brand, count(1) as count from products where pr_brand is not null and pr_create_time between ? and ? group by pr_brand");
         StringBuffer countSql = new StringBuffer("select count(1) from (").append(sql).append(") as a");
         Integer count = commonDao.queryForObject(countSql.toString(), Integer.class, startDate, endDate);
         // 分页参数
@@ -4126,7 +4126,7 @@ public class GoodsServiceImpl implements GoodsService {
     public com.uas.sso.support.Page<KindHierarchicalCount> getKindProductsCount(Pageable pageable, Date startTime, Date endTime) {
         java.sql.Date startDate = assignStartDate(startTime);
         java.sql.Date endDate = assignEndDate(endTime);
-        StringBuffer sql = new StringBuffer("select ki_name as thirdKind, go_kind_uuid as kindId, count(1) as count from trade$goods where go_createddate between ? and ? group by ki_name, go_kind_uuid");
+        StringBuffer sql = new StringBuffer("select pr_kind as thirdKind, pr_kindid as kindId, count(1) as count from products where pr_create_time between ? and ? group by pr_kind, pr_kindid");
         StringBuffer countSql = new StringBuffer("select count(1) from (").append(sql).append(") as a");
         Integer count = commonDao.queryForObject(countSql.toString(), Integer.class, startDate, endDate);
         // 分页参数