master
wangning 7 years ago
parent c4f2de599e
commit 047ba2b7d7

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

@ -107,7 +107,7 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
$scope.checkUserName = function (username) { $scope.checkUserName = function (username) {
if(username != null && 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; $scope.name_exist = false;
}, function (resp) { }, function (resp) {
if (resp.data.status == 403){ if (resp.data.status == 403){

Loading…
Cancel
Save