|
|
@@ -46,6 +46,12 @@ func (centralKitchenForSchoolUserWithDayDb *CentralKitchenForSchoolUserWithDayDb |
|
|
|
return &m, nil |
|
|
|
} |
|
|
|
|
|
|
|
func (centralKitchenForSchoolUserWithDayDb *CentralKitchenForSchoolUserWithDayDb) CountCentralKitchenForSchoolUserWithDayByOrdNo(ordNo string, state int) (count int64, err error) { |
|
|
|
var m model.CentralKitchenForSchoolUserWithDay |
|
|
|
count, err = centralKitchenForSchoolUserWithDayDb.Db.Where("ord_no =?", ordNo).And("state !=?", state).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 { |
|
|
|