|
|
@@ -19,7 +19,7 @@ func (CentralKitchenForSchoolMenuDb *CentralKitchenForSchoolMenuDb) Set(enterpri |
|
|
|
|
|
|
|
func (CentralKitchenForSchoolMenuDb *CentralKitchenForSchoolMenuDb) GetCentralKitchenForSchoolMenu(date string) (m *model.CentralKitchenForSchoolMenu, err error) { |
|
|
|
m = new(model.CentralKitchenForSchoolMenu) |
|
|
|
has, err := CentralKitchenForSchoolMenuDb.Db.Where("enterprise_id =?", CentralKitchenForSchoolMenuDb.EnterpriseId).And("start_date >=? and end_date <= ?", date, date).Get(m) |
|
|
|
has, err := CentralKitchenForSchoolMenuDb.Db.Where("enterprise_id =?", CentralKitchenForSchoolMenuDb.EnterpriseId).And("start_date <=? and end_date >= ?", date, date).Get(m) |
|
|
|
if err != nil { |
|
|
|
return nil, logx.Error(err) |
|
|
|
} |
|
|
|