V6UpdateLogLogic.php
1.5 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
<?php
/**
* @remark :
* @name :V6UpdateLogLogic.php
* @author :lyh
* @method :post
* @time :2024/5/9 16:06
*/
namespace App\Http\Logic\Aside\Com;
use App\Http\Logic\Aside\BaseLogic;
use App\Models\Com\V6UpdateLog;
class V6UpdateLogLogic extends BaseLogic
{
public function __construct()
{
parent::__construct();
$this->model = new V6UpdateLog();
$this->param = $this->requestAll;
}
/**
* @remark :保存数据
* @name :saveV6UpdateLog
* @author :lyh
* @method :post
* @time :2024/5/9 16:25
*/
public function saveV6UpdateLog(){
$this->param['operator_id'] = $this->manager['id'];
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 :delV6UpdateLog
* @author :lyh
* @method :post
* @time :2024/5/9 16:32
*/
public function delV6UpdateLog(){
try {
$this->model->del($this->param);
}catch (\Exception $e){
$this->fail('删除失败,请联系管理员');
}
return $this->success();
}
}