- 修改update更新

This commit is contained in:
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
* @param orderItemDO
*/
void updateByOrderId(OrderItemDO orderItemDO);
void updateByOrderId(@Param("orderItemDO") OrderItemDO orderItemDO);
/**
* 更新 - 根据Ids

View File

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