Your Name 2 years ago
parent
commit
ac3c0b013c
1 changed files with 12 additions and 0 deletions
  1. 12 0
      tool/work/lib/Cron.php

+ 12 - 0
tool/work/lib/Cron.php

@@ -17,6 +17,18 @@ Class Cron
             }
              
         }
+    }
+    public function test_api(){
+        $title = '工单每日统计';
+        $data = Dever::db('work/branch')->state(array('type'=>1));
+        foreach ($data as $k => $v) {
+            $group_id = explode(',',$v['group']);
+            $admin = Dever::db('manage/admin')->find($group_id[1]);
+            $content = $this->email_api($v,$admin);
+            if ($content) {
+                $this->send('18310811143@qq.com', $admin['username'], $title, $content);
+            }
+        }
     }
 	#发送邮件
     public function email_api($v,$fsadmin)