去除引用common.props

This commit is contained in:
2023-11-06 19:35:59 +08:00
parent 6a2154edd9
commit c6b8dfc861
810 changed files with 3910 additions and 6695 deletions

View File

@@ -1,4 +1,4 @@
using Aop.Api.Domain;
using System.Linq.Expressions;
using JNPF.Common.Configuration;
using JNPF.Common.Const;
using JNPF.Common.Core.Manager;
@@ -32,21 +32,11 @@ using JNPF.Systems.Entitys.System;
using JNPF.Systems.Interfaces.Permission;
using JNPF.Systems.Interfaces.System;
using Mapster;
using Microsoft.AspNetCore.Authentication.OAuth;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.CodeAnalysis;
using Microsoft.Extensions.Options;
using NPOI.SS.Formula.Eval;
using NPOI.SS.Formula.Functions;
using Org.BouncyCastle.Ocsp;
using Qiniu.Util;
using Senparc.NeuChar.App.AppStore;
using SqlSugar;
using System;
using System.Linq.Expressions;
using System.Security.Principal;
using System.Text.Json.Nodes;
namespace JNPF.Systems;
@@ -312,7 +302,8 @@ public class UsersService : IUsersService, IDynamicApiController, ITransient
.Where((a, b) => b.ObjectType == "Organize" && orgList.Contains(b.ObjectId)).Where((a, b) => a.EnabledMark == 1 && a.DeleteMark == null)
.Where((a, b) => a.RealName.Contains(input.keyword) || a.Account.Contains(input.keyword))
.GroupBy((a, b) => new { a.Id, a.RealName, a.Account, a.EnabledMark })
.Select((a, b) => new {
.Select((a, b) => new
{
id = a.Id,
fullName = SqlFunc.MergeString(a.RealName, "/", a.Account),
enabledMark = a.EnabledMark,
@@ -357,7 +348,8 @@ public class UsersService : IUsersService, IDynamicApiController, ITransient
var res = await _repository.AsSugarClient().Queryable<UserEntity, UserRelationEntity>((a, b) => new JoinQueryInfos(JoinType.Left, b.UserId == a.Id))
.Where((a, b) => b.ObjectType == "Organize" && b.ObjectId == input.organizeId).Where((a, b) => a.EnabledMark == 1 && a.DeleteMark == null)
.GroupBy((a, b) => new { a.Id, a.RealName, a.Account, a.EnabledMark })
.Select((a, b) => new {
.Select((a, b) => new
{
id = a.Id,
fullName = SqlFunc.MergeString(a.RealName, "/", a.Account),
enabledMark = a.EnabledMark,
@@ -564,7 +556,7 @@ public class UsersService : IUsersService, IDynamicApiController, ITransient
var oids = userList.Where(x => x.UserId.Equals(item.id)).Select(x => x.ObjectId).ToList();
var oTree = orgList.Where(x => oids.Contains(x.Id)).Select(x => x.Description).ToList();
item.organize = string.Join(",", oTree);
//item.type = org.fullName;
//item.type = org.fullName;
});
}
@@ -1148,7 +1140,7 @@ public class UsersService : IUsersService, IDynamicApiController, ITransient
public async Task Update(string id, [FromBody] UserUpInput input)
{
UserEntity? oldUserEntity = await _repository.GetFirstAsync(it => it.Id == id);
input.roleId = input.roleId == null ? string.Empty : input.roleId;
input.roleId = input.roleId == null ? string.Empty : input.roleId;
// 超级管理员 只有 admin 账号才有变更权限
if (_userManager.UserId != oldUserEntity.Id && oldUserEntity.IsAdministrator == 1 && _userManager.Account != "admin")
@@ -1240,7 +1232,8 @@ public class UsersService : IUsersService, IDynamicApiController, ITransient
try
{
// 更新用户记录
int newEntity = await _repository.AsUpdateable(entity).UpdateColumns(it => new {
int newEntity = await _repository.AsUpdateable(entity).UpdateColumns(it => new
{
it.Account,
it.RealName,
it.QuickQuery,