Project

General

Profile

Actions

Non-Function #78

closed

[API] 상품 재고량 처리 (product stock count process)

Added by Deca Park about 1 year ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Assignee:
Start date:
07/27/2023
Due date:
% Done:

0%

Estimated time:
Spent time:

Description

1.ADMIN

  1) 온라인몰 관리 > 상품 등록 관리 (/onlineProduct) > 상세 (Modify)

  • Spec: p2 (attach ppt)

2.API

  1) [API] 쇼핑몰 상품 리스트 (GET /api/mall_product_list), 상품정보 (GET /api/mall_product)

    1-1) Response > sold_out_yn (logic change)
      a) if st_product.sold_out_yn = 'Y', set 'Y'
      b) else
        b-1) if stock_count is NOT NULL AND stock_count <= 0, set 'Y'
          (* if stock_count is NULL(empty), sold_out_yn is set by 'N' - because it means that the product stock is not managed)
      c) if NOT a) or b), set 'N' 

  2) [API] PG 결제 컨펌 (POST /api/pay_confirm)

    a) if PG pay confirm API is success
      - append common order's product stock count process

  3) [Common] order's product stock count process
    - make common service(function) (it's called on other process)

    [Logic]
    a) if st_mall.mall_type is NOT  'online' (with st_order.mall_code), SKIP
    b) if st_mall.mall_type = 'online'

      b-1) SELECT DB (st_order_product)
        - select: order_count
        - condition: order_no = {order_no param}
      b-2) decrease product's stock_count of b-1) selected product list
        UPDATE DB (st_product)
        - stock_count = stock_count - order_count
          (if stock_count is minus, set by 0)


Files

재고(현재고)_en.pptx (732 KB) 재고(현재고)_en.pptx Deca Park, 07/27/2023 08:39 PM
Actions

Also available in: Atom PDF