mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-20 02:29:24 +08:00
代码生成器增加同步数据结构;
修复sql server 生成float类型; 修复非system用户【代码生成器中找不到xxx的定义】; 修复用户已处理流程列表中看不到【不同意】的流程;
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
// ***********************************************************************
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Infrastructure;
|
||||
@@ -122,7 +123,18 @@ namespace OpenAuth.App
|
||||
public List<BuilderTableColumn> GetTableColumns(string moduleCode)
|
||||
{
|
||||
var allprops = UnitWork.Find<BuilderTableColumn>(u => u.TableName.ToLower() == moduleCode.ToLower());
|
||||
|
||||
//如果是子表,直接返回所有字段
|
||||
var builderTable = UnitWork.FirstOrDefault<BuilderTable>(u => u.TableName.ToLower() == moduleCode.ToLower());
|
||||
if (builderTable == null)
|
||||
{
|
||||
throw new Exception($"代码生成器中找不到{moduleCode.ToLower()}的定义");
|
||||
}
|
||||
//如果是子表,因为不能在模块界面分配,所以直接返回所有字段,后期可以优化。
|
||||
if (builderTable.ParentTableId != null)
|
||||
{
|
||||
return allprops.ToList();
|
||||
}
|
||||
|
||||
//如果是系统模块,直接返回所有字段。防止开发者把模块配置成系统模块,还在外层调用loginContext.GetProperties("xxxx");
|
||||
bool? isSysModule = UnitWork.FirstOrDefault<Module>(u => u.Code == moduleCode)?.IsSys;
|
||||
if (isSysModule!= null && isSysModule.Value)
|
||||
|
Reference in New Issue
Block a user