自定义配置批量拉取接口

optimize
wanghaomei 2 years ago
parent 1b0a3ea01d
commit 519e1c91de

@ -11231,6 +11231,13 @@
<param name="type"></param>
<returns></returns>
</member>
<member name="M:Myshipping.Core.Service.DjyUserConfigService.Multi(System.String[])">
<summary>
获取用户自定义配置(批量)
</summary>
<param name="typeArr"></param>
<returns></returns>
</member>
<member name="T:Myshipping.Core.Service.DjyUserConfigInput">
<summary>
自定义配置输入参数

@ -7,6 +7,7 @@ using SqlSugar;
using System.Linq;
using System.Threading.Tasks;
using Myshipping.Core.Entity;
using System.Collections.Generic;
namespace Myshipping.Core.Service
{
@ -95,5 +96,16 @@ namespace Myshipping.Core.Service
return await _rep.FirstOrDefaultAsync(u => u.CreatedUserId == UserManager.UserId && u.Type == type);
}
/// <summary>
/// 获取用户自定义配置(批量)
/// </summary>
/// <param name="typeArr"></param>
/// <returns></returns>
[HttpGet("/DjyUserConfig/multi")]
public async Task<List<DjyUserConfig>> Multi(string[] typeArr)
{
return await _rep.ToListAsync(u => u.CreatedUserId == UserManager.UserId && typeArr.Contains(u.Type));
}
}
}

@ -2,6 +2,7 @@
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using Myshipping.Core.Entity;
using System.Collections.Generic;
namespace Myshipping.Core.Service
{
@ -12,5 +13,6 @@ namespace Myshipping.Core.Service
Task Update(UpdateDjyUserConfigInput input);
Task Delete(GetDjyUserConfigInput input);
Task<DjyUserConfig> Get([FromQuery] string type);
Task<List<DjyUserConfig>> Multi(string[] typeArr);
}
}
Loading…
Cancel
Save