CustomLogic.php
1.2 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
<?php
namespace App\Http\Logic\Bside;
use App\Helper\Arr;
use App\Models\BCustom;
use App\Models\Inquiry;
use App\Models\RouteMap;
/**
* 自定义页面
* @author:dc
* @time 2023/5/12 9:47
* Class CustomLogic
* @package App\Http\Logic\Bside
*/
class CustomLogic extends BaseLogic
{
public function __construct()
{
parent::__construct();
$this->model = new BCustom();
}
/**
* @param $param
* @return array
* @throws \App\Exceptions\AsideGlobalException
* @throws \App\Exceptions\BsideGlobalException
* @author:dc
* @time 2023/5/12 9:54
*/
public function save($param)
{
$param['html'] = '';
$id = parent::save($param);
$data = $this->getInfo($id['id']);
return $data;
}
/**
* 删除
* @param $ids
* @param array $map
* @return array|void
* @author:dc
* @time 2023/5/12 9:58
*/
public function delete($ids, $map = [])
{
parent::delete($ids, $map); // TODO: Change the autogenerated stub
// 删除路由
RouteMap::delRoute(RouteMap::SOURCE_CUSTOM,$ids,$this->user['project_id']);
}
}