package com.zanxiang.game.module.manage.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zanxiang.game.module.manage.service.IGameExtService;
import com.zanxiang.game.module.mybatis.entity.GameExt;
import com.zanxiang.game.module.mybatis.mapper.GameExtMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @author : lingfeng
 * @time : 2022-09-23
 * @description : 游戏密钥
 */
@Slf4j
@Service
public class GameExtServiceImpl extends ServiceImpl<GameExtMapper, GameExt> implements IGameExtService {

    @Override
    public GameExt getByGameId(Long gameId) {
        return this.getOne(new LambdaQueryWrapper<GameExt>().eq(GameExt::getGameId, gameId));
    }

    @Override
    public GameExt getByGameAppId(String appId) {
        return this.getOne(new LambdaQueryWrapper<GameExt>().eq(GameExt::getAppId, appId));
    }
}
