修改3-15问题
This commit is contained in:
@@ -171,13 +171,21 @@ public class PmsProductServiceImpl extends ServiceImpl<PmsProductMapper, PmsProd
|
||||
List<PmsProductAttributeValue> valueList = productAttributeValueMapper.selectList(new QueryWrapper<PmsProductAttributeValue>().eq("product_id", goods.getId()));
|
||||
List<PmsProductAttributeValue> productAttributeValueList = new ArrayList<>();
|
||||
List<PmsProductAttributeValue> attributeValueList = new ArrayList<>();
|
||||
for (PmsProductAttributeValue attributeValue : valueList) {
|
||||
if (attributeValue.getType() == 1) {
|
||||
productAttributeValueList.add(attributeValue);
|
||||
} else {
|
||||
attributeValueList.add(attributeValue);
|
||||
valueList.removeAll(Collections.singleton(null));
|
||||
if(!valueList.isEmpty()){
|
||||
for (PmsProductAttributeValue attributeValue : valueList) {
|
||||
if(attributeValue.getType() != null){
|
||||
if (attributeValue.getType() == 1) {
|
||||
productAttributeValueList.add(attributeValue);
|
||||
} else {
|
||||
attributeValueList.add(attributeValue);
|
||||
}
|
||||
}else{
|
||||
attributeValueList.add(attributeValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
param.setProductAttributeValueList(productAttributeValueList);
|
||||
param.setProductCanShuValueList(attributeValueList);
|
||||
|
||||
|
||||
@@ -909,7 +909,11 @@ public class SingePmsController extends ApiBaseAction {
|
||||
List<Long> ids = new ArrayList<>();
|
||||
ids.add(1L);
|
||||
ids.add(0L);
|
||||
List<PmsProductCategory> categories = categoryMapper.selectList(new QueryWrapper<PmsProductCategory>().in("level", ids));
|
||||
QueryWrapper<PmsProductCategory> qw = new QueryWrapper<>();
|
||||
qw.in("level", ids);
|
||||
qw.orderByAsc("sort");
|
||||
qw.eq("show_status",1);
|
||||
List<PmsProductCategory> categories = categoryMapper.selectList(qw);
|
||||
for (PmsProductCategory v : categories) {
|
||||
if (v.getLevel() == 0) {
|
||||
ProductTypeVo vo = new ProductTypeVo();
|
||||
|
||||
Reference in New Issue
Block a user