Merge branch 'develop' of gitee.com:fusenpack/fusenapi into develop
This commit is contained in:
commit
4cb921853e
|
@ -7,6 +7,7 @@ import (
|
|||
"fusenapi/model/gmodel"
|
||||
"fusenapi/utils/auth"
|
||||
"fusenapi/utils/basic"
|
||||
"fusenapi/utils/format"
|
||||
"gorm.io/gorm"
|
||||
"strings"
|
||||
|
||||
|
@ -111,7 +112,7 @@ func (l *GetFittingByPidLogic) GetFittingByPid(req *types.GetFittingByPidReq, us
|
|||
Id: fitting.Id,
|
||||
MaterialImg: materialImg,
|
||||
Title: *fitting.Title,
|
||||
Price: *fitting.Price,
|
||||
Price: format.CentitoDollar(*fitting.Price, 3),
|
||||
ModelInfo: modelInfo,
|
||||
IsPopular: *fitting.IsHot > 0,
|
||||
})
|
||||
|
|
|
@ -6,6 +6,7 @@ import (
|
|||
"fusenapi/constants"
|
||||
"fusenapi/utils/auth"
|
||||
"fusenapi/utils/basic"
|
||||
"fusenapi/utils/format"
|
||||
"gorm.io/gorm"
|
||||
"strings"
|
||||
|
||||
|
@ -116,7 +117,7 @@ func (l *GetSizeByPidLogic) GetSizeByPid(req *types.GetSizeByPidReq, userinfo *a
|
|||
PartsCanDeleted: *sizeInfo.PartsCanDeleted > 0,
|
||||
ModelId: modelList[modelIndex].Id,
|
||||
IsPopular: *sizeInfo.IsHot > 0,
|
||||
MinPrice: float64(minPrice) / 100,
|
||||
MinPrice: format.CentitoDollar(minPrice, 3),
|
||||
IsDefault: defaultSizeId == sizeInfo.Id,
|
||||
})
|
||||
}
|
||||
|
|
|
@ -361,7 +361,7 @@ type GetSizeByPidRsp struct {
|
|||
PartsCanDeleted bool `json:"parts_can_deleted"` //用户可否删除配件
|
||||
ModelId int64 `json:"model_id"` //产品主模型id
|
||||
IsPopular bool `json:"is_popular"` //是否受欢迎
|
||||
MinPrice float64 `json:"min_price"` //最小价格
|
||||
MinPrice string `json:"min_price"` //最小价格
|
||||
IsDefault bool `json:"is_default"` //是否默认(这里的默认是跟列表页一致)
|
||||
}
|
||||
|
||||
|
@ -379,7 +379,7 @@ type GetFittingByPidRsp struct {
|
|||
Id int64 `json:"id"`
|
||||
MaterialImg string `json:"material_img"`
|
||||
Title string `json:"title"`
|
||||
Price int64 `json:"price"`
|
||||
Price string `json:"price"`
|
||||
IsPopular bool `json:"is_popular"`
|
||||
ModelInfo interface{} `json:"model_info"`
|
||||
}
|
||||
|
|
|
@ -411,7 +411,7 @@ type GetSizeByPidRsp {
|
|||
PartsCanDeleted bool `json:"parts_can_deleted"` //用户可否删除配件
|
||||
ModelId int64 `json:"model_id"` //产品主模型id
|
||||
IsPopular bool `json:"is_popular"` //是否受欢迎
|
||||
MinPrice float64 `json:"min_price"` //最小价格
|
||||
MinPrice string `json:"min_price"` //最小价格
|
||||
IsDefault bool `json:"is_default"` //是否默认(这里的默认是跟列表页一致)
|
||||
}
|
||||
//获取产品模板
|
||||
|
@ -428,7 +428,7 @@ type GetFittingByPidRsp {
|
|||
Id int64 `json:"id"`
|
||||
MaterialImg string `json:"material_img"`
|
||||
Title string `json:"title"`
|
||||
Price int64 `json:"price"`
|
||||
Price string `json:"price"`
|
||||
IsPopular bool `json:"is_popular"`
|
||||
ModelInfo interface{} `json:"model_info"`
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user