/** * 查询个人周应宝下持有资产与利息 * * @return */ @RequestMapping("/holdingAssets") public ModelAndView holdingAssets() { Integer userId = UserSession.getLoginUserId(); ModelAndView mv = new ModelAndView("week/holdingAssets"); ModelAndViewUtil.addAccountToView(mv, this.accountService); HoldingAssetsVO hav = weekTenderService.selectHoldingAssetsByUserId(userId); if (hav == null) { hav = new HoldingAssetsVO(); } mv.addObject("assets", hav); return mv; }
/** * 查询个人周盈宝投资记录 * * @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; }