package cn.sikey.tools.dal.mysql;

import cn.sikey.tools.controller.app.version.vo.QueryAppUpgradeReqVO;
import cn.sikey.tools.dal.dataobject.AppVersionUpgradeDO;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * APP版本升级
 */
@Mapper
public interface AppVersionMapper extends BaseMapper<AppVersionUpgradeDO> {

    default AppVersionUpgradeDO queryAppUpgrade(QueryAppUpgradeReqVO reqVO) {
        QueryWrapper<AppVersionUpgradeDO> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("package_name", reqVO.getPackageName());
        return selectOne(queryWrapper);
    }

}


