| | |
| | | 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(",")));//使用对象编码集合 |
| | |
| | | isCreateParamValid(coupon); |
| | | Coupon query= couponMapper.selectById(coupon.getId()); |
| | | initCouponStatus(query); |
| | | /* if(!Constants.equalsInteger(query.getCouponStatus(),Constants.ZERO)){ |
| | | /* if(!Constants.equalsInteger(query.getCouponStatus(),Constants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "活动已开始/已结束状态,不支持编辑操作"); |
| | | }*/ |
| | | coupon.setEditor(user.getId()); |