<?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.FddReqLogMapper">

	<resultMap id="fddReqLogMap" type="com.yifu.cloud.plus.v1.yifu.archives.entity.FddReqLog">
		<id property="id" column="ID"/>
		<result property="reqData" column="REQ_DATA"/>
		<result property="resData" column="RES_DATA"/>
		<result property="methodName" column="METHOD_NAME"/>
		<result property="className" column="CLASS_NAME"/>
		<result property="createBy" column="CREATE_BY"/>
		<result property="updateBy" column="UPDATE_BY"/>
		<result property="createTime" column="CREATE_TIME"/>
		<result property="updateTime" column="UPDATE_TIME"/>
		<result property="createName" column="CREATE_NAME"/>
	</resultMap>

	<sql id="Base_Column_List">
		a.ID,
        a.REQ_DATA,
        a.RES_DATA,
		a.CREATE_BY,
        a.CREATE_NAME,
        a.CREATE_TIME,
        a.UPDATE_BY,
        a.UPDATE_TIME
	</sql>

	<sql id="fddReqLog_where">
		<if test="fddReqLog != null">
			<if test="fddReqLog.id != null and fddReqLog.id.trim() != ''">
				AND a.ID = #{fddReqLog.id}
			</if>
			<if test="fddReqLog.reqDate != null and fddReqLog.reqDate.trim() != ''">
				AND a.REQ_DATE = #{fddReqLog.reqDate}
			</if>
			<if test="fddReqLog.resDate != null and fddReqLog.resDate.trim() != ''">
				AND a.RES_DATE = #{fddReqLog.resDate}
			</if>
			<if test="fddReqLog.createBy != null and fddReqLog.createBy.trim() != ''">
				AND a.CREATE_BY = #{fddReqLog.createBy}
			</if>
			<if test="fddReqLog.createName != null and fddReqLog.createName.trim() != ''">
				AND a.CREATE_NAME = #{fddReqLog.createName}
			</if>
			<if test="fddReqLog.createTime != null">
				AND a.CREATE_TIME = #{fddReqLog.createTime}
			</if>
			<if test="fddReqLog.updateBy != null and fddReqLog.updateBy.trim() != ''">
				AND a.UPDATE_BY = #{fddReqLog.updateBy}
			</if>
			<if test="fddReqLog.updateTime != null">
				AND a.UPDATE_TIME = #{fddReqLog.updateTime}
			</if>
		</if>
	</sql>

	<!--fddReqLog简单分页查询-->
	<select id="getFddReqLogPage" resultMap="fddReqLogMap">
		SELECT
		<include refid="Base_Column_List"/>
		FROM fdd_req_log a
		<where>
			1=1
			<include refid="fddReqLog_where"/>
		</where>
	</select>
</mapper>
