TaskFollowLogic.php
844 字节
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
namespace App\Http\Logic\Aside\Task;
use App\Helper\Arr;
use App\Http\Logic\Aside\BaseLogic;
use App\Http\Logic\Aside\LoginLogic;
use App\Models\Task\TaskFollow;
/**
* Class TaskFollowLogic
* @package App\Http\Logic\Aside\Task
* @author zbj
* @date 2023/4/27
*/
class TaskFollowLogic extends BaseLogic
{
public function __construct()
{
parent::__construct();
$this->model = new TaskFollow();
}
public function save($param){
$task = $this::getInfo($param['task_id']);
if(!$task){
$this->fail('任务不存在');
}
$manage_ids = Arr::pluck($task['owner'], 'manage_id');
if(!in_array(LoginLogic::manage('id'), $manage_ids)){
$this->fail('非本人任务,不能添加跟进记录');
}
parent::save($param);
}
}