作者 Your Name
... ... @@ -44,9 +44,9 @@ class ShareUser extends Command
//获取所有ayr_share用户
$ayr_share_model = new AyrShareModel();
$ayr_release = new AyrReleaseModel();
$ayr_share_list = $ayr_share_model->list(['profile_key'=>['!=','']]);
$ayr_share_list = $ayr_share_model->list(['profile_key'=>['!=',''],'project_id'=>410]);
foreach ($ayr_share_list as $v){
$time = Carbon::now()->modify('-7 days')->toDateString();
$time = Carbon::now()->modify('-1 days')->toDateString();
//创建时间小于7天前的当前时间
if($v['created_at'] > $time){
continue;
... ...
... ... @@ -47,7 +47,7 @@ class HtmlCollect extends Command
public function handle()
{
ini_set('memory_limit', '512M');
ini_set('memory_limit', '1024M');
while (true) {
$this->start_collect();
}
... ... @@ -442,7 +442,12 @@ class HtmlCollect extends Command
foreach ($source as $vs) {
if ($vs['download']) {
$new_source = CosService::uploadRemote($project_id, 'source', $vs['url_complete']);
if ($project_id == 1355 && in_array(substr($vs['url_complete'], -3), ['pdf', 'zip', 'rar', '.gz'])) {
//项目id为1355的项目,可下载类资源要保持原名称,做特殊处理
$new_source = CosService::uploadRemote($project_id, 'source', $vs['url_complete'], '', '', 1);
} else {
$new_source = CosService::uploadRemote($project_id, 'source', $vs['url_complete']);
}
if ($new_source) {
CollectSource::insert([
'project_id' => $project_id,
... ...
... ... @@ -29,6 +29,7 @@ class Kernel extends ConsoleKernel
$schedule->command('inquiry_delay')->everyMinute()->withoutOverlapping(1);//TODO::上线放开,转发询盘,每分钟执行一次
$schedule->command('inquiry_count')->dailyAt('01:00')->withoutOverlapping(1); // 询盘统计数据,每天凌晨执行一次
// $schedule->command('domain_info')->dailyAt('01:20')->withoutOverlapping(1);// 更新域名|证书结束时间,每天凌晨1点执行一次
$schedule->command('share_user')->dailyAt('01:20')->withoutOverlapping(1);// 每天凌晨1点执行一次
$schedule->command('last_inquiry')->dailyAt('04:00')->withoutOverlapping(1);// 最近一次询盘信息
$schedule->command('update_seo_tdk_crontab')->dailyAt('20:00')->withoutOverlapping(1); //更新上线项目TDK
$schedule->command('sync_manager')->dailyAt('01:00')->withoutOverlapping(1); //TODO::手机号码同步 每天执行一次
... ...
... ... @@ -64,18 +64,13 @@ class AyrShareController extends BaseController
$str = json_encode($share_info['activeSocialAccounts']);
if($str != $info['bind_platforms']){
$ayrShareLogic->ayr_share_edit(['bind_platforms'=>$str],$this->param['id']);
$res = true;
}else{
$res = false;
}
}else{
if(!empty($info['bind_platforms'])){
$ayrShareLogic->ayr_share_edit(['bind_platforms'=>''],$this->param['id']);
return true;
}
$res = false;
}
$this->response('success',Code::SUCCESS,['is_true'=>$res]);
$this->response('success',Code::SUCCESS,$share_info['activeSocialAccounts'] ?? []);
}
/**
* @name :(创建ayr_share账户)create_account
... ...
... ... @@ -13,6 +13,7 @@ use App\Http\Logic\Aside\BaseLogic;
use App\Models\CustomModule\CustomModule;
use App\Models\CustomModule\CustomModuleCategory;
use App\Models\CustomModule\CustomModuleContent;
use App\Models\RouteMap\RouteMap;
use App\Services\ProjectServer;
use Illuminate\Support\Facades\DB;
... ... @@ -84,9 +85,16 @@ class CustomModuleLogic extends BaseLogic
* @time :2023/12/5 9:39
*/
public function moduleAdd(){
$rs = (new CustomModule())->add($this->param);
if($rs === false){
$this->fail('系统错误,请联系管理员');
$id = (new CustomModule())->addReturnId($this->param);
if($id){
//同时创建对应route的分类
$customModuleCateModel = new CustomModuleCategory();
$data = [
'name'=>$this->param['route'],
'module_id'=>$id,
'route'=>RouteMap::setRoute($this->param['route'],RouteMap::SOURCE_MODULE_CATE,$id,$this->param['project_id'])
];
$customModuleCateModel->add($data);
}
return $this->success();
}
... ...
... ... @@ -68,6 +68,9 @@ class CustomTemplateLogic extends BaseLogic
if(($this->project['deploy_build']['is_search'] == 0) && ($this->param['url'] == 'search')){
$this->fail('请先开启搜索页可视化');
}
if(($this->project['deploy_build']['is_keyword'] == 0) && ($this->param['url'] == 'keyword')){
$this->fail('请先开启聚合页可视化');
}
if(isset($this->param['id']) && !empty($this->param['id'])){
$id = $this->param['id'];
$is_upgrade = $this->param['is_upgrade'] ?? 0;//1:5.0数据 0:6.0
... ...
... ... @@ -316,7 +316,7 @@ class TranslateLogic extends BaseLogic
if(strtolower($route) == 'all'){
return $this->success($data);
}
if($route == 'index'){
if($route == 'index' || $route == '/'){
$data['source'] = 1;
return $this->success($data);
}
... ...