fix
This commit is contained in:
parent
f7a20f3670
commit
cf4e70b8d1
|
@ -2,7 +2,6 @@ package logic
|
|||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fusenapi/model"
|
||||
"fusenapi/product/internal/svc"
|
||||
"fusenapi/product/internal/types"
|
||||
|
@ -30,10 +29,7 @@ func NewGetProductListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Ge
|
|||
func (l *GetProductListLogic) GetProductList(req *types.GetProductListReq, loginInfo auth.UserInfo) (resp *types.Response, err error) {
|
||||
//校验前台登录情况
|
||||
if loginInfo.UserId == 0 {
|
||||
return &types.Response{
|
||||
Code: 401,
|
||||
Message: "please sign in",
|
||||
}, nil
|
||||
return &types.Response{Code: 402, Message: "please sign in"}, nil
|
||||
}
|
||||
//获取合适尺寸
|
||||
if req.Size > 0 {
|
||||
|
@ -46,7 +42,7 @@ func (l *GetProductListLogic) GetProductList(req *types.GetProductListReq, login
|
|||
return nil, err
|
||||
}
|
||||
if userInfo.Id == 0 {
|
||||
return nil, errors.New("user not exists")
|
||||
return &types.Response{Code: 402, Message: "please sign in"}, nil
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ func GetCurrentSize(clientSize uint32) uint32 {
|
|||
return newSizeArray[lenNewSize-1]
|
||||
}
|
||||
//小于最小尺寸则返回规则最小尺寸
|
||||
if clientSize < newSizeArray[0] {
|
||||
if clientSize <= newSizeArray[0] {
|
||||
return newSizeArray[0]
|
||||
}
|
||||
for _, v := range newSizeArray {
|
||||
|
|
Loading…
Reference in New Issue
Block a user