package com.qmth.themis.business.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qmth.themis.business.entity.TBClientVersion;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Map;

/**
 * @Description: 客户端版本 Mapper 接口
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2020/6/25
 */
@Mapper
public interface TBClientVersionMapper extends BaseMapper<TBClientVersion> {

    /**
     * 客户端版本查询
     *
     * @param iPage
     * @return
     */
    IPage<TBClientVersion> clientVersionQuery(IPage<Map> iPage);

    /**
     * 获取客户端最大版本号记录
     *
     * @return
     */
    TBClientVersion getMaxClientVersion();

    /**
     * 根据学校id获取客户端自行上传的版本
     *
     * @param orgId
     * @return
     */
    TBClientVersion getLastUploadClientVersion(@Param("orgId") Long orgId);
}
