|
|
@ -22,11 +22,19 @@ public class ChildSurveyService { |
|
|
@Autowired |
|
|
@Autowired |
|
|
JdbcTemplate jdbcChildSurveyTemplate; |
|
|
JdbcTemplate jdbcChildSurveyTemplate; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
JdbcTemplate jdbcMobileMenuTemplate; |
|
|
|
|
|
|
|
|
@Autowired |
|
|
@Autowired |
|
|
public void setDataSource(@Qualifier("mysqlChildSurveyDataSource") DataSource childSurveyDataSource) { |
|
|
public void setDataSource(@Qualifier("mysqlChildSurveyDataSource") DataSource childSurveyDataSource) { |
|
|
this.jdbcChildSurveyTemplate = new JdbcTemplate(childSurveyDataSource); |
|
|
this.jdbcChildSurveyTemplate = new JdbcTemplate(childSurveyDataSource); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
public void setMobileMenuDataSource(@Qualifier("mysqlGccMobileMenuDataSource") DataSource mobileMenuDataSource) { |
|
|
|
|
|
this.jdbcMobileMenuTemplate = new JdbcTemplate(mobileMenuDataSource); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public List<Map<String, Object>> getSurveyQuestions() { |
|
|
public List<Map<String, Object>> getSurveyQuestions() { |
|
|
|
|
|
|
|
|
// Step 1: Get all child_qids |
|
|
// Step 1: Get all child_qids |
|
|
@ -631,7 +639,10 @@ public class ChildSurveyService { |
|
|
"FROM login_details " + |
|
|
"FROM login_details " + |
|
|
"WHERE mobile_no = ? AND password = ? AND is_active = 1 AND is_delete = 0 Limit 1"; |
|
|
"WHERE mobile_no = ? AND password = ? AND is_active = 1 AND is_delete = 0 Limit 1"; |
|
|
|
|
|
|
|
|
List<Map<String, Object>> data = jdbcChildSurveyTemplate.queryForList(sql, mobileNo, password); |
|
|
|
|
|
|
|
|
// List<Map<String, Object>> data = jdbcChildSurveyTemplate.queryForList(sql, |
|
|
|
|
|
// mobileNo, password); |
|
|
|
|
|
|
|
|
|
|
|
List<Map<String, Object>> data = jdbcMobileMenuTemplate.queryForList(sql, mobileNo, password); |
|
|
|
|
|
|
|
|
Map<String, Object> response = new HashMap<>(); |
|
|
Map<String, Object> response = new HashMap<>(); |
|
|
|
|
|
|
|
|
|