コード例 #1
0
 /**
  * 查询个人周应宝下持有资产与利息
  *
  * @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;
 }
コード例 #2
0
 @RequestMapping(value = "/tenderAction")
 @ResponseBody
 public UserTenderActionResultVO tenderAction(HttpServletRequest request, UserTenderActionVO vo) {
   UserTenderActionResultVO resultVO = new UserTenderActionResultVO();
   vo.setTenderType("week");
   resultVO.setTenderType("week");
   if (UserSession.getUserSession() != null) {
     if (DigestUtils.md5Hex(vo.getPaypassword())
         .equals(UserSession.getUserSession().getPayPassword())) {
       vo.setUserType(UserSession.getUserSession().getTypeId());
       vo.setUserId(UserSession.getUserSession().getUserId());
       vo.setUserip(ModelAndViewUtil.getIpAddr(request));
       // resultVO = this.weekTenderService.insertWeekTender(userVO);
       resultVO = this.borrowTenderService.userTenderAction(vo);
     } else {
       throw new BusinessException("8005011", "支付密码错误");
     }
   } else {
     throw new BusinessException("8005011", "登陆后才可投资哦");
   }
   return resultVO;
 }
コード例 #3
0
 /**
  * 查询个人周盈宝投资记录
  *
  * @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;
 }