...
|
...
|
@@ -54,16 +54,16 @@ public class FavoriteController { |
|
|
|
|
|
int total = favoriteService.numFavorite(vo);
|
|
|
int pageSize = vo.getLimit();
|
|
|
|
|
|
int frontPage = vo.getPage();
|
|
|
//分页获取收藏的商品id,
|
|
|
List<String> productIds= favoriteService.listFavorite(vo);
|
|
|
logger.info("After call ufo.user.favoriteList result productIds is {}", productIds);
|
|
|
|
|
|
if(total<=0||productIds==null||productIds.size()<=0){
|
|
|
JSONObject jo=new JSONObject();
|
|
|
jo.put("total",0);
|
|
|
jo.put("page_total",0);
|
|
|
jo.put("page",1);
|
|
|
jo.put("total",total);
|
|
|
jo.put("page_total",total%pageSize==0?total/pageSize:((total/pageSize)+1));
|
|
|
jo.put("page",frontPage);
|
|
|
jo.put("page_size",pageSize);
|
|
|
jo.put("product_list",new ArrayList<>());
|
|
|
return new com.yohoufo.common.ApiResponse.ApiResponseBuilder().data(jo).code(200).message("listFavorite data is null").build();
|
...
|
...
|
@@ -82,7 +82,7 @@ public class FavoriteController { |
|
|
);
|
|
|
|
|
|
if(productApiResponse!=null&&productApiResponse.getData()!=null){
|
|
|
int frontPage = vo.getPage();
|
|
|
|
|
|
JSONObject jo=(JSONObject)productApiResponse.getData();
|
|
|
jo.put("total", total);
|
|
|
jo.put("page_total",total%pageSize==0?total/pageSize:((total/pageSize)+1));
|
...
|
...
|
|