fix 余额查询跨厂区

This commit is contained in:
2024-11-14 14:14:47 +08:00
parent b627a66254
commit 51b0d4a7bb
2 changed files with 3 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
using System.ComponentModel.DataAnnotations;
using Dlhis.Canteen.Setting.Response;
using Dlhis.Canteen.Setting.Services;
using Kurisu.AspNetCore.DataAccess.SqlSugar.Aop;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
@@ -37,6 +38,7 @@ public class WalletsController : ControllerBase
/// <param name="walletCode">钱包code</param>
/// <returns></returns>
[HttpGet("balance")]
[IgnoreTenant]
public async Task<decimal> GetBalanceAsync([Required] string walletCode)
{
return await _walletService.GetBalanceAsync(walletCode);

View File

@@ -28,7 +28,7 @@ public class WalletService : IWalletService
.Select(x => new WalletResponse
{
Code = x.Code,
Name = x.Name,
Name = x.Name + "钱包",
Factories = SqlFunc.Subqueryable<WalletEntity>().Where(p => p.Code == x.Code).ToList(p => p.Factory)
})
.ToListAsync();