DescribeLogic.php
1003 字节
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
<?php
namespace App\Http\Logic\Bside\Product;
use App\Helper\Arr;
use App\Http\Logic\Bside\BaseLogic;
use App\Models\Product\Describe;
/**
* Class DescribeLogic
* @package App\Http\Logic\Bside\APublicModel
* @author zbj
* @date 2023/4/15
*/
class DescribeLogic extends BaseLogic
{
public function __construct()
{
parent::__construct();
$this->param = $this->requestAll;
$this->model = new Describe();
}
/**
* @remark :保存通用描述
* @name :describeSave
* @author :lyh
* @method :post
* @time :2023/10/17 10:37
*/
public function describeSave(){
if(isset($this->param['id']) && !empty($this->param['id'])){
$rs = $this->model->edit($this->param,['id'=>$this->param['id']]);
}else{
$rs = $this->model->add($this->param);
}
if($rs === false){
$this->fail('系统错误,请联系管理员');
}
return $this->success();
}
}