|
...
|
...
|
@@ -12,7 +12,10 @@ namespace App\Http\Logic\Aside\Ticket; |
|
|
|
use App\Helper\Arr;
|
|
|
|
use App\Http\Logic\Aside\BaseLogic;
|
|
|
|
use App\Models\Blog\Blog;
|
|
|
|
use App\Models\Blog\BlogCategory;
|
|
|
|
use App\Models\News\News;
|
|
|
|
use App\Models\News\NewsCategory;
|
|
|
|
use App\Models\Product\Category;
|
|
|
|
use App\Models\Product\CategoryRelated;
|
|
|
|
use App\Models\Product\KeywordRelated;
|
|
|
|
use App\Models\Product\Product;
|
|
...
|
...
|
@@ -41,10 +44,13 @@ class TicketUploadDataLogic extends BaseLogic |
|
|
|
if(isset($this->map['text']) && !empty($this->map['text'])){
|
|
|
|
$this->map['text'] = ['like','%'.$this->map['text'].'%'];
|
|
|
|
}
|
|
|
|
ProjectServer::useProject($map['project_id']);
|
|
|
|
$data = $this->model->lists($map,$page,$row,$order);
|
|
|
|
foreach ($data as &$v){
|
|
|
|
$v = $this->getHandleFileImage($v);
|
|
|
|
$v['text']['cate_text'] = $this->cateText($v['type'],$v['text']['category_id'] ?? []);
|
|
|
|
}
|
|
|
|
DB::disconnect('custom_mysql');
|
|
|
|
return $this->success($data);
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -70,6 +76,32 @@ class TicketUploadDataLogic extends BaseLogic |
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :获取分类名称
|
|
|
|
* @name :cateText
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2025/9/29 17:18
|
|
|
|
*/
|
|
|
|
public function cateText($type,$category_id)
|
|
|
|
{
|
|
|
|
if(!empty($category_id)){
|
|
|
|
return '';
|
|
|
|
}else{
|
|
|
|
$filed = 'name';
|
|
|
|
if($type == 1){
|
|
|
|
$cateModel = new Category();
|
|
|
|
$filed = 'title';
|
|
|
|
}elseif ($type == 2){
|
|
|
|
$cateModel = new BlogCategory();
|
|
|
|
}else{
|
|
|
|
$cateModel = new NewsCategory();
|
|
|
|
}
|
|
|
|
$cateArr = $cateModel->selectField(['id'=>['in',$category_id]],$filed);
|
|
|
|
return implode(',',$cateArr);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :获取当前数据详情
|
|
|
|
* @name :getDetail
|
|
|
|
* @author :lyh
|
...
|
...
|
|