作者 李宇航

合并分支 'lyh-server' 到 'master'

Lyh server



查看合并请求 !3296
... ... @@ -8,9 +8,12 @@
namespace App\Http\Controllers\Api;
use App\Enums\Common\Code;
use App\Models\Geo\GeoConf;
use App\Models\Geo\GeoConfirm;
use App\Models\Geo\GeoWritings;
use App\Models\Manage\ManageHr;
use App\Models\Project\Project;
use App\Services\DingService;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Crypt;
... ... @@ -89,11 +92,28 @@ class GeoController extends BaseController
if ($info['status'] == GeoWritings::STATUS_FINISH){
return $this->response('当前文章已确认,不可再次确认',Code::SYSTEM_ERROR);
}
$this->param['confirm_ip'] = $this->request->ip();
$this->param['confirm_at'] = date('Y-m-d H:i:s');
$this->param['content_length'] = strlen($this->param['content']);
$this->param['status'] = GeoWritings::STATUS_FINISH;
$geoWritingsModel->edit($this->param,['uniqid' => $token]);
try {
$this->param['confirm_ip'] = $this->request->ip();
$this->param['confirm_at'] = date('Y-m-d H:i:s');
$this->param['content_length'] = strlen($this->param['content']);
$this->param['status'] = GeoWritings::STATUS_FINISH;
$geoWritingsModel->edit($this->param,['uniqid' => $token]);
$geoConfModel = new GeoConf();
$confInfo = $geoConfModel->read(['project_id'=>$info['project_id']]);
$hrModel = new ManageHr();
$manage_name = $hrModel->getName($confInfo['manager_id'] ??'');
$dingService = new DingService();
$dingService->handle([
'keyword' => '项目数据确认',
'msg' =>
'cm:文章确认完成' . PHP_EOL .
'项目名称:'.$confInfo['company'] ?? '' . PHP_EOL .
'负责人:'.$manage_name . PHP_EOL,
'isAtAll' => false, // 是否@所有人
], 'https://oapi.dingtalk.com/robot/send?access_token=4effe85882009a8a1617dbeadc38c350f832deef7431ce10f5fda751b4c82fb9');
}catch (\Exception $e){
$this->response('非法请求',Code::SYSTEM_ERROR);
}
$this->response('success',Code::SUCCESS);
}
... ... @@ -138,10 +158,31 @@ class GeoController extends BaseController
'confirm_num.max' => '客户确认数量不能为空',
]);
$geoConfirmModel = new GeoConfirm();
$this->param['status'] = $geoConfirmModel::STATUS_FINISH;
$this->param['confirm_ip'] = $this->request->ip();
$this->param['confirm_at'] = date('Y-m-d H:i:s');
$result = $geoConfirmModel->edit($this->param,['uniqid'=>$this->param['uniqid']]);
$info = $geoConfirmModel->read(['uniqid'=>$this->param['uniqid']]);
if ($info === false){
$this->response('当前数据不存在已被删除',Code::SYSTEM_ERROR);
}
try {
$this->param['status'] = $geoConfirmModel::STATUS_FINISH;
$this->param['confirm_ip'] = $this->request->ip();
$this->param['confirm_at'] = date('Y-m-d H:i:s');
$result = $geoConfirmModel->edit($this->param,['id'=>$info['$info']]);
$geoConfModel = new GeoConf();
$confInfo = $geoConfModel->read(['project_id'=>$info['project_id']]);
$hrModel = new ManageHr();
$manage_name = $hrModel->getName($confInfo['manager_id'] ??'');
$dingService = new DingService();
$dingService->handle([
'keyword' => '项目数据确认',
'msg' =>
'cm:'.(($info['type'] == 1) ? '标题确认' : '关键词确认'). PHP_EOL .
'项目名称:'.$confInfo['company'] ?? '' . PHP_EOL .
'负责人:'.$manage_name . PHP_EOL,
'isAtAll' => false, // 是否@所有人
], 'https://oapi.dingtalk.com/robot/send?access_token=4effe85882009a8a1617dbeadc38c350f832deef7431ce10f5fda751b4c82fb9');
}catch (\Exception $e){
$this->response('非法请求',Code::SYSTEM_ERROR);
}
$this->response('success',Code::SUCCESS,$result);
}
}
... ...
... ... @@ -232,7 +232,7 @@ class IndexController extends BaseController
public function prInfoDownload()
{
$url = 'http://crawl.scraper.waimaoq.com/export/issuewire?token=MT0CM7y4tdFTFTm';
$response = Http::get($url,['page'=>$this->param['page'],'page_size'=>$this->param['row']]);
$response = Http::get($url,['page'=>$this->param['page'],'pagesize'=>$this->param['row']]);
if ($response->successful()) {
$result = $response->json();
}
... ...
... ... @@ -12,7 +12,6 @@ namespace App\Http\Controllers\Bside\ExtensionModule;
use App\Enums\Common\Code;
use App\Http\Controllers\Bside\BaseController;
use App\Models\ExtentModule\ExtensionModuleValue;
use Illuminate\Pagination\LengthAwarePaginator;
use Illuminate\Support\Facades\Cache;
class Extension3915ModuleController extends BaseController
... ... @@ -99,6 +98,7 @@ class Extension3915ModuleController extends BaseController
*/
public function importData()
{
$data = $this->param;
return $data;
}
}
... ...