Browse Source

修改优化,挂账不验证余额

lishiqiang 1 day ago
parent
commit
f4f599343c

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

@@ -736,14 +736,14 @@ public class DistributorRechargeServiceImpl implements DistributorRechargeServic
                             // 交易后已使用额度
                             afterBalance = beforeBalance.add(money);
                             if (payCredit != null) {
-                                if (afterBalance.compareTo(payCredit) > 0) {
-                                    if(originTradeType == DistributorTradeTypeEnum.BALANCE_TRANS.getType()){
-                                        throw exception0(11_028, "余额不足,交易失败!");
-                                    }else {
-                                        throw exception(CREDIT_INSUFFICIENT_FUNDS);
-                                    }
-
-                                }
+//                                if (afterBalance.compareTo(payCredit) > 0) {
+//                                    if(originTradeType == DistributorTradeTypeEnum.BALANCE_TRANS.getType()){
+//                                        throw exception0(11_028, "余额不足,交易失败!");
+//                                    }else {
+//                                        throw exception(CREDIT_INSUFFICIENT_FUNDS);
+//                                    }
+//
+//                                }
                                 BigDecimal creditRemained = payCredit.subtract(afterBalance);
                                 tradeName = "授信消费金额:" + money + "元,授信总额度" + payCredit + "元,消费后剩余额度" + creditRemained + "元;已用额度" + afterBalance + "元";
                             } else {
@@ -784,7 +784,7 @@ public class DistributorRechargeServiceImpl implements DistributorRechargeServic
                         respDTO.setTradeId(tradeId);
                         respDTO.setRechargeType(tradeType);
                     } else {
-                        if(!(tradeType == DistributorTradeTypeEnum.CREDIT_RECHARGE.getType() && rechargeReqDTO.getStoreId()!=null)){
+                        if(!((tradeType == DistributorTradeTypeEnum.CREDIT_RECHARGE.getType() || tradeType == DistributorTradeTypeEnum.CREDIT_TRANS.getType() )&& rechargeReqDTO.getStoreId()!=null)){
                             throw exception(DISTRIBUTOR_PAY_FAILED);
                         }
                     }

+ 1 - 1
ship-module-product/ship-module-product-biz/src/main/java/com/yc/ship/module/product/dal/mysql/voyage/VoyageMapper.java

@@ -51,7 +51,7 @@ public interface VoyageMapper extends BaseMapperX<VoyageDO> {
     default List<VoyageDO> selectOnShelfListByShipId(Long shipId) {
         return selectList(new LambdaQueryWrapperX<VoyageDO>()
                 .eq(VoyageDO::getShipId, shipId)
-                .gt(VoyageDO::getLeaveTime, LocalDate.now())
+                .gt(VoyageDO::getStartTime, LocalDate.now())
                 .eq(VoyageDO::getShelfStatus, VoyageShelfStatusEnum.ON_SHELF.getValue())
                 .like(VoyageDO::getChannel, "1")
                 .orderByAsc(VoyageDO::getCreateTime));

+ 0 - 1
ship-module-trade/ship-module-trade-biz/src/main/java/com/yc/ship/module/trade/controller/admin/order/vo/order/TradeOrderTotalVO.java

@@ -1,6 +1,5 @@
 package com.yc.ship.module.trade.controller.admin.order.vo.order;
 
-import com.baomidou.mybatisplus.annotation.TableId;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;