作者 Cool
1 个管道 的构建 通过 耗费 0 秒

文件分享判断优化

... ... @@ -114,6 +114,7 @@ class Index extends Frontend
$data = Db::name('savemes')
->where('id',$file_id)
->where('is_up',1)
->find();
if(!$data) {
$rotor = Db::name('rotor')
... ... @@ -122,6 +123,7 @@ class Index extends Frontend
if(!$rotor) $this->error('数据不存在');
$data = Db::name('savemes')
->where('id',$rotor['savemes_id'])
->where('is_up',1)
->find();
}
if($data['is_open'] == 2){
... ... @@ -312,6 +314,7 @@ class Index extends Frontend
$data = Db::name('savemes')
->where($where)
->where('type',$type)
->where('is_up',1)
->field('id,user_id,type,name,share_url,images,video,content,is_open,is_up,createtime')
->order('createtime desc')
->select();
... ... @@ -324,6 +327,7 @@ class Index extends Frontend
->join('savemes b','a.savemes_id = b.id')
->field('a.id,a.user_id as unloading_user_id,a.savemes_id,a.folder_id,b.user_id,b.share_url,b.name,b.type,b.images,b.video,b.content,b.is_open,b.is_up,a.createtime')
->where('b.type',$type)
->where('b.is_up',1)
->where($tiao)
->order('a.createtime desc')
->select();
... ...