|
|
@@ -17,7 +17,7 @@ func CentralKitchenForSchoolPackage(c *gin.Context) { |
|
|
|
//1、查询出当前合适的package |
|
|
|
var m []model.CentralKitchenForSchoolPackage |
|
|
|
now := time.Now().Format("2006-01-02 15:04:05") |
|
|
|
err := db.Db.Where("enterprise_id =?", enterpriseId).Where("end_date > ?", now).And("is_delete = 0").And("state = 1").Desc("end_date").Find(&m) |
|
|
|
err := db.Db.Where("enterprise_id =?", enterpriseId).Where("end_date >= ?", now).And("is_delete = 0").And("state = 1").Desc("end_date").Find(&m) |
|
|
|
if err != nil { |
|
|
|
e.OutErr(c, e.ERR_DB_ORM, err.Error()) |
|
|
|
return |
|
|
|