|
@@ -695,8 +695,6 @@ public class TscOrderService {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- log.info("goodsCpnList.size() ---> {}", goodsCpnList.size());
|
|
|
|
|
-
|
|
|
|
|
resultMap.set("goodsCpnList" , goodsCpnList);
|
|
resultMap.set("goodsCpnList" , goodsCpnList);
|
|
|
resultMap.set("cartCpnList" , cartCpnList);
|
|
resultMap.set("cartCpnList" , cartCpnList);
|
|
|
|
|
|
|
@@ -714,32 +712,36 @@ public class TscOrderService {
|
|
|
return orderDao.getDelvCpnList(order);
|
|
return orderDao.getDelvCpnList(order);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public Collection<Order> getGoodsCpnApplyList(Collection<Order> tmtbGoodsApplyList, Collection<Order> goodsCartCpnApplyGoodsList) {
|
|
|
|
|
-
|
|
|
|
|
|
|
+ public Collection<Order> getGoodsCpnApplyList(Collection<Order> tmtbGoodsApplyList, Collection<Order> goodsCpnAllList) {
|
|
|
Collection<Order> goodsCpnApplyList = new ArrayList<Order>();
|
|
Collection<Order> goodsCpnApplyList = new ArrayList<Order>();
|
|
|
|
|
|
|
|
|
|
+ Boolean temp = true;
|
|
|
|
|
+
|
|
|
// 쿠폰대상이 있는 상품만 정리
|
|
// 쿠폰대상이 있는 상품만 정리
|
|
|
for (Order tmtbGoods : tmtbGoodsApplyList) {
|
|
for (Order tmtbGoods : tmtbGoodsApplyList) {
|
|
|
- for (Order goodsCartCpn : goodsCartCpnApplyGoodsList) {
|
|
|
|
|
-
|
|
|
|
|
|
|
+ Collection<Order> goodsCpnList = new ArrayList<Order>();
|
|
|
|
|
+
|
|
|
|
|
+ for (Order goodsCpn : goodsCpnAllList) {
|
|
|
// 상품코드비교후 담기
|
|
// 상품코드비교후 담기
|
|
|
- if (tmtbGoods.getGoodsCd().equals(goodsCartCpn.getGoodsCd())) {
|
|
|
|
|
|
|
+ if (("A".equals(goodsCpn.getApplyScope()) || tmtbGoods.getGoodsCd().equals(goodsCpn.getGoodsCd()))) {
|
|
|
|
|
|
|
|
- Boolean temp = false;
|
|
|
|
|
|
|
+ temp = true;
|
|
|
|
|
|
|
|
// 이미 담긴 상풐은 제외
|
|
// 이미 담긴 상풐은 제외
|
|
|
- for (Order goodsCpnApply : goodsCpnApplyList) {
|
|
|
|
|
|
|
+ for (Order goodsCpnApply : goodsCpnList) {
|
|
|
if (tmtbGoods.getGoodsCd().equals(goodsCpnApply.getGoodsCd())) {
|
|
if (tmtbGoods.getGoodsCd().equals(goodsCpnApply.getGoodsCd())) {
|
|
|
- temp = true;
|
|
|
|
|
|
|
+ temp = false;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (temp == false) {
|
|
|
|
|
- goodsCpnApplyList.add(tmtbGoods);
|
|
|
|
|
|
|
+ if (temp) {
|
|
|
|
|
+ goodsCpnList.add(goodsCpn);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ tmtbGoods.setGoodsCpnList(goodsCpnList);
|
|
|
|
|
+ goodsCpnApplyList.add(tmtbGoods);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return goodsCpnApplyList;
|
|
return goodsCpnApplyList;
|