|
@@ -349,6 +349,12 @@ public class OrderHandler {
|
|
|
for(CouponItemDto couponItemDto : couponItemDtoList){
|
|
|
boolean flag = true;
|
|
|
|
|
|
+ if(couponItemDto.getCouponIsUniversal() == 2){ //判断部分产品能使用的优惠券
|
|
|
+ if(!couponItemService.isUniversal(couponItemDto.getCouponId(),cartDtos)){
|
|
|
+ flag = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/*达到优惠券所设置的金额 couponConsumeEnough*/
|
|
|
if(total >= couponItemDto.getCouponConsumeEnough()){
|
|
|
/*新人卷没有其他限制*/
|
|
@@ -747,6 +753,13 @@ public class OrderHandler {
|
|
|
msg.setMessage(ResultInfo.COUPON_CONSUME_NO_ENOUGH); //消费额度不足
|
|
|
return msg;
|
|
|
}
|
|
|
+
|
|
|
+ if(couponItemDto.getCouponIsUniversal() == 2){ //判断部分产品能使用的优惠券
|
|
|
+ if(!couponItemService.isUniversal(couponItemDto.getCouponId(),cartDtos)){
|
|
|
+ msg.setMessage(ResultInfo.COUPON_NO_TOOTH_AMOUNT); //不满足优惠条件
|
|
|
+ return msg;
|
|
|
+ }
|
|
|
+ }
|
|
|
/*新人卷没有其他限制*/
|
|
|
if(couponItemDto.getCouponIsNewPeople() == 1){ //当券为新人券
|
|
|
if(member.getUserIdentity() != 1 || !brush1Flag || !brush2Flag){ //不为会员,或者没有牙刷刷头都无法使用
|
|
@@ -1093,10 +1106,10 @@ public class OrderHandler {
|
|
|
* @return
|
|
|
*/
|
|
|
private void addFullReduction(Integer type, List<CartDto> cartDtos,Integer num[]){
|
|
|
- switch (type){
|
|
|
- case 5 :
|
|
|
- addCartDtos(cartDtos,322,1);//儿童护齿书籍
|
|
|
- break;
|
|
|
+// switch (type){
|
|
|
+// case 5 :
|
|
|
+// addCartDtos(cartDtos,322,1);//儿童护齿书籍
|
|
|
+// break;
|
|
|
// case 4 :
|
|
|
// addCartDtos(cartDtos,314,1);//牙膏
|
|
|
// addCartDtos(cartDtos,321,1);//MAC口红
|
|
@@ -1109,12 +1122,12 @@ public class OrderHandler {
|
|
|
// addCartDtos(cartDtos,314,1);//牙膏
|
|
|
// addCartDtos(cartDtos,322,1);//儿童护齿书籍
|
|
|
// break;
|
|
|
- case 1 :
|
|
|
- addCartDtos(cartDtos,314,num[0]);//牙膏
|
|
|
- break;
|
|
|
- default:
|
|
|
- break;
|
|
|
- }
|
|
|
+// case 1 :
|
|
|
+// addCartDtos(cartDtos,314,num[0]);//牙膏
|
|
|
+// break;
|
|
|
+// default:
|
|
|
+// break;
|
|
|
+// }
|
|
|
}
|
|
|
|
|
|
/**
|