# 登革熱防治
---
- 常數定義
- [使用者上傳內容項目類別](#使用者上傳內容項目類別)
- API 清單
- 共用
- [取得項目類別列表](#取得項目類別列表)
- APP端
- [取得列表](#取得列表)
- [取得明細](#取得明細)
- [經緯度查詢地址](#經緯度查詢地址)
- [取得上傳網址](#取得上傳網址)
- [取得租戶列表](#取得租戶列表)
- [新增登革熱防治紀錄](#新增登革熱防治紀錄)
- [編輯登革熱防治紀錄](#編輯登革熱防治紀錄)
- [刪除登革熱防治紀錄](#刪除登革熱防治紀錄)
- [刪除登革熱防治紀錄單一圖片](#刪除登革熱防治紀錄單一圖片)
- WEB端
- [取得管理列表](#取得管理列表)
- [取得管理明細](#取得管理明細)
- [匯出管理列表](#匯出管理列表)
---
## 常數定義
### 使用者上傳內容項目類別
欄位 | 型態 | 說明
---|---|---
itemType | string | 使用者上傳內容項目類別, 01: 登革熱防治, 02: 媽媽手冊, 03: 診斷證明書
---
# API 清單
## 共用
### 取得項目類別列表
```url
POST /user-content/item-type-list
```
* 權限: 租戶管理員(TENANT_ADMIN), 租戶使用者(TENANT_ROLE_USER), App使用者(GENERAL_PUBLIC)
#### Request-取得項目類別列表
#### Response-取得項目類別列表
欄位 | 型態 | 說明
--- | --- | ---
code | string | 項目類別 code
description | string | 項目類別說明
```javascript
{
"httpCode": 200,
"result": {
"data": [
{
"code": "01",
"description": "登革熱防治"
}
]
}
}
```
---
## APP端
### 取得列表
```url
POST /user-content/dengue/list
```
* 權限: App使用者(GENERAL_PUBLIC)
#### Request-取得列表
##### Request-取得列表-query (查詢條件json)
欄位 | 型態 | 必填 | 長度限制 | 預設 | 說明
---|---|---|---|---|---
targetTenantId | string | | 36 | | 上傳對象租戶id, 未填表示查詢全部
##### Request-取得列表-pagination (分頁json)
欄位 | 型態 | 必填 | 預設 | 說明
---|---|---|---|---
current | int | | 1 | 當前頁數
pageSize | int | | 10 | 每頁結果數量,-1 為顯示所有
##### Request-取得列表-sorter (排序json)
欄位 | 型態 | 必填 | 預設 | 說明
---|---|---|---|---
field | string | | recordTime | 排序欄位,可排序欄位有 recordTime
order | string | | desc | 升序或降序
```javascript
{
"query": {
"targetTenantId": null
},
"pagination": {
"current": 1,
"total": 1,
"pageSize": 10
},
"sorter": {
"field": "recordTime",
"order": "desc"
}
}
```
#### Response-取得列表
欄位 | 型態 | 說明
--- | --- | ---
id | string | 紀錄id
householdMemberId | string | householdMemberId
itemType | string | 上傳內容項目類別, 參閱 [上傳內容項目類別](#使用者上傳內容項目類別)
targetTenantId | string | 上傳對象租戶id
targetTenantName | string | 上傳對象租戶名稱
recordTime | timestamp | 上傳時間
description | string | 說明
address | string | 地址
objectKey | string | 圖檔objectKey(最新一筆)
url | string | 圖檔可download 的 url, 時效 3600 秒
createTime | timestamp | 建立時間
updateTime | timestamp | 更新時間
```javascript
{
"httpCode": 200,
"result": {
"data": [
{
"id": "fc00087b-843e-4511-84da-c233b37b5041",
"householdMemberId": "150b53f5-7126-4900-9fb0-87a08b45e06b",
"itemType": "01",
"targetTenantId": "858b7fbb-3ba0-4d49-9882-c893a1ef07dc",
"recordTime": 1692595800000,
"createTime": 1692606914905,
"updateTime": 1692606914905,
"targetTenantName": "緯緯醫學",
"description": "TEST description",
"objectKey": "user-content/dengue/A5555.jpg",
"url": "http://content-service/swift/v1/user-content/dengue/A5555.jpg",
"address": "800台灣高雄市新興區中正三路4號"
}
],
"pagination": {
"current": 1,
"pageSize": 10,
"total": 1
},
"sorter": {
"field": "recordTime",
"order": "desc"
},
"total": 1
}
}
```
### 取得明細
```url
POST /user-content/dengue/info
```
* 權限: App使用者(GENERAL_PUBLIC)
#### Request-取得明細
欄位 | 型態 | 必填 | 長度限制 | 預設 | 說明
---|---|---|---|---|---
id | string | Y | 36 | | 紀錄id
```javascript
{
"id": "b5c65827-0089-4cb1-8f1e-3b169524da06"
}
```
#### Response-取得明細
欄位 | 型態 | 說明
--- | --- | ---
id | string | 紀錄id
householdMemberId | string | householdMemberId
itemType | string | 上傳內容項目類別, 參閱 [上傳內容項目類別](#使用者上傳內容項目類別)
targetTenantId | string | 上傳對象租戶id
targetTenantName | string | 上傳對象租戶名稱
recordTime | timestamp | 上傳時間
description | string | 說明
address | string | 地址
contentObjectList | json array | 上傳內容圖片 json array
createTime | timestamp | 建立時間
updateTime | timestamp | 更新時間
##### Response-取得明細-contentObjectList(json)
欄位 | 型態 | 說明
--- | --- | ---
targetId | string | 紀錄id
objectKey | string | 圖檔objectKey
url | string | 圖檔可download 的 url, 時效 3600 秒
```javascript
{
"httpCode": 200,
"result": {
"data": {
"id": "fc00087b-843e-4511-84da-c233b37b5041",
"householdMemberId": "150b53f5-7126-4900-9fb0-87a08b45e06b",
"itemType": "150b53f5-7126-4900-9fb0-87a08b45e06b",
"targetTenantId": "858b7fbb-3ba0-4d49-9882-c893a1ef07dc",
"recordTime": 1692595800000,
"description": "TEST description",
"createTime": 1692606914905,
"updateTime": 1692606914905,
"contentObjectList": [
{
"targetId": "fc00087b-843e-4511-84da-c233b37b5041",
"objectKey": "user-content/dengue/A5555.jpg",
"createTime": 1692603207000,
"updateTime": 1692603207000,
"url": "http://content-service/swift/v1/user-content/dengue/A5555.jpg"
},
{
"targetId": "fc00087b-843e-4511-84da-c233b37b5041",
"objectKey": "user-content/dengue/A9999.jpg",
"createTime": 1692592235000,
"updateTime": 1692592235000,
"url": "http://content-service/swift/v1/user-content/dengue/A9999.jpg"
},
{
"targetId": "fc00087b-843e-4511-84da-c233b37b5041",
"objectKey": "user-content/dengue/A0001.jpg",
"createTime": 1692583200000,
"updateTime": 1692583200000,
"url": "http://content-service/swift/v1/user-content/dengue/A0001.jpg"
}
],
"targetTenantName": "緯緯醫學",
"address": "800台灣高雄市新興區中正三路4號"
}
}
}
```
### 經緯度查詢地址
```url
POST /user-content/dengue/parse-address
```
* 權限: App使用者(GENERAL_PUBLIC)
#### Request-經緯度查詢地址
欄位 | 型態 | 必填 | 長度限制 | 預設 | 說明
---|---|---|---|---|---
lat | double | Y | | | 緯度
lng | double | Y | | | 經度
```javascript
{
"lat": 22.6309192988031,
"lng": 120.31298575567882
}
```
#### Response-經緯度查詢地址
欄位 | 型態 | 說明
--- | --- | ---
lat | double | 緯度
lng | double | 經度
address | string | 地址
```javascript
{
"httpCode": 200,
"result": {
"data": {
"lat": 22.6309192988031,
"lng": 120.31298575567882,
"address": "800台灣高雄市新興區中正三路4號"
}
}
}
```
### 取得上傳網址
```url
POST /user-content/dengue/get-upload-url
```
* 權限: App使用者(GENERAL_PUBLIC)
* 新增/編輯紀錄時用來上傳圖片前, 要先取得可上傳圖檔的網址
#### Request-取得上傳網址
欄位 | 型態 | 必填 | 預設 | 說明
---|---|---|---|---
isMultipart | boolean | Y | false | 是否使用分段上傳
isThumbnail | boolean | Y | false | 上傳的是否為縮圖
fileName | String | Y | | 檔名,不包含副檔名,限制最多50字
fileType | String | Y | | 副檔名, 限制最多10字
totalPart | int | **N** (isMultipart=false)<br>**Y** (isMultipart=true) | | 總分塊數量,不可小於2
parts | Array [...part] | **N** (isMultipart=false)<br>**Y** (isMultipart=true) | | part 資訊
##### Request-取得上傳網址-part(Object)
欄位 | 型態 | 必填 | 預設 | 說明
---|---|---|---|---
chunkSize | int | Y | | 該 chunk 的大小, bytes
md5 | string | Y | | 該 part 的 md5
part | int | Y | | part number, 第幾塊 chunk
```javascript
// 單檔
{
isMultipart: false,
fileName: member_card_test-2,
fileType: png,
totalPart: null,
parts: [
],
isThumbnail: true
}
// 分塊上傳
{
isMultipart: true,
isThumbnail: false,
fileName: giphy (7),
fileType: mp4,
totalPart: 2,
parts: [
{
chunkSize: 5242880,
md5: 5AACA89868CD486D81192221CF9F9415,
part: 1
},
{
chunkSize: 3145728,
md5: 5AACA89868CD486D81192221CF9F9415,
part: 2
}
]
}
```
#### Error-取得上傳網址
httpCode | 錯誤碼 | 說明
--- | --- | ---
422 | SERVICE_ERROR.UPLOAD_FILE_TYPE_NOT_ALLOWED | 上傳的檔案類型不允許
#### Response-取得上傳網址
##### Response-取得上傳網址-data
欄位 | 型態 | 說明
--- | --- | ---
objectKey | string | storage 中的 objectKey, **unique**
uploadId | string | 識別該次上傳的 uploadId
fileName | string | 名稱
fileType | string | 副檔名
url | string | 單檔上傳的時候,才會回傳該 url, 時效 3600 秒
parts | [...part] | multipart上傳各part的url
##### Response-取得上傳網址-part
欄位 | 型態 | 說明
--- | --- | ---
chunkSize | int | 該 chunk 的大小, bytes
md5 | string | 該 part 的 md5
part | int | part number, 第幾塊 chunk
url | string | 可上傳的 url, 時效 3600 秒
```javascript
// 單檔
{
httpCode: 200,
result: {
data: {
objectKey: user-content/dengue/150b53f5-7126-4900-9fb0-87a08b45e06b/56ca1cfc-4bcb-4a0a-b079-fd08a0e75a37.png,
uploadId: fb483648-25d0-4137-bb49-85c17842a95b,
fileName: member_card_test-2,
fileType: png,
url: http://swift-storage/user-content/dengue/150b53f5-7126-4900-9fb0-87a08b45e06b/56ca1cfc-4bcb-4a0a-b079-fd08a0e75a37.png
}
}
}
// 分塊上傳
{
httpCode: 200,
result: {
data: {
objectKey: event/f76adf26-1e22-4b18-980d-b9a68efc5171.mp4,
uploadId: 53fde368-43d9-455f-a610-62091fc30be6,
fileName: giphy (7),
fileType: mp4,
parts: [
{
chunkSize: 5242880,
md5: 5AACA89868CD486D81192221CF9F9415,
part: 1,
url: http://swift-storage/user-content/dengue/150b53f5-7126-4900-9fb0-87a08b45e06b/56ca1cfc-4bcb-4a0a-b079-fd08a0e75a37.png
},
{
chunkSize: 3145728,
md5: 5AACA89868CD486D81192221CF9F9415,
part: 2,
url: http://swift-storage/user-content/dengue/150b53f5-7126-4900-9fb0-87a08b45e06b/56ca1cfc-4bcb-4a0a-b079-fd08a0e75a37.png
}
]
}
}
}
```
### 取得租戶列表
```url
POST /user-content/dengue/tenant-list
```
* 權限: App使用者(GENERAL_PUBLIC)
#### Request-取得租戶列表
#### Response-取得租戶列表
欄位 | 型態 | 說明
--- | --- | ---
tenantId | string | 租戶id
tenantName | string | 租戶名稱
```javascript
{
"httpCode": 200,
"result": {
"data": [
{
"tenantId": "1af0a4c2-ef73-4385-aa8e-8e7ae8afe155",
"tenantName": "小港醫院"
},
{
"tenantId": "1c21dbc4-09f2-4020-844d-099808ef9da0",
"tenantName": "緯緯企業"
},
{
"tenantId": "5efcfd67-334e-45b3-bf49-7e52f5172891",
"tenantName": "企客第一家"
},
{
"tenantId": "858b7fbb-3ba0-4d49-9882-c893a1ef07dc",
"tenantName": "緯緯醫學"
},
{
"tenantId": "cafc5823-cc3d-4834-b9f8-212c1572414b",
"tenantName": "旺來醫院"
}
]
}
}
```
### 新增登革熱防治紀錄
```url
POST /user-content/dengue/add
```
* 權限: App使用者(GENERAL_PUBLIC)
#### Request-新增登革熱防治紀錄
欄位 | 型態 | 必填 | 長度限制 | 預設 | 說明
---|---|---|---|---|---
targetTenantId | string | | 36 | | 上傳對象租戶id
recordTime | timestamp | Y | | | 上傳時間
itemType | string | Y | 2 | | 上傳內容項目類別, 參閱 [上傳內容項目類別](#使用者上傳內容項目類別)
description | string | | 2000 | | 說明
address | string | | 500 | | 地址
contentObjectList | json array | Y | 10 | | 上傳內容圖片 json array, 最少1張, 最多10張
##### Request-新增登革熱防治紀錄-contentObjectList(json)
欄位 | 型態 | 必填 | 長度限制 | 預設 | 說明
---|---|---|---|---|---
objectKey | string | Y | 500 | | 上傳圖片的objectKey, 先取得圖片的上傳網址並上傳成功,取其 objectKey。
isMultipart | boolean | N | | | 圖片上傳時是否分塊上傳,預設為 false
totalPart | int | **N** (isMultipart=false)<br>**Y** (isMultipart=true) | | | 圖片上傳的總分塊數量,不可小於2
uploadId | string | **N** (isMultipart=false)<br>**Y** (isMultipart=true) | | | 從 /user-content/dengue/get-upload-url 取得的 uploadId
```javascript
{
"targetTenantId": null,
"recordTime": 1692617732000,
"itemType": "01",
"description": "TEST description",
"address": "800台灣高雄市新興區中正三路4號",
"contentObjectList": [
{
"objectKey": "user-content/dengue/150b53f5-7126-4900-9fb0-87a08b45e06b/5399c12-c5fd-4a2f-8d8a-641e1c63acea.png",
"isMultipart": false
},
{
"objectKey": "user-content/dengue/150b53f5-7126-4900-9fb0-87a08b45e06b/bcee6b4e-856d-41aa-bff3-6aff115006d6.png",
"isMultipart": false
}
]
}
```
#### Error-新增登革熱防治紀錄
httpCode | 錯誤碼 | 說明
--- | --- | ---
400 | API_ERROR.ARGUMENT_ERROR | 輸入參數錯誤, 可參閱 errorDesc
#### Response-新增登革熱防治紀錄
欄位 | 型態 | 說明
--- | --- | ---
id | string | 紀錄id
householdMemberId | string | householdMemberId
itemType | string | 上傳內容項目類別, 參閱 [上傳內容項目類別](#使用者上傳內容項目類別)
targetTenantId | string | 上傳對象租戶id
recordTime | timestamp | 上傳時間
description | string | 說明
createTime | timestamp | 建立時間
updateTime | timestamp | 更新時間
```javascript
{
"httpCode": 200,
"result": {
"data": {
"id": "b5c65827-0089-4cb1-8f1e-3b169524da06",
"householdMemberId": "150b53f5-7126-4900-9fb0-87a08b45e06b",
"itemType": "01",
"recordTime": 1692617732000,
"description": "TEST description",
"createTime": 1692652501808,
"updateTime": 1692652501808
}
}
}
```
### 編輯登革熱防治紀錄
```url
POST /user-content/dengue/update
```
* 權限: App使用者(GENERAL_PUBLIC)
#### Request-編輯登革熱防治紀錄
欄位 | 型態 | 必填 | 長度限制 | 預設 | 說明
---|---|---|---|---|---
id | string | Y | 36 | | 紀錄id
targetTenantId | string | | 36 | | 上傳對象租戶id
recordTime | timestamp | Y | | | 上傳時間
itemType | string | Y | 2 | | 上傳內容項目類別, 參閱 [上傳內容項目類別](#使用者上傳內容項目類別)
description | string | | 2000 | | 說明
address | string | | 500 | | 地址
contentObjectList | json array | Y | 10 | | 上傳內容圖片 json array, 最少1張, 最多10張
##### Request-編輯登革熱防治紀錄-contentObjectList(json)
欄位 | 型態 | 必填 | 長度限制 | 預設 | 說明
---|---|---|---|---|---
objectKey | string | Y | 500 | | 上傳圖片的objectKey, 先取得圖片的上傳網址並上傳成功,取其 objectKey。
isMultipart | boolean | N | | | 圖片上傳時是否分塊上傳,預設為 false
totalPart | int | **N** (isMultipart=false)<br>**Y** (isMultipart=true) | | | 圖片上傳的總分塊數量,不可小於2
uploadId | string | **N** (isMultipart=false)<br>**Y** (isMultipart=true) | | | 從 /user-content/dengue/get-upload-url 取得的 uploadId
```javascript
{
"id": "b5c65827-0089-4cb1-8f1e-3b169524da06",
"targetTenantId": null,
"recordTime": 1692617732000,
"itemType": "01",
"description": "TEST description-12345",
"address": "台灣高雄市新興區中正三路4號",
"contentObjectList": [
{
"objectKey": "user-content/dengue/150b53f5-7126-4900-9fb0-87a08b45e06b/5399c12-c5fd-4a2f-8d8a-641e1c63acea.png",
"isMultipart": false
},
{
"objectKey": "user-content/dengue/150b53f5-7126-4900-9fb0-87a08b45e06b/1e2861b2-939f-4d8a-8e18-6157f10fedf9.png",
"isMultipart": false
}
]
}
```
#### Error-編輯登革熱防治紀錄
httpCode | 錯誤碼 | 說明
--- | --- | ---
400 | API_ERROR.ARGUMENT_ERROR | 輸入參數錯誤, 可參閱 errorDesc
422 | SERVICE_ERROR.USER_CONTENT_DENGUE_INFO_NOT_EXIST | 使用者上傳登革熱記錄不存在
403 | API_ERROR.PERMISSION_DENIED | 無此操作權限
#### Response-編輯登革熱防治紀錄
欄位 | 型態 | 說明
--- | --- | ---
id | string | 紀錄id
householdMemberId | string | householdMemberId
itemType | string | 上傳內容項目類別, 參閱 [上傳內容項目類別](#使用者上傳內容項目類別)
targetTenantId | string | 上傳對象租戶id
recordTime | timestamp | 上傳時間
description | string | 說明
createTime | timestamp | 建立時間
updateTime | timestamp | 更新時間
```javascript
{
"httpCode": 200,
"result": {
"data": {
"id": "b5c65827-0089-4cb1-8f1e-3b169524da06",
"householdMemberId": "150b53f5-7126-4900-9fb0-87a08b45e06b",
"itemType": "01",
"recordTime": 1692617732000,
"description": "TEST description-12345",
"createTime": 1692652501808,
"updateTime": 1692652659069
}
}
}
```
### 刪除登革熱防治紀錄
```url
POST /user-content/dengue/delete
```
* 權限: App使用者(GENERAL_PUBLIC)
#### Request-刪除登革熱防治紀錄
欄位 | 型態 | 必填 | 長度限制 | 預設 | 說明
---|---|---|---|---|---
id | string | Y | 36 | | 紀錄id
```javascript
{
"id": "b5c65827-0089-4cb1-8f1e-3b169524da06"
}
```
#### Error-刪除登革熱防治紀錄
httpCode | 錯誤碼 | 說明
--- | --- | ---
400 | API_ERROR.ARGUMENT_ERROR | 輸入參數錯誤, 可參閱 errorDesc
422 | SERVICE_ERROR.USER_CONTENT_DENGUE_INFO_NOT_EXIST | 使用者上傳登革熱記錄不存在
403 | API_ERROR.PERMISSION_DENIED | 無此操作權限
#### Response-刪除登革熱防治紀錄
欄位 | 型態 | 說明
--- | --- | ---
count | int | 成功刪除筆數
```javascript
{
"httpCode": 200,
"result": {
"data": {
"count": 1
}
}
}
```
### 刪除登革熱防治紀錄單一圖片
```url
POST /user-content/dengue/delete-image
```
* 權限: App使用者(GENERAL_PUBLIC)
#### Request-刪除登革熱防治紀錄單一圖片
欄位 | 型態 | 必填 | 長度限制 | 預設 | 說明
---|---|---|---|---|---
id | string | Y | 36 | | 紀錄id
objectKey | string | Y | 500 | 圖片objectKey
```javascript
{
"id": "b5c65827-0089-4cb1-8f1e-3b169524da06",
"objectKey": "user-content/dengue/150b53f5-7126-4900-9fb0-87a08b45e06b/5399c12-c5fd-4a2f-8d8a-641e1c63acea.png"
}
```
#### Error-刪除登革熱防治紀錄單一圖片
httpCode | 錯誤碼 | 說明
--- | --- | ---
400 | API_ERROR.ARGUMENT_ERROR | 輸入參數錯誤, 可參閱 errorDesc
422 | SERVICE_ERROR.USER_CONTENT_DENGUE_INFO_NOT_EXIST | 使用者上傳登革熱記錄不存在
403 | API_ERROR.PERMISSION_DENIED | 無此操作權限
#### Response-刪除登革熱防治紀錄單一圖片
欄位 | 型態 | 說明
--- | --- | ---
count | int | 成功刪除筆數
```javascript
{
"httpCode": 200,
"result": {
"data": {
"count": 1
}
}
}
```
## WEB端
### 取得管理列表
```url
POST /user-content-mgmt/dengue/list
```
* 權限: 租戶管理員(TENANT_ADMIN), 租戶使用者(TENANT_ROLE_USER)
#### Request-取得管理列表
##### Request-取得管理列表-query (查詢條件json)
欄位 | 型態 | 必填 | 長度限制 | 預設 | 說明
---|---|---|---|---|---
startDate | timestamp | Y | | | 查詢起始日
endDate | timestamp | Y | | | 查詢截止日
itemType | string | | 2 | | 上傳內容項目類別, 若未填表示查詢全部, 參閱 [上傳內容項目類別](#使用者上傳內容項目類別)
keyword | string | | 50 | | 查詢使用者姓名或手機關鍵字
##### Request-取得管理列表-pagination (分頁json)
欄位 | 型態 | 必填 | 預設 | 說明
---|---|---|---|---
current | int | | 1 | 當前頁數
pageSize | int | | 10 | 每頁結果數量,-1 為顯示所有
##### Request-取得管理列表-sorter (排序json)
欄位 | 型態 | 必填 | 預設 | 說明
---|---|---|---|---
field | string | | recordTime | 排序欄位,可排序欄位有 recordTime, name, itemType, extraData, description
order | string | | desc | 升序或降序
```javascript
{
"query": {
"startDate": "2023-08-20",
"endDate": "2023-08-21",
"itemType": null,
"keyword": null
},
"pagination": {
"current": 1,
"total": 1,
"pageSize": 10
},
"sorter": {
"field": "recordTime",
"order": "desc"
}
}
```
#### Response-取得管理列表
欄位 | 型態 | 說明
--- | --- | ---
id | string | 紀錄id
householdMemberId | string | householdMemberId
name | string | 姓名
mobile | string | 手機號碼
itemType | string | 上傳內容項目類別, 參閱 [上傳內容項目類別](#使用者上傳內容項目類別)
targetTenantId | string | 上傳對象租戶id
recordTime | timestamp | 上傳時間
description | string | 說明
address | string | 地址
contentObjectList | json array | 上傳內容圖片 json array
createTime | timestamp | 建立時間
updateTime | timestamp | 更新時間
##### Response-取得管理列表-contentObjectList(json)
欄位 | 型態 | 說明
--- | --- | ---
objectKey | string | 圖檔objectKey
url | string | 圖檔可download 的 url, 時效 3600 秒
```javascript
{
"httpCode": 200,
"result": {
"data": [
{
"id": "fc00087b-843e-4511-84da-c233b37b5041",
"householdMemberId": "150b53f5-7126-4900-9fb0-87a08b45e06b",
"itemType": "01",
"targetTenantId": "858b7fbb-3ba0-4d49-9882-c893a1ef07dc",
"recordTime": 1692595800000,
"description": "TEST description",
"createTime": 1692606914905,
"updateTime": 1692606914905,
"contentObjectList": [
{
"objectKey": "user-content/dengue/A5555.jpg",
"url": "http://content-service/swift/v1/user-content/dengue/A5555.jpg"
},
{
"objectKey": "user-content/dengue/A9999.jpg",
"url": "http://content-service/swift/v1/user-content/dengue/A9999.jpg"
},
{
"objectKey": "user-content/dengue/A0001.jpg",
"url": "http://content-service/swift/v1/user-content/dengue/A0001.jpg"
}
],
"name": "呂OO",
"mobile": "0987654321",
"address": "800台灣高雄市新興區中正三路4號"
}
],
"pagination": {
"current": 1,
"pageSize": 10,
"total": 1
},
"sorter": {
"field": "recordTime",
"order": "desc"
},
"total": 1
}
}
```
### 取得管理明細
```url
POST /user-content-mgmt/dengue/info
```
* 權限: 租戶管理員(TENANT_ADMIN), 租戶使用者(TENANT_ROLE_USER)
#### Request-取得管理明細
欄位 | 型態 | 必填 | 長度限制 | 預設 | 說明
---|---|---|---|---|---
id | string | Y | 36 | | 紀錄id
```javascript
{
"id": "52577adb-e7f3-4b99-9ad3-89c8e301041c"
}
```
#### Response-取得管理明細
欄位 | 型態 | 說明
--- | --- | ---
id | string | 紀錄id
householdMemberId | string | householdMemberId
name | string | 姓名
mobile | string | 手機號碼
itemType | string | 上傳內容項目類別, 參閱 [上傳內容項目類別](#使用者上傳內容項目類別)
targetTenantId | string | 上傳對象租戶id
recordTime | timestamp | 上傳時間
description | string | 說明
address | string | 地址
contentObjectList | json array | 上傳內容圖片 json array
createTime | timestamp | 建立時間
updateTime | timestamp | 更新時間
##### Response-取得管理明細-contentObjectList(json)
欄位 | 型態 | 說明
--- | --- | ---
objectKey | string | 圖檔objectKey
url | string | 圖檔可download 的 url, 時效 3600 秒
```javascript
{
"httpCode": 200,
"result": {
"data": {
"id": "52577adb-e7f3-4b99-9ad3-89c8e301041c",
"householdMemberId": "150b53f5-7126-4900-9fb0-87a08b45e06b",
"itemType": "01",
"recordTime": 1692617732000,
"description": "TEST description",
"createTime": 1692665824266,
"updateTime": 1692665824266,
"contentObjectList": [
{
"objectKey": "user-content/dengue/150b53f5-7126-4900-9fb0-87a08b45e06b/4c3f15dd-8442-4834-9c47-ec274ffbda91.png",
"url": "http://content-service/swift/v1/user-content/dengue/150b53f5-7126-4900-9fb0-87a08b45e06b/4c3f15dd-8442-4834-9c47-ec274ffbda91.png"
},
{
"objectKey": "user-content/dengue/150b53f5-7126-4900-9fb0-87a08b45e06b/5399c12-c5fd-4a2f-8d8a-641e1c63acea.png",
"url": "http://content-service/swift/v1/user-content/dengue/150b53f5-7126-4900-9fb0-87a08b45e06b/5399c12-c5fd-4a2f-8d8a-641e1c63acea.png"
},
{
"objectKey": "user-content/dengue/150b53f5-7126-4900-9fb0-87a08b45e06b/A0001.jpg",
"url": "http://content-service/swift/v1/user-content/dengue/150b53f5-7126-4900-9fb0-87a08b45e06b/A0001.jpg"
},
{
"objectKey": "user-content/dengue/150b53f5-7126-4900-9fb0-87a08b45e06b/bcee6b4e-856d-41aa-bff3-6aff115006d6.png",
"url": "http://content-service/swift/v1/user-content/dengue/150b53f5-7126-4900-9fb0-87a08b45e06b/bcee6b4e-856d-41aa-bff3-6aff115006d6.png"
}
],
"name": "呂OO",
"mobile": "0973621449",
"address": "800台灣高雄市新興區中正三路4號"
}
}
}
```
### 匯出管理列表
```url
POST /user-content-mgmt/dengue/export
```
#### Request-匯出管理列表
##### Request-匯出管理列表-query (查詢條件json)
欄位 | 型態 | 必填 | 長度限制 | 預設 | 說明
---|---|---|---|---|---
startDate | timestamp | Y | | | 查詢起始日
endDate | timestamp | Y | | | 查詢截止日
itemType | string | | 2 | | 上傳內容項目類別, 若未填表示查詢全部, 參閱 [上傳內容項目類別](#使用者上傳內容項目類別)
keyword | string | | 50 | | 查詢使用者姓名或手機關鍵字
```json
{
"query": {
"itemType": "01",
"keyword": "keyword",
"startDate":"2023-09-01",
"endDate":"2023-10-06"
}
}
```
#### Response-匯出管理列表
userContent_yyyyMMdd.xlsx