2023-05-31 03:38:17 +00:00
|
|
|
syntax = "v1"
|
|
|
|
|
|
|
|
info (
|
|
|
|
title: // TODO: add title
|
|
|
|
desc: // TODO: add description
|
|
|
|
author: ""
|
|
|
|
email: ""
|
|
|
|
)
|
2023-06-01 07:32:28 +00:00
|
|
|
import "basic.api"
|
2023-06-05 03:27:01 +00:00
|
|
|
service product {
|
|
|
|
//获取产品列表
|
|
|
|
@handler GetProductListHandler
|
|
|
|
get /product/list(GetProductListReq) returns (response);
|
2023-06-06 07:30:12 +00:00
|
|
|
//获取成功后的推荐产品
|
2023-06-19 02:34:21 +00:00
|
|
|
@handler GetSuccessRecommandHandler
|
2023-06-06 07:30:12 +00:00
|
|
|
get /product/success-recommand (GetSuccessRecommandReq) returns (response);
|
2023-06-07 09:27:17 +00:00
|
|
|
//获取分类下的产品以及尺寸
|
2023-06-19 02:34:21 +00:00
|
|
|
@handler GetSizeByProductHandler
|
2023-06-08 03:34:58 +00:00
|
|
|
get /product/get-size-by-product returns (response);
|
2023-06-19 04:23:02 +00:00
|
|
|
//获取保存的设计信息
|
2023-06-19 02:34:21 +00:00
|
|
|
@handler GetProductDesignHandler
|
2023-06-19 04:23:02 +00:00
|
|
|
get /product/design(GetProductDesignReq) returns (response);
|
2023-06-07 09:27:17 +00:00
|
|
|
}
|
|
|
|
|
2023-06-05 03:27:01 +00:00
|
|
|
//获取产品列表
|
2023-06-01 07:32:28 +00:00
|
|
|
type GetProductListReq {
|
2023-06-02 11:24:58 +00:00
|
|
|
Cid int64 `form:"cid"`
|
2023-06-01 07:32:28 +00:00
|
|
|
Size uint32 `form:"size"`
|
|
|
|
Page uint32 `form:"page"`
|
|
|
|
IsDemo uint32 `form:"is_demo" , options=0|1"`
|
2023-05-31 03:38:17 +00:00
|
|
|
}
|
2023-06-02 11:24:58 +00:00
|
|
|
type GetProductListRsp {
|
|
|
|
Ob Ob `json:"ob"`
|
|
|
|
TypeName string `json:"typeName"`
|
|
|
|
Description string `json:"description"`
|
|
|
|
}
|
|
|
|
type Ob {
|
|
|
|
Items []Items `json:"items"`
|
|
|
|
Links Links `json:"_links"`
|
|
|
|
Meta Meta `json:"_meta"`
|
|
|
|
}
|
|
|
|
type Meta {
|
|
|
|
TotalCount int32 `json:"totalCount"`
|
|
|
|
PageCount int32 `json:"pageCount"`
|
|
|
|
CurrentPage int32 `json:"currentPage"`
|
|
|
|
PerPage int32 `json:"perPage"`
|
|
|
|
}
|
|
|
|
type Links {
|
|
|
|
Self HrefUrl `json:"self"`
|
|
|
|
First HrefUrl `json:"first"`
|
|
|
|
Last HrefUrl `json:"last"`
|
|
|
|
Next HrefUrl `json:"next"`
|
|
|
|
}
|
|
|
|
type HrefUrl {
|
|
|
|
Href string `json:"href"`
|
|
|
|
}
|
|
|
|
type Items {
|
|
|
|
Id int64 `json:"id"`
|
|
|
|
Sn string `json:"sn"`
|
|
|
|
Title string `json:"title"`
|
|
|
|
Cover string `json:"cover"`
|
|
|
|
Intro string `json:"intro"`
|
|
|
|
CoverImg string `json:"cover_img"`
|
2023-06-05 04:21:15 +00:00
|
|
|
IsEnv int64 `json:"isEnv"`
|
|
|
|
IsMicro int64 `json:"isMicro"`
|
2023-06-02 11:24:58 +00:00
|
|
|
SizeNum uint32 `json:"sizeNum"`
|
|
|
|
MiniPrice float64 `json:"miniPrice"`
|
|
|
|
CoverDefault string `json:"coverDefault"`
|
2023-06-06 07:30:12 +00:00
|
|
|
}
|
|
|
|
//获取成功后的推荐产品
|
|
|
|
type GetSuccessRecommandReq {
|
|
|
|
Num uint32 `form:"num"`
|
|
|
|
Size uint32 `form:"size"`
|
|
|
|
Sn string `form:"sn"`
|
|
|
|
}
|
|
|
|
type GetSuccessRecommandRsp {
|
|
|
|
Title string `json:"title"`
|
|
|
|
Cover string `json:"cover"`
|
|
|
|
CoverImg string `json:"coverImg"`
|
|
|
|
Sn string `json:"sn"`
|
|
|
|
Id int64 `json:"id"`
|
|
|
|
SkuId int64 `json:"skuId"`
|
|
|
|
CoverDefault string `json:"coverDefault"`
|
2023-06-07 09:27:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//获取分类下的产品以及尺寸
|
|
|
|
type GetSizeByProductRsp {
|
|
|
|
Id int64 `json:"id"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
Children []Children `json:"children"`
|
|
|
|
}
|
|
|
|
type Children {
|
|
|
|
Id int64 `json:"id"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
Cycle int `json:"cycle"`
|
|
|
|
ChildrenList []ChildrenObj `json:"children"`
|
|
|
|
}
|
|
|
|
type ChildrenObj {
|
|
|
|
Id int64 `json:"id"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
PriceList []PriceObj `json:"price_list"`
|
|
|
|
}
|
|
|
|
type PriceObj {
|
|
|
|
Num int `json:"num"`
|
|
|
|
Price float64 `json:"price"`
|
2023-06-19 04:23:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//获取保存的设计信息
|
|
|
|
type GetProductDesignReq {
|
|
|
|
Sn string `json:"sn"`
|
|
|
|
}
|
|
|
|
type GetProductDesignRsp {
|
|
|
|
ProductId int64 `json:"product_id"`
|
|
|
|
TemplateId int64 `json:"template_id"`
|
|
|
|
MaterialId int64 `json:"material_id"`
|
|
|
|
SizeId int64 `json:"size_id"`
|
|
|
|
OptionalId int64 `json:"optional_id"`
|
|
|
|
Cover string `json:"cover"`
|
|
|
|
Info []ProductDesignInfo `json:"info"`
|
|
|
|
}
|
|
|
|
type ProductDesignInfo {
|
|
|
|
Id string `json:"id"`
|
|
|
|
Tag string `json:"tag"`
|
|
|
|
Title string `json:"title"`
|
|
|
|
Type string `json:"type"`
|
|
|
|
Text string `json:"text"`
|
|
|
|
Fill string `json:"fill"`
|
|
|
|
FontSize int64 `json:"fontSize"`
|
|
|
|
FontFamily string `json:"fontFamily"`
|
|
|
|
IfBr bool `json:"ifBr"`
|
|
|
|
IfShow bool `json:"ifShow"`
|
|
|
|
IfGroup bool `json:"ifGroup"`
|
|
|
|
MaxNum int64 `json:"maxNum"`
|
|
|
|
Rotation int64 `json:"rotation"`
|
|
|
|
Align string `json:"align"`
|
|
|
|
VerticalAlign string `json:"verticalAlign"`
|
|
|
|
Material string `json:"material"`
|
|
|
|
QRcodeType string `json:"QRcodeType"`
|
|
|
|
Width int64 `json:"width"`
|
|
|
|
Height int64 `json:"height"`
|
|
|
|
X int64 `json:"x"`
|
|
|
|
Y int64 `json:"y"`
|
|
|
|
Opacity int64 `json:"opacity"`
|
|
|
|
OptionalColor []OptionalColor `json:"optionalColor"`
|
|
|
|
ZIndex int64 `json:"zIndex"`
|
|
|
|
SvgPath string `json:"svgPath"`
|
|
|
|
MaterialName string `json:"materialName"`
|
|
|
|
MaterialTime string `json:"materialTime"`
|
|
|
|
Follow DesignFollow `json:"follow"`
|
|
|
|
Group []DesignGroup `json:"group"`
|
|
|
|
CameraStand CameraStand `json:"cameraStand"`
|
|
|
|
}
|
|
|
|
type CameraStand {
|
|
|
|
X int64 `json:"x"`
|
|
|
|
Y int64 `json:"y"`
|
|
|
|
Z int64 `json:"z"`
|
|
|
|
}
|
|
|
|
type DesignGroup {
|
|
|
|
Tag string `json:"tag"`
|
|
|
|
Text string `json:"text"`
|
|
|
|
Title string `json:"title"`
|
|
|
|
IfBr bool `json:"ifBr"`
|
|
|
|
IfGroupNoBr bool `json:"ifGroupNoBr"`
|
|
|
|
IfShow bool `json:"ifShow"`
|
|
|
|
MaxNum int64 `json:"maxNum"`
|
|
|
|
PaddingNum int64 `json:"paddingNum"`
|
|
|
|
}
|
|
|
|
type DesignFollow {
|
|
|
|
Fill string `json:"fill"`
|
|
|
|
IfShow string `json:"ifShow"`
|
|
|
|
Content string `json:"content"`
|
|
|
|
}
|
|
|
|
type OptionalColor {
|
|
|
|
Color string `json:"color"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
Default bool `json:"default"`
|
2023-05-31 03:38:17 +00:00
|
|
|
}
|