淘宝、京东、拼多多导购项目
public ObjectRestResponse<List<GoodsInfoModel>> search(Integer type , String keyWord , String catId , Integer grade , Integer sortType ,Integer eliteId, Integer pageIndex , Integer pageSize , String memberId) throws Exception{
switch (type){
case 1 :
return ObjectRestResponse.getInstance().setData(setCommission(JdApiUtil.jdSearch(keyWord , pageIndex , pageSize , sortType , eliteId,null , ObjectUtils.isEmpty(catId) ? null : Long.parseLong(catId) , ObjectUtils.isEmpty(grade) ? null : grade , null) , Long.parseLong(memberId)));
case 2 :
return ObjectRestResponse.getInstance().setData(setCommission(PddUtil.pddSearch(keyWord , sortType , pageIndex , pageSize , null , Constant.PDD_PID , memberId , null) , Long.parseLong(memberId)));
case 3:
return ObjectRestResponse.getInstance().setData(setCommission(TbUtil.tbSearch(keyWord , null , sortType , pageIndex , pageSize) , Long.parseLong(memberId))) ;
}
throw new Exception("参数错误");
}