Project

General

Profile

Actions

New Function #410

closed

[DATA/ADMIN/API/APP] 구독 상품

Added by Jisoo Choi 5 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Assignee:
Start date:
04/18/2024
Due date:
% Done:

0%

Estimated time:
Spent time:

Description

 

 

1. KRS에서 구독 상품 정보 수신

  *스토리 오더 전문점 상품과 거의 동일한 형태로 수신(20개 묶음일 시, 20개 = 1개 상품 으로 분류)

 

2. APP에서 구독 상품 정보 표출 -> 주문

   *주문 생성 시, 전체(1개 상품 내의 20개 수량)에 대한 판매 처리

   **주문 생성 시점의 구독 상품 정보 저장 필요(상품 정보가 바뀌어도 기존 구매 상품은 그대로 처리)

   ***구독 상품의 경우, 1개 이상 주문 불가능하도록 제한 / 장바구니 이용이 불가능하도록 제한 

 

3. 구독 상품 이용: 오프라인 매장에서 QR 제시

   *QR 1회 이용 시 구독 상품 잔여 개수 1개 차감 / 1일 최대 2개까지 수령 가능

   **POS와의 통신을 위한 API 필요(pos-controller의 (POST)/api/pos/order_product_receive와 거의 동일)

   ***상품에 대한 판매 처리는 주문 시점에 완료되었으므로 수령 시점에 따로 판매 처리를 하지 않습니다.(잔여 수량 및 잔여 기간에 대한 것도 KRS에 공유하지 않음)

 

4. 구독 상품 취소: 전체 취소(환불) 및 전체 판매 처리 취소

   *잔여 수량과 상관없이 주문 시점의 전체(1개 상품 내의 20개 수량)에 대해 판매 취소 처리를 합니다. (재결제는 현장에서 진행하므로 우리와는 무관)

   **카드 및 간편 결제 기준 취소는 약 1년까지 가능한 것으로 보여 큰 문제는 없을 것 같습니다. 취소 처리가 불가할 시, 관리자 페이지에서 "취소가 불가합니다." 팝업 알림만 띄워주시면 될 것 같습니다.

 

 

혹시 이상한 부분이나 확인이 필요한 부분이 있다면 말씀 부탁드립니다 !

 

 

 

 

 


Files

Actions #1

Updated by Jisoo Choi 5 months ago

 

 

 

퍼블리싱 수정 경로 및 파일입니다.

 

 - 스토리오더 구독상품 아이템 상세 화면 안내문구 변경
- 스토리오더 구독상품 주문하기 화면 안내문구 변경, 요청사항 영역 삭제
- 스토리오더 구독상품 주문완료 화면 수령번호 삭제, 안내문구 변경, 구독기간 대한 값을 날짜 형식으로 변경, 하단부 버튼의 텍스트 변경
- 마이페이지 인덱스 화면 구독상품 메뉴 링크 되살림
- 마이페이지 구독상품 화면 상품 구독 상태 변경, 문의 페이지 관련 버튼 삭제, 구독 연장 영역에  현재 연장 횟수 표기
- 마이페이지 구독상품 화면 QR 팝업 안내문구 변경, 수령기록 팝업 수령일시에 시간 추가views\pages\smartorder\itemView.html
views\pages\smartorder\payment.html
views\pages\smartorder\orderComplete.html
views\pages\mypage\userinfo.html
views\pages\mypage\subscription.html/public/scss/common.scss
/public/css/common.css

 

 

 

 

 

Actions #2

Updated by Deca Park 5 months ago

  • File 코레일유통_구독상품_ADMIN_en_20240420.pptx added

[ADMIN] 구독 상품 (subscribe product)

1.Spec change

  • 코레일유통_구독상품_ADMIN_en_20240423.pptx
Actions #3

Updated by Deca Park 5 months ago

  • File deleted (코레일유통_구독상품_ADMIN_en_20240420.pptx)
Actions #4

Updated by Deca Park 5 months ago

  • File 코레일유통_구독상품_ADMIN_en_20240423.pptx added
Actions #5

Updated by Deca Park 5 months ago

  • File deleted (코레일유통_구독상품_ADMIN_en_20240423.pptx)
Actions #7

Updated by Toby Pham 5 months ago

  • Status changed from New to In Progress
  • Assignee changed from Deca Park to Toby Pham
