Your Name 2 年之前
父节点
当前提交
14834d4541
共有 1 个文件被更改,包括 17 次插入12 次删除
  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);