Browse Source

scheduled: 更换查询语句

baishaojie 1 year ago
parent
commit
ceb30ca8a1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      http/handle/api/scheduled.go

+ 1 - 1
http/handle/api/scheduled.go

@@ -755,7 +755,7 @@ func (h *ScheduledDown) SyncFeedp(pastureid string, feedpList []interface{}) err
 		// ON DUPLICATE KEY UPDATE softccount = ?  `
 		// _, err = tx.SQL(insertSql, pastureid, barName, barId, cowCount, cowCount).Execute()
 		fmt.Println(barCode)
-		_, err = tx.SQL(`update feedp fp set fp.softccount = ? where  (select bcode from bar where id = fp.id ) = ? `, cowCount, barName).Execute()
+		_, err = tx.SQL(`update feedp fp set fp.softccount = ? where  (select bcode from bar where id = fp.barid ) = ? `, cowCount, barName).Execute()
 		if err != nil {
 			tx.Rollback()
 			logs.Error("syncFeedp-error-7:", err)