reorder dashboard bookings by its date
This commit is contained in:
parent
c936b39ad0
commit
521eaa583d
@ -18,7 +18,7 @@ apply plugin: 'war'
|
|||||||
apply plugin: 'application'
|
apply plugin: 'application'
|
||||||
|
|
||||||
group = 'de.jottyfan.camporganizer'
|
group = 'de.jottyfan.camporganizer'
|
||||||
version = '0.1.6'
|
version = '0.1.7'
|
||||||
sourceCompatibility = 17
|
sourceCompatibility = 17
|
||||||
mainClassName = "de.jottyfan.camporganizer.Main"
|
mainClassName = "de.jottyfan.camporganizer.Main"
|
||||||
|
|
||||||
|
@ -14,8 +14,8 @@ import org.apache.logging.log4j.Logger;
|
|||||||
import org.jooq.Condition;
|
import org.jooq.Condition;
|
||||||
import org.jooq.DSLContext;
|
import org.jooq.DSLContext;
|
||||||
import org.jooq.Record;
|
import org.jooq.Record;
|
||||||
import org.jooq.SelectConditionStep;
|
|
||||||
import org.jooq.SelectSeekStep1;
|
import org.jooq.SelectSeekStep1;
|
||||||
|
import org.jooq.SelectSeekStep2;
|
||||||
import org.jooq.UpdateConditionStep;
|
import org.jooq.UpdateConditionStep;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
@ -46,7 +46,7 @@ public class IndexGateway {
|
|||||||
|
|
||||||
public List<BookingBean> getAllBookings(String username) {
|
public List<BookingBean> getAllBookings(String username) {
|
||||||
TProfile REGISTRATOR = TProfile.T_PROFILE.as("registrator");
|
TProfile REGISTRATOR = TProfile.T_PROFILE.as("registrator");
|
||||||
SelectConditionStep<Record> sql = jooq
|
SelectSeekStep2<Record, LocalDateTime, LocalDateTime> sql = jooq
|
||||||
// @formatter:off
|
// @formatter:off
|
||||||
.select(T_PERSON.PK,
|
.select(T_PERSON.PK,
|
||||||
T_PERSON.FORENAME,
|
T_PERSON.FORENAME,
|
||||||
@ -81,7 +81,8 @@ public class IndexGateway {
|
|||||||
.leftJoin(REGISTRATOR).on(REGISTRATOR.PK.eq(T_PERSON.FK_REGISTRATOR))
|
.leftJoin(REGISTRATOR).on(REGISTRATOR.PK.eq(T_PERSON.FK_REGISTRATOR))
|
||||||
.leftJoin(V_CAMP).on(V_CAMP.PK.eq(T_PERSON.FK_CAMP))
|
.leftJoin(V_CAMP).on(V_CAMP.PK.eq(T_PERSON.FK_CAMP))
|
||||||
.where(T_PROFILE.USERNAME.eq(username))
|
.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
|
// @formatter:on
|
||||||
LOGGER.debug(sql.toString());
|
LOGGER.debug(sql.toString());
|
||||||
List<BookingBean> list = new ArrayList<>();
|
List<BookingBean> list = new ArrayList<>();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user