浏览代码

Merge branch 'eta/1.3.1' into debug

Roc 1 年之前
父节点
当前提交
b465fd4676
共有 2 个文件被更改,包括 6 次插入6 次删除
  1. 4 4
      models/edb_info.go
  2. 2 2
      models/predict_edb_conf.go

+ 4 - 4
models/edb_info.go

@@ -255,16 +255,16 @@ func GetEdbDataUpdateTimeByModify(source int, edbCode string, dataUpdateTime str
 // ModifyEdbInfoMaxAndMinInfo 修改指标的最新数据信息
 func ModifyEdbInfoMaxAndMinInfo(edbInfoId int, item *EdbInfoMaxAndMinInfo) (err error) {
 	o := orm.NewOrm()
-	sql := ` UPDATE edb_info SET start_date=?,end_date=?,min_value=?,max_value=?,is_update=2,latest_date=?,latest_value=?,modify_time=NOW() WHERE edb_info_id=? `
-	_, err = o.Raw(sql, item.MinDate, item.MaxDate, item.MinValue, item.MaxValue, item.MaxDate, item.LatestValue, edbInfoId).Exec()
+	sql := ` UPDATE edb_info SET start_date=?,end_date=?,min_value=?,max_value=?,is_update=2,latest_date=?,latest_value=?, end_value = ?,modify_time=NOW() WHERE edb_info_id=? `
+	_, err = o.Raw(sql, item.MinDate, item.MaxDate, item.MinValue, item.MaxValue, item.MaxDate, item.LatestValue, item.LatestValue, edbInfoId).Exec()
 	return
 }
 
 // ModifyEdbTimeAndLastInfo 修改指标的最新数据信息(除上下限)
 func ModifyEdbTimeAndLastInfo(edbInfoId int, item *EdbInfoMaxAndMinInfo) (err error) {
 	o := orm.NewOrm()
-	sql := `UPDATE edb_info SET start_date = ?, end_date = ?, is_update = 2,latest_date = ?, latest_value = ?, modify_time = NOW() WHERE edb_info_id = ?`
-	_, err = o.Raw(sql, item.MinDate, item.MaxDate, item.MaxDate, item.LatestValue, edbInfoId).Exec()
+	sql := `UPDATE edb_info SET start_date = ?, end_date = ?, is_update = 2,latest_date = ?, latest_value = ?, end_value = ?, modify_time = NOW() WHERE edb_info_id = ?`
+	_, err = o.Raw(sql, item.MinDate, item.MaxDate, item.MaxDate, item.LatestValue, item.LatestValue, edbInfoId).Exec()
 	return
 }
 

+ 2 - 2
models/predict_edb_conf.go

@@ -125,8 +125,8 @@ func ModifyPredictEdbInfoMaxAndMinInfoBySourceEdbInfoId(sourceEdbInfoId int, ite
 
 		//sql := ` UPDATE edb_info SET start_date=?,min_value=?,max_value=?,is_update=2,latest_date=?,latest_value=?,modify_time=NOW() WHERE edb_info_id in (` + utils.GetOrmInReplace(int(total)) + `) `
 		//_, err = o.Raw(sql, item.MinDate, item.MinValue, item.MaxValue, item.MaxDate, item.LatestValue, idList).Exec()
-		sql := ` UPDATE edb_info SET start_date=?,is_update=2,latest_date=?,latest_value=?,modify_time=NOW() WHERE edb_info_id in (` + utils.GetOrmInReplace(int(total)) + `) `
-		_, err = o.Raw(sql, item.MinDate, item.MaxDate, item.LatestValue, idList).Exec()
+		sql := ` UPDATE edb_info SET start_date=?,is_update=2,latest_date=?,latest_value=?,end_value=?,modify_time=NOW() WHERE edb_info_id in (` + utils.GetOrmInReplace(int(total)) + `) `
+		_, err = o.Raw(sql, item.MinDate, item.MaxDate, item.LatestValue, item.LatestValue, idList).Exec()
 	}
 	return
 }