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