|
@@ -0,0 +1,109 @@
|
|
|
|
+<?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.phm.manage.mapper.BackupRestoreMapper">
|
|
|
|
+
|
|
|
|
+ <resultMap type="BackupRestoreLog" id="BackupRestoreLogResult">
|
|
|
|
+ <result property="id" column="ID" />
|
|
|
|
+ <result property="type" column="TYPE" />
|
|
|
|
+ <result property="operateType" column="OPERATE_TYPE" />
|
|
|
|
+ <result property="status" column="STATUS" />
|
|
|
|
+ <result property="source" column="SOURCE" />
|
|
|
|
+ <result property="target" column="TARGET" />
|
|
|
|
+ <result property="remark" column="REMARK" />
|
|
|
|
+ <result property="isDelete" column="IS_DELETE" />
|
|
|
|
+ <result property="createBy" column="CREATE_BY" />
|
|
|
|
+ <result property="createTime" column="CREATE_TIME" />
|
|
|
|
+ <result property="updateBy" column="UPDATE_BY" />
|
|
|
|
+ <result property="updateTime" column="UPDATE_TIME" />
|
|
|
|
+ </resultMap>
|
|
|
|
+
|
|
|
|
+ <sql id="selectBackupRestoreLogVo">
|
|
|
|
+ select ID, TYPE, OPERATE_TYPE, STATUS, SOURCE, TARGET, REMARK, IS_DELETE, CREATE_BY, CREATE_TIME, UPDATE_BY, UPDATE_TIME from PHM_BACKUP_RESTORE_LOG
|
|
|
|
+ </sql>
|
|
|
|
+
|
|
|
|
+ <select id="selectBackupRestoreLogList" parameterType="BackupRestoreLog" resultMap="BackupRestoreLogResult">
|
|
|
|
+ <include refid="selectBackupRestoreLogVo"/>
|
|
|
|
+ <where>
|
|
|
|
+ <if test="id != null "> and ID = #{id}</if>
|
|
|
|
+ <if test="type != null "> and TYPE = #{type}</if>
|
|
|
|
+ <if test="operateType != null and operateType != ''"> and OPERATE_TYPE = #{operateType}</if>
|
|
|
|
+ <if test="status != null and status != ''"> and STATUS = #{status}</if>
|
|
|
|
+ <if test="source != null and source != ''"> and SOURCE = #{source}</if>
|
|
|
|
+ <if test="target != null and target != ''"> and TARGET = #{target}</if>
|
|
|
|
+ <if test="remark != null and remark != ''"> and REMARK = #{remark}</if>
|
|
|
|
+ <if test="isDelete != null "> and IS_DELETE = #{isDelete}</if>
|
|
|
|
+ <if test="createBy != null and createBy != ''"> and CREATE_BY = #{createBy}</if>
|
|
|
|
+ <if test="createTime != null "> and CREATE_TIME = #{createTime}</if>
|
|
|
|
+ <if test="updateBy != null and updateBy != ''"> and UPDATE_BY = #{updateBy}</if>
|
|
|
|
+ <if test="updateTime != null "> and UPDATE_TIME = #{updateTime}</if>
|
|
|
|
+ </where>
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="selectBackupRestoreLogById" parameterType="Long" resultMap="BackupRestoreLogResult">
|
|
|
|
+ <include refid="selectBackupRestoreLogVo"/>
|
|
|
|
+ where ID = #{id}
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <insert id="insertBackupRestoreLog" parameterType="BackupRestoreLog">
|
|
|
|
+ insert into PHM_BACKUP_RESTORE_LOG
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="id != null">ID,</if>
|
|
|
|
+ <if test="type != null">TYPE,</if>
|
|
|
|
+ <if test="operateType != null">OPERATE_TYPE,</if>
|
|
|
|
+ <if test="status != null">STATUS,</if>
|
|
|
|
+ <if test="source != null">SOURCE,</if>
|
|
|
|
+ <if test="target != null">TARGET,</if>
|
|
|
|
+ <if test="remark != null">REMARK,</if>
|
|
|
|
+ <if test="isDelete != null">IS_DELETE,</if>
|
|
|
|
+ <if test="createBy != null">CREATE_BY,</if>
|
|
|
|
+ <if test="createTime != null">CREATE_TIME,</if>
|
|
|
|
+ <if test="updateBy != null">UPDATE_BY,</if>
|
|
|
|
+ <if test="updateTime != null">UPDATE_TIME,</if>
|
|
|
|
+ </trim>
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="id != null">#{id},</if>
|
|
|
|
+ <if test="type != null">#{type},</if>
|
|
|
|
+ <if test="operateType != null">#{operateType},</if>
|
|
|
|
+ <if test="status != null">#{status},</if>
|
|
|
|
+ <if test="source != null">#{source},</if>
|
|
|
|
+ <if test="target != null">#{target},</if>
|
|
|
|
+ <if test="remark != null">#{remark},</if>
|
|
|
|
+ <if test="isDelete != null">#{isDelete},</if>
|
|
|
|
+ <if test="createBy != null">#{createBy},</if>
|
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
|
+ <if test="updateBy != null">#{updateBy},</if>
|
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
|
+ </trim>
|
|
|
|
+ </insert>
|
|
|
|
+
|
|
|
|
+ <update id="updateBackupRestoreLog" parameterType="BackupRestoreLog">
|
|
|
|
+ update PHM_BACKUP_RESTORE_LOG
|
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
|
+ <if test="type != null">TYPE = #{type},</if>
|
|
|
|
+ <if test="operateType != null">OPERATE_TYPE = #{operateType},</if>
|
|
|
|
+ <if test="status != null">STATUS = #{status},</if>
|
|
|
|
+ <if test="source != null">SOURCE = #{source},</if>
|
|
|
|
+ <if test="target != null">TARGET = #{target},</if>
|
|
|
|
+ <if test="remark != null">REMARK = #{remark},</if>
|
|
|
|
+ <if test="isDelete != null">IS_DELETE = #{isDelete},</if>
|
|
|
|
+ <if test="createBy != null">CREATE_BY = #{createBy},</if>
|
|
|
|
+ <if test="createTime != null">CREATE_TIME = #{createTime},</if>
|
|
|
|
+ <if test="updateBy != null">UPDATE_BY = #{updateBy},</if>
|
|
|
|
+ <if test="updateTime != null">UPDATE_TIME = #{updateTime},</if>
|
|
|
|
+ </trim>
|
|
|
|
+ where ID = #{id}
|
|
|
|
+ </update>
|
|
|
|
+
|
|
|
|
+ <delete id="deleteBackupRestoreLogById" parameterType="Long">
|
|
|
|
+ delete from PHM_BACKUP_RESTORE_LOG where ID = #{id}
|
|
|
|
+ </delete>
|
|
|
|
+
|
|
|
|
+ <delete id="deleteBackupRestoreLogByIds" parameterType="String">
|
|
|
|
+ delete from PHM_BACKUP_RESTORE_LOG where ID in
|
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
|
+ #{id}
|
|
|
|
+ </foreach>
|
|
|
|
+ </delete>
|
|
|
|
+</mapper>
|