Browse Source

1、7630入职职位id校验

dongpo 6 tháng trước cách đây
mục cha
commit
25dd1bd512

+ 2 - 1
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/entry/vo/OaEntrySaveReqVO.java

@@ -6,6 +6,7 @@ import lombok.Data;
 
 import javax.validation.constraints.NotBlank;
 import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
 import java.util.List;
 
 @Schema(description = "管理后台 - 入职流程信息新增/修改 Request VO")
@@ -24,7 +25,7 @@ public class OaEntrySaveReqVO {
     private String deptId;
 
     @Schema(description = "职位id", example = "1")
-    @NotBlank(message = "职位id不能为空")
+    @NotNull(message = "职位id不能为空")
     private Long postId;
 
     @Schema(description = "职位")

+ 2 - 1
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/NotifyMessageController.java

@@ -21,6 +21,7 @@ import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
 import javax.validation.Valid;
+import java.util.Collections;
 import java.util.List;
 
 import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
@@ -92,7 +93,7 @@ public class NotifyMessageController {
         Long loginUserId = getLoginUserId();
         EmployeeRespDTO loginEmployee = employeeApi.getEmployeeByUserId(loginUserId);
         if (loginEmployee == null) {
-            throw exception(EMPLOYEE_INFO_NOT_EXISTS);
+            return success(Collections.emptyList());
         }
         List<NotifyMessageDO> list = notifyMessageService.getUnreadNotifyMessageList(
                 loginEmployee.getId(), UserTypeEnum.MEMBER.getValue(), size);