12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- <?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.juxiao.xchat.module.xbd.mapper.marketing.HomeChannelGroupMapper" >
- <resultMap id="BaseResultMap" type="com.juxiao.xchat.module.xbd.domain.marketing.HomeChannelGroup" >
- <id column="group_id" property="groupId" jdbcType="BIGINT" />
- <result column="group_name" property="groupName" jdbcType="VARCHAR" />
- <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
- </resultMap>
- <sql id="Base_Column_List" >
- group_id, group_name, create_time
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
- select
- <include refid="Base_Column_List" />
- from home_channel_group
- where group_id = #{groupId,jdbcType=BIGINT}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
- delete from home_channel_group
- where group_id = #{groupId,jdbcType=BIGINT}
- </delete>
- <insert id="insert" parameterType="com.juxiao.xchat.module.xbd.domain.marketing.HomeChannelGroup" >
- <selectKey resultType="java.lang.Long" keyProperty="groupId" order="AFTER" >
- SELECT LAST_INSERT_ID()
- </selectKey>
- insert into home_channel_group (group_name, create_time)
- values (#{groupName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP})
- </insert>
- <insert id="insertSelective" parameterType="com.juxiao.xchat.module.xbd.domain.marketing.HomeChannelGroup" >
- <selectKey resultType="java.lang.Long" keyProperty="groupId" order="AFTER" >
- SELECT LAST_INSERT_ID()
- </selectKey>
- insert into home_channel_group
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="groupName != null" >
- group_name,
- </if>
- <if test="createTime != null" >
- create_time,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="groupName != null" >
- #{groupName,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null" >
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.juxiao.xchat.module.xbd.domain.marketing.HomeChannelGroup" >
- update home_channel_group
- <set >
- <if test="groupName != null" >
- group_name = #{groupName,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null" >
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- </set>
- where group_id = #{groupId,jdbcType=BIGINT}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.juxiao.xchat.module.xbd.domain.marketing.HomeChannelGroup" >
- update home_channel_group
- set group_name = #{groupName,jdbcType=VARCHAR},
- create_time = #{createTime,jdbcType=TIMESTAMP}
- where group_id = #{groupId,jdbcType=BIGINT}
- </update>
- <select id="selectHomeChannelGroupByList" resultMap="BaseResultMap">
- SELECT <include refid="Base_Column_List" />
- FROM home_channel_group
- </select>
- </mapper>
|