Commit c9ad81c1 by wang

去掉page验证

parent cd95975b
Showing with 2 additions and 7 deletions
......@@ -11,7 +11,6 @@ import (
"golang_open_platform/pkg/common"
"golang_open_platform/pkg/config"
"golang_open_platform/pkg/e"
"math"
"strings"
)
type SkuService struct {
......@@ -33,9 +32,9 @@ func (this *SkuService)GetSkuListByClass(req *model.QuerySkuCreq) (rsp *model.Qu
}
if(req.Page>0){
//验证下page是否有效
if(math.Ceil(float64(pageData.Count/rsp.PageSize))<float64(req.Page)){
/*if(math.Ceil(float64(pageData.Count/rsp.PageSize))<float64(req.Page)){
return nil,e.NewApiError("page invalid",open.PARAM1)
}
}*/
mongoOpenSku,err:=dao.GetMongoOpenSku(req.ClassId,req.Page)
if(err!=nil){
return nil,e.NewApiError("service error",open.OTHERERROR)
......@@ -72,10 +71,6 @@ func (this *SkuService) GetSkuListFull(req * model.QuerySkuReq)(rsp *model.Query
common.PrintStdout().Printf(err.Error())
return rsp,e.NewApiError("service error",open.REMOTESKUINFO)
}
//"class_id1": 10014,
// "class_id2": 10031,
// "class_id1_name": "处理器及微控制器",
// "class_id2_name": "ADI(亚德诺)",
field:=[]string{"goods_id","spu_id","brand_id","brand_name","goods_name", "stock","moq","mpq",
"class_id1","class_id2","class_id1_name","class_id2_name","attrs","ladder_price","supplier_name"}
rsp.SkuData=model.SkuFilter(*remoteData,field)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment