test пре 7 месеци
родитељ
комит
280de5c68d
1 измењених фајлова са 4 додато и 3 уклоњено
  1. 4 3
      src/modules/dj/service/pay.ts

+ 4 - 3
src/modules/dj/service/pay.ts

@@ -203,17 +203,18 @@ export class PayService extends BaseService {
     }
     channels = channels.filter(item => item.currency === currency);
     // 筛选出金额范围符合的,并且计算出所有可用通道的最大金额和最小金额
-    let allMax = 0;
+    let allMax = 100000000;
     let allMin = 0;
     channels = channels.filter(item => {
       let max = item.max || 0;
       let min = item.min || 0;
-      if (item.max > allMax) {
+      if (item.max < allMax) {
         allMax = item.max;
       }
-      if (item.min < allMin) {
+      if (item.min > allMin) {
         allMin = item.min;
       }
+      console.log(item.min, allMax, allMin)
       const mchChannel = mchChannels.find(i => i.code === item.code);
       item['weight'] = mchChannel.weight || 0;
       return +amount >= +min && +amount <= max