|
|
|
@ -2,6 +2,8 @@ package au.com.royalpay.payment.manage.application.web;
|
|
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.application.core.SimpleClientApplyService;
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.beans.NewAccountBean;
|
|
|
|
|
import au.com.royalpay.payment.manage.signin.beans.LoginInfo;
|
|
|
|
|
import au.com.royalpay.payment.manage.signin.core.SignInAccountService;
|
|
|
|
|
import au.com.royalpay.payment.tools.CommonConsts;
|
|
|
|
|
import au.com.royalpay.payment.tools.http.HttpUtils;
|
|
|
|
|
|
|
|
|
@ -26,7 +28,7 @@ public class SimpleClientApplyController {
|
|
|
|
|
@Resource
|
|
|
|
|
private SimpleClientApplyService simpleClientApplyService;
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
|
|
private SignInAccountService signInAccountService;
|
|
|
|
|
@RequestMapping(value = "/account/{codeKey}", method = RequestMethod.POST)
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public void registerAccount(@PathVariable String codeKey, @RequestBody @Valid NewAccountBean accountBean, Errors errors, HttpServletResponse response)
|
|
|
|
@ -45,6 +47,7 @@ public class SimpleClientApplyController {
|
|
|
|
|
simpleClientApplyService.checkOrGenerateVerifyMailKey(address,codeKey);
|
|
|
|
|
ModelAndView view = new ModelAndView("verify_mail");
|
|
|
|
|
view.addObject("codeKey", codeKey);
|
|
|
|
|
view.addObject("address", address);
|
|
|
|
|
return view;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -52,10 +55,10 @@ public class SimpleClientApplyController {
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public void verifyMail(@PathVariable String codeKey, @PathVariable String address,@RequestBody JSONObject account){
|
|
|
|
|
simpleClientApplyService.checkOrGenerateVerifyMailKey(address,codeKey);
|
|
|
|
|
|
|
|
|
|
ModelAndView view = new ModelAndView("verify_mail");
|
|
|
|
|
view.addObject("codeKey", codeKey);
|
|
|
|
|
|
|
|
|
|
LoginInfo loginInfo = new LoginInfo();
|
|
|
|
|
loginInfo.setLoginId(account.getString("userName"));
|
|
|
|
|
loginInfo.setPassword(account.getString("password"));
|
|
|
|
|
signInAccountService.accountCheck(loginInfo);
|
|
|
|
|
simpleClientApplyService.deleteVerifyMailKey(codeKey);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|