style: 返回值警告消除
返回值警告消除 由 Result 为 Result<?> 由 Option 为 Option<Type>
This commit is contained in:
@@ -67,7 +67,7 @@ public class SysUserController {
|
||||
@PostMapping
|
||||
@PreAuthorize("@ss.hasPerm('sys:user:add')")
|
||||
@PreventRepeatSubmit
|
||||
public Result saveUser(
|
||||
public Result<?> saveUser(
|
||||
@RequestBody @Valid UserForm userForm
|
||||
) {
|
||||
boolean result = userService.saveUser(userForm);
|
||||
@@ -86,7 +86,7 @@ public class SysUserController {
|
||||
@Operation(summary = "修改用户")
|
||||
@PutMapping(value = "/{userId}")
|
||||
@PreAuthorize("@ss.hasPerm('sys:user:edit')")
|
||||
public Result updateUser(
|
||||
public Result<?> updateUser(
|
||||
@Parameter(description = "用户ID") @PathVariable Long userId,
|
||||
@RequestBody @Validated UserForm userForm) {
|
||||
boolean result = userService.updateUser(userId, userForm);
|
||||
@@ -96,7 +96,7 @@ public class SysUserController {
|
||||
@Operation(summary = "删除用户")
|
||||
@DeleteMapping("/{ids}")
|
||||
@PreAuthorize("@ss.hasPerm('sys:user:delete')")
|
||||
public Result deleteUsers(
|
||||
public Result<?> deleteUsers(
|
||||
@Parameter(description = "用户ID,多个以英文逗号(,)分割") @PathVariable String ids
|
||||
) {
|
||||
boolean result = userService.deleteUsers(ids);
|
||||
@@ -106,7 +106,7 @@ public class SysUserController {
|
||||
@Operation(summary = "修改用户密码")
|
||||
@PatchMapping(value = "/{userId}/password")
|
||||
@PreAuthorize("@ss.hasPerm('sys:user:password:reset')")
|
||||
public Result updatePassword(
|
||||
public Result<?> updatePassword(
|
||||
@Parameter(description = "用户ID") @PathVariable Long userId,
|
||||
@RequestParam String password
|
||||
) {
|
||||
@@ -116,7 +116,7 @@ public class SysUserController {
|
||||
|
||||
@Operation(summary = "修改用户状态")
|
||||
@PatchMapping(value = "/{userId}/status")
|
||||
public Result updateUserStatus(
|
||||
public Result<?> updateUserStatus(
|
||||
@Parameter(description = "用户ID") @PathVariable Long userId,
|
||||
@Parameter(description = "用户状态(1:启用;0:禁用)") @RequestParam Integer status
|
||||
) {
|
||||
@@ -152,7 +152,7 @@ public class SysUserController {
|
||||
|
||||
@Operation(summary = "导入用户")
|
||||
@PostMapping("/import")
|
||||
public Result importUsers(MultipartFile file) throws IOException {
|
||||
public Result<?> importUsers(MultipartFile file) throws IOException {
|
||||
UserImportListener listener = new UserImportListener();
|
||||
String msg = ExcelUtils.importExcel(file.getInputStream(), UserImportDTO.class, listener);
|
||||
return Result.success(msg);
|
||||
|
||||
Reference in New Issue
Block a user