booking_auth_dev
wanghaomei 2 years ago
commit 4799a24047

@ -286,7 +286,7 @@ namespace Myshipping.Application
/// <returns></returns>
[SqlSugarUnitOfWork]
[HttpPost("/BookingOrder/Add")]
public async Task Add(AddBookingOrderInput input)
public async Task<long> Add(AddBookingOrderInput input)
{
if (input.ParentId == 0)
@ -323,7 +323,7 @@ namespace Myshipping.Application
var entity = input.Adapt<BookingOrder>();
await _rep.InsertAsync(entity);
var id=await _rep.InsertReturnSnowflakeIdAsync(entity);
if (input.ctnInputs != null)
{
foreach (var item in input.ctnInputs)
@ -357,7 +357,7 @@ namespace Myshipping.Application
{
await SendTrace(entity.Id.ToString(), entity.YARDID, entity.YARD, entity.MBLNO);
}
return id;
}
/// <summary>

@ -10,7 +10,7 @@ namespace Myshipping.Application
{
public interface IBookingOrderService
{
Task Add(AddBookingOrderInput input);
Task<long> Add(AddBookingOrderInput input);
Task Delete(long Id);
Task Update(UpdateBookingOrderInput input);

@ -1,5 +1,6 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Myshipping.Core.Entity;
using System.Collections.Generic;
using System.Threading.Tasks;
@ -30,4 +31,5 @@ public interface ISysUserService
Task<List<long>> GetDataScopeIdUserList(long userId = 0);
void CheckDataScopeByUserId(long userId);
void CheckDataScope(long orgId);
Task<List<SysUser>> GetTenantUser(string name);
}

@ -536,4 +536,14 @@ public class SysUserService : ISysUserService, IDynamicApiController, ITransient
throw Oops.Oh(ErrorCode.D1013);
}
}
/// <summary>
/// 获取租户下的用户
/// </summary>
/// <param name="name"></param>
/// <returns></returns>
[HttpGet("/sysUser/GetTenantUser")]
public Task<List<SysUser>> GetTenantUser(string name)
{
return _sysUserRep.AsQueryable().Where(x => x.TenantId == Convert.ToInt64(UserManager.TENANT_ID)).WhereIF(!string.IsNullOrWhiteSpace(name), x => x.Name.Contains(name)).ToListAsync();
}
}

Loading…
Cancel
Save