jianghaiqing 2 years ago
commit 9736272e8b

@ -9285,16 +9285,9 @@
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Myshipping.Core.Service.DjyApiAuthService.Add(Myshipping.Core.Service.AddDjyApiAuthInput)">
<member name="M:Myshipping.Core.Service.DjyApiAuthService.Save(Myshipping.Core.Service.SaveDjyApiAuthInput)">
<summary>
增加接口授权
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Myshipping.Core.Service.DjyApiAuthService.Update(Myshipping.Core.Service.UpdateDjyApiAuthInput)">
<summary>
更新接口授权
保存授权
</summary>
<param name="input"></param>
<returns></returns>
@ -9408,11 +9401,6 @@
有效截止日期
</summary>
</member>
<member name="P:Myshipping.Core.Service.DjyApiAuthInput.IsDisable">
<summary>
禁用标志
</summary>
</member>
<member name="P:Myshipping.Core.Service.DjyApiAuthInput.TenantId">
<summary>
租户Id
@ -9438,17 +9426,12 @@
用户姓名
</summary>
</member>
<member name="T:Myshipping.Core.Service.AddDjyApiAuthInput">
<summary>
接口授权新增输入参数
</summary>
</member>
<member name="T:Myshipping.Core.Service.UpdateDjyApiAuthInput">
<member name="T:Myshipping.Core.Service.SaveDjyApiAuthInput">
<summary>
接口授权修改输入参数
接口授权修改保存参数
</summary>
</member>
<member name="P:Myshipping.Core.Service.UpdateDjyApiAuthInput.Id">
<member name="P:Myshipping.Core.Service.SaveDjyApiAuthInput.Id">
<summary>
主键Id
</summary>
@ -9468,11 +9451,6 @@
接口授权查询输入参数
</summary>
</member>
<member name="P:Myshipping.Core.Service.QueryDjyApiAuthInput.Id">
<summary>
主键Id
</summary>
</member>
<member name="P:Myshipping.Core.Service.QueryDjyApiAuthInput.ApiCode">
<summary>
接口代码
@ -9483,46 +9461,16 @@
接口名称
</summary>
</member>
<member name="P:Myshipping.Core.Service.QueryDjyApiAuthInput.ApiKey">
<summary>
接口KEY
</summary>
</member>
<member name="P:Myshipping.Core.Service.QueryDjyApiAuthInput.ApiSecret">
<summary>
接口秘钥
</summary>
</member>
<member name="P:Myshipping.Core.Service.QueryDjyApiAuthInput.ExpireDate">
<summary>
有效截止日期
</summary>
</member>
<member name="P:Myshipping.Core.Service.QueryDjyApiAuthInput.IsDisable">
<summary>
禁用标志
</summary>
</member>
<member name="P:Myshipping.Core.Service.QueryDjyApiAuthInput.TenantId">
<summary>
租户Id
</summary>
</member>
<member name="P:Myshipping.Core.Service.QueryDjyApiAuthInput.TenantName">
<summary>
租户名称
</summary>
</member>
<member name="P:Myshipping.Core.Service.QueryDjyApiAuthInput.UserId">
<summary>
用户ID
</summary>
</member>
<member name="P:Myshipping.Core.Service.QueryDjyApiAuthInput.UserCode">
<summary>
用户代码
</summary>
</member>
<member name="P:Myshipping.Core.Service.QueryDjyApiAuthInput.UserName">
<summary>
用户姓名

