Merge pull request 'Add znzt module' (#120) from fix-permissions into main
Deploy / deploy (push) Failing after 2m59s
Details
Deploy / deploy (push) Failing after 2m59s
Details
Reviewed-on: https://72.56.235.246.nip.io/gitea/romanskijdev/ruspet_portal_back/pulls/120
This commit is contained in:
commit
e73f03bf51
|
|
@ -75,10 +75,19 @@ func (s *MonthlyOrderService) GetMyOrderData(ctx context.Context, managerID uint
|
|||
}
|
||||
|
||||
// 3. Достаем черновики из нашей БД
|
||||
// (Предполагается, что вы добавите метод GetClientOrdersByManagerDB в dbcore)
|
||||
dbOrders, _ := s.ipc.Database.MonthlyOrders.GetClientOrdersByManagerDB(ctx, managerID, month, year)
|
||||
ordersMap := make(map[string]*typescore.MonthlyOrderClient)
|
||||
|
||||
for _, o := range dbOrders {
|
||||
if o.ID != nil {
|
||||
items, err := s.ipc.Database.MonthlyOrders.GetItemsByOrderIDDB(ctx, *o.ID)
|
||||
if err == nil && len(items) > 0 {
|
||||
for _, item := range items {
|
||||
o.Items = append(o.Items, *item)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if o.ClientName != nil {
|
||||
ordersMap[*o.ClientName] = o
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue