|
@@ -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)
|