feat: 添加公告管理
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.Framework.Rbac.Domain.Shared.Enums
|
||||
{
|
||||
public enum NoticeTypeEnum
|
||||
{
|
||||
[Description("走马灯")]
|
||||
MerryGoRound = 0,
|
||||
[Description("提示弹窗")]
|
||||
Popup = 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using SqlSugar;
|
||||
using Volo.Abp.Auditing;
|
||||
using Volo.Abp.Domain.Entities;
|
||||
using Yi.Framework.Core.Data;
|
||||
using Yi.Framework.Rbac.Domain.Shared.Enums;
|
||||
|
||||
namespace Yi.Framework.Rbac.Domain.Entities
|
||||
{
|
||||
[SugarTable("Notice")]
|
||||
public class NoticeEntity : Entity<Guid>, ISoftDelete, IAuditedObject, IOrderNum, IState
|
||||
{
|
||||
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public override Guid Id { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// 公告标题
|
||||
/// </summary>
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 类型
|
||||
/// </summary>
|
||||
public NoticeTypeEnum Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 内容
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||
public string Content { get; set; }
|
||||
|
||||
public bool IsDeleted { get; set; }
|
||||
|
||||
public DateTime CreationTime { get; set; }
|
||||
|
||||
public Guid? CreatorId { get; set; }
|
||||
|
||||
public Guid? LastModifierId { get; set; }
|
||||
|
||||
public DateTime? LastModificationTime { get; set; }
|
||||
|
||||
public int OrderNum { get; set; }
|
||||
public bool State { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@ namespace Yi.Framework.Rbac.Domain.Entities
|
||||
/// 岗位表
|
||||
///</summary>
|
||||
[SugarTable("Post")]
|
||||
public partial class PostEntity : Entity<Guid>, ISoftDelete, IAuditedObject, IOrderNum, IState
|
||||
public class PostEntity : Entity<Guid>, ISoftDelete, IAuditedObject, IOrderNum, IState
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Yi.Framework.Rbac.Domain.Entities;
|
||||
/// 角色部门关系表
|
||||
///</summary>
|
||||
[SugarTable("RoleDept")]
|
||||
public partial class RoleDeptEntity : Entity<Guid>
|
||||
public class RoleDeptEntity : Entity<Guid>
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键
|
||||
|
||||
@@ -1125,6 +1125,75 @@ namespace Yi.Framework.Rbac.SqlSugarCore.DataSeeds
|
||||
|
||||
|
||||
|
||||
//通知公告
|
||||
MenuEntity notice = new MenuEntity(_guidGenerator.Create())
|
||||
{
|
||||
|
||||
MenuName = "通知公告",
|
||||
PermissionCode = "system:notice:list",
|
||||
MenuType = MenuTypeEnum.Menu,
|
||||
Router = "notice",
|
||||
IsShow = true,
|
||||
IsLink = false,
|
||||
IsCache = true,
|
||||
Component = "system/notice/index",
|
||||
MenuIcon = "message",
|
||||
OrderNum = 93,
|
||||
ParentId = system.Id,
|
||||
IsDeleted = false
|
||||
};
|
||||
entities.Add(notice);
|
||||
|
||||
MenuEntity noticeQuery = new MenuEntity(_guidGenerator.Create())
|
||||
{
|
||||
|
||||
MenuName = "通知查询",
|
||||
PermissionCode = "system:notice:query",
|
||||
MenuType = MenuTypeEnum.Component,
|
||||
OrderNum = 100,
|
||||
ParentId = notice.Id,
|
||||
IsDeleted = false
|
||||
};
|
||||
entities.Add(noticeQuery);
|
||||
|
||||
MenuEntity noticeAdd = new MenuEntity(_guidGenerator.Create())
|
||||
{
|
||||
|
||||
MenuName = "通知新增",
|
||||
PermissionCode = "system:notice:add",
|
||||
MenuType = MenuTypeEnum.Component,
|
||||
OrderNum = 100,
|
||||
ParentId = notice.Id,
|
||||
IsDeleted = false
|
||||
};
|
||||
entities.Add(noticeAdd);
|
||||
|
||||
MenuEntity noticeEdit = new MenuEntity(_guidGenerator.Create())
|
||||
{
|
||||
|
||||
MenuName = "通知修改",
|
||||
PermissionCode = "system:notice:edit",
|
||||
MenuType = MenuTypeEnum.Component,
|
||||
OrderNum = 100,
|
||||
ParentId = notice.Id,
|
||||
IsDeleted = false
|
||||
};
|
||||
entities.Add(noticeEdit);
|
||||
|
||||
MenuEntity noticeRemove = new MenuEntity(_guidGenerator.Create())
|
||||
{
|
||||
|
||||
MenuName = "通知删除",
|
||||
PermissionCode = "system:notice:remove",
|
||||
MenuType = MenuTypeEnum.Component,
|
||||
OrderNum = 100,
|
||||
ParentId = notice.Id,
|
||||
IsDeleted = false
|
||||
};
|
||||
entities.Add(noticeRemove);
|
||||
|
||||
|
||||
|
||||
//日志管理
|
||||
MenuEntity log = new MenuEntity(_guidGenerator.Create())
|
||||
{
|
||||
@@ -1135,7 +1204,7 @@ namespace Yi.Framework.Rbac.SqlSugarCore.DataSeeds
|
||||
IsShow = true,
|
||||
IsLink = false,
|
||||
MenuIcon = "log",
|
||||
OrderNum = 93,
|
||||
OrderNum = 92,
|
||||
ParentId = system.Id,
|
||||
IsDeleted = false
|
||||
};
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development",
|
||||
//"ASPNETCORE_ENVIRONMENT": "Staging"
|
||||
//"ASPNETCORE_ENVIRONMENT": "Development",
|
||||
"ASPNETCORE_ENVIRONMENT": "Staging"
|
||||
},
|
||||
"dotnetRunMessages": true,
|
||||
"applicationUrl": "http://localhost:19001"
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user