Browse Source

fix:钢联数据获取调整,不查询值为null的数据

Roc 3 years ago
parent
commit
8c298fe6b2
1 changed files with 2 additions and 2 deletions
  1. 2 2
      models/base_from_mysteel.go

+ 2 - 2
models/base_from_mysteel.go

@@ -19,7 +19,7 @@ type GlData struct {
 
 func GetGlDataByCondition(condition string, pars []interface{}) (item []*GlData, err error) {
 	condition += " AND IS_DELETE=0 "
-	sql := ` SELECT * FROM mb_index_main_data WHERE 1=1 `
+	sql := ` SELECT * FROM mb_index_main_data WHERE 1=1 AND DATA_VALUE is not null `
 	o := orm.NewOrmUsingDB("gl")
 	if condition != "" {
 		sql += condition
@@ -131,7 +131,7 @@ func RefreshEdbDataFromMysteel(edbInfoId int, edbCode, startDate string) (err er
 	for _, v := range glDataList {
 		item := v
 		eDate := item.DataTime
-		sValue :=utils.SubFloatToString(item.InputValue, 30)
+		sValue := utils.SubFloatToString(item.InputValue, 30)
 
 		if findItem, ok := existMap[v.DataTime]; !ok {
 			if sValue != "" {