...
|
...
|
@@ -7,7 +7,6 @@ import com.google.common.base.Splitter; |
|
|
import com.google.common.collect.Lists;
|
|
|
import com.yoho.core.common.utils.DateUtil;
|
|
|
import com.yoho.core.rabbitmq.YhProducer;
|
|
|
|
|
|
import com.yoho.error.exception.ServiceException;
|
|
|
import com.yoho.ufo.coupon.service.ICouponService;
|
|
|
import com.yoho.ufo.dal.CouponMapper;
|
...
|
...
|
@@ -26,15 +25,10 @@ import com.yoho.ufo.service.IBusinessExportService; |
|
|
import com.yoho.ufo.service.impl.BatchService;
|
|
|
import com.yoho.ufo.service.impl.UserHelper;
|
|
|
import com.yoho.ufo.service.model.ApiResponse;
|
|
|
import com.yoho.ufo.util.CollectionUtil;
|
|
|
import com.yohobuy.ufo.coupon.req.CouponQueryReq;
|
|
|
import com.yohobuy.ufo.coupon.req.CouponSaveUpdateReq;
|
|
|
import com.yohobuy.ufo.coupon.req.CouponSendReq;
|
|
|
import com.yohobuy.ufo.coupon.req.UserCouponQueryReq;
|
|
|
import com.yohobuy.ufo.coupon.req.*;
|
|
|
import com.yohobuy.ufo.model.common.PageResponseBO;
|
|
|
import com.yohobuy.ufo.model.order.constants.SkupType;
|
|
|
import com.yohobuy.ufo.model.promotion.constant.CouponTypeEnum;
|
|
|
import com.yohobuy.ufo.model.promotion.constant.UserCouponsStatusEnum;
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.apache.commons.collections.MapUtils;
|
|
|
import org.apache.commons.lang.math.NumberUtils;
|
...
|
...
|
@@ -405,6 +399,15 @@ public class CouponServiceImpl implements ICouponService,IBusinessExportService{ |
|
|
return new PageResponseBO<>(total, result, req.getRows(), req.getPage());
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public ApiResponse invalidateUserCoupon(UserCouponBaseRequest request) {
|
|
|
if (request == null || StringUtils.isEmpty(request.getCouponCode()) || Objects.isNull(request.getUid())) {
|
|
|
return new ApiResponse(201, "输入参数为空", null);
|
|
|
}
|
|
|
yhProducer.send("ufo.invalidateUserCoupon", request);
|
|
|
return new ApiResponse();
|
|
|
}
|
|
|
|
|
|
private List<UidCouponQueryResp> complateCouponInfo(List<UserCoupon> userCoupons) {
|
|
|
if (CollectionUtils.isEmpty(userCoupons)) {
|
|
|
return Lists.newArrayList();
|
...
|
...
|
|