<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.xhkjedu.sapi.mapper.appversion.AppScanMapper">
    <!--获取app版本列表-->
    <select id="listAll" resultType="com.xhkjedu.sapi.vo.appversion.AppversionVo">
        select v.versionid,v.versioncode,v.versionname,v.appsize,v.versionpath,v.createtime
        from t_app_scan v order by v.createtime desc
    </select>
    <!--获取最新app版本-->
    <select id="getNew" resultType="com.xhkjedu.sapi.model.appversion.TAppScan">
        select v.* from t_app_scan v order by v.versioncode desc limit 1
    </select>
    <!--获取详情-->
    <select id="findById" resultType="com.xhkjedu.sapi.model.appversion.TAppScan">
        select v.*,u.username createname
        from t_app_scan v left join t_user u on v.createid=u.userid
        where v.versionid=#{versionid} limit 1
    </select>
    <!--获取APP文件-->
    <select id="listApppath" resultType="java.lang.String">
        SELECT versionpath FROM t_app_scan WHERE versionid=#{versionid}
    </select>
</mapper>
