Commit 08754e37 by DESKTOP-732ATD8\BLT

新增功能:配置平台站点对冲金额

parent 2fd5bffd
......@@ -846,23 +846,16 @@ or (is_lend=2 and cost_form=1)) and pay_time>= @start and pay_time< @end ");
}
public List<PlatformTypeMonthlyStatisticsDto> GetGetMonthProfitFeePlatformFeeSummary(GetMonthProfitPlatformDetailInput input)
{
//var redis = RedisHelper.GetList<PlatformTypeMonthlyStatisticsDto>($"{input.FeeName}_{input.Month.Replace("月份", "")}");
//if (redis.Count > 0)
//{
// return redis;
//}
var sql = BuildMonthProfitFeePlatformFeeDetailSql(input, out DynamicParameters param, false, true);
var data = SimpleCRUD.Query<PlatformTypeMonthlyStatisticsDto>(sql, param, GlobalConfig.ConnectionString_DW).ToList();
data = data.Select(x =>
List<ReversalDto> listReversal = SimpleCRUD.Query<ReversalDto>("SELECT DISTINCT platform, website FROM order_fee_config WHERE is_reversal = 1;", null, GlobalConfig.ConnectionString_DW).ToList();
if (listReversal?.Count > 0 && data?.Count > 0)
{
if (x.platform_type.Contains("万邑通"))
listReversal.ForEach(l =>
{
x.original_amount = Math.Abs(x.original_amount);
x.total_amount_sales = Math.Abs(x.total_amount_sales);
}
return x;
}).ToList();
//RedisHelper.Add<List<PlatformTypeMonthlyStatisticsDto>>($"{input.FeeName}_{input.Month.Replace("月份", "")}", data, new TimeSpan(1, 0, 0, 0));
data.ForEach(x => { if (l.platform == x.platform_type && l.website == x.website) { x.original_amount = 0 - x.original_amount; x.total_amount_sales = 0 - x.total_amount_sales; } });
});
}
return data;
}
/// <summary>
......
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