|
|
|
@ -135,7 +135,16 @@ public class UserController { |
|
|
|
|
@RequiresPermissions("sys:user:add") |
|
|
|
|
@Decrypt |
|
|
|
|
@LogAnnotation(title = "用户管理", action = "新增用户") |
|
|
|
|
public R addUser(@RequestBody @Valid SysUser vo) { |
|
|
|
|
public R addUser(@RequestBody @Valid SysUser vo) throws UnsupportedEncodingException { |
|
|
|
|
//中文转码
|
|
|
|
|
if (!StringUtils.isEmpty(vo.getRealName())) { |
|
|
|
|
String realName = URLDecoder.decode(vo.getRealName(), StandardCharsets.UTF_8.toString()); |
|
|
|
|
vo.setRealName(realName); |
|
|
|
|
} |
|
|
|
|
if (!StringUtils.isEmpty(vo.getUsername())) { |
|
|
|
|
String realName = URLDecoder.decode(vo.getUsername(), StandardCharsets.UTF_8.toString()); |
|
|
|
|
vo.setUsername(realName); |
|
|
|
|
} |
|
|
|
|
userService.addUser(vo); |
|
|
|
|
return R.success(); |
|
|
|
|
} |
|
|
|
|