|
@@ -119,8 +119,13 @@ public class NotifyMessageController {
|
|
@Operation(summary = "获得当前用户的未读站内信数量")
|
|
@Operation(summary = "获得当前用户的未读站内信数量")
|
|
@ApiAccessLog(enable = false) // 由于前端会不断轮询该接口,记录日志没有意义
|
|
@ApiAccessLog(enable = false) // 由于前端会不断轮询该接口,记录日志没有意义
|
|
public CommonResult<Long> getUnreadNotifyMessageCount() {
|
|
public CommonResult<Long> getUnreadNotifyMessageCount() {
|
|
|
|
+ Long loginUserId = getLoginUserId();
|
|
|
|
+ EmployeeRespDTO loginEmployee = employeeApi.getEmployeeByUserId(loginUserId);
|
|
|
|
+ if (loginEmployee == null) {
|
|
|
|
+ return success(0L);
|
|
|
|
+ }
|
|
return success(notifyMessageService.getUnreadNotifyMessageCount(
|
|
return success(notifyMessageService.getUnreadNotifyMessageCount(
|
|
- getLoginUserId(), UserTypeEnum.ADMIN.getValue()));
|
|
|
|
|
|
+ loginEmployee.getId(), UserTypeEnum.MEMBER.getValue()));
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|