报错优化
This commit is contained in:
parent
0a4bcf40a3
commit
0237e225cb
|
@ -1,5 +1,12 @@
|
|||
package com.ruoyi.common.pay.tm;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
|
@ -14,12 +21,6 @@ import com.ruoyi.common.utils.DateUtils;
|
|||
import com.ruoyi.common.utils.ServiceUtil;
|
||||
import com.ruoyi.common.utils.http.HttpUtils;
|
||||
import com.wechat.pay.java.service.payments.jsapi.model.PrepayWithRequestPaymentResponse;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 太米支付
|
||||
|
@ -73,7 +74,7 @@ public class TmPayService implements PayApi {
|
|||
ServiceUtil.assertion(refundInfo.getInteger("refundStatus") != 1, "退款失败:%s", refundInfo.getString("refundMessage"));
|
||||
return refundInfo.toJavaObject(RefundInfo.class);
|
||||
} else {
|
||||
throw new ServiceException("退款失败: " + jsonResponse.getString("errMsg"));
|
||||
throw new ServiceException("退款" + refundAble.refundAmountYuan() +"元,退款失败: " + jsonResponse.getString("errMsg"));
|
||||
}
|
||||
}
|
||||
throw new ServiceException("退款数据为空");
|
||||
|
|
Loading…
Reference in New Issue
Block a user