示例#1
0
  /**
   * @Description: 根据会员编号查询会员
   *
   * @param request
   * @param response
   * @author 马正正
   * @date 2015年10月27日
   */
  @RequestMapping(value = "findMemByNo")
  @ResponseBody
  @OpLog(logDesc = "根据会员编号查询会员")
  public void findMemByNo(HttpServletRequest request, HttpServletResponse response) {
    try {
      String memberNo = request.getParameter("memberNo");
      boolean res = mUserInfoService.findUserByAccountNo(memberNo) == null ? false : true;

      writeToPage(res + "", response);
    } catch (Exception e) {
      log.error("根据会员编号查询会员异常", e);
      writeToPage("{\"code\":1,\"msg\":\"" + e.getMessage() + "\"}", response);
    }
  }
示例#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);
   }
 }