自动化立体仓库 - WMS系统
whycq
2024-11-05 76888e902446d2f0162a9afcac6a2df870f3764d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?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.zy.asrs.mapper.AppVersionMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.zy.asrs.entity.AppVersion">
        <id column="id" property="id" />
        <result column="version" property="version" />
        <result column="path" property="path" />
        <result column="latest" property="latest" />
        <result column="type" property="type" />
 
    </resultMap>
 
    <select id="getLatestApp" resultMap="BaseResultMap">
        select top 1 * from asr_app_version
        where type = #{type} and latest = 1
    </select>
 
    <update id="updateLatest">
        update asr_app_version
        set latest = #{latest}
        where 1 = 1
        <if test="type != null || type != ''">
            and type = #{type}
        </if>
    </update>
 
</mapper>