<?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.gic.haoban.manage.service.dao.mapper.QywxSyncLogMapper">
    <resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabQywxSyncLog">
        <id column="qywx_sync_log_id" jdbcType="VARCHAR" property="qywxSyncLogId"/>
        <result column="qywx_tag_relation_id" jdbcType="VARCHAR" property="qywxTagRelationId"/>
        <result column="member_tag_id" jdbcType="VARCHAR" property="memberTagId"/>
        <result column="member_tag_name" jdbcType="VARCHAR" property="memberTagName"/>
        <result column="business_type" jdbcType="INTEGER" property="businessType"/>
        <result column="change_code" jdbcType="VARCHAR" property="changeCode"/>
        <result column="log_content" jdbcType="VARCHAR" property="logContent"/>
        <result column="opt_code" jdbcType="VARCHAR" property="optCode"/>
        <result column="opt_staff_id" jdbcType="VARCHAR" property="optStaffId"/>
        <result column="sync_task_id" jdbcType="VARCHAR" property="syncTaskId"/>
        <result column="status_flag" jdbcType="INTEGER" property="statusFlag"/>
        <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
        <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
    </resultMap>
    <sql id="Base_Column_List">
        qywx_sync_log_id, qywx_tag_relation_id, member_tag_id, member_tag_name, business_type,
        change_code, log_content, opt_code, opt_staff_id, sync_task_id, status_flag, create_time,
        update_time
    </sql>
    <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List"/>
        from tab_haoban_qywx_sync_log
        where qywx_sync_log_id = #{qywxSyncLogId,jdbcType=VARCHAR}
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
        delete from tab_haoban_qywx_sync_log
        where qywx_sync_log_id = #{qywxSyncLogId,jdbcType=VARCHAR}
    </delete>
    <insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabQywxSyncLog">
        insert into tab_haoban_qywx_sync_log (qywx_sync_log_id, qywx_tag_relation_id,
        member_tag_id, member_tag_name, business_type,
        change_code, log_content, opt_code,
        opt_staff_id, sync_task_id, status_flag,
        create_time, update_time)
        values (#{qywxSyncLogId,jdbcType=VARCHAR}, #{qywxTagRelationId,jdbcType=VARCHAR},
        #{memberTagId,jdbcType=VARCHAR}, #{memberTagName,jdbcType=VARCHAR}, #{businessType,jdbcType=INTEGER},
        #{changeCode,jdbcType=VARCHAR}, #{logContent,jdbcType=VARCHAR}, #{optCode,jdbcType=VARCHAR},
        #{optStaffId,jdbcType=VARCHAR}, #{syncTaskId,jdbcType=VARCHAR}, #{statusFlag,jdbcType=INTEGER},
        #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
    </insert>
    <insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabQywxSyncLog">
        insert into tab_haoban_qywx_sync_log
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="qywxSyncLogId != null">
                qywx_sync_log_id,
            </if>
            <if test="qywxTagRelationId != null">
                qywx_tag_relation_id,
            </if>
            <if test="memberTagId != null">
                member_tag_id,
            </if>
            <if test="memberTagName != null">
                member_tag_name,
            </if>
            <if test="businessType != null">
                business_type,
            </if>
            <if test="changeCode != null">
                change_code,
            </if>
            <if test="logContent != null">
                log_content,
            </if>
            <if test="optCode != null">
                opt_code,
            </if>
            <if test="optStaffId != null">
                opt_staff_id,
            </if>
            <if test="syncTaskId != null">
                sync_task_id,
            </if>
            <if test="statusFlag != null">
                status_flag,
            </if>
            <if test="createTime != null">
                create_time,
            </if>
            <if test="updateTime != null">
                update_time,
            </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="qywxSyncLogId != null">
                #{qywxSyncLogId,jdbcType=VARCHAR},
            </if>
            <if test="qywxTagRelationId != null">
                #{qywxTagRelationId,jdbcType=VARCHAR},
            </if>
            <if test="memberTagId != null">
                #{memberTagId,jdbcType=VARCHAR},
            </if>
            <if test="memberTagName != null">
                #{memberTagName,jdbcType=VARCHAR},
            </if>
            <if test="businessType != null">
                #{businessType,jdbcType=INTEGER},
            </if>
            <if test="changeCode != null">
                #{changeCode,jdbcType=VARCHAR},
            </if>
            <if test="logContent != null">
                #{logContent,jdbcType=VARCHAR},
            </if>
            <if test="optCode != null">
                #{optCode,jdbcType=VARCHAR},
            </if>
            <if test="optStaffId != null">
                #{optStaffId,jdbcType=VARCHAR},
            </if>
            <if test="syncTaskId != null">
                #{syncTaskId,jdbcType=VARCHAR},
            </if>
            <if test="statusFlag != null">
                #{statusFlag,jdbcType=INTEGER},
            </if>
            <if test="createTime != null">
                #{createTime,jdbcType=TIMESTAMP},
            </if>
            <if test="updateTime != null">
                #{updateTime,jdbcType=TIMESTAMP},
            </if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabQywxSyncLog">
        update tab_haoban_qywx_sync_log
        <set>
            <if test="qywxTagRelationId != null">
                qywx_tag_relation_id = #{qywxTagRelationId,jdbcType=VARCHAR},
            </if>
            <if test="memberTagId != null">
                member_tag_id = #{memberTagId,jdbcType=VARCHAR},
            </if>
            <if test="memberTagName != null">
                member_tag_name = #{memberTagName,jdbcType=VARCHAR},
            </if>
            <if test="businessType != null">
                business_type = #{businessType,jdbcType=INTEGER},
            </if>
            <if test="changeCode != null">
                change_code = #{changeCode,jdbcType=VARCHAR},
            </if>
            <if test="logContent != null">
                log_content = #{logContent,jdbcType=VARCHAR},
            </if>
            <if test="optCode != null">
                opt_code = #{optCode,jdbcType=VARCHAR},
            </if>
            <if test="optStaffId != null">
                opt_staff_id = #{optStaffId,jdbcType=VARCHAR},
            </if>
            <if test="syncTaskId != null">
                sync_task_id = #{syncTaskId,jdbcType=VARCHAR},
            </if>
            <if test="statusFlag != null">
                status_flag = #{statusFlag,jdbcType=INTEGER},
            </if>
            <if test="createTime != null">
                create_time = #{createTime,jdbcType=TIMESTAMP},
            </if>
            <if test="updateTime != null">
                update_time = #{updateTime,jdbcType=TIMESTAMP},
            </if>
        </set>
        where qywx_sync_log_id = #{qywxSyncLogId,jdbcType=VARCHAR}
    </update>
    <update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabQywxSyncLog">
        update tab_haoban_qywx_sync_log
        set qywx_tag_relation_id = #{qywxTagRelationId,jdbcType=VARCHAR},
        member_tag_id = #{memberTagId,jdbcType=VARCHAR},
        member_tag_name = #{memberTagName,jdbcType=VARCHAR},
        business_type = #{businessType,jdbcType=INTEGER},
        change_code = #{changeCode,jdbcType=VARCHAR},
        log_content = #{logContent,jdbcType=VARCHAR},
        opt_code = #{optCode,jdbcType=VARCHAR},
        opt_staff_id = #{optStaffId,jdbcType=VARCHAR},
        sync_task_id = #{syncTaskId,jdbcType=VARCHAR},
        status_flag = #{statusFlag,jdbcType=INTEGER},
        create_time = #{createTime,jdbcType=TIMESTAMP},
        update_time = #{updateTime,jdbcType=TIMESTAMP}
        where qywx_sync_log_id = #{qywxSyncLogId,jdbcType=VARCHAR}
    </update>
</mapper>