|
@@ -115,13 +115,13 @@ public class GameVipServiceImpl extends ServiceImpl<GameVipMapper, GameVip> impl
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
- public boolean deleteById(Long id) {
|
|
|
|
|
|
+ public boolean deleteById(List<Long> ids) {
|
|
Long sysUserId = SecurityUtil.getUserId();
|
|
Long sysUserId = SecurityUtil.getUserId();
|
|
return update(new LambdaUpdateWrapper<GameVip>()
|
|
return update(new LambdaUpdateWrapper<GameVip>()
|
|
.set(GameVip::getIsDelete, 1)
|
|
.set(GameVip::getIsDelete, 1)
|
|
.set(GameVip::getUpdateBy, sysUserId)
|
|
.set(GameVip::getUpdateBy, sysUserId)
|
|
.set(GameVip::getUpdateTime, LocalDateTime.now())
|
|
.set(GameVip::getUpdateTime, LocalDateTime.now())
|
|
- .in(GameVip::getId, id)
|
|
|
|
|
|
+ .in(GameVip::getId, ids)
|
|
);
|
|
);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -132,27 +132,29 @@ public class GameVipServiceImpl extends ServiceImpl<GameVipMapper, GameVip> impl
|
|
.eq(null != param.getParentGameId(), GameVip::getParentGameId, param.getParentGameId())
|
|
.eq(null != param.getParentGameId(), GameVip::getParentGameId, param.getParentGameId())
|
|
.eq(null != param.getVipLevel(), GameVip::getVipLevel, param.getVipLevel())
|
|
.eq(null != param.getVipLevel(), GameVip::getVipLevel, param.getVipLevel())
|
|
.eq(GameVip::getIsDelete, 0))
|
|
.eq(GameVip::getIsDelete, 0))
|
|
- .convert(vo ->{
|
|
|
|
- GameDTO game = gameService.getById(vo.getParentGameId());
|
|
|
|
- GameSupper gameSupper = gameSupperService.getById(vo.getSuperGameId());
|
|
|
|
- return GameVipListVO.builder()
|
|
|
|
- .id(vo.getId())
|
|
|
|
- .superGameId(vo.getSuperGameId())
|
|
|
|
- .superGameName(null == gameSupper ? null : gameSupper.getName())
|
|
|
|
- .parentGameId(vo.getParentGameId())
|
|
|
|
- .parentGameName(null == game ? null : game.getName())
|
|
|
|
- .rechargeMoneyMin(vo.getRechargeMoneyMin())
|
|
|
|
- .rechargeMoneyMax(vo.getRechargeMoneyMax())
|
|
|
|
- .vipLevel(vo.getVipLevel())
|
|
|
|
- .createTime(vo.getCreateTime())
|
|
|
|
- .createBy(vo.getCreateBy())
|
|
|
|
- .createName(sysUserRpc.getById(vo.getCreateBy()).getData().getNickname())
|
|
|
|
- .updateTime(vo.getUpdateTime())
|
|
|
|
- .updateBy(vo.getUpdateBy())
|
|
|
|
- .updateName(sysUserRpc.getById(vo.getUpdateBy()).getData().getNickname())
|
|
|
|
- .build();
|
|
|
|
- });
|
|
|
|
|
|
+ .convert(this::toVO);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+ private GameVipListVO toVO(GameVip vo) {
|
|
|
|
+ GameDTO game = gameService.getById(vo.getParentGameId());
|
|
|
|
+ GameSupper gameSupper = gameSupperService.getById(vo.getSuperGameId());
|
|
|
|
+ return GameVipListVO.builder()
|
|
|
|
+ .id(vo.getId())
|
|
|
|
+ .superGameId(vo.getSuperGameId())
|
|
|
|
+ .superGameName(null == gameSupper ? null : gameSupper.getName())
|
|
|
|
+ .parentGameId(vo.getParentGameId())
|
|
|
|
+ .parentGameName(null == game ? null : game.getName())
|
|
|
|
+ .rechargeMoneyMin(vo.getRechargeMoneyMin())
|
|
|
|
+ .rechargeMoneyMax(vo.getRechargeMoneyMax())
|
|
|
|
+ .vipLevel(vo.getVipLevel())
|
|
|
|
+ .createTime(vo.getCreateTime())
|
|
|
|
+ .createBy(vo.getCreateBy())
|
|
|
|
+ .createName(sysUserRpc.getById(vo.getCreateBy()).getData().getNickname())
|
|
|
|
+ .updateTime(vo.getUpdateTime())
|
|
|
|
+ .updateBy(vo.getUpdateBy())
|
|
|
|
+ .updateName(sysUserRpc.getById(vo.getUpdateBy()).getData().getNickname())
|
|
|
|
+ .build();
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|