Browse Source

查询指标更新详情

xyxie 4 months ago
parent
commit
d3f118129b
1 changed files with 3 additions and 8 deletions
  1. 3 8
      controllers/data_stat/edb_source_stat.go

+ 3 - 8
controllers/data_stat/edb_source_stat.go

@@ -821,8 +821,6 @@ func (this *EdbSourceStatController) EdbUpdateFailedList() {
 			br.ErrMsg = "查询终端信息出错 Err:" + err.Error()
 			return
 		}
-		condition += " and terminal_code = ?"
-		pars = append(pars, terminalCode)
 		terminalName = terminalInfo.Name
 		terminalDir = terminalInfo.DirPath
 	}
@@ -918,13 +916,10 @@ func (this *EdbSourceStatController) EdbUpdateFailedDetailList() {
 		return
 	}
 
-	condition := " and source = ? and frequency=? and data_update_failed_reason=? and data_update_result = 2"
+	condition := " and source = ? and AND terminal_code = ?, frequency=? and data_update_failed_reason=? and data_update_result = 2"
 	var pars []interface{}
-	pars = append(pars, utils.DATA_SOURCE_MYSTEEL_CHEMICAL, frequency, sourceUpdateFailedReason)
-	if terminalCode != "" {
-		condition += " AND terminal_code = ?"
-		pars = append(pars, terminalCode)
-	}
+	pars = append(pars, utils.DATA_SOURCE_MYSTEEL_CHEMICAL, terminalCode, frequency, sourceUpdateFailedReason)
+
 	if createTime != "" {
 		startT, err := time.ParseInLocation(utils.FormatDate, createTime, time.Local)
 		if err != nil {