feat: 为新增信息设置默认Schema和NeVersion
This commit is contained in:
@@ -354,6 +354,12 @@ func (r *NeInfo) SelectById(infoId string, bandHost bool) model.NeInfo {
|
|||||||
|
|
||||||
// Insert 新增信息
|
// Insert 新增信息
|
||||||
func (r *NeInfo) Insert(neInfo model.NeInfo) string {
|
func (r *NeInfo) Insert(neInfo model.NeInfo) string {
|
||||||
|
if neInfo.Schema == "" {
|
||||||
|
neInfo.Schema = "http"
|
||||||
|
}
|
||||||
|
if neInfo.NeVersion == "" {
|
||||||
|
neInfo.NeVersion = "2"
|
||||||
|
}
|
||||||
// 主机信息新增
|
// 主机信息新增
|
||||||
if neInfo.Hosts != nil {
|
if neInfo.Hosts != nil {
|
||||||
var hostIDs []string
|
var hostIDs []string
|
||||||
|
|||||||
Reference in New Issue
Block a user