油漆
This commit is contained in:
14
server/ZR.Service/System/IService/IArticleCategoryService.cs
Normal file
14
server/ZR.Service/System/IService/IArticleCategoryService.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System.Collections.Generic;
|
||||
using ZR.Model;
|
||||
using ZR.Model.Dto;
|
||||
using ZR.Model.System;
|
||||
|
||||
namespace ZR.Service.System.IService
|
||||
{
|
||||
public interface IArticleCategoryService : IBaseService<ArticleCategory>
|
||||
{
|
||||
PagedInfo<ArticleCategory> GetList(ArticleCategoryQueryDto parm);
|
||||
List<ArticleCategory> GetTreeList(ArticleCategoryQueryDto parm);
|
||||
int AddArticleCategory(ArticleCategory parm);
|
||||
}
|
||||
}
|
||||
18
server/ZR.Service/System/IService/IArticleService.cs
Normal file
18
server/ZR.Service/System/IService/IArticleService.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using ZR.Model;
|
||||
using ZR.Model.System;
|
||||
using ZR.Model.System.Dto;
|
||||
|
||||
namespace ZR.Service.System.IService
|
||||
{
|
||||
public interface IArticleService : IBaseService<Article>
|
||||
{
|
||||
PagedInfo<ArticleDto> GetList(ArticleQueryDto parm);
|
||||
PagedInfo<ArticleDto> GetMyList(ArticleQueryDto parm);
|
||||
/// <summary>
|
||||
/// 修改文章管理
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public int UpdateArticle(Article model);
|
||||
}
|
||||
}
|
||||
26
server/ZR.Service/System/IService/ICommonLangService.cs
Normal file
26
server/ZR.Service/System/IService/ICommonLangService.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using ZR.Model;
|
||||
using ZR.Model.Dto;
|
||||
using ZR.Model.Models;
|
||||
using System.Collections.Generic;
|
||||
using JinianNet.JNTemplate;
|
||||
|
||||
namespace ZR.Service.System.IService
|
||||
{
|
||||
/// <summary>
|
||||
/// 多语言配置service接口
|
||||
///
|
||||
/// @author zr
|
||||
/// @date 2022-05-06
|
||||
/// </summary>
|
||||
public interface ICommonLangService : IBaseService<CommonLang>
|
||||
{
|
||||
PagedInfo<CommonLang> GetList(CommonLangQueryDto parm);
|
||||
List<CommonLang> GetLangList(CommonLangQueryDto parm);
|
||||
dynamic GetListToPivot(CommonLangQueryDto parm);
|
||||
void StorageCommonLang(CommonLangDto parm);
|
||||
Dictionary<string, object> SetLang(List<CommonLang> msgList);
|
||||
|
||||
(string, object, object) ImportCommonLang(List<CommonLang> list);
|
||||
}
|
||||
}
|
||||
33
server/ZR.Service/System/IService/IGenTableService.cs
Normal file
33
server/ZR.Service/System/IService/IGenTableService.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using SqlSugar;
|
||||
using System.Collections.Generic;
|
||||
using ZR.Model;
|
||||
using ZR.Model.System.Generate;
|
||||
|
||||
namespace ZR.Service.System.IService
|
||||
{
|
||||
public interface IGenTableService : IBaseService<GenTable>
|
||||
{
|
||||
List<GenTable> SelectDbTableListByNamess(string[] tableNames);
|
||||
|
||||
int ImportGenTable(GenTable tables);
|
||||
|
||||
int DeleteGenTableByIds(long[] tableIds);
|
||||
int DeleteGenTableByTbName(string tableName);
|
||||
PagedInfo<GenTable> GetGenTables(GenTable genTable, PagerInfo pagerInfo);
|
||||
GenTable GetGenTableInfo(long tableId);
|
||||
bool SynchDb(long tableId, GenTable genTable, List<GenTableColumn> genTableColumns);
|
||||
List<GenTable> GetGenTableAll();
|
||||
int UpdateGenTable(GenTable genTable);
|
||||
}
|
||||
|
||||
public interface IGenTableColumnService : IBaseService<GenTableColumn>
|
||||
{
|
||||
int InsertGenTableColumn(List<GenTableColumn> tableColumn);
|
||||
|
||||
int DeleteGenTableColumn(long tableId);
|
||||
int DeleteGenTableColumn(long[] tableIds);
|
||||
int DeleteGenTableColumnByTableName(string tableName);
|
||||
List<GenTableColumn> GenTableColumns(long tableId);
|
||||
int UpdateGenTableColumn(List<GenTableColumn> tableColumn);
|
||||
}
|
||||
}
|
||||
16
server/ZR.Service/System/IService/ISysConfigService.cs
Normal file
16
server/ZR.Service/System/IService/ISysConfigService.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using ZR.Model.System;
|
||||
|
||||
namespace ZR.Service.System.IService
|
||||
{
|
||||
/// <summary>
|
||||
/// 参数配置service接口
|
||||
///
|
||||
/// @author mr.zhao
|
||||
/// @date 2021-09-29
|
||||
/// </summary>
|
||||
public interface ISysConfigService : IBaseService<SysConfig>
|
||||
{
|
||||
SysConfig GetSysConfigByKey(string key);
|
||||
}
|
||||
}
|
||||
29
server/ZR.Service/System/IService/ISysDeptService.cs
Normal file
29
server/ZR.Service/System/IService/ISysDeptService.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System.Collections.Generic;
|
||||
using ZR.Model.System;
|
||||
using ZR.Model.System.Dto;
|
||||
using ZR.Model.System.Vo;
|
||||
|
||||
namespace ZR.Service.System.IService
|
||||
{
|
||||
public interface ISysDeptService : IBaseService<SysDept>
|
||||
{
|
||||
List<SysDept> GetSysDepts(SysDeptQueryDto dept);
|
||||
string CheckDeptNameUnique(SysDept dept);
|
||||
int InsertDept(SysDept dept);
|
||||
int UpdateDept(SysDept dept);
|
||||
void UpdateDeptChildren(long deptId, string newAncestors, string oldAncestors);
|
||||
List<SysDept> GetChildrenDepts(List<SysDept> depts, long deptId);
|
||||
List<SysDept> BuildDeptTree(List<SysDept> depts);
|
||||
List<TreeSelectVo> BuildDeptTreeSelect(List<SysDept> depts);
|
||||
List<SysRoleDept> SelectRoleDeptByRoleId(long roleId);
|
||||
|
||||
List<long> SelectRoleDepts(long roleId);
|
||||
bool DeleteRoleDeptByRoleId(long roleId);
|
||||
int InsertRoleDepts(SysRole role);
|
||||
}
|
||||
|
||||
public interface ISysRoleDeptService : IBaseService<SysRoleDept>
|
||||
{
|
||||
List<SysRoleDept> SelectRoleDeptByRoleId(long roleId);
|
||||
}
|
||||
}
|
||||
19
server/ZR.Service/System/IService/ISysDictDataService.cs
Normal file
19
server/ZR.Service/System/IService/ISysDictDataService.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System.Collections.Generic;
|
||||
using ZR.Model;
|
||||
using ZR.Model.System;
|
||||
|
||||
namespace ZR.Service.System.IService
|
||||
{
|
||||
public interface ISysDictDataService : IBaseService<SysDictData>
|
||||
{
|
||||
public PagedInfo<SysDictData> SelectDictDataList(SysDictData dictData, PagerInfo pagerInfo);
|
||||
public List<SysDictData> SelectDictDataByType(string dictType);
|
||||
public List<SysDictData> SelectDictDataByTypes(string[] dictTypes);
|
||||
public SysDictData SelectDictDataById(long dictCode);
|
||||
public long InsertDictData(SysDictData dict);
|
||||
public long UpdateDictData(SysDictData dict);
|
||||
public int DeleteDictDataByIds(long[] dictCodes);
|
||||
int UpdateDictDataType(string old_dictType, string new_dictType);
|
||||
List<SysDictData> SelectDictDataByCustomSql(SysDictType sysDictType);
|
||||
}
|
||||
}
|
||||
53
server/ZR.Service/System/IService/ISysDictService.cs
Normal file
53
server/ZR.Service/System/IService/ISysDictService.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using ZR.Model;
|
||||
using ZR.Model.System;
|
||||
|
||||
namespace ZR.Service.System.IService
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public interface ISysDictService
|
||||
{
|
||||
public List<SysDictType> GetAll();
|
||||
public PagedInfo<SysDictType> SelectDictTypeList(SysDictType dictType, Model.PagerInfo pager);
|
||||
|
||||
/// <summary>
|
||||
/// 校验字典类型称是否唯一
|
||||
/// </summary>
|
||||
/// <param name="dictType">字典类型</param>
|
||||
/// <returns></returns>
|
||||
public string CheckDictTypeUnique(SysDictType dictType);
|
||||
|
||||
/// <summary>
|
||||
/// 批量删除字典数据信息
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
public int DeleteDictTypeByIds(long[] dictIds);
|
||||
|
||||
/// <summary>
|
||||
/// 插入字典类型
|
||||
/// </summary>
|
||||
/// <param name="sysDictType"></param>
|
||||
/// <returns></returns>
|
||||
public long InsertDictType(SysDictType sysDictType);
|
||||
|
||||
/// <summary>
|
||||
/// 修改字典类型
|
||||
/// </summary>
|
||||
/// <param name="sysDictType"></param>
|
||||
/// <returns></returns>
|
||||
public int UpdateDictType(SysDictType sysDictType);
|
||||
|
||||
/// <summary>
|
||||
/// 获取字典信息
|
||||
/// </summary>
|
||||
/// <param name="dictId"></param>
|
||||
/// <returns></returns>
|
||||
SysDictType GetInfo(long dictId);
|
||||
|
||||
List<SysDictData> SelectDictDataByCustomSql(string dictType);
|
||||
}
|
||||
}
|
||||
40
server/ZR.Service/System/IService/ISysFileService.cs
Normal file
40
server/ZR.Service/System/IService/ISysFileService.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using Infrastructure.Attribute;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using System.Threading.Tasks;
|
||||
using ZR.Model.Models;
|
||||
using ZR.Model.System;
|
||||
|
||||
namespace ZR.Service.System.IService
|
||||
{
|
||||
public interface ISysFileService : IBaseService<SysFile>
|
||||
{
|
||||
Task<long> InsertFile(SysFile file);
|
||||
|
||||
/// <summary>
|
||||
/// 上传文件
|
||||
/// </summary>
|
||||
/// <param name="fileDir"></param>
|
||||
/// <param name="fileName"></param>
|
||||
/// <param name="formFile"></param>
|
||||
/// <param name="rootPath"></param>
|
||||
/// <param name="userName"></param>
|
||||
/// <returns>文件对象</returns>
|
||||
Task<SysFile> SaveFileToLocal(string rootPath, string fileName, string fileDir, string userName, IFormFile formFile);
|
||||
|
||||
Task<SysFile> SaveFileToAliyun(SysFile file, IFormFile formFile);
|
||||
/// <summary>
|
||||
/// 按时间来创建文件夹
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="byTimeStore"></param>
|
||||
/// <returns>eg: 2020/11/3</returns>
|
||||
string GetdirPath(string path = "", bool byTimeStore = true);
|
||||
|
||||
/// <summary>
|
||||
/// 取文件名的MD5值(16位)
|
||||
/// </summary>
|
||||
/// <param name="str">文件名,不包括扩展名</param>
|
||||
/// <returns></returns>
|
||||
string HashFileName(string str = null);
|
||||
}
|
||||
}
|
||||
47
server/ZR.Service/System/IService/ISysLoginService.cs
Normal file
47
server/ZR.Service/System/IService/ISysLoginService.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using ZR.Model;
|
||||
using ZR.Model.System.Dto;
|
||||
using ZR.Model.System;
|
||||
|
||||
namespace ZR.Service.System.IService
|
||||
{
|
||||
public interface ISysLoginService: IBaseService<SysLogininfor>
|
||||
{
|
||||
/// <summary>
|
||||
/// 登录
|
||||
/// </summary>
|
||||
/// <param name="loginBody"></param>
|
||||
/// <param name="logininfor"></param>
|
||||
/// <returns></returns>
|
||||
public SysUser Login(LoginBodyDto loginBody, SysLogininfor logininfor);
|
||||
|
||||
/// <summary>
|
||||
/// 查询操作日志
|
||||
/// </summary>
|
||||
/// <param name="logininfoDto"></param>
|
||||
/// <param name="pager">分页</param>
|
||||
/// <returns></returns>
|
||||
public PagedInfo<SysLogininfor> GetLoginLog(SysLogininfor logininfoDto, PagerInfo pager);
|
||||
|
||||
/// <summary>
|
||||
/// 记录登录日志
|
||||
/// </summary>
|
||||
/// <param name="sysLogininfor"></param>
|
||||
/// <returns></returns>
|
||||
public void AddLoginInfo(SysLogininfor sysLogininfor);
|
||||
|
||||
/// <summary>
|
||||
/// 清空登录日志
|
||||
/// </summary>
|
||||
public void TruncateLogininfo();
|
||||
|
||||
/// <summary>
|
||||
/// 删除登录日志
|
||||
/// </summary>
|
||||
/// <param name="ids"></param>
|
||||
/// <returns></returns>
|
||||
public int DeleteLogininforByIds(long[] ids);
|
||||
}
|
||||
}
|
||||
89
server/ZR.Service/System/IService/ISysMenuService.cs
Normal file
89
server/ZR.Service/System/IService/ISysMenuService.cs
Normal file
@@ -0,0 +1,89 @@
|
||||
using System.Collections.Generic;
|
||||
using ZR.Model.System.Dto;
|
||||
using ZR.Model.System;
|
||||
using ZR.Model.System.Vo;
|
||||
using ZR.Model.System.Generate;
|
||||
|
||||
namespace ZR.Service.System.IService
|
||||
{
|
||||
public interface ISysMenuService : IBaseService<SysMenu>
|
||||
{
|
||||
//List<SysMenu> SelectMenuList(long userId);
|
||||
|
||||
List<SysMenu> SelectMenuList(MenuQueryDto menu, long userId);
|
||||
List<SysMenu> SelectTreeMenuList(MenuQueryDto menu, long userId);
|
||||
|
||||
SysMenu GetMenuByMenuId(int menuId);
|
||||
List<SysMenu> GetMenusByMenuId(int menuId, long userId);
|
||||
long AddMenu(SysMenu menu);
|
||||
|
||||
long EditMenu(SysMenu menu);
|
||||
|
||||
int DeleteMenuById(int menuId);
|
||||
|
||||
string CheckMenuNameUnique(SysMenu menu);
|
||||
|
||||
int ChangeSortMenu(MenuDto menuDto);
|
||||
|
||||
bool HasChildByMenuId(long menuId);
|
||||
|
||||
List<SysMenu> SelectMenuTreeByUserId(long userId);
|
||||
|
||||
//List<SysMenu> SelectMenuPermsListByUserId(long userId);
|
||||
|
||||
List<string> SelectMenuPermsByUserId(long userId);
|
||||
|
||||
//bool CheckMenuExistRole(long menuId);
|
||||
|
||||
List<RouterVo> BuildMenus(List<SysMenu> menus);
|
||||
|
||||
List<TreeSelectVo> BuildMenuTreeSelect(List<SysMenu> menus);
|
||||
|
||||
void AddSysMenu(GenTable genTableInfo, string permPrefix, bool showEdit, bool showExport, bool showImport);
|
||||
List<SysMenu> SelectTreeMenuListByRoles(MenuQueryDto menu, List<long> roles);
|
||||
List<RoleMenuExportDto> SelectRoleMenuListByRole(MenuQueryDto menu, int roleId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 角色菜单
|
||||
/// </summary>
|
||||
public interface ISysRoleMenuService : IBaseService<SysRoleMenu>
|
||||
{
|
||||
bool CheckMenuExistRole(long menuId);
|
||||
/// <summary>
|
||||
/// 根据角色获取菜单id
|
||||
/// </summary>
|
||||
/// <param name="roleId"></param>
|
||||
/// <returns></returns>
|
||||
List<SysRoleMenu> SelectRoleMenuByRoleId(long roleId);
|
||||
|
||||
/// <summary>
|
||||
/// 根据用户所有角色获取菜单
|
||||
/// </summary>
|
||||
/// <param name="roleIds"></param>
|
||||
/// <returns></returns>
|
||||
List<SysRoleMenu> SelectRoleMenuByRoleIds(long[] roleIds);
|
||||
|
||||
/// <summary>
|
||||
/// 批量插入用户菜单
|
||||
/// </summary>
|
||||
/// <param name="sysRoleMenus"></param>
|
||||
/// <returns></returns>
|
||||
int AddRoleMenu(List<SysRoleMenu> sysRoleMenus);
|
||||
|
||||
/// <summary>
|
||||
/// 删除角色与菜单关联
|
||||
/// </summary>
|
||||
/// <param name="roleId"></param>
|
||||
/// <returns></returns>
|
||||
int DeleteRoleMenuByRoleId(long roleId);
|
||||
|
||||
/// <summary>
|
||||
/// 删除角色指定菜单
|
||||
/// </summary>
|
||||
/// <param name="roleId"></param>
|
||||
/// <param name="menuIds"></param>
|
||||
/// <returns></returns>
|
||||
bool DeleteRoleMenuByRoleIdMenuIds(long roleId, long[] menuIds);
|
||||
}
|
||||
}
|
||||
20
server/ZR.Service/System/IService/ISysNoticeService.cs
Normal file
20
server/ZR.Service/System/IService/ISysNoticeService.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System.Collections.Generic;
|
||||
using ZR.Model;
|
||||
using ZR.Model.System;
|
||||
using ZR.Model.System.Dto;
|
||||
|
||||
namespace ZR.Service.System.IService
|
||||
{
|
||||
/// <summary>
|
||||
/// 通知公告表service接口
|
||||
///
|
||||
/// @author zr
|
||||
/// @date 2021-12-15
|
||||
/// </summary>
|
||||
public interface ISysNoticeService : IBaseService<SysNotice>
|
||||
{
|
||||
List<SysNotice> GetSysNotices();
|
||||
|
||||
PagedInfo<SysNotice> GetPageList(SysNoticeQueryDto parm);
|
||||
}
|
||||
}
|
||||
37
server/ZR.Service/System/IService/ISysOperLogService.cs
Normal file
37
server/ZR.Service/System/IService/ISysOperLogService.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using ZR.Model;
|
||||
using ZR.Model.System;
|
||||
using ZR.Model.System.Dto;
|
||||
|
||||
namespace ZR.Service.System.IService
|
||||
{
|
||||
public interface ISysOperLogService
|
||||
{
|
||||
public void InsertOperlog(SysOperLog operLog);
|
||||
|
||||
/// <summary>
|
||||
/// 查询系统操作日志集合
|
||||
/// </summary>
|
||||
/// <param name="operLog">操作日志对象</param>
|
||||
/// <returns>操作日志集合</returns>
|
||||
public PagedInfo<SysOperLog> SelectOperLogList(SysOperLogQueryDto operLog);
|
||||
|
||||
/// <summary>
|
||||
/// 清空操作日志
|
||||
/// </summary>
|
||||
public void CleanOperLog();
|
||||
|
||||
/// <summary>
|
||||
/// 批量删除系统操作日志
|
||||
/// </summary>
|
||||
/// <param name="operIds">需要删除的操作日志ID</param>
|
||||
/// <returns>结果</returns>
|
||||
public int DeleteOperLogByIds(long[] operIds);
|
||||
|
||||
/// <summary>
|
||||
/// 查询操作日志详细
|
||||
/// </summary>
|
||||
/// <param name="operId">操作ID</param>
|
||||
/// <returns>操作日志对象</returns>
|
||||
public SysOperLog SelectOperLogById(long operId);
|
||||
}
|
||||
}
|
||||
15
server/ZR.Service/System/IService/ISysPermissionService.cs
Normal file
15
server/ZR.Service/System/IService/ISysPermissionService.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using ZR.Model.System;
|
||||
|
||||
namespace ZR.Service.System.IService
|
||||
{
|
||||
public interface ISysPermissionService
|
||||
{
|
||||
public List<string> GetRolePermission(SysUser user);
|
||||
public List<string> GetMenuPermission(SysUser user);
|
||||
}
|
||||
}
|
||||
15
server/ZR.Service/System/IService/ISysPostService.cs
Normal file
15
server/ZR.Service/System/IService/ISysPostService.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using ZR.Model.System;
|
||||
using ZR.Repository;
|
||||
|
||||
namespace ZR.Service.System.IService
|
||||
{
|
||||
public interface ISysPostService : IBaseService<SysPost>
|
||||
{
|
||||
string CheckPostNameUnique(SysPost sysPost);
|
||||
string CheckPostCodeUnique(SysPost sysPost);
|
||||
List<SysPost> GetAll();
|
||||
}
|
||||
}
|
||||
144
server/ZR.Service/System/IService/ISysRoleService.cs
Normal file
144
server/ZR.Service/System/IService/ISysRoleService.cs
Normal file
@@ -0,0 +1,144 @@
|
||||
using System.Collections.Generic;
|
||||
using ZR.Model;
|
||||
using ZR.Model.System;
|
||||
using ZR.Model.System.Dto;
|
||||
|
||||
namespace ZR.Service.System.IService
|
||||
{
|
||||
public interface ISysRoleService : IBaseService<SysRole>
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据条件分页查询角色数据
|
||||
/// </summary>
|
||||
/// <param name="role">角色信息</param>
|
||||
/// <param name="pager"></param>
|
||||
/// <returns>角色数据集合信息</returns>
|
||||
public PagedInfo<SysRole> SelectRoleList(SysRole role, PagerInfo pager);
|
||||
|
||||
/// <summary>
|
||||
/// 查询所有角色
|
||||
/// </summary>
|
||||
/// <param name="role"></param>
|
||||
/// <returns></returns>
|
||||
public List<SysRole> SelectRoleAll();
|
||||
|
||||
/// <summary>
|
||||
/// 根据用户查询
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public List<SysRole> SelectRolePermissionByUserId(long userId);
|
||||
|
||||
/// <summary>
|
||||
/// 通过角色ID查询角色
|
||||
/// </summary>
|
||||
/// <param name="roleId">角色ID</param>
|
||||
/// <returns>角色对象信息</returns>
|
||||
public SysRole SelectRoleById(long roleId);
|
||||
|
||||
/// <summary>
|
||||
/// 批量删除角色信息
|
||||
/// </summary>
|
||||
/// <param name="roleIds">需要删除的角色ID</param>
|
||||
/// <returns></returns>
|
||||
public int DeleteRoleByRoleId(long[] roleIds);
|
||||
|
||||
/// <summary>
|
||||
/// 更改角色权限状态
|
||||
/// </summary>
|
||||
/// <param name="roleDto"></param>
|
||||
/// <returns></returns>
|
||||
public int UpdateRoleStatus(SysRole roleDto);
|
||||
|
||||
/// <summary>
|
||||
/// 校验角色权限是否唯一
|
||||
/// </summary>
|
||||
/// <param name="sysRole">角色信息</param>
|
||||
/// <returns></returns>
|
||||
public string CheckRoleKeyUnique(SysRole sysRole);
|
||||
|
||||
/// <summary>
|
||||
/// 校验角色是否允许操作
|
||||
/// </summary>
|
||||
/// <param name="role"></param>
|
||||
public void CheckRoleAllowed(SysRole role);
|
||||
|
||||
/// <summary>
|
||||
/// 新增保存角色信息
|
||||
/// </summary>
|
||||
/// <param name="sysRole">角色信息</param>
|
||||
/// <returns></returns>
|
||||
public long InsertRole(SysRole sysRole);
|
||||
|
||||
/// <summary>
|
||||
/// 通过角色ID删除角色和菜单关联
|
||||
/// </summary>
|
||||
/// <param name="roleId">角色ID</param>
|
||||
/// <returns></returns>
|
||||
public int DeleteRoleMenuByRoleId(long roleId);
|
||||
|
||||
/// <summary>
|
||||
/// 授权数据范围
|
||||
/// </summary>
|
||||
/// <param name="role"></param>
|
||||
/// <returns></returns>
|
||||
bool AuthDataScope(SysRoleDto role);
|
||||
#region Service
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 新增角色菜单信息
|
||||
/// </summary>
|
||||
/// <param name="sysRoleDto"></param>
|
||||
/// <returns></returns>
|
||||
public int InsertRoleMenu(SysRoleDto sysRoleDto);
|
||||
|
||||
/// <summary>
|
||||
/// 判断是否是管理员
|
||||
/// </summary>
|
||||
/// <param name="userid"></param>
|
||||
/// <returns></returns>
|
||||
public bool IsAdmin(long userid);
|
||||
|
||||
/// <summary>
|
||||
/// 获取角色菜单id集合
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public List<long> SelectUserRoleMenus(long roleId);
|
||||
List<long> SelectRoleMenuByRoleIds(long[] roleIds);
|
||||
/// <summary>
|
||||
/// 获取用户角色列表
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public List<SysRole> SelectUserRoleListByUserId(long userId);
|
||||
|
||||
/// <summary>
|
||||
/// 获取用户权限集合
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public List<long> SelectUserRoles(long userId);
|
||||
|
||||
/// <summary>
|
||||
/// 获取用户权限字符串集合
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public List<string> SelectUserRoleKeys(long userId);
|
||||
|
||||
public List<string> SelectUserRoleNames(long userId);
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 修改保存角色信息
|
||||
/// </summary>
|
||||
/// <param name="sysRole">角色信息</param>
|
||||
/// <returns></returns>
|
||||
public int UpdateRole(SysRole sysRole);
|
||||
|
||||
int UpdateSysRole(SysRole sysRole);
|
||||
}
|
||||
}
|
||||
16
server/ZR.Service/System/IService/ISysTasksLogService.cs
Normal file
16
server/ZR.Service/System/IService/ISysTasksLogService.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System.Threading.Tasks;
|
||||
using ZR.Model.System;
|
||||
using ZR.Repository;
|
||||
|
||||
namespace ZR.Service.System.IService
|
||||
{
|
||||
public interface ISysTasksLogService : IBaseService<SysTasksLog>
|
||||
{
|
||||
/// <summary>
|
||||
/// 记录任务执行日志
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
//public int AddTaskLog(string jobId);
|
||||
Task<SysTasksLog> AddTaskLog(string jobId, SysTasksLog tasksLog);
|
||||
}
|
||||
}
|
||||
14
server/ZR.Service/System/IService/ISysTasksQzService.cs
Normal file
14
server/ZR.Service/System/IService/ISysTasksQzService.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using ZR.Model;
|
||||
using ZR.Model.System;
|
||||
using ZR.Model.System.Dto;
|
||||
|
||||
namespace ZR.Service.System.IService
|
||||
{
|
||||
public interface ISysTasksQzService : IBaseService<SysTasks>
|
||||
{
|
||||
PagedInfo<SysTasks> SelectTaskList(TasksQueryDto parm);
|
||||
//SysTasksQz GetId(object id);
|
||||
int AddTasks(SysTasks parm);
|
||||
int UpdateTasks(SysTasks parm);
|
||||
}
|
||||
}
|
||||
15
server/ZR.Service/System/IService/ISysUserPostService.cs
Normal file
15
server/ZR.Service/System/IService/ISysUserPostService.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System.Collections.Generic;
|
||||
using ZR.Model.System;
|
||||
|
||||
namespace ZR.Service.System.IService
|
||||
{
|
||||
public interface ISysUserPostService
|
||||
{
|
||||
public void InsertUserPost(SysUser user);
|
||||
|
||||
public List<long> GetUserPostsByUserId(long userId);
|
||||
|
||||
public string GetPostsStrByUserId(long userId);
|
||||
bool Delete(long userId);
|
||||
}
|
||||
}
|
||||
70
server/ZR.Service/System/IService/ISysUserRoleService.cs
Normal file
70
server/ZR.Service/System/IService/ISysUserRoleService.cs
Normal file
@@ -0,0 +1,70 @@
|
||||
using System.Collections.Generic;
|
||||
using ZR.Model;
|
||||
using ZR.Model.System;
|
||||
using ZR.Model.System.Dto;
|
||||
|
||||
namespace ZR.Service.System.IService
|
||||
{
|
||||
public interface ISysUserRoleService : IBaseService<SysUserRole>
|
||||
{
|
||||
public int CountUserRoleByRoleId(long roleId);
|
||||
|
||||
/// <summary>
|
||||
/// 删除用户角色
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public int DeleteUserRoleByUserId(int userId);
|
||||
|
||||
/// <summary>
|
||||
/// 批量删除角色对应用户
|
||||
/// </summary>
|
||||
/// <param name="roleId"></param>
|
||||
/// <param name="userIds"></param>
|
||||
/// <returns></returns>
|
||||
public int DeleteRoleUserByUserIds(long roleId, List<long> userIds);
|
||||
|
||||
/// <summary>
|
||||
/// 添加用户角色
|
||||
/// </summary>
|
||||
/// <param name="sysUsers"></param>
|
||||
/// <returns></returns>
|
||||
public int AddUserRole(List<SysUserRole> sysUsers);
|
||||
|
||||
/// <summary>
|
||||
/// 获取用户数据根据角色id
|
||||
/// </summary>
|
||||
/// <param name="roleId"></param>
|
||||
/// <returns></returns>
|
||||
public List<SysUser> GetSysUsersByRoleId(long roleId);
|
||||
|
||||
/// <summary>
|
||||
/// 获取用户数据根据角色id
|
||||
/// </summary>
|
||||
/// <param name="roleUserQueryDto"></param>
|
||||
/// <returns></returns>
|
||||
public PagedInfo<SysUser> GetSysUsersByRoleId(RoleUserQueryDto roleUserQueryDto);
|
||||
|
||||
/// <summary>
|
||||
/// 获取尚未指派的用户数据根据角色id
|
||||
/// </summary>
|
||||
/// <param name="roleUserQueryDto"></param>
|
||||
/// <returns></returns>
|
||||
public PagedInfo<SysUser> GetExcludedSysUsersByRoleId(RoleUserQueryDto roleUserQueryDto);
|
||||
|
||||
/// <summary>
|
||||
/// 新增用户角色信息
|
||||
/// </summary>
|
||||
/// <param name="user"></param>
|
||||
/// <returns></returns>
|
||||
public int InsertUserRole(SysUser user);
|
||||
|
||||
/// <summary>
|
||||
/// 新增加角色用户
|
||||
/// </summary>
|
||||
/// <param name="roleId">角色id</param>
|
||||
/// <param name="userids">用户ids</param>
|
||||
/// <returns></returns>
|
||||
public int InsertRoleUser(RoleUsersCreateDto roleUsersCreateDto);
|
||||
}
|
||||
}
|
||||
86
server/ZR.Service/System/IService/ISysUserService.cs
Normal file
86
server/ZR.Service/System/IService/ISysUserService.cs
Normal file
@@ -0,0 +1,86 @@
|
||||
using System.Collections.Generic;
|
||||
using ZR.Model;
|
||||
using ZR.Model.System;
|
||||
using ZR.Model.System.Dto;
|
||||
|
||||
namespace ZR.Service.System.IService
|
||||
{
|
||||
public interface ISysUserService : IBaseService<SysUser>
|
||||
{
|
||||
public PagedInfo<SysUser> SelectUserList(SysUserQueryDto user, PagerInfo pager);
|
||||
|
||||
/// <summary>
|
||||
/// 通过用户ID查询用户
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public SysUser SelectUserById(long userId);
|
||||
|
||||
/// <summary>
|
||||
/// 校验用户名称是否唯一
|
||||
/// </summary>
|
||||
/// <param name="userName"></param>
|
||||
/// <returns></returns>
|
||||
public string CheckUserNameUnique(string userName);
|
||||
|
||||
/// <summary>
|
||||
/// 新增保存用户信息
|
||||
/// </summary>
|
||||
/// <param name="sysUser"></param>
|
||||
/// <returns></returns>
|
||||
public SysUser InsertUser(SysUser sysUser);
|
||||
|
||||
/// <summary>
|
||||
/// 修改用户信息
|
||||
/// </summary>
|
||||
/// <param name="sysUser"></param>
|
||||
/// <returns></returns>
|
||||
public int UpdateUser(SysUser user);
|
||||
|
||||
public int ChangeUser(SysUser user);
|
||||
|
||||
/// <summary>
|
||||
/// 重置密码
|
||||
/// </summary>
|
||||
/// <param name="userid"></param>
|
||||
/// <param name="password"></param>
|
||||
/// <returns></returns>
|
||||
public int ResetPwd(long userid, string password);
|
||||
|
||||
public int ChangeUserStatus(SysUser user);
|
||||
|
||||
/// <summary>
|
||||
/// 删除用户
|
||||
/// </summary>
|
||||
/// <param name="user"></param>
|
||||
/// <returns></returns>
|
||||
public int DeleteUser(long userid);
|
||||
|
||||
/// <summary>
|
||||
/// 修改用户头像
|
||||
/// </summary>
|
||||
/// <param name="user"></param>
|
||||
/// <returns></returns>
|
||||
public int UpdatePhoto(SysUser user);
|
||||
|
||||
/// <summary>
|
||||
/// 注册
|
||||
/// </summary>
|
||||
/// <param name="dto"></param>
|
||||
/// <returns></returns>
|
||||
SysUser Register(RegisterDto dto);
|
||||
void CheckUserAllowed(SysUser user);
|
||||
void CheckUserDataScope(long userid, long loginUserId);
|
||||
|
||||
/// <summary>
|
||||
/// 导入
|
||||
/// </summary>
|
||||
/// <param name="users"></param>
|
||||
/// <returns></returns>
|
||||
(string, object, object) ImportUsers(List<SysUser> users);
|
||||
|
||||
SysUser Login(LoginBodyDto user);
|
||||
|
||||
void UpdateLoginInfo(LoginBodyDto user, long userId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user