This commit is contained in:
laodaming
2023-06-19 12:23:02 +08:00
parent 56a3c05eae
commit bbb1a845ad
10 changed files with 244 additions and 15 deletions

View File

@@ -17,9 +17,9 @@ service product {
//获取分类下的产品以及尺寸
@handler GetSizeByProductHandler
get /product/get-size-by-product returns (response);
//获取保存的设计
//获取保存的设计信息
@handler GetProductDesignHandler
get /product/design returns (response);
get /product/design(GetProductDesignReq) returns (response);
}
//获取产品列表
@@ -103,4 +103,75 @@ type ChildrenObj {
type PriceObj {
Num int `json:"num"`
Price float64 `json:"price"`
}
//获取保存的设计信息
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"`
}