# CMS ReTag
## 取得 re tag 列表
- `取得re tag列表`
- [GET]/v2/tag
- query string
- tag-type: `business-type` `recommend`
- country-code: `TW`
- page
- size
- start
- end
- keyword
- status
* none = -1
* expired = 1
* processing = 2
* waitingForShow = 3
## 取得 re tag 明細
- `取得re tag明細`
- [GET]/v2/tag/:id
## 新增 re tag
- `新增 re tag`
- [POST] /v2/tag
- body
```typescript=
export interface CreateReTagParameter {
reTagTypeId: string
name: string
level?: number
isAlways: boolean
dateStart?: Date
dateEnd?: Date
enabled: boolean
countryCode: string
sort: number
}
```
## 異動 re tag
- `異動 re tag`
- [PUT] /v2/tag/:id
- body
```typescript=
export interface UpdateReTagParameter {
reTagTypeId?: string
name?: string
level?: number
isAlways?: boolean
dateStart?: Date
dateEnd?: Date
enabled?: boolean
countryCode?: string
sort?: number
}
```
## 新增 re store tag
- `新增 re store tag`
- [POST] /v2/tag/:id/store
- body
```typescript=
export interface CreateReStoreTagParameter {
reStoreId: string
reTagId: string
isAlways: boolean
dateStart?: Date
dateEnd?: Date
sort: number
}
```
## 取得 re tag type
- `取得 re tag type`
- [GET] /v2/tag-type
## 修改 re_tag 下店家順序
- [PUT] /v2/tag/:id/batch-stores-sort `修改tag下店家順序`
```typescript=
export interface BatchUpdateReStoreTagSortParameter {
reStoreIds: string[]
}
```
## 取得 re tag 下店家
- `取得 re tag 下店家`
- [GET]/v2/tag/:id/store
## 刪除 re tag 下店家
- `刪除 re tag 下店家`
- [DELETE]/v2/tag/:id/store/:reStoreTagId
## 依照店家縣市區分數量
- [GET] /v2/tag/:id/store/group-by-city
-----
# CMS Page
## 取得列表
- [GET] /v1/page/home?page=1&size=10&country-code
## 取得單一資料
- [GET] /v1/page/home/:id
## 新增 HomePage
- [POST] /v1/page/home
- Request Body
```typescript=
interface CreatePageParameter {
dateStart: Date
dateEnd: Date
countryCode: string
recommendStoresByCity?: {
title?: TextBox,
subTitle?: TextBox,
leading?: SvgBox
tag: Tag
mainItemStyle: MainItemStyle
},
storesByMainBusinessTypeCity?: {
title?: TextBox,
subTitle?: TextBox
leading?: SvgBox
tag: Tag,
subTags: Tag[]
mainItemStyle: MainItemStyle
},
couponStores?: {
title?: TextBox
subTitle?: TextBox
leading?: SvgBox
mainItemStyle: MainItemStyle
},
cityWithCubeItems?: {
displayQuantity: number,
leading?: SvgBox
title?: TextBox
subTitle?: TextBox
cityWithMainItems: CityWithMainItem[]
},
tagWithCubeItems?: {
displayQuantity: number,
leading?: SvgBox
title?: TextBox
subTitle?: TextBox
tagWithMainItems: TagWithMainItem[]
}
}
export interface MainItemStyle {
titleColor?: string // 項目標題顏色
bottomBackgroundColor?: string // 圖片中區塊背景顏色
bottomColor?: string // 圖片中區塊字體顏色
bottomAlign?: "left" | "right" // 圖片中區塊對齊方式
subTitleColor?: string // 項目副標顏色
bottomSuffixBoxColor?: string // 圖片說明後綴字顏色
subItemColor?: string // 第二區塊字體顏色 (EX 日式 中式 小吃 ...)
prefixBoxTextColor?: string // Title 項目標題前區塊字體顏色 (折價卷的日期區間)
}
export interface TextBox {
text: string
color: string
}
export interface Tag {
id: string
name: string
}
export interface CityWithMainItem {
city: string,
placeId: string
backgroundColor?: string,
backgroundUrl?: string
title: TextBox
}
export interface TagWithMainItem {
tag: Tag
backgroundColor?: string
backgroundUrl?: string
title: TextBox
}
export interface SvgBox {
svgString: string
width: number
height: number
}
```
## 更新 HomePage
- [PUT] /v1/page/home/:id
- body 同 `createParameter`
## 刪除 HomePage
- [DELETE] /v1/page/home/:id
----
# CMS Place
## 取得縣市
- [GET] /v1/place/city
- query string
- country-code
## 取得縣市別名
- [GET] /v1/place/alias
- query string
- keyword
- page
- size
- city
- region
- country-code
- type
- 1 = 景點
- 2 = 縣市
- 3 = 區域