Ver código fonte

增加shopId

林琦海 5 anos atrás
pai
commit
6e78ee3acf

+ 2 - 1
biz-hd/stat/classes/StatIncomeClass.php

@@ -24,6 +24,7 @@ class StatIncomeClass extends BaseClass
         $model = self::getByCondition($where, true);
         if (empty($model)) {
             $data = [
+                'shopId'=>$shopId,
                 'time' => $time,
                 'amount' => 0,
                 'totalAmount' => $shop->totalIncome,
@@ -41,4 +42,4 @@ class StatIncomeClass extends BaseClass
         StatIncomeMonthClass::updateOrInsert($shop, $amount);
     }
 
-}
+}

+ 1 - 0
biz-hd/stat/classes/StatIncomeMonthClass.php

@@ -22,6 +22,7 @@ class StatIncomeMonthClass extends BaseClass
         $model = self::getByCondition($where, true);
         if (empty($model)) {
             $data = [
+                'shopId' => $shopId,
                 'time' => $time,
                 'amount' => 0,
                 'totalAmount' => $shop->totalIncome,

+ 1 - 1
biz-hd/stat/classes/StatOrderClass.php

@@ -36,7 +36,7 @@ class StatOrderClass extends BaseClass
         ];
         $model = self::getByCondition($where, true);
         if (empty($model)) {
-            $model = self::add(['merchantId' => $sjId, 'time' => $time, 'riseNum' => 0, 'totalNum' => $shop->totalOrderNum], true);
+            $model = self::add(['merchantId' => $sjId, 'shopId'=>$shopId, 'time' => $time, 'riseNum' => 0, 'totalNum' => $shop->totalOrderNum], true);
         }
         $id = $model->id;
         //查id行级锁

+ 1 - 1
biz-hd/stat/classes/StatOrderMonthClass.php

@@ -35,7 +35,7 @@ class StatOrderMonthClass extends BaseClass
         ];
         $model = self::getByCondition($where, true);
         if (empty($model)) {
-            $model = self::add(['merchantId' => $sjId, 'time' => $time, 'riseNum' => 0, 'totalNum' => $shop->totalOrderNum], true);
+            $model = self::add(['merchantId' => $sjId,'shopId'=>$shopId, 'time' => $time, 'riseNum' => 0, 'totalNum' => $shop->totalOrderNum], true);
         }
         $id = $model->id;
         //查id行级锁