优化通知公告

This commit is contained in:
不做码农 2023-06-01 15:06:41 +08:00
parent 538dde51a8
commit 68d43240e7
9 changed files with 162 additions and 160 deletions

View File

@ -45,7 +45,7 @@ namespace ZR.Admin.WebApi.Controllers.System
{ {
var predicate = Expressionable.Create<SysNotice>(); var predicate = Expressionable.Create<SysNotice>();
predicate = predicate.And(m => m.Status == "0"); predicate = predicate.And(m => m.Status == 0);
var response = _SysNoticeService.GetPages(predicate.ToExpression(), parm); var response = _SysNoticeService.GetPages(predicate.ToExpression(), parm);
return SUCCESS(response); return SUCCESS(response);
} }
@ -61,9 +61,9 @@ namespace ZR.Admin.WebApi.Controllers.System
var predicate = Expressionable.Create<SysNotice>(); var predicate = Expressionable.Create<SysNotice>();
predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.NoticeTitle), m => m.NoticeTitle.Contains(parm.NoticeTitle)); predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.NoticeTitle), m => m.NoticeTitle.Contains(parm.NoticeTitle));
predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.NoticeType), m => m.NoticeType == parm.NoticeType); predicate = predicate.AndIF(parm.NoticeType != null, m => m.NoticeType == parm.NoticeType);
predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.CreateBy), m => m.Create_by.Contains(parm.CreateBy) || m.Update_by.Contains(parm.CreateBy)); predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.CreateBy), m => m.Create_by.Contains(parm.CreateBy) || m.Update_by.Contains(parm.CreateBy));
predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.Status), m => m.Status == parm.Status); predicate = predicate.AndIF(parm.Status != null, m => m.Status == parm.Status);
var response = _SysNoticeService.GetPages(predicate.ToExpression(), parm); var response = _SysNoticeService.GetPages(predicate.ToExpression(), parm);
return SUCCESS(response); return SUCCESS(response);
} }
@ -88,14 +88,9 @@ namespace ZR.Admin.WebApi.Controllers.System
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
[ActionPermissionFilter(Permission = "system:notice:add")] [ActionPermissionFilter(Permission = "system:notice:add")]
[Log(Title = "知公", BusinessType = BusinessType.INSERT)] [Log(Title = "发布通告", BusinessType = BusinessType.INSERT)]
public IActionResult AddSysNotice([FromBody] SysNoticeDto parm) public IActionResult AddSysNotice([FromBody] SysNoticeDto parm)
{ {
if (parm == null)
{
throw new CustomException("请求参数错误");
}
//从 Dto 映射到 实体
var modal = parm.Adapt<SysNotice>().ToCreate(HttpContext); var modal = parm.Adapt<SysNotice>().ToCreate(HttpContext);
modal.Create_by = HttpContext.GetName(); modal.Create_by = HttpContext.GetName();
modal.Create_time = DateTime.Now; modal.Create_time = DateTime.Now;
@ -120,19 +115,13 @@ namespace ZR.Admin.WebApi.Controllers.System
/// <returns></returns> /// <returns></returns>
[HttpPut] [HttpPut]
[ActionPermissionFilter(Permission = "system:notice:update")] [ActionPermissionFilter(Permission = "system:notice:update")]
[Log(Title = "通知公告表", BusinessType = BusinessType.UPDATE)] [Log(Title = "修改公告", BusinessType = BusinessType.UPDATE)]
public IActionResult UpdateSysNotice([FromBody] SysNoticeDto parm) public IActionResult UpdateSysNotice([FromBody] SysNoticeDto parm)
{ {
if (parm == null)
{
throw new CustomException("请求实体不能为空");
}
//从 Dto 映射到 实体
var model = parm.Adapt<SysNotice>().ToUpdate(HttpContext); var model = parm.Adapt<SysNotice>().ToUpdate(HttpContext);
model.Update_by = HttpContext.GetName();
var response = _SysNoticeService.Update(w => w.NoticeId == model.NoticeId, it => new SysNotice() var response = _SysNoticeService.Update(w => w.NoticeId == model.NoticeId, it => new SysNotice()
{ {
//Update 字段映射
NoticeTitle = model.NoticeTitle, NoticeTitle = model.NoticeTitle,
NoticeType = model.NoticeType, NoticeType = model.NoticeType,
NoticeContent = model.NoticeContent, NoticeContent = model.NoticeContent,
@ -150,7 +139,7 @@ namespace ZR.Admin.WebApi.Controllers.System
/// <returns></returns> /// <returns></returns>
[HttpPut("send/{NoticeId}")] [HttpPut("send/{NoticeId}")]
[ActionPermissionFilter(Permission = "system:notice:update")] [ActionPermissionFilter(Permission = "system:notice:update")]
[Log(Title = "通知公告", BusinessType = BusinessType.OTHER)] [Log(Title = "发送通知公告", BusinessType = BusinessType.OTHER)]
public IActionResult SendNotice(int NoticeId = 0) public IActionResult SendNotice(int NoticeId = 0)
{ {
if (NoticeId <= 0) if (NoticeId <= 0)
@ -158,7 +147,7 @@ namespace ZR.Admin.WebApi.Controllers.System
throw new CustomException("请求实体不能为空"); throw new CustomException("请求实体不能为空");
} }
var response = _SysNoticeService.GetFirst(x => x.NoticeId == NoticeId); var response = _SysNoticeService.GetFirst(x => x.NoticeId == NoticeId);
if (response != null && response.Status == "0") if (response != null && response.Status == 0)
{ {
_hubContext.Clients.All.SendAsync(HubsConstant.ReceiveNotice, response.NoticeTitle, response.NoticeContent); _hubContext.Clients.All.SendAsync(HubsConstant.ReceiveNotice, response.NoticeTitle, response.NoticeContent);
} }
@ -171,7 +160,7 @@ namespace ZR.Admin.WebApi.Controllers.System
/// <returns></returns> /// <returns></returns>
[HttpDelete("{ids}")] [HttpDelete("{ids}")]
[ActionPermissionFilter(Permission = "system:notice:delete")] [ActionPermissionFilter(Permission = "system:notice:delete")]
[Log(Title = "通知公告", BusinessType = BusinessType.DELETE)] [Log(Title = "通知公告", BusinessType = BusinessType.DELETE)]
public IActionResult DeleteSysNotice(string ids) public IActionResult DeleteSysNotice(string ids)
{ {
int[] idsArr = Tools.SpitIntArrary(ids); int[] idsArr = Tools.SpitIntArrary(ids);
@ -181,20 +170,5 @@ namespace ZR.Admin.WebApi.Controllers.System
return SUCCESS(response); return SUCCESS(response);
} }
/// <summary>
/// 通知公告表导出
/// </summary>
/// <returns></returns>
[Log(BusinessType = BusinessType.EXPORT, IsSaveResponseData = false, Title = "通知公告表")]
[HttpGet("export")]
[ActionPermissionFilter(Permission = "system:notice:export")]
public IActionResult Export()
{
var list = _SysNoticeService.GetAll();
string sFileName = ExportExcel(list, "SysNotice", "通知公告表");
return SUCCESS(new { path = "/export/" + sFileName, fileName = sFileName });
}
} }
} }

View File

@ -1,3 +1,5 @@
using System.ComponentModel.DataAnnotations;
namespace ZR.Model.System.Dto namespace ZR.Model.System.Dto
{ {
/// <summary> /// <summary>
@ -6,10 +8,11 @@ namespace ZR.Model.System.Dto
public class SysNoticeDto public class SysNoticeDto
{ {
public int NoticeId { get; set; } public int NoticeId { get; set; }
[Required]
public string NoticeTitle { get; set; } public string NoticeTitle { get; set; }
public string NoticeType { get; set; } public int NoticeType { get; set; }
public string NoticeContent { get; set; } public string NoticeContent { get; set; }
public string Status { get; set; } public int Status { get; set; }
public string Remark { get; set; } public string Remark { get; set; }
} }
@ -19,8 +22,8 @@ namespace ZR.Model.System.Dto
public class SysNoticeQueryDto : PagerInfo public class SysNoticeQueryDto : PagerInfo
{ {
public string NoticeTitle { get; set; } public string NoticeTitle { get; set; }
public string NoticeType { get; set; } public int? NoticeType { get; set; }
public string CreateBy { get; set; } public string CreateBy { get; set; }
public string Status { get; set; } public int? Status { get; set; }
} }
} }

View File

@ -26,7 +26,7 @@ namespace ZR.Model.System
/// 公告类型 (1通知 2公告) /// 公告类型 (1通知 2公告)
/// </summary> /// </summary>
[SugarColumn(ColumnName = "notice_type")] [SugarColumn(ColumnName = "notice_type")]
public string NoticeType { get; set; } public int NoticeType { get; set; }
/// <summary> /// <summary>
/// 公告内容 /// 公告内容
/// </summary> /// </summary>
@ -35,6 +35,6 @@ namespace ZR.Model.System
/// <summary> /// <summary>
/// 公告状态 (0正常 1关闭) /// 公告状态 (0正常 1关闭)
/// </summary> /// </summary>
public string Status { get; set; } public int Status { get; set; }
} }
} }

