@RequestMapping("/weekTenderListAjax") @ResponseBody public PageResult<WeekTender> borrowListAjax(Integer weekId, PageSearch pageSearch) throws Exception { PageResult<WeekTender> result = new PageResult<WeekTender>(); WeekTender wt = new WeekTender(); wt.setWeekId(weekId); pageSearch.setEntity(wt); List<WeekTender> weekTenderList = this.weekTenderService.selectWeekTenderListPage(pageSearch); result.setTotal(pageSearch.getTotalResult()); result.setRows(weekTenderList); return result; }
/** * 查询个人周盈宝投资记录 * * @param pageSearch * @param start * @param end * @return * @throws Exception */ @RequestMapping("/assetsListAjax") @ResponseBody public PageResult<WeekTender> assetsListAjax( PageSearch pageSearch, @RequestParam(value = "start", required = false) String start, @RequestParam(value = "end", required = false) String end) throws Exception { PageResult<WeekTender> result = new PageResult<WeekTender>(); Integer userId = UserSession.getLoginUserId(); Map<String, Object> map = new HashMap<String, Object>(); map.put("userId", userId); map.put("start", start); map.put("end", end); pageSearch.setEntity(map); List<WeekTender> wtList = weekTenderService.selectByUserId(pageSearch); for (WeekTender wt : wtList) { wt.setWeek(weekService.selectByPrimaryKey(wt.getWeekId())); } result.setRows(wtList); result.setTotal(pageSearch.getTotalResult()); return result; }