Beispiel #1
0
  /**
   * @Description: 查询充值记录
   *
   * @param request
   * @param response
   * @author 马正正
   * @date 2015年8月19日
   */
  @RequestMapping(value = "list")
  @ResponseBody
  @OpLog(logDesc = "查询充值记录")
  public void list(HttpServletRequest request, HttpServletResponse response, MConditions cons) {
    try {
      PageObject po = getPageObject(request);

      po.getCondition().put("accountType", request.getParameter("accountType"));
      po.getCondition().put("way", request.getParameter("way"));
      po.getCondition().put("forward", request.getParameter("forward"));
      po.getCondition().put("startDate", cons.getStartDate());
      po.getCondition().put("endDate", cons.getEndDate());
      po.getCondition().put("memberNo", cons.getMemberNo());

      writeToPage(JSONUtils.toJson(mRechargeService.query(po)), response);
    } catch (Exception e) {
      log.error("查询提现单异常", e);
    }
  }
Beispiel #2
0
 /**
  * @Description: 充值
  *
  * @param request
  * @param response
  * @param recharge
  * @author 马正正
  * @date 2015年10月27日
  */
 @RequestMapping(value = "recharge")
 @ResponseBody
 @OpLog(logDesc = "充值")
 public void recharge(
     HttpServletRequest request, HttpServletResponse response, MRechargeModel recharge) {
   try {
     if (recharge.getAccountType() == 1) {
       recharge.setAmount(recharge.getAmount() * 100);
     }
     recharge.setOperator(SpringSecurityUtils.getCurrentUserName());
     MUserInfoModel user = mUserInfoService.findUserByAccountNo(recharge.getMemberNo());
     recharge.setUserId(user.getId());
     mRechargeService.background(recharge);
     writeToPage("{\"code\":0,\"msg\":\"操作成功\"}", response);
   } catch (Exception e) {
     log.error("充值异常", e);
     writeToPage("{\"code\":1,\"msg\":\"" + e.getMessage() + "\"}", response);
   }
 }