爆肝,重构框架,你懂得

This commit is contained in:
chenchun
2023-01-01 23:06:11 +08:00
parent dbe020dc94
commit b9384afd5d
276 changed files with 5205 additions and 3281 deletions

View File

@@ -0,0 +1,14 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Yi.Framework.Common.Models;
using Yi.Framework.Interface.Base;
using Yi.Framework.Model.RABC.Entitys;
using Yi.Framework.Repository;
namespace Yi.Framework.Interface.RABC
{
public partial interface IConfigService:IBaseService<ConfigEntity>
{
Task<PageModel<List<ConfigEntity>>> SelctPageList(ConfigEntity config, PageParModel page);
}
}

View File

@@ -0,0 +1,26 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Yi.Framework.Interface.Base;
using Yi.Framework.Model.RABC.Entitys;
using Yi.Framework.Repository;
namespace Yi.Framework.Interface.RABC
{
public partial interface IDeptService:IBaseService<DeptEntity>
{
/// <summary>
/// 动态条件查询
/// </summary>
/// <param name="dept"></param>
/// <returns></returns>
Task<List<DeptEntity>> SelctGetList(DeptEntity dept);
/// <summary>
/// 根据角色id获取该角色的部门权限
/// </summary>
/// <param name="roleId"></param>
/// <returns></returns>
Task<List<DeptEntity>> GetListByRoleId(long roleId);
}
}

View File

@@ -0,0 +1,14 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Yi.Framework.Common.Models;
using Yi.Framework.Interface.Base;
using Yi.Framework.Model.RABC.Entitys;
using Yi.Framework.Repository;
namespace Yi.Framework.Interface.RABC
{
public partial interface IDictionaryInfoService:IBaseService<DictionaryInfoEntity>
{
Task<PageModel<List<DictionaryInfoEntity>>> SelctPageList(DictionaryInfoEntity dicInfo, PageParModel page);
}
}

View File

@@ -0,0 +1,20 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Yi.Framework.Common.Models;
using Yi.Framework.Interface.Base;
using Yi.Framework.Model.RABC.Entitys;
using Yi.Framework.Repository;
namespace Yi.Framework.Interface.RABC
{
public partial interface IDictionaryService:IBaseService<DictionaryEntity>
{
/// <summary>
/// 动态条件分页查询
/// </summary>
/// <param name="dic"></param>
/// <param name="page"></param>
/// <returns></returns>
Task<PageModel<List<DictionaryEntity>>> SelctPageList(DictionaryEntity dic, PageParModel page);
}
}

View File

@@ -0,0 +1,10 @@
using Yi.Framework.Interface.Base;
using Yi.Framework.Model.RABC.Entitys;
using Yi.Framework.Repository;
namespace Yi.Framework.Interface.RABC
{
public partial interface IFileService : IBaseService<FileEntity>
{
}
}

View File

@@ -0,0 +1,14 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Yi.Framework.Interface.Base;
using Yi.Framework.Model.RABC.Entitys;
using Yi.Framework.Repository;
namespace Yi.Framework.Interface.RABC
{
public partial interface ILogService:IBaseService<LogEntity>
{
Task<List<long>> AddListTest(List<LogEntity> logEntities);
Task<List<LogEntity>> GetListTest();
}
}

View File

@@ -0,0 +1,14 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Yi.Framework.Common.Models;
using Yi.Framework.Interface.Base;
using Yi.Framework.Model.RABC.Entitys;
using Yi.Framework.Repository;
namespace Yi.Framework.Interface.RABC
{
public partial interface ILoginLogService : IBaseService<LoginLogEntity>
{
Task<PageModel<List<LoginLogEntity>>> SelctPageList(LoginLogEntity loginLog, PageParModel page);
}
}

View File

@@ -0,0 +1,21 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Yi.Framework.Interface.Base;
using Yi.Framework.Model.RABC.Entitys;
using Yi.Framework.Repository;
namespace Yi.Framework.Interface.RABC
{
public partial interface IMenuService:IBaseService<MenuEntity>
{
Task<List<MenuEntity>> GetMenuTreeAsync();
Task<List<MenuEntity>> SelctGetList(MenuEntity menu);
/// <summary>
/// 获取该角色id下的所有菜单
/// </summary>
/// <param name="roleId"></param>
/// <returns></returns>
Task<List<MenuEntity>> GetListByRoleId(long roleId);
}
}

