|
|
@@ -1,6 +1,8 @@
|
|
|
package com.style24.front.biz.web;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
+import java.io.UnsupportedEncodingException;
|
|
|
+import java.net.URLDecoder;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Collection;
|
|
|
import java.util.HashMap;
|
|
|
@@ -697,10 +699,10 @@ public class TsfDisplayController extends TsfBaseController {
|
|
|
// }
|
|
|
|
|
|
StringBuilder sql = new StringBuilder();
|
|
|
- if(params.getPriceArr() != null && params.getPriceArr().length > 0){
|
|
|
- for(int i=0; i<params.getPriceArr().length; i++){
|
|
|
+ if (params.getPriceArr() != null && params.getPriceArr().length > 0) {
|
|
|
+ for (int i = 0; i < params.getPriceArr().length; i++) {
|
|
|
String[] price = params.getPriceArr()[i].split(",");
|
|
|
- if(i>0){
|
|
|
+ if (i > 0) {
|
|
|
sql.append(" OR ");
|
|
|
}
|
|
|
sql.append(" ( G.CURR_PRICE >= ").append(price[0]).append(" AND G.CURR_PRICE <= ").append(price[1]).append(" )");
|
|
|
@@ -709,10 +711,10 @@ public class TsfDisplayController extends TsfBaseController {
|
|
|
}
|
|
|
|
|
|
StringBuilder sql2 = new StringBuilder();
|
|
|
- if(params.getDcRateArr() != null && params.getDcRateArr().length > 0){
|
|
|
- for(int i=0; i<params.getDcRateArr().length; i++){
|
|
|
+ if (params.getDcRateArr() != null && params.getDcRateArr().length > 0) {
|
|
|
+ for (int i = 0; i < params.getDcRateArr().length; i++) {
|
|
|
String[] dcRate = params.getDcRateArr()[i].split(",");
|
|
|
- if(i>0){
|
|
|
+ if (i > 0) {
|
|
|
sql2.append(" OR ");
|
|
|
}
|
|
|
sql2.append(" ( ((IF(G.LIST_PRICE = 0,0,G.LIST_PRICE) - G.CURR_PRICE) / IF(G.LIST_PRICE = 0,0,G.LIST_PRICE) * 100) >= ").append(dcRate[0]).append(" AND ((IF(G.LIST_PRICE = 0,0,G.LIST_PRICE) - G.CURR_PRICE) / IF(G.LIST_PRICE = 0,0,G.LIST_PRICE) * 100) <= ").append(dcRate[1]).append(" )");
|
|
|
@@ -1016,17 +1018,19 @@ public class TsfDisplayController extends TsfBaseController {
|
|
|
* 검색어 레이어
|
|
|
* @param brandGroupNo - 브랜드그룹번호
|
|
|
* @return
|
|
|
+ * @throws UnsupportedEncodingException
|
|
|
* @author bin2107
|
|
|
* @since 2021. 5. 11
|
|
|
*/
|
|
|
@PostMapping("/search/layer")
|
|
|
- public ModelAndView searchLayerForm(@RequestParam(value = "brandGroupNo", required = false) Integer brandGroupNo) {
|
|
|
+ public ModelAndView searchLayerForm(@RequestParam(value = "brandGroupNo", required = false) Integer brandGroupNo) throws UnsupportedEncodingException {
|
|
|
ModelAndView mav = new ModelAndView();
|
|
|
|
|
|
// 최근검색어 목록
|
|
|
Collection<String> recentlyKeywordList = new ArrayList<>();
|
|
|
String ckKeywords = GagaCookieUtil.getCookie(TsfSession.getHttpServletRequest(), TsfConstants.CK_PREFIX + "_today_keyword");
|
|
|
if (StringUtils.isNotBlank(ckKeywords)) {
|
|
|
+ ckKeywords = URLDecoder.decode(ckKeywords, "UTF-8");
|
|
|
String[] arrKeywords = ckKeywords.split("\\,");
|
|
|
StringBuilder sql = new StringBuilder();
|
|
|
if (arrKeywords.length > 0) {
|