67,550
社区成员




String sql = "update cargoinfo SET Quantity = Quantity - " + count
+ " where CargoId = " + cargoId;
// 可以成功更新数据库
this.jdbcTemplate.update(sql);
String sql = "update cargoinfo SET Quantity = Quantity - ? where CargoId = ?";
// 不可以更新数据库
jdbcTemplate.update(sql, new Object[]{cargoId, count});