class UsersController extends BaseController {

    @ApiOperation(value="registerUser",notes = "REGISTER_USER_NOTES")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "userName", value = "USER_NAME", type = "String"),
            @ApiImplicitParam(name = "userPassword", value = "USER_PASSWORD", type = "String"),
            @ApiImplicitParam(name = "repeatPassword", value = "REPEAT_PASSWORD", type = "String"),
            @ApiImplicitParam(name = "email", value = "EMAIL", type = "String"),
    })
    @PostMapping("/register")
    @ResponseStatus(HttpStatus.OK)
    @ApiException(CREATE_USER_ERROR)
    public Result<Object> registerUser(@RequestParam(value = "userName") String userName,
                               @RequestParam(value = "userPassword") String userPassword,
                               @RequestParam(value = "repeatPassword") String repeatPassword,
                               @RequestParam(value = "email") String email) throws Exception {
        userName = ParameterUtils.handleEscapes(userName);
        userPassword = ParameterUtils.handleEscapes(userPassword);
        repeatPassword = ParameterUtils.handleEscapes(repeatPassword);
        email = ParameterUtils.handleEscapes(email);
        logger.info("user self-register, userName: {}, userPassword {}, repeatPassword {}, eamil {}",
                userName, Constants.PASSWORD_DEFAULT, Constants.PASSWORD_DEFAULT, email);
        Map<String, Object> result = usersService.registerUser(userName, userPassword, repeatPassword, email);
        return returnDataList(result);
    }

}