VpMaterialInfoMapper.xml
4.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?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="cn.com.glsx.dj.weapp.mapper.VpMaterialInfoMapper" >
<resultMap id="BaseResultMap" type="cn.com.glsx.dj.weapp.model.VpMaterialInfo" >
<!--
WARNING - @mbg.generated
-->
<id column="id" property="id" jdbcType="INTEGER" />
<result column="user_id" property="userId" jdbcType="INTEGER" />
<result column="merchant_id" property="merchantId" jdbcType="INTEGER" />
<result column="template_num" property="templateNum" jdbcType="TINYINT" />
<result column="logo_url" property="logoUrl" jdbcType="VARCHAR" />
<result column="banner_img_url" property="bannerImgUrl"/>
<result column="btm_banner_img_url" property="btmBannerImgUrl"/>
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="type" property="type" jdbcType="TINYINT" />
<result column="type_name" property="typeName" jdbcType="VARCHAR" />
<result column="sub_type" property="subType" jdbcType="INTEGER" />
<result column="sub_type_name" property="subTypeName" jdbcType="VARCHAR" />
<result column="copywriting" property="copywriting" jdbcType="VARCHAR" />
<result column="music_url" property="musicUrl" jdbcType="VARCHAR" />
<result column="music_id" property="musicId"/>
<result column="video_mute_flag" property="videoMuteFlag" jdbcType="CHAR" />
<result column="product_cover_url" property="productCoverUrl" jdbcType="VARCHAR" />
<result column="video_cover_url" property="videoCoverUrl" jdbcType="VARCHAR" />
<result column="label_name" property="labelName" jdbcType="VARCHAR" />
<result column="online_flag" property="onlineFlag" jdbcType="CHAR" />
<result column="video_status" property="videoStatus" jdbcType="TINYINT" />
<result column="original_material_id" property="originalMaterialId" jdbcType="INTEGER" />
<result column="video_url" property="videoUrl"/>
<result column="created_by" property="createdBy" jdbcType="VARCHAR" />
<result column="created_date" property="createdDate" jdbcType="TIMESTAMP" />
<result column="updated_by" property="updatedBy" jdbcType="VARCHAR" />
<result column="updated_date" property="updatedDate" jdbcType="TIMESTAMP" />
<result column="deleted_flag" property="deletedFlag" jdbcType="CHAR" />
</resultMap>
<resultMap id="DTOResultMap" type="cn.com.glsx.dj.weapp.dto.VpMaterialInfoDTO" extends="BaseResultMap">
</resultMap>
<sql id="Base_Column_List" >
<!--
WARNING - @mbg.generated
-->
mi.id, mi.user_id, mi.merchant_id, mi.template_num, mi.logo_url,mi.banner_img_url,mi.btm_banner_img_url,mi.name, mi.type, mi.type_name, mi.sub_type,
mi.sub_type_name, mi.copywriting, mi.music_url,mi.music_id, mi.video_mute_flag, mi.product_cover_url,mi.video_cover_url,
mi.label_name, mi.online_flag, mi.video_status, mi.original_material_id,mi.video_url, mi.created_by, mi.created_date,
mi.updated_by, mi.updated_date, mi.deleted_flag
</sql>
<select id="list" parameterType="cn.com.glsx.dj.weapp.dto.VpMaterialInfoDTO" resultMap="DTOResultMap">
select <include refid="Base_Column_List"/> from dj_weapp_video_plus_material_info mi
<where>
deleted_flag = 'N'
<if test="id != null">
and id = #{id}
</if>
<if test="userId != null">
and user_id = #{userId}
</if>
<if test="merchantId != null">
and merchant_id = #{merchantId}
</if>
<if test="type != null">
and type = #{type}
</if>
<if test="subType != null">
and sub_type = #{subType}
</if>
<if test="onlineFlag != null and onlineFlag !=''">
and online_flag = #{onlineFlag}
</if>
<if test="videoStatus != null and videoStatus !=''">
and video_status = #{videoStatus}
</if>
<if test="focusUserId != null">
and exists (
select 1 from dj_weapp_video_plus_focus_user fu where fu.deleted_flag='N' and fu.status='Y'
and (fu.user_id=#{focusUserId} or fu.user_id=-1) and fu.focused_user_id=mi.user_id limit 1
)
</if>
</where>
order by updated_date desc
</select>
</mapper>