RemindController.class.php
1.09 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
<?php
/**
* Created by PhpStorm.
* User: zhonglei
* Date: 17/7/27
* Time: 17:12
*/
namespace Apicp\Controller\Customtask;
use Common\Common\Constant;
use Common\Common\TaskHelper;
use Common\Service\CustomtaskService;
class RemindController extends \Apicp\Controller\AbstractController
{
/**
* Remind
* @author zhonglei
* @desc 未完成常规任务消息提醒接口
* @param Int customtask_id 常规任务ID
* @return void
*/
public function Index_post()
{
$customtask_id = I('post.customtask_id', 0, 'intval');
if ($customtask_id == 0) {
E('_ERR_CUSTOMTASK_ID_IS_EMPTY');
}
$taskServ = new CustomtaskService();
$customtask = $taskServ->get($customtask_id);
if (empty($customtask)) {
E('_ERR_CUSTOMTASK_NOT_FOUND');
}
if ($customtask['task_status'] != Constant::CUSTOMTASK_STATUS_PROCESS) {
E('_ERR_DAILYTASK_STATUS_ERROR');
}
$taskHelper = &TaskHelper::instance();
$taskHelper->preSendCustomtaskIncompleteMsg($customtask);
}
}