update 删除所有Xn前缀, 规范了所有分页参数和返回值
This commit is contained in:
@@ -80,7 +80,7 @@ namespace Ewide.Core.Service
|
||||
u => EF.Functions.Like(u.Code, $"%{input.Code.Trim()}%")
|
||||
)
|
||||
.ToPageData(input);
|
||||
return XnPageResult<SysApp>.PageResult(apps);
|
||||
return PageDataResult<SysApp>.PageResult(apps);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -118,7 +118,7 @@ namespace Ewide.Core.Service.Area
|
||||
.Where(!string.IsNullOrEmpty(input.Name), a => a.Name.Contains(input.Name))
|
||||
.Where(!string.IsNullOrEmpty(input.Pcode), a => a.Code.StartsWith(input.Pcode))
|
||||
.ToPageData(input);
|
||||
return XnPageResult<SysAreaCode>.PageResult(AreaCodes);
|
||||
return PageDataResult<SysAreaCode>.PageResult(AreaCodes);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -7,7 +7,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace Ewide.Core.Service.Area.Dto
|
||||
{
|
||||
public class AreaCodeInput : XnInputBase
|
||||
public class AreaCodeInput : InputBase
|
||||
{
|
||||
public string Code { get; set; }
|
||||
public string AdCode { get; set; }
|
||||
|
||||
@@ -50,8 +50,8 @@ namespace Ewide.Core.Service.CodeGen
|
||||
var tableName = !string.IsNullOrEmpty(input.TableName?.Trim());
|
||||
var codeGens = await _sysCodeGenRep.DetachedEntities
|
||||
.Where((tableName, u => EF.Functions.Like(u.TableName, $"%{input.TableName.Trim()}%")))
|
||||
.ToPagedListAsync(input.PageNo, input.PageSize);
|
||||
return XnPageResult<SysCodeGen>.PageResult(codeGens);
|
||||
.ToPagedListAsync(input.PageIndex, input.PageSize);
|
||||
return PageDataResult<SysCodeGen>.PageResult(codeGens);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace Ewide.Core.Service
|
||||
/// <summary>
|
||||
/// 代码生成参数类
|
||||
/// </summary>
|
||||
public class CodeGenInput : XnInputBase
|
||||
public class CodeGenInput : InputBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 作者姓名
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ewide.Core.Service
|
||||
{
|
||||
public class XnCodeGenOutput
|
||||
{
|
||||
/// <summary>
|
||||
/// 作者姓名
|
||||
/// </summary>
|
||||
public string AuthorName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否移除表前缀
|
||||
/// </summary>
|
||||
public string TablePrefix { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生成方式
|
||||
/// </summary>
|
||||
public string GenerateType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据库表名
|
||||
/// </summary>
|
||||
public string TableName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据库表名(经过组装的)
|
||||
/// </summary>
|
||||
public string TableNameAss { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 代码包名
|
||||
/// </summary>
|
||||
public string PackageName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生成时间(string类型的)
|
||||
/// </summary>
|
||||
public string CreateTimestring { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据库表中字段集合
|
||||
/// </summary>
|
||||
public List<SysCodeGenConfig> ConfigList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 业务名
|
||||
/// </summary>
|
||||
public string BusName { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -44,7 +44,7 @@ namespace Ewide.Core.Service
|
||||
(groupCode, u => EF.Functions.Like(u.Code, $"%{input.GroupCode.Trim()}%")))
|
||||
.Where(u => u.Status != CommonStatus.DELETED).OrderBy(u => u.GroupCode)
|
||||
.ToPageData(input);
|
||||
return XnPageResult<SysConfig>.PageResult(configs);
|
||||
return PageDataResult<SysConfig>.PageResult(configs);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace Ewide.Core.Service
|
||||
//.Select(u => u.Adapt<DictDataOutput>())
|
||||
// .ToPagedListAsync(input.PageNo, input.PageSize)
|
||||
.ToPageData<SysDictData, DictDataOutput>(input);
|
||||
return XnPageResult<DictDataOutput>.PageResult(dictDatas);
|
||||
return PageDataResult<DictDataOutput>.PageResult(dictDatas);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace Ewide.Core.Service
|
||||
.Where(u => u.Status != CommonStatus.DELETED).OrderBy(u => u.Sort)
|
||||
//.ToPagedListAsync(input.PageNo, input.PageSize);
|
||||
.ToPageData(input);
|
||||
return XnPageResult<SysDictType>.PageResult(dictTypes);
|
||||
return PageDataResult<SysDictType>.PageResult(dictTypes);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -51,8 +51,8 @@ namespace Ewide.Core.Service
|
||||
.Where(fileBucket, u => EF.Functions.Like(u.FileBucket, $"%{input.FileBucket.Trim()}%"))
|
||||
.Where(fileOriginName, u => EF.Functions.Like(u.FileOriginName, $"%{input.FileOriginName.Trim()}%"))
|
||||
.Select(u => u.Adapt<FileOutput>())
|
||||
.ToPagedListAsync(input.PageNo, input.PageSize);
|
||||
return XnPageResult<FileOutput>.PageResult(files);
|
||||
.ToPagedListAsync(input.PageIndex, input.PageSize);
|
||||
return PageDataResult<FileOutput>.PageResult(files);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace Ewide.Core.Service
|
||||
.Where(searchBeginTime, u => u.OpTime >= DateTime.Parse(input.SearchBeginTime.Trim()) &&
|
||||
u.OpTime <= DateTime.Parse(input.SearchEndTime.Trim()))
|
||||
.ToPageData<SysLogOp, OpLogOutput>(input);
|
||||
return XnPageResult<OpLogOutput>.PageResult(opLogs);
|
||||
return PageDataResult<OpLogOutput>.PageResult(opLogs);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Ewide.Core.Service
|
||||
.Where(searchBeginTime, u => u.VisTime >= DateTime.Parse(input.SearchBeginTime.Trim()) &&
|
||||
u.VisTime <= DateTime.Parse(input.SearchEndTime.Trim()))
|
||||
.ToPageData<SysLogVis, VisLogOutput>(input);
|
||||
return XnPageResult<VisLogOutput>.PageResult(visLogs);
|
||||
return PageDataResult<VisLogOutput>.PageResult(visLogs);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -51,8 +51,8 @@ namespace Ewide.Core.Service.Notice
|
||||
EF.Functions.Like(u.Content, $"%{input.SearchValue.Trim()}%"))
|
||||
.Where(input.Type > 0, u => u.Type == input.Type)
|
||||
.Where(u => u.Status != (int)NoticeStatus.DELETED)
|
||||
.ToPagedListAsync(input.PageNo, input.PageSize);
|
||||
return XnPageResult<SysNotice>.PageResult(notices);
|
||||
.ToPagedListAsync(input.PageIndex, input.PageSize);
|
||||
return PageDataResult<SysNotice>.PageResult(notices);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -203,8 +203,8 @@ namespace Ewide.Core.Service.Notice
|
||||
.Where(input.Type > 0, u => u.u.Type == input.Type)
|
||||
.Where(u => u.u.Status != (int)NoticeStatus.DELETED)
|
||||
.Select(u => u.u.Adapt<NoticeReceiveOutput>())
|
||||
.ToPagedListAsync(input.PageNo, input.PageSize);
|
||||
return XnPageResult<NoticeReceiveOutput>.PageResult(notices);
|
||||
.ToPagedListAsync(input.PageIndex, input.PageSize);
|
||||
return PageDataResult<NoticeReceiveOutput>.PageResult(notices);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace Ewide.Core.Service
|
||||
/// <summary>
|
||||
/// 组织机构参数
|
||||
/// </summary>
|
||||
public class OrgInput : XnInputBase
|
||||
public class OrgInput : InputBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 父Id
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace Ewide.Core.Service
|
||||
.ToPageData<SysOrg,OrgOutput>(input);
|
||||
//.Select(u => u.Adapt<OrgOutput>())
|
||||
//.ToPagedListAsync(input.PageNo, input.PageSize);
|
||||
return XnPageResult<OrgOutput>.PageResult(orgs);
|
||||
return PageDataResult<OrgOutput>.PageResult(orgs);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace Ewide.Core.Service
|
||||
.Where(u => u.Status == CommonStatus.ENABLE).OrderBy(u => u.Sort)
|
||||
.ToPageData(input);
|
||||
//.ToPagedListAsync(input.PageNo, input.PageSize);
|
||||
return XnPageResult<SysPos>.PageResult(pos);
|
||||
return PageDataResult<SysPos>.PageResult(pos);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace Ewide.Core.Service
|
||||
/// <summary>
|
||||
/// 角色参数
|
||||
/// </summary>
|
||||
public class RoleInput : XnInputBase
|
||||
public class RoleInput : InputBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 名称
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace Ewide.Core.Service
|
||||
(code, u => EF.Functions.Like(u.Code, $"%{input.Code.Trim()}%")))
|
||||
.Where(u => u.Status == (int)CommonStatus.ENABLE).OrderBy(u => u.Sort)
|
||||
.ToPageData(input);
|
||||
return XnPageResult<SysRole>.PageResult(roles);
|
||||
return PageDataResult<SysRole>.PageResult(roles);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -38,8 +38,8 @@ namespace Ewide.Core.Service
|
||||
.Where((name, u => EF.Functions.Like(u.Name, $"%{input.Name.Trim()}%")),
|
||||
(host, u => EF.Functions.Like(u.Host, $"%{input.Host.Trim()}%")))
|
||||
.Select(u => u.Adapt<TenantOutput>())
|
||||
.ToPagedListAsync(input.PageNo, input.PageSize);
|
||||
return XnPageResult<TenantOutput>.PageResult(tenants);
|
||||
.ToPagedListAsync(input.PageIndex, input.PageSize);
|
||||
return PageDataResult<TenantOutput>.PageResult(tenants);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -40,13 +40,13 @@ namespace Ewide.Core.Service
|
||||
var timers = await _sysTimerRep.DetachedEntities
|
||||
.Where((jobName, u => EF.Functions.Like(u.JobName, $"%{input.JobName.Trim()}%")))
|
||||
.Select(u => u.Adapt<JobInput>())
|
||||
.ToPagedListAsync(input.PageNo, input.PageSize);
|
||||
.ToPagedListAsync(input.PageIndex, input.PageSize);
|
||||
|
||||
timers.Items.ToList().ForEach(u =>
|
||||
{
|
||||
u.DisplayState = jobList.Find(m => m.JobName == u.JobName)?.DisplayState;
|
||||
});
|
||||
return XnPageResult<JobInput>.PageResult(timers);
|
||||
return PageDataResult<JobInput>.PageResult(timers);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Ewide.Core.Service
|
||||
/// <summary>
|
||||
/// 用户参数
|
||||
/// </summary>
|
||||
public class UserInput : XnInputBase
|
||||
public class UserInput : InputBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 账号
|
||||
|
||||
@@ -62,6 +62,16 @@ namespace Ewide.Core.Service
|
||||
/// </summary>
|
||||
public virtual int Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 所在机构名称
|
||||
/// </summary>
|
||||
public virtual string OrgName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 角色名称
|
||||
/// </summary>
|
||||
public virtual string RoleName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 员工信息
|
||||
/// </summary>
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace Ewide.Core.Service
|
||||
.Where(input.SearchStatus >= 0, x => x.n.u.Status == input.SearchStatus)
|
||||
.Where(!superAdmin, x => x.n.u.AdminType != AdminType.SuperAdmin)
|
||||
.Where(!superAdmin && dataScopes.Count > 0, x => dataScopes.Contains(x.n.e.OrgId))
|
||||
.Select(u => u.n.u.Adapt<UserOutput>()).ToPagedListAsync(input.PageNo, input.PageSize);
|
||||
.Select(u => u.n.u.Adapt<UserOutput>()).ToPagedListAsync(input.PageIndex, input.PageSize);
|
||||
|
||||
//var emps = new List<Task<EmpOutput>>();
|
||||
//users.Items.ToList().ForEach(u =>
|
||||
@@ -81,7 +81,7 @@ namespace Ewide.Core.Service
|
||||
{
|
||||
user.SysEmpInfo = await _sysEmpService.GetEmpInfo(user.Id);
|
||||
}
|
||||
return XnPageResult<UserOutput>.PageResult(users);
|
||||
return PageDataResult<UserOutput>.PageResult(users);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user