Project

General

Profile

Actions

Task #71

closed

Task #9: Create Basic Design for Change request

BD-Design External API (Rakuichi)

Added by dang dao 6 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Start date:
07/04/2025
Due date:
08/20/2025
% Done:

90%

Estimated time:

Description

Đợt này phía owner sẽ cần call các API bên rakuichi. mình cần tạo I/F API để bên rakuichi biết cần phải làm gì.
Spec API sẽ tạo trên đây

https://github.com/shoji-nao/rakuichi-space-spec/blob/main/api/rakuichi-space-admin-api.yaml

  1. api lấy thông tin detail của 1 order.
    khi di chuyển đến màn hình order detail

  2. khi update place calendar -> facility calendar

  • update status
  • update giá
  1. update place
  • đơn giá
  • các field khác
  1. search order
  • search by filter
  1. update order
  • update status, send memo

Files

RakuichiAPIDoc.yaml (70.9 KB) RakuichiAPIDoc.yaml Nghia Nguyen, 07/09/2025 05:05 PM
Actions #1

Updated by dang dao 6 months ago

  • Subject changed from BD-Design External API to BD-Design External API (Rakuichi)
Actions #2

Updated by Nghia Nguyen 5 months ago

  • File RakuichiAPIDoc.yaml added

a @dang dao, e có viết thử tài liệu API trong file yaml này, chắc a copy nội dung của file rồi paste lên https://editor.swagger.io/ xem thử chứ e chưa tìm hiểu host cái này thế nào.

Actions #3

Updated by Nghia Nguyen 5 months ago

Nội dung trong tài liệu ngoài những API kể ở trên, e có viết thêm tài liệu cho những API get master data từ Rakuichi. Những data này hiện tại đang được lấy trực tiếp từ database Rakuichi, e nghĩ sau này cũng sẽ chuyển qua call API nên viết luôn

Actions #4

Updated by Nghia Nguyen 5 months ago

  • Status changed from New to In Progress
  • Assignee changed from Nghia Nguyen to dang dao
  • % Done changed from 0 to 50

Một số field từ Facility Owner e ko chắc nên map với field nào bên Rakuichi System.
E đang giả định là:
orders.owner_account_name (Facility Owner) = orders.admin_account_name (Rakuichi)
orders.owner_order_id (Facility Owner) = orders.id (Rakuichi)
実施場所ID là orders.facility_id (Rakuichi)
独自実施場所ID là orders.owner_no (Rakuichi)
...

Actions #5

Updated by Nghia Nguyen 5 months ago

  • File deleted (RakuichiAPIDoc.yaml)
Actions #8

Updated by Nghia Nguyen 5 months ago

E đang push tạm thời lên đây
https://app.swaggerhub.com/apis-docs/clmtnghia/RakuichiExternalAPI/1.0.0

a @dang dao review giúp e xem chỗ nào cần update. Xong hết e sẽ push lên git kia sau

Actions #9

Updated by dang dao 5 months ago

@Nghia Nguyen a có review

  1. api get order detail
  • hình như e viết theo table design cũ có field facility id. update lại theo table design mới nhất hén.
  • field block_address lấy từ đâu ? ( ko thấy trong table order)
  • field power ở đâu ra ? ( ko thấy trong table order)
  • e xem lại danh sách field response koi có dư/thiếu field nào nữa ko hén
  • chỗ này sẽ lấy data từ order và order status ?
  1. api get list order
  • owner_no là field gì ?
  • thiếu mấy field liên quan đến place
  • a thấy thiếu nhiều field lắm. dò lại list field cho phép filter trên màn hình list hén. đảm bảo các field đó phải có trong api này
Actions #10

Updated by dang dao 5 months ago

  • Due date changed from 07/11/2025 to 07/21/2025
  • Assignee changed from dang dao to Nghia Nguyen
  1. order tại sao chia làm 2 api ?
    a thấy chỉ cần 1 api update order là đủ rồi mà. nghiệp vụ có gì khác nhau sao ?

  2. mấy cái api khác tại sao cần làm ? holiday-master, facility-categories...

Actions #11

Updated by Nghia Nguyen 5 months ago

4. mấy cái api khác tại sao cần làm ? holiday-master, facility-categories...

→ Hiện tại facility owner đang select data trực tiếp từ table bên Rakuichi. E nghĩ sau này nên đổi qua call API hết nên những API này sẽ cần

Actions #12

Updated by Nghia Nguyen 5 months ago

