ManageEntryPositionLogic.php
1.7 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
<?php
/**
* @remark :
* @name :ManageEntryPositionLogic.php
* @author :lyh
* @method :post
* @time :2025/11/3 17:14
*/
namespace App\Http\Logic\Aside\Manage;
use App\Http\Logic\Aside\BaseLogic;
use App\Models\Manage\EntryPosition;
class ManageEntryPositionLogic extends BaseLogic
{
public function __construct()
{
parent::__construct();
$this->param = $this->requestAll;
$this->model = new EntryPosition();
}
/**
* @remark :列表数据
* @name :listEntryPosition
* @author :lyh
* @method :post
* @time :2025/11/3 17:27
*/
public function listEntryPosition($map = [],$page = 1, $row = 10,$order = 'id')
{
$data = $this->model->lists($map,$page,$row,$order);
return $this->success($data);
}
/**
* @remark :保存数据
* @name :saveEntryPosition
* @author :lyh
* @method :post
* @time :2025/11/3 17:28
*/
public function saveEntryPosition()
{
try {
if(isset($this->param['id']) && !empty($this->param['id'])){
$id = $this->param['id'];
$this->model->edit($this->param,['id'=>$id]);
}else{
$id = $this->model->addReturnId($this->param);
}
}catch (\Exception $e){
$this->fail('保存失败,请联系管理员'.$e->getMessage());
}
return $this->success(['id'=>$id]);
}
/**
* @remark :删除数据
* @name :delEntryPosition
* @author :lyh
* @method :post
* @time :2025/11/3 17:28
*/
public function delEntryPosition()
{
$this->model->del(['id'=>['in',$this->param['id']]]);
return $this->success();
}
}