采购订单添加物料功能
This commit is contained in:
@@ -953,5 +953,11 @@
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.ApiMicroservice.Controllers.TestController.CurrentUserTest">
|
||||
<summary>
|
||||
获取当前用户信息测试
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Yi.Framework.Common.Abstract;
|
||||
using Yi.Framework.Common.Attribute;
|
||||
using Yi.Framework.Common.Models;
|
||||
using Yi.Framework.DtoModel.ERP.Purchase;
|
||||
using Yi.Framework.Interface.ERP;
|
||||
|
||||
@@ -9,6 +9,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Common.Abstract;
|
||||
using Yi.Framework.Common.Attribute;
|
||||
using Yi.Framework.Common.Const;
|
||||
using Yi.Framework.Common.Models;
|
||||
@@ -45,6 +46,9 @@ namespace Yi.Framework.ApiMicroservice.Controllers
|
||||
private CacheInvoker _cacheDb;
|
||||
private ILogger<TestController> _logger;
|
||||
ISugarUnitOfWork<UnitOfWork> _unitOfWork;
|
||||
[Autowired]
|
||||
private ICurrentUser _currentUser { get; set; }
|
||||
|
||||
[Autowired]
|
||||
public CacheInvoker CacheInvoker { get; set; }
|
||||
//你可以依赖注入服务层各各接口,也可以注入其他仓储层,怎么爽怎么来!
|
||||
@@ -403,5 +407,17 @@ namespace Yi.Framework.ApiMicroservice.Controllers
|
||||
{
|
||||
return Result.Success().SetStatus(CacheInvoker is not null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取当前用户信息测试
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[Authorize]
|
||||
public Result CurrentUserTest()
|
||||
{
|
||||
var per = _currentUser.Permission;
|
||||
return Result.Success().SetData(per);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,6 +159,10 @@ builder.Services.AddHttpContextAccessor();
|
||||
#endregion
|
||||
builder.Services.AddSingleton<ThumbnailSharpInvoer>();
|
||||
|
||||
#region
|
||||
//<2F><><EFBFBD>ӵ<EFBFBD>ǰ<EFBFBD>û<EFBFBD><C3BB><EFBFBD>Ϣʹ<CFA2><CAB9>
|
||||
#endregion
|
||||
builder.Services.AddCurrentUserServer();
|
||||
|
||||
#region
|
||||
//ȫ<><C8AB><EFBFBD><EFBFBD><EFBFBD>ó<EFBFBD>ʼ<EFBFBD><CABC>ֵ
|
||||
@@ -222,6 +226,10 @@ app.UseAuthentication();
|
||||
#endregion
|
||||
app.UseAuthorization();
|
||||
#region
|
||||
//<2F><><EFBFBD>ӵ<EFBFBD>ǰ<EFBFBD>û<EFBFBD><C3BB><EFBFBD>Ϣʹ<CFA2><CAB9>
|
||||
#endregion
|
||||
app.UseCurrentUserServer();
|
||||
#region
|
||||
//Consul<75><6C><EFBFBD><EFBFBD>ע<EFBFBD><D7A2>
|
||||
#endregion
|
||||
app.UseConsulService();
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user