|
...
|
...
|
@@ -38,6 +38,8 @@ use App\Models\Purchaser\PurchaserInfo; |
|
|
|
use App\Models\RouteMap\RouteMap;
|
|
|
|
use App\Models\Template\BCustomTemplate;
|
|
|
|
use App\Models\Template\BTemplateCom;
|
|
|
|
use App\Models\Template\Setting;
|
|
|
|
use App\Models\Template\Template;
|
|
|
|
use App\Services\AmazonS3Service;
|
|
|
|
use App\Services\ProjectServer;
|
|
|
|
use App\Utils\EncryptUtils;
|
|
...
|
...
|
@@ -65,15 +67,33 @@ class Demo extends Command |
|
|
|
|
|
|
|
public function handle(){
|
|
|
|
|
|
|
|
echo date('Y-m-d H:i:s') . 'project_id:' . PHP_EOL;
|
|
|
|
ProjectServer::useProject(2837);
|
|
|
|
$this->ceshi();
|
|
|
|
DB::disconnect('custom_mysql');
|
|
|
|
|
|
|
|
// echo date('Y-m-d H:i:s') . 'project_id:' . PHP_EOL;
|
|
|
|
// ProjectServer::useProject(2837);
|
|
|
|
// $this->ceshi();
|
|
|
|
// DB::disconnect('custom_mysql');
|
|
|
|
$this->countTemplate();
|
|
|
|
echo date('Y-m-d H:i:s') . 'end' . PHP_EOL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :统计当前模版使用情况
|
|
|
|
* @name :countTemplate
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2025/1/9 10:59
|
|
|
|
*/
|
|
|
|
public function countTemplate(){
|
|
|
|
$bSettingModel = new Setting();
|
|
|
|
$lists = $bSettingModel->list();
|
|
|
|
$templateModel = new Template();
|
|
|
|
foreach ($lists as $v){
|
|
|
|
echo date('Y-m-d H:i:s') . '执行的模版id:' .$v['template_id'] . PHP_EOL;
|
|
|
|
$templateModel->where(['id'=>$v['template_id']])->increment('total',1);
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :更新产品
|
|
|
|
* @name :getProduct
|
|
|
|
* @author :lyh
|
...
|
...
|
|