修复 统计日期错误。

消费记录 增加新类型
This commit is contained in:
chfei committed 2026-11-20 13:50:13 +08:00
1 parent c6b8d3a83a
commit 0f70b5e37c
4 files changed
+677 -667

No files matched your search

File diff suppressed because it is too large. Load diff
@@ -160,8 +160,10 @@ namespace Work._29Tools.Forms.UserForms
data3 += "&type_in=26,38";
else if (cmbType.Text == "额外包裹扣费支出/返还")
data3 += "&type_in=35,36";
else if (cmbType.Text == "云仓退货扣费支出")
else if (cmbType.Text == "云仓退货扣费支出/返还")
data3 += "&type_in=31,32";
else if (cmbType.Text == "额外包裹退货拦截支出/返还")
data3 += "&type_in=39,40";
else if (cmbType.Text == "超重扣费支出")
data3 += "&type_in=24,28,33,37,41";
else if (cmbType.Text == "同步物流")
@@ -186,7 +188,18 @@ namespace Work._29Tools.Forms.UserForms
var result = JObject.Parse(html);
count = (int)result["count"];
seconds = BaseRegex.GetDecimalJson(ref html, "seconds");
return JsonConvert.DeserializeObject<List<user_payment_record>>(result["data"]?.ToString() ?? "null") ?? throw new InvalidOperationException($"第 {page} 页缺少消费记录");
var userPaymentList = JsonConvert.DeserializeObject<List<user_payment_record>>(result["data"]?.ToString() ?? "null");
if(userPaymentList==null) throw new InvalidOperationException($"第 {page} 页缺少消费记录");
int[] negativeTypes = [34, 23, 38, 32, 36, 40];
foreach (var item in userPaymentList)
{
if (negativeTypes.Contains(item.type.Value))
{
item.amount *= -1;
}
}
return userPaymentList;
}
public void GetBalanceList()