package com.xhkjedu.sapi.mapper.appversion;

import com.xhkjedu.base.TkMapper;
import com.xhkjedu.sapi.model.appversion.TAppthird;
import com.xhkjedu.sapi.model.appversion.TAppthirdHistory;
import com.xhkjedu.sapi.vo.appversion.AppthirdDetailVo;
import com.xhkjedu.sapi.vo.appversion.AppthirdVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AppthirdMapper extends TkMapper<TAppthird> {
    /**
     * 应用主页列表
     * @Param []
     * @Author ywx
     * @Date 2020/6/17 10:45
     * @return java.util.List<com.xhkjedu.vo.appversion.AppthirdVo>
     **/
    List<AppthirdVo> listAll(@Param("schoolid") Integer schoolid);

    /**
     * 应用详情
     * @Param [appid]
     * @Author ywx
     * @Date 2020/6/17 10:53
     * @return com.xhkjedu.vo.appversion.AppthirdDetailVo
     **/
    AppthirdDetailVo findById(@Param("appid") Integer appid);

    /**
     * 上、下架
     * @Param [appid, appstate]
     * @Author ywx
     * @Date 2020/6/17 11:19
     * @return java.lang.Integer
     **/
    Integer updateState(@Param("appid") Integer appid, @Param("appstate") Integer appstate);

    /**
     * 获取我的应用列表
     * @Param [createid]
     * @Author ywx
     * @Date 2020/6/17 14:24
     * @return java.util.List<com.xhkjedu.vo.appversion.AppthirdVo>
     **/
    List<AppthirdVo> listMy(@Param("createid") Integer createid);

    /**
     * 获取最新app版本
     * @Param [appid]
     * @Author ywx
     * @Date 2020/6/20 14:40
     * @return com.xhkjedu.model.appversion.TAppthirdHistory
     **/
    TAppthirdHistory getNew(@Param("appid") Integer appid);

    /**
     * 最新应用列表
     * @Param [schoolid]
     * @Author ywx
     * @Date 2020/6/23 15:40
     * @return java.util.List<com.xhkjedu.model.appversion.TAppthirdHistory>
     **/
    List<TAppthirdHistory> listNew(@Param("schoolid") Integer schoolid, @Param("appstate") Integer appstate);

    //获取应用类型
    Integer getAppType(@Param("appid") Integer appid);
}
