diy组件返回item_quantity

This commit is contained in:
liyj 2025-08-06 16:17:24 +08:00
parent 8b65072fea
commit ce9189ba6b

View File

@ -375,7 +375,13 @@ public class ShopPageBaseServiceImpl extends BaseServiceImpl<ShopPageBaseMapper,
for (Object datum : data) {
Long did = Convert.toLong(((JSONObject) datum).get("did"));
if (did != null) item_id_row.add(did);
if (did != null) {
item_id_row.add(did);
List<ShopProductItem> shopProductItems= shopProductItemService.list(new QueryWrapper<ShopProductItem>().eq("item_id",did));
if(!shopProductItems.isEmpty()){
((JSONObject) datum).set("item_quantity",shopProductItems.get(0).getItem_quantity()) ;
}
}
}
} else if (ObjectUtil.equal(eltmType, 16)) {
//营销组件 selectType = 14 秒杀 12团购