更新时传NULL值在SQL实体实现

在更新时,参数传过来null值了(如图)

但是在更新sql语句时没有传该refundNoShowType参数

:UPDATE refund_exchange_manual_policy SET policy_id=1907705316976361473, refund_before_type=2, refund_before_amount=11, refund_after_type=2, refund_after_amount=32,  exchange_before_type=2, exchange_before_amount=22, exchange_after_type=2, exchange_after_amount=43, exchange_no_show_type=2, exchange_no_show_amount=65, currency='DKK', used=true, no_show_time_limit=76, update_by='超级管理员', update_time='2025-04-03 17:35:34' WHERE id=1907705317399986177

因此在创建sql表时增加注解

    @TableField(updateStrategy = FieldStrategy.IGNORED)

在运行更新时sql语句就有null值了

:UPDATE refund_exchange_manual_policy SET policy_id=1907705316976361473, refund_before_type=2, refund_before_amount=11, refund_after_type=2, refund_after_amount=32, refund_no_show_type=NULL, refund_no_show_amount=NULL, exchange_before_type=2, exchange_before_amount=22, exchange_after_type=2, exchange_after_amount=43, exchange_no_show_type=2, exchange_no_show_amount=65, currency='DKK', used=true, no_show_time_limit=76, update_by='超级管理员', update_time='2025-04-03 17:35:34' WHERE id=1907705317399986177