fusenapi/server_api/collection.api

70 lines
2.1 KiB
Plaintext
Raw Normal View History

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);
//删除收藏
@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-10 06:59:00 +00:00
//测试算法合图并发
2023-10-09 09:56:28 +00:00
@handler TestAiHandler
get /api/collection/test_ai(TestAiReq) returns (response);
2023-10-10 06:59:00 +00:00
//测试pdf
@handler TestPdfHandler
2023-10-10 07:08:41 +00:00
get /api/collection/test_pdf(TestPdfReq) 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"`
}
//删除收藏
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"`
}
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-09 09:56:28 +00:00
}
2023-10-10 06:59:00 +00:00
//测试算法
2023-10-09 09:56:28 +00:00
type TestAiReq {
Num int `form:"num"`
2023-10-10 06:59:00 +00:00
}
//测试pdf
type TestPdfReq {
Content string `form:"content"`
Type string `form:"type"`
2023-10-07 10:09:17 +00:00
}