前段app推荐列表获取不到商户信息,我单元测试过,可以成功返回参数
还有通过http://127.0.0.1:8081/upload/ad/imag1.png可以获取到图片吗?,广告列表获取不到图片
下面是ApiController
// 首页 —— 推荐列表(猜你喜欢) @RequestMapping(value = "/homelist/{city}/{page.currentPage}", method = RequestMethod.GET) public BusinessListDto homeList(BusinessDto businessDto){ businessDto.getPage().setPageNumber(businessHomeNumber); return businessService.searchByPageForApi(businessDto); } @RequestMapping(value = "/submitComment", method = RequestMethod.POST) public Map<String,Object> submitComment(){ Map<String,Object> result = new HashMap<String,Object>(); result.put("erron",0); result.put("img","ok"); return result; } // 详情页 - 商户信息 @RequestMapping(value = "/detail/info/{id}",method = RequestMethod.GET) public BusinessDto businessDetail(@PathVariable("id") Long id){ return businessService.getById(id); } //三个参数查询 @RequestMapping(value = "/search/{page.currentPage}/{city}/{category}/{keyword}",method = RequestMethod.GET) public BusinessListDto businessSearchThree(BusinessDto businessDto){ businessDto.getPage().setPageNumber(businessSearchNumber); return businessService.searchByPageForApi(businessDto); } //两个参数查询 @RequestMapping(value = "/search/{page.currentPage}/{city}/{category}",method = RequestMethod.GET) public BusinessListDto businessSearchTwo(BusinessDto businessDto){ businessDto.getPage().setPageNumber(businessSearchNumber); return businessService.searchByPageForApi(businessDto); }
【毕设】SSM全面梳理,前后端分离,zTree 和复杂SQL打造权限系统,解惑MyBatis和RESTful
了解课程