I use mysql type tinyint(1) for rabbitmqFlag field.BUT,not as excepted,actually,the value -1 or >0 will map to true.other will map to false. Usually,we think 0 is false,other is true.Why?
@Data
public class User implements Serializable {
private Long id;
private String name;
private Integer age;
private Boolean rabbitmqFlag;
}
@Mapper
public interface UserMapper {
@Select("SELECT * FROM user1 WHERE rabbitmq_flag = 0")
List<User> findUnSend();
}