|
|
@@ -10,6 +10,7 @@ import com.ningdatech.pmapi.sys.model.entity.Notify; |
|
|
|
import com.ningdatech.pmapi.sys.model.req.NotifyListReq; |
|
|
|
import com.ningdatech.pmapi.sys.model.vo.NotifyVO; |
|
|
|
import com.ningdatech.pmapi.sys.service.INotifyService; |
|
|
|
import com.ningdatech.pmapi.user.util.LoginUserUtil; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
|
|
|
@@ -32,10 +33,11 @@ public class NotifyManage { |
|
|
|
private final INotifyService notifyService; |
|
|
|
|
|
|
|
public PageVo<NotifyVO> page(NotifyListReq notifyListReq) { |
|
|
|
Long userId = LoginUserUtil.getUserId(); |
|
|
|
Page<Notify> page = notifyListReq.page(); |
|
|
|
LambdaQueryWrapper<Notify> wrapper = Wrappers.lambdaQuery(Notify.class) |
|
|
|
.eq(Objects.nonNull(notifyListReq.getReaded()), Notify::getReaded, notifyListReq.getReaded()) |
|
|
|
.eq(Objects.nonNull(notifyListReq.getUserId()), Notify::getUserId, notifyListReq.getUserId()) |
|
|
|
.eq(Notify::getUserId, userId) |
|
|
|
.like(Objects.nonNull(notifyListReq.getTitle()), Notify::getTitle, notifyListReq.getTitle()) |
|
|
|
.eq(Objects.nonNull(notifyListReq.getType()), Notify::getType, notifyListReq.getType()); |
|
|
|
notifyService.page(page,wrapper); |
|
|
|