<?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.yifu.cloud.plus.v1.yifu.social.mapper.TSocialAutoLogMapper">

  <resultMap id="tSocialAutoLogMap" type="com.yifu.cloud.plus.v1.yifu.social.entity.TSocialAutoLog">
    <id property="id" column="ID"/>
    <result property="empName" column="EMP_NAME"/>
    <result property="empIdcard" column="EMP_IDCARD"/>
    <result property="joinLeaveDate" column="JOIN_LEAVE_DATE"/>
    <result property="phone" column="PHONE"/>
    <result property="errorInfo" column="ERROR_INFO"/>
    <result property="createBy" column="CREATE_BY"/>
    <result property="updateBy" column="UPDATE_BY"/>
    <result property="createName" column="CREATE_NAME"/>
    <result property="updateTime" column="UPDATE_TIME"/>
    <result property="createTime" column="CREATE_TIME"/>
    <result property="socialId" column="SOCIAL_ID"/>
	  <result property="type" column="TYPE"/>
  </resultMap>
    <sql id="Base_Column_List">
                a.ID,
                a.EMP_NAME,
                a.EMP_IDCARD,
                a.JOIN_LEAVE_DATE,
                a.PHONE,
                a.ERROR_INFO,
                a.CREATE_BY,
                a.UPDATE_BY,
                a.CREATE_NAME,
                a.UPDATE_TIME,
                a.CREATE_TIME,a.SOCIAL_ID,a.TYPE
    </sql>
    <sql id="tSocialAutoLog_where">
        <if test="tSocialAutoLog != null">
					<if test="tSocialAutoLog.type != null and tSocialAutoLog.type.trim() != ''">
						AND a.TYPE = #{tSocialAutoLog.type}
					</if>
                    <if test="tSocialAutoLog.id != null and tSocialAutoLog.id.trim() != ''">
                        AND a.ID = #{tSocialAutoLog.id}
                    </if>
                    <if test="tSocialAutoLog.empName != null and tSocialAutoLog.empName.trim() != ''">
                        AND a.EMP_NAME = #{tSocialAutoLog.empName}
                    </if>
                    <if test="tSocialAutoLog.empIdcard != null and tSocialAutoLog.empIdcard.trim() != ''">
                        AND a.EMP_IDCARD = #{tSocialAutoLog.empIdcard}
                    </if>
					<if test="tSocialAutoLog.socialId != null and tSocialAutoLog.socialId.trim() != ''">
						AND a.SOCIAL_ID = #{tSocialAutoLog.socialId}
					</if>
                    <if test="tSocialAutoLog.joinLeaveDate != null">
                        AND a.JOIN_LEAVE_DATE = #{tSocialAutoLog.joinLeaveDate}
                    </if>
                    <if test="tSocialAutoLog.phone != null and tSocialAutoLog.phone.trim() != ''">
                        AND a.PHONE = #{tSocialAutoLog.phone}
                    </if>
                    <if test="tSocialAutoLog.errorInfo != null and tSocialAutoLog.errorInfo.trim() != ''">
                        AND a.ERROR_INFO = #{tSocialAutoLog.errorInfo}
                    </if>
                    <if test="tSocialAutoLog.createBy != null and tSocialAutoLog.createBy.trim() != ''">
                        AND a.CREATE_BY = #{tSocialAutoLog.createBy}
                    </if>
                    <if test="tSocialAutoLog.updateBy != null and tSocialAutoLog.updateBy.trim() != ''">
                        AND a.UPDATE_BY = #{tSocialAutoLog.updateBy}
                    </if>
                    <if test="tSocialAutoLog.createName != null and tSocialAutoLog.createName.trim() != ''">
                        AND a.CREATE_NAME = #{tSocialAutoLog.createName}
                    </if>
                    <if test="tSocialAutoLog.updateTime != null">
                        AND a.UPDATE_TIME = #{tSocialAutoLog.updateTime}
                    </if>
                    <if test="tSocialAutoLog.createTime != null">
                        AND a.CREATE_TIME = #{tSocialAutoLog.createTime}
                    </if>
        </if>
    </sql>
    <!--tSocialAutoLog简单分页查询-->
    <select id="getTSocialAutoLogPage" resultMap="tSocialAutoLogMap">
        SELECT
        <include refid="Base_Column_List"/>
        FROM t_social_auto_log a
        <where>
            1=1
            <include refid="tSocialAutoLog_where"/>
        </where>
    </select>
</mapper>
