#fbfee
Back
2026/01/07
5 min read

派獎 - 審核紀錄

派獎 - 審核紀錄.md
175 additions, 0 deletions
... ... @@ -1 +1,176 @@
1 +### SUMMARY
2 +取得派獎設定審核紀錄。
3 +### REFERENCE TABLE
4 +* `DBMT.CMS_AUDIT_ENTRY`
5 +* `DBMT.CMS_AUDIT_LOG`
6 +
7 +### ATTRIBUTES
8 +* METHOD: **GET**
9 +* PATH: `/api/features/award/group/audit/logs/{id: int}`
10 +* LOGIN REQUIRED: **TRUE**
11 +* FEATURE: `AWARD_GROUP`
12 +* PERMISSION: `READ`
13 +* CRYPTO: **None**
14 +
15 +### REQUEST
16 +#### HEADERS
17 +
18 +| Name | Type/Len | Required(*) | Desc |
19 +| ---| ---| ---| --- |
20 +| Content-Type | String | * | `"application/json"` |
21 +| Authorization | String | * | JWT Token |
22 +| X-Request-Id | String | | X-Request-Id for api flow tracing |
23 +
24 +```json
25 +// Example:
26 +{
27 + "Content-Type": "application/json",
28 + "Authorization": "Bearer jwt-token",
29 + "x-request-id": "78f91284-d9df-43e6-a8d2-d557273c10bb"
30 +}
31 +```
32 +
33 +#### QUERY STRING
34 +
35 +| Level | Name | Type/Len | Required(*) | Nullable(*) | Desc |
36 +| ---| ---| ---| ---| ---| --- |
37 +| 1 | | | | | |
38 +
39 +### RESPONSE
40 +#### STATUS CODE
41 +* 200
42 +
43 +#### HEADERS
44 +
45 +| Name | Type/Len | Desc |
46 +| ---| ---| --- |
47 +| Authorization | String | JWT Token |
48 +| X-Request-Id | String | Returning Request-Id |
49 +
50 +```json
51 +// Example:
52 +{
53 + "Authorization": "Bearer jwt-token",
54 + "x-request-id": "78f91284-d9df-43e6-a8d2-d557273c10bb"
55 +}
56 +```
57 +
58 +#### BODY
59 +
60 +| Level | Name | Type/Len | Nullable(*) | Desc |
61 +| ---| ---| ---| ---| --- |
62 +| 1 | status | String | | 回應狀態 (SUCCESS, FAILURE) |
63 +| 1 | data | Dict | | 通用資料包裝 |
64 +
65 +#### Data
66 +
67 +| Level | Name | Type/Len | Nullable(*) | Desc |
68 +| ---| ---| ---| ---| --- |
69 +| 2 | items | List | | 結果列表 |
70 +
71 +#### Items
72 +
73 +| Level | Name | Type/Len | Nullable(*) | Desc |
74 +| ---| ---| ---| ---| --- |
75 +| 3 | award_group | Dict | | 派獎群組資訊 |
76 +| 3 | awards | List(Dict) | | 獎項設定列表 |
77 +
78 +#### award_group
79 +
80 +| Level | Name | Type/Len | Nullable(*) | Desc |
81 +| ---| ---| ---| ---| --- |
82 +| 4 | id | Integer | | 派獎群組 PK |
83 +| 4 | name | String | | 派獎群組名稱 |
84 +| 4 | status | Enum | | 狀態:<br>ACTIVE: 上架<br>INACTIVE: 下架<br>RETIRED: 永久下架 |
85 +| 4 | time_state | Enum | | 時間狀態:<br>PENDING: 尚未開始<br>PROGRESS: 進行中<br>FINISHED: 已結束 |
86 +| 4 | start_time | Datetime | | 派獎開始時間 |
87 +| 4 | end_time | Datetime | | 派獎結束時間 |
88 +| 4 | create_time | Datetime | | 建立時間 |
89 +| 4 | update_time | Datetime | | 更新時間 |
90 +
91 +#### awards (List Item)
92 +
93 +| Level | Name | Type/Len | Nullable(*) | Desc |
94 +| ---| ---| ---| ---| --- |
95 +| 4 | award | Dict | | 獎項資訊 |
96 +| 4 | prize | Dict | | 獎品資訊 |
97 +| 4 | notify | Dict | * | 推播通知資訊 |
98 +
99 +#### award
100 +
101 +| Level | Name | Type/Len | Nullable(*) | Desc |
102 +| ---| ---| ---| ---| --- |
103 +| 5 | id | Integer | | 獎項 PK |
104 +| 5 | code | String | | 獎項代碼 |
105 +| 5 | name | String | | 獎項名稱 |
106 +| 5 | group_id | Integer | | 所屬派獎群組 ID |
107 +| 5 | active_status | Enum | | 啟用狀態:<br>ACTIVE: 啟用<br>INACTIVE: 停用 |
108 +| 5 | process_status | Enum | | 處理狀態:<br>AVAILABLE: 可用<br>FULL: 已額滿<br>EXECUTED: 已執行 |
109 +| 5 | award_type | Enum | | 獎項類型:<br>ORCA_POINT: 小樹點<br>QWARE: Qware 點數<br>SELFGEN_VOUCHER: 自建票券<br>EDENRED: Edenred<br>SYSTEX: Systex |
110 +| 5 | deliver_type | Enum | | 發放類型:<br>IMMEDIATE: 立即發放<br>ETA: 預定時間發放 |
111 +| 5 | deliver_amount | Integer | | 發放數量 |
112 +| 5 | deliver_limit | Integer | | 發放上限 |
113 +| 5 | deliver_time | Datetime | * | 預定發放時間 (ETA 時需要) |
114 +| 5 | create_time | Datetime | | 建立時間 |
115 +| 5 | update_time | Datetime | | 更新時間 |
116 +
117 +#### prize
118 +
119 +| Level | Name | Type/Len | Nullable(*) | Desc |
120 +| ---| ---| ---| ---| --- |
121 +| 5 | type | Enum | | 獎品類型:<br>ORCA_POINT: 小樹點<br>QWARE: Qware 點數<br>SELFGEN_VOUCHER: 自建票券<br>EDENRED: Edenred<br>SYSTEX: Systex |
122 +| 5 | gp | Dict | * | 小樹點獎項資訊 |
123 +
124 +#### [prize.gp](http://prize.gp/)
125 +
126 +| Level | Name | Type/Len | Nullable(*) | Desc |
127 +| ---| ---| ---| ---| --- |
128 +| 6 | id | Integer | | 小樹點獎項 PK |
129 +| 6 | award_id | Integer | | 關聯獎項 ID |
130 +| 6 | action_code | String | | 行動代碼 |
131 +| 6 | expire_duration | Integer | | 過期天數 (1-1095) |
132 +| 6 | note | String | * | 備註 |
133 +| 6 | create_time | Datetime | | 建立時間 |
134 +| 6 | update_time | Datetime | | 更新時間 |
135 +
136 +#### notify
137 +
138 +| Level | Name | Type/Len | Nullable(*) | Desc |
139 +| ---| ---| ---| ---| --- |
140 +| 5 | id | Integer | | 推播關聯 PK |
141 +| 5 | relation_table | Enum | | 關聯表:<br>AWARD: 獎項<br>ASSIGNED_COUPON: 塞券 |
142 +| 5 | relation_id | Integer | | 關聯 ID |
143 +| 5 | notification | Dict | * | 外部推播設定 |
144 +| 5 | message | Dict | * | 訊息夾設定 |
145 +
146 +#### notify.notification
147 +
148 +| Level | Name | Type/Len | Nullable(*) | Desc |
149 +| ---| ---| ---| ---| --- |
150 +| 6 | id | Integer | | 推播 PK |
151 +| 6 | pushnotify_relation_id | Integer | | 關聯 PUSHNOTIFY_RELATION.ID |
152 +| 6 | title | String | * | 推播標題 |
153 +| 6 | content | String | * | 推播內文 |
154 +| 6 | notification_behavior | Enum | * | 推播點擊行為:<br>OPEN_URL: 開啟連結<br>OPEN_INBOX: 開啟訊息夾 |
155 +| 6 | url | String | * | DeepLink 網址 |
156 +| 6 | create_time | Datetime | | 建立時間 |
157 +| 6 | update_time | Datetime | | 更新時間 |
158 +
159 +#### notify.message
160 +
161 +| Level | Name | Type/Len | Nullable(*) | Desc |
162 +| ---| ---| ---| ---| --- |
163 +| 6 | id | Integer | | 訊息夾 PK |
164 +| 6 | pushnotify_relation_id | Integer | | 關聯 PUSHNOTIFY_RELATION.ID |
165 +| 6 | title | String | * | 訊息夾標題 |
166 +| 6 | content | String | * | 訊息夾內文 |
167 +| 6 | btn_wording | String | * | 按鈕文字 |
168 +| 6 | url | String | * | 網址 |
169 +| 6 | create_time | Datetime | | 建立時間 |
170 +| 6 | update_time | Datetime | | 更新時間 |
171 +
172 +#### ERROR CODE
173 +
174 +| HTTP Status | ErrorCode | Message | Desc |
175 +| ---| ---| ---| --- |