| | |
| | | @ResponseBody |
| | | public ServerResponse reg(@RequestParam("agentCode") String agentCode, |
| | | @RequestParam("phone") String phone, |
| | | @RequestParam(value = "yzmCode", defaultValue = "") String yzmCode, |
| | | @RequestParam("phoneCode") String phoneCode, |
| | | @RequestParam("userPwd") String userPwd, |
| | | @RequestParam("email") String email, |
| | | HttpServletRequest httpServletRequest) { |
| | | return this.iUserService.reg(yzmCode, agentCode, phone, userPwd, email,httpServletRequest); |
| | | return this.iUserService.reg(agentCode, phone,phoneCode, userPwd,httpServletRequest); |
| | | } |
| | | |
| | | @RequestMapping(value = {"sendMailCode.do"}, method = {RequestMethod.POST}) |
| | | @ResponseBody |
| | | public ServerResponse sendMailCode(@RequestParam("email") String email) { |
| | | return this.iUserService.sendMailCode(email); |
| | | try { |
| | | if (email == null || email.isEmpty()) { // 判断email参数是否为空 |
| | | return ServerResponse.createByErrorMsg("邮箱不能为空"); |
| | | } |
| | | log.info("-------->发送邮件"); |
| | | return this.iUserService.sendMailCode(email); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return ServerResponse.createByErrorMsg("发送失败,发生异常"); |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = {"sendSms.do"}, method = {RequestMethod.POST}) |
| | | @ResponseBody |
| | | public ServerResponse sendSms(@RequestParam("phone") String phone,HttpServletRequest request) { |
| | | try { |
| | | if (phone == null || phone.isEmpty()) { |
| | | return ServerResponse.createByErrorMsg("手机号不能为空",request); |
| | | } |
| | | log.info("-------->发送短信"); |
| | | return this.iUserService.sendSms(phone,request); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return ServerResponse.createByErrorMsg("发送失败,发生异常"); |
| | | } |
| | | } |
| | | |
| | | |