1
0

fix: 补充缺失代码

This commit is contained in:
TsMask
2024-01-12 16:13:52 +08:00
parent 7edad64f93
commit 269b578d77
10 changed files with 264 additions and 35 deletions

View File

@@ -48,9 +48,9 @@ func GetParamConfigFromNF(w http.ResponseWriter, r *http.Request) {
getNeInfoURI := restHostPort + getNeInfoPattern
neId := services.GetUriParamString(r, "ne_id", ",", true, true)
if neId == "" {
getNeInfoURI = getNeInfoURI + fmt.Sprintf("?WHERE=status='0'+and+ne_type='%s'", neType)
getNeInfoURI = getNeInfoURI + fmt.Sprintf("?WHERE=status+in+('0','3')+and+ne_type='%s'", neType)
} else {
getNeInfoURI = getNeInfoURI + fmt.Sprintf("?WHERE=status='0'+and+ne_type='%v'+and+ne_id+in+%v", neType, neId)
getNeInfoURI = getNeInfoURI + fmt.Sprintf("?WHERE=status+in+('0','3')+and+ne_type='%v'+and+ne_id+in+%v", neType, neId)
}
log.Debug("getNeInfoURI:", getNeInfoURI)
@@ -63,11 +63,11 @@ func GetParamConfigFromNF(w http.ResponseWriter, r *http.Request) {
SetHeaders(map[string]string{"Content-Type": "application/json;charset=UTF-8"}).
Get(getNeInfoURI)
if err != nil {
log.Error("Get from database is failure!")
services.ResponseInternalServerError500NFConnectRefused(w)
log.Error("Failed to Get:", err)
services.ResponseInternalServerError500ProcessError(w, err)
return
}
log.Debug("NE info:", string(resp.Body()))
log.Trace("NE info:", string(resp.Body()))
// var neList []dborm.NeInfo
neList, _ := dborm.XormParseResult(resp.Body())