| 12345678910111213141516171819202122232425262728293031323334 |
- <?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.ydtech.modules.admin.dao.SysPosterMapper">
- <sql id="Base_Column_List">
- SELECT
- sp.id,type,title,file_id,iuf.url,iuf.update_time,iuf.username
- FROM sys_poster sp,
- ins_upload_files iuf
- </sql>
- <sql id="Base_Where">
- <where>
- 1=1
- AND
- sp.file_id = iuf.id
- <if test="sysPoster.type != null and sysPoster.type != ''">
- AND type = #{sysPoster.type}
- </if>
- <if test="sysPoster.title != null and sysPoster.title != ''">
- AND title like CONCAT('%', #{sysPoster.title}, '%')
- </if>
- </where>
- </sql>
- <select id="posterList" resultType="com.ydtech.modules.admin.model.SysPoster">
- <include refid="Base_Column_List"/>
- <include refid="Base_Where"/>
- ORDER BY update_time DESC
- </select>
- </mapper>
|