利润统计 增加 类型 39,40,41

This commit is contained in:
chfei committed 2026-11-11 18:45:34 +08:00
1 parent 60d96db5ee
commit 8d6c4ebb84
1 file changed
+2 -2
@@ -678,7 +678,7 @@ public class ShopRevenueStatisticsService : ITransientDependency
/// <param name="orders"></param>
private void FillPackageAmount(List<OrderInfo> orders)
{
int[] types = { 20, 23, 24, 26, 28, 38, 31, 32, 33, 35, 36, 37 };
int[] types = { 20, 23, 24, 26, 28, 38, 31, 32, 33, 35, 36, 37, 39, 40, 41 };
var amounts = orders.Select(o => o.OrderId).Distinct().ToDictionary(id => id, id => 0m);
foreach (var batch in Batch(amounts.Keys.ToList(), BatchSize))
{
@@ -695,7 +695,7 @@ public class ShopRevenueStatisticsService : ITransientDependency
var matches = Regex.Matches(payment.Remark, @"[A-Za-z0-9_-]+").Cast<Match>()
.Select(m => m.Value).Where(ids.Contains).Distinct();
var amount = payment.Amount ?? 0m;
if (payment.Type == 23 || payment.Type == 32 || payment.Type == 38 || payment.Type == 36)
if (payment.Type == 23 || payment.Type == 32 || payment.Type == 38 || payment.Type == 36 || payment.Type == 40)
amount = -amount;
foreach (var id in matches)
amounts[id] += amount;