1
This commit is contained in:
@@ -56,6 +56,50 @@
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertJDOrder" parameterType="JDOrder" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into jd_order (
|
||||
remark, distribution_mark, model_number, link,
|
||||
payment_amount, rebate_amount, address, logistics_link,
|
||||
order_id, buyer, order_time, create_time, update_time, status
|
||||
) values (
|
||||
#{remark}, #{distributionMark}, #{modelNumber}, #{link},
|
||||
#{paymentAmount}, #{rebateAmount}, #{address}, #{logisticsLink},
|
||||
#{orderId}, #{buyer}, #{orderTime}, now(), now(), #{status}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateJDOrder" parameterType="JDOrder">
|
||||
update jd_order
|
||||
<set>
|
||||
<if test="remark != null"> remark = #{remark},</if>
|
||||
<if test="distributionMark != null"> distribution_mark = #{distributionMark},</if>
|
||||
<if test="modelNumber != null"> model_number = #{modelNumber},</if>
|
||||
<if test="link != null"> link = #{link},</if>
|
||||
<if test="paymentAmount != null"> payment_amount = #{paymentAmount},</if>
|
||||
<if test="rebateAmount != null"> rebate_amount = #{rebateAmount},</if>
|
||||
<if test="address != null"> address = #{address},</if>
|
||||
<if test="logisticsLink != null"> logistics_link = #{logisticsLink},</if>
|
||||
<if test="orderId != null"> order_id = #{orderId},</if>
|
||||
<if test="buyer != null"> buyer = #{buyer},</if>
|
||||
<if test="orderTime != null"> order_time = #{orderTime},</if>
|
||||
<if test="status != null"> status = #{status},</if>
|
||||
update_time = now()
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="selectJDOrderByRemark" parameterType="string" resultMap="JDOrderResult">
|
||||
<include refid="selectJDOrderBase"/>
|
||||
where remark = #{remark}
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<select id="selectJDOrderListByAddress" parameterType="string" resultMap="JDOrderResult">
|
||||
<include refid="selectJDOrderBase"/>
|
||||
where address = #{address}
|
||||
order by order_time desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user