Commit Graph

184 Commits

Author SHA1 Message Date
zzh
9359c9cb5b fix(channel): 修复 inApp 通知方式被 Normalize 误过滤
统一映射为 canonical code inApp,并修正站内信显示名匹配。
2026-07-06 15:39:22 +08:00
zzh
0c763f9707 fix(channel): 修复问题模板重复校验 SQL 语法错误
避免 SqlSugar 翻译闭包 null 比较,改用分支与布尔标志构建查询条件。
2026-07-06 15:28:01 +08:00
zzh
4f5390ccb1 fix(channel): 问题模板表补充 ConcurrencyStamp 列
与 AggregateRoot 实体对齐,修复 list 接口 Unknown column 报错。
2026-07-06 15:21:43 +08:00
zzh
d49573fe9a feat(channel): 新增问题模板 CRUD 与 options API
支持按组织与问题类型维护通知模板,含建表脚本与仓储层唯一性校验。
2026-07-06 14:58:37 +08:00
zzh
cde0ccb6b0 feat: 新增工作台与实时监控统计 API
- GET /order/workplace-stats 与 /order/workplace-trend 供工作台使用

- GET /monitor/overview 供实时监控页订单/客户/轨迹统计

- 扩展订单仓储聚合查询,status-counts 同步应用数据权限

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-04 18:24:48 +08:00
zzh
991ad49255 fix(微信): 加固 GET 验签,直接输出 echostr 原文
- 从 Query 读取 signature/timestamp/nonce/echostr 并记录失败原因

- 验签通过后 WriteAsync 写回 echostr,避免 JSON 包装

- 补充生产 Token 验签集成测试

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-04 13:43:42 +08:00
zzh
da1227d8aa feat(微信): 消息推送支持明文 XML/JSON 验签与回包
- POST /apiwechat/verification 恢复消息回调,支持 JSON/XML 明文包体

- SHA1 验签通过后 GET 原样返回 echostr,POST 无回复时返回 success

- 补充官方验签示例与 JSON/XML 推送集成测试

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-04 12:52:43 +08:00
zzh
6c2e095196 fix(微信): 验签接口仅保留 GET 并原样返回 echostr
- /apiwechat/verification 移除 HEAD/POST,仅保留 GET 验签

- 验签通过后从 Query 原样返回 echostr 纯文本

- 扫码回调测试改走 /wechat/mp/{appId}

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-04 12:30:42 +08:00
zzh
0a5bd75618 feat: 新增财务应收应付接口并补充 Swagger 接口名称
- 新增 Finance 模块应收应付分页查询及订单费用联查

- 为 DataPerm、Xhs 等缺失接口补充中文 summary 接口名称

