XMLWAN преди 3 години
родител
ревизия
a61a83f02f
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      service/mobile_dialysis_service.go

+ 1 - 1
service/mobile_dialysis_service.go Целия файл

@@ -1996,7 +1996,7 @@ func BatchDeleteAdvice(ids []int64) (err error) {
1996 1996
 
1997 1997
 func UpdateAutoReduceDetail(good_id int64, count int64, record_time int64, patient_id int64) (models.DialysisBeforePrepare, error) {
1998 1998
 	detail := models.DialysisBeforePrepare{}
1999
-	err := XTWriteDB().Model(&detail).Where("good_id = ? and status = 1 and record_date = ? and patient_id", good_id, record_time, patient_id).Updates(map[string]interface{}{"count": count}).Error
1999
+	err := XTWriteDB().Model(&detail).Where("good_id = ? and status = 1 and record_date = ? and patient_id = ?", good_id, record_time, patient_id).Updates(map[string]interface{}{"count": count}).Error
2000 2000
 	return detail, err
2001 2001
 }
2002 2002