소스 검색

Улучшение корзины

Vadim 2 달 전
부모
커밋
2a2136509c
2개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 0
      src/api/v_0.1.0/client/client-shop-api.ts
  2. 4 1
      src/modules/client/shop/cart/cart-service.ts

+ 1 - 0
src/api/v_0.1.0/client/client-shop-api.ts

@@ -38,6 +38,7 @@ class ClientShopApi {
               peMemberIdentity: z.string().nullable(),
 
               addedAt: z.string().datetime(),
+              orderId: z.string().uuid().nullable(),
             }),
           ),
         })

+ 4 - 1
src/modules/client/shop/cart/cart-service.ts

@@ -95,6 +95,7 @@ class CartService {
 
             name: DbSchema.shop.products.name,
             addedAt: DbSchema.shop.cartItems.addedAt,
+            orderId: DbSchema.shop.cartItems.orderId.nullable(),
           }),
         ),
       }),
@@ -127,7 +128,9 @@ class CartService {
               'peMemberIdentity', ui.identity,
 
               'name', p."name",
-              'addedAt', to_char(ci.added_at AT TIME ZONE 'UTC', 'YYYY-MM-DD"T"HH24:MI:SS.MS') || 'Z'
+              'addedAt', to_char(ci.added_at AT TIME ZONE 'UTC', 'YYYY-MM-DD"T"HH24:MI:SS.MS') || 'Z',
+
+              'orderId', ci.order_id
             )) items
           from
             shop.cart_items ci