linxk 2 долоо хоног өмнө
parent
commit
971bbb3f9b

+ 4 - 1
cif-service/src/main/java/com/txz/cif/core/ResultCode.java

@@ -61,7 +61,10 @@ public enum ResultCode {
     ORG_IS_NULL("1069", "组织机构未找到" ),
     USER_IS_EXIST("7008", "用户已注册"), CODE_CHECK_FAIL("1070", "验证码校验失败"),
     BANK_IS_NULL("1071", "提现银行不能为空" ), REVIEW_IS_NULL("1072", "审核内容为空"),
-    EFFECTIVE_BALANCE_IS_INSUFFICIENT("1073", "有效余额不足" );
+    EFFECTIVE_BALANCE_IS_INSUFFICIENT("1073", "有效余额不足" ),
+
+    ADD_RECHARGE_RECORD_EXCEPTION("1074", "创建充值订单失败"),
+    CHANNEL_EXCEPTION("1075", "未支持的通道类型" );
 
     private final String code;   //状态码
     private final String message;

+ 3 - 7
cif-service/src/main/java/com/txz/cif/web/RechargeRecordApiController.java

@@ -14,10 +14,7 @@ import com.baomidou.lock.executor.RedisTemplateLockExecutor;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.txz.cif.constants.MyConstants;
-import com.txz.cif.core.AuthService;
-import com.txz.cif.core.Result;
-import com.txz.cif.core.ResultCode;
-import com.txz.cif.core.ResultGenerator;
+import com.txz.cif.core.*;
 import com.txz.cif.dto.BizLogDTO;
 import com.txz.cif.dto.tfpay.CheckSignDTO;
 import com.txz.cif.dto.tfpay.TFCreateOrderDTO;
@@ -31,7 +28,6 @@ import com.txz.cif.web.para.RecordParam;
 import com.txz.cif.web.ro.TFPayNotifyDTO;
 import com.txz.cif.web.vo.CreatePayVO;
 import com.txz.cif.web.vo.PaymentPriceVO;
-import com.txz.core.ServiceException;
 import com.txz.mall.enums.NoticeEnum;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -247,7 +243,7 @@ public class RechargeRecordApiController {
                     }
                     break;
                 default:
-                    throw new ServiceException("暂不支持此渠道");
+                    throw new ServiceException(ResultCode.CHANNEL_EXCEPTION);
             }
             
             try {
@@ -266,7 +262,7 @@ public class RechargeRecordApiController {
             }
             
             if (!issuccess) {
-                throw new ServiceException("创建支付单失败");
+                throw new ServiceException(ResultCode.ADD_RECHARGE_RECORD_EXCEPTION);
             }
             
             return Result.success(CreatePayVO.builder().orderNo(orderNo).payUrl(payUrl).build());