去除引用common.props
This commit is contained in:
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Tnb.Common.Core.EventBus.Constants
|
||||
namespace Tnb.Common.Core.EventBus.Constants
|
||||
{
|
||||
public class EventSubscribeEventConsts
|
||||
{
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using JNPF.EventBus;
|
||||
using SqlSugar;
|
||||
using JNPF.EventBus;
|
||||
|
||||
namespace Tnb.Common.Core.EventBus.Sources
|
||||
{
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Threading.Channels;
|
||||
using JNPF.Common.Extension;
|
||||
using JNPF.Common.Security;
|
||||
using JNPF.EventBus;
|
||||
using JNPF.Logging;
|
||||
using RabbitMQ.Client;
|
||||
using RabbitMQ.Client.Events;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Threading.Channels;
|
||||
|
||||
namespace JNPF.EventHandler;
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using JNPF.Common.Const;
|
||||
using System.Security.Claims;
|
||||
using JNPF.Common.Const;
|
||||
using JNPF.Common.Extension;
|
||||
using JNPF.Common.Net;
|
||||
using JNPF.Common.Security;
|
||||
@@ -8,9 +9,8 @@ using JNPF.EventBus;
|
||||
using JNPF.EventHandler;
|
||||
using JNPF.FriendlyException;
|
||||
using JNPF.Logging.Attributes;
|
||||
using Microsoft.AspNetCore.Mvc.Filters;
|
||||
using JNPF.Systems.Entitys.System;
|
||||
using System.Security.Claims;
|
||||
using Microsoft.AspNetCore.Mvc.Filters;
|
||||
using SqlSugar;
|
||||
|
||||
namespace JNPF.Common.Core.Filter;
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
using JNPF.Common.Const;
|
||||
using System.Diagnostics;
|
||||
using System.Security.Claims;
|
||||
using JNPF.Common.Const;
|
||||
using JNPF.Common.Extension;
|
||||
using JNPF.Common.Net;
|
||||
using JNPF.Common.Security;
|
||||
using JNPF.DataEncryption;
|
||||
using JNPF.EventBus;
|
||||
using JNPF.EventHandler;
|
||||
using JNPF.Logging;
|
||||
using JNPF.Logging.Attributes;
|
||||
using JNPF.Systems.Entitys.System;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Filters;
|
||||
using System.Diagnostics;
|
||||
using System.Security.Claims;
|
||||
using SqlSugar;
|
||||
using Microsoft.AspNetCore.Mvc.Controllers;
|
||||
using JNPF.Logging;
|
||||
using Microsoft.AspNetCore.Mvc.Filters;
|
||||
using SqlSugar;
|
||||
|
||||
namespace JNPF.Common.Core.Filter;
|
||||
|
||||
|
||||
@@ -339,50 +339,50 @@ public class DataBaseManager : IDataBaseManager, ITransient
|
||||
|
||||
//try
|
||||
//{
|
||||
int total = 0;
|
||||
int total = 0;
|
||||
|
||||
if (_sqlSugarClient.CurrentConnectionConfig.DbType == SqlSugar.DbType.Oracle) strSql = strSql.Replace(";", string.Empty);
|
||||
if (_sqlSugarClient.CurrentConnectionConfig.DbType == SqlSugar.DbType.Oracle) strSql = strSql.Replace(";", string.Empty);
|
||||
|
||||
var sidx = pageInput.sidx.IsNotEmptyOrNull() && pageInput.sort.IsNotEmptyOrNull(); // 按前端参数排序
|
||||
var defaultSidx = columnDesign.defaultSidx.IsNotEmptyOrNull() && columnDesign.sort.IsNotEmptyOrNull(); // 按模板默认排序
|
||||
var sidx = pageInput.sidx.IsNotEmptyOrNull() && pageInput.sort.IsNotEmptyOrNull(); // 按前端参数排序
|
||||
var defaultSidx = columnDesign.defaultSidx.IsNotEmptyOrNull() && columnDesign.sort.IsNotEmptyOrNull(); // 按模板默认排序
|
||||
|
||||
var dataRuleJson = new List<IConditionalModel>();
|
||||
if (pageInput.dataRuleJson.IsNotEmptyOrNull()) dataRuleJson = _sqlSugarClient.Utilities.JsonToConditionalModels(pageInput.dataRuleJson);
|
||||
var dataRuleJson = new List<IConditionalModel>();
|
||||
if (pageInput.dataRuleJson.IsNotEmptyOrNull()) dataRuleJson = _sqlSugarClient.Utilities.JsonToConditionalModels(pageInput.dataRuleJson);
|
||||
|
||||
var querJson = new List<IConditionalModel>();
|
||||
if (pageInput.queryJson.IsNotEmptyOrNull()) querJson = _sqlSugarClient.Utilities.JsonToConditionalModels(pageInput.queryJson);
|
||||
var querJson = new List<IConditionalModel>();
|
||||
if (pageInput.queryJson.IsNotEmptyOrNull()) querJson = _sqlSugarClient.Utilities.JsonToConditionalModels(pageInput.queryJson);
|
||||
|
||||
var superQueryJson = new List<IConditionalModel>();
|
||||
if (pageInput.superQueryJson.IsNotEmptyOrNull()) superQueryJson = _sqlSugarClient.Utilities.JsonToConditionalModels(pageInput.superQueryJson);
|
||||
// var sql = _sqlSugarClient.SqlQueryable<object>(strSql)
|
||||
// .Where(dataRuleJson).Where(querJson).Where(superQueryJson).Where(dataPermissions).ToSqlString();
|
||||
DataTable dt = _sqlSugarClient.SqlQueryable<object>(strSql)
|
||||
.Where(dataRuleJson).Where(querJson).Where(superQueryJson).Where(dataPermissions)
|
||||
.OrderByIF(sidx, pageInput.sidx + " " + pageInput.sort).OrderByIF(!sidx && defaultSidx, columnDesign.defaultSidx + " " + columnDesign.sort)
|
||||
.ToDataTablePage(pageInput.currentPage, pageInput.pageSize, ref total);
|
||||
var superQueryJson = new List<IConditionalModel>();
|
||||
if (pageInput.superQueryJson.IsNotEmptyOrNull()) superQueryJson = _sqlSugarClient.Utilities.JsonToConditionalModels(pageInput.superQueryJson);
|
||||
// var sql = _sqlSugarClient.SqlQueryable<object>(strSql)
|
||||
// .Where(dataRuleJson).Where(querJson).Where(superQueryJson).Where(dataPermissions).ToSqlString();
|
||||
DataTable dt = _sqlSugarClient.SqlQueryable<object>(strSql)
|
||||
.Where(dataRuleJson).Where(querJson).Where(superQueryJson).Where(dataPermissions)
|
||||
.OrderByIF(sidx, pageInput.sidx + " " + pageInput.sort).OrderByIF(!sidx && defaultSidx, columnDesign.defaultSidx + " " + columnDesign.sort)
|
||||
.ToDataTablePage(pageInput.currentPage, pageInput.pageSize, ref total);
|
||||
|
||||
// 如果有字段别名 替换 ColumnName
|
||||
if (outColumnName != null && outColumnName.Count > 0)
|
||||
// 如果有字段别名 替换 ColumnName
|
||||
if (outColumnName != null && outColumnName.Count > 0)
|
||||
{
|
||||
var resultKey = string.Empty;
|
||||
for (var i = 0; i < dt.Columns.Count; i++)
|
||||
dt.Columns[i].ColumnName = outColumnName.TryGetValue(dt.Columns[i].ColumnName.ToUpper(), out resultKey) == true ? outColumnName[dt.Columns[i].ColumnName.ToUpper()] : dt.Columns[i].ColumnName.ToUpper();
|
||||
}
|
||||
|
||||
var data = new PageResult<Dictionary<string, object>>()
|
||||
{
|
||||
pagination = new PageResult()
|
||||
{
|
||||
var resultKey = string.Empty;
|
||||
for (var i = 0; i < dt.Columns.Count; i++)
|
||||
dt.Columns[i].ColumnName = outColumnName.TryGetValue(dt.Columns[i].ColumnName.ToUpper(), out resultKey) == true ? outColumnName[dt.Columns[i].ColumnName.ToUpper()] : dt.Columns[i].ColumnName.ToUpper();
|
||||
}
|
||||
currentPage = pageInput.currentPage,
|
||||
pageSize = pageInput.pageSize,
|
||||
total = total
|
||||
},
|
||||
list = dt.ToObject<List<Dictionary<string, string>>>().ToObject<List<Dictionary<string, object>>>()
|
||||
};
|
||||
|
||||
var data = new PageResult<Dictionary<string, object>>()
|
||||
{
|
||||
pagination = new PageResult()
|
||||
{
|
||||
currentPage = pageInput.currentPage,
|
||||
pageSize = pageInput.pageSize,
|
||||
total = total
|
||||
},
|
||||
list = dt.ToObject<List<Dictionary<string, string>>>().ToObject<List<Dictionary<string, object>>>()
|
||||
};
|
||||
_sqlSugarClient.ChangeDatabase(_connectionStrings.ConfigId);
|
||||
|
||||
_sqlSugarClient.ChangeDatabase(_connectionStrings.ConfigId);
|
||||
|
||||
return data;
|
||||
return data;
|
||||
//}
|
||||
//catch (Exception ex)
|
||||
//{
|
||||
@@ -456,15 +456,15 @@ public class DataBaseManager : IDataBaseManager, ITransient
|
||||
_sqlSugarClient.ChangeDatabase(_connectionStrings.ConfigId);
|
||||
return list.Adapt<List<DbTableFieldModel>>();
|
||||
}
|
||||
|
||||
public List<string> GetPrimaries(DbLinkEntity? link, string tableName)
|
||||
|
||||
public List<string> GetPrimaries(DbLinkEntity? link, string tableName)
|
||||
{
|
||||
if (link != null && _sqlSugarClient.CurrentConnectionConfig.ConfigId != link.Id)
|
||||
_sqlSugarClient = ChangeDataBase(link);
|
||||
_sqlSugarClient = ChangeDataBase(link);
|
||||
|
||||
var data = _sqlSugarClient.DbMaintenance.GetPrimaries(tableName);
|
||||
_sqlSugarClient.ChangeDatabase(_connectionStrings.ConfigId);
|
||||
return data;
|
||||
_sqlSugarClient.ChangeDatabase(_connectionStrings.ConfigId);
|
||||
return data;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -597,7 +597,7 @@ public class DataBaseManager : IDataBaseManager, ITransient
|
||||
//var modelList = _sqlSugarClient.Ado.SqlQuery<DynamicDbTableModel>(sql).ToList();
|
||||
var modelList = _sqlSugarClient.Ado.SqlQuery<DatabaseTableListOutput>(sql).ToList();
|
||||
//return modelList.Select(x => new DatabaseTableListOutput { table = x.F_TABLE, tableName = x.F_TABLENAME, sum = x.F_SUM.ParseToInt() }).ToList();
|
||||
_sqlSugarClient.ChangeDatabase(_connectionStrings.ConfigId);
|
||||
_sqlSugarClient.ChangeDatabase(_connectionStrings.ConfigId);
|
||||
return modelList;
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ public interface IDataBaseManager
|
||||
/// </summary>
|
||||
/// <param name="tableName">表名.</param>
|
||||
/// <param name="tableFieldList">表字段集合.</param>
|
||||
void AddTableColumn(DbLinkEntity link ,string tableName, List<DbTableFieldModel> tableFieldList);
|
||||
void AddTableColumn(DbLinkEntity link, string tableName, List<DbTableFieldModel> tableFieldList);
|
||||
|
||||
/// <summary>
|
||||
/// 删除表.
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text;
|
||||
using JNPF.Common.Configuration;
|
||||
using JNPF.Common.Enums;
|
||||
using JNPF.Common.Extension;
|
||||
@@ -321,7 +320,8 @@ namespace JNPF.Common.Core.Manager.Files
|
||||
var stream = new MemoryStream(byteList);
|
||||
await UploadFileByType(stream, _filePath, _fileName);
|
||||
_cacheManager.Set(_fileName, string.Empty);
|
||||
return new {
|
||||
return new
|
||||
{
|
||||
name = _fileName,
|
||||
url = string.Format("/api/file/Download?encryption={0}", DESCEncryption.Encrypt(string.Format("{0}|{1}|json", _userManager.UserId, _fileName), "JNPF"))
|
||||
};
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using JNPF.Common.Const;
|
||||
using System.Security.Claims;
|
||||
using JNPF.Common.Const;
|
||||
using JNPF.Common.Enums;
|
||||
using JNPF.Common.Extension;
|
||||
using JNPF.Common.Manager;
|
||||
@@ -14,7 +15,6 @@ using JNPF.Systems.Entitys.System;
|
||||
using Mapster;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using SqlSugar;
|
||||
using System.Security.Claims;
|
||||
|
||||
namespace JNPF.Common.Core.Manager;
|
||||
|
||||
|
||||
@@ -1,22 +1,4 @@
|
||||
using JNPF.Common.Const;
|
||||
using JNPF.Common.Enums;
|
||||
using JNPF.Common.Extension;
|
||||
using JNPF.Common.Manager;
|
||||
using JNPF.Common.Models.Authorize;
|
||||
using JNPF.Common.Models.User;
|
||||
using JNPF.Common.Net;
|
||||
using JNPF.Common.Security;
|
||||
using JNPF.DataEncryption;
|
||||
using JNPF.DependencyInjection;
|
||||
using JNPF.Systems.Entitys.Entity.Permission;
|
||||
using JNPF.Systems.Entitys.Permission;
|
||||
using JNPF.Systems.Entitys.System;
|
||||
using Mapster;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using SqlSugar;
|
||||
using System.Security.Claims;
|
||||
|
||||
namespace JNPF.Common.Core.Manager;
|
||||
namespace JNPF.Common.Core.Manager;
|
||||
|
||||
/// <summary>
|
||||
/// 用户管理 .
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="$(SolutionDir)\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
|
||||
Reference in New Issue
Block a user