Project

General

Profile

Actions

Non-Function #275

closed

[판매처리] 판매 처리 데이터 전송

Added by Jisoo Choi 9 months ago. Updated 9 months ago.

Status:
Closed
Priority:
High
Assignee:
Start date:
12/18/2023
Due date:
% Done:

0%

Estimated time:
Spent time:

Description

 

 

 

현재 운영 기준 스토리 오더 주문 직접 추가 데이터 외에는 주문 데이터가 가지 않고 있는 것 같습니다.

12월 1일 오전 1건 이후 데이터 발송이 되지 않는 것으로 보이며, 12월 1일은 결제 관련 장애가 있었던 날입니다.

해당 장애 이후로 데이터 발송이 되지 않은 것 같습니다.

 

2023-12-01~현재까지의 수령완료 데이터 278개, 매장취소(환불) 데이터 79개 정도가 있는데, 

코레일유통 쪽에서 수신된 데이터는 7개입니다 !

 

 

 

 

 


Files

Actions #1

Updated by Jisoo Choi 9 months ago

  • Tracker changed from Bug to Non-Function

 

 

일단

1. 우리쪽에 발송 및 처리 결과 로그 추가

2. 정상 발송되는지 테스트

3. 전송되는 주문 상태 확인, 필요 시 수정

4. 코레일유통 쪽 정상 수신 확인

 

으로 처리할 예정입니다.

12월 19일에 처리하게 될 것 같습니다 !

Actions #2

Updated by Jisoo Choi 9 months ago

 

 

 

코레일유통으로부터 12월 1일부터 수신된 내역만 전달을 받았습니다.(엑셀 파일)

 

12월 1일부터 12월 31일까지의 주문 내역 616개(2023-12-19 14:28 기준) 중

1. 수령완료(SS04) 312건 중 기전송 40건을 제외한 272건

2. 자동확정(SS06) 112건 

3. 매장취소(환불)(SS11) 21건 중 기전송 12건을 제외한 9건

 

을 다시 전송할 수 있을까요?

대표님도 우리 쪽에서 해당 데이터들을 다시 전송해보고 그래도 안 수신이 안 된다고 하면 다시 확인이 필요할 것 같다고 합니다.

우선 어제는 수령완료 3건, 매장취소(환불) 1건이 발송되었습니다.

 

에이전트에서 수령 완료 또는 매장취소(환불)하는 경우도 혹시 관련이 있을지를 확인 부탁드리고 싶습니다.

추가로 전달드려야 하는 내용이 있다면 말씀 부탁드립니다 !

 

 

 

 

Actions #3

Updated by Jisoo Choi 9 months ago

 

 

 

판매 처리 데이터 보내야 하는 경우

1. 수령완료일 때 : SS04

2. 수령완료였다가 매장취소(환불)로 변경되었을 때 : SS04 -> SS11

3. 자동확정일 때 : SS06

4. 자동확정이었다가 매장취소(환불)로 변경되었을 때 : SS06 -> SS11

 

 

Actions #4

Updated by Jisoo Choi 9 months ago

 

 

해당 이슈 처리 예정 순서입니다.

 

1. 개발 내용 수정 및 신규 개발

- 판매 처리 데이터 (자동) 발송 유형 4가지 반영

- 에이전트에서 상태값 변경 시 판매 처리 데이터 발송 반영

- 판매 처리 데이터 (수동) 발송 API 개발

*수동 발송의 경우 관리자 페이지에 추가될 필요는 없다고 합니다.

**개발에서의 판매 처리 데이터를 보내지 않아도 될지는 확인 요청드렸습니다.

 

2. 코레일유통 쪽에 12월 수신 데이터 엑셀 파일 재요청

- 해당 시점의 데이터를 받은 후, 발송되지 않은 데이터만 추가로 수동 발송하려고 합니다.

*주문번호는 제가 xlsx 또는 txt 형태로 전달드리겠습니다.

 

 

유선상으로 전달드린 내용 함께 기록합니다.

 

1. 수령완료일 때 : SS04 = 결제

2. 수령완료였다가 매장취소(환불)로 변경되었을 때 : SS04 -> SS11 = 결제취소

3. 자동확정일 때 : SS06 = 결제

4. 자동확정이었다가 매장취소(환불)로 변경되었을 때 : SS06 -> SS11 = 결제취소

 

에이전트에서 상태값 변경되는 경우에도 관리자 페이지에서 변동되는 경우와 동일하게 적용합니다.

 

 

 

 

 

 

Actions #5

Updated by Deca Park 9 months ago

[ADMIN]

