- 修改update更新

pull/1/head
sin 2019-04-12 19:57:39 +08:00
parent bc5af47f67
commit ba11aa480d
2 changed files with 8 additions and 8 deletions

View File

@ -35,7 +35,7 @@ public interface OrderItemMapper {
* - orderId * - orderId
* @param orderItemDO * @param orderItemDO
*/ */
void updateByOrderId(OrderItemDO orderItemDO); void updateByOrderId(@Param("orderItemDO") OrderItemDO orderItemDO);
/** /**
* - Ids * - Ids

View File

@ -34,12 +34,12 @@
--> -->
<sql id="updateFieldSql" > <sql id="updateFieldSql" >
<set> <set>
<if test="orderItemDO.orderId != null"> <!--<if test="orderItemDO.orderId != null">-->
, order_id = #{orderItemDO.orderId} <!--, order_id = #{orderItemDO.orderId}-->
</if> <!--</if>-->
<if test="orderItemDO.orderNo != null"> <!--<if test="orderItemDO.orderNo != null">-->
, order_no = #{orderItemDO.orderNo} <!--, order_no = #{orderItemDO.orderNo}-->
</if> <!--</if>-->
<if test="orderItemDO.orderLogisticsId != null"> <if test="orderItemDO.orderLogisticsId != null">
, order_logistics_id = #{orderItemDO.orderLogisticsId} , order_logistics_id = #{orderItemDO.orderLogisticsId}
</if> </if>
@ -123,7 +123,7 @@
<update id="updateByOrderId"> <update id="updateByOrderId">
UPDATE `order_item` UPDATE `order_item`
<include refid="updateFieldSql" /> <include refid="updateFieldSql" />
WHERE order_id = #{orderId} WHERE order_id = #{orderItemDO.orderId}
</update> </update>
<!-- <!--