EnterpriseProductController.php
1.4 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
<?php
/**
* @remark :
* @name :EnterpriseProductController.php
* @author :lyh
* @method :post
* @time :2025/3/26 11:05
*/
namespace App\Http\Controllers\Bside\SeoSetting;
use App\Enums\Common\Code;
use App\Http\Controllers\Bside\BaseController;
use App\Models\Project\EnterpriseProduct;
/**
* @remark :企业产品库
* @name :EnterpriseProductController
* @author :lyh
* @method :post
* @time :2025/3/26 11:05
*/
class EnterpriseProductController extends BaseController
{
/**
* @remark :获取产品库
* @name :getEnterProduct
* @author :lyh
* @method :post
* @time :2025/3/26 11:06
*/
public function getEnterProduct(EnterpriseProduct $enterpriseProduct){
$this->map['project_id'] = $this->user['project_id'];
$data = $enterpriseProduct->lists($this->map,$this->page,$this->row);
$this->response('success',Code::SUCCESS,$data);
}
/**
* @remark :删除产品库产品
* @name :del
* @author :lyh
* @method :post
* @time :2025/3/27 9:59
*/
public function del(EnterpriseProduct $enterpriseProduct){
$this->request->validate([
'ids'=>['required'],
],[
'ids.required' => 'id不能为空',
]);
$result = $enterpriseProduct->del(['id'=>['in',$this->param['ids']]]);
$this->response('success',Code::SUCCESS,$result);
}
}