AddAtLogController.class.php
2.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?php
/**
* 写入日志记录到附件记录表
* Created by PhpStorm.
* User: heyuelong
* Date: 2018年5月10日16:56:46
*/
namespace Apicp\Controller\Attachment;
use Common\Common\AttachOperation;
class AddAtLogController extends AbstractController
{
protected $_require_login = false;
public function Index()
{
// 初始化附件操作类
$attach = AttachOperation::instance();
$app = I('get.app');
// 本方法根据应用区分不同的方案
switch ($app) {
case 'course':
// 写入课程附件日志
$attach->get_course_at_ids([], false, true);
break;
case 'exam':
// 写入考试中心附件日志
$attach->get_exam_at_ids([], false, true);
break;
case 'live':
// 写入直播附件日志
$attach->get_live_at_ids([], false, true);
break;
case 'news':
// 写入新闻附件日志
$attach->get_news_at_ids([], false, true);
break;
case 'activity':
// 活动中心附件日志
$attach->get_activity_at_ids([], false, true);
break;
case 'questionnaire':
// 调研中心附件日志
$attach->get_questionnaire_at_ids([], false, true);
break;
case 'train':
// 线下培训附件日志记录
$attach->get_train_at_ids([], false, true);
break;
case 'task':
// 任务中心附件日志记录
$attach->get_task_at_ids([], false, true);
break;
case 'sale':
// 业绩比拼附件日志记录
$attach->get_sale_at_ids([], false, true);
break;
case 'teacher':
// 企业讲师日志附件记录
$attach->get_teacher_at_ids([], false, true);
break;
case 'lottery':
// 积分抽奖日志附件记录
$attach->get_lottery_at_ids([], false, true);
break;
default:
return true;
}
$this->_result = [];
return true;
}
}