原因:没有在主键加上 @TableId,主键需要加这个注解 @TableId(type = IdType.INPUT) @ApiModelProperty(value = "用户id") private String uid;