master
wangning 6 years ago
parent c4f2de599e
commit 047ba2b7d7

@ -22,17 +22,14 @@ public class SimpleClientApplyController {
@Resource
private SimpleClientApplyService simpleClientApplyService;
@RequestMapping(value = "/account/{account_name}", method = RequestMethod.GET)
@ResponseBody
@RequestMapping(value = "/account/{account_name}/check", method = RequestMethod.GET)
public void checkAccountName(@PathVariable String account_name){
simpleClientApplyService.checkAccountName(account_name);
}
@RequestMapping(value = "/account/{codeKey}", method = RequestMethod.POST)
@ResponseBody
public void registerAccount(@PathVariable String codeKey, @RequestBody @Valid NewAccountBean accountBean, Errors errors, HttpServletResponse response)
throws Exception {
public void registerAccount(@PathVariable String codeKey, @RequestBody @Valid NewAccountBean accountBean, Errors errors, HttpServletResponse response) {
HttpUtils.handleValidErrors(errors);
simpleClientApplyService.verifyRegisterSMSCode(codeKey,accountBean.getContactPhone());
@ -60,12 +57,12 @@ public class SimpleClientApplyController {
}
@RequestMapping(value = "/info/update/{username}", method = RequestMethod.POST)
public void registerCompanyInfo(@PathVariable String username, @RequestBody @Valid ClientPreApplyBean applyBean) throws Exception {
public void registerCompanyInfo(@PathVariable String username, @RequestBody @Valid ClientPreApplyBean applyBean) {
simpleClientApplyService.updateApplyInfo(applyBean,username);
}
@RequestMapping(value = "/info/bank/{bsb_no}", method = RequestMethod.GET)
public JSONObject getBankInfo(@PathVariable String bsb_no) throws Exception {
public JSONObject getBankInfo(@PathVariable String bsb_no) {
return simpleClientApplyService.getBankInfo(bsb_no);
}
}

@ -107,7 +107,7 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
$scope.checkUserName = function (username) {
if(username != null && username != ''){
$http.get('/register/account/' + $scope.partner.username).then(function (resp) {
$http.get('/register/account/' + $scope.partner.username+'/check').then(function (resp) {
$scope.name_exist = false;
}, function (resp) {
if (resp.data.status == 403){

Loading…
Cancel
Save