From 4dfa46a907074463a9e7e356bfe3a7255e58a5a4 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Mon, 25 Oct 2021 19:02:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9B=E5=BB=BAWAF=E5=88=86=E7=BB=84?= =?UTF-8?q?=E6=97=B6=E4=B9=9F=E8=AE=B0=E5=BD=95=E4=BB=A3=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/db/models/http_firewall_rule_group_dao.go | 3 ++- internal/rpc/services/service_http_firewall_rule_group.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/db/models/http_firewall_rule_group_dao.go b/internal/db/models/http_firewall_rule_group_dao.go index 7f2d4dba..c32a15ed 100644 --- a/internal/db/models/http_firewall_rule_group_dao.go +++ b/internal/db/models/http_firewall_rule_group_dao.go @@ -163,11 +163,12 @@ func (this *HTTPFirewallRuleGroupDAO) UpdateGroupIsOn(tx *dbs.Tx, groupId int64, } // CreateGroup 创建分组 -func (this *HTTPFirewallRuleGroupDAO) CreateGroup(tx *dbs.Tx, isOn bool, name string, description string) (int64, error) { +func (this *HTTPFirewallRuleGroupDAO) CreateGroup(tx *dbs.Tx, isOn bool, name string, code string, description string) (int64, error) { op := NewHTTPFirewallRuleGroupOperator() op.State = HTTPFirewallRuleStateEnabled op.IsOn = isOn op.Name = name + op.Code = code op.Description = description err := this.Save(tx, op) if err != nil { diff --git a/internal/rpc/services/service_http_firewall_rule_group.go b/internal/rpc/services/service_http_firewall_rule_group.go index 134b11ed..35474f06 100644 --- a/internal/rpc/services/service_http_firewall_rule_group.go +++ b/internal/rpc/services/service_http_firewall_rule_group.go @@ -50,7 +50,7 @@ func (this *HTTPFirewallRuleGroupService) CreateHTTPFirewallRuleGroup(ctx contex tx := this.NullTx() - groupId, err := models.SharedHTTPFirewallRuleGroupDAO.CreateGroup(tx, req.IsOn, req.Name, req.Description) + groupId, err := models.SharedHTTPFirewallRuleGroupDAO.CreateGroup(tx, req.IsOn, req.Name, req.Code, req.Description) if err != nil { return nil, err }