Explorar el Código

update

add_mode
DengBiao hace 1 año
padre
commit
84688ba4b8
Se han modificado 2 ficheros con 28 adiciones y 6 borrados
  1. +16
    -5
      app/customer/md/md_order.go
  2. +12
    -1
      app/customer/svc/order/svc_central_kitchen_for_school_order.go

+ 16
- 5
app/customer/md/md_order.go Ver fichero

@@ -46,11 +46,22 @@ type CentralKitchenForSchoolMyReserveResp struct {
}

type CentralKitchenForSchoolMyReserveRespList struct {
Date string `json:"date" label:"日期"`
BreakfastTotal int `json:"breakfast_total" label:"早餐-总计"`
LunchTotal int `json:"lunch_total" label:"午餐-总计"`
DinnerTotal int `json:"dinner_total" label:"晚餐-总计"`
OrdNoList []string `json:"ord_no_list" label:"订单编号列表"`
Date string `json:"date" label:"日期"`
BreakfastTotal int `json:"breakfast_total" label:"早餐-总计"`
LunchTotal int `json:"lunch_total" label:"午餐-总计"`
DinnerTotal int `json:"dinner_total" label:"晚餐-总计"`
BreakfastOrdNoList []struct {
OutTradeNo string `json:"out_trade_no" label:"业务订单号"`
Id int `json:"id" label:"就餐记录id"`
} `json:"breakfast_ord_no_list" label:"早餐-订单列表"`
LunchOrdNoList []struct {
OutTradeNo string `json:"out_trade_no" label:"业务订单号"`
Id int `json:"id" label:"就餐记录id"`
} `json:"lunch_ord_no_list" label:"午餐-订单列表"`
DinnerOrdNoList []struct {
OutTradeNo string `json:"out_trade_no" label:"业务订单号"`
Id int `json:"id" label:"就餐记录id"`
} `json:"dinner_ord_no_list" label:"晚餐-订单列表"`
}

type SelfSupportForSchoolOrderListReq struct {


+ 12
- 1
app/customer/svc/order/svc_central_kitchen_for_school_order.go Ver fichero

@@ -175,17 +175,28 @@ func CentralKitchenForSchoolMyReserve(userIdentityId int, date, startDate, endDa
dateMap[v.Date] = &md.CentralKitchenForSchoolMyReserveRespList{}
}
dateMap[v.Date].Date = v.Date
dateMap[v.Date].OrdNoList = append(dateMap[v.Date].OrdNoList, v.OrdNo)
total++
if v.Kind == enum.CentralKitchenForSchoolUserWithDayKindForBreakfast {
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})
totalBreakfast++
dateMap[v.Date].BreakfastTotal++
}
if v.Kind == enum.CentralKitchenForSchoolUserWithDayKindForLunch {
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})
totalLunch++
dateMap[v.Date].LunchTotal++
}
if v.Kind == enum.CentralKitchenForSchoolUserWithDayKindForDinner {
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})
dateMap[v.Date].DinnerTotal++
totalDinner++
}


Cargando…
Cancelar
Guardar