|
@@ -60,7 +60,7 @@ public class GameVipServiceImpl extends ServiceImpl<GameVipMapper, GameVip> impl
|
|
|
LocalDateTime now = LocalDateTime.now();
|
|
LocalDateTime now = LocalDateTime.now();
|
|
|
|
|
|
|
|
//不传入id,说明是新增档位;传入id说明是修改档位
|
|
//不传入id,说明是新增档位;传入id说明是修改档位
|
|
|
- int count = count(new LambdaQueryWrapper<GameVip>()
|
|
|
|
|
|
|
+ long count = count(new LambdaQueryWrapper<GameVip>()
|
|
|
.ne(param.getId() != null, GameVip::getId, param.getId())
|
|
.ne(param.getId() != null, GameVip::getId, param.getId())
|
|
|
.eq(GameVip::getSuperGameId, param.getSuperGameId())
|
|
.eq(GameVip::getSuperGameId, param.getSuperGameId())
|
|
|
.eq(GameVip::getParentGameId, param.getParentGameId())
|
|
.eq(GameVip::getParentGameId, param.getParentGameId())
|
|
@@ -100,17 +100,17 @@ public class GameVipServiceImpl extends ServiceImpl<GameVipMapper, GameVip> impl
|
|
|
public boolean deleteById(List<Long> ids) {
|
|
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::getUpdateBy, sysUserId)
|
|
|
|
|
- .set(GameVip::getUpdateTime, LocalDateTime.now())
|
|
|
|
|
- .in(GameVip::getId, ids)
|
|
|
|
|
|
|
+ .set(GameVip::getIsDelete, 1)
|
|
|
|
|
+ .set(GameVip::getUpdateBy, sysUserId)
|
|
|
|
|
+ .set(GameVip::getUpdateTime, LocalDateTime.now())
|
|
|
|
|
+ .in(GameVip::getId, ids)
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public IPage<GameVipListVO> gameVipList(GameVipListParam param) {
|
|
public IPage<GameVipListVO> gameVipList(GameVipListParam param) {
|
|
|
return page(param.toPage(), new LambdaQueryWrapper<GameVip>()
|
|
return page(param.toPage(), new LambdaQueryWrapper<GameVip>()
|
|
|
- .eq(null != param.getSuperGameId() , GameVip::getSuperGameId, param.getSuperGameId())
|
|
|
|
|
|
|
+ .eq(null != param.getSuperGameId(), GameVip::getSuperGameId, param.getSuperGameId())
|
|
|
.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))
|
|
@@ -127,7 +127,7 @@ public class GameVipServiceImpl extends ServiceImpl<GameVipMapper, GameVip> impl
|
|
|
List<Integer> vipList = param.getList().stream()
|
|
List<Integer> vipList = param.getList().stream()
|
|
|
.map(GameVipAddBatchParam.GameVipParam::getVipLevel).collect(Collectors.toList());
|
|
.map(GameVipAddBatchParam.GameVipParam::getVipLevel).collect(Collectors.toList());
|
|
|
|
|
|
|
|
- int count = count(new LambdaQueryWrapper<GameVip>()
|
|
|
|
|
|
|
+ long count = count(new LambdaQueryWrapper<GameVip>()
|
|
|
.eq(GameVip::getSuperGameId, param.getSuperGameId())
|
|
.eq(GameVip::getSuperGameId, param.getSuperGameId())
|
|
|
.in(GameVip::getParentGameId, param.getParentGameId())
|
|
.in(GameVip::getParentGameId, param.getParentGameId())
|
|
|
.in(GameVip::getVipLevel, vipList)
|
|
.in(GameVip::getVipLevel, vipList)
|
|
@@ -143,16 +143,16 @@ public class GameVipServiceImpl extends ServiceImpl<GameVipMapper, GameVip> impl
|
|
|
Long parentGameId = param.getParentGameId().get(i);
|
|
Long parentGameId = param.getParentGameId().get(i);
|
|
|
for (GameVipAddBatchParam.GameVipParam gameVipParam : param.getList()) {
|
|
for (GameVipAddBatchParam.GameVipParam gameVipParam : param.getList()) {
|
|
|
list.add(GameVip.builder()
|
|
list.add(GameVip.builder()
|
|
|
- .parentGameId(parentGameId)
|
|
|
|
|
- .superGameId(param.getSuperGameId())
|
|
|
|
|
- .rechargeMoneyMin(gameVipParam.getRechargeMoneyMin())
|
|
|
|
|
- .rechargeMoneyMax(gameVipParam.getRechargeMoneyMax())
|
|
|
|
|
- .vipLevel(gameVipParam.getVipLevel())
|
|
|
|
|
- .createBy(sysUserId)
|
|
|
|
|
- .createTime(now)
|
|
|
|
|
- .updateTime(now)
|
|
|
|
|
- .updateBy(sysUserId)
|
|
|
|
|
- .build());
|
|
|
|
|
|
|
+ .parentGameId(parentGameId)
|
|
|
|
|
+ .superGameId(param.getSuperGameId())
|
|
|
|
|
+ .rechargeMoneyMin(gameVipParam.getRechargeMoneyMin())
|
|
|
|
|
+ .rechargeMoneyMax(gameVipParam.getRechargeMoneyMax())
|
|
|
|
|
+ .vipLevel(gameVipParam.getVipLevel())
|
|
|
|
|
+ .createBy(sysUserId)
|
|
|
|
|
+ .createTime(now)
|
|
|
|
|
+ .updateTime(now)
|
|
|
|
|
+ .updateBy(sysUserId)
|
|
|
|
|
+ .build());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
return saveBatch(list);
|
|
return saveBatch(list);
|