dev:岗位管理-代码优化

main
SondonYong 2025-11-07 09:29:49 +08:00
parent e667acb2cb
commit b9a40df3ac
3 changed files with 7 additions and 7 deletions

View File

@ -56,7 +56,7 @@ public class PostController {
// 数据类型转换
if(StrUtil.isNotBlank(qry.getDepartmentIdString())){
qry.setEqDepartmentId(Long.parseLong(qry.getDepartmentIdString()));
qry.setEqDepartmentId(Long.valueOf(qry.getDepartmentIdString()));
}
return postService.listPage(qry);
}
@ -69,7 +69,7 @@ public class PostController {
}
// 数据类型转换
if(StrUtil.isNotBlank(qry.getDepartmentIdString())){
qry.setDepartmentId(Long.parseLong(qry.getDepartmentIdString()));
qry.setDepartmentId(Long.valueOf(qry.getDepartmentIdString()));
}
if(qry.getPostIdsString() != null && qry.getPostIdsString().length > 0){
qry.setPostIds(Arrays.stream(qry.getPostIdsString())
@ -84,14 +84,14 @@ public class PostController {
@ApiOperation("详情")
@GetMapping("/getInfoById")
public SingleResponse<PostCO> getInfoById(@RequestParam(value = "id") String id) {
Long idLong = Long.parseLong(id);
Long idLong = Long.valueOf(id);
return postService.getInfoById(idLong);
}
@ApiOperation("删除")
@PutMapping("/remove")
public Response remove(@RequestParam(value = "id") String id) {
Long idLong = Long.parseLong(id);
Long idLong = Long.valueOf(id);
postService.remove(idLong);
return SingleResponse.buildSuccess();
}

View File

@ -35,7 +35,7 @@ public class PostAddExe {
// 数据类型转换
if(StrUtil.isNotBlank(cmd.getDepartmentIdString())){
cmd.setDepartmentId(Long.parseLong(cmd.getDepartmentIdString()));
cmd.setDepartmentId(Long.valueOf(cmd.getDepartmentIdString()));
}
if(cmd.getDepartmentIdsString() != null && cmd.getDepartmentIdsString().length > 0){
cmd.setDepartmentIds(Arrays.stream(cmd.getDepartmentIdsString())

View File

@ -42,10 +42,10 @@ public class PostUpdateExe {
// 数据类型转换
if(StrUtil.isNotBlank(postUpdateCmd.getIdString())){
postUpdateCmd.setId(Long.parseLong(postUpdateCmd.getIdString()));
postUpdateCmd.setId(Long.valueOf(postUpdateCmd.getIdString()));
}
if(StrUtil.isNotBlank(postUpdateCmd.getDepartmentIdString())){
postUpdateCmd.setDepartmentId(Long.parseLong(postUpdateCmd.getDepartmentIdString()));
postUpdateCmd.setDepartmentId(Long.valueOf(postUpdateCmd.getDepartmentIdString()));
}
if(postUpdateCmd.getDepartmentIdsString() != null && postUpdateCmd.getDepartmentIdsString().length > 0){
postUpdateCmd.setDepartmentIds(Arrays.stream(postUpdateCmd.getDepartmentIdsString())