inquiry
This commit is contained in:
@@ -12,3 +12,5 @@
|
||||
/windows.php
|
||||
/bootstrap.php
|
||||
/composer.lock
|
||||
.env_copy
|
||||
/public/excel
|
||||
+24
-8
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace app\inquery\command;
|
||||
namespace app\command;
|
||||
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
@@ -13,9 +13,9 @@ use Webman\RedisQueue\Redis as RedisQueueRedis;
|
||||
/**
|
||||
* 轮询分配 inquiry_log 里的询盘给业务员,并推送到 CRM 队列
|
||||
*/
|
||||
class AssignInquiryCommand extends Command
|
||||
class InquiryAssignInquiryCommand extends Command
|
||||
{
|
||||
protected static $defaultName = 'assign-inquiry';
|
||||
protected static $defaultName = 'iq-assign';
|
||||
protected static $defaultDescription = '轮询分配询盘给业务员,并推送到 CRM 队列';
|
||||
|
||||
/**
|
||||
@@ -23,9 +23,25 @@ class AssignInquiryCommand extends Command
|
||||
* 比如:销售1=186,销售2=233...
|
||||
*/
|
||||
protected const SALES_USER_IDS = [
|
||||
1,
|
||||
74,
|
||||
78,
|
||||
63,
|
||||
64,
|
||||
67,
|
||||
93,
|
||||
108,
|
||||
132,
|
||||
143,
|
||||
145,
|
||||
157,
|
||||
160,
|
||||
168,
|
||||
172,
|
||||
173,
|
||||
191,
|
||||
193,
|
||||
194,
|
||||
195,
|
||||
196,
|
||||
197
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -36,7 +52,7 @@ class AssignInquiryCommand extends Command
|
||||
/**
|
||||
* 每次脚本最多分配多少条
|
||||
*/
|
||||
protected const BATCH_LIMIT = 100;
|
||||
protected const BATCH_LIMIT = 10;
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output): int
|
||||
{
|
||||
@@ -72,7 +88,7 @@ class AssignInquiryCommand extends Command
|
||||
|
||||
foreach ($inquiries as $row) {
|
||||
$inquiryId = (int)$row->id;
|
||||
|
||||
sleep(1);
|
||||
// 轮询取出一个业务员 ID
|
||||
$recipientUserId = $this->nextRecipientId($userIds, static::ROUND_ROBIN_GROUP_KEY);
|
||||
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace app\inquery\command;
|
||||
namespace app\command;
|
||||
|
||||
use app\inquery\utils\PhoneCountryHelper;
|
||||
use app\inquiry\utils\PhoneCountryHelper;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
@@ -11,9 +11,9 @@ use support\Db;
|
||||
/**
|
||||
* 将 fb_leads 数据清洗后导入 inquiry_log
|
||||
*/
|
||||
class FbLeadToInquiryCommand extends Command
|
||||
class InquiryFbLeadCommand extends Command
|
||||
{
|
||||
protected static $defaultName = 'fb-to-inquiry';
|
||||
protected static $defaultName = 'iq-fb-to';
|
||||
protected static $defaultDescription = '将 fb_leads 数据清洗后导入 inquiry_log';
|
||||
|
||||
// 这些常量根据你实际业务改
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace app\inquery\command;
|
||||
namespace app\command;
|
||||
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
@@ -8,12 +8,12 @@ use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use support\Db;
|
||||
use PhpOffice\PhpSpreadsheet\IOFactory;
|
||||
use app\inquery\utils\FbLeadHeaderMapper;
|
||||
use app\inquiry\utils\FbLeadHeaderMapper;
|
||||
use support\exception\BusinessException;
|
||||
|
||||
class ImportFbCommand extends Command
|
||||
class InquiryImportFbCommand extends Command
|
||||
{
|
||||
protected static $defaultName = 'import-fb';
|
||||
protected static $defaultName = 'iq-fb';
|
||||
protected static $defaultDescription = '导入 Facebook Leads Excel 数据';
|
||||
|
||||
protected function configure(): void
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace app\inquery\utils;
|
||||
namespace app\inquiry\utils;
|
||||
|
||||
use support\exception\BusinessException;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace app\inquery\utils;
|
||||
namespace app\inquiry\utils;
|
||||
|
||||
use support\Db;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace app\inquery\utils;
|
||||
namespace app\inquiry\utils;
|
||||
|
||||
use support\Redis;
|
||||
use support\exception\BusinessException;
|
||||
|
||||
+2
-1
@@ -48,7 +48,8 @@
|
||||
"webman/gateway-worker": "^1.0",
|
||||
"mpdf/mpdf": "^8.2",
|
||||
"jaeger/querylist": "^4.4",
|
||||
"zoujingli/ip2region": "^3.0"
|
||||
"zoujingli/ip2region": "^3.0",
|
||||
"webman/log": "^2.1"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-event": "For better performance. "
|
||||
|
||||
Generated
+403
-308
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
return [
|
||||
'enable' => true,
|
||||
'exception' => [
|
||||
// 是否记录异常到日志
|
||||
'enable' => true,
|
||||
// 不会记录到日志的异常类
|
||||
'dontReport' => [
|
||||
support\exception\BusinessException::class
|
||||
]
|
||||
],
|
||||
'dontReport' => [
|
||||
'app' => [],
|
||||
'controller' => [],
|
||||
'action' => [],
|
||||
'path' => []
|
||||
],
|
||||
'channel' => 'default' // 日志通道(在config/log.php里配置,默认是default)
|
||||
];
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
* This file is part of webman.
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the MIT-LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @author walkor<walkor@workerman.net>
|
||||
* @copyright walkor<walkor@workerman.net>
|
||||
* @link http://www.workerman.net/
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
use Webman\Log\Middleware;
|
||||
|
||||
return [
|
||||
'@' => [
|
||||
Middleware::class
|
||||
]
|
||||
];
|
||||
Reference in New Issue
Block a user