You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.5 KiB
XML
46 lines
1.5 KiB
XML
<?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.zhiyun.zhiyun03.download.mapper.DownloadMapper">
|
|
<update id="updateDownloadById">
|
|
update download
|
|
<set >
|
|
<if test="downloadName != null" >
|
|
download_name=#{downloadName},
|
|
</if>
|
|
<if test="downloadUrl != null" >
|
|
download_url=#{downloadUrl},
|
|
</if>
|
|
<if test="downloadBrief != null" >
|
|
download_brief=#{downloadBrief},
|
|
</if>
|
|
<if test="dirId != null" >
|
|
dir_id=#{dirId},
|
|
</if>
|
|
<if test="downloadImg != null" >
|
|
download_img=#{downloadImg}
|
|
</if>
|
|
</set>
|
|
<where>
|
|
<if test="id!=null">
|
|
id = #{id}
|
|
</if>
|
|
</where>
|
|
|
|
|
|
|
|
</update>
|
|
|
|
<select id="queryDownload" resultType="com.zhiyun.zhiyun03.download.vo.DownloadVo">
|
|
select do.id,do.download_name,do.download_brief,do.download_url,d.dir_name
|
|
from download as do
|
|
inner join
|
|
(select id,dir_name,dir_img,dir_addtime,dir_iden from directory) as d
|
|
on do.dir_id = d.id
|
|
where d.dir_iden = 3
|
|
</select>
|
|
<select id="selectByName" resultType="java.lang.Integer">
|
|
|
|
select count(1) from download where download_name =#{downloadName}
|
|
|
|
</select>
|
|
</mapper> |