|
@@ -24,8 +24,10 @@ import com.zhongzheng.modules.course.service.ICourseSubjectService;
|
|
|
import com.zhongzheng.modules.course.vo.CourseSubjectVo;
|
|
import com.zhongzheng.modules.course.vo.CourseSubjectVo;
|
|
|
import com.zhongzheng.modules.goods.domain.Goods;
|
|
import com.zhongzheng.modules.goods.domain.Goods;
|
|
|
import com.zhongzheng.modules.goods.domain.GoodsSpecAttributeRelation;
|
|
import com.zhongzheng.modules.goods.domain.GoodsSpecAttributeRelation;
|
|
|
|
|
+import com.zhongzheng.modules.goods.domain.GoodsSpecTemplate;
|
|
|
import com.zhongzheng.modules.goods.service.IGoodsService;
|
|
import com.zhongzheng.modules.goods.service.IGoodsService;
|
|
|
import com.zhongzheng.modules.goods.service.IGoodsSpecAttributeRelationService;
|
|
import com.zhongzheng.modules.goods.service.IGoodsSpecAttributeRelationService;
|
|
|
|
|
+import com.zhongzheng.modules.goods.service.IGoodsSpecTemplateService;
|
|
|
import com.zhongzheng.modules.goods.vo.GoodsVo;
|
|
import com.zhongzheng.modules.goods.vo.GoodsVo;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -52,6 +54,8 @@ public class ActivityRecommendServiceImpl extends ServiceImpl<ActivityRecommendM
|
|
|
private IGoodsSpecAttributeRelationService goodsSpecAttributeRelationService;
|
|
private IGoodsSpecAttributeRelationService goodsSpecAttributeRelationService;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private ICourseSubjectService iCourseSubjectService;
|
|
private ICourseSubjectService iCourseSubjectService;
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private IGoodsSpecTemplateService goodsSpecTemplateService;
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -206,7 +210,10 @@ public class ActivityRecommendServiceImpl extends ServiceImpl<ActivityRecommendM
|
|
|
}
|
|
}
|
|
|
page.getRecords().forEach(item -> {
|
|
page.getRecords().forEach(item -> {
|
|
|
Goods goods = iGoodsService.getById(item.getGoodsId());
|
|
Goods goods = iGoodsService.getById(item.getGoodsId());
|
|
|
- if (ObjectUtils.isNotNull(goods.getSpecTemplateId())){
|
|
|
|
|
|
|
+ if (ObjectUtils.isNotNull(goods.getSpecTemplateId()) &&
|
|
|
|
|
+ goodsSpecTemplateService.count(new LambdaQueryWrapper<GoodsSpecTemplate>()
|
|
|
|
|
+ .eq(GoodsSpecTemplate::getSpecTemplateId,goods.getSpecTemplateId())
|
|
|
|
|
+ .eq(GoodsSpecTemplate::getStatus,1)) > 0){
|
|
|
item.setSpecTemplateId(goods.getSpecTemplateId());
|
|
item.setSpecTemplateId(goods.getSpecTemplateId());
|
|
|
}else {
|
|
}else {
|
|
|
List<GoodsSpecAttributeRelation> list = goodsSpecAttributeRelationService.list(new LambdaQueryWrapper<GoodsSpecAttributeRelation>()
|
|
List<GoodsSpecAttributeRelation> list = goodsSpecAttributeRelationService.list(new LambdaQueryWrapper<GoodsSpecAttributeRelation>()
|