Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
IOhacker committed Mar 3, 2025
1 parent 7ac69eb commit 701374c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public String dateDiff(String date1, String date2) {

public String castChar(String sql) {
if (databaseTypeResolver.isMySQL()) {
return format("CAST(%s AS CHAR)", sql);
return format("CAST(%s AS CHAR) COLLATE utf8mb4_unicode_ci", sql);
} else if (databaseTypeResolver.isPostgreSQL()) {
return format("%s::CHAR", sql);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.ResultSetExtractor;
import org.springframework.jdbc.core.RowMapper;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class InterestRateChartReadPlatformServiceImpl implements InterestRateChartReadPlatformService {

private final PlatformSecurityContext context;
Expand Down Expand Up @@ -97,7 +95,6 @@ public Collection<InterestRateChartData> retrieveAllWithSlabs(Long productId) {
sql.append("WHEN NOT irc.is_primary_grouping_by_amount then ircd.amount_range_from ");
sql.append("WHEN NOT irc.is_primary_grouping_by_amount then ircd.amount_range_to ");
sql.append("END");
log.error("**** SQL****** " +sql.toString());

return this.jdbcTemplate.query(
con -> con.prepareStatement(sql.toString(), ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE),
Expand Down

0 comments on commit 701374c

Please sign in to comment.