|
|
@@ -97,9 +97,11 @@ func (centralKitchenForSchoolUserWithDayDb *CentralKitchenForSchoolUserWithDayDb |
|
|
|
return count, nil |
|
|
|
} |
|
|
|
|
|
|
|
func (centralKitchenForSchoolUserWithDayDb *CentralKitchenForSchoolUserWithDayDb) CountCentralKitchenForSchoolUserWithDay(ordNo string, kind int) (count int64, err error) { |
|
|
|
func (centralKitchenForSchoolUserWithDayDb *CentralKitchenForSchoolUserWithDayDb) CountCentralKitchenForSchoolUserWithDay(ordNo, startDate, endDate string, kind int) (count int64, err error) { |
|
|
|
var m model.CentralKitchenForSchoolUserWithDay |
|
|
|
count, err = centralKitchenForSchoolUserWithDayDb.Db.Where("ord_no =?", ordNo).And("kind =?", kind).Count(&m) |
|
|
|
count, err = centralKitchenForSchoolUserWithDayDb.Db.Where("ord_no =?", ordNo). |
|
|
|
And("date >= ?", startDate).And("date <= ?", endDate). |
|
|
|
And("kind =?", kind).Count(&m) |
|
|
|
return count, nil |
|
|
|
} |
|
|
|
|
|
|
|