mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
sonarqube质量修复
This commit is contained in:
+2
-3
@@ -4,6 +4,7 @@ import com.cf.imes.framework.pay.core.client.exception.PayException;
|
||||
import com.cf.imes.framework.pay.core.enums.order.PayOrderDisplayModeEnum;
|
||||
import com.cf.imes.framework.pay.core.enums.order.PayOrderStatusRespEnum;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@@ -13,6 +14,7 @@ import java.time.LocalDateTime;
|
||||
* @author 晨丰科技
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public class PayOrderRespDTO {
|
||||
|
||||
/**
|
||||
@@ -73,9 +75,6 @@ public class PayOrderRespDTO {
|
||||
*/
|
||||
private String channelErrorMsg;
|
||||
|
||||
public PayOrderRespDTO() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建【WAITING】状态的订单返回
|
||||
*/
|
||||
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
package com.cf.imes.framework.pay.core.client.impl.weixin;
|
||||
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.core.text.CharSequenceUtil;
|
||||
import cn.hutool.core.thread.ThreadUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.cf.imes.framework.common.util.date.LocalDateTimeUtils;
|
||||
import com.cf.imes.framework.pay.core.client.dto.order.PayOrderRespDTO;
|
||||
import com.cf.imes.framework.pay.core.client.dto.order.PayOrderUnifiedReqDTO;
|
||||
@@ -77,7 +77,7 @@ public class WxBarPayClient extends AbstractWxPayClient {
|
||||
// 1. SYSTEMERROR:接口返回错误:请立即调用被扫订单结果查询API,查询当前订单状态,并根据订单的状态决定下一步的操作。
|
||||
// 2. USERPAYING:用户支付中,需要输入密码:等待 5 秒,然后调用被扫订单结果查询 API,查询当前订单的不同状态,决定下一步的操作。
|
||||
// 3. BANKERROR:银行系统异常:请立即调用被扫订单结果查询 API,查询当前订单的不同状态,决定下一步的操作。
|
||||
if (!StrUtil.equalsAny(ex.getErrCode(), "SYSTEMERROR", "USERPAYING", "BANKERROR")) {
|
||||
if (!CharSequenceUtil.equalsAny(ex.getErrCode(), "SYSTEMERROR", "USERPAYING", "BANKERROR")) {
|
||||
throw ex;
|
||||
}
|
||||
// 等待 5 秒,继续下一轮重新发起支付
|
||||
@@ -98,7 +98,7 @@ public class WxBarPayClient extends AbstractWxPayClient {
|
||||
|
||||
static String getAuthCode(PayOrderUnifiedReqDTO reqDTO) {
|
||||
String authCode = MapUtil.getStr(reqDTO.getChannelExtras(), "authCode");
|
||||
if (StrUtil.isEmpty(authCode)) {
|
||||
if (CharSequenceUtil.isEmpty(authCode)) {
|
||||
throw invalidParamException("支付请求的 authCode 不能为空!");
|
||||
}
|
||||
return authCode;
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.cf.imes.framework.pay.core.client.impl.weixin;
|
||||
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.core.text.CharSequenceUtil;
|
||||
import com.cf.imes.framework.pay.core.client.dto.order.PayOrderRespDTO;
|
||||
import com.cf.imes.framework.pay.core.client.dto.order.PayOrderUnifiedReqDTO;
|
||||
import com.cf.imes.framework.pay.core.enums.channel.PayChannelEnum;
|
||||
@@ -71,7 +71,7 @@ public class WxPubPayClient extends AbstractWxPayClient {
|
||||
|
||||
static String getOpenid(PayOrderUnifiedReqDTO reqDTO) {
|
||||
String openid = MapUtil.getStr(reqDTO.getChannelExtras(), "openid");
|
||||
if (StrUtil.isEmpty(openid)) {
|
||||
if (CharSequenceUtil.isEmpty(openid)) {
|
||||
throw invalidParamException("支付请求的 openid 不能为空!");
|
||||
}
|
||||
return openid;
|
||||
|
||||
Reference in New Issue
Block a user