Browse Source

update

add_mode
DengBiao 1 year ago
parent
commit
f3a54c3483
1 changed files with 21 additions and 15 deletions
  1. +21
    -15
      app/customer/svc/order/svc_central_kitchen_for_school_order.go

+ 21
- 15
app/customer/svc/order/svc_central_kitchen_for_school_order.go View File

@@ -184,29 +184,35 @@ func CentralKitchenForSchoolMyReserve(userIdentityId int, date, startDate, endDa
}
dateMap[v.Date].Date = v.Date
total++
if v.Kind == enum.CentralKitchenForSchoolUserWithDayKindForBreakfast && v.State == enum.CentralKitchenForSchoolUserWithDayStateForWait {
dateMap[v.Date].BreakfastOrdNoList = append(dateMap[v.Date].BreakfastOrdNoList, struct {
OutTradeNo string `json:"out_trade_no" label:"业务订单号"`
Id int `json:"id" label:"就餐记录id"`
}{OutTradeNo: v.OrdNo, Id: v.Id})
if v.Kind == enum.CentralKitchenForSchoolUserWithDayKindForBreakfast {
totalBreakfast++
dateMap[v.Date].BreakfastTotal++
if v.State == enum.CentralKitchenForSchoolUserWithDayStateForWait {
dateMap[v.Date].BreakfastOrdNoList = append(dateMap[v.Date].BreakfastOrdNoList, struct {
OutTradeNo string `json:"out_trade_no" label:"业务订单号"`
Id int `json:"id" label:"就餐记录id"`
}{OutTradeNo: v.OrdNo, Id: v.Id})
}
}
if v.Kind == enum.CentralKitchenForSchoolUserWithDayKindForLunch && v.State == enum.CentralKitchenForSchoolUserWithDayStateForWait {
dateMap[v.Date].LunchOrdNoList = append(dateMap[v.Date].BreakfastOrdNoList, struct {
OutTradeNo string `json:"out_trade_no" label:"业务订单号"`
Id int `json:"id" label:"就餐记录id"`
}{OutTradeNo: v.OrdNo, Id: v.Id})
if v.Kind == enum.CentralKitchenForSchoolUserWithDayKindForLunch {
totalLunch++
dateMap[v.Date].LunchTotal++
if v.State == enum.CentralKitchenForSchoolUserWithDayStateForWait {
dateMap[v.Date].LunchOrdNoList = append(dateMap[v.Date].BreakfastOrdNoList, struct {
OutTradeNo string `json:"out_trade_no" label:"业务订单号"`
Id int `json:"id" label:"就餐记录id"`
}{OutTradeNo: v.OrdNo, Id: v.Id})
}
}
if v.Kind == enum.CentralKitchenForSchoolUserWithDayKindForDinner && v.State == enum.CentralKitchenForSchoolUserWithDayStateForWait {
dateMap[v.Date].DinnerOrdNoList = append(dateMap[v.Date].BreakfastOrdNoList, struct {
OutTradeNo string `json:"out_trade_no" label:"业务订单号"`
Id int `json:"id" label:"就餐记录id"`
}{OutTradeNo: v.OrdNo, Id: v.Id})
if v.Kind == enum.CentralKitchenForSchoolUserWithDayKindForDinner {
dateMap[v.Date].DinnerTotal++
totalDinner++
if v.State == enum.CentralKitchenForSchoolUserWithDayStateForWait {
dateMap[v.Date].DinnerOrdNoList = append(dateMap[v.Date].BreakfastOrdNoList, struct {
OutTradeNo string `json:"out_trade_no" label:"业务订单号"`
Id int `json:"id" label:"就餐记录id"`
}{OutTradeNo: v.OrdNo, Id: v.Id})
}
}
//}
}


Loading…
Cancel
Save