feat: 网元主机支持redis配置项
This commit is contained in:
@@ -15,7 +15,7 @@ import (
|
||||
// 实例化数据层 NeHost 结构体
|
||||
var NewNeHost = &NeHost{
|
||||
selectSql: `select
|
||||
host_id, host_type, group_id, title, addr, port, user, auth_mode, password, private_key, pass_phrase, remark, create_by, create_time, update_by, update_time
|
||||
host_id, host_type, group_id, title, addr, port, user, auth_mode, password, private_key, pass_phrase, db_name, remark, create_by, create_time, update_by, update_time
|
||||
from ne_host`,
|
||||
|
||||
resultMap: map[string]string{
|
||||
@@ -30,6 +30,7 @@ var NewNeHost = &NeHost{
|
||||
"password": "Password",
|
||||
"private_key": "PrivateKey",
|
||||
"private_password": "PassPhrase",
|
||||
"db_name": "DBName",
|
||||
"remark": "Remark",
|
||||
"create_by": "CreateBy",
|
||||
"create_time": "CreateTime",
|
||||
@@ -245,6 +246,9 @@ func (r *NeHost) Insert(neHost model.NeHost) string {
|
||||
if neHost.PassPhrase != "" {
|
||||
params["pass_phrase"] = neHost.PassPhrase
|
||||
}
|
||||
if neHost.DBName != "" {
|
||||
params["db_name"] = neHost.DBName
|
||||
}
|
||||
if neHost.Remark != "" {
|
||||
params["remark"] = neHost.Remark
|
||||
}
|
||||
@@ -328,6 +332,9 @@ func (r *NeHost) Update(neHost model.NeHost) int64 {
|
||||
if neHost.PassPhrase != "" {
|
||||
params["pass_phrase"] = neHost.PassPhrase
|
||||
}
|
||||
if neHost.DBName != "" {
|
||||
params["db_name"] = neHost.DBName
|
||||
}
|
||||
params["remark"] = neHost.Remark
|
||||
if neHost.UpdateBy != "" {
|
||||
params["update_by"] = neHost.UpdateBy
|
||||
|
||||
Reference in New Issue
Block a user