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: ""
registeredNFs:
display: "Registered NFs"
method: "get"
array:
- name: "index"
type: "int"

View File

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