ReceptionMaterialFilmInfoMapper.xml
3.12 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
<?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.mindworkplate.mapper.ReceptionMaterialFilmInfoMapper" >
<resultMap id="BaseResultMap" type="cn.com.glsx.dj.mindworkplate.model.ReceptionMaterialFilmInfoDTO" >
<!--
WARNING - @mbg.generated
-->
<id column="id" property="id" jdbcType="INTEGER" />
<result column="merchant_config_id" property="merchantConfigId" jdbcType="INTEGER" />
<result column="car_model_id" property="carModelId" jdbcType="INTEGER" />
<result column="car_model_name" property="carModelName" jdbcType="VARCHAR" />
<result column="category" property="category" jdbcType="VARCHAR" />
<result column="status" property="status" jdbcType="TINYINT" />
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="brand" property="brand" jdbcType="VARCHAR" />
<result column="part" property="part" jdbcType="VARCHAR" />
<result column="model_display_picurl" property="modelDisplayPicurl" jdbcType="VARCHAR" />
<result column="choose_card_picurl" property="chooseCardPicurl" jdbcType="VARCHAR" />
<result column="description" property="description" jdbcType="VARCHAR" />
<result column="detail_picurl" property="detailPicurl" jdbcType="VARCHAR" />
<result column="sort" property="sort" jdbcType="INTEGER" />
<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="withDetailListMap" type="cn.com.glsx.dj.mindworkplate.model.ReceptionMaterialFilmInfoDTO" extends="BaseResultMap">
<collection property="materialDetailList" columnPrefix="rmd_" javaType="java.util.List"
resultMap="cn.com.glsx.dj.mindworkplate.mapper.ReceptionMaterialDetailMapper.BaseResultMap">
</collection>
</resultMap>
<sql id="Base_Column_List" >
<!--
WARNING - @mbg.generated
-->
id, merchant_config_id, car_model_id, car_model_name, category, status, name,
brand, part, model_display_picurl, choose_card_picurl, description, detail_picurl,
sort, created_by, created_date, updated_by, updated_date, deleted_flag
</sql>
<select id="selectAllByMerchantConfigId" resultMap="withDetailListMap">
select
rmfi.*,
rmd.id rmd_id, rmd.business_id rmd_business_id, rmd.name rmd_name, rmd.content rmd_content,
rmd.material_type rmd_material_type, rmd.material_format rmd_material_format
from reception_material_film_info rmfi
left join reception_material_detail rmd on rmfi.id = rmd.business_id and rmd.material_type = 'film' and rmd.deleted_flag = 'N'
where rmfi.deleted_flag = 'N'
<if test="merchantConfigId != null">
and rmfi.merchant_config_id = #{merchantConfigId}
</if>
order by rmfi.sort,rmfi.created_date
</select>
</mapper>