Actions #8

Updated by Toby Pham 5 months ago

  • Status changed from In Progress to Resolved
  • Assignee changed from Toby Pham to Deca Park
Actions #9

Updated by Deca Park 5 months ago

  • File 코레일유통_구독상품_APP_20240425.pptx added

[APP] subscribe product

1.Spec

Actions #10

Updated by Deca Park 5 months ago

  • Status changed from Resolved to In Progress
  • Assignee changed from Deca Park to Toby Pham
Actions #11

Updated by Deca Park 5 months ago

[API] POST /store_order_subscribe (구독상품 주문)
- refer to /store_order

1.logic (difference with /store_order)
  1) if (orderVO.getPaymentAmount() == null || orderVO.getPaymentAmount() == 0) - PG is not called
    a) don't process processMinusStockCount() (bcz stock_count is not managed)
    b) process productApiService.insertOrCancelSaleInfo()
  2) DB (st_order)
    0) order_type : 'subscribe'
    a) subscribe_status : 'SU01' -> NULL
    b) subscribe_start_date : set by today
    c) subscribe_end_date : set by today + {st_product.subscribe_days}
    d) subscribe_count : set by {st_product.subscribe_count}
    e) subscribe_days : set by {st_product.subscribe_days}
    f) subscribe_extend_yn : set by {st_product.subscribe_extend_yn}
    g) subscribe_extend_days : set by {st_product.subscribe_extend_days}
    h) smart_order_status : NULL (it's not used)

[API] POST /pay_confirm

1.logic (change)
  1) if order_type = 'subscribe'
    a) don't process processMinusStockCount() (bcz stock_count is not managed)
    b) process productApiService.insertOrCancelSaleInfo()
    c) don't make {receive_no} (line: 902)

[API] GET /order

1.add response
  - order_type / subscribe_status / subscribe_start_date / subscribe_end_date

 

[API] GET /api/subscribe/product_list (구독상품 리스트)

1.Response
  1) add fields
    a) subscribe_count : 구독상품개수(총이용상품수)
      - set by {st_order.subscribe_count}
    b) receive_count : 구독상품 이용개수
      - SUM(product_count) FROM st_order_subscribe_receive WHERE order_no={the order_no}
    c) subscribe_extend_yn : 사용자구독연장가능여부
      - set by {st_order.subscribe_extend_yn}
    d) subscribe_extend_count : 구독상품 연장횟수
      - COUNT(*) FROM st_order_subscribe_extend WHERE order_no={the order_no} AND extend_type='user'
 

Actions #12

Updated by Deca Park 5 months ago

[API] GET /api/pos/order_subscribe_product_receive (스마트오더 구독상품 수령 완료)

- refer to GET /api/pos/user_point_use

1.Request parameters
  a) access_token
  b) id
  c) mall_code
  d) order_no

2.logic

  1) validate parameters
    a) access_token / id / mall_code / order_no : refer to user_point_use API
    b) order_no
      b-1) if {st_order.order_type} != 'subscribe'
        - return error msg: [subscribe.error.notSubscribeOrder] "구독상품 주문이 아닙니다."
    c) if {st_order.subscribe_end_date} < today
      - return error msg: [subscribe.error.expirePeriod] "구독 기간 만료로 수령이 불가합니다."
    d) if {st_order.subscribe_count} <= {receiveCount}
      - {receiveCount} : SUM(product_count) FROM st_order_subscribe_receive WHERE order_no={the order_no}
      - return error msg: [subscribe.error.allReceived] "잔여 수량이 없어 수령이 불가합니다."
    e) if {todayReceiveCount} >= 2
      - {todayReceiveCount} : COUNT FROM st_order_subscribe_receive WHERE order_no={the order_no} AND reg_date={today}
      - return error msg: [subscribe.error.overReceiveCount] "하루 최대 2개까지만 수령이 가능합니다."

  2) process
    a) INSERT st_order_subscribe_receive
      order_no: order_no param
      seq_no : max(seq_no) + 1 per order_no
      mall_code : mall_code of the order_no
      product_code : order's product_code
      product_count : 1
      reg_date / reg_user_seq
 

Actions #13

Updated by Deca Park 5 months ago

  • File deleted (코레일유통_구독상품_APP_20240425.pptx)