- 优化微信公众号验签 Swagger 命名并补充路由集成测试

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-04 12:15:15 +08:00
zzh
11520d014b fix(数据权限): 修复 DataScopeContext 缓存 JSON 反序列化失败
将 IReadOnlySet/IReadOnlyList 改为 HashSet/List 等可序列化类型;缓存读取失败时自动重建。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-03 17:47:29 +08:00
zzh
5f1f16c9ad fix(数据权限): 组织树递归查询使用 ParentId 而非 PId
修复 get-effective-by-user 展开下级组织时报 Unknown column c.PId。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-03 16:44:46 +08:00
zzh
0bf909dc2b feat(rbac): 新增内部用户列表接口,排除纯客户账号
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-03 12:19:14 +08:00
zzh
ad367998d2 fix(数据权限): 修复 GUID 种子/SqlQuery 映射并补充诊断修复 SQL
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-03 11:58:24 +08:00
zzh
c442833d9c feat(数据权限): 实现 P1 后端 API、有效范围合并与订单列表集成
- 新增 DataPerm 模块(配置 CRUD、模板、字段脱敏、变更/访问日志 API)及 SQL 脚本
- 订单列表/导出接入 EffectiveScopeBuilder 五维数据权限过滤
- 修复集成测试 JSON 反序列化与 RBAC 用户名解析;新增 DataPerm API 集成测试

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-03 10:27:37 +08:00
zzh
02cb06b86c feat(wechat): 完善扫码登录缓存账号信息与轮询状态接口
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-02 15:51:59 +08:00
zzh
bf81f00c91 fix(wechat): 注册失败时返回中文错误并校验 RBAC 账号
避免 user 表重复写入抛出英文 DbUpdateException;注册前检查 RBAC 登录账号/邮箱是否已占用。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-02 15:08:24 +08:00
zzh
4d93a9b50d fix(wechat): 注册 OAuth/绑定 API 未注册导致 404
将 WeChatCustomerService 纳入动态 API 映射,暴露 /wechat/oauth/user-info 等 H5 接口。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-02 14:51:47 +08:00
zzh
76ff60e793 fix(wechat): 验签接口支持 HEAD 并避免配置异常返回非 200
微信后台/探活对 HEAD 会收到 405;读取 wechat_mp 配置异常时改为 HTTP 200 + error,与 WMS 行为一致。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-02 12:15:25 +08:00
zzh
7257bf869e fix(wechat): 创建二维码 POST 改用 StringContent 避免微信 412
PostAsJsonAsync 可能走 chunked 传输缺少 Content-Length,微信网关直接返回 HTTP 412 空响应。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-02 11:49:12 +08:00
zzh
8ef9a43f76 feat(wechat): 将 access_token 持久化到 t_system_other_config
改用数据库存储 token 并支持 AppId/Secret 变更时自动清空,替代内存缓存并增加无效 token 重试。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-02 11:03:36 +08:00
zzh
5c6c4f6e48 feat(wechat): 公众号配置改从 t_system_other_config 读取,支持后台其他配置维护
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-01 16:18:43 +08:00
zzh
d168a21e96 fix(wechat): 公众号验签接口始终返回 HTTP 200,避免 BusinessException 导致非 200
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-01 15:25:20 +08:00
zzh
1b8a5af807 配置微信公众号本地开发参数:补充 AppId 与 Token,支持 apiwechat/verification 验签联调。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-01 13:50:31 +08:00
zzh
50c6fd8ac8 fix(xhs): reject offline agent for analysis and normalize browse task results
Validate agent is online before starting analysis tasks; normalize list_feeds JSON when persisting task reports.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-01 12:36:28 +08:00
zzh
f7be966adc fix(xhs): task/report 与 task/cancel 返回 JSON 响应
避免 Agent 客户端解析空 body 报「非 JSON 响应」导致任务上报失败。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-01 11:58:48 +08:00
zzh
607e09433b fix(xhs): 管理员账号使用 customerId=0,取消客户账号限制
小红书各服务统一走 ResolveXhsCustomerIdAsync,管理员无需客户上下文即可操作 Agent、拟人设置等接口。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-01 09:02:18 +08:00
zzh
ffaf325563 fix(xhs): repair publish/task list SQL and RBAC menu seeds
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-30 11:23:37 +08:00
zzh
af53c48f7f feat: 新增小红书模块后端(Agent/任务/发布/分析/技能/AI)及 SQL 种子与 RBAC GUID 修复脚本
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-30 09:43:09 +08:00
zzh
42b41e68c7 fix: 微信回调路由挂到 AuthService 以修复 404
Fake 框架未注册 SimpleAdmin.Api.WeChat 下的 ApplicationService,
将 /apiwechat/verification 等公众号验签与消息接口并入 AuthService。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 20:46:49 +08:00
zzh
26ccc69dc6 feat: 兼容 WMS 公众号回调路径 /apiwechat/verification
支持公众平台配置 oms.nanafa.com/api/apiwechat/verification 的验签与消息推送。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 20:27:07 +08:00
zzh
e4894f9627 feat: 批量发送邮件 API(模板、SMTP 配置、发送记录)
新增模板/账号持久化、SMTP 测试与单封发送接口,发送成功后写入邮件记录表供前端列表展示。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 19:56:35 +08:00
zzh
1c0dce9956 fix: 查价运费匹配与费用公式展示优化
修复卖价明细英文货物类型无法匹配导致 freight 为 0 的问题;查价返回算法算式、其他费用明细及中文货物属性名;运费列仅汇总 freight 费用项。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 19:25:33 +08:00
zzh
07fc7fffe7 feat: resolve createBy/updateBy to RBAC user display names
Add OmsRbacUserDisplayNameResolver and use it in customer, order, warehouse, and channel APIs so audit fields return names instead of mapIds.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 19:07:17 +08:00
zzh
e875f0c012 feat: price-check by cargo type and warehouse, customer auto-code, track apiCode
Support multi cargo-type and warehouse combinations in price check billing. Auto-generate customer codes (W+yyMM+seq) on create/register; require email. Use order DownstreamSupplierCode as track UpsertSmallBag apiCode.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 18:40:10 +08:00
zzh
bc0bde72bc feat(track): return reproducible curl in UpsertSmallBag result
Expose CurlCommand in SmallBagTrackUpsertResult so track sync dialog can show the exact curl used for the request.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 13:00:11 +08:00
zzh
3046f26837 fix(track): forward Authorization Bearer to UpsertSmallBag
Track gateway requires the logged-in user JWT in addition to appKey/timestamp/sign headers. Capture token before async enqueue so background sync still works.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 12:53:28 +08:00
zzh
bd1288edc9 fix(track): send UpsertSmallBag auth via HTTP headers
Track SignatureValidationFilter reads appKey/timestamp/sign from headers, not query. Reverts e642f08 query transport and aligns debug script.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 12:35:39 +08:00
zzh
eac7b84f6a feat(order): downstream createOrderOne API from order DB
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 12:29:06 +08:00
zzh
e642f089ba fix(track): UpsertSmallBag auth params in query, align sign helper
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 12:18:57 +08:00
zzh
545f0825f8 feat(order): 规则快照下游元数据、订单绑定字段与系统其他配置
排货发布 enrich Providers 并确认渠道时写入 t_order 下游四字段;接入 itfx 元数据客户端;系统其他配置与小包轨迹 DB 配置;手动轨迹 UpsertSmallBag 接口。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 11:31:15 +08:00
zzh
fe30d071e6 feat(order): 修复列表状态筛选、收件国家名与小包轨迹同步
改用仓储链式 Where 修复分页列表状态过滤失效;保存并返回 ConsigneeCountryName;预报成功后异步 UpsertSmallBag;仅草稿/已预报可删除。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-27 19:43:35 +08:00
zzh
095ad66717 feat(order): 增加 IsPaid 字段并修复列表状态筛选
- t_order 新增 IsPaid,支付/出库以该字段判断;含迁移脚本

