|
|
@@ -82,6 +82,9 @@ public class RegisterController {
|
|
|
HttpHeaders headers = new HttpHeaders();
|
|
|
headers.add("Content-Type", "application/json; charset=utf-8");
|
|
|
ModelMap map = new ModelMap();
|
|
|
+ System.out.println(uu);
|
|
|
+ System.out.println(result);
|
|
|
+ System.out.println(reason);
|
|
|
String aduitReslt = enterpriseService.audit(uu, result, reason);
|
|
|
map.put("aduit", aduitReslt);
|
|
|
if(aduitReslt.equals("ALLOW") || aduitReslt.equals("NOTALLOW")) {
|
|
|
@@ -91,6 +94,60 @@ public class RegisterController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 激活码验证激活
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/activate", method = RequestMethod.POST)
|
|
|
+ public @ResponseBody
|
|
|
+ ResponseEntity<ModelMap> activateCheck(Long uu, String checkcode) {
|
|
|
+ HttpHeaders headers = new HttpHeaders();
|
|
|
+ headers.add("Content-Type", "application/json; charset=utf-8");
|
|
|
+ ModelMap map = new ModelMap();
|
|
|
+ String checkReslt = enterpriseService.activateCheck(uu, checkcode);
|
|
|
+ map.put("result", checkReslt);
|
|
|
+ if(checkReslt.equals("SUCCESS")) {//验证通过
|
|
|
+ return new ResponseEntity<ModelMap>(map, headers, HttpStatus.OK);
|
|
|
+ } else {//验证不通过
|
|
|
+ return new ResponseEntity<ModelMap>(map, headers, HttpStatus.EXPECTATION_FAILED);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 设置管理员账号密码
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/setAdminPassword", method = RequestMethod.POST)
|
|
|
+ public @ResponseBody
|
|
|
+ ResponseEntity<ModelMap> setAdminPassword(Long enuu, String password) {
|
|
|
+ HttpHeaders headers = new HttpHeaders();
|
|
|
+ headers.add("Content-Type", "application/json; charset=utf-8");
|
|
|
+ ModelMap map = new ModelMap();
|
|
|
+ String result = enterpriseService.setAdminPassword(enuu, password);
|
|
|
+ map.put("result", result);
|
|
|
+ if(result.equals("SUCCESS")) {//验证通过
|
|
|
+ return new ResponseEntity<ModelMap>(map, headers, HttpStatus.OK);
|
|
|
+ } else {//验证不通过
|
|
|
+ return new ResponseEntity<ModelMap>(map, headers, HttpStatus.EXPECTATION_FAILED);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 重新发送激活邮件
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/setEmailAgain", method = RequestMethod.GET)
|
|
|
+ public @ResponseBody
|
|
|
+ ResponseEntity<ModelMap> setActivateEmailAgain(Long enuu) {
|
|
|
+ HttpHeaders headers = new HttpHeaders();
|
|
|
+ headers.add("Content-Type", "application/json; charset=utf-8");
|
|
|
+ ModelMap map = new ModelMap();
|
|
|
+ String result = enterpriseService.sendActivateEmail(enuu);
|
|
|
+ map.put("result", result);
|
|
|
+ if(result.equals("SUCCESS")) {//验证通过
|
|
|
+ return new ResponseEntity<ModelMap>(map, headers, HttpStatus.OK);
|
|
|
+ } else {//验证不通过
|
|
|
+ return new ResponseEntity<ModelMap>(map, headers, HttpStatus.EXPECTATION_FAILED);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 手机号是否可用
|
|
|
* @param tel
|