|
@@ -0,0 +1,74 @@
|
|
|
+<?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.hh.bidding.mapper.QuoteInfoMapper">
|
|
|
+
|
|
|
+ <resultMap type="com.hh.bidding.domain.QuoteInfo" id="QuoteInfoResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="sid" column="sid" />
|
|
|
+ <result property="hid" column="hid" />
|
|
|
+ <result property="detail" column="detail" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectQuoteInfoVo">
|
|
|
+ select id, sid, hid, detail, create_time, update_time from quote_info
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectQuoteInfoList" parameterType="com.hh.bidding.domain.QuoteInfo" resultMap="QuoteInfoResult">
|
|
|
+ <include refid="selectQuoteInfoVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="sid != null "> and sid = #{sid}</if>
|
|
|
+ <if test="hid != null "> and hid = #{hid}</if>
|
|
|
+ <if test="detail != null and detail != ''"> and detail = #{detail}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectQuoteInfoById" parameterType="Long" resultMap="QuoteInfoResult">
|
|
|
+ <include refid="selectQuoteInfoVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertQuoteInfo" parameterType="com.hh.bidding.domain.QuoteInfo" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into quote_info
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="sid != null">sid,</if>
|
|
|
+ <if test="hid != null">hid,</if>
|
|
|
+ <if test="detail != null">detail,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="sid != null">#{sid},</if>
|
|
|
+ <if test="hid != null">#{hid},</if>
|
|
|
+ <if test="detail != null">#{detail},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateQuoteInfo" parameterType="com.hh.bidding.domain.QuoteInfo">
|
|
|
+ update quote_info
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="sid != null">sid = #{sid},</if>
|
|
|
+ <if test="hid != null">hid = #{hid},</if>
|
|
|
+ <if test="detail != null">detail = #{detail},</if>
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteQuoteInfoById" parameterType="Long">
|
|
|
+ delete from quote_info where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteQuoteInfoByIds" parameterType="String">
|
|
|
+ delete from quote_info where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|