|
@@ -55,7 +55,7 @@ public class SysUserController extends BaseController{
|
|
|
|
|
|
@PostMapping("/update")
|
|
|
public ResultData update(@RequestBody SysUserParam param){
|
|
|
- if(StringUtils.isEmpty(param.getId())){
|
|
|
+ if(param.getId() == null){
|
|
|
throw new BusinessException(ErrorCode.MISSING_REQUIRED_PARAMETERS);
|
|
|
}
|
|
|
sysUserService.addOrUpdate(param);
|
|
@@ -64,7 +64,7 @@ public class SysUserController extends BaseController{
|
|
|
|
|
|
@PostMapping("/delete")
|
|
|
public ResultData delete(@RequestBody SysUserParam param){
|
|
|
- if(StringUtils.isEmpty(param.getId())){
|
|
|
+ if(param.getId() == null){
|
|
|
throw new BusinessException(ErrorCode.MISSING_REQUIRED_PARAMETERS);
|
|
|
}
|
|
|
sysUserService.removeById(param.getId());
|
|
@@ -72,7 +72,7 @@ public class SysUserController extends BaseController{
|
|
|
}
|
|
|
@PostMapping("/rePassword")
|
|
|
public ResultData rePassword(@RequestBody SysUserParam param){
|
|
|
- if(StringUtils.isEmpty(param.getId()) && StringUtils.isEmpty(param.getPassword())){
|
|
|
+ if(param.getId() == null && StringUtils.isEmpty(param.getPassword())){
|
|
|
throw new BusinessException(ErrorCode.MISSING_REQUIRED_PARAMETERS);
|
|
|
}
|
|
|
sysUserService.addOrUpdate(param);
|