fix:nrf parameter config update to only get method

This commit is contained in:
2023-11-14 17:28:33 +08:00
parent 123e8f4412
commit 40ae50519c
2 changed files with 6 additions and 0 deletions

View File

@@ -25,6 +25,7 @@ nrf:
comment: "" comment: ""
registeredNFs: registeredNFs:
display: "Registered NFs" display: "Registered NFs"
method: "get"
array: array:
- name: "index" - name: "index"
type: "int" type: "int"

View File

@@ -32,6 +32,7 @@ type ParamConfig struct {
NeId string `json:"neId"` NeId string `json:"neId"`
TopTag string `json:"topTag"` TopTag string `json:"topTag"`
TopDisplay string `json:"topDisplay"` TopDisplay string `json:"topDisplay"`
Method string `json:"method"`
ParamJson string `json:"paramJson"` ParamJson string `json:"paramJson"`
} }
@@ -56,6 +57,10 @@ func XormInsertParamConfig(mapJson *map[string]interface{}) (int64, error) {
if k == "display" { if k == "display" {
paramConfig.TopDisplay = fmt.Sprintf("%v", v) paramConfig.TopDisplay = fmt.Sprintf("%v", v)
} else if k == "method" {
if v != "" {
paramConfig.Method = fmt.Sprintf("%v", v)
}
} else { } else {
pc, _ := json.Marshal(v) pc, _ := json.Marshal(v)
paramConfig.ParamJson = fmt.Sprintf("{\"%v\":%v}", k, string(pc)) paramConfig.ParamJson = fmt.Sprintf("{\"%v\":%v}", k, string(pc))