<?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.whyc.mapper.SoftwareMapper">
|
<resultMap id="softwares" type="softDto">
|
<result column="file_url" property="fileUrl"></result>
|
<collection property="softwares" javaType="java.util.ArrayList" ofType="com.whyc.pojo.Software" column="{fileUrl=file_url}" select="selectSoftWare">
|
</collection>
|
</resultMap>
|
|
<select id="getFileUrl" resultMap="softwares">
|
select distinct file_url from tb_software
|
<where>
|
1=1
|
<if test="fileName!=null&&fileName!=''">
|
and file_name like '%${fileName}%'
|
</if>
|
<if test="applyMaterialCode!=null&&applyMaterialCode!=''">
|
and apply_material_code like '%${applyMaterialCode}%'
|
</if>
|
<if test="applyModel!=null&&applyModel!=''">
|
and apply_model like '%${applyModel}%'
|
</if>
|
<if test="owner!=null&&owner!=''">
|
and owner like '%${owner}%'
|
</if>
|
<if test="boardNumber!=null&&boardNumber!=''">
|
and board_number like '%${boardNumber}%'
|
</if>
|
</where>
|
</select>
|
<select id="selectSoftWare" resultType="software">
|
select * from tb_software where file_url=#{fileUrl}
|
</select>
|
</mapper>
|