|
|
@@ -0,0 +1,96 @@
|
|
|
+<?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.MdEstimateMapper">
|
|
|
+
|
|
|
+ <resultMap type="com.ruoyi.interfaces.domain.MdEstimate" id="MdEstimateResult">
|
|
|
+ <result property="estimateId" column="estimate_id" />
|
|
|
+ <result property="mdid" column="mdid" />
|
|
|
+ <result property="estimateScore" column="estimate_score" />
|
|
|
+ <result property="estimateType" column="estimate_type" />
|
|
|
+ <result property="remark" column="remark" />
|
|
|
+ <result property="beginTime" column="begin_time" />
|
|
|
+ <result property="endTime" column="end_time" />
|
|
|
+ <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="selectMdEstimateVo">
|
|
|
+ select estimate_id, mdid, estimate_score, estimate_type, remark, begin_time, end_time, create_by, create_time, update_by, update_time from md_estimate
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectMdEstimateList" parameterType="com.ruoyi.interfaces.domain.MdEstimate" resultMap="MdEstimateResult">
|
|
|
+ <include refid="selectMdEstimateVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="mdid != null and mdid != ''"> and mdid = #{mdid}</if>
|
|
|
+ <if test="estimateScore != null and estimateScore != ''"> and estimate_score = #{estimateScore}</if>
|
|
|
+ <if test="estimateType != null and estimateType != ''"> and estimate_type = #{estimateType}</if>
|
|
|
+ <if test="beginTime != null "> and begin_time = #{beginTime}</if>
|
|
|
+ <if test="endTime != null "> and end_time = #{endTime}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectMdEstimateByEstimateId" parameterType="Integer" resultMap="MdEstimateResult">
|
|
|
+ <include refid="selectMdEstimateVo"/>
|
|
|
+ where estimate_id = #{estimateId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertMdEstimate" parameterType="com.ruoyi.interfaces.domain.MdEstimate" useGeneratedKeys="true" keyProperty="estimateId">
|
|
|
+ insert into md_estimate
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="mdid != null">mdid,</if>
|
|
|
+ <if test="estimateScore != null">estimate_score,</if>
|
|
|
+ <if test="estimateType != null">estimate_type,</if>
|
|
|
+ <if test="remark != null">remark,</if>
|
|
|
+ <if test="beginTime != null">begin_time,</if>
|
|
|
+ <if test="endTime != null">end_time,</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="mdid != null">#{mdid},</if>
|
|
|
+ <if test="estimateScore != null">#{estimateScore},</if>
|
|
|
+ <if test="estimateType != null">#{estimateType},</if>
|
|
|
+ <if test="remark != null">#{remark},</if>
|
|
|
+ <if test="beginTime != null">#{beginTime},</if>
|
|
|
+ <if test="endTime != null">#{endTime},</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="updateMdEstimate" parameterType="com.ruoyi.interfaces.domain.MdEstimate">
|
|
|
+ update md_estimate
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="mdid != null">mdid = #{mdid},</if>
|
|
|
+ <if test="estimateScore != null">estimate_score = #{estimateScore},</if>
|
|
|
+ <if test="estimateType != null">estimate_type = #{estimateType},</if>
|
|
|
+ <if test="remark != null">remark = #{remark},</if>
|
|
|
+ <if test="beginTime != null">begin_time = #{beginTime},</if>
|
|
|
+ <if test="endTime != null">end_time = #{endTime},</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 estimate_id = #{estimateId}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteMdEstimateByEstimateId" parameterType="Long">
|
|
|
+ delete from md_estimate where estimate_id = #{estimateId}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteMdEstimateByEstimateIds" parameterType="String">
|
|
|
+ delete from md_estimate where estimate_id in
|
|
|
+ <foreach item="estimateId" collection="array" open="(" separator="," close=")">
|
|
|
+ #{estimateId}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|