- 列表接口补充 productName、channelName

- 修复 BuildOrderPredicate 状态条件 SqlSugar 翻译丢失

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-27 19:13:15 +08:00
zzh
e7fd69b644 feat(order): 排货确认渠道与应付计费,出入库计费对齐设计
- 预报/入库后按排货规则选服务渠道并写入渠道买价应付费用

- 排货发布快照 Providers 去除 CreateTime/UpdateTime

- 出库扫描扩展 OutboundRecord 字段与 ApplyShipBillingByWaybillAsync

- 服务渠道买价发布预览;按 ChargingStage 删除应付费用

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-27 16:44:04 +08:00
zzh
fdbdfa8124 20260627 2026-06-27 11:56:06 +08:00
zzh
d766343ffe feat(customer): account flow ledger, pay deduct balance, status counts
Add t_customer_account_flow with list API, deduct balance on order pay, credit ledger on recharge approve, and GET /order/status-counts for tab badges.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-26 19:09:43 +08:00
zzh
82df5d1e79 feat(order): add order edit APIs, inbound lookup, and fee output
Support order detail/weight/declaration updates, receivable and payable recalculation, inbound scan order lookup, receive billing overwrite, and OrderOutput feeList for my-orders drawer.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-26 17:30:41 +08:00
zzh
5e26de6ff3 feat: remove ChargingTime and bill receivables by weight stage
Drop sell/buy price charging-time config; write receivable fees after forecast or receive chargeable weight, hook inbound billing, fix order list status filter, and add DB migration.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-26 16:24:53 +08:00
zzh
91ba6d5d59 fix: 计重进位快照兼容与 KPI 分区明细 Excel 导入
- 发布规则快照反序列化合并 StartValue/EndValue 至 Start/End
- 小包创建进位时快照区间无效则降级读 t_weight_rounding_info
- 新增 KPI 分区明细导入模板下载与 Excel 批量导入接口
- 补充快照进位与导入相关单元测试

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-26 15:29:17 +08:00
zzh
7827b4803e feat: slim rules/price publish snapshots with PostcodeRange (left,right]
Use slim DTOs without audit timestamps; migrate legacy LeftPostcode/RightPostcode on read.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-26 14:10:34 +08:00
zzh
d8a98fbbc8 feat: 规则发布预览接口并抽取快照组装逻辑
新增 GET publish/preview 返回含黑名单/偏远/计重/进位明细的完整 rules 快照,便于核对 Content。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-26 13:48:07 +08:00