|
@@ -16,6 +16,7 @@ import com.huaxu.util.UserUtil;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiParam;
|
|
import io.swagger.annotations.ApiParam;
|
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.security.oauth2.common.OAuth2AccessToken;
|
|
import org.springframework.security.oauth2.common.OAuth2AccessToken;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
@@ -120,8 +121,10 @@ public class UserController {
|
|
@RequestMapping(value = "insertRegister", method = RequestMethod.POST)
|
|
@RequestMapping(value = "insertRegister", method = RequestMethod.POST)
|
|
@ApiOperation(value = "插入注册申请")
|
|
@ApiOperation(value = "插入注册申请")
|
|
public AjaxMessage<Integer> insertRegister(@ApiParam(value = "注册申请信息", required = true) @RequestBody User user) {
|
|
public AjaxMessage<Integer> insertRegister(@ApiParam(value = "注册申请信息", required = true) @RequestBody User user) {
|
|
|
|
+ if(StringUtils.isEmpty(user.getUsername())||StringUtils.isEmpty(user.getPhone())||StringUtils.isEmpty(user.getUserType())) {
|
|
|
|
+ return new AjaxMessage<>(ResultStatus.PARAM_ERROR);
|
|
|
|
+ }
|
|
int result = userService.insertRegister(user);
|
|
int result = userService.insertRegister(user);
|
|
-
|
|
|
|
return new AjaxMessage<>(ResultStatus.OK, result);
|
|
return new AjaxMessage<>(ResultStatus.OK, result);
|
|
}
|
|
}
|
|
|
|
|