|
@@ -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
|
|