I managed to import this same project from github and set up the IntelliJ project correctly within 2 minutes, and here's how:
If you didn't do it already, check out the project from github. If you have an intellij project from before - start over, and check it out again.
VCS -> Check out from Version Control -> GitHub -> https://github.com/jOOQ/jOOQ
Now, after it checks out the project, this is important, when the next dialog window comes, hit CANCEL. You do not want to configure all the modules and source locations manually in the dialog box that follows "Check out from Version Control".
Instead, go to File -> Open... and choose the folder where you just checked out jOOQ from version control.
This will "force" IntelliJ to automatically create a project based on the structure of the pom.xml. It works - I tried it just now, with IntelliJ IDEA 2017.2.2 (upgrade if your version is too old).
Good luck.

Edit:
Indeed I saw the same errors when i looked at QueryTest class in jOOQ-spring-example.
It's really simple - you just need to build the module. The generated sources will provide the needed classes (they will no longer be red).
You will notice that the jOOQ-examples folder does not have a pom.xml, so you will need to set up the pom.xml in jOOQ-spring-example manually - right click on the pom.xml and select + Add as Maven Project.
You might need to click Reimport All Maven Projects so that the source and test roots get marked blue and green in the jOOQ-spring-example structure in the project pain.
Then, in the maven window, find jOOQ Spring Example and build it with maven (Lifecycle -> install). Once it builds, the generated sources will be available under jOOQ-spring-example/target/generated-sources - the jooq-h2 folder should be marked blue as a generated source root.
Go back to QueryTest and you can see the classes in the imports are no longer red.
You should be good to go now :)