| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- package com.uas.sso.controller;
- import com.uas.sso.service.UserService;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.ui.ModelMap;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RequestMethod;
- import org.springframework.web.bind.annotation.RestController;
- /**
- * 用户信息管理controller
- *
- * @author wangmh
- * @date 2018/1/2
- */
- @RestController
- @RequestMapping("/api/user")
- public class UserManagerController extends BaseController {
- @Autowired
- private UserService userService;
- /**
- * 校验手机号是否被注册
- *
- * @param mobile 手机号
- * @return
- */
- @RequestMapping(value = "/checkMobile", method = RequestMethod.GET)
- public ModelMap checkMobile(String mobile) {
- return new ModelMap("hasRegister", userService.mobileHasRegistered(mobile));
- }
- /**
- * 校验真实姓名是否被认证
- *
- * @author wangmh
- * @date 2018/1/11 15:05
- * @param realName 真实姓名
- * @return
- */
- @RequestMapping(value = "/realName/valid", method = RequestMethod.GET)
- public ModelMap realNameIsValid(String realName) {
- return success(new ModelMap("isValid", userService.realNameIsValid(realName)));
- }
- /**
- * 校验身份证号是否被认证
- *
- * @author wangmh
- * @date 2018/1/11 15:06
- * @param idCard 身份证号
- * @return
- */
- @RequestMapping(value = "/idCard/valid", method = RequestMethod.GET)
- public ModelMap idCardIsValid(String idCard) {
- return success(new ModelMap("isValid", userService.idCardIsValid(idCard)));
- }
- }
|