在id上加注解@TableId(type = IdType.INPUT)
,代表非自增id,需要手动指定
@Data
@NoArgsConstructor
@AllArgsConstructor
public class User extends Model<AccountTransaction> {
/**
* id
*/
@TableId(type = IdType.INPUT)
private Long id;
/**
* 名称
*/
private Long name;
}