| | |
| | | <resultMap id="softwares" type="softDto"> |
| | | <result column="file_url" property="fileUrl" /> |
| | | <result column="lock_flag" property="lockFlag"/> |
| | | <result column="file_name" property="fileName"/> |
| | | <collection property="softwares" javaType="java.util.ArrayList" ofType="com.whyc.pojo.Software" column="{fileUrl = file_url,lockFlag = lock_flag}" select="selectSoftWare"> |
| | | </collection> |
| | | </resultMap> |
| | | |
| | | <select id="getFileUrl" resultMap="softwares"> |
| | | select distinct file_url,lock_flag from tb_software |
| | | select distinct file_url,lock_flag,file_name from tb_software |
| | | <where> |
| | | 1=1 |
| | | <choose> |
| | |
| | | <select id="selectSoftWare" resultType="software"> |
| | | select * from tb_software where file_url=#{fileUrl} and lock_flag = #{lockFlag} |
| | | </select> |
| | | <select id="getFileNameByOwnerWithCode" resultType="com.whyc.pojo.Software"> |
| | | SELECT distinct w.file_name,based_version,owner |
| | | FROM tb_software w |
| | | LEFT JOIN tb_softcode c ON w.file_name = c.file_name |
| | | WHERE c.file_name IS NULL |
| | | and w.owner = #{owner}; |
| | | </select> |
| | | </mapper> |