feat(sj_1.0.0): 完成通知更新
This commit is contained in:
parent
a8a6ecc475
commit
755ed044d7
@ -79,7 +79,7 @@ CREATE TABLE `sj_notify_recipient`
|
||||
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_namespace_id_group_name` (`namespace_id`, `group_name`)
|
||||
KEY `idx_namespace_id` (`namespace_id`)
|
||||
) ENGINE = InnoDB
|
||||
AUTO_INCREMENT = 0
|
||||
DEFAULT CHARSET = utf8mb4 COMMENT ='告警通知接收人'
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.aizuda.snailjob.server.web.service.impl;
|
||||
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import com.aizuda.snailjob.server.web.model.base.PageResult;
|
||||
import com.aizuda.snailjob.server.web.model.request.NotifyRecipientQueryVO;
|
||||
import com.aizuda.snailjob.server.web.model.request.NotifyRecipientRequestVO;
|
||||
@ -29,8 +28,9 @@ public class NotifyRecipientServiceImpl implements NotifyRecipientService {
|
||||
@Override
|
||||
public PageResult<List<NotifyRecipientResponseVO>> getNotifyRecipientList(NotifyRecipientQueryVO queryVO) {
|
||||
PageDTO<NotifyRecipient> pageDTO = new PageDTO<>(queryVO.getPage(), queryVO.getSize());
|
||||
|
||||
PageDTO<NotifyRecipient> notifyRecipientPageDTO = notifyRecipientMapper.selectPage(pageDTO, new LambdaQueryWrapper<>());
|
||||
LambdaQueryWrapper<NotifyRecipient> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.orderByDesc(NotifyRecipient::getCreateDt);
|
||||
PageDTO<NotifyRecipient> notifyRecipientPageDTO = notifyRecipientMapper.selectPage(pageDTO, queryWrapper);
|
||||
|
||||
return new PageResult<>(pageDTO, NotifyRecipientConverter.INSTANCE.toNotifyRecipientResponseVOs(notifyRecipientPageDTO.getRecords()));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user