You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

67 lines
2.5 KiB

<?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.spring.modules.oss.dao.SysOssDao">
<select id="getSysOssEntityList" resultType="com.spring.modules.oss.vo.SysOssEntityData"
parameterType="com.spring.modules.oss.vo.SysOssEntityData">
select A.id,A.url,A.create_date,A.file_name,A.new_file_name,A.created_by
from sys_oss A
left join file_associate B on A.id = B.sys_oss_id
<where>
<if test="site != null and site != ''">
and B.site = #{site ,jdbcType = VARCHAR}
</if>
<if test="type != null and type != ''">
and B.type = #{type ,jdbcType = VARCHAR}
</if>
<if test="associatedField1 != null and associatedField1 != ''">
and B.associated_field1 = #{associatedField1 ,jdbcType = VARCHAR}
</if>
<if test="associatedField2 != null and associatedField2 != ''">
and B.associated_field2 = #{associatedField2 ,jdbcType = VARCHAR}
</if>
<if test="associatedField3 != null and associatedField3 != ''">
and B.associated_field3 = #{associatedField3,jdbcType=VARCHAR}
</if>
</where>
</select>
<select id="queryPage" resultType="com.spring.modules.oss.vo.OssVo">
SELECT
id,
url,
create_date,
file_name,
new_file_name,
created_by,
order_ref1,
order_ref2,
order_ref3,
file_type,
file_suffix,
file_type_code,
dbo.file_type_resource ( ISNULL( file_type_code, - 1 ), order_ref1, order_ref2, order_ref3 ) as order_info
FROM
sys_oss
<where>
<if test="query.fileTypeCode != '' and query.fileTypeCode !=null ">
file_type_code = #{query.fileTypeCode}
</if>
<if test="query.fileName != '' and query.fileName !=null ">
and file_name like #{query.fileName}
</if>
<if test="query.orderRef1 != '' and query.orderRef1 !=null ">
and order_ref1 = #{query.orderRef1}
</if>
<if test="query.orderRef2 != '' and query.orderRef2 !=null ">
and order_ref2 = #{query.orderRef2}
</if>
<if test="query.orderRef3 != '' and query.orderRef3 !=null ">
and order_ref3 = #{query.orderRef3}
</if>
</where>
</select>
</mapper>