|
@@ -125,14 +125,6 @@ public class GameEventServiceImpl implements IGameEventService {
|
|
|
*/
|
|
|
@Override
|
|
|
public List<GameEventVo> queryList(GameEventBo bo) {
|
|
|
- if (bo.getEventId() == null) {
|
|
|
- Object cacheObject = RedisUtils.getCacheObject(GameEventConstant.DEFAULT_EVENT_ID);
|
|
|
- if (cacheObject instanceof Integer) {
|
|
|
- bo.setEventId(((Integer) cacheObject).longValue()); // 显式转换为 Long 类型
|
|
|
- } else if (cacheObject instanceof Long) {
|
|
|
- bo.setEventId((Long) cacheObject);
|
|
|
- }
|
|
|
- }
|
|
|
LambdaQueryWrapper<GameEvent> lqw = buildQueryWrapper(bo);
|
|
|
return baseMapper.selectVoList(lqw);
|
|
|
}
|
|
@@ -159,14 +151,6 @@ public class GameEventServiceImpl implements IGameEventService {
|
|
|
*/
|
|
|
@Override
|
|
|
public Long insertByBo(GameEventBo bo) {
|
|
|
- if (bo.getEventId() == null) {
|
|
|
- Object cacheObject = RedisUtils.getCacheObject(GameEventConstant.DEFAULT_EVENT_ID);
|
|
|
- if (cacheObject instanceof Integer) {
|
|
|
- bo.setEventId(((Integer) cacheObject).longValue()); // 显式转换为 Long 类型
|
|
|
- } else if (cacheObject instanceof Long) {
|
|
|
- bo.setEventId((Long) cacheObject);
|
|
|
- }
|
|
|
- }
|
|
|
GameEvent add = MapstructUtils.convert(bo, GameEvent.class);
|
|
|
validEntityBeforeSave(add);
|
|
|
boolean flag = baseMapper.insert(add) > 0;
|
|
@@ -184,14 +168,6 @@ public class GameEventServiceImpl implements IGameEventService {
|
|
|
*/
|
|
|
@Override
|
|
|
public Boolean updateByBo(GameEventBo bo) {
|
|
|
- if (bo.getEventId() == null) {
|
|
|
- Object cacheObject = RedisUtils.getCacheObject(GameEventConstant.DEFAULT_EVENT_ID);
|
|
|
- if (cacheObject instanceof Integer) {
|
|
|
- bo.setEventId(((Integer) cacheObject).longValue()); // 显式转换为 Long 类型
|
|
|
- } else if (cacheObject instanceof Long) {
|
|
|
- bo.setEventId((Long) cacheObject);
|
|
|
- }
|
|
|
- }
|
|
|
GameEvent update = MapstructUtils.convert(bo, GameEvent.class);
|
|
|
validEntityBeforeSave(update);
|
|
|
boolean result = baseMapper.updateById(update) > 0;
|