Your Name 2 jaren geleden
bovenliggende
commit
14834d4541
1 gewijzigde bestanden met toevoegingen van 17 en 12 verwijderingen
  1. 17 12
      service/bill/lib/Cron.php

+ 17 - 12
service/bill/lib/Cron.php

@@ -774,9 +774,25 @@ class Cron
             Dever::db('bill/shop_stat_log')->insert($update);
         }
     }
+    public function stat_common()
+    {
+        $shops = Dever::db('shop/info')->getguiAll(array('type'=>2));
+        if ($shops) {
+            $shop_data = array();
+            foreach ($shops as $k => $v) {
+                if ($v['agent_mid'] <1) {
+                    $shop_data[$v['id']] = $v['name'];
+                }
+            }
+            if ($shop_data) {
+                Dever::alert('以下门店没有绑定代理商:' . implode(',', $shop_data));
+            }
+        }
+    }
     # 确认对账
     public function shopYes_commit_api()
     {
+        $this->stat_common();
         $month = Dever::input('month');
         if ($month) {
             $month = Dever::maketime($month);
@@ -791,18 +807,7 @@ class Cron
     # 确认发放
     public function areaCash_commit_api()
     {
-        $shops = Dever::db('shop/info')->getguiAll(array('type'=>2));
-        if ($shops) {
-            $shop_data = array();
-            foreach ($shops as $k => $v) {
-                if ($v['agent_mid'] <1) {
-                    $shop_data[$v['id']] = $v['name'];
-                }
-            }
-            if ($shop_data) {
-                Dever::alert('以下门店没有绑定代理商:' . implode(',', $shop_data));
-            }
-        }
+        $this->stat_common();
         $month = Dever::input('month');
         if ($month) {
             $month = Dever::maketime($month);