作者 lyh

变更数据

@@ -82,11 +82,11 @@ class GeoConfirmController extends BaseController @@ -82,11 +82,11 @@ class GeoConfirmController extends BaseController
82 public function saveInfo() 82 public function saveInfo()
83 { 83 {
84 $this->request->validate([ 84 $this->request->validate([
85 - 'id' => 'required', 85 + 'project_id'=>'required',
86 'confirm' => 'required', 86 'confirm' => 'required',
87 'confirm_num' => 'required', 87 'confirm_num' => 'required',
88 ], [ 88 ], [
89 - 'id.required' => '主键id不能为空', 89 + 'project_id.required' => '主键id不能为空',
90 'confirm.required' => '客户确认内容不能为空', 90 'confirm.required' => '客户确认内容不能为空',
91 'confirm_num.max' => '客户确认数量不能为空', 91 'confirm_num.max' => '客户确认数量不能为空',
92 ]); 92 ]);
@@ -28,6 +28,7 @@ class LinkDataController extends BaseController @@ -28,6 +28,7 @@ class LinkDataController extends BaseController
28 if(!isset($this->map['type']) || empty($this->map['type'])){ 28 if(!isset($this->map['type']) || empty($this->map['type'])){
29 $this->map['type'] = $linkData::TYPE_LINK; 29 $this->map['type'] = $linkData::TYPE_LINK;
30 } 30 }
  31 + $this->map['project_id'] = $this->user['project_id'];
31 $lists = $linkData->lists($this->map,$this->page,$this->row); 32 $lists = $linkData->lists($this->map,$this->page,$this->row);
32 $this->response('success',Code::SUCCESS,$lists); 33 $this->response('success',Code::SUCCESS,$lists);
33 } 34 }
@@ -84,7 +84,13 @@ class GeoConfirmLogic extends BaseLogic @@ -84,7 +84,13 @@ class GeoConfirmLogic extends BaseLogic
84 public function saveConfirmInfo() 84 public function saveConfirmInfo()
85 { 85 {
86 $this->param['status'] = GeoConfirm::STATUS_FINISH; 86 $this->param['status'] = GeoConfirm::STATUS_FINISH;
87 - $this->model->edit($this->param,['id'=>$this->param['id']]);  
88 - return $this->success(['id'=>$this->param['id']]); 87 + $info = $this->model->read(['project_id' => $this->param['project_id']]);
  88 + if($info === false){
  89 + $id = $this->model->addReturnId($this->param);
  90 + }else{
  91 + $id = $info['id'];
  92 + $this->model->edit($this->param,['id'=>$info['id']]);
  93 + }
  94 + return $this->success(['id'=>$id]);
89 } 95 }
90 } 96 }
@@ -16,6 +16,7 @@ use App\Models\Product\Product; @@ -16,6 +16,7 @@ use App\Models\Product\Product;
16 use App\Models\Project\Project; 16 use App\Models\Project\Project;
17 use App\Models\RankData\RankData as RankDataModel; 17 use App\Models\RankData\RankData as RankDataModel;
18 use App\Models\Service\Service; 18 use App\Models\Service\Service;
  19 +use App\Services\ProjectServer;
19 use Carbon\Carbon; 20 use Carbon\Carbon;
20 use Illuminate\Support\Facades\Cache; 21 use Illuminate\Support\Facades\Cache;
21 use Illuminate\Support\Facades\DB; 22 use Illuminate\Support\Facades\DB;
@@ -90,6 +91,7 @@ class CountLogic extends BaseLogic @@ -90,6 +91,7 @@ class CountLogic extends BaseLogic
90 * @time :2023/5/24 13:33 91 * @time :2023/5/24 13:33
91 */ 92 */
92 public function total_count($inquiry_num = ''){ 93 public function total_count($inquiry_num = ''){
  94 + ProjectServer::useProject($this->user['project_id']);
93 $pv = (new VisitItem())->count(); 95 $pv = (new VisitItem())->count();
94 $ip = (new Visit())->count(); 96 $ip = (new Visit())->count();
95 $data = [ 97 $data = [