|
@@ -1,5 +1,6 @@
|
|
|
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.CmHeheProduct;
|
|
|
import com.caimei.modules.product.entity.Product;
|
|
@@ -27,6 +28,8 @@ import java.util.List;
|
|
|
public class CmHeheProductService extends CrudService<CmHeheProductDao, CmHeheProduct> {
|
|
|
@Autowired
|
|
|
private CmHeheProductDao cmHeheProductDao;
|
|
|
+ @Autowired
|
|
|
+ private CmHeheActivityProductDao activityProductDao;
|
|
|
|
|
|
public CmHeheProduct get(String id) {
|
|
|
return super.get(id);
|
|
@@ -59,6 +62,12 @@ public class CmHeheProductService extends CrudService<CmHeheProductDao, CmHehePr
|
|
|
@Transactional(readOnly = false)
|
|
|
public void delete(CmHeheProduct cmHeheProduct) {
|
|
|
super.delete(cmHeheProduct);
|
|
|
+ //删除活动商品
|
|
|
+ cmHeheProductDao.deleteActivityProduct(cmHeheProduct.getProductId());
|
|
|
+ //删除分销者活动商品
|
|
|
+ activityProductDao.deleteUserActivity(cmHeheProduct.getProductId());
|
|
|
+ //删除活动阶梯
|
|
|
+ activityProductDao.deleteLadder(null,cmHeheProduct.getProductId());
|
|
|
}
|
|
|
|
|
|
public Page<Product> findProductPage(Page<Product> productPage, Product product) {
|