|
@@ -12,6 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.core.env.Environment;
|
|
import org.springframework.core.env.Environment;
|
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.ui.Model;
|
|
import org.springframework.ui.Model;
|
|
|
|
|
+import org.springframework.util.StringUtils;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
@@ -183,9 +184,22 @@ public class TsfCartController extends TsfBaseController {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 수량 및 금액 다다익선 최소 조건 조회
|
|
// 수량 및 금액 다다익선 최소 조건 조회
|
|
|
- List<Order> result = (ArrayList<Order>) cartService.selectTmtbSalesValueList(param);
|
|
|
|
|
|
|
+ List<Order> tmtbSalesValueList = (ArrayList<Order>) cartService.selectTmtbSalesValueList(param);
|
|
|
// 조건 멘트 적용
|
|
// 조건 멘트 적용
|
|
|
-
|
|
|
|
|
|
|
+ StringBuilder tmtbDcDesc = new StringBuilder();
|
|
|
|
|
+ for(Order tmtbDcValue : tmtbSalesValueList) {
|
|
|
|
|
+ if(!StringUtils.isEmpty(tmtbDcValue.getDefaultYn()) && "Y".equals(tmtbDcValue.getDefaultYn())) {
|
|
|
|
|
+ if(TscConstants.ApplyGb.QTY.value().equals(tmtbDcValue.getSectionGb())) {
|
|
|
|
|
+ tmtbDcDesc.append(tmtbDcValue.getSectionVal()).append("개 이상 구매시 ");
|
|
|
|
|
+ } else if (TscConstants.ApplyGb.AMT.value().equals(tmtbDcValue.getSectionGb())) {
|
|
|
|
|
+ tmtbDcDesc.append(tmtbDcValue.getSectionVal()).append("원 이상 구매시 ");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if(TscConstants.DcWay.AMT.value().equals(tmtbDcValue.getDcWay())) {
|
|
|
|
|
+ tmtbDcDesc.append(tmtbDcValue.getDcVal()).append("원 할인");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
// 다다익선 상품 조회 (수량, 금액 섞어서)
|
|
// 다다익선 상품 조회 (수량, 금액 섞어서)
|
|
|
mav.addObject("goodsList", goodsService.getTmtbGoodsList(param));
|
|
mav.addObject("goodsList", goodsService.getTmtbGoodsList(param));
|