updateByPrimaryKey 和 updateByPrimaryKeySelective
1. 数据库记录
2. updateByPrimaryKey
1 Preparing: UPDATE t_token_info SET entity_id = ?,entity_type = ?,timeout_at = ?,create_at = ?,update_at = ?,valid = ? WHERE token = ? 2 Parameters: (String), 1(Integer), null, 2018-11-27 09:29:39.0(Timestamp), 2018-11-27 16:14:32.0(Timestamp), true(Boolean), 123(String)
3. updateByPrimaryKeySelective:更新不为 null 的字段
1 Preparing: UPDATE t_token_info SET entity_id = ?,entity_type = ?,create_at = ?,update_at = ?,valid = ? WHERE token = ? 2 Parameters: (String), 1(Integer), 2018-11-27 09:29:55.0(Timestamp), 2018-11-27 16:14:32.0(Timestamp), true(Boolean), 48626(String)
如果文章对您有所帮助,可以点一下推荐