jinlin
2025-03-01 86f02fee03614fef275c6e0c355d73318ca3025e
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
51
52
53
54
55
56
57
<?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.example.server.sysOss.dao.SysOssDao">
 
    <select id="getList" resultType="com.example.server.sysOss.model.SysOss">
        select a.*
        from DJ_SYS_OSS a
        where a.is_delete = 0
        <if test="busiId!=null">
            and a.BUSI_ID = ${busiId}
        </if>
    </select>
 
    <select id="getBusiFieldNameCount" resultType="java.lang.Integer">
        SELECT COUNT(DISTINCT busi_field_name)
        FROM DJ_SYS_OSS
        WHERE busi_type = #{busiType}
          AND busi_id = #{busiId}
    </select>
 
    <select id="getSysOssByBusiType" resultType="com.example.server.sysOss.model.SysOss">
        select
        a.id,
        a.busi_id,
        a.url,
        a.name,
        a.busi_type
        from DJ_SYS_OSS a
        WHERE
              concat(',',#{busiType},',') like concat('%,',a.BUSI_TYPE,',%')
        <if test="busiIdList != null">
            and a.BUSI_ID in
            <foreach item="item" collection="busiIdList" open="(" separator="," close=")">
                #{item}
            </foreach>
        </if>
        <if test="idList != null">
            and a.ID in
            <foreach item="item" collection="idList" 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.example.server.sysOss.model.SysOss">
        SELECT * FROM dj_sys_oss
        order by CREATE_DATE desc
    </select>
</mapper>