em đang sai vong if else. để rống 1 trong idProductType hoắc idArea nó chỉ chạy xuống p1
if (idProductType == null &&idArea!=null && minPrice==0 && maxPrice==0) {
System.out.println("======");
List<ProjectModel> list = projectService.findProjectByIdArea(idArea, limit, page);
responseData = new ResponseData(0, "thanh cong", new ResponseBase(null, list));
} else if (idProductType != null && idArea!=null && minPrice>=0 && maxPrice!=0){
System.out.println("......");
List<ProjectModel> list = (List<ProjectModel>) projectService.findProjectAdvance(idProductType, idArea, minPrice, maxPrice, limit, page);
System.out.println(list);
responseData = new ResponseData(0, "thanh cong", new ResponseBase(null, list));
}
else if(idArea==null && idProductType!=null && minPrice==0 && maxPrice==0){
System.out.println("d1");
List<ProjectModel> list=projectService.findProjectByType(idProductType,limit,page);
responseData=new ResponseData(0,"thanh cong",new ResponseBase(null,list));
}
else if ( idArea!=null && idProductType != null && minPrice==0 && maxPrice ==0){
System.out.println("p1");
List<ProjectModel> list = projectService.findProjectByIdAreaAndType(idProductType, idArea, limit, page);
responseData = new ResponseData(0, "thanh cong", new ResponseBase(null, list));
}
83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?