改进操作日志

This commit is contained in:
刘祥超
2020-11-20 15:32:42 +08:00
parent ad836d70ac
commit 6bca0abc69
142 changed files with 230 additions and 100 deletions

View File

@@ -98,5 +98,8 @@ func (this *CreatePopupAction) RunPost(params struct {
return
}
// 日志
defer this.CreateLogInfo("在Web %d 中创建重写规则 %d", params.WebId, createResp.RewriteRuleId)
this.Success()
}

View File

@@ -16,6 +16,8 @@ func (this *DeleteAction) RunPost(params struct {
WebId int64
RewriteRuleId int64
}) {
defer this.CreateLogInfo("从Web %d 中删除重写规则 %d", params.WebId, params.RewriteRuleId)
webConfig, err := webutils.FindWebConfigWithId(this.Parent(), params.WebId)
if err != nil {
this.ErrorPage(err)

View File

@@ -16,6 +16,8 @@ func (this *SortAction) RunPost(params struct {
WebId int64
RewriteRuleIds []int64
}) {
defer this.CreateLogInfo("对Web %d 中的重写规则进行排序", params.WebId)
webConfig, err := webutils.FindWebConfigWithId(this.Parent(), params.WebId)
if err != nil {
this.ErrorPage(err)

View File

@@ -59,6 +59,8 @@ func (this *UpdatePopupAction) RunPost(params struct {
Must *actions.Must
}) {
defer this.CreateLogInfo("修改Web %d 中的重写规则 %d", params.WebId, params.RewriteRuleId)
params.Must.
Field("pattern", params.Pattern).
Require("请输入匹配规则").