39
39
import jakarta .servlet .http .HttpServletRequest ;
40
40
import lombok .extern .slf4j .Slf4j ;
41
41
import org .apache .commons .lang3 .LocaleUtils ;
42
+ import org .apache .commons .lang3 .StringUtils ;
42
43
import org .jetbrains .annotations .NotNull ;
43
44
import org .springframework .beans .factory .annotation .Value ;
44
45
import org .springframework .http .HttpStatus ;
@@ -84,7 +85,7 @@ public ResponseEntity<TurSNSiteSearchBean> turSNSiteSearchSelectGet(
84
85
@ RequestParam (required = false , name = TurSNParamType .FILTER_QUERY_OPERATOR , defaultValue = "NONE" )
85
86
TurSNFilterQueryOperator fqOperator ,
86
87
@ RequestParam (required = false , name = TurSNParamType .SORT ) String sort ,
87
- @ RequestParam (required = false , name = TurSNParamType .ROWS , defaultValue = "10 " ) Integer rows ,
88
+ @ RequestParam (required = false , name = TurSNParamType .ROWS , defaultValue = "-1 " ) Integer rows ,
88
89
@ RequestParam (required = false , name = TurSNParamType .GROUP ) String group ,
89
90
@ RequestParam (required = false , name = TurSNParamType .AUTO_CORRECTION_DISABLED , defaultValue = "0" )
90
91
Integer autoCorrectionDisabled ,
@@ -127,7 +128,7 @@ public ResponseEntity<TurSNSiteSearchBean> turSNSiteSearchSelectPost(
127
128
@ RequestParam (required = false , name = TurSNParamType .FILTER_QUERY_OPERATOR , defaultValue = "NONE" )
128
129
TurSNFilterQueryOperator fqOperator ,
129
130
@ RequestParam (required = false , name = TurSNParamType .SORT ) String sort ,
130
- @ RequestParam (required = false , name = TurSNParamType .ROWS , defaultValue = "10 " ) Integer rows ,
131
+ @ RequestParam (required = false , name = TurSNParamType .ROWS , defaultValue = "-1 " ) Integer rows ,
131
132
@ RequestParam (required = false , name = TurSNParamType .GROUP ) String group ,
132
133
@ RequestParam (required = false , name = TurSNParamType .AUTO_CORRECTION_DISABLED , defaultValue = "0" )
133
134
Integer autoCorrectionDisabled ,
@@ -136,7 +137,9 @@ public ResponseEntity<TurSNSiteSearchBean> turSNSiteSearchSelectPost(
136
137
Principal principal ,
137
138
HttpServletRequest request ) {
138
139
if (principal != null ) {
139
- Locale locale = LocaleUtils .toLocale (localeRequest );
140
+ Locale locale = LocaleUtils .toLocale (StringUtils .isNotBlank (turSNSitePostParamsBean .getLocale ()) ?
141
+ turSNSitePostParamsBean .getLocale () :
142
+ localeRequest );
140
143
if (existsByTurSNSiteAndLanguage (siteName , locale )) {
141
144
turSNSitePostParamsBean .setTargetingRules (
142
145
turSNSearchProcess .requestTargetingRules (turSNSitePostParamsBean .getTargetingRules ()));
0 commit comments