|
@@ -12,7 +12,10 @@ namespace App\Http\Logic\Aside\Ticket; |
|
@@ -12,7 +12,10 @@ namespace App\Http\Logic\Aside\Ticket; |
|
12
|
use App\Helper\Arr;
|
12
|
use App\Helper\Arr;
|
|
13
|
use App\Http\Logic\Aside\BaseLogic;
|
13
|
use App\Http\Logic\Aside\BaseLogic;
|
|
14
|
use App\Models\Blog\Blog;
|
14
|
use App\Models\Blog\Blog;
|
|
|
|
15
|
+use App\Models\Blog\BlogCategory;
|
|
15
|
use App\Models\News\News;
|
16
|
use App\Models\News\News;
|
|
|
|
17
|
+use App\Models\News\NewsCategory;
|
|
|
|
18
|
+use App\Models\Product\Category;
|
|
16
|
use App\Models\Product\CategoryRelated;
|
19
|
use App\Models\Product\CategoryRelated;
|
|
17
|
use App\Models\Product\KeywordRelated;
|
20
|
use App\Models\Product\KeywordRelated;
|
|
18
|
use App\Models\Product\Product;
|
21
|
use App\Models\Product\Product;
|
|
@@ -41,10 +44,13 @@ class TicketUploadDataLogic extends BaseLogic |
|
@@ -41,10 +44,13 @@ class TicketUploadDataLogic extends BaseLogic |
|
41
|
if(isset($this->map['text']) && !empty($this->map['text'])){
|
44
|
if(isset($this->map['text']) && !empty($this->map['text'])){
|
|
42
|
$this->map['text'] = ['like','%'.$this->map['text'].'%'];
|
45
|
$this->map['text'] = ['like','%'.$this->map['text'].'%'];
|
|
43
|
}
|
46
|
}
|
|
|
|
47
|
+ ProjectServer::useProject($map['project_id']);
|
|
44
|
$data = $this->model->lists($map,$page,$row,$order);
|
48
|
$data = $this->model->lists($map,$page,$row,$order);
|
|
45
|
foreach ($data as &$v){
|
49
|
foreach ($data as &$v){
|
|
46
|
$v = $this->getHandleFileImage($v);
|
50
|
$v = $this->getHandleFileImage($v);
|
|
|
|
51
|
+ $v['text']['cate_text'] = $this->cateText($v['type'],$v['text']['category_id'] ?? []);
|
|
47
|
}
|
52
|
}
|
|
|
|
53
|
+ DB::disconnect('custom_mysql');
|
|
48
|
return $this->success($data);
|
54
|
return $this->success($data);
|
|
49
|
}
|
55
|
}
|
|
50
|
|
56
|
|
|
@@ -70,6 +76,32 @@ class TicketUploadDataLogic extends BaseLogic |
|
@@ -70,6 +76,32 @@ class TicketUploadDataLogic extends BaseLogic |
|
70
|
}
|
76
|
}
|
|
71
|
|
77
|
|
|
72
|
/**
|
78
|
/**
|
|
|
|
79
|
+ * @remark :获取分类名称
|
|
|
|
80
|
+ * @name :cateText
|
|
|
|
81
|
+ * @author :lyh
|
|
|
|
82
|
+ * @method :post
|
|
|
|
83
|
+ * @time :2025/9/29 17:18
|
|
|
|
84
|
+ */
|
|
|
|
85
|
+ public function cateText($type,$category_id)
|
|
|
|
86
|
+ {
|
|
|
|
87
|
+ if(!empty($category_id)){
|
|
|
|
88
|
+ return '';
|
|
|
|
89
|
+ }else{
|
|
|
|
90
|
+ $filed = 'name';
|
|
|
|
91
|
+ if($type == 1){
|
|
|
|
92
|
+ $cateModel = new Category();
|
|
|
|
93
|
+ $filed = 'title';
|
|
|
|
94
|
+ }elseif ($type == 2){
|
|
|
|
95
|
+ $cateModel = new BlogCategory();
|
|
|
|
96
|
+ }else{
|
|
|
|
97
|
+ $cateModel = new NewsCategory();
|
|
|
|
98
|
+ }
|
|
|
|
99
|
+ $cateArr = $cateModel->selectField(['id'=>['in',$category_id]],$filed);
|
|
|
|
100
|
+ return implode(',',$cateArr);
|
|
|
|
101
|
+ }
|
|
|
|
102
|
+ }
|
|
|
|
103
|
+
|
|
|
|
104
|
+ /**
|
|
73
|
* @remark :获取当前数据详情
|
105
|
* @remark :获取当前数据详情
|
|
74
|
* @name :getDetail
|
106
|
* @name :getDetail
|
|
75
|
* @author :lyh
|
107
|
* @author :lyh
|