作者 刘锟

Merge remote-tracking branch 'origin/master' into akun

... ... @@ -82,7 +82,7 @@ class VideoTask extends Command
if ($sub_task_num <= 0){
break;
}
$task_project = KeywordVideoTask::where(['status' => KeywordVideoTask::STATUS_OPEN])->orderBy('sort', 'desc')->first();
$task_project = KeywordVideoTask::where(['status' => KeywordVideoTask::STATUS_OPEN])->orderBy('sort', 'desc')->orderBy('id', 'desc')->first();
if (empty($task_project)){
break;
}
... ...
... ... @@ -55,7 +55,7 @@ class UpdateRoute extends Command
*/
public function handle(){
$projectModel = new Project();
$list = $projectModel->list(['id'=>645]);
$list = $projectModel->list(['id'=>1091]);
$data = [];
foreach ($list as $v){
echo date('Y-m-d H:i:s') . 'project_id:'.$v['id'] . PHP_EOL;
... ...
... ... @@ -92,13 +92,19 @@ class KeywordVideoController extends BaseController
'project_id.required' => '项目唯一标识不为空',
'number.required' => 'number不为空',
]);
//查看当前项目是否已添加
$keywordModel = new KeywordVideoTask();
$keywordInfo = $keywordModel->read(['project_id'=>$this->param['project_id']]);
if($keywordInfo !== false){
$this->response('当前项目已添加');
}
//查看当前项目是否有正式域名
$domainModel = new DomainInfo();
$info = $domainModel->read(['project_id'=>$this->param['project_id']]);
if($info === false){
$this->response('请先设置域名',Code::SYSTEM_ERROR);
}
$keywordModel = new KeywordVideoTask();
$rs = $keywordModel->add($this->param);
if($rs === false){
$this->response('添加失败',Code::SYSTEM_ERROR);
... ...
... ... @@ -9,6 +9,7 @@ use App\Http\Logic\Logic;
use App\Models\Com\UpdateNotify;
use App\Models\Project\Project;
use App\Models\RouteMap\RouteDelete;
use App\Models\Service\Service;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Str;
... ... @@ -173,7 +174,7 @@ class BaseLogic extends Logic
$data['project_id'] = $this->user['project_id'];
$str = http_build_query($data);
$url = $this->user['domain'].'api/delHtml/?'.$str;
if($this->user['project_id'] == 672){//TODO::当前项目通知不过 ,跳过自动更新
if(isset($this->project['serve_id']) && ($this->project['serve_id'] == 3)){//TODO::当前项目通知不过 ,跳过自动更新
exec('curl -k "'.$url.'" > /dev/null 2>&1 &');
}else{
shell_exec('curl -k "'.$url.'"');
... ...
... ... @@ -4,6 +4,7 @@ namespace App\Http\Logic\Bside\HomeCount;
use App\Http\Logic\Bside\BaseLogic;
use App\Models\RouteMap\RouteMap;
use App\Models\Visit\Visit;
use App\Models\Visit\VisitItem;
use App\Models\HomeCount\Count;
... ... @@ -116,7 +117,7 @@ class CountLogic extends BaseLogic
public function with_data_count(){
$product_count = (new Product())->where(['project_id' => $this->user['project_id']])->count();
$news_count = (new News())->where(['project_id' => $this->user['project_id']])->count();
$page_count = (new BTemplate())->where(['project_id' => $this->user['project_id']])->count();
$page_count = (new RouteMap())->where(['project_id' => $this->user['project_id']])->count();
$data = [
'product_count' => $product_count,
'news_count' => $news_count,
... ...
... ... @@ -77,7 +77,7 @@ class UserLogic extends BaseLogic
}
$this->param['type'] = 1;
$this->param['operator_id'] = $this->user['id'];
if(isset($this->param['password']) && empty($this->param['password'])){
if(isset($this->param['password']) && !empty($this->param['password'])){
$this->param['password'] = base64_encode(md5($this->param['password']));
}
$rs = $this->model->edit($this->param,['id'=>$this->param['id']]);
... ...