fix
This commit is contained in:
@@ -125,6 +125,13 @@ func (l *GetProductListLogic) GetProductList(req *types.GetProductListReq, login
|
||||
if tagInfo == nil {
|
||||
return &types.Response{Code: 510, Message: "classification not exists "}, nil
|
||||
}
|
||||
//获取产品尺寸数量
|
||||
productSizeModel := model.NewFsProductSizeModel(l.svcCtx.MysqlConn)
|
||||
productSizeCount, err := productSizeModel.CountByStatus(l.ctx, 1)
|
||||
if err != nil {
|
||||
logx.Error(err)
|
||||
return &types.Response{Code: 510, Message: "get product size count err "}, nil
|
||||
}
|
||||
//拼接返回
|
||||
itemList := make([]types.Items, 0, productLen)
|
||||
for _, v := range productList {
|
||||
@@ -147,7 +154,7 @@ func (l *GetProductListLogic) GetProductList(req *types.GetProductListReq, login
|
||||
CoverImg: v.CoverImg,
|
||||
IsEnv: v.IsProtection,
|
||||
IsMicro: v.IsMicrowave,
|
||||
SizeNum: 1, //????????????????
|
||||
SizeNum: uint32(productSizeCount),
|
||||
MiniPrice: format.CentoDollar(minPrice),
|
||||
}
|
||||
if req.Size > 0 {
|
||||
|
||||
Reference in New Issue
Block a user