Przeglądaj źródła

修改分红金额生效顺序

sunxbiao 1 rok temu
rodzic
commit
69697e5604

+ 5 - 5
app/controller/api/store/merchant/TaskPartnerProfits.php

@@ -140,14 +140,14 @@ class TaskPartnerProfits
140 140
         $redEnvelope = $this->getRedEnvelopeByTime($startTime, $endTime, $removeUserIdList);
141 141
 
142 142
         $weekRecord = bcsub($performance, $redEnvelope, 2);
143
+
144
+        if (!is_null($maxAllocationAmount)) {
145
+            $weekRecord = $maxAllocationAmount;
146
+        }
147
+
143 148
         if ($weekRecord <= 0) {
144 149
             return json('无效分红金额');
145 150
         }
146
-        if (!is_null($maxAllocationAmount)) {
147
-            if ($weekRecord > $maxAllocationAmount) {
148
-                $weekRecord = $maxAllocationAmount;
149
-            }
150
-        }
151 151
 
152 152
 
153 153
         // 1、获取用户星级信息

+ 5 - 5
app/controller/api/store/merchant/Taskorderguquan.php

@@ -783,14 +783,14 @@ class Taskorderguquan
783 783
         $redEnvelope = $this->getRedEnvelopeByTime($startTime, $endTime, $removeUserIdList);
784 784
 
785 785
         $weekRecord -= $redEnvelope;
786
+
787
+        if (!is_null($maxAllocationAmount)) {
788
+            $weekRecord = $maxAllocationAmount;
789
+        }
790
+
786 791
         if ($weekRecord <= 0) {
787 792
             return json('无效分红金额');
788 793
         }
789
-        if (!is_null($maxAllocationAmount)) {
790
-            if ($weekRecord > $maxAllocationAmount) {
791
-                $weekRecord = $maxAllocationAmount;
792
-            }
793
-        }
794 794
 
795 795
         // $stock_comm = round($weekRecord * 0.05 ,2);
796 796
         $stock_comm = floor(($weekRecord * 0.05) * 100) / 100;

+ 5 - 5
app/controller/api/store/merchant/Taskorderlianc.php

@@ -306,14 +306,14 @@ class Taskorderlianc
306 306
         $redEnvelope = $this->getRedEnvelopeByTime($startTime, $endTime, $removeUserIdList);
307 307
 
308 308
         $weekRecord -= $redEnvelope;
309
+
310
+        if (!is_null($maxAllocationAmount)) {
311
+            $weekRecord = $maxAllocationAmount;
312
+        }
313
+
309 314
         if ($weekRecord <= 0) {
310 315
             return json('无效分红金额');
311 316
         }
312
-        if (!is_null($maxAllocationAmount)) {
313
-            if ($weekRecord > $maxAllocationAmount) {
314
-                $weekRecord = $maxAllocationAmount;
315
-            }
316
-        }
317 317
 
318 318
         $originator_award = round(($weekRecord * 0.05), 2);
319 319