94 lines
4.5 KiB
XML
94 lines
4.5 KiB
XML
<?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.system.mapper.UserDemandQuotationMapper">
|
|
|
|
<resultMap type="UserDemandQuotation" id="UserDemandQuotationResult">
|
|
<result property="id" column="id" />
|
|
<result property="orderid" column="orderid" />
|
|
<result property="money" column="money" />
|
|
<result property="workerid" column="workerid" />
|
|
<result property="workername" column="workername" />
|
|
<result property="status" column="status" />
|
|
<result property="workerimage" column="workerimage" />
|
|
<result property="quotationTime" column="quotation_time" />
|
|
<result property="createdAt" column="created_at" />
|
|
<result property="updatedAt" column="updated_at" />
|
|
</resultMap>
|
|
|
|
<sql id="selectUserDemandQuotationVo">
|
|
select id, orderid, money, workerid, workername, status, workerimage, quotation_time, created_at, updated_at from user_demand_quotation
|
|
</sql>
|
|
|
|
<select id="selectUserDemandQuotationList" parameterType="UserDemandQuotation" resultMap="UserDemandQuotationResult">
|
|
<include refid="selectUserDemandQuotationVo"/>
|
|
<where>
|
|
<if test="orderid != null and orderid != ''"> and orderid = #{orderid}</if>
|
|
<if test="workerid != null "> and workerid = #{workerid}</if>
|
|
<if test="workername != null and workername != ''"> and workername like concat('%', #{workername}, '%')</if>
|
|
<if test="status != null "> and status = #{status}</if>
|
|
<if test="workerimage != null and workerimage != ''"> and workerimage = #{workerimage}</if>
|
|
<if test="quotationTime != null "> and quotation_time = #{quotationTime}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectUserDemandQuotationById" parameterType="Long" resultMap="UserDemandQuotationResult">
|
|
<include refid="selectUserDemandQuotationVo"/>
|
|
where id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertUserDemandQuotation" parameterType="UserDemandQuotation">
|
|
insert into user_demand_quotation
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">id,</if>
|
|
<if test="orderid != null">orderid,</if>
|
|
<if test="money != null">money,</if>
|
|
<if test="workerid != null">workerid,</if>
|
|
<if test="workername != null">workername,</if>
|
|
<if test="status != null">status,</if>
|
|
<if test="workerimage != null">workerimage,</if>
|
|
<if test="quotationTime != null">quotation_time,</if>
|
|
created_at,
|
|
updated_at
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">#{id},</if>
|
|
<if test="orderid != null">#{orderid},</if>
|
|
<if test="money != null">#{money},</if>
|
|
<if test="workerid != null">#{workerid},</if>
|
|
<if test="workername != null">#{workername},</if>
|
|
<if test="status != null">#{status},</if>
|
|
<if test="workerimage != null">#{workerimage},</if>
|
|
<if test="quotationTime != null">#{quotationTime},</if>
|
|
NOW(),
|
|
NOW()
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateUserDemandQuotation" parameterType="UserDemandQuotation">
|
|
update user_demand_quotation
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="orderid != null">orderid = #{orderid},</if>
|
|
<if test="money != null">money = #{money},</if>
|
|
<if test="workerid != null">workerid = #{workerid},</if>
|
|
<if test="workername != null">workername = #{workername},</if>
|
|
<if test="status != null">status = #{status},</if>
|
|
<if test="workerimage != null">workerimage = #{workerimage},</if>
|
|
<if test="quotationTime != null">quotation_time = #{quotationTime},</if>
|
|
updated_at = NOW(),
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteUserDemandQuotationById" parameterType="Long">
|
|
delete from user_demand_quotation where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteUserDemandQuotationByIds" parameterType="String">
|
|
delete from user_demand_quotation where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
</mapper> |