|
|
|
@ -3,13 +3,9 @@ package au.com.royalpay.payment.manage.application.web;
|
|
|
|
|
import au.com.royalpay.payment.manage.application.beans.ClientPreApplyBean;
|
|
|
|
|
import au.com.royalpay.payment.manage.application.beans.ClientPreApplyStep1Bean;
|
|
|
|
|
import au.com.royalpay.payment.manage.application.core.SimpleClientApplyService;
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.beans.NewAccountBean;
|
|
|
|
|
import au.com.royalpay.payment.tools.CommonConsts;
|
|
|
|
|
import au.com.royalpay.payment.tools.http.HttpUtils;
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
|
|
|
|
|
import org.springframework.validation.Errors;
|
|
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
@ -20,7 +16,6 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
import javax.validation.Valid;
|
|
|
|
|
|
|
|
|
|
@RestController
|
|
|
|
@ -34,17 +29,6 @@ public class SimpleClientApplyController {
|
|
|
|
|
simpleClientApplyService.checkAccountName(phone,nation_code);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/account/{codeKey}", method = RequestMethod.POST)
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public void registerAccount(@PathVariable String codeKey, @RequestBody @Valid NewAccountBean accountBean, Errors errors, HttpServletResponse response) {
|
|
|
|
|
HttpUtils.handleValidErrors(errors);
|
|
|
|
|
simpleClientApplyService.verifyRegisterSMSCode(codeKey, accountBean.getContactPhone());
|
|
|
|
|
|
|
|
|
|
JSONObject account = simpleClientApplyService.newAccount(accountBean);
|
|
|
|
|
String statusKey = simpleClientApplyService.partnerSignIn(account);
|
|
|
|
|
HttpUtils.setCookie(response, CommonConsts.CODE_KEY, statusKey);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/account/mail/{address}/verify/{codeKey}/jump", method = RequestMethod.GET)
|
|
|
|
|
public ModelAndView jumpVerifyMail(@PathVariable String codeKey, @PathVariable String address,@RequestParam String username) {
|
|
|
|
|
simpleClientApplyService.checkOrGenerateVerifyMailKey(address, codeKey);
|
|
|
|
|