View File

@@ -0,0 +1,14 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Yi.Framework.Common.Models;
using Yi.Framework.Interface.Base;
using Yi.Framework.Model.RABC.Entitys;
using Yi.Framework.Repository;
namespace Yi.Framework.Interface.RABC
{
public partial interface IOperationLogService : IBaseService<OperationLogEntity>
{
Task<PageModel<List<OperationLogEntity>>> SelctPageList(OperationLogEntity operationLog, PageParModel page);
}
}

View File

@@ -0,0 +1,20 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Yi.Framework.Common.Models;
using Yi.Framework.Interface.Base;
using Yi.Framework.Model.RABC.Entitys;
using Yi.Framework.Repository;
namespace Yi.Framework.Interface.RABC
{
public partial interface IPostService:IBaseService<PostEntity>
{
/// <summary>
/// 动态条件分页查询
/// </summary>
/// <param name="post"></param>
/// <param name="page"></param>
/// <returns></returns>
Task<PageModel<List<PostEntity>>> SelctPageList(PostEntity post, PageParModel page);
}
}

View File

@@ -0,0 +1,10 @@
using Yi.Framework.Interface.Base;
using Yi.Framework.Model.RABC.Entitys;
using Yi.Framework.Repository;
namespace Yi.Framework.Interface.RABC
{
public partial interface IRoleDeptService : IBaseService<RoleDeptEntity>
{
}
}

View File

@@ -0,0 +1,10 @@
using Yi.Framework.Interface.Base;
using Yi.Framework.Model.RABC.Entitys;
using Yi.Framework.Repository;
namespace Yi.Framework.Interface.RABC
{
public partial interface IRoleMenuService : IBaseService<RoleMenuEntity>
{
}
}

View File

@@ -0,0 +1,78 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Yi.Framework.Common.Models;
using Yi.Framework.DTOModel;
using Yi.Framework.Interface.Base;
using Yi.Framework.Model.RABC.Entitys;
using Yi.Framework.Repository;
namespace Yi.Framework.Interface.RABC
{
public partial interface IRoleService:IBaseService<RoleEntity>
{
/// <summary>
/// DbTest
/// </summary>
/// <returns></returns>
Task<List<RoleEntity>> DbTest();
/// <summary>
/// 工作单元测试
/// </summary>
/// <returns></returns>
Task<bool> UowTest();
/// <summary>
/// 通过角色id获取角色实体包含菜单
/// </summary>
/// <param name="roleId"></param>
/// <returns></returns>
Task<RoleEntity> GetInMenuByRoleId(long roleId);
/// <summary>
/// 给角色设置菜单,多角色,多菜单
/// </summary>
/// <param name="roleIds"></param>
/// <param name="menuIds"></param>
/// <returns></returns>
Task<bool> GiveRoleSetMenu(List<long> roleIds, List<long> menuIds);
/// <summary>
/// 动态条件分页查询
/// </summary>
/// <param name="role"></param>
/// <param name="page"></param>
/// <returns></returns>
Task<PageModel<List<RoleEntity>>> SelctPageList(RoleEntity role, PageParModel page);
/// <summary>
/// 添加角色关联菜单
/// </summary>
/// <param name="roleDto"></param>
/// <returns></returns>
Task<bool> AddInfo(RoleInfoDto roleDto);
/// <summary>
/// 更新角色关联菜单
/// </summary>
/// <param name="roleDto"></param>
/// <returns></returns>
Task<bool> UpdateInfo(RoleInfoDto roleDto);
/// <summary>
/// 给角色设置部门
/// </summary>
/// <param name="roleIds"></param>
/// <param name="deptIds"></param>
/// <returns></returns>
Task<bool> GiveRoleSetDept(List<long> roleIds, List<long> deptIds);
/// <summary>
/// 更新角色数据权限
/// </summary>
/// <param name="roleDto"></param>
/// <returns></returns>
Task<bool> UpdateDataScpoce(RoleInfoDto roleDto);
}
}

View File

@@ -0,0 +1,10 @@
using Yi.Framework.Interface.Base;
using Yi.Framework.Model.RABC.Entitys;
using Yi.Framework.Repository;
namespace Yi.Framework.Interface.RABC
{
public partial interface ITenantService : IBaseService<TenantEntity>
{
}
}

