【修复】修复商品下架或者删除后,我的足迹统计数据不准确的问题。

This commit is contained in:
大灰灰
2022-12-07 01:35:49 +08:00
parent 3d3546ae80
commit b6db382dc0

View File

@@ -72,7 +72,7 @@ namespace CoreCms.Net.Services
var productModel = await _dal.QueryByClauseAsync(p => p.id == id);
if (productModel == null) return null;
//获取商品信息
var goods = await goodsServices.QueryByIdAsync(productModel.goodsId);
var goods = await goodsServices.QueryByClauseAsync(p => p.id == productModel.goodsId && p.isDel == false && p.isMarketable == true);
if (goods == null) return null;
//DTO映射
productModel.bn = goods.bn;