<?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.ycl.mapper.resources.VideoResourcesMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="com.ycl.entity.resources.VideoResources">
|
<id column="id" property="id" />
|
<result column="belong_to_id" property="belongToId" />
|
<result column="type" property="type" />
|
<result column="url" property="url" />
|
<result column="create_user" property="createUser" />
|
<result column="create_time" property="createTime" />
|
</resultMap>
|
|
<!-- 通用查询结果列 -->
|
<sql id="Base_Column_List">
|
id, belong_to_id, type, url, create_user, create_time
|
</sql>
|
|
<select id="selectImagePage" resultType="com.ycl.vo.resources.MediaVO">
|
SELECT
|
t2.category,
|
t2.event_source,
|
t2.code as code,
|
t1.id,
|
t3.region_name,
|
t1.create_time,
|
t1.url
|
FROM
|
ums_video_resources t1
|
LEFT JOIN ums_base_case t2 ON t1.belong_to_id = t2.id
|
LEFT JOIN ums_sccg_region t3 on t3.id=t2.community_id
|
<where>
|
<if test="type == '03' and type != null and type !='' ">
|
t1.type='03'
|
</if>
|
<if test="type == '01' and type != null and type !='' ">
|
t1.type='02' or t1.type='01'
|
</if>
|
<if test="startTime != '' and endTime != '' and startTime != null and endTime != null">
|
and t1.create_time between #{startTime} and #{endTime}
|
</if>
|
</where>
|
</select>
|
</mapper>
|