|
...
|
...
|
@@ -8,10 +8,12 @@ use App\Models\Project\Gsc; |
|
|
|
|
|
|
|
class GscLogic extends BaseLogic
|
|
|
|
{
|
|
|
|
|
|
|
|
public function __construct()
|
|
|
|
{
|
|
|
|
parent::__construct();
|
|
|
|
$this->model = new Gsc();
|
|
|
|
$this->param = $this->requestAll;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
...
|
...
|
@@ -23,6 +25,14 @@ class GscLogic extends BaseLogic |
|
|
|
*/
|
|
|
|
public function GscLists($map,$page,$row,$order = 'created_at',$files = ['*']){
|
|
|
|
$lists = $this->model->lists($map,$page,$row,$order,$files);
|
|
|
|
if(!empty($lists['list'])){
|
|
|
|
$domainInfoModel = new DomainInfo();
|
|
|
|
foreach ($lists['list'] as $k => $v){
|
|
|
|
$lists['list'][$k]['tal'] = $domainInfoModel->formatQuery(['gsc_id'=>$v['id']])->count();
|
|
|
|
$lists['list'][$k]['pub'] = $domainInfoModel->formatQuery(['gsc_id'=>$v['id']])->count();
|
|
|
|
$lists['list'][$k]['num'] = $lists['list'][$k]['tal'] - $lists['list'][$k]['pub'];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return $this->success($lists);
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -34,8 +44,43 @@ class GscLogic extends BaseLogic |
|
|
|
* @time :2023/6/19 15:56
|
|
|
|
*/
|
|
|
|
public function DomainLists($map,$page,$row,$order = 'created_at',$files = ['*']){
|
|
|
|
$domainModel = new DomainInfo();
|
|
|
|
$lists = $domainModel->lists($map,$page,$row,$order,$files);
|
|
|
|
$domainInfoModel = new DomainInfo();
|
|
|
|
$lists = $domainInfoModel->lists($map,$page,$row,$order,$files);
|
|
|
|
return $this->success($lists);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :更新账号列表
|
|
|
|
* @name :save
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/6/19 16:21
|
|
|
|
*/
|
|
|
|
public function GscSave(){
|
|
|
|
if(isset($this->param['id']) && !empty($this->param['id'])){
|
|
|
|
$rs = $this->model->edit($this->param,['id'=>$this->param['id']]);
|
|
|
|
}else{
|
|
|
|
$rs = $this->model->add($this->param);
|
|
|
|
}
|
|
|
|
if($rs === false){
|
|
|
|
$this->fail('error');
|
|
|
|
}
|
|
|
|
return $this->success();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :删除账号列表
|
|
|
|
* @name :del
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/6/19 16:31
|
|
|
|
*/
|
|
|
|
public function GscDel(){
|
|
|
|
$this->param['id'] = ['in',$this->param['id']];
|
|
|
|
$rs = $this->model->del($this->param);
|
|
|
|
if($rs === false){
|
|
|
|
$this->fail('error');
|
|
|
|
}
|
|
|
|
return $this->success();
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|