|
@@ -7,7 +7,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.ylx.common.core.domain.model.WxLoginUser;
|
|
import com.ylx.common.core.domain.model.WxLoginUser;
|
|
|
import com.ylx.common.exception.ServiceException;
|
|
import com.ylx.common.exception.ServiceException;
|
|
|
import com.ylx.common.utils.DateUtils;
|
|
import com.ylx.common.utils.DateUtils;
|
|
|
-import com.ylx.common.utils.SecurityUtils;
|
|
|
|
|
import com.ylx.giftCard.domain.GiftCard;
|
|
import com.ylx.giftCard.domain.GiftCard;
|
|
|
import com.ylx.giftCard.domain.GiftCardOrder;
|
|
import com.ylx.giftCard.domain.GiftCardOrder;
|
|
|
import com.ylx.giftCard.enums.GiftCardOrderStatusEnum;
|
|
import com.ylx.giftCard.enums.GiftCardOrderStatusEnum;
|
|
@@ -36,10 +35,10 @@ public class GiftCardOrderServiceImpl extends ServiceImpl<GiftCardOrderMapper, G
|
|
|
|
|
|
|
|
// 1. 参数校验
|
|
// 1. 参数校验
|
|
|
if (ObjectUtil.isNull(card)) {
|
|
if (ObjectUtil.isNull(card)) {
|
|
|
- throw new IllegalArgumentException("购物卡信息不能为空");
|
|
|
|
|
|
|
+ throw new ServiceException("购物卡信息不能为空");
|
|
|
}
|
|
}
|
|
|
if (ObjectUtil.isNull(quantity) || quantity <= 0) {
|
|
if (ObjectUtil.isNull(quantity) || quantity <= 0) {
|
|
|
- throw new IllegalArgumentException("购买数量必须大于0");
|
|
|
|
|
|
|
+ throw new ServiceException("购买数量必须大于0");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 2. 创建订单对象
|
|
// 2. 创建订单对象
|