Merge remote-tracking branch 'origin/master' into akun
正在显示
4 个修改的文件
包含
17 行增加
和
5 行删除
| @@ -352,7 +352,7 @@ class RelayInquiry extends Command | @@ -352,7 +352,7 @@ class RelayInquiry extends Command | ||
| 352 | // 随机访问1-6个页面 | 352 | // 随机访问1-6个页面 |
| 353 | $deep = rand(1,6); | 353 | $deep = rand(1,6); |
| 354 | if($deep > 2) { | 354 | if($deep > 2) { |
| 355 | - $visit_urls = Arr::random($all_urls, rand(1, count($all_urls) > 3 ? 3 : count($all_urls))); | 355 | + $visit_urls = Arr::random($all_urls, rand(1, count($all_urls) > 4 ? 4 : count($all_urls))); |
| 356 | $urls = array_merge($urls, $visit_urls); | 356 | $urls = array_merge($urls, $visit_urls); |
| 357 | } | 357 | } |
| 358 | if($deep > 1) { | 358 | if($deep > 1) { |
| @@ -8,6 +8,7 @@ use App\Models\Inquiry\ReInquiryForm; | @@ -8,6 +8,7 @@ use App\Models\Inquiry\ReInquiryForm; | ||
| 8 | use Illuminate\Console\Command; | 8 | use Illuminate\Console\Command; |
| 9 | use Illuminate\Support\Facades\Http; | 9 | use Illuminate\Support\Facades\Http; |
| 10 | use Illuminate\Support\Facades\Log; | 10 | use Illuminate\Support\Facades\Log; |
| 11 | +use Illuminate\Support\Facades\Redis; | ||
| 11 | 12 | ||
| 12 | /** | 13 | /** |
| 13 | * Class postInquiry | 14 | * Class postInquiry |
| @@ -50,6 +51,18 @@ class postInquiry extends Command | @@ -50,6 +51,18 @@ class postInquiry extends Command | ||
| 50 | } | 51 | } |
| 51 | // 询盘数据入库 | 52 | // 询盘数据入库 |
| 52 | foreach ($list as $key => $val) { | 53 | foreach ($list as $key => $val) { |
| 54 | + //加个锁 避免重复执行 | ||
| 55 | + $lockKey = 're_inquiry_detail_log_lock_' . $val->id; | ||
| 56 | + if(!Redis::setnx($lockKey, 1)){ | ||
| 57 | + continue; | ||
| 58 | + } | ||
| 59 | + Redis::expire($lockKey, 60); | ||
| 60 | + | ||
| 61 | + $log = ReInquiryDetailLog::find($val->id); | ||
| 62 | + if($log->status != ReInquiryDetailLog::STATUS_INIT){ | ||
| 63 | + continue; | ||
| 64 | + } | ||
| 65 | + | ||
| 53 | $this->output('开始执行' . $val->id); | 66 | $this->output('开始执行' . $val->id); |
| 54 | try { | 67 | try { |
| 55 | $detail = ReInquiryDetail::find($val['detail_id']); | 68 | $detail = ReInquiryDetail::find($val['detail_id']); |
| @@ -150,9 +150,6 @@ class ComController extends BaseController | @@ -150,9 +150,6 @@ class ComController extends BaseController | ||
| 150 | if($uploadCode != 1){ | 150 | if($uploadCode != 1){ |
| 151 | $data[] = 41; | 151 | $data[] = 41; |
| 152 | } | 152 | } |
| 153 | - if(!empty($data)){ | ||
| 154 | - $this->map['id'] = ['not in',$data]; | ||
| 155 | - } | ||
| 156 | $projectCode = $this->getProjectWatermark(); | 153 | $projectCode = $this->getProjectWatermark(); |
| 157 | if($projectCode != 1){ | 154 | if($projectCode != 1){ |
| 158 | $data[] = 50; | 155 | $data[] = 50; |
| @@ -406,7 +403,7 @@ class ComController extends BaseController | @@ -406,7 +403,7 @@ class ComController extends BaseController | ||
| 406 | * @method :post | 403 | * @method :post |
| 407 | * @time :2024/10/28 11:51 | 404 | * @time :2024/10/28 11:51 |
| 408 | */ | 405 | */ |
| 409 | - public function month_count(){ | 406 | + public function month_counts(){ |
| 410 | Artisan::call('month_project '.$this->user['project_id']); | 407 | Artisan::call('month_project '.$this->user['project_id']); |
| 411 | $this->response('重新刷新中,请稍后刷新查询'); | 408 | $this->response('重新刷新中,请稍后刷新查询'); |
| 412 | } | 409 | } |
| @@ -21,6 +21,8 @@ Route::middleware(['bloginauth'])->group(function () { | @@ -21,6 +21,8 @@ Route::middleware(['bloginauth'])->group(function () { | ||
| 21 | Route::any('/getLink', [\App\Http\Controllers\Bside\BCom\ComController::class, 'getLink'])->name('getLink'); | 21 | Route::any('/getLink', [\App\Http\Controllers\Bside\BCom\ComController::class, 'getLink'])->name('getLink'); |
| 22 | Route::any('/getMobileProject', [\App\Http\Controllers\Bside\BCom\ComController::class, 'getMobileProject'])->name('getMobileProject'); | 22 | Route::any('/getMobileProject', [\App\Http\Controllers\Bside\BCom\ComController::class, 'getMobileProject'])->name('getMobileProject'); |
| 23 | Route::any('/getNoticeInfo', [\App\Http\Controllers\Bside\BCom\ComController::class, 'getNoticeInfo'])->name('getNoticeInfo'); | 23 | Route::any('/getNoticeInfo', [\App\Http\Controllers\Bside\BCom\ComController::class, 'getNoticeInfo'])->name('getNoticeInfo'); |
| 24 | + //重新校队流量统计 | ||
| 25 | + Route::any('/month_counts', [\App\Http\Controllers\Bside\BCom\ComController::class, 'month_counts'])->name('month_counts'); | ||
| 24 | //黑格数据 | 26 | //黑格数据 |
| 25 | Route::prefix('suppliers')->group(function () { | 27 | Route::prefix('suppliers')->group(function () { |
| 26 | Route::any('/recommendedPurchaser', [\App\Http\Controllers\Bside\Suppliers\SuppliersController::class, 'recommendedPurchaser'])->name('suppliers_recommendedPurchaser'); | 28 | Route::any('/recommendedPurchaser', [\App\Http\Controllers\Bside\Suppliers\SuppliersController::class, 'recommendedPurchaser'])->name('suppliers_recommendedPurchaser'); |
-
请 注册 或 登录 后发表评论