Merge branch 'develop' of https://gitee.com/fusenpack/fusenapi into feature/auth
This commit is contained in:
@@ -113,14 +113,27 @@ func (l *GetRecommandProductListLogic) GetRecommandProductList(req *types.GetRec
|
||||
}
|
||||
}
|
||||
//获取用户信息(不用判断存在)
|
||||
user, err := l.svcCtx.AllModels.FsUser.FindUserById(l.ctx, userinfo.UserId)
|
||||
/*user, err := l.svcCtx.AllModels.FsUser.FindUserById(l.ctx, userinfo.UserId)
|
||||
if err != nil && !errors.Is(err, gorm.ErrRecordNotFound) {
|
||||
logx.Error(err)
|
||||
return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "failed to get user")
|
||||
}*/
|
||||
//获取产品标签相关属性
|
||||
productTagPropList, err := l.svcCtx.AllModels.FsProductTagProp.GetTagPropByProductIdsWithProductTag(l.ctx, productIds)
|
||||
if err != nil {
|
||||
logx.Error(err)
|
||||
return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "failed to get product tag property")
|
||||
}
|
||||
mapTagProp := make(map[int64][]types.CoverDefaultItem)
|
||||
for _, v := range productTagPropList {
|
||||
mapTagProp[*v.ProductId] = append(mapTagProp[*v.ProductId], types.CoverDefaultItem{
|
||||
Tag: v.Title,
|
||||
Cover: *v.Cover,
|
||||
})
|
||||
}
|
||||
list := make([]types.GetRecommandProductListRsp, 0, len(recommendProductList))
|
||||
for _, v := range recommendProductList {
|
||||
r := image.ThousandFaceImageFormatReq{
|
||||
/*r := image.ThousandFaceImageFormatReq{
|
||||
Size: int(req.Size),
|
||||
IsThousandFace: 0,
|
||||
Cover: *v.Cover,
|
||||
@@ -133,7 +146,7 @@ func (l *GetRecommandProductListLogic) GetRecommandProductList(req *types.GetRec
|
||||
r.IsThousandFace = int(*user.IsThousandFace)
|
||||
}
|
||||
//千人前面处理
|
||||
image.ThousandFaceImageFormat(&r)
|
||||
image.ThousandFaceImageFormat(&r)*/
|
||||
isRecommend := int64(0)
|
||||
if _, ok := mapRecommend[v.Id]; ok {
|
||||
isRecommend = 1
|
||||
@@ -142,18 +155,22 @@ func (l *GetRecommandProductListLogic) GetRecommandProductList(req *types.GetRec
|
||||
if minVal, ok := mapProductMinPrice[v.Id]; ok {
|
||||
minPrice = minVal
|
||||
}
|
||||
list = append(list, types.GetRecommandProductListRsp{
|
||||
item := types.GetRecommandProductListRsp{
|
||||
Id: v.Id,
|
||||
Sn: *v.Sn,
|
||||
Title: *v.Title,
|
||||
TitleCn: *v.TitleCn,
|
||||
Cover: r.Cover,
|
||||
CoverImg: r.CoverImg,
|
||||
CoverDefault: r.CoverDefault,
|
||||
Cover: *productInfo.Cover,
|
||||
CoverImg: *productInfo.CoverImg,
|
||||
CoverDefault: []types.CoverDefaultItem{},
|
||||
Intro: *v.Intro,
|
||||
IsRecommend: isRecommend,
|
||||
MinPrice: minPrice,
|
||||
})
|
||||
}
|
||||
if _, ok := mapTagProp[productInfo.Id]; ok {
|
||||
item.CoverDefault = mapTagProp[productInfo.Id]
|
||||
}
|
||||
list = append(list, item)
|
||||
}
|
||||
return resp.SetStatusWithMessage(basic.CodeOK, "success", list)
|
||||
}
|
||||
|
||||
@@ -366,12 +366,13 @@ func (l *GetTagProductListLogic) getTagProducts(req getTagProductsReq) (productL
|
||||
MinPrice: minPrice,
|
||||
HaveOptionalFitting: haveOptionalFitting,
|
||||
Recommended: *productInfo.IsRecommend > 0,
|
||||
Cover: *productInfo.Cover,
|
||||
}
|
||||
if _, ok = req.MapTagProp[productInfo.Id]; ok {
|
||||
item.CoverDefault = req.MapTagProp[productInfo.Id]
|
||||
}
|
||||
//千人千面处理
|
||||
r := image.ThousandFaceImageFormatReq{
|
||||
/*r := image.ThousandFaceImageFormatReq{
|
||||
Size: int(req.Size),
|
||||
IsThousandFace: 0,
|
||||
Cover: *productInfo.Cover,
|
||||
@@ -383,7 +384,7 @@ func (l *GetTagProductListLogic) getTagProducts(req getTagProductsReq) (productL
|
||||
r.IsThousandFace = int(*req.User.IsThousandFace)
|
||||
}
|
||||
image.ThousandFaceImageFormat(&r)
|
||||
item.Cover = r.Cover
|
||||
item.Cover = r.Cover*/
|
||||
//加入分类产品切片
|
||||
productListRsp = append(productListRsp, item)
|
||||
}
|
||||
|
||||
@@ -7,9 +7,7 @@ import (
|
||||
"fusenapi/constants"
|
||||
"fusenapi/utils/auth"
|
||||
"fusenapi/utils/basic"
|
||||
"fusenapi/utils/image"
|
||||
"gorm.io/gorm"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"context"
|
||||
@@ -39,13 +37,10 @@ func (l *GetTemplateByPidLogic) GetTemplateByPid(req *types.GetTemplateByPidReq,
|
||||
if req.Pid == "" {
|
||||
return resp.SetStatusWithMessage(basic.CodeRequestParamsErr, "err param:pid is empty")
|
||||
}
|
||||
if req.Size > 0 {
|
||||
req.Size = image.GetCurrentSize(req.Size)
|
||||
}
|
||||
if req.ProductTemplateTagId <= 0 {
|
||||
return resp.SetStatusWithMessage(basic.CodeRequestParamsErr, "err param:product_template_tag_id")
|
||||
}
|
||||
//获取产品信息(只是获取id)
|
||||
//获取产品信息(只获取id)
|
||||
productInfo, err := l.svcCtx.AllModels.FsProduct.FindOneBySn(l.ctx, req.Pid, "id")
|
||||
if err != nil {
|
||||
if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||
@@ -54,27 +49,32 @@ func (l *GetTemplateByPidLogic) GetTemplateByPid(req *types.GetTemplateByPidReq,
|
||||
logx.Error(err)
|
||||
return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "failed to get product info")
|
||||
}
|
||||
//获取尺寸ids(只获取id)
|
||||
sizeList, err := l.svcCtx.AllModels.FsProductSize.GetAllByProductIds(l.ctx, []int64{productInfo.Id}, "id")
|
||||
if err != nil {
|
||||
logx.Error(err)
|
||||
return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "failed to get size list")
|
||||
//没有指定物料
|
||||
sizeIds := make([]int64, 0, 10)
|
||||
if req.ProductSizeId <= 0 {
|
||||
//获取产品所有物料
|
||||
sizeList, err := l.svcCtx.AllModels.FsProductSize.GetAllByProductIds(l.ctx, []int64{productInfo.Id}, "id")
|
||||
if err != nil {
|
||||
logx.Error(err)
|
||||
return resp.SetStatusWithMessage(basic.CodeDbRecordNotFoundErr, "failed to get product size list")
|
||||
}
|
||||
if len(sizeList) == 0 {
|
||||
return resp.SetStatusWithMessage(basic.CodeDbRecordNotFoundErr, "product size list is empty")
|
||||
}
|
||||
for _, v := range sizeList {
|
||||
sizeIds = append(sizeIds, v.Id)
|
||||
}
|
||||
} else { //指定物料
|
||||
sizeIds = append(sizeIds, req.ProductSizeId)
|
||||
}
|
||||
if len(sizeList) == 0 {
|
||||
return resp.SetStatusWithMessage(basic.CodeOK, "success:size list is empty")
|
||||
}
|
||||
sizeIds := make([]int64, 0, len(sizeList))
|
||||
for _, v := range sizeList {
|
||||
sizeIds = append(sizeIds, v.Id)
|
||||
}
|
||||
//获取模型数据
|
||||
modelList, err := l.svcCtx.AllModels.FsProductModel3d.GetAllBySizeIdsTag(l.ctx, sizeIds, constants.TAG_MODEL, "id,size_id")
|
||||
//根据尺寸id获取模型
|
||||
modelList, err := l.svcCtx.AllModels.FsProductModel3d.GetAllBySizeIdsTag(l.ctx, sizeIds, constants.TAG_MODEL)
|
||||
if err != nil {
|
||||
logx.Error(err)
|
||||
return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "failed to get model list")
|
||||
}
|
||||
if len(modelList) == 0 {
|
||||
return resp.SetStatusWithMessage(basic.CodeOK, "success:model list is empty")
|
||||
return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "model list is empty")
|
||||
}
|
||||
modelIds := make([]int64, 0, len(modelList))
|
||||
mapModel := make(map[int64]int)
|
||||
@@ -82,71 +82,44 @@ func (l *GetTemplateByPidLogic) GetTemplateByPid(req *types.GetTemplateByPidReq,
|
||||
modelIds = append(modelIds, v.Id)
|
||||
mapModel[v.Id] = k
|
||||
}
|
||||
//获取模板数据
|
||||
productTemplateList, err := l.svcCtx.AllModels.FsProductTemplateV2.FindAllByModelIdsTemplateTag(l.ctx, modelIds, fmt.Sprintf("%d", req.ProductTemplateTagId), "sort DESC")
|
||||
//查询模型ids下对应tag标签的模板
|
||||
templateList, err := l.svcCtx.AllModels.FsProductTemplateV2.FindAllByModelIdsTemplateTag(l.ctx, modelIds, fmt.Sprintf("%d", req.ProductTemplateTagId), "")
|
||||
if err != nil {
|
||||
logx.Error(err)
|
||||
return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "failed to get product templates")
|
||||
return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "failed to get template list")
|
||||
}
|
||||
if len(productTemplateList) == 0 {
|
||||
return resp.SetStatusWithMessage(basic.CodeOK, "success:product template list is empty")
|
||||
}
|
||||
tagIds := make([]int64, 0, len(productTemplateList))
|
||||
for _, v := range productTemplateList {
|
||||
if *v.Tag == "" {
|
||||
rsp := make(map[string][]interface{})
|
||||
for _, templateInfo := range templateList {
|
||||
//没有设置模板据不要
|
||||
if templateInfo.TemplateInfo == nil || *templateInfo.TemplateInfo == "" {
|
||||
continue
|
||||
}
|
||||
tag, err := strconv.ParseInt(*v.Tag, 10, 64)
|
||||
if err != nil {
|
||||
logx.Error(err)
|
||||
return resp.SetStatusWithMessage(basic.CodeServiceErr, "template tag is not a number:"+*v.Tag)
|
||||
}
|
||||
tagIds = append(tagIds, tag)
|
||||
}
|
||||
//获取模板标签列表
|
||||
templateTagList, err := l.svcCtx.AllModels.FsProductTemplateTags.GetListByIds(l.ctx, tagIds)
|
||||
if err != nil {
|
||||
logx.Error(err)
|
||||
return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "failed to get template tag list")
|
||||
}
|
||||
mapTemplateTag := make(map[string]int)
|
||||
for k, v := range templateTagList {
|
||||
mapTemplateTag[fmt.Sprintf("%d", v.Id)] = k
|
||||
}
|
||||
mapRsp := make(map[string][]interface{})
|
||||
for _, v := range productTemplateList {
|
||||
//过滤没有设置详细数据的模板
|
||||
if v.TemplateInfo == nil || *v.TemplateInfo == "" {
|
||||
continue
|
||||
}
|
||||
var templateInfo map[string]interface{}
|
||||
if err = json.Unmarshal([]byte(*v.TemplateInfo), &templateInfo); err != nil {
|
||||
logx.Error(err)
|
||||
return resp.SetStatusWithMessage(basic.CodeJsonErr, "failed to parse json:template info")
|
||||
}
|
||||
if templateInfo["cover"] != nil && templateInfo["cover"].(string) != "" {
|
||||
cover := strings.Split(templateInfo["cover"].(string), ".")
|
||||
if req.Size >= 200 && len(cover) >= 2 {
|
||||
templateInfo["cover"] = fmt.Sprintf("%s_%d.%s", cover[0], req.Size, cover[1])
|
||||
}
|
||||
} else {
|
||||
templateInfo["cover"] = ""
|
||||
}
|
||||
templateInfo["tag_name"] = ""
|
||||
if tagIndex, ok := mapTemplateTag[*v.Tag]; ok {
|
||||
templateInfo["tag_name"] = *templateTagList[tagIndex].Title
|
||||
}
|
||||
templateInfo["title"] = *v.Title
|
||||
modelIndex, ok := mapModel[*v.ModelId]
|
||||
modelIndex, ok := mapModel[*templateInfo.ModelId]
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
key := fmt.Sprintf("_%d", *modelList[modelIndex].SizeId)
|
||||
if _, ok = mapRsp[key]; ok {
|
||||
mapRsp[key] = append(mapRsp[key], templateInfo)
|
||||
} else {
|
||||
mapRsp[key] = []interface{}{templateInfo}
|
||||
//基础模板信息
|
||||
var info map[string]map[string]interface{}
|
||||
if err = json.Unmarshal([]byte(*templateInfo.TemplateInfo), &info); err != nil {
|
||||
logx.Error(err)
|
||||
return resp.SetStatusWithMessage(basic.CodeJsonErr, fmt.Sprintf("failed to parse json product template info(may be old data):%d", templateInfo.Id))
|
||||
}
|
||||
//后台隐藏/显示信息
|
||||
var switchInfo interface{}
|
||||
if templateInfo.SwitchInfo != nil && *templateInfo.SwitchInfo != "" {
|
||||
_ = json.Unmarshal([]byte(*templateInfo.SwitchInfo), &switchInfo)
|
||||
}
|
||||
modelInfo := modelList[modelIndex]
|
||||
var material interface{}
|
||||
if info["module_data"] != nil && info["module_data"]["material"] != nil {
|
||||
material = info["module_data"]["material"]
|
||||
}
|
||||
mapKey := fmt.Sprintf("_%d", *modelInfo.SizeId)
|
||||
rsp[mapKey] = append(rsp[mapKey], map[string]interface{}{
|
||||
"id": templateInfo.Id,
|
||||
"material": material,
|
||||
"material_data": switchInfo,
|
||||
})
|
||||
}
|
||||
return resp.SetStatusWithMessage(basic.CodeOK, "success", mapRsp)
|
||||
return resp.SetStatusWithMessage(basic.CodeOK, "success", rsp)
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ import (
|
||||
"fusenapi/utils/auth"
|
||||
"fusenapi/utils/basic"
|
||||
"fusenapi/utils/format"
|
||||
"fusenapi/utils/image"
|
||||
"gorm.io/gorm"
|
||||
"sort"
|
||||
"strings"
|
||||
@@ -36,28 +35,51 @@ func NewHomePageRecommendProductListLogic(ctx context.Context, svcCtx *svc.Servi
|
||||
|
||||
func (l *HomePageRecommendProductListLogic) HomePageRecommendProductList(req *types.HomePageRecommendProductListReq, userinfo *auth.UserInfo) (resp *basic.Response) {
|
||||
//查询用户信息(不用判断存在)
|
||||
user, err := l.svcCtx.AllModels.FsUser.FindUserById(l.ctx, userinfo.UserId)
|
||||
_, err := l.svcCtx.AllModels.FsUser.FindUserById(l.ctx, userinfo.UserId)
|
||||
if err != nil && !errors.Is(err, gorm.ErrRecordNotFound) {
|
||||
logx.Error(err)
|
||||
return resp.SetStatusWithMessage(basic.CodeServiceErr, "get user info err")
|
||||
}
|
||||
var (
|
||||
merchantInfo *gmodel.FsMerchantCategory
|
||||
recommendProductList []gmodel.FsProduct //产品列表(select 字段需要看查询的地方)
|
||||
productOptionalPartList []gmodel.GetGroupPartListByProductIdsRsp //产品配件列表
|
||||
mapProductHaveOptionFitting = make(map[int64]struct{})
|
||||
productPriceList []gmodel.GetPriceListByProductIdsRsp //产品价格列表(select 字段需要看查询的地方)
|
||||
mapProductMinPrice = make(map[int64]int64) //产品最小价格map
|
||||
productTemplatesV2 []gmodel.FsProductTemplateV2 //产品模板列表(select 字段需要看查询的地方)
|
||||
productSizeCountList []gmodel.CountProductSizeByStatusRsp //产品尺寸数量列表(select 字段需要看查询的地方)
|
||||
mapProductSizeCount = make(map[int64]int64) //产品尺寸数量map
|
||||
mapProductTemplate = make(map[int64]struct{}) //产品模板map
|
||||
mapProductHaveOptionFitting = make(map[int64]struct{}) //是否有配件map
|
||||
productPriceList []gmodel.GetPriceListByProductIdsRsp //产品价格列表(select 字段需要看查询的地方)
|
||||
mapProductMinPrice = make(map[int64]int64) //产品最小价格map
|
||||
productTemplatesV2 []gmodel.FsProductTemplateV2 //产品模板列表(select 字段需要看查询的地方)
|
||||
productSizeCountList []gmodel.CountProductSizeByStatusRsp //产品尺寸数量列表(select 字段需要看查询的地方)
|
||||
mapProductSizeCount = make(map[int64]int64) //产品尺寸数量map
|
||||
mapProductTemplate = make(map[int64]struct{}) //产品模板map
|
||||
)
|
||||
//选了商家类型
|
||||
if req.MerchantType > 0 {
|
||||
merchantInfo, err = l.svcCtx.AllModels.FsMerchantCategory.FindOne(l.ctx, req.MerchantType)
|
||||
} else {
|
||||
//随机获取一个商家类型
|
||||
merchantInfo, err = l.svcCtx.AllModels.FsMerchantCategory.FindRandOne(l.ctx)
|
||||
}
|
||||
if err != nil {
|
||||
if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||
return resp.SetStatusWithMessage(basic.CodeDbRecordNotFoundErr, "none of merchant type found")
|
||||
}
|
||||
logx.Error(err)
|
||||
return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "failed to get merchant type info")
|
||||
}
|
||||
if *merchantInfo.RecommendProduct == "" {
|
||||
return resp.SetStatusWithMessage(basic.CodeOK, "success", []interface{}{})
|
||||
}
|
||||
recommendProductIds, err := format.StrSlicToInt64Slice(strings.Split(*merchantInfo.RecommendProduct, ","))
|
||||
if err != nil {
|
||||
logx.Error(err)
|
||||
return resp.SetStatusWithMessage(basic.CodeServiceErr, "failed to parse recommend product")
|
||||
}
|
||||
//获取列表推荐产品
|
||||
recommendProductList, _, err = l.svcCtx.AllModels.FsProductRecommend.GetRecommendProductList(gmodel.GetRecommendProductListReq{
|
||||
Ctx: l.ctx,
|
||||
Page: 1,
|
||||
Limit: 500, //设置最大500
|
||||
})
|
||||
recommendProductList, err = l.svcCtx.AllModels.FsProduct.GetProductListByIds(l.ctx, recommendProductIds, "sort-desc")
|
||||
if err != nil {
|
||||
logx.Error(err)
|
||||
return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "failed to get product list")
|
||||
}
|
||||
if len(recommendProductList) == 0 {
|
||||
return resp.SetStatusWithMessage(basic.CodeOK, "success", []interface{}{})
|
||||
}
|
||||
@@ -125,6 +147,19 @@ func (l *HomePageRecommendProductListLogic) HomePageRecommendProductList(req *ty
|
||||
for _, v := range productSizeCountList {
|
||||
mapProductSizeCount[v.ProductId] = v.Num
|
||||
}
|
||||
//获取产品标签相关属性
|
||||
productTagPropList, err := l.svcCtx.AllModels.FsProductTagProp.GetTagPropByProductIdsWithProductTag(l.ctx, productIds)
|
||||
if err != nil {
|
||||
logx.Error(err)
|
||||
return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "failed to get product tag property")
|
||||
}
|
||||
mapTagProp := make(map[int64][]types.CoverDefaultItem)
|
||||
for _, v := range productTagPropList {
|
||||
mapTagProp[*v.ProductId] = append(mapTagProp[*v.ProductId], types.CoverDefaultItem{
|
||||
Tag: v.Title,
|
||||
Cover: *v.Cover,
|
||||
})
|
||||
}
|
||||
//组装返回
|
||||
listRsp := make([]types.HomePageRecommendProductListRsp, 0, len(recommendProductList))
|
||||
for _, productInfo := range recommendProductList {
|
||||
@@ -147,12 +182,17 @@ func (l *HomePageRecommendProductListLogic) HomePageRecommendProductList(req *ty
|
||||
Id: productInfo.Id,
|
||||
Sn: *productInfo.Sn,
|
||||
Title: *productInfo.Title,
|
||||
Cover: *productInfo.Cover,
|
||||
CoverDefault: []types.CoverDefaultItem{},
|
||||
SizeNum: uint32(sizeNum),
|
||||
MinPrice: minPrice,
|
||||
HaveOptionalFitting: haveOptionalFitting,
|
||||
}
|
||||
if _, ok = mapTagProp[productInfo.Id]; ok {
|
||||
item.CoverDefault = mapTagProp[productInfo.Id]
|
||||
}
|
||||
//千人千面处理
|
||||
r := image.ThousandFaceImageFormatReq{
|
||||
/*r := image.ThousandFaceImageFormatReq{
|
||||
Size: int(req.Size),
|
||||
IsThousandFace: 0,
|
||||
Cover: *productInfo.Cover,
|
||||
@@ -166,7 +206,7 @@ func (l *HomePageRecommendProductListLogic) HomePageRecommendProductList(req *ty
|
||||
}
|
||||
image.ThousandFaceImageFormat(&r)
|
||||
item.Cover = r.Cover
|
||||
item.CoverDefault = r.CoverDefault
|
||||
item.CoverDefault = r.CoverDefault*/
|
||||
//加入分类产品切片
|
||||
listRsp = append(listRsp, item)
|
||||
}
|
||||
|
||||
@@ -234,16 +234,16 @@ type GetRecommandProductListReq struct {
|
||||
}
|
||||
|
||||
type GetRecommandProductListRsp struct {
|
||||
Id int64 `json:"id"`
|
||||
Sn string `json:"sn"`
|
||||
Title string `json:"title"`
|
||||
TitleCn string `json:"title_cn"`
|
||||
Cover string `json:"cover"`
|
||||
CoverImg string `json:"cover_img"`
|
||||
CoverDefault string `json:"cover_default"`
|
||||
Intro string `json:"intro"`
|
||||
IsRecommend int64 `json:"is_recommend"`
|
||||
MinPrice int64 `json:"min_price"`
|
||||
Id int64 `json:"id"`
|
||||
Sn string `json:"sn"`
|
||||
Title string `json:"title"`
|
||||
TitleCn string `json:"title_cn"`
|
||||
Cover string `json:"cover"`
|
||||
CoverImg string `json:"cover_img"`
|
||||
CoverDefault []CoverDefaultItem `json:"cover_default"`
|
||||
Intro string `json:"intro"`
|
||||
IsRecommend int64 `json:"is_recommend"`
|
||||
MinPrice int64 `json:"min_price"`
|
||||
}
|
||||
|
||||
type GetTagProductListReq struct {
|
||||
@@ -341,7 +341,7 @@ type GetSizeByPidRsp struct {
|
||||
|
||||
type GetTemplateByPidReq struct {
|
||||
Pid string `form:"pid"`
|
||||
Size uint32 `form:"size"`
|
||||
ProductSizeId int64 `form:"product_size_id,optional"`
|
||||
ProductTemplateTagId int64 `form:"product_template_tag_id"`
|
||||
}
|
||||
|
||||
@@ -390,18 +390,19 @@ type GetLastProductDesignRsp struct {
|
||||
}
|
||||
|
||||
type HomePageRecommendProductListReq struct {
|
||||
Size uint32 `form:"size"`
|
||||
Size uint32 `form:"size"`
|
||||
MerchantType int64 `form:"merchant_type"`
|
||||
}
|
||||
|
||||
type HomePageRecommendProductListRsp struct {
|
||||
Id int64 `json:"id"`
|
||||
Sn string `json:"sn"`
|
||||
Title string `json:"title"`
|
||||
Cover string `json:"cover"`
|
||||
SizeNum uint32 `json:"size_num"`
|
||||
MinPrice int64 `json:"min_price"`
|
||||
CoverDefault string `json:"cover_default"`
|
||||
HaveOptionalFitting bool `json:"have_optional_fitting"`
|
||||
Id int64 `json:"id"`
|
||||
Sn string `json:"sn"`
|
||||
Title string `json:"title"`
|
||||
Cover string `json:"cover"`
|
||||
SizeNum uint32 `json:"size_num"`
|
||||
MinPrice int64 `json:"min_price"`
|
||||
CoverDefault []CoverDefaultItem `json:"cover_default"`
|
||||
HaveOptionalFitting bool `json:"have_optional_fitting"`
|
||||
}
|
||||
|
||||
type Request struct {
|
||||
|
||||
Reference in New Issue
Block a user