Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
LaMartin-Webomagic
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sneha
LaMartin-Webomagic
Commits
99064cd3
Commit
99064cd3
authored
Jul 04, 2024
by
Deep Dey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add filter with father email for get admission form api
parent
af6cda23
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
5 deletions
+17
-5
lamartinBackend/src/main/java/com/example/LaMartin/admission/controller/AdmissionFormController.java
...aMartin/admission/controller/AdmissionFormController.java
+7
-2
lamartinBackend/src/main/java/com/example/LaMartin/admission/dao/controller/AdmissionFormDAOController.java
.../admission/dao/controller/AdmissionFormDAOController.java
+4
-2
lamartinBackend/src/main/java/com/example/LaMartin/admission/dao/repository/AdmissionFormDataRepository.java
...admission/dao/repository/AdmissionFormDataRepository.java
+6
-1
No files found.
lamartinBackend/src/main/java/com/example/LaMartin/admission/controller/AdmissionFormController.java
View file @
99064cd3
...
@@ -136,7 +136,8 @@ public class AdmissionFormController {
...
@@ -136,7 +136,8 @@ public class AdmissionFormController {
@RequestParam
(
required
=
false
,
defaultValue
=
""
)
String
schoolName
,
@RequestParam
(
required
=
false
,
defaultValue
=
""
)
String
schoolName
,
@RequestParam
(
required
=
false
,
defaultValue
=
""
)
String
className
,
@RequestParam
(
required
=
false
,
defaultValue
=
""
)
String
className
,
@RequestParam
(
required
=
false
,
defaultValue
=
""
)
String
interactionDate
,
// 2022-01-01
@RequestParam
(
required
=
false
,
defaultValue
=
""
)
String
interactionDate
,
// 2022-01-01
@RequestParam
(
required
=
false
,
defaultValue
=
""
)
String
interactionTime
// 10:00 AM
@RequestParam
(
required
=
false
,
defaultValue
=
""
)
String
interactionTime
,
@RequestParam
(
required
=
false
,
defaultValue
=
""
)
String
correspondenceEmail
// 10:00 AM
)
throws
Exception
{
)
throws
Exception
{
// TODO: validation of api key using redis
// TODO: validation of api key using redis
...
@@ -149,7 +150,8 @@ public class AdmissionFormController {
...
@@ -149,7 +150,8 @@ public class AdmissionFormController {
schoolName
,
schoolName
,
className
,
className
,
interactionDate
,
interactionDate
,
interactionTime
interactionTime
,
correspondenceEmail
)
)
),
),
HttpStatus
.
OK
);
HttpStatus
.
OK
);
...
@@ -217,6 +219,7 @@ public class AdmissionFormController {
...
@@ -217,6 +219,7 @@ public class AdmissionFormController {
schoolName
,
schoolName
,
null
,
null
,
interactionDate
,
interactionDate
,
null
,
null
null
);
);
...
@@ -256,6 +259,7 @@ public class AdmissionFormController {
...
@@ -256,6 +259,7 @@ public class AdmissionFormController {
schoolName
,
schoolName
,
null
,
null
,
interactionDate
,
interactionDate
,
null
,
null
null
);
);
...
@@ -295,6 +299,7 @@ public class AdmissionFormController {
...
@@ -295,6 +299,7 @@ public class AdmissionFormController {
schoolName
,
schoolName
,
null
,
null
,
interactionDate
,
interactionDate
,
null
,
null
null
);
);
...
...
lamartinBackend/src/main/java/com/example/LaMartin/admission/dao/controller/AdmissionFormDAOController.java
View file @
99064cd3
...
@@ -79,13 +79,15 @@ public class AdmissionFormDAOController {
...
@@ -79,13 +79,15 @@ public class AdmissionFormDAOController {
String
schoolName
,
String
schoolName
,
String
className
,
String
className
,
String
interactionDate
,
String
interactionDate
,
String
interactionTime
String
interactionTime
,
String
correspondenceEmail
)
{
)
{
return
admissionFormDataRepository
.
getAdmissionFormDataList
(
return
admissionFormDataRepository
.
getAdmissionFormDataList
(
schoolName
,
schoolName
,
className
,
className
,
interactionDate
,
interactionDate
,
interactionTime
interactionTime
,
correspondenceEmail
);
);
}
}
...
...
lamartinBackend/src/main/java/com/example/LaMartin/admission/dao/repository/AdmissionFormDataRepository.java
View file @
99064cd3
...
@@ -158,7 +158,8 @@ public class AdmissionFormDataRepository {
...
@@ -158,7 +158,8 @@ public class AdmissionFormDataRepository {
String
schoolName
,
String
schoolName
,
String
className
,
String
className
,
String
interactionDate
,
String
interactionDate
,
String
interactionTime
String
interactionTime
,
String
correspondenceEmail
)
{
)
{
StringBuilder
sql
=
new
StringBuilder
(
"SELECT * FROM admission_form_data WHERE 1 = 1"
);
StringBuilder
sql
=
new
StringBuilder
(
"SELECT * FROM admission_form_data WHERE 1 = 1"
);
MapSqlParameterSource
parameters
=
new
MapSqlParameterSource
();
MapSqlParameterSource
parameters
=
new
MapSqlParameterSource
();
...
@@ -179,6 +180,10 @@ public class AdmissionFormDataRepository {
...
@@ -179,6 +180,10 @@ public class AdmissionFormDataRepository {
sql
.
append
(
" AND interaction_time = :interactionTime"
);
sql
.
append
(
" AND interaction_time = :interactionTime"
);
parameters
.
addValue
(
"interactionTime"
,
interactionTime
);
parameters
.
addValue
(
"interactionTime"
,
interactionTime
);
}
}
if
(
correspondenceEmail
!=
null
&&
!
correspondenceEmail
.
isEmpty
())
{
sql
.
append
(
" AND father_email = :correspondenceEmail"
);
parameters
.
addValue
(
"correspondenceEmail"
,
correspondenceEmail
);
}
return
namedParameterJdbcTemplate
return
namedParameterJdbcTemplate
.
query
(
sql
.
toString
(),
parameters
,
new
AdmissionFormMapper
());
.
query
(
sql
.
toString
(),
parameters
,
new
AdmissionFormMapper
());
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment