| | |
| | | || coupon.getType()==null |
| | | ||coupon.getLimitPrice()==null |
| | | ||coupon.getPrice()==null |
| | | ||coupon.getUseType() ==null |
| | | ||coupon.getNum()==null |
| | | /* ||coupon.getIntegral()==null*/ |
| | | ||coupon.getStartDate()==null |
| | | ||(coupon.getUseType() ==0 &&( |
| | | coupon.getStartDate()==null |
| | | ||coupon.getEndDate()==null |
| | | )) |
| | | ||(coupon.getUseType() ==1 &&( |
| | | coupon.getValidDays()==null |
| | | || coupon.getValidDays()<=0 |
| | | )) |
| | | /* ||coupon.getIntegral()==null*/ |
| | | // ||coupon.getStartDate()==null |
| | | // ||coupon.getEndDate()==null |
| | | // ||coupon.getValidDays()==null |
| | | |
| | | ){ |
| | |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "关联的店铺不存在!"); |
| | | } |
| | | } |
| | | if(coupon.getUseType() ==0){ |
| | | coupon.setValidDays(null); |
| | | }else{ |
| | | coupon.setStartDate(null); |
| | | coupon.setEndDate(null); |
| | | } |
| | | coupon.setApplyIds(""); |
| | | if(Constants.equalsInteger(coupon.getApplyType(),Constants.TWO) && coupon.getApplyIdList()!=null){ |
| | | coupon.setApplyIds(coupon.getApplyIdList().stream().map(String::valueOf).collect(Collectors.joining(",")));//使用对象编码集合 |