<?xml version="1.0" encoding="UTF-8"?>

<!--
  ~
  ~      Copyright (c) 2018-2025, lengleng All rights reserved.
  ~
  ~  Redistribution and use in source and binary forms, with or without
  ~  modification, are permitted provided that the following conditions are met:
  ~
  ~ Redistributions of source code must retain the above copyright notice,
  ~  this list of conditions and the following disclaimer.
  ~  Redistributions in binary form must reproduce the above copyright
  ~  notice, this list of conditions and the following disclaimer in the
  ~  documentation and/or other materials provided with the distribution.
  ~  Neither the name of the yifu4cloud.com developer nor the names of its
  ~  contributors may be used to endorse or promote products derived from
  ~  this software without specific prior written permission.
  ~  Author: lengleng (wangiegie@gmail.com)
  ~
  -->

<!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.archives.mapper.TFascPushLogMapper">

  <resultMap id="tFascPushLogMap" type="com.yifu.cloud.plus.v1.yifu.archives.entity.TFascPushLog">
    <id property="id" column="id"/>
    <result property="transReferenceId" column="trans_reference_id"/>
    <result property="signTaskId" column="sign_task_id"/>
    <result property="pushData" column="push_data"/>
    <result property="returnData" column="return_data"/>
    <result property="contractId" column="contract_id"/>
    <result property="taskStatus" column="task_status"/>
    <result property="typeKey" column="type_key"/>
    <result property="typeName" column="type_name"/>
    <result property="createBy" column="CREATE_BY"/>
    <result property="createName" column="CREATE_NAME"/>
    <result property="createTime" column="CREATE_TIME"/>
    <result property="updateBy" column="UPDATE_BY"/>
    <result property="updateTime" column="UPDATE_TIME"/>
  </resultMap>
    <sql id="Base_Column_List">
                a.id,
                a.trans_reference_id,
                a.sign_task_id,
                a.push_data,
                a.return_data,
                a.contract_id,
                a.task_status,
                a.type_key,
                a.type_name,
                a.CREATE_BY,
                a.CREATE_NAME,
                a.CREATE_TIME,
                a.UPDATE_BY,
                a.UPDATE_TIME
    </sql>
    <sql id="tFascPushLog_where">
        <if test="tFascPushLog != null">
                    <if test="tFascPushLog.id != null and tFascPushLog.id.trim() != ''">
                        AND a.id = #{tFascPushLog.id}
                    </if>
                    <if test="tFascPushLog.transReferenceId != null and tFascPushLog.transReferenceId.trim() != ''">
                        AND a.trans_reference_id = #{tFascPushLog.transReferenceId}
                    </if>
                    <if test="tFascPushLog.signTaskId != null and tFascPushLog.signTaskId.trim() != ''">
                        AND a.sign_task_id = #{tFascPushLog.signTaskId}
                    </if>
                    <if test="tFascPushLog.pushData != null and tFascPushLog.pushData.trim() != ''">
                        AND a.push_data = #{tFascPushLog.pushData}
                    </if>
                    <if test="tFascPushLog.returnData != null and tFascPushLog.returnData.trim() != ''">
                        AND a.return_data = #{tFascPushLog.returnData}
                    </if>
                    <if test="tFascPushLog.contractId != null and tFascPushLog.contractId.trim() != ''">
                        AND a.contract_id = #{tFascPushLog.contractId}
                    </if>
                    <if test="tFascPushLog.taskStatus != null and tFascPushLog.taskStatus.trim() != ''">
                        AND a.task_status = #{tFascPushLog.taskStatus}
                    </if>
                    <if test="tFascPushLog.typeKey != null and tFascPushLog.typeKey.trim() != ''">
                        AND a.type_key = #{tFascPushLog.typeKey}
                    </if>
                    <if test="tFascPushLog.typeName != null and tFascPushLog.typeName.trim() != ''">
                        AND a.type_name = #{tFascPushLog.typeName}
                    </if>
                    <if test="tFascPushLog.createBy != null and tFascPushLog.createBy.trim() != ''">
                        AND a.CREATE_BY = #{tFascPushLog.createBy}
                    </if>
                    <if test="tFascPushLog.createName != null and tFascPushLog.createName.trim() != ''">
                        AND a.CREATE_NAME = #{tFascPushLog.createName}
                    </if>
                    <if test="tFascPushLog.createTime != null">
                        AND a.CREATE_TIME = #{tFascPushLog.createTime}
                    </if>
                    <if test="tFascPushLog.updateBy != null and tFascPushLog.updateBy.trim() != ''">
                        AND a.UPDATE_BY = #{tFascPushLog.updateBy}
                    </if>
                    <if test="tFascPushLog.updateTime != null">
                        AND a.UPDATE_TIME = #{tFascPushLog.updateTime}
                    </if>
        </if>
    </sql>
    <!--tFascPushLog简单分页查询-->
    <select id="getTFascPushLogPage" resultMap="tFascPushLogMap">
        SELECT
        <include refid="Base_Column_List"/>
        FROM t_fasc_push_log a
        <where>
            1=1
            <include refid="tFascPushLog_where"/>
        </where>
    </select>
</mapper>
