@ -17,10 +17,11 @@
<result property= "type" column= "type" />
<result property= "type" column= "type" />
<result property= "fileUrl" column= "file_url" />
<result property= "fileUrl" column= "file_url" />
<result property= "fileName" column= "file_name" />
<result property= "fileName" column= "file_name" />
<result property= "imgUrl" column= "img_url" />
</resultMap>
</resultMap>
<sql id= "selectSysWorkVo" >
<sql id= "selectSysWorkVo" >
select work_id, work_title, work_content, status, create_by, create_time, update_by, update_time, remark,type,file_url,file_name
select work_id, work_title, work_content, status, create_by, create_time, update_by, update_time, remark,type,file_url,file_name,img_url
from sys_work
from sys_work
</sql>
</sql>
@ -56,6 +57,7 @@
<if test= "type != null and createBy != ''" > type,</if>
<if test= "type != null and createBy != ''" > type,</if>
<if test= "fileUrl != null and fileUrl != '' " > file_url, </if>
<if test= "fileUrl != null and fileUrl != '' " > file_url, </if>
<if test= "fileName != null and fileName != '' " > file_name, </if>
<if test= "fileName != null and fileName != '' " > file_name, </if>
<if test= "imgUrl != null and imgUrl != '' " > img_url, </if>
create_time
create_time
)values(
)values(
<if test= "workId != null and workId != ''" > #{workId}, </if>
<if test= "workId != null and workId != ''" > #{workId}, </if>
@ -67,6 +69,7 @@
<if test= "type != null and type != ''" > #{type},</if>
<if test= "type != null and type != ''" > #{type},</if>
<if test= "fileUrl != null and fileUrl != ''" > #{fileUrl}, </if>
<if test= "fileUrl != null and fileUrl != ''" > #{fileUrl}, </if>
<if test= "fileName != null and fileName != ''" > #{fileName}, </if>
<if test= "fileName != null and fileName != ''" > #{fileName}, </if>
<if test= "imgUrl != null and imgUrl != ''" > #{imgUrl}, </if>
now()
now()
)
)
</insert>
</insert>
@ -80,6 +83,7 @@
<if test= "updateBy != null and updateBy != ''" > update_by = #{updateBy},</if>
<if test= "updateBy != null and updateBy != ''" > update_by = #{updateBy},</if>
<if test= "fileUrl != null" > file_url = #{fileUrl}, </if>
<if test= "fileUrl != null" > file_url = #{fileUrl}, </if>
<if test= "fileName != null" > file_name = #{fileName}, </if>
<if test= "fileName != null" > file_name = #{fileName}, </if>
<if test= "imgUrl != null" > img_url = #{imgUrl}, </if>
update_time = now()
update_time = now()
</set>
</set>
where work_id = #{workId}
where work_id = #{workId}
@ -106,4 +110,15 @@
order by create_time desc limit 10
order by create_time desc limit 10
</select>
</select>
<select id= "selectWorkHomeUrl" parameterType= "SysWork" resultMap= "SysWorkResult" >
<include refid= "selectSysWorkVo" />
<where >
<if test= "workTitle != null and workTitle != ''" >
AND work_title like concat('%', #{workTitle}, '%')
</if>
AND status = '0'
</where>
order by create_time desc limit 6
</select>
</mapper>
</mapper>