<?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>
|