1.StoreOrderController.save()

  1) change logic
    a) isReceiveOrderProduct
      (!"SS04".equals(currentSmartOrderStatus) && "SS04".equals(newSmartOrderStatus)) ||
      (!"SS06".equals(currentSmartOrderStatus) && "SS06".equals(newSmartOrderStatus))
    b) isCancelOrderProduct
      ("SS04".equals(currentSmartOrderStatus) && "SS11".equals(newSmartOrderStatus)) ||
      ("SS06".equals(currentSmartOrderStatus) && "SS11".equals(newSmartOrderStatus))

2.ProductApiService.insertOrCancelSaleInfo()

  1) after API is done
    a) INSERT DB (st_krs_sale_proc) (NEW)
    - prod_id: UUID
    - order_no/mall_code: param
    - smart_order_status: newSmartOrderStatus
    - send_date: API proc datetime
    - result_cd/result_msg: API return values

[API]

1.AgentController.storeOrderStatusNew()

  1) add logic
    a) isReceiveOrderProduct / isCancelOrderProduct
      - same with [ADMIN] No 1

2.ProductApiService.insertOrCancelSaleInfo()

  1) after API is done : same with [ADMIN] No 2

Actions #6

Updated by Deca Park 9 months ago

  • Assignee changed from Deca Park to bryant bryant
Actions #7

Updated by Deca Park 9 months ago

[API] POST /api/order_krs_sale_proc (주문 수동 KRS 판매 처리) - NEW

1.RequestBody
  1) file : txt file with order_no

2.Process
  1) read txt file
  2) check if read order_no exists
    - if not exists, SKIP
  3) check order_no's smart_order_status
    - if smart_order_status is not 'SS04','SS06','SS11', SKIP
  4) call krs sales API
    a) isReceiveOrderProduct
      - smart_order_status: 'SS04','SS06'
    b) isCancelOrderProduct
      - smart_order_status: 'SS11'
    c) call API
      - same logic with ProductApiService.insertOrCancelSaleInfo()
  5) response
    - "total_count" : read count
    - "proc_count" : proc count
    - "skip_count" : skip count
    - "skip_order_no" : skip order_no (ex: "1,2,3")

Actions #8

Updated by Jisoo Choi 9 months ago

 

 

기존에 개발과 운영 API가 동일했는데,

코레일유통 쪽에는 개발 서버가 따로 없기 때문에

우리 개발 쪽의 데이터는 판매 처리 API를 통해 넘기지 말아달라고 전달 받았습니다.

Actions #9

Updated by Deca Park 9 months ago

[ADMIN/API] 

1.properties
  1) dev
    #KRS sales proc flag
    KRS.sale.proc=N
  2) prod
    #KRS sales proc flag
    KRS.sale.proc=Y

2.logic
  1) if KRS.sale.proc=Y
    - call ProductApiService.insertOrCancelSaleInfo()

    - if N, don't call

Actions #10

Updated by bryant bryant 9 months ago

  • Status changed from New to Resolved
  • Assignee changed from bryant bryant to Deca Park
Actions #11

Updated by Deca Park 9 months ago

[처리 결과]

1.[ADMIN] 스토리 오더 관리 > 주문관리 : 처리완료 (자동확정 상태 처리)

2.[API] PUT /api/agent/store_order_status_new (에이전트 - 매장 주문 상태 변경) : 처리완료 (KRS 판매처리 로직 추가)

3.[API] POST /api/order_krs_sale_proc (주문 수동 KRS 판매 처리) : 신규 개발

  • 업로드 파일형식은 txt 파일 (첨부 파일 참조)
Actions #12

Updated by Deca Park 9 months ago

  • Assignee changed from Deca Park to Jisoo Choi
Actions #13

Updated by Deca Park 9 months ago

[ADMIN/API] ProductApiService.insertOrCancelSaleInfo()

1.buildSaleInfo()
  1) setSaleDate / setSaleTime
    - set by st_order.reg_date

[error]

2023-12-26 12:37:55,470 ERROR [com.stoneitgt.user.controller.AgentController] null
java.lang.NullPointerException: null
        at com.stoneitgt.user.services.ProductApiService.buildSaleInfo(ProductApiService.java:129) ~[classes/:?]
        at com.stoneitgt.user.services.ProductApiService.insertOrCancelSaleInfo(ProductApiService.java:55) ~[classes/:?]

Actions #14

Updated by Jisoo Choi 9 months ago

  • Status changed from Resolved to Closed
Actions #15

Updated by Deca Park 9 months ago

  • Status changed from Closed to Feedback
  • Assignee changed from Jisoo Choi to bryant bryant

[ADMIN] Scheduler - changeSmartOrderStatusToReceiveWait

1.logic
  1) add KRS sales proc
    - refer to StoreOrderController : line 283

Actions #16

Updated by bryant bryant 9 months ago

  • Status changed from Feedback to Resolved
  • Assignee changed from bryant bryant to Deca Park
Actions #17

Updated by Deca Park 9 months ago

  • Assignee changed from Deca Park to Jisoo Choi
Actions #18

Updated by Jisoo Choi 9 months ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF