Browse Source

字段对照

master
DESKTOP-G961P6V\Zhh 2 years ago
parent
commit
97c44e8f86
  1. 3
      src/Shentun.Peis.Application/ColumnReferences/ColumnReferenceAppService.cs
  2. 1
      src/Shentun.Peis.Application/CustomerOrgs/CustomerOrgAppService.cs
  3. 21
      test/Shentun.Peis.Application.Tests/CustomerOrgAppServiceTest.cs

3
src/Shentun.Peis.Application/ColumnReferences/ColumnReferenceAppService.cs

@ -331,7 +331,8 @@ namespace Shentun.Peis.ColumnReferences
[HttpPost("api/app/ColumnReference/GetInterfaceCodeValuesByAppCode")]
public async Task<List<ColumnReferenceInterfaceCodeValueDto>> GetInterfaceCodeValuesByAppCode(ColumnReferenceInterfaceCodeValuesInputDto input)
{
var columnReferenceCode = await _columnReferenceCodeRepository.FirstOrDefaultAsync(o => o.CodeValue == input.CodeValue);
var columnReferenceCode = await _columnReferenceCodeRepository.FirstOrDefaultAsync(o => o.ColumnReferenceId == input.ColumnReferenceId &&
o.CodeValue == input.CodeValue);
if(columnReferenceCode == null)
{
return null;

1
src/Shentun.Peis.Application/CustomerOrgs/CustomerOrgAppService.cs

@ -325,6 +325,7 @@ namespace Shentun.Peis.CustomerOrgs
CustomerOrgCode = p.CustomerOrgCode,
TreeChildren = new List<CustomerOrgTreeChildDto>()
};
var customerOrgTreeChildList = GetTree(items.ToList(), null);

21
test/Shentun.Peis.Application.Tests/CustomerOrgAppServiceTest.cs

@ -3,6 +3,7 @@ using Shentun.Peis.GuideTypes;
using Shentun.Peis.Models;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@ -50,13 +51,23 @@ namespace Shentun.Peis
[Fact]
public async Task GetByCodeAllAsync()
{
var list = await _appService.GetByCodeAllAsync("",0);
foreach (var item in list)
using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true))
{
_output.WriteLine(item.DisplayName);
Stopwatch stopwatch = new Stopwatch();
stopwatch.Start();
var list = await _appService.GetByCodeAllAsync("", 0);
stopwatch.Stop();
TimeSpan elapsed = stopwatch.Elapsed;
_output.WriteLine("代码运行时间:" + elapsed.TotalMilliseconds + "毫秒" + list.Count().ToString());
//foreach (var item in list)
//{
// _output.WriteLine(item.DisplayName);
//}
await unitOfWork.CompleteAsync();
}
}

Loading…
Cancel
Save