Actions #15

Updated by Deca Park 5 months ago

[ADMIN] 스토리 오더 관리 > 구독 상품 주문 관리 > 상세 (Modify)

1.구독 상태 : {subscribe_status} field (-> apply into List page > Grid > 구독상태 column too)
  1) logic change
    a) if {subscribe_status} != NULL
      - show SU code name with the value
    b) else
      a-1) if st_order.subscribe_start_date <= today <= subscribe_end_date
        - show SU01 (구독중)
      a-2) if subscribe_end_date < today
        - show SU02 (구독만료)

2.저장 (Save) - logic change
  1) if {subscribe_status} is changed with SU03 (구독취소 - cancel subscribe)
    a) call PG cancel 
      a-1) st_order_payment 
      a-2) st_order
        - subscribe_status = 'SU03', mod_date / mod_user_seq
        - don't update smart_order_status (it's kept with NULL)
    b) process productApiService.insertOrCancelSaleInfo()
      - cancel option

Actions #16

Updated by Toby Pham 5 months ago

  • Status changed from In Progress to Resolved
  • Assignee changed from Toby Pham to Deca Park
Actions #17

Updated by Jisoo Choi 4 months ago

 

 

 

구독 관련 내용은 코레일유통에서도 데이터 추가 및 개발 처리를 해줘야 하는 부분이라서 5월 10일까지 처리 완료해야 하는 내용에서 빼기로 했습니다.

이 부분은 다른 이슈 처리하고 따로 논의해서 일정을 잡는 걸로 얘기해서, 기존 개발하시던 내용에서 연동이 필요한 부분은 보류 부탁드립니다.

 

 

 

Actions #18

Updated by Deca Park 4 months ago

  • Status changed from Resolved to In Progress
Actions #19

Updated by Deca Park 4 months ago

[APP] 구독상품 (/mypage/subscribe)

1.field
  1) 잔여 (remains)
    - remove '잔여' text (refer to attach image)

Actions #20

Updated by Deca Park 4 months ago

  • Status changed from In Progress to Feedback
  • Assignee changed from Deca Park to Toby Pham
Actions #21

Updated by Deca Park 4 months ago

[ADMIN] 구독 상품 등록 관리 (/subscribeProduct) > 상세 (Modify)

1.currently, page is not displayed (http://210.123.124.139:8084/subscribeProduct/PD10002?menuCode=M7010)

2.fields
  1) 구독기간 / 사용자 연장일
    - append '일' unit (append after inputbox(readonly))
  3) 총 이용 상품 수
    - append '개' unit (append after inputbox(readonly))

 

[ADMIN] 구독 상품 주문 관리 (/subscribeOrder) > 상세 (Modify)

1.fields
  1) 현재 이용 수량
    - 잔여 (remain count) : = subscribe_count - receive count (fix)
  2) 구독기간 / 사용자 연장일
    - append '일' unit (append after inputbox(readonly))
  3) 현재 이용 수량 / 총 이용 상품 수
    - append '개' unit (append after inputbox(readonly))

[ADMIN] 구독 상품 연장 관리 (/subscribeExtend) > 상세 (Modify)

1.field
  1) 구독 상태
    - same with comment 15 (apply into Grid > 구독 상태 column too)

  2) 구독기간
    - append '일' unit (append after inputbox(readonly))

  3) 총 이용 상품 수
    - append '개' unit (append after inputbox(readonly))

2.수령 기록 (receive history) modal
  1) Grid columns
    - decrease 수령일시 width and increase 매장명 width

3.관리자 연장 (admin subscribe extend) 
  1) 연장 (extend)
    a) fix logic
      - subscribe_start_date : no change
      - subscribe_end_date : is extended

Actions #22

Updated by Toby Pham 4 months ago

  • Description updated (diff)
  • Status changed from Feedback to Resolved
  • Assignee changed from Toby Pham to Deca Park
Actions #23

Updated by Jisoo Choi about 1 month ago

  • Status changed from Resolved to Closed
  • Assignee changed from Deca Park to Jisoo Choi

 

[기록] 코레일유통 쪽에서 보류(진행을 위해 필요한 답변 x)한 건이라서 일단 closed 처리합니다.

 

Actions

Also available in: Atom PDF