View File

@ -28,7 +28,7 @@ namespace ZR.Service.System
var predicate = Expressionable.Create<SysNotice>(); var predicate = Expressionable.Create<SysNotice>();
//搜索条件查询语法参考Sqlsugar //搜索条件查询语法参考Sqlsugar
predicate = predicate.And(m => m.Status == "0"); predicate = predicate.And(m => m.Status == 0);
return GetList(predicate.ToExpression()); return GetList(predicate.ToExpression());
} }

View File

@ -23,13 +23,28 @@
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['system:notice:add']">新增</el-button> <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['system:notice:add']">新增</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" v-hasPermi="['system:notice:edit']"> <el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:notice:edit']"
>
修改 修改
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" <el-button
v-hasPermi="['system:notice:remove']">删除 type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:notice:remove']"
>删除
</el-button> </el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
@ -58,15 +73,20 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-bell" @click="handleNotice(scope.row)" v-hasPermi="['system:notice:edit']">通知</el-button> <el-button size="mini" type="text" icon="el-icon-bell" @click="handleNotice(scope.row)" v-hasPermi="['system:notice:edit']"
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:notice:edit']">修改</el-button> >通知</el-button
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['system:notice:remove']">删除 >
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:notice:edit']"
>修改</el-button
>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['system:notice:remove']"
>删除
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
<!-- 添加或修改公告对话框 --> <!-- 添加或修改公告对话框 -->
<el-dialog :title="title" :visible.sync="open" width="780px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="780px" append-to-body>
@ -80,14 +100,14 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="公告类型" prop="noticeType"> <el-form-item label="公告类型" prop="noticeType">
<el-select v-model="form.noticeType" placeholder="请选择公告类型"> <el-select v-model="form.noticeType" placeholder="请选择公告类型">
<el-option v-for="dict in typeOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue"></el-option> <el-option v-for="dict in typeOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="parseInt(dict.dictValue)"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="状态"> <el-form-item label="状态">
<el-radio-group v-model="form.status"> <el-radio-group v-model="form.status">
<el-radio v-for="dict in statusOptions" :key="dict.dictValue" :label="dict.dictValue">{{dict.dictLabel}}</el-radio> <el-radio v-for="dict in statusOptions" :key="dict.dictValue" :label="parseInt(dict.dictValue)">{{ dict.dictLabel }}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -115,10 +135,10 @@ import {
updateNotice, updateNotice,
sendNotice, sendNotice,
// exportNotice, // exportNotice,
} from "@/api/system/notice"; } from '@/api/system/notice'
export default { export default {
name: "notice", name: 'notice',
data() { data() {
return { return {
// //
@ -136,7 +156,7 @@ export default {
// //
noticeList: [], noticeList: [],
// //
title: "", title: '',
// //
open: false, open: false,
// //
@ -155,38 +175,34 @@ export default {
form: {}, form: {},
// //
rules: { rules: {
noticeTitle: [ noticeTitle: [{ required: true, message: '公告标题不能为空', trigger: 'blur' }],
{ required: true, message: "公告标题不能为空", trigger: "blur" }, noticeType: [{ required: true, message: '公告类型不能为空', trigger: 'change' }],
],
noticeType: [
{ required: true, message: "公告类型不能为空", trigger: "change" },
],
}, },
}; }
}, },
created() { created() {
this.getList(); this.getList()
this.getDicts("sys_notice_status").then((response) => { this.getDicts('sys_notice_status').then((response) => {
this.statusOptions = response.data; this.statusOptions = response.data
}); })
this.getDicts("sys_notice_type").then((response) => { this.getDicts('sys_notice_type').then((response) => {
this.typeOptions = response.data; this.typeOptions = response.data
}); })
}, },
methods: { methods: {
/** 查询公告列表 */ /** 查询公告列表 */
getList() { getList() {
this.loading = true; this.loading = true
listNotice(this.queryParams).then((res) => { listNotice(this.queryParams).then((res) => {
this.noticeList = res.data.result; this.noticeList = res.data.result
this.total = res.data.totalNum; this.total = res.data.totalNum
this.loading = false; this.loading = false
}); })
}, },
// //
cancel() { cancel() {
this.open = false; this.open = false
this.reset(); this.reset()
}, },
// //
reset() { reset() {
@ -195,93 +211,89 @@ export default {
noticeTitle: undefined, noticeTitle: undefined,
noticeType: undefined, noticeType: undefined,
noticeContent: undefined, noticeContent: undefined,
status: "0", status: 0,
}; }
this.resetForm("form"); this.resetForm('form')
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1
this.getList(); this.getList()
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm("queryForm"); this.resetForm('queryForm')
this.handleQuery(); this.handleQuery()
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map((item) => item.noticeId); this.ids = selection.map((item) => item.noticeId)
this.single = selection.length != 1; this.single = selection.length != 1
this.multiple = !selection.length; this.multiple = !selection.length
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset(); this.reset()
this.open = true; this.open = true
this.title = "添加公告"; this.title = '添加公告'
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset()
const noticeId = row.noticeId || this.ids; const noticeId = row.noticeId || this.ids
getNotice(noticeId).then((response) => { getNotice(noticeId).then((response) => {
this.form = response.data; this.form = response.data
this.open = true; this.open = true
this.title = "修改公告"; this.title = '修改公告'
}); })
}, },
// //
handleNotice(row) { handleNotice(row) {
const noticeId = row.noticeId || this.ids; const noticeId = row.noticeId || this.ids
sendNotice(noticeId).then(res => { sendNotice(noticeId).then((res) => {
this.msgSuccess("发送通知成功"); this.msgSuccess('发送通知成功')
}); })
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm: function () { submitForm: function () {
this.$refs["form"].validate((valid) => { this.$refs['form'].validate((valid) => {
if (valid) { if (valid) {
if (this.form.noticeId != undefined) { if (this.form.noticeId != undefined) {
updateNotice(this.form).then((response) => { updateNotice(this.form).then((response) => {
if (!response.data) { if (!response.data) {
this.msgError("修改失败"); this.msgError('修改失败')
return; return
} }
this.msgSuccess("修改成功"); this.msgSuccess('修改成功')
this.open = false; this.open = false
this.getList(); this.getList()
}); })
} else { } else {
addNotice(this.form).then((response) => { addNotice(this.form).then((response) => {
this.msgSuccess("新增成功"); this.msgSuccess('新增成功')
this.open = false; this.open = false
this.getList(); this.getList()
}); })
} }
} }
}); })
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const noticeIds = row.noticeId || this.ids; const noticeIds = row.noticeId || this.ids
this.$confirm( this.$confirm('是否确认删除公告编号为"' + noticeIds + '"的数据项?', '警告', {
'是否确认删除公告编号为"' + noticeIds + '"的数据项?', confirmButtonText: '确定',
"警告", cancelButtonText: '取消',
{ type: 'warning',
confirmButtonText: "确定", })
cancelButtonText: "取消",
type: "warning",
}
)
.then(function () { .then(function () {
return delNotice(noticeIds); return delNotice(noticeIds)
}) })
.then(() => { .then(() => {
this.getList(); this.getList()
this.msgSuccess("删除成功"); this.msgSuccess('删除成功')
}); })
}, },
}, },
}; }
</script> </script>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View File

@ -35,38 +35,52 @@ CREATE TABLE `sys_tasks` (
-- ---------------------------- -- ----------------------------
-- Table structure for sys_tasks_log -- Table structure for sys_tasks_log
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS `sys_tasks_log`; DROP TABLE
CREATE TABLE `sys_tasks_log` ( IF
`jobLogId` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '任务日志ID', EXISTS `sys_tasks_log`;
`jobId` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '任务id', CREATE TABLE `sys_tasks_log` (
`jobName` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '任务名称', `jobLogId` BIGINT ( 20 ) NOT NULL AUTO_INCREMENT COMMENT '任务日志ID',
`jobGroup` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '任务组名', `jobId` VARCHAR ( 20 ) CHARACTER
`jobMessage` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '日志信息', SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '任务id',
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '执行状态0正常 1失败', `jobName` VARCHAR ( 64 ) CHARACTER
`exception` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '异常信息', SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '任务名称',
`createTime` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', `jobGroup` VARCHAR ( 64 ) CHARACTER
`invokeTarget` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '调用目标', SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '任务组名',
`elapsed` double(10, 0) NULL DEFAULT NULL COMMENT '作业用时', `jobMessage` VARCHAR ( 500 ) CHARACTER
PRIMARY KEY (`jobLogId`) USING BTREE SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '日志信息',
) ENGINE = InnoDB AUTO_INCREMENT = 198 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '定时任务调度日志表' ROW_FORMAT = Dynamic; `status` CHAR ( 1 ) CHARACTER
SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '执行状态0正常 1失败',
`exception` VARCHAR ( 2000 ) CHARACTER
SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '异常信息',
`createTime` DATETIME ( 0 ) NULL DEFAULT NULL COMMENT '创建时间',
`invokeTarget` VARCHAR ( 200 ) CHARACTER
SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '调用目标',
`elapsed` DOUBLE ( 10, 0 ) NULL DEFAULT NULL COMMENT '作业用时',
PRIMARY KEY ( `jobLogId` ) USING BTREE
) ENGINE = INNODB AUTO_INCREMENT = 198 CHARACTER
SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '定时任务调度日志表' ROW_FORMAT = Dynamic;
-- ---------------------------- -- ----------------------------
-- 通知公告表 -- 通知公告表
-- ---------------------------- -- ----------------------------
drop table if exists sys_notice; DROP TABLE
create table sys_notice ( IF
notice_id int(4) not null auto_increment comment '公告ID', EXISTS sys_notice;
notice_title varchar(50) not null comment '公告标题', CREATE TABLE sys_notice (
notice_type char(1) not null comment '公告类型1通知 2公告', notice_id INT ( 4 ) NOT NULL auto_increment COMMENT '公告ID',
notice_content varchar(500) default null comment '公告内容', notice_title VARCHAR ( 50 ) CHARACTER
status char(1) default '0' comment '公告状态0正常 1关闭', SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '公告标题',
create_by varchar(64) default '' comment '创建者', notice_type INT NOT NULL COMMENT '公告类型1通知 2公告',
create_time datetime comment '创建时间', notice_content TEXT CHARACTER
update_by varchar(64) default '' comment '更新者', SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '公告内容',
update_time datetime comment '更新时间', `status` INT DEFAULT 0 COMMENT '公告状态0正常 1关闭',
remark varchar(255) default null comment '备注', create_by VARCHAR ( 64 ) DEFAULT '' COMMENT '创建者',
primary key (notice_id) create_time DATETIME COMMENT '创建时间',
) engine=innodb auto_increment=10 comment = '通知公告表'; update_by VARCHAR ( 64 ) DEFAULT '' COMMENT '更新者',
update_time DATETIME COMMENT '更新时间',
remark VARCHAR ( 255 ) CHARACTER
SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注',
PRIMARY KEY ( notice_id )
) ENGINE = INNODB auto_increment = 1 COMMENT = '通知公告表';
-- ---------------------------- -- ----------------------------

View File

@ -683,9 +683,9 @@ DROP TABLE IF EXISTS "public"."sys_notice";
CREATE TABLE "public"."sys_notice" ( CREATE TABLE "public"."sys_notice" (
"notice_id" int4 NOT NULL DEFAULT nextval('sys_noticeid_seq'::regclass), "notice_id" int4 NOT NULL DEFAULT nextval('sys_noticeid_seq'::regclass),
"notice_title" varchar(50) COLLATE "pg_catalog"."default" NOT NULL, "notice_title" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
"notice_type" char(1) COLLATE "pg_catalog"."default" NOT NULL, "notice_type" int4 NOT NULL,
"notice_content" varchar(500) COLLATE "pg_catalog"."default", "notice_content" varchar(500) COLLATE "pg_catalog"."default",
"status" char(1) COLLATE "pg_catalog"."default", "status" int4,
"create_by" varchar(64) COLLATE "pg_catalog"."default", "create_by" varchar(64) COLLATE "pg_catalog"."default",
"create_time" timestamp(6), "create_time" timestamp(6),
"update_by" varchar(64) COLLATE "pg_catalog"."default", "update_by" varchar(64) COLLATE "pg_catalog"."default",

View File

@ -31,7 +31,6 @@ CREATE TABLE sys_tasks
requestMethod VARCHAR(10) -- requestMethod VARCHAR(10) --
) )
GO GO
GO
if OBJECT_ID(N'sys_tasks_log',N'U') is not NULL DROP TABLE sys_tasks_log if OBJECT_ID(N'sys_tasks_log',N'U') is not NULL DROP TABLE sys_tasks_log
GO GO
/**定时任务调度日志表*/ /**定时任务调度日志表*/
@ -55,9 +54,9 @@ GO
CREATE TABLE [dbo].[sys_notice]( CREATE TABLE [dbo].[sys_notice](
[notice_id] [int] NOT NULL PRIMARY KEY IDENTITY(1,1), [notice_id] [int] NOT NULL PRIMARY KEY IDENTITY(1,1),
[notice_title] [varchar](100) NULL, [notice_title] [varchar](100) NULL,
[notice_type] [char](1) NULL, [notice_type] int NULL,
[notice_content] [text] NULL, [notice_content] [text] NULL,
[status] [char](1) NULL, [status] int NULL,
[create_by] [varchar](64) NULL, [create_by] [varchar](64) NULL,
[create_time] [datetime] NULL, [create_time] [datetime] NULL,
[update_by] [varchar](64) NULL, [update_by] [varchar](64) NULL,