Merge remote-tracking branch 'refs/remotes/github/master'
This commit is contained in:
commit
8c78993979
@ -56,7 +56,7 @@
|
|||||||
"ElasticSearch": {
|
"ElasticSearch": {
|
||||||
"NodeUrls": [ "http://129.204.22.146:9200" ],
|
"NodeUrls": [ "http://129.204.22.146:9200" ],
|
||||||
"LoginName": "elastic",
|
"LoginName": "elastic",
|
||||||
"Password": "afyTgmVb8jq6",
|
"Password": "itd!@#123",
|
||||||
"Base64PassPassword": "Basic ZWxhc3RpYzphZnlUZ21WYjhqcTY="
|
"Base64PassPassword": "Basic ZWxhc3RpYzphZnlUZ21WYjhqcTY="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -128,13 +128,12 @@ public class ServiceProviderInterfaceService : ApplicationService
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
/// <exception cref="BusinessException"></exception>
|
/// <exception cref="BusinessException"></exception>
|
||||||
[HttpPost("Interface/SaveServiceProviderInterface")]
|
[HttpPost("Interface/SaveServiceProviderInterface")]
|
||||||
public async Task SaveServiceProviderInterfaceAsync(ServiceProviderInterfaceInput input)
|
public async Task<int> SaveServiceProviderInterfaceAsync(ServiceProviderInterfaceInput input)
|
||||||
{
|
{
|
||||||
switch (input.OptionType)
|
switch (input.OptionType)
|
||||||
{
|
{
|
||||||
case OptionType.新增:
|
case OptionType.新增:
|
||||||
await CreateServiceProviderInterfaceAsync(input);
|
return await CreateServiceProviderInterfaceAsync(input);
|
||||||
break;
|
|
||||||
case OptionType.修改:
|
case OptionType.修改:
|
||||||
await UpdateServiceProviderInterfaceAsync(input);
|
await UpdateServiceProviderInterfaceAsync(input);
|
||||||
break;
|
break;
|
||||||
@ -146,6 +145,8 @@ public class ServiceProviderInterfaceService : ApplicationService
|
|||||||
default:
|
default:
|
||||||
throw new ArgumentOutOfRangeException();
|
throw new ArgumentOutOfRangeException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return input.Id ?? 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -173,7 +174,7 @@ public class ServiceProviderInterfaceService : ApplicationService
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal async Task CreateServiceProviderInterfaceAsync(ServiceProviderInterfaceInput input)
|
internal async Task<int> CreateServiceProviderInterfaceAsync(ServiceProviderInterfaceInput input)
|
||||||
{
|
{
|
||||||
// 校验参数合法性
|
// 校验参数合法性
|
||||||
ParameterService.ValidateParameter(
|
ParameterService.ValidateParameter(
|
||||||
@ -232,6 +233,8 @@ public class ServiceProviderInterfaceService : ApplicationService
|
|||||||
|
|
||||||
// 提交事务
|
// 提交事务
|
||||||
ts.Complete();
|
ts.Complete();
|
||||||
|
|
||||||
|
return interfaceId;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<string> GenerateServiceProviderInterfaceCode(int serviceProviderId)
|
private async Task<string> GenerateServiceProviderInterfaceCode(int serviceProviderId)
|
||||||
|
|||||||
@ -23,7 +23,7 @@ public class InterfaceMapPublishService(
|
|||||||
IInterfaceMapPublishRepository interfaceMapPublishRepository,
|
IInterfaceMapPublishRepository interfaceMapPublishRepository,
|
||||||
InterfaceForwardQuery interfaceForwardQuery,
|
InterfaceForwardQuery interfaceForwardQuery,
|
||||||
IInterfaceMapRepository interfaceMapRepository)
|
IInterfaceMapRepository interfaceMapRepository)
|
||||||
: Fake.Application.ApplicationService
|
: ApplicationService
|
||||||
{
|
{
|
||||||
private static readonly JsonSerializerSettings Settings = new()
|
private static readonly JsonSerializerSettings Settings = new()
|
||||||
{
|
{
|
||||||
@ -79,7 +79,7 @@ public class InterfaceMapPublishService(
|
|||||||
string redisContent = JsonConvert.SerializeObject(cache, Settings);
|
string redisContent = JsonConvert.SerializeObject(cache, Settings);
|
||||||
|
|
||||||
|
|
||||||
var differenceContent = CompareTexts(redisContent, dbContent);
|
var differenceContent = CompareTexts(redisContent, dbContent?? String.Empty);
|
||||||
|
|
||||||
return new InterfaceMapPublishedDifferenceVO
|
return new InterfaceMapPublishedDifferenceVO
|
||||||
{
|
{
|
||||||
|
|||||||
@ -17,12 +17,12 @@ public class BasicRepository<T> : SqlSugarRepository<InterfaceForwardDbContext,
|
|||||||
return Context.Queryable<T>();
|
return Context.Queryable<T>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<T> GetFirstAsync(Expression<Func<T, bool>> whereExpression)
|
public async Task<T?> GetFirstAsync(Expression<Func<T, bool>> whereExpression)
|
||||||
{
|
{
|
||||||
return await AsQueryable().FirstAsync(whereExpression);
|
return await AsQueryable().FirstAsync(whereExpression);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<TResult> GetFirstAsync<TResult>(Expression<Func<T, bool>> whereExpression,
|
public async Task<TResult?> GetFirstAsync<TResult>(Expression<Func<T, bool>> whereExpression,
|
||||||
Expression<Func<T, TResult>> resultExpression)
|
Expression<Func<T, TResult>> resultExpression)
|
||||||
{
|
{
|
||||||
return await Context.Queryable<T>().Where(whereExpression).Select(resultExpression).FirstAsync();
|
return await Context.Queryable<T>().Where(whereExpression).Select(resultExpression).FirstAsync();
|
||||||
|
|||||||
@ -13,9 +13,9 @@ public interface IBasicRepository<T>: ISqlSugarRepository<InterfaceForwardDbCont
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="whereExpression"></param>
|
/// <param name="whereExpression"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<T> GetFirstAsync(Expression<Func<T, bool>> whereExpression);
|
Task<T?> GetFirstAsync(Expression<Func<T, bool>> whereExpression);
|
||||||
|
|
||||||
Task<TResult> GetFirstAsync<TResult>(Expression<Func<T, bool>> whereExpression,Expression<Func<T, TResult>> resultExpression);
|
Task<TResult?> GetFirstAsync<TResult>(Expression<Func<T, bool>> whereExpression,Expression<Func<T, TResult>> resultExpression);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// get list
|
/// get list
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user