|
@@ -2,7 +2,10 @@ package com.zanxiang.sdk.service.Impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.zanxiang.common.enums.HttpStatusEnum;
|
|
|
import com.zanxiang.common.enums.OrderStateEnum;
|
|
|
+import com.zanxiang.common.exception.CustomException;
|
|
|
+import com.zanxiang.common.exception.ParamNullException;
|
|
|
import com.zanxiang.common.utils.StringUtils;
|
|
|
import com.zanxiang.common.utils.bean.BeanUtils;
|
|
|
import com.zanxiang.mybatis.entity.Order;
|
|
@@ -123,45 +126,45 @@ public class PlatformOrderServiceImpl extends ServiceImpl<OrderMapper, Order> im
|
|
|
switch (active) {
|
|
|
case "create":
|
|
|
if (platformOrderBO.getCpId() == null) {
|
|
|
- throw new NullPointerException("CpId");
|
|
|
+ throw new ParamNullException("CpId");
|
|
|
}
|
|
|
if (platformOrderBO.getUserId() == null) {
|
|
|
- throw new NullPointerException("UserId");
|
|
|
+ throw new ParamNullException("UserId");
|
|
|
}
|
|
|
if (platformOrderBO.getMgUserId() == null) {
|
|
|
- throw new NullPointerException("MgUserId");
|
|
|
+ throw new ParamNullException("MgUserId");
|
|
|
}
|
|
|
if (StringUtils.isEmpty(platformOrderBO.getProductId())) {
|
|
|
- throw new NullPointerException("ProductId");
|
|
|
+ throw new ParamNullException("ProductId");
|
|
|
}
|
|
|
if (StringUtils.isEmpty(platformOrderBO.getProductName())) {
|
|
|
- throw new NullPointerException("ProductName");
|
|
|
+ throw new ParamNullException("ProductName");
|
|
|
}
|
|
|
// if (platformOrderBO.getProductCnt() == null) {
|
|
|
// throw new NullPointerException("ProductCnt");
|
|
|
// }
|
|
|
if (platformOrderBO.getAmount() == null) {
|
|
|
- throw new NullPointerException("Amount");
|
|
|
+ throw new ParamNullException("Amount");
|
|
|
}
|
|
|
break;
|
|
|
case "pay":
|
|
|
if (platformOrderBO.getId() == null) {
|
|
|
- throw new NullPointerException("id");
|
|
|
+ throw new ParamNullException("id");
|
|
|
}
|
|
|
if (platformOrderBO.getUserId() == null) {
|
|
|
- throw new NullPointerException("UserId");
|
|
|
+ throw new ParamNullException("UserId");
|
|
|
}
|
|
|
if (platformOrderBO.getStatus() == 0) {
|
|
|
- throw new NullPointerException("Status");
|
|
|
+ throw new ParamNullException("Status");
|
|
|
}
|
|
|
if (StringUtils.isEmpty(platformOrderBO.getGamePaywayId())) {
|
|
|
- throw new NullPointerException("GamePaywayId");
|
|
|
+ throw new ParamNullException("GamePaywayId");
|
|
|
}
|
|
|
if (platformOrderBO.getRealAmount() == null) {
|
|
|
- throw new NullPointerException("RealAmount");
|
|
|
+ throw new ParamNullException("RealAmount");
|
|
|
}
|
|
|
if (StringUtils.isEmpty(platformOrderBO.getMerchantOrderNo())) {
|
|
|
- throw new NullPointerException("MerchantOrderNo");
|
|
|
+ throw new ParamNullException("MerchantOrderNo");
|
|
|
}
|
|
|
|
|
|
|