Closed fengsoshuai closed 2 years ago
for examlple:
@Query("insert into stock_logistics_no (logistics_id, logistics_type, logistics_no, stockout_id, send_province, send_city, send_district, send_address, status, created)" +
" value (:stockLogisticsNo.logisticsId, :stockLogisticsNo.logisticsType, :stockLogisticsNo.logisticsNo, :stockLogisticsNo.stockOutId, :stockLogisticsNo.sendProvince," +
":stockLogisticsNo.sendCity, :stockLogisticsNo.sendDistrict, :stockLogisticsNo.sendAddress, :stockLogisticsNo.status, :stockLogisticsNo.created) ON DUPLICATE KEY UPDATE stockout_id=VALUES(stockout_id),status=VALUES(status)")
Mono<Void> insertIntoOnDuplicateKeyExample(StockLogisticsNo stockLogisticsNo);
the package is org.springframework.data.r2dbc.repository.Query
Thanks for submitting an issue. This repository hosts only Spring Data examples and is not a general Q&A forum. Please take a look at the SpEL syntax that allows you to include dynamic parameter markers such as #{stockLogisticsNo.logisticsId}
.
Thanks!
I need use an Object to repalce this default method.