Commit d6750d0e by 泽锋 李

fix

parent b1b89436
...@@ -173,13 +173,13 @@ where tdb.usable_stock>0 "; ...@@ -173,13 +173,13 @@ where tdb.usable_stock>0 ";
{ {
// 可上架 // 可上架
var fields = GetShowField(search.warehouse_code); var fields = GetShowField(search.warehouse_code);
sql += $"and tdb.usable_stock>0 and ( {string.Join(" or ", fields.Select(v=>$"t11.{v} <= 0 "))} )"; sql += $"and tdb.usable_stock>0 and ( {string.Join(" or ", fields.Select(v=>$" ifnull(t11.{v},0) <= 0 "))} )";
} }
if (search.listing_status == 2) if (search.listing_status == 2)
{ {
// 无在线 // 无在线
var fields = GetShowField(search.warehouse_code); var fields = GetShowField(search.warehouse_code);
sql += $"and tdb.usable_stock>0 and ( {string.Join(" and ", fields.Select(v => $"t11.{v} <= 0 "))} )"; sql += $"and tdb.usable_stock>0 and ( {string.Join(" and ", fields.Select(v => $" ifnull(t11.{v},0) <= 0 "))} )";
} }
} }
return _connection.Page<listing_status_view_dto>(sql, search, parameters); return _connection.Page<listing_status_view_dto>(sql, search, parameters);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment