fix
This commit is contained in:
@@ -67,6 +67,14 @@ func (l *GetProductDetailLogic) GetProductDetail(req *types.GetProductDetailReq,
|
||||
if *productInfo.IsDel == 1 {
|
||||
return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "the product status is deleted")
|
||||
}
|
||||
//解析产品单位
|
||||
var websiteUnit interface{}
|
||||
if *productInfo.WebsiteUnit != "" {
|
||||
if err = json.Unmarshal([]byte(*productInfo.WebsiteUnit), &websiteUnit); err != nil {
|
||||
logx.Error(err)
|
||||
return resp.SetStatusWithMessage(basic.CodeJsonErr, "failed to parse website unit")
|
||||
}
|
||||
}
|
||||
//获取产品类型
|
||||
productTag, err := l.svcCtx.AllModels.FsTags.FindOne(l.ctx, *productInfo.Type)
|
||||
if err != nil {
|
||||
@@ -256,6 +264,7 @@ func (l *GetProductDetailLogic) GetProductDetail(req *types.GetProductDetailReq,
|
||||
IsEnv: *productInfo.IsProtection,
|
||||
IsMicro: *productInfo.IsMicrowave,
|
||||
IsCustomization: *productInfo.IsCustomization,
|
||||
WebsiteUnit: websiteUnit,
|
||||
},
|
||||
BaseColors: color_list.GetColor(),
|
||||
SizeList: rspSizeList,
|
||||
|
||||
Reference in New Issue
Block a user