Selaa lähdekoodia

update

master
dengbiao 4 kuukautta sitten
vanhempi
commit
1e041a1e19
1 muutettua tiedostoa jossa 18 lisäystä ja 18 poistoa
  1. +18
    -18
      app/admin/svc/enterprise_manage/svc_central_kitchen_for_school.go

+ 18
- 18
app/admin/svc/enterprise_manage/svc_central_kitchen_for_school.go Näytä tiedosto

@@ -1177,17 +1177,17 @@ func CentralKitchenForSchoolReserveList(c *gin.Context, req md.CentralKitchenFor
}
}

var centralKitchenForSchoolUserWithDayIds []string
if req.StartDate != "" && req.EndDate != "" {
var m []model.CentralKitchenForSchoolUserWithDay
if err1 := db.Db.Where("state != ?", enum2.CentralKitchenForSchoolUserWithDayStateForCancel).
And("date >= ? And date <= ?", req.StartDate, req.EndDate).Asc("date").Find(&m); err != nil {
return nil, 0, err1
}
for _, v := range m {
centralKitchenForSchoolUserWithDayIds = append(centralKitchenForSchoolUserWithDayIds, v.OrdNo)
}
}
//var centralKitchenForSchoolUserWithDayIds []string
//if req.StartDate != "" && req.EndDate != "" {
// var m []model.CentralKitchenForSchoolUserWithDay
// if err1 := db.Db.Where("state != ?", enum2.CentralKitchenForSchoolUserWithDayStateForCancel).
// And("date >= ? And date <= ?", req.StartDate, req.EndDate).Asc("date").Find(&m); err != nil {
// return nil, 0, err1
// }
// for _, v := range m {
// centralKitchenForSchoolUserWithDayIds = append(centralKitchenForSchoolUserWithDayIds, v.OrdNo)
// }
//}

//var months []time.Month
//if req.StartDate != "" {
@@ -1237,10 +1237,10 @@ func CentralKitchenForSchoolReserveList(c *gin.Context, req md.CentralKitchenFor
if req.Name != "" {
sess.And("user_identity.name like ?", "%"+req.Name+"%")
}
//if req.StartDate != "" {
// sess.And("central_kitchen_for_school_package_ord_for_reserve.meal_time_start >= ?", req.StartDate).
// And("central_kitchen_for_school_package_ord_for_reserve.meal_time_start <= ?", req.StartDate)
//}
if req.StartDate != "" {
sess.And("central_kitchen_for_school_package_ord_for_reserve.meal_time_start <= ?", req.StartDate).
And("central_kitchen_for_school_package_ord_for_reserve.meal_time_end >= ?", req.StartDate)
}
if req.Phone != "" {
if req.Phone != "" {
userDb := db.UserDb{}
@@ -1263,9 +1263,9 @@ func CentralKitchenForSchoolReserveList(c *gin.Context, req md.CentralKitchenFor
if len(classWithUserIdentityIdsTwo) > 0 {
sess.In("user_identity.id", classWithUserIdentityIdsTwo)
}
if len(centralKitchenForSchoolUserWithDayIds) > 0 {
sess.In("central_kitchen_for_school_package_ord_for_reserve.out_trade_no", centralKitchenForSchoolUserWithDayIds)
}
//if len(centralKitchenForSchoolUserWithDayIds) > 0 {
// sess.In("central_kitchen_for_school_package_ord_for_reserve.out_trade_no", centralKitchenForSchoolUserWithDayIds)
//}
//if len(months) > 0 {
// sess.In("central_kitchen_for_school_package_ord_for_reserve.reserve_month", months)
//}


Ladataan…
Peruuta
Tallenna