forked from github/szkolny
[Notifications] Fix timetable notification not having subject name.
This commit is contained in:
parent
760338496c
commit
d48beba307
@ -120,11 +120,15 @@ interface TimetableDao {
|
|||||||
@Query("""
|
@Query("""
|
||||||
SELECT
|
SELECT
|
||||||
timetable.*,
|
timetable.*,
|
||||||
|
subjects.subjectLongName AS subjectName,
|
||||||
teachers.teacherName ||" "|| teachers.teacherSurname AS teacherName,
|
teachers.teacherName ||" "|| teachers.teacherSurname AS teacherName,
|
||||||
|
oldS.subjectLongName AS oldSubjectName,
|
||||||
oldT.teacherName ||" "|| oldT.teacherSurname AS oldTeacherName,
|
oldT.teacherName ||" "|| oldT.teacherSurname AS oldTeacherName,
|
||||||
metadata.seen, metadata.notified, metadata.addedDate
|
metadata.seen, metadata.notified, metadata.addedDate
|
||||||
FROM timetable
|
FROM timetable
|
||||||
|
LEFT JOIN subjects USING(profileId, subjectId)
|
||||||
LEFT JOIN teachers USING(profileId, teacherId)
|
LEFT JOIN teachers USING(profileId, teacherId)
|
||||||
|
LEFT JOIN subjects AS oldS ON timetable.profileId = oldS.profileId AND timetable.oldSubjectId = oldS.subjectId
|
||||||
LEFT JOIN teachers AS oldT ON timetable.profileId = oldT.profileId AND timetable.oldTeacherId = oldT.teacherId
|
LEFT JOIN teachers AS oldT ON timetable.profileId = oldT.profileId AND timetable.oldTeacherId = oldT.teacherId
|
||||||
LEFT JOIN metadata ON id = thingId AND thingType = ${Metadata.TYPE_LESSON_CHANGE} AND metadata.profileId = timetable.profileId
|
LEFT JOIN metadata ON id = thingId AND thingType = ${Metadata.TYPE_LESSON_CHANGE} AND metadata.profileId = timetable.profileId
|
||||||
WHERE timetable.type NOT IN (${Lesson.TYPE_NORMAL}, ${Lesson.TYPE_NO_LESSONS}, ${Lesson.TYPE_SHIFTED_SOURCE}) AND metadata.notified = 0
|
WHERE timetable.type NOT IN (${Lesson.TYPE_NORMAL}, ${Lesson.TYPE_NO_LESSONS}, ${Lesson.TYPE_SHIFTED_SOURCE}) AND metadata.notified = 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user