fix 余额查询跨厂区
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user