fix: 优化 Windows 7 兼容性,调整 Excel 导出模板

- setup.iss: 改用 classic 向导样式,降低 MinVersion 要求
- setup.iss: 添加 x86/x64 架构支持声明
- Excel 导出: 移除"订单金额"列,新增"数量"列
- Order 模型: 添加 TotalQuantity 属性计算商品总数量

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Administrator
2025-12-18 15:41:51 +08:00
parent e7b9d3851c
commit 399ba617c4
3 changed files with 27 additions and 6 deletions

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json;
namespace PackagingMallShipper.Models
@@ -59,6 +60,23 @@ namespace PackagingMallShipper.Models
}
}
}
public int TotalQuantity
{
get
{
if (string.IsNullOrEmpty(GoodsJson)) return 0;
try
{
var goods = JsonConvert.DeserializeObject<List<GoodsItem>>(GoodsJson);
return goods.Sum(g => g.Number);
}
catch
{
return 0;
}
}
}
}
public class GoodsItem

View File

@@ -31,7 +31,7 @@ namespace PackagingMallShipper.Services
{
"订单号", "下单时间", "收件人", "联系电话",
"省份", "城市", "区县", "详细地址",
"商品信息", "订单金额", "快递公司", "快递单号"
"商品信息", "数量", "快递公司", "快递单号"
};
for (int i = 0; i < headers.Length; i++)
@@ -57,7 +57,7 @@ namespace PackagingMallShipper.Services
worksheet.Cell(row, 7).Value = order.LogisticsDistrict;
worksheet.Cell(row, 8).Value = order.LogisticsAddress;
worksheet.Cell(row, 9).Value = order.GoodsInfo;
worksheet.Cell(row, 10).Value = order.AmountReal;
worksheet.Cell(row, 10).Value = order.TotalQuantity;
worksheet.Cell(row, 11).Value = "";
worksheet.Cell(row, 12).Value = "";
}

View File

@@ -23,10 +23,13 @@ Compression=lzma2/ultra64
SolidCompression=yes
; 权限设置
PrivilegesRequired=admin
; 系统要求 - Windows 7 SP1 或更高版本
MinVersion=6.1.7601
; 安装向导设置
WizardStyle=modern
; 系统要求 - Windows 7 或更高版本
; 注意:.NET Framework 4.6.2 需要 Windows 7 SP1但安装程序本身可以在无SP1的Win7上运行并提示
MinVersion=6.1
; 架构支持 - 同时支持32位和64位系统
ArchitecturesAllowed=x86compatible x64compatible
; 安装向导设置 - 使用classic样式以获得最佳Windows 7兼容性
WizardStyle=classic
DisableProgramGroupPage=yes
; 卸载设置
UninstallDisplayName={#MyAppName}