| <?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.ruoyi.storage.minio.mapper.StorageMinioEventMapper"> | 
|      | 
|     <resultMap type="StorageMinioEvent" id="StorageMinioEventResult"> | 
|         <result property="id"    column="id"    /> | 
|         <result property="eventType"    column="event_type"    /> | 
|         <result property="bucketName"    column="bucket_name"    /> | 
|         <result property="eventTime"    column="event_time"    /> | 
|         <result property="host"    column="host"    /> | 
|         <result property="userName"    column="user_name"    /> | 
|         <result property="endpoint"    column="endpoint"    /> | 
|         <result property="objectName"    column="object_name"    /> | 
|         <result property="objectType"    column="object_type"    /> | 
|         <result property="objectSize"    column="object_size"    /> | 
|         <result property="createTime"    column="create_time"    /> | 
|     </resultMap> | 
|   | 
|     <sql id="selectStorageMinioEventVo"> | 
|         select id, event_type, bucket_name, event_time, host, user_name, endpoint, object_name, object_type, object_size, create_time from storage_minio_event | 
|     </sql> | 
|   | 
|     <select id="selectStorageMinioEventList" parameterType="StorageMinioEvent" resultMap="StorageMinioEventResult"> | 
|         <include refid="selectStorageMinioEventVo"/> | 
|         <where>   | 
|             <if test="eventType != null  and eventType != ''"> and event_type = #{eventType}</if> | 
|             <if test="host != null  and host != ''"> and host = #{host}</if> | 
|         </where> | 
|         order by create_time desc | 
|     </select> | 
|      | 
|     <select id="selectStorageMinioEventById" parameterType="String" resultMap="StorageMinioEventResult"> | 
|         <include refid="selectStorageMinioEventVo"/> | 
|         where id = #{id} | 
|     </select> | 
|          | 
|     <insert id="insertStorageMinioEvent" parameterType="StorageMinioEvent"> | 
|         insert into storage_minio_event | 
|         <trim prefix="(" suffix=")" suffixOverrides=","> | 
|             <if test="id != null">id,</if> | 
|             <if test="eventType != null">event_type,</if> | 
|             <if test="bucketName != null">bucket_name,</if> | 
|             <if test="eventTime != null">event_time,</if> | 
|             <if test="host != null">host,</if> | 
|             <if test="userName != null">user_name,</if> | 
|             <if test="endpoint != null">endpoint,</if> | 
|             <if test="objectName != null">object_name,</if> | 
|             <if test="objectType != null">object_type,</if> | 
|             <if test="objectSize != null">object_size,</if> | 
|             <if test="createTime != null">create_time,</if> | 
|          </trim> | 
|         <trim prefix="values (" suffix=")" suffixOverrides=","> | 
|             <if test="id != null">#{id},</if> | 
|             <if test="eventType != null">#{eventType},</if> | 
|             <if test="bucketName != null">#{bucketName},</if> | 
|             <if test="eventTime != null">#{eventTime},</if> | 
|             <if test="host != null">#{host},</if> | 
|             <if test="userName != null">#{userName},</if> | 
|             <if test="endpoint != null">#{endpoint},</if> | 
|             <if test="objectName != null">#{objectName},</if> | 
|             <if test="objectType != null">#{objectType},</if> | 
|             <if test="objectSize != null">#{objectSize},</if> | 
|             <if test="createTime != null">#{createTime},</if> | 
|          </trim> | 
|     </insert> | 
|   | 
|     <update id="updateStorageMinioEvent" parameterType="StorageMinioEvent"> | 
|         update storage_minio_event | 
|         <trim prefix="SET" suffixOverrides=","> | 
|             <if test="eventType != null">event_type = #{eventType},</if> | 
|             <if test="bucketName != null">bucket_name = #{bucketName},</if> | 
|             <if test="eventTime != null">event_time = #{eventTime},</if> | 
|             <if test="host != null">host = #{host},</if> | 
|             <if test="userName != null">user_name = #{userName},</if> | 
|             <if test="endpoint != null">endpoint = #{endpoint},</if> | 
|             <if test="objectName != null">object_name = #{objectName},</if> | 
|             <if test="objectType != null">object_type = #{objectType},</if> | 
|             <if test="objectSize != null">object_size = #{objectSize},</if> | 
|             <if test="createTime != null">create_time = #{createTime},</if> | 
|         </trim> | 
|         where id = #{id} | 
|     </update> | 
|   | 
|     <delete id="deleteStorageMinioEventById" parameterType="String"> | 
|         delete from storage_minio_event where id = #{id} | 
|     </delete> | 
|   | 
|     <delete id="deleteStorageMinioEventByIds" parameterType="String"> | 
|         delete from storage_minio_event where id in  | 
|         <foreach item="id" collection="array" open="(" separator="," close=")"> | 
|             #{id} | 
|         </foreach> | 
|     </delete> | 
| </mapper> |