今天在写一个更新模块的时候,使用MybatisPlus方法中的updateById总是报错,后来才发现是pojo中并没有标记主键,updateById它是根据主键进行更新的。
@Data
@AllArgsConstructor
@NoArgsConstructor
public class users {
@TableId
private Integer uid;
private String username;
private String password;
}