@ -14,7 +14,7 @@ namespace Myshipping.Core.Service
/// <summary>
/// 接口授权服务
/// </summary>
[ApiDescriptionSettings("Application",Name = "DjyApiAuth", Order = 1)]
[ApiDescriptionSettings(Name = "DjyApiAuth", Order = 1)]
public class DjyApiAuthService : IDjyApiAuthService, IDynamicApiController, ITransient
{
private readonly SqlSugarRepository<DjyApiAuth> _rep;
@ -37,37 +37,34 @@ namespace Myshipping.Core.Service
var entities = await _rep.AsQueryable()
.WhereIF(!string.IsNullOrWhiteSpace(input.ApiCode), u => u.ApiCode == input.ApiCode)
.WhereIF(!string.IsNullOrWhiteSpace(input.ApiName), u => u.ApiName == input.ApiName)
.WhereIF(!string.IsNullOrWhiteSpace(input.ApiKey), u => u.ApiKey == input.ApiKey)
.WhereIF(!string.IsNullOrWhiteSpace(input.ApiSecret), u => u.ApiSecret == input.ApiSecret)
.WhereIF(!string.IsNullOrWhiteSpace(input.TenantName), u => u.TenantName == input.TenantName)
.WhereIF(!string.IsNullOrWhiteSpace(input.UserCode), u => u.UserCode == input.UserCode)
.WhereIF(!string.IsNullOrWhiteSpace(input.UserName), u => u.UserName == input.UserName)
.WhereIF(input.IsDisable.HasValue, u => u.IsDisable == input.IsDisable.Value)
.ToPagedListAsync(input.PageNo, input.PageSize);
return entities.XnPagedResult();
}
/// <summary>
/// 增加接口授权
/// 保存授权
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("/DjyApiAuth/add")]
public async Task Add(AddDjyApiAuthInput input)
[HttpPost("/DjyApiAuth/sava")]
public async Task<long> Save(SaveDjyApiAuthInput input)
{
var entity = input.Adapt<DjyApiAuth>();
await _rep.InsertAsync(entity);
}
/// <summary>
/// 更新接口授权
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("/DjyApiAuth/edit")]
public async Task Update(UpdateDjyApiAuthInput input)
{
var entity = input.Adapt<DjyApiAuth>();
await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns:true).ExecuteCommandAsync();
DjyApiAuth entity = null;
if (input.Id > 0)
{
entity = input.Adapt<DjyApiAuth>();
await _rep.InsertAsync(entity);
}
else
{
entity = _rep.AsQueryable().Filter(null, true).First(x => x.Id == input.Id);
input.Adapt(entity);
await _rep.UpdateAsync(entity);
}
return entity.Id;
}
/// <summary>

@ -32,12 +32,7 @@ namespace Myshipping.Core.Service
/// <summary>
/// 有效截止日期
/// </summary>
public virtual DateTime ExpireDate { get; set; }
/// <summary>
/// 禁用标志
/// </summary>
public virtual bool IsDisable { get; set; }
public virtual DateTime? ExpireDate { get; set; }
/// <summary>
/// 租户Id
@ -67,16 +62,9 @@ namespace Myshipping.Core.Service
}
/// <summary>
/// 接口授权新增输入参数
/// 接口授权修改保存参数
/// </summary>
public class AddDjyApiAuthInput : DjyApiAuthInput
{
}
/// <summary>
/// 接口授权修改输入参数
/// </summary>
public class UpdateDjyApiAuthInput : DjyApiAuthInput
public class SaveDjyApiAuthInput : DjyApiAuthInput
{
/// <summary>
/// 主键Id
@ -103,12 +91,7 @@ namespace Myshipping.Core.Service
/// 接口授权查询输入参数
/// </summary>
public class QueryDjyApiAuthInput : PageInputBase
{
/// <summary>
/// 主键Id
/// </summary>
public virtual long Id { get; set; }
{
/// <summary>
/// 接口代码
/// </summary>
@ -119,46 +102,16 @@ namespace Myshipping.Core.Service
/// </summary>
public virtual string ApiName { get; set; }
/// <summary>
/// 接口KEY
/// </summary>
public virtual string ApiKey { get; set; }
/// <summary>
/// 接口秘钥
/// </summary>
public virtual string ApiSecret { get; set; }
/// <summary>
/// 有效截止日期
/// </summary>
public virtual DateTime ExpireDate { get; set; }
/// <summary>
/// 禁用标志
/// </summary>
public virtual bool IsDisable { get; set; }
/// <summary>
/// 租户Id
/// </summary>
public virtual long TenantId { get; set; }
public virtual bool? IsDisable { get; set; }
/// <summary>
/// 租户名称
/// </summary>
public virtual string TenantName { get; set; }
/// <summary>
/// 用户ID
/// </summary>
public virtual long UserId { get; set; }
/// <summary>
/// 用户代码
/// </summary>
public virtual string UserCode { get; set; }
/// <summary>
/// 用户姓名
/// </summary>

@ -9,8 +9,7 @@ namespace Myshipping.Core.Service
public interface IDjyApiAuthService
{
Task<dynamic> Page([FromQuery] QueryDjyApiAuthInput input);
Task Add(AddDjyApiAuthInput input);
Task Update(UpdateDjyApiAuthInput input);
Task<long> Save(SaveDjyApiAuthInput input);
Task Delete(GetDjyApiAuthInput input);
Task<DjyApiAuth> Get([FromQuery] GetDjyApiAuthInput input);
//Task<dynamic> List([FromQuery] QueryDjyApiAuthInput input);

Loading…
Cancel
Save