feat: 添加预算类别名称更新功能,优化相关控制器逻辑
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 23s
Docker Build & Deploy / Deploy to Production (push) Successful in 7s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 1s
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 23s
Docker Build & Deploy / Deploy to Production (push) Successful in 7s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 1s
This commit is contained in:
@@ -5,7 +5,8 @@
|
||||
public class TransactionCategoryController(
|
||||
ITransactionCategoryRepository categoryRepository,
|
||||
ITransactionRecordRepository transactionRecordRepository,
|
||||
ILogger<TransactionCategoryController> logger
|
||||
ILogger<TransactionCategoryController> logger,
|
||||
IBudgetRepository budgetRepository
|
||||
) : ControllerBase
|
||||
{
|
||||
/// <summary>
|
||||
@@ -121,6 +122,7 @@ public class TransactionCategoryController(
|
||||
|
||||
// 同步更新交易记录中的分类名称
|
||||
await transactionRecordRepository.UpdateCategoryNameAsync(category.Name, dto.Name, category.Type);
|
||||
await budgetRepository.UpdateBudgetCategoryNameAsync(category.Name, dto.Name, category.Type);
|
||||
}
|
||||
|
||||
category.Name = dto.Name;
|
||||
|
||||
Reference in New Issue
Block a user