|
@@ -9,6 +9,7 @@ import com.ydd.common.annotation.RepeatSubmit;
|
|
|
import com.ydd.common.core.controller.BaseController;
|
|
|
import com.ydd.common.core.domain.BaseResult;
|
|
|
import com.ydd.module.dto.PayTradeQueryDto;
|
|
|
+import com.ydd.module.enums.ExceptionEnum;
|
|
|
import com.ydd.module.enums.PaymentTypeEnum;
|
|
|
import com.ydd.module.expection.CustomAppException;
|
|
|
import com.ydd.module.service.impl.RedissonLockService;
|
|
@@ -78,7 +79,12 @@ public class PayApi extends BaseController {
|
|
|
rLock.lock();
|
|
|
try {
|
|
|
Object resp = apiOrderNewService.createOrder(getLoginId(),req,1);
|
|
|
- return BaseResult.success(resp);
|
|
|
+ if ("amount_not_enough".equals(resp)) {
|
|
|
+ return BaseResult.error(ExceptionEnum.AMOUNT_ERROR.CODE, ExceptionEnum.AMOUNT_ERROR.MSG);
|
|
|
+ } else {
|
|
|
+ return BaseResult.success(resp);
|
|
|
+ }
|
|
|
+// return BaseResult.success(resp);
|
|
|
} catch (CustomAppException e) {
|
|
|
return BaseResult.error(e.getCode(), e.getMessage());
|
|
|
} finally {
|