大更新,1投稿系统参考文献的类型增加功能,,,2官网数据库功能
This commit is contained in:
@@ -107,7 +107,7 @@ class Journal extends Controller
|
||||
}
|
||||
|
||||
//新增查询信息journalAbs chengxiaoling 20250928 start
|
||||
$abs = $this->journal_abs_obj->where('journal_id', $v['journal_id'])->where('state', 0)->order('sort')->select();
|
||||
$abs = $this->journal_abs_obj->where('journal_id', $v['journal_id'])->where('state', 0)->whereRaw('(is_show IS NULL OR is_show <> 0)')->order('sort')->select();
|
||||
$res[$k]['journalAbs'] = $abs;
|
||||
|
||||
//查询期刊编委
|
||||
@@ -161,7 +161,7 @@ class Journal extends Controller
|
||||
$journal_info = $this->journal_obj->where('journal_id', $data['journal_id'])->find();
|
||||
$rearr = $journal_info['relate'] == '' ? [] : explode(',', $journal_info['relate']);
|
||||
$relatelist = $this->journal_obj->where('journal_id', 'in', $rearr)->where('state', 0)->select();
|
||||
$absList = $this->journal_abs_obj->where('journal_id', $data['journal_id'])->where('state', 0)->order('sort')->select();
|
||||
$absList = $this->journal_abs_obj->where('journal_id', $data['journal_id'])->where('state', 0)->whereRaw('(is_show IS NULL OR is_show <> 0)')->order('sort')->select();
|
||||
$stageList = $this->journal_stage_obj->where('journal_id', $data['journal_id'])->where('is_publish', 1)->where('state', 0)->order('stage_year desc,stage_no desc')->select();
|
||||
|
||||
//获取期刊主编辑 chengxiaoling start 20250626
|
||||
@@ -498,7 +498,7 @@ class Journal extends Controller
|
||||
->select();
|
||||
|
||||
foreach ($list as $k => $v) {
|
||||
$abs = $this->journal_abs_obj->where('journal_id', $v['journal_id'])->where('state', 0)->order('sort')->limit(4)->select();
|
||||
$abs = $this->journal_abs_obj->where('journal_id', $v['journal_id'])->where('state', 0)->whereRaw('(is_show IS NULL OR is_show <> 0)')->order('sort')->limit(4)->select();
|
||||
$list[$k]['abs'] = $abs;
|
||||
}
|
||||
|
||||
@@ -555,7 +555,7 @@ class Journal extends Controller
|
||||
}
|
||||
//获取期刊主编辑 chengxiaoling end 20251210
|
||||
foreach ($list as $k => $v) {
|
||||
$abs = $this->journal_abs_obj->where('journal_id', $v['journal_id'])->where('state', 0)->order('sort')->limit(4)->select();
|
||||
$abs = $this->journal_abs_obj->where('journal_id', $v['journal_id'])->where('state', 0)->whereRaw('(is_show IS NULL OR is_show <> 0)')->order('sort')->limit(4)->select();
|
||||
$list[$k]['abs'] = $abs;
|
||||
//获取期刊主编辑 chengxiaoling start 20251210
|
||||
$sIssn = empty($v['issn']) ? '' : $v['issn'];
|
||||
|
||||
37
application/api/job/dbpush.php
Normal file
37
application/api/job/dbpush.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace app\api\job;
|
||||
|
||||
use think\queue\Job;
|
||||
use app\master\service\DbPushManager;
|
||||
|
||||
/**
|
||||
* 数据库收录推送 - 异步队列任务
|
||||
* 队列名:dbpush
|
||||
*/
|
||||
class dbpush
|
||||
{
|
||||
public function handle(Job $job, $data)
|
||||
{
|
||||
$manager = new DbPushManager();
|
||||
$ok = $manager->executeAndLog(
|
||||
$data['log_id'],
|
||||
$data['stage_id'],
|
||||
$data['pusher'],
|
||||
isset($data['options']) ? $data['options'] : []
|
||||
);
|
||||
|
||||
if ($ok) {
|
||||
$job->delete();
|
||||
return;
|
||||
}
|
||||
|
||||
// 失败重试
|
||||
$max = (int) config('dbpush.max_attempt');
|
||||
if ($job->attempts() >= $max) {
|
||||
$job->delete();
|
||||
} else {
|
||||
$job->release(30); // 30 秒后重试
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,11 +8,12 @@ class mysftp {
|
||||
|
||||
public function push(Job $job, $data){
|
||||
$job->delete();
|
||||
//链接sftp服务器
|
||||
$config['host'] = 'ftp.portico.org';
|
||||
$config['port'] = 22;
|
||||
$config['username'] = "TMR";
|
||||
$config['password'] = "h6EHD8";
|
||||
//链接sftp服务器(凭证走 dbpush 配置,历史值兜底)
|
||||
$cred = config('dbpush.credentials.portico');
|
||||
$config['host'] = isset($cred['host']) ? $cred['host'] : 'ftp.portico.org';
|
||||
$config['port'] = isset($cred['port']) ? $cred['port'] : 22;
|
||||
$config['username'] = isset($cred['user']) ? $cred['user'] : "TMR";
|
||||
$config['password'] = isset($cred['pass']) ? $cred['pass'] : "h6EHD8";
|
||||
$sftp_obj = new Sftp($config);
|
||||
$sftp_obj->upftp($data['local'],$data['remote']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user