|
|
@@ -0,0 +1,81 @@
|
|
|
+<?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.interfaces.mapper.MdAuditMapper">
|
|
|
+
|
|
|
+ <resultMap type="com.ruoyi.interfaces.domain.MdAudit" id="MdAuditResult">
|
|
|
+ <result property="auditId" column="audit_id" />
|
|
|
+ <result property="proId" column="pro_id" />
|
|
|
+ <result property="proType" column="pro_type" />
|
|
|
+ <result property="state" column="state" />
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ <result property="remark" column="remark" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectMdAuditVo">
|
|
|
+ select audit_id, pro_id, pro_type, state, create_by, create_time, remark from md_audit
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectMdAuditList" parameterType="com.ruoyi.interfaces.domain.MdAudit" resultMap="MdAuditResult">
|
|
|
+ <include refid="selectMdAuditVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="proId != null and proId != ''"> and pro_id = #{proId}</if>
|
|
|
+ <if test="proType != null and proType != ''"> and pro_type = #{proType}</if>
|
|
|
+ <if test="state != null and state != ''"> and state = #{state}</if>
|
|
|
+ <if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
|
|
|
+ <if test="createTime != null "> and create_time = #{createTime}</if>
|
|
|
+ <if test="remark != null and remark != ''"> and remark = #{remark}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectMdAuditByAuditId" parameterType="Long" resultMap="MdAuditResult">
|
|
|
+ <include refid="selectMdAuditVo"/>
|
|
|
+ where audit_id = #{auditId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertMdAudit" parameterType="com.ruoyi.interfaces.domain.MdAudit" useGeneratedKeys="true" keyProperty="auditId">
|
|
|
+ insert into md_audit
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="proId != null">pro_id,</if>
|
|
|
+ <if test="proType != null">pro_type,</if>
|
|
|
+ <if test="state != null">state,</if>
|
|
|
+ <if test="createBy != null">create_by,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ <if test="remark != null">remark,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="proId != null">#{proId},</if>
|
|
|
+ <if test="proType != null">#{proType},</if>
|
|
|
+ <if test="state != null">#{state},</if>
|
|
|
+ <if test="createBy != null">#{createBy},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="remark != null">#{remark},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateMdAudit" parameterType="com.ruoyi.interfaces.domain.MdAudit">
|
|
|
+ update md_audit
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="proId != null">pro_id = #{proId},</if>
|
|
|
+ <if test="proType != null">pro_type = #{proType},</if>
|
|
|
+ <if test="state != null">state = #{state},</if>
|
|
|
+ <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ <if test="remark != null">remark = #{remark},</if>
|
|
|
+ </trim>
|
|
|
+ where audit_id = #{auditId}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteMdAuditByAuditId" parameterType="Long">
|
|
|
+ delete from md_audit where audit_id = #{auditId}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteMdAuditByAuditIds" parameterType="String">
|
|
|
+ delete from md_audit where audit_id in
|
|
|
+ <foreach item="auditId" collection="array" open="(" separator="," close=")">
|
|
|
+ #{auditId}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|