order tại sao chia làm 2 api ?
a thấy chỉ cần 1 api update order là đủ rồi mà. nghiệp vụ có gì khác nhau sao ?
Rep:
E nghĩ 2 chỗ đó nghiệp vụ khác nhau nên tách ra 2 API.
API dùng để update status: API này chỉ thao tác trên table order_status
API update calendar khi update order: API này với payload là mảng các ngày được chọn, ko thao trên table order_status.

2 API thao tác trên các table khác nhau nên e nghĩ tách ra sẽ đỡ được đoạn if else. Sau này có thay đổi hay có bug cũng dễ điều tra hơn.

Actions #13

Updated by dang dao 5 months ago

  • Assignee changed from Nghia Nguyen to dang dao
Actions #14

Updated by dang dao 5 months ago

  • Due date changed from 07/21/2025 to 07/24/2025
  • Assignee changed from dang dao to Nghia Nguyen
  1. update order calendar ko cần thiết. owner system chỉ update được order của owner, khi update sẽ update thêm calendar bên phía rakuichi. nên chỗ này call api update calendar là được.
  2. thống nhất dùng put hết
  3. bỏ tên sync đi. place + calendar thôi
Actions #15

Updated by Nghia Nguyen 5 months ago

  • Due date changed from 07/24/2025 to 07/25/2025
Actions #16

Updated by Nghia Nguyen 5 months ago

  • Due date changed from 07/25/2025 to 07/29/2025
Actions #17

Updated by Nghia Nguyen 5 months ago

mấy cái comment ở trên e có update rồi nhưng mà chắc đợi e review lại các field trong response thêm lần nữa r dịch tài liệu qua tiếng Nhật

Actions #18

Updated by Nghia Nguyen 5 months ago

  • Due date changed from 07/29/2025 to 07/31/2025
Actions #19

Updated by dang dao 4 months ago

  • Due date changed from 07/31/2025 to 08/04/2025
Actions #20

Updated by Nghia Nguyen 4 months ago

  • Due date changed from 08/04/2025 to 08/11/2025
Actions #21

Updated by dang dao 4 months ago · Edited

@Nghia Nguyen a có review thêm

  1. api order list
  • phần sort e ghi Directions: asc (ascending), desc (descending) là ý như thế nào ?
  • trong response field cái pagination a thấy ko cần thiết. thêm 1 field hit để biết tổng data là được rồi. sau đó dựa vào offset với index để lấy là được rồi. bỏ field per_page luôn đi.
  • tên field response đặt lại cho khớp với trong db hén
  1. api order detail
  • xem lại tên field mapping với trong db
  • lấy thêm thông tin bên table order_date_prices
  1. api order/status
  • send mail là send từ owner system, chứ ko phải thông qua api. nên trong response của api e bỏ phần liên quan tới mail hén
  1. 2 api liên quan tới place
  • trong request params đổi tên place_id -> owner_place_id để phân biệt với id bên rakuichi

e sửa hết mấy ý trên đi rồi sắp xếp review với a 1 buổi. ok rồi thì mới dịch qua tiếng Nhật

Actions #22

Updated by dang dao 4 months ago

  • Due date changed from 08/11/2025 to 08/20/2025
Actions #23

Updated by Nghia Nguyen 4 months ago

Chỗ e host cái swagger hôm bữa hết hạn r. Nay e host trên source facility owner trên server dev luôn

https://facility-owner.columbusmantech.dev/api-docs/custom#/Orders/get_orders

Actions #24

Updated by Nghia Nguyen 4 months ago

trong request params đổi tên place_id -> owner_place_id để phân biệt với id bên rakuichi Field này đổi tên là owner_place_id để phân biệt thôi chứ lúc gọi từ Owner System qua Rakuichi System mình vẫn phải dùng field place.id mà đúng ko a? Chứ nếu dùng ownerPalceId có thể bị trùng

Actions #25

Updated by Nghia Nguyen 4 months ago

  • % Done changed from 50 to 90
Actions #26

Updated by Nghia Nguyen 4 months ago

  • Assignee changed from Nghia Nguyen to dang dao
Actions #27

Updated by Nghia Nguyen 4 months ago

Các field trong API GET Order List và Order Detail e đang lấy theo các field trong table bên Owner System.
Ban đầu e lấy theo bên Rakuichi System nhưng có mấy field nó khác tên nên cũng ko biết nó là field nào bên đó.

Actions #28

Updated by dang dao 3 months ago

  • Status changed from In Progress to Closed
Actions

Also available in: Atom PDF