增加同时获取多个字典类型数据接口
This commit is contained in:
@@ -8,14 +8,14 @@ using Tnb.Vengine.DataAccess;
|
||||
|
||||
namespace Tnb.Vengine.Domain
|
||||
{
|
||||
public class OutputParser
|
||||
public class VmQueryParser
|
||||
{
|
||||
private readonly IDataAccess _dataAccess;
|
||||
private readonly Vmodel _root;
|
||||
private List<string> _outputs;
|
||||
private Dictionary<string, OutputSelect> _selectProps = new Dictionary<string, OutputSelect>();
|
||||
private Dictionary<string, Vmodel?> _navModels = new Dictionary<string, Vmodel?>();
|
||||
public OutputParser(IDataAccess dataAccess, Vmodel rootModel, string output)
|
||||
public VmQueryParser(IDataAccess dataAccess, Vmodel rootModel, string output)
|
||||
{
|
||||
_dataAccess = dataAccess;
|
||||
_root = rootModel;
|
||||
@@ -54,6 +54,10 @@ namespace Tnb.Vengine.Domain
|
||||
|
||||
private async Task LoadNavModel()
|
||||
{
|
||||
foreach (var selVm in _selectProps.Values)
|
||||
{
|
||||
//if(selVm.navModel != null)
|
||||
}
|
||||
var navProps = _root.navProps.Where(a => _selectProps.Values.Any(b => b.vmPath.StartsWith(a.code + "."))).ToList();
|
||||
await LoadVmodelNavigateAsync(navProps);
|
||||
}
|
||||
@@ -74,8 +78,8 @@ namespace Tnb.Vengine.Domain
|
||||
|
||||
internal class OutputSelect
|
||||
{
|
||||
public string vmId { get; set; } = string.Empty;
|
||||
public string vmCode { get; set; } = string.Empty;
|
||||
public Vmodel? navModel { get; set; }
|
||||
public string navPath { get; set; } = string.Empty;
|
||||
public string vmPath { get; set; } = string.Empty;
|
||||
public eNavigateType navType { get; set; } = eNavigateType.None;
|
||||
public List<string> navPaths { get; set; } = new List<string>();
|
||||
@@ -89,9 +93,13 @@ namespace Tnb.Vengine.Domain
|
||||
}
|
||||
public OutputSelect(Vmodel model)
|
||||
{
|
||||
vmId = model.id;
|
||||
vmCode = model.vmCode;
|
||||
vmPath = Vmodel.MAIN_ALIES;
|
||||
}
|
||||
}
|
||||
|
||||
internal class NavigateVmodel
|
||||
{
|
||||
public Vmodel? navModel { get; set; }
|
||||
public string navPath { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -139,6 +139,9 @@ public partial class Vmodel : Entity
|
||||
public string fullCode
|
||||
{ get { return areaCode + "/" + vmCode; } }
|
||||
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public Vmodel? parent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user