|
@@ -1,6 +1,7 @@
|
|
|
package com.caimei.modules.hehe.service;
|
|
|
|
|
|
import com.caimei.modules.hehe.dao.CmHeheActivityProductDao;
|
|
|
+import com.caimei.modules.hehe.dao.CmHeheProductDao;
|
|
|
import com.caimei.modules.hehe.entity.CmHeHeActivityLadder;
|
|
|
import com.caimei.modules.hehe.entity.CmHeheActivityProduct;
|
|
|
import com.caimei.modules.hehe.entity.CmHeheProduct;
|
|
@@ -28,6 +29,9 @@ public class CmHeheActivityProductService extends CrudService<CmHeheActivityProd
|
|
|
@Autowired
|
|
|
private CmHeheActivityProductDao activityProductDao;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private CmHeheProductDao heheProductDao;
|
|
|
+
|
|
|
public CmHeheActivityProduct get(String id) {
|
|
|
CmHeheActivityProduct activityProduct = super.get(id);
|
|
|
List<CmHeHeActivityLadder> activityLadderList = activityProductDao.findActivityLadder(activityProduct.getActivityId(), activityProduct.getProductId());
|
|
@@ -61,10 +65,13 @@ public class CmHeheActivityProductService extends CrudService<CmHeheActivityProd
|
|
|
}
|
|
|
|
|
|
public Page<CmHeheProduct> findProductPage(Page<CmHeheProduct> productPage, CmHeheProduct product) {
|
|
|
- List<Integer> productIds = activityProductDao.findActivityProductId();
|
|
|
+ List<Integer> productIds = heheProductDao.findActivityProductIds();
|
|
|
// 已参与拼团商品id
|
|
|
- List<Integer> collageProductIds = activityProductDao.findCollageProductId();
|
|
|
+ List<Integer> collageProductIds = heheProductDao.findCollageProductIds();
|
|
|
+ // 已参与限时特价的商品id
|
|
|
+ List<Integer> discountProductIds = heheProductDao.findDiscountProductIds();
|
|
|
productIds.addAll(collageProductIds);
|
|
|
+ productIds.addAll(discountProductIds);
|
|
|
product.setIds(productIds);
|
|
|
product.setPage(productPage);
|
|
|
List<CmHeheProduct> productList = activityProductDao.findAllHeHeProduct(product);
|