DeleteController.class.php
762 Bytes
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
<?php
/**
* 【销售活动-后台】删除回复接口
*
* User: WJY
* Date: 2017-11-02
*/
namespace Apicp\Controller\Reply;
use Common\Common\AttachOperation;
use Common\Service\ReplyService;
class DeleteController extends \Apicp\Controller\AbstractController
{
public function Index_post()
{
$reply_service = new ReplyService();
$reply_id = I('post.reply_id', 0, 'intval');
if (empty($reply_id)) {
E('_ERR_REPLY_ID_EMPTY');
}
if (!$reply_service->del_reply_pc($reply_id)) {
return false;
}
// 附件删除操作
$attach_serv = new AttachOperation();
$attach_serv->delete_attach(APP_DIR, 'reply', [$reply_id]);
return true;
}
}