jinlin
2024-01-02 a38a1ac77bb6ac9ea8bf0cf5f5f6b68d0e6e6974
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?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.zt.modules.oss.dao.SysOssDao">
 
    <select id="getList" resultType="com.zt.modules.oss.model.SysOss">
        select a.*
        from SYS_OSS a
        <where>
            <if test="whereSql!=null">
                ${whereSql}
            </if>
        </where>
        <if test="orderBySql!=null">
            ORDER BY ${orderBySql}
        </if>
    </select>
 
    <select id="getBusiFieldNameCount" resultType="java.lang.Integer">
        SELECT COUNT(DISTINCT busi_field_name)
        FROM SYS_OSS
        WHERE busi_type = #{busiType}
          AND busi_id = #{busiId}
    </select>
 
    <select id="getSysOssByBusiType" resultType="com.zt.modules.oss.model.SysOss">
        select
        a.id,
        a.busi_id,
        a.url,
        a.name
        from SYS_OSS a
        WHERE a.BUSI_TYPE=#{busiType}
        <if test="busiIdList != null">
            and a.BUSI_ID in
            <foreach item="item" collection="busiIdList" open="(" separator="," close=")">
                #{item}
            </foreach>
        </if>
        <if test="busiIds != null">
            AND a.busi_id in (${busiIds})
        </if>
        <if test="tableName != null">
            AND a.busi_id in (select id from ${tableName} where firstId in (${validIdStrs}))
        </if>
        ORDER by a.busi_id,a.sort
    </select>
    <select id="getOldFileList" resultType="com.zt.modules.oss.model.SysOss"></select>
 
</mapper>