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