reorder dashboard bookings by its date

This commit is contained in:
Jottyfan 2022-12-10 20:54:12 +01:00
parent c936b39ad0
commit 521eaa583d
2 changed files with 5 additions and 4 deletions

View File

@ -18,7 +18,7 @@ apply plugin: 'war'
apply plugin: 'application'
group = 'de.jottyfan.camporganizer'
version = '0.1.6'
version = '0.1.7'
sourceCompatibility = 17
mainClassName = "de.jottyfan.camporganizer.Main"

View File

@ -14,8 +14,8 @@ import org.apache.logging.log4j.Logger;
import org.jooq.Condition;
import org.jooq.DSLContext;
import org.jooq.Record;
import org.jooq.SelectConditionStep;
import org.jooq.SelectSeekStep1;
import org.jooq.SelectSeekStep2;
import org.jooq.UpdateConditionStep;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
@ -46,7 +46,7 @@ public class IndexGateway {
public List<BookingBean> getAllBookings(String username) {
TProfile REGISTRATOR = TProfile.T_PROFILE.as("registrator");
SelectConditionStep<Record> sql = jooq
SelectSeekStep2<Record, LocalDateTime, LocalDateTime> sql = jooq
// @formatter:off
.select(T_PERSON.PK,
T_PERSON.FORENAME,
@ -81,7 +81,8 @@ public class IndexGateway {
.leftJoin(REGISTRATOR).on(REGISTRATOR.PK.eq(T_PERSON.FK_REGISTRATOR))
.leftJoin(V_CAMP).on(V_CAMP.PK.eq(T_PERSON.FK_CAMP))
.where(T_PROFILE.USERNAME.eq(username))
.and(T_PERSON.PK.isNotNull());
.and(T_PERSON.PK.isNotNull())
.orderBy(V_CAMP.ARRIVE, T_PERSON.CREATED);
// @formatter:on
LOGGER.debug(sql.toString());
List<BookingBean> list = new ArrayList<>();