305 Commits

Author SHA1 Message Date
0f44197164 fix(store-fees): 保留包装费配置避免阶梯刷新丢失
All checks were successful
Build and Deploy AdminApi / build-and-deploy (push) Successful in 44s
2026-02-20 08:29:08 +08:00
2bf33e753f fix: 修复手动入驻未绑定管理员商户问题
All checks were successful
Build and Deploy AdminApi / build-and-deploy (push) Successful in 39s
2026-02-06 14:38:00 +08:00
msumshk
c02a15f1b9 chore: 部署环境改为 Development
All checks were successful
Build and Deploy AdminApi / build-and-deploy (push) Successful in 39s
2026-02-05 21:24:16 +08:00
msumshk
2eb309ccec feat: 使用 PostgreSQL xmin 系统列作为并发控制
All checks were successful
Build and Deploy AdminApi / build-and-deploy (push) Successful in 38s
2026-02-05 21:21:18 +08:00
msumshk
e7e420be32 feat: 添加 Identity 模型同步迁移(xmin并发控制)
All checks were successful
Build and Deploy AdminApi / build-and-deploy (push) Successful in 39s
2026-02-05 21:12:44 +08:00
msumshk
f40e74bb9c ci: 触发部署
All checks were successful
Build and Deploy AdminApi / build-and-deploy (push) Successful in 3m22s
2026-02-05 21:02:35 +08:00
msumshk
df75597985 ci: 重新触发部署
Some checks failed
Build and Deploy AdminApi / build-and-deploy (push) Failing after 1s
2026-02-05 21:00:43 +08:00
msumshk
9d0a525893 fix: 修复子模块克隆顺序问题
Some checks failed
Build and Deploy AdminApi / build-and-deploy (push) Has been cancelled
2026-02-05 20:59:15 +08:00
msumshk
1ea6af0ec2 ci: 触发部署
Some checks failed
Build and Deploy AdminApi / build-and-deploy (push) Has been cancelled
2026-02-05 20:45:53 +08:00
msumshk
863c3986b5 perf: build on host for faster incremental compilation
Some checks failed
Build and Deploy AdminApi / build-and-deploy (push) Has been cancelled
2026-02-05 17:13:56 +08:00
msumshk
bbd513c789 fix: use local nuget cache for faster docker build 2026-02-05 17:00:28 +08:00
msumshk
b187e94906 fix: add nuget mirror for faster restore in China 2026-02-05 16:22:48 +08:00
msumshk
b3af5a4eef ci: trigger rebuild after pushing submodules to gitea 2026-02-05 16:10:22 +08:00
msumshk
f21c881f6f fix: fetch submodules from gitea instead of github 2026-02-05 16:05:20 +08:00
msumshk
e1a94222e4 fix: use direct git clone instead of external actions 2026-02-05 15:14:39 +08:00
msumshk
8efa4bc53f fix: use gitea actions mirror to avoid github timeout 2026-02-05 15:12:33 +08:00
msumshk
8f0a667de2 feat: add Gitea Actions CI/CD workflow 2026-02-05 15:08:50 +08:00
msumshk
7a371d5d19 chore: 删除原作者的 GitHub Actions 工作流 2026-02-05 14:27:22 +08:00
MSuMshk
f69904e195 feat: 商户冻结/解冻功能及字典缓存重构
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 10:46:32 +08:00
MSuMshk
754dd788ea fix: 商户创建时设置默认经营模式为同一主体
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 15:45:11 +08:00
MSuMshk
be34159cb8 feat: 租户创建时自动创建商户和证照记录
- 扩展 MerchantDocumentType 枚举,新增法人身份证、卫生许可证等类型
- 新增 TenantCreatedEvent 领域事件
- 修改 CreateTenantManuallyCommandHandler 发布租户创建事件
- 新增 TenantCreatedEventConsumer 消费者,自动创建商户和证照
- 实现 Tenant 1:1 Merchant 的业务关系

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 15:30:33 +08:00
MSuMshk
ef7aec1b60 fix: 创建租户时自动创建默认角色并分配给管理员
- 在 CreateTenantManuallyCommandHandler 中添加创建 tenant-admin 角色逻辑
- 自动将默认角色分配给租户管理员用户
- 更新 Saga 补偿逻辑,失败时回滚角色和用户角色关系
- 修复 TenantsController 中 4 处 CS8625 可空引用类型警告

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 12:51:59 +08:00
MSuMshk
e92b333076 refactor: 精简手动创建租户命令字段
- 移除冗余字段:CoverImageUrl、Website、SuspendedAt、SuspensionReason
- 移除冗余字段:ScheduledPackageId、AdditionalDataJson、ReviewedByName、ReviewRemarks、AdminMerchantId
- 更新Handler移除对应字段的处理逻辑

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 21:43:22 +08:00
MSuMshk
a995d3c64d refactor: 删除审核接口的 renewMonths 字段
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 21:14:46 +08:00
MSuMshk
2c90aa6f5c refactor: 删除旧的 approve/reject 接口,统一使用 /review
- 删除 PUT /approve 和 PUT /reject 接口
- 删除 ApproveTenantCommand/Handler
- 删除 RejectTenantCommand/Handler
- 保留统一的 POST /review 接口

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 21:07:30 +08:00
MSuMshk
a55ebad675 feat: 添加统一的租户审核接口 POST /review
- 新增 ReviewTenantCommand 支持 approve/reason/renewMonths/operatingMode
- 新增 ReviewTenantCommandHandler 统一处理通过/驳回逻辑
- 添加 TenantsController.Review 接口
- 审核完成后自动释放领取、记录审核日志

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 21:01:54 +08:00
MSuMshk
cfb20ca0d7 fix: 审核领取显示用户真实姓名而非 ID
- ClaimTenantReviewCommandHandler 通过 IIdentityUserRepository 查询用户 DisplayName
- ForceClaimTenantReviewCommandHandler 同步修改
- ReleaseTenantReviewClaimCommandHandler 同步修改

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 20:54:14 +08:00
MSuMshk
abeb352b04 feat: 租户列表 API 支持按状态过滤
- ListTenantsQuery 添加 Status 可选参数
- ITenantRepository.GetAllAsync 添加 status 参数
- EfTenantRepository 实现状态过滤逻辑
- TenantsController.List 添加 status 查询参数

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 20:46:40 +08:00
MSuMshk
874bd799e7 fix: 添加 TenantReviewClaim 和 TenantAuditLog 实体的 EF Core 表映射配置
修复 EF Core 使用默认 PascalCase 表名导致的 "relation TenantReviewClaims does not exist" 错误,
将实体映射到正确的 snake_case 表名。

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 20:31:36 +08:00
MSuMshk
6ffcc09c26 feat: 新增租户审核领取和审核日志接口
- 新增 TenantReviewClaim 和 TenantAuditLog 实体
- 新增 TenantAuditAction 枚举
- 新增审核领取相关接口:GET/POST /review/claim, /review/force-claim, /review/release
- 新增审核日志接口:GET /audits
- 更新 ITenantRepository 和 EfTenantRepository
- 更新 TakeoutAppDbContext 添加 DbSet

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 20:22:03 +08:00
MSuMshk
a586407e60 feat: 手动创建租户支持可选审核,新增审核通过/驳回接口
- CreateTenantManuallyCommand 添加 IsSkipApproval 字段
- 根据 IsSkipApproval 自动设置租户状态和认证状态
- 新增 ApproveTenantCommand/Handler 审核通过逻辑
- 新增 RejectTenantCommand/Handler 审核驳回逻辑
- TenantsController 添加 PUT /approve 和 PUT /reject 接口

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 19:59:03 +08:00
MSuMshk
59bc3005af feat: 完善手动创建租户功能,添加账单明细和支付记录
1. 手动创建租户时自动生成账单明细(LineItemsJson)
2. 账单状态为已支付时自动创建支付记录
3. 租户列表接口返回联系人信息和认证状态
4. 账单详情接口返回支付记录和解析后的账单明细
5. 管理员账号自动复用租户联系人信息

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 17:32:05 +08:00
MSuMshk
b4a597fe08 chore: 更新 TakeoutSaaS.Docs 子模块引用
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 11:13:59 +08:00
MSuMshk
5c8917134e chore: 更新 TakeoutSaaS.Docs 子模块引用
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 11:00:46 +08:00
MSuMshk
0f900e108d feat(admin): 新增管理员角色、账单、订阅、套餐管理功能
- 新增 AdminRolesController 实现角色 CRUD 和权限管理
- 新增 BillingsController 实现账单查询功能
- 新增 SubscriptionsController 实现订阅管理功能
- 新增 TenantPackagesController 实现套餐管理功能
- 新增租户详情、配额使用、账单列表等查询功能
- 新增 TenantPackage、TenantSubscription 等领域实体
- 新增相关枚举:SubscriptionStatus、TenantPackageType 等
- 更新 appsettings 配置文件
- 更新权限授权策略提供者

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 09:11:44 +08:00
MSuMshk
54feee53b8 fix: 更新Docs子模块修复watch脚本仓库识别
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 11:40:29 +08:00
root
22a0635760 chore: 更新 TakeoutSaaS.Docs 子模块引用
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 09:51:22 +08:00
395ac4da05 feat: 实现克隆租户角色接口
- POST /api/admin/v1/tenants/{tenantId}/roles/{roleId}/clone
- 支持复制角色基本信息和权限

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 08:25:12 +00:00
764661f9e3 fix: 租户列表接口添加分页支持
- 支持 page 和 pageSize 参数
- 返回 PagedResult<TenantListItemDto>

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 08:07:04 +00:00
e15ab4f0be feat: 实现租户列表查询接口
- 获取租户列表:GET /api/admin/v1/tenants
- 用于填充租户下拉选择器

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 08:04:12 +00:00
0bcad8ba7e feat: 实现租户角色列表查询和删除接口
- 获取租户角色列表:GET /api/admin/v1/tenants/{tenantId}/roles
- 删除租户角色:DELETE /api/admin/v1/tenants/{tenantId}/roles/{roleId}

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 07:53:25 +00:00
2dbd004ce0 feat: 实现租户角色管理 API
- 创建角色:POST /api/admin/v1/tenants/{tenantId}/roles
- 更新角色:PUT /api/admin/v1/tenants/{tenantId}/roles/{roleId}
- 获取角色权限:GET /api/admin/v1/tenants/{tenantId}/roles/{roleId}/permissions
- 更新角色权限:PUT /api/admin/v1/tenants/{tenantId}/roles/{roleId}/permissions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 07:48:35 +00:00
8dff802248 feat: 管理后台登录增加手机号校验 2026-01-30 07:09:35 +00:00
f4ac933716 docs: 添加 CLAUDE.md 2026-01-30 07:02:16 +00:00
4e307feaf0 docs: 更新 TakeoutSaaS.Docs 子模块 2026-01-30 03:51:54 +00:00
69a9adfc25 refactor: 收敛租户领域至最小集 2026-01-30 03:18:41 +00:00
66aebabd87 docs: 更新文档子模块引用 2026-01-30 02:54:32 +00:00
83a4eb0831 refactor: 移除租户侧能力 2026-01-30 02:32:01 +00:00
6143943bf0 refactor: 用户管理仅平台管理员 2026-01-30 02:10:32 +00:00
45d08a79df refactor: 移除租户角色管理CQRS 2026-01-30 01:18:20 +00:00