2023-10-07 10:09:17 +00:00
|
|
|
syntax = "v1"
|
|
|
|
|
|
|
|
info (
|
|
|
|
title: "collection"// TODO: add title
|
|
|
|
desc: "收藏服务"// TODO: add description
|
|
|
|
author: ""
|
|
|
|
email: ""
|
|
|
|
)
|
|
|
|
|
|
|
|
import "basic.api"
|
|
|
|
service collection {
|
|
|
|
//收藏产品
|
|
|
|
@handler CollectProductHandler
|
|
|
|
post /api/collection/collect_product(CollectProductReq) returns (response);
|
2023-10-08 04:04:00 +00:00
|
|
|
//删除收藏
|
|
|
|
@handler DeleteCollectProductHandler
|
|
|
|
post /api/collection/delete_collect_product(DeleteCollectProductReq) returns (response);
|
|
|
|
//获取收藏列表
|
|
|
|
@handler GetCollectProductListHandler
|
|
|
|
get /api/collection/get_collect_product_list(GetCollectProductListReq) returns (response);
|
2023-10-07 10:09:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//收藏产品
|
|
|
|
type CollectProductReq {
|
|
|
|
ProductId int64 `json:"product_id"`
|
|
|
|
Logo string `json:"logo"`
|
|
|
|
SelectColorIndex int64 `json:"select_color_index"`
|
|
|
|
TemplateTag string `json:"template_tag"`
|
2023-10-08 04:04:00 +00:00
|
|
|
}
|
|
|
|
//删除收藏
|
|
|
|
type DeleteCollectProductReq {
|
|
|
|
Ids []int64 `json:"ids"`
|
|
|
|
}
|
|
|
|
//获取收藏列表
|
|
|
|
type GetCollectProductListReq {
|
|
|
|
CurrentPage int `form:"current_page"`
|
|
|
|
}
|
2023-10-08 07:29:03 +00:00
|
|
|
type GetCollectProductListRsp {
|
|
|
|
Meta Meta `json:"meta"` //分页信息
|
|
|
|
List []GetCollectProductListRspItem `json:"list"`
|
|
|
|
}
|
2023-10-08 04:04:00 +00:00
|
|
|
type GetCollectProductListRspItem {
|
2023-10-08 07:29:03 +00:00
|
|
|
Id int64 `json:"id"`
|
|
|
|
ProductId int64 `json:"product_id"`
|
|
|
|
ProductName string `json:"product_name"`
|
|
|
|
Logo string `json:"logo"`
|
|
|
|
Cover string `json:"cover"`
|
|
|
|
CoverMetadata interface{} `json:"coverMetadata"`
|
|
|
|
SelectColorIndex int64 `json:"select_color_index"`
|
|
|
|
TemplateTag string `json:"template_tag"`
|
|
|
|
SizeCount int64 `json:"size_count"`
|
|
|
|
MinPrice string `json:"min_price"`
|
|
|
|
IsShelf int64 `json:"is_shelf"`
|
|
|
|
IsDeleted int64 `json:"is_deleted"`
|
2023-10-07 10:09:17 +00:00
|
|
|
}
|