package com.zanxiang.game.platform.serve.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zanxiang.game.platform.serve.dao.mapper.GamePlatformMapper;
import com.zanxiang.game.platform.serve.pojo.entity.GamePlatform;
import com.zanxiang.game.platform.serve.service.IGamePlatformService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @author : lingfeng
 * @time : 2023-05-24
 * @description : 游戏平台
 */
@Slf4j
@Service
public class GamePlatformServiceImpl extends ServiceImpl<GamePlatformMapper, GamePlatform> implements IGamePlatformService {

    @Override
    public GamePlatform getByPlatformKey(String platformKey) {
        return getOne(new LambdaQueryWrapper<GamePlatform>()
                .eq(GamePlatform::getPlatformKey, platformKey)
        );
    }
}
