mirror of
				https://github.com/continew-org/continew-admin.git
				synced 2025-10-31 22:57:17 +08:00 
			
		
		
		
	refactor: PageDataResp => PageResp
This commit is contained in:
		| @@ -22,7 +22,7 @@ import top.charles7c.continew.admin.auth.model.query.OnlineUserQuery; | ||||
| import top.charles7c.continew.admin.auth.model.resp.OnlineUserResp; | ||||
| import top.charles7c.continew.admin.common.model.dto.LoginUser; | ||||
| import top.charles7c.continew.starter.extension.crud.model.query.PageQuery; | ||||
| import top.charles7c.continew.starter.extension.crud.model.resp.PageDataResp; | ||||
| import top.charles7c.continew.starter.extension.crud.model.resp.PageResp; | ||||
|  | ||||
| /** | ||||
|  * 在线用户业务接口 | ||||
| @@ -41,7 +41,7 @@ public interface OnlineUserService { | ||||
|      *            分页查询条件 | ||||
|      * @return 分页列表信息 | ||||
|      */ | ||||
|     PageDataResp<OnlineUserResp> page(OnlineUserQuery query, PageQuery pageQuery); | ||||
|     PageResp<OnlineUserResp> page(OnlineUserQuery query, PageQuery pageQuery); | ||||
|  | ||||
|     /** | ||||
|      * 查询列表 | ||||
|   | ||||
| @@ -38,7 +38,7 @@ import top.charles7c.continew.admin.common.model.dto.LoginUser; | ||||
| import top.charles7c.continew.admin.common.util.helper.LoginHelper; | ||||
| import top.charles7c.continew.starter.core.constant.StringConstants; | ||||
| import top.charles7c.continew.starter.extension.crud.model.query.PageQuery; | ||||
| import top.charles7c.continew.starter.extension.crud.model.resp.PageDataResp; | ||||
| import top.charles7c.continew.starter.extension.crud.model.resp.PageResp; | ||||
|  | ||||
| /** | ||||
|  * 在线用户业务实现 | ||||
| @@ -51,12 +51,12 @@ import top.charles7c.continew.starter.extension.crud.model.resp.PageDataResp; | ||||
| public class OnlineUserServiceImpl implements OnlineUserService { | ||||
|  | ||||
|     @Override | ||||
|     public PageDataResp<OnlineUserResp> page(OnlineUserQuery query, PageQuery pageQuery) { | ||||
|     public PageResp<OnlineUserResp> page(OnlineUserQuery query, PageQuery pageQuery) { | ||||
|         List<LoginUser> loginUserList = this.list(query); | ||||
|         List<OnlineUserResp> list = BeanUtil.copyToList(loginUserList, OnlineUserResp.class); | ||||
|         PageDataResp<OnlineUserResp> pageDataResp = PageDataResp.build(pageQuery.getPage(), pageQuery.getSize(), list); | ||||
|         pageDataResp.getList().forEach(u -> u.setNickname(LoginHelper.getNickname(u.getId()))); | ||||
|         return pageDataResp; | ||||
|         PageResp<OnlineUserResp> pageResp = PageResp.build(pageQuery.getPage(), pageQuery.getSize(), list); | ||||
|         pageResp.getList().forEach(u -> u.setNickname(LoginHelper.getNickname(u.getId()))); | ||||
|         return pageResp; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|   | ||||
| @@ -22,7 +22,7 @@ import top.charles7c.continew.admin.system.model.query.MessageQuery; | ||||
| import top.charles7c.continew.admin.system.model.req.MessageReq; | ||||
| import top.charles7c.continew.admin.system.model.resp.MessageResp; | ||||
| import top.charles7c.continew.starter.extension.crud.model.query.PageQuery; | ||||
| import top.charles7c.continew.starter.extension.crud.model.resp.PageDataResp; | ||||
| import top.charles7c.continew.starter.extension.crud.model.resp.PageResp; | ||||
|  | ||||
| /** | ||||
|  * 消息业务接口 | ||||
| @@ -41,7 +41,7 @@ public interface MessageService { | ||||
|      *            分页查询条件 | ||||
|      * @return 分页列表信息 | ||||
|      */ | ||||
|     PageDataResp<MessageResp> page(MessageQuery query, PageQuery pageQuery); | ||||
|     PageResp<MessageResp> page(MessageQuery query, PageQuery pageQuery); | ||||
|  | ||||
|     /** | ||||
|      * 新增 | ||||
|   | ||||
| @@ -42,7 +42,7 @@ import top.charles7c.continew.starter.core.util.validate.CheckUtils; | ||||
| import top.charles7c.continew.starter.data.mybatis.plus.query.QueryHelper; | ||||
| import top.charles7c.continew.starter.extension.crud.base.CommonUserService; | ||||
| import top.charles7c.continew.starter.extension.crud.model.query.PageQuery; | ||||
| import top.charles7c.continew.starter.extension.crud.model.resp.PageDataResp; | ||||
| import top.charles7c.continew.starter.extension.crud.model.resp.PageResp; | ||||
|  | ||||
| /** | ||||
|  * 消息业务实现 | ||||
| @@ -58,13 +58,13 @@ public class MessageServiceImpl implements MessageService { | ||||
|     private final MessageUserService messageUserService; | ||||
|  | ||||
|     @Override | ||||
|     public PageDataResp<MessageResp> page(MessageQuery query, PageQuery pageQuery) { | ||||
|     public PageResp<MessageResp> page(MessageQuery query, PageQuery pageQuery) { | ||||
|         QueryWrapper<MessageDO> queryWrapper = QueryHelper.build(query); | ||||
|         queryWrapper.apply(null != query.getUserId(), "t2.user_id={0}", query.getUserId()) | ||||
|             .apply(null != query.getIsRead(), "t2.is_read={0}", query.getIsRead()); | ||||
|         IPage<MessageResp> page = baseMapper.selectPageByUserId(pageQuery.toPage(), queryWrapper); | ||||
|         page.getRecords().forEach(this::fill); | ||||
|         return PageDataResp.build(page); | ||||
|         return PageResp.build(page); | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|   | ||||
		Reference in New Issue
	
	Block a user