ContentGroupManagementDescribeMapper.xml
4.1 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
<?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.zhonglai.luhui.order.service.mapper.ContentGroupManagementDescribeMapper">
<resultMap type="ContentGroupManagementDescribe" id="ContentGroupManagementDescribeResult">
<result property="content_group_management_id" column="content_group_management_id" />
<result property="create_time" column="create_time" />
<result property="describe" column="describe" />
<result property="id" column="id" />
<result property="update_time" column="update_time" />
</resultMap>
<sql id="selectContentGroupManagementDescribeVo">
select `content_group_management_id`, `create_time`, `describe`, `id`, `update_time` from content_group_management_describe
</sql>
<select id="selectContentGroupManagementDescribeList" parameterType="ContentGroupManagementDescribe" resultMap="ContentGroupManagementDescribeResult">
<include refid="selectContentGroupManagementDescribeVo"/>
<where>
<if test="content_group_management_id != null "> and content_group_management_id = #{content_group_management_id}</if>
<if test="params.beginCreate_time != null and params.beginCreate_time != '' and params.endCreate_time != null and params.endCreate_time != ''"> and create_time between #{params.beginCreate_time} and #{params.endCreate_time}</if>
<if test="id != null "> and id = #{id}</if>
<if test="params.beginUpdate_time != null and params.beginUpdate_time != '' and params.endUpdate_time != null and params.endUpdate_time != ''"> and update_time between #{params.beginUpdate_time} and #{params.endUpdate_time}</if>
</where>
</select>
<select id="selectContentGroupManagementDescribeById" parameterType="Integer" resultMap="ContentGroupManagementDescribeResult">
<include refid="selectContentGroupManagementDescribeVo"/>
where id = #{id}
</select>
<insert id="insertContentGroupManagementDescribe" parameterType="ContentGroupManagementDescribe" useGeneratedKeys="true" keyProperty="id">
insert into content_group_management_describe
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="content_group_management_id != null">`content_group_management_id`,</if>
<if test="create_time != null">`create_time`,</if>
<if test="describe != null and describe != ''">`describe`,</if>
<if test="update_time != null">`update_time`,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="content_group_management_id != null">#{content_group_management_id},</if>
<if test="create_time != null">#{create_time},</if>
<if test="describe != null and describe != ''">#{describe},</if>
<if test="update_time != null">#{update_time},</if>
</trim>
</insert>
<update id="updateContentGroupManagementDescribe" parameterType="ContentGroupManagementDescribe">
update content_group_management_describe
<trim prefix="SET" suffixOverrides=",">
<if test="content_group_management_id != null">`content_group_management_id` = #{content_group_management_id},</if>
<if test="create_time != null">`create_time` = #{create_time},</if>
<if test="describe != null and describe != ''">`describe` = #{describe},</if>
<if test="update_time != null">`update_time` = #{update_time},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteContentGroupManagementDescribeById" parameterType="Integer">
delete from content_group_management_describe where id = #{id}
</delete>
<delete id="deleteContentGroupManagementDescribeByIds" parameterType="String">
delete from content_group_management_describe where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>