作者 刘锟

Merge remote-tracking branch 'origin/master' into akun

@@ -108,6 +108,18 @@ class Project5CateController extends BaseController @@ -108,6 +108,18 @@ class Project5CateController extends BaseController
108 if ($response->successful()) { 108 if ($response->successful()) {
109 $result = $response->json(); // 获取 JSON 响应体 109 $result = $response->json(); // 获取 JSON 响应体
110 if($result && $result['status'] == 200){ 110 if($result && $result['status'] == 200){
  111 + //todo::更新分类数据
  112 + $action1 = $project5CateModel->getCateTypeAction($this->param['type']);
  113 + $url1 = $projectInfo['website'].'wp-admin/admin-ajax.php?action='.$action1;
  114 + $data = http_get($url1);
  115 + if($data && $data['status'] == 200){
  116 + $resultData = $data['data'];
  117 + $saveData = [
  118 + 'text'=>json_encode($data['data']),
  119 + ];
  120 + $project5CateModel->edit($saveData,['project_id' => $projectInfo['post_id'],'type'=>$this->param['type']]);
  121 + $this->response('success', Code::SUCCESS,$resultData);
  122 + }
111 $this->response('success'); 123 $this->response('success');
112 } 124 }
113 } 125 }
@@ -18,6 +18,7 @@ use App\Models\Product\Category; @@ -18,6 +18,7 @@ use App\Models\Product\Category;
18 use App\Models\Product\Keyword; 18 use App\Models\Product\Keyword;
19 use App\Models\RouteMap\RouteMap; 19 use App\Models\RouteMap\RouteMap;
20 use App\Models\Ticket\TicketUploadData; 20 use App\Models\Ticket\TicketUploadData;
  21 +use App\Models\WorkOrder\TicketProject;
21 use App\Services\AiCommandService; 22 use App\Services\AiCommandService;
22 use App\Services\ProjectServer; 23 use App\Services\ProjectServer;
23 use Illuminate\Http\Request; 24 use Illuminate\Http\Request;
@@ -178,6 +179,7 @@ class TicketUploadDataController extends BaseController @@ -178,6 +179,7 @@ class TicketUploadDataController extends BaseController
178 } 179 }
179 //验证当前数据是否已提交 180 //验证当前数据是否已提交
180 $this->param['text'] = json_encode($this->param['text'], true); 181 $this->param['text'] = json_encode($this->param['text'], true);
  182 + $this->pushTicketByBot($this->param['project_id']);
181 if(isset($this->param['id']) && !empty($this->param['id'])){ 183 if(isset($this->param['id']) && !empty($this->param['id'])){
182 //执行编辑 184 //执行编辑
183 $info = $this->model->read(['id'=>$this->param['id']]); 185 $info = $this->model->read(['id'=>$this->param['id']]);
@@ -200,6 +202,22 @@ class TicketUploadDataController extends BaseController @@ -200,6 +202,22 @@ class TicketUploadDataController extends BaseController
200 } 202 }
201 203
202 /** 204 /**
  205 + * @remark :6.0数据推送微信
  206 + * @name :pushTicketByBot
  207 + * @author :lyh
  208 + * @method :post
  209 + * @time :2025/11/10 10:34
  210 + */
  211 + public function pushTicketByBot($project_id)
  212 + {
  213 + $project = TicketProject::where('table_id', $project_id)->where('project_cate',2)->where('is_del', 0)->first();
  214 + if (!$project){
  215 + return response()->json(['message' => '未找到对应的工单项目'], 404);
  216 + }
  217 + return $project->pushWechatGroupMsg("您好,用户已上传数据,请审核!");
  218 + }
  219 +
  220 + /**
203 * @remark :根据项目获取分类 221 * @remark :根据项目获取分类
204 * @name :getProductCate 222 * @name :getProductCate
205 * @author :lyh 223 * @author :lyh
@@ -24,7 +24,7 @@ class GeoQuestionResLogic extends BaseLogic @@ -24,7 +24,7 @@ class GeoQuestionResLogic extends BaseLogic
24 parent::__construct(); 24 parent::__construct();
25 $this->model = new GeoQuestionResult(); 25 $this->model = new GeoQuestionResult();
26 $this->param = $this->requestAll; 26 $this->param = $this->requestAll;
27 - if($this->user['project_id'] == 5172){ 27 + if(isset($this->user['project_id']) && $this->user['project_id'] == 5172){
28 $this->user['project_id'] = 3298; 28 $this->user['project_id'] = 3298;
29 } 29 }
30 } 30 }