Browse Source

优化代码

lishiqiang 2 weeks ago
parent
commit
66efa554ee

+ 1 - 1
ship-module-ota/ship-module-ota-biz/src/main/java/com/yc/ship/module/ota/service/distributorrecharge/DistributorRechargeServiceImpl.java

@@ -323,7 +323,7 @@ public class DistributorRechargeServiceImpl implements DistributorRechargeServic
             String key = "ota_" + rechargeReqDTO.getAccountId();
             String key = "ota_" + rechargeReqDTO.getAccountId();
             if (payType == DistributorTradeTypeEnum.BALANCE_RECHARGE.getType()) {
             if (payType == DistributorTradeTypeEnum.BALANCE_RECHARGE.getType()) {
                 //预付款
                 //预付款
-                key += "_balance";
+
             } else if (payType == DistributorTradeTypeEnum.CREDIT_RECHARGE.getType()) {
             } else if (payType == DistributorTradeTypeEnum.CREDIT_RECHARGE.getType()) {
                 //授信
                 //授信
                 key += "_credit";
                 key += "_credit";

+ 1 - 11
ship-module-trade/ship-module-trade-biz/src/main/java/com/yc/ship/module/trade/service/pay/impl/AdvancePayTypeServiceImpl.java

@@ -82,7 +82,7 @@ public class AdvancePayTypeServiceImpl implements PayTypeService {
         log.error("advancePayTypeService.refund余额退款{}退款金额{}", refundRecordDO.getRefundId(), refundRecordDO.getRefundAmount());
         log.error("advancePayTypeService.refund余额退款{}退款金额{}", refundRecordDO.getRefundId(), refundRecordDO.getRefundAmount());
         DistributorRechargeReqDTO rechargeReqDTO = new DistributorRechargeReqDTO();
         DistributorRechargeReqDTO rechargeReqDTO = new DistributorRechargeReqDTO();
         rechargeReqDTO.setAccountId(refundDO.getRefundUser());
         rechargeReqDTO.setAccountId(refundDO.getRefundUser());
-//        rechargeReqDTO.setAccountType();不区分类型
+//        rechargeReqDTO.setAccountType();
         rechargeReqDTO.setAmount(refundRecordDO.getRefundAmount());
         rechargeReqDTO.setAmount(refundRecordDO.getRefundAmount());
         rechargeReqDTO.setRechargeType(DistributorTradeTypeEnum.BALANCE_RECHARGE.getType());//余额
         rechargeReqDTO.setRechargeType(DistributorTradeTypeEnum.BALANCE_RECHARGE.getType());//余额
         rechargeReqDTO.setTradeType(DistributorTradeTypeEnum.BALANCE_REFUND.getType());
         rechargeReqDTO.setTradeType(DistributorTradeTypeEnum.BALANCE_REFUND.getType());
@@ -93,16 +93,6 @@ public class AdvancePayTypeServiceImpl implements PayTypeService {
                 rechargeReqDTO.setStoreId(tradeOrderDO.getStoreId());
                 rechargeReqDTO.setStoreId(tradeOrderDO.getStoreId());
             }
             }
         }
         }
-        if(ObjectUtil.equal(refundDO.getSellMethod(),PaySourceEnum.STOCK_DIRECT_ORDER.getType())){
-            rechargeReqDTO.setStoreId(refundDO.getStoreId());
-            rechargeReqDTO.setTradeType(DistributorTradeTypeEnum.STOCK_DIRECT_REFUND.getType());
-        }else if(ObjectUtil.equal(refundDO.getSellMethod(),PaySourceEnum.CREDIT_BILL_REPAYMENT.getType())){
-            rechargeReqDTO.setStoreId(refundDO.getStoreId());
-            rechargeReqDTO.setTradeType(DistributorTradeTypeEnum.BALANCE_REFUND.getType());
-        }else if(ObjectUtil.equal(refundDO.getSellMethod(),PaySourceEnum.GUIDE_REFUND_PLAT_CHARGEBACK.getType())){
-            rechargeReqDTO.setStoreId(refundDO.getStoreId());
-            rechargeReqDTO.setTradeType(DistributorTradeTypeEnum.GUIDE_REFUND_BALANCE_TRANS_CANCEL.getType());
-        }
         CommonResult<DistributorRechargeRespDTO> result = otaDistributorApi.tradeRecharge(rechargeReqDTO);
         CommonResult<DistributorRechargeRespDTO> result = otaDistributorApi.tradeRecharge(rechargeReqDTO);
         DistributorRechargeRespDTO respDTO = result.getCheckedData();
         DistributorRechargeRespDTO respDTO = result.getCheckedData();
         return respDTO==null?0L:respDTO.getTradeId();
         return respDTO==null?0L:respDTO.getTradeId();