View File

@@ -0,0 +1,10 @@
using Yi.Framework.Interface.Base;
using Yi.Framework.Model.RABC.Entitys;
using Yi.Framework.Repository;
namespace Yi.Framework.Interface.RABC
{
public partial interface IUserPostService : IBaseService<UserPostEntity>
{
}
}

View File

@@ -0,0 +1,10 @@
using Yi.Framework.Interface.Base;
using Yi.Framework.Model.RABC.Entitys;
using Yi.Framework.Repository;
namespace Yi.Framework.Interface.RABC
{
public partial interface IUserRoleService : IBaseService<UserRoleEntity>
{
}
}

View File

@@ -0,0 +1,129 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using System;
using Yi.Framework.Common.Models;
using Yi.Framework.DTOModel;
using Yi.Framework.Interface.Base;
using Yi.Framework.Model.RABC.Entitys;
using Yi.Framework.Repository;
namespace Yi.Framework.Interface.RABC
{
public partial interface IUserService:IBaseService<UserEntity>
{
/// <summary>
/// 关联角色测试
/// </summary>
/// <returns></returns>
Task<List<UserEntity>> GetListInRole();
/// <summary>
/// 测试仓储的上下文对象
/// </summary>
/// <returns></returns>
Task<List<UserEntity>> DbTest();
/// <summary>
/// 登录方法
/// </summary>
/// <param name="userName"></param>
/// <param name="password"></param>
/// <param name="userAction"></param>
/// <returns></returns>
Task<bool> Login(string userName, string password, Action<UserEntity> userAction = null);
/// <summary>
/// 注册方法
/// </summary>
/// <param name="userEntity"></param>
/// <param name="userAction"></param>
/// <returns></returns>
Task<bool> Register(UserEntity userEntity, Action<UserEntity> userAction = null);
/// <summary>
/// 导航属性关联角色、部门、岗位
/// </summary>
/// <returns></returns>
Task<UserEntity> GetInfoById(long userId);
/// <summary>
/// 给用户设置角色,多用户,多角色
/// </summary>
/// <param name="userIds"></param>
/// <param name="roleIds"></param>
/// <returns></returns>
Task<bool> GiveUserSetRole(List<long> userIds, List<long> roleIds);
/// <summary>
/// 判断用户名是否存在,如果存在可返回该用户
/// </summary>
/// <param name="userName"></param>
/// <param name="userAction"></param>
/// <returns></returns>
Task<bool> Exist(string userName, Action<UserEntity> userAction = null);
/// <summary>
/// 获取当前登录用户的所有信息
/// </summary>
/// <param name="userId"></param>
/// <returns></returns>
Task<UserRoleMenuDto> GetUserAllInfo(long userId);
/// <summary>
/// 动态条件分页查询
/// </summary>
/// <param name="user"></param>
/// <param name="page"></param>
/// <returns></returns>
Task<PageModel<List<UserEntity>>> SelctPageList(UserEntity user, PageParModel page, long? deptId);
/// <summary>
/// 更新用户信息
/// </summary>
/// <param name="userDto"></param>
/// <returns></returns>
Task<bool> UpdateInfo(UserInfoDto userDto);
/// <summary>
/// 添加用户信息
/// </summary>
/// <param name="userDto"></param>
/// <returns></returns>
Task<bool> AddInfo(UserInfoDto userDto);
/// <summary>
/// 重置密码
/// </summary>
/// <param name="userId"></param>
/// <param name="password"></param>
/// <returns></returns>
Task<bool> RestPassword(long userId, string password);
/// <summary>
/// 给用户设置岗位
/// </summary>
/// <param name="userIds"></param>
/// <param name="postIds"></param>
/// <returns></returns>
Task<bool> GiveUserSetPost(List<long> userIds, List<long> postIds);
/// <summary>
/// 更新密码
/// </summary>
/// <param name="dto"></param>
/// <param name="userId"></param>
/// <returns></returns>
Task<bool> UpdatePassword(UpdatePasswordDto dto, long userId);
/// <summary>
/// 个人中心信息更新
/// </summary>
/// <param name="userDto"></param>
/// <returns></returns>
Task<bool> UpdateProfile(UserInfoDto userDto);
}
}