This commit is contained in:
laodaming
2023-09-27 17:52:03 +08:00
parent 8d9ff4fe10
commit fbeebabf27
4 changed files with 8 additions and 6 deletions

View File

@@ -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,
})

View File

@@ -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,
})
}