fix
This commit is contained in:
parent
0c3fe73ce2
commit
4aaf1a1587
|
@ -38,7 +38,7 @@ func (l *GetRecommandProductListLogic) GetRecommandProductList(req *types.GetRec
|
|||
if req.Num > 100 || req.Num < 0 {
|
||||
req.Num = 4
|
||||
}
|
||||
productInfo, err := l.svcCtx.AllModels.FsProduct.FindOneBySn(l.ctx, req.Sn)
|
||||
productInfo, err := l.svcCtx.AllModels.FsProduct.FindOne(l.ctx, req.ProductId)
|
||||
if err != nil {
|
||||
if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||
return resp.SetStatusWithMessage(basic.CodeDbRecordNotFoundErr, "detail`s product is not found")
|
||||
|
|
|
@ -6,9 +6,8 @@ import (
|
|||
)
|
||||
|
||||
type GetRecommandProductListReq struct {
|
||||
Num int64 `form:"num,optional"`
|
||||
Size int64 `form:"size"`
|
||||
Sn string `form:"sn"`
|
||||
Num int64 `form:"num,optional"`
|
||||
ProductId int64 `form:"product_id"`
|
||||
}
|
||||
|
||||
type GetRecommandProductListRsp struct {
|
||||
|
|
|
@ -50,10 +50,8 @@ service product {
|
|||
|
||||
//获取详情页推荐产品列表
|
||||
type GetRecommandProductListReq {
|
||||
Num int64 `form:"num,optional"`
|
||||
Size int64 `form:"size"`
|
||||
Sn string `form:"sn"`
|
||||
//ProductId int64 `form:"product_id"`
|
||||
Num int64 `form:"num,optional"`
|
||||
ProductId int64 `form:"product_id"`
|
||||
}
|
||||
type GetRecommandProductListRsp {
|
||||
Id int64 `json:"id"`
|
||||
|
|
Loading…
Reference in New Issue
Block a user