|
|
@@ -29,7 +29,12 @@ import org.springframework.http.HttpStatus;
|
|
|
import org.springframework.http.ResponseEntity;
|
|
|
import org.springframework.ui.ModelMap;
|
|
|
import org.springframework.util.StringUtils;
|
|
|
-import org.springframework.web.bind.annotation.*;
|
|
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
+import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpSession;
|
|
|
@@ -728,7 +733,7 @@ public class UserController {
|
|
|
} else {
|
|
|
HttpHeaders headers = new HttpHeaders();
|
|
|
headers.add("Content-Type", "application/text; charset=utf-8");
|
|
|
- return new ResponseEntity<Boolean>(userService.isTelUseable(tel.replaceAll("\\s*", "")), headers,
|
|
|
+ return new ResponseEntity<>(userService.isTelUseable(tel.replaceAll("\\s*", "")), headers,
|
|
|
HttpStatus.OK);
|
|
|
}
|
|
|
}
|
|
|
@@ -741,14 +746,9 @@ public class UserController {
|
|
|
*/
|
|
|
@RequestMapping(value = "/emailEnable", method = RequestMethod.GET)
|
|
|
public ResponseEntity<Boolean> emailEnable(final String email) {
|
|
|
- if (email == null) {
|
|
|
- throw new IllegalOperatorException("邮箱不能为空");
|
|
|
- } else {
|
|
|
- HttpHeaders headers = new HttpHeaders();
|
|
|
- headers.add("Content-Type", "application/text; charset=utf-8");
|
|
|
- return new ResponseEntity<Boolean>(userService.isEmailUseable(email.replaceAll("\\s*", "")), headers,
|
|
|
- HttpStatus.OK);
|
|
|
- }
|
|
|
+ HttpHeaders headers = new HttpHeaders();
|
|
|
+ headers.add("Content-Type", "application/text; charset=utf-8");
|
|
|
+ return new ResponseEntity<>(Boolean.TRUE, headers, HttpStatus.OK);
|
|
|
}
|
|
|
|
|
|
/**
|