当用户提交待审核域名时,给管理员发送消息

This commit is contained in:
GoEdgeLab
2021-12-01 17:20:09 +08:00
parent e2bc2ca6c3
commit 6da9c4cf68
2 changed files with 12 additions and 5 deletions

View File

@@ -466,10 +466,8 @@ func (this *ServerService) UpdateServerNames(ctx context.Context, req *pb.Update
if err != nil {
return nil, err
}
}
// 是否需要审核
if userId > 0 {
// 是否需要审核
globalConfig, err := models.SharedSysSettingDAO.ReadGlobalConfig(tx)
if err != nil {
return nil, err
@@ -479,6 +477,12 @@ func (this *ServerService) UpdateServerNames(ctx context.Context, req *pb.Update
if err != nil {
return nil, err
}
// 发送审核通知
err = models.SharedMessageDAO.CreateMessage(tx, 0, 0, models.MessageTypeServerNamesRequireAuditing, models.MessageLevelWarning, "有新的网站域名需要审核", "有新的网站域名需要审核", maps.Map{
"serverId": req.ServerId,
}.AsJSON())
return this.Success()
}
}