|
|
@@ -92,6 +92,12 @@ func (centralKitchenForSchoolUserWithDayDb *CentralKitchenForSchoolUserWithDayDb |
|
|
|
return count, nil |
|
|
|
} |
|
|
|
|
|
|
|
func (centralKitchenForSchoolUserWithDayDb *CentralKitchenForSchoolUserWithDayDb) CountCentralKitchenForSchoolUserWithDay(ordNo string, kind int) (count int64, err error) { |
|
|
|
var m model.CentralKitchenForSchoolUserWithDay |
|
|
|
count, err = centralKitchenForSchoolUserWithDayDb.Db.Where("ord_no =?", ordNo).And("kind =?", kind).Count(&m) |
|
|
|
return count, nil |
|
|
|
} |
|
|
|
|
|
|
|
func (centralKitchenForSchoolUserWithDayDb *CentralKitchenForSchoolUserWithDayDb) FindCentralKitchenForSchoolUserWithDayByOrdNoAndState(ordNo string, state int) (*[]model.CentralKitchenForSchoolUserWithDay, error) { |
|
|
|
var m []model.CentralKitchenForSchoolUserWithDay |
|
|
|
if err := centralKitchenForSchoolUserWithDayDb.Db.Where("ord_no =?", ordNo).And("state =?", state).Desc("id").Find(&m); err != nil { |
|
|
|