|
@@ -2,6 +2,7 @@ package com.zanxiang.game.module.manage.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|
|
import com.zanxiang.erp.base.ErpServer;
|
|
|
import com.zanxiang.erp.base.rpc.ISysUserRpc;
|
|
@@ -115,4 +116,27 @@ public class GameGiftServiceImpl extends ServiceImpl<GameGiftMapper, GameGift> i
|
|
|
.set(GameGift::getUpdateTime, LocalDateTime.now())
|
|
|
.in(GameGift::getId, ids));
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public IPage<GameGiftListVO> listOfPage(GameGiftListParam param) {
|
|
|
+ return page(param.toPage(), new LambdaQueryWrapper<GameGift>()
|
|
|
+ .eq(null != param.getGameId(), GameGift::getGameId, param.getGameId())
|
|
|
+ .like(StringUtils.isNotBlank(param.getGiftName()), GameGift::getGiftName, param.getGiftName())
|
|
|
+ .eq(GameGift::getIsDelete, 0))
|
|
|
+ .convert(item -> {
|
|
|
+ GameDTO game = gameService.getById(item.getGameId());
|
|
|
+ return GameGiftListVO.builder()
|
|
|
+ .id(item.getId())
|
|
|
+ .gameId(item.getGameId())
|
|
|
+ .gameName(null == game ? null : game.getName())
|
|
|
+ .giftName(item.getGiftName())
|
|
|
+ .createBy(item.getCreateBy())
|
|
|
+ .createName(sysUserRpc.getById(item.getCreateBy()).getData().getNickname())
|
|
|
+ .createTime(item.getCreateTime())
|
|
|
+ .updateBy(item.getUpdateBy())
|
|
|
+ .updateName(sysUserRpc.getById(item.getUpdateBy()).getData().getNickname())
|
|
|
+ .updateTime(item.getUpdateTime())
|
|
|
+ .build();
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|