From 993185b9dc8f59196455b1d473296b35a71f8eb2 Mon Sep 17 00:00:00 2001 From: zyx0814 Date: Fri, 25 Feb 2022 14:59:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dzz/billfish/class/class_billfishexport.php | 22 ++++++++++++--------- dzz/billfish/classes/getpichomethumb.php | 2 +- dzz/pichome/share.php | 13 ++++-------- 3 files changed, 18 insertions(+), 19 deletions(-) diff --git a/dzz/billfish/class/class_billfishexport.php b/dzz/billfish/class/class_billfishexport.php index e39edb0..7d89a68 100644 --- a/dzz/billfish/class/class_billfishexport.php +++ b/dzz/billfish/class/class_billfishexport.php @@ -103,7 +103,8 @@ public function initExport() } //查询待导入文件数 - $sql = "select count(f.id) as num from bf_file f left join bf_material m on f.id = m.file_id where m.is_recycle =0 "; + // $sql = "select count(f.id) as num from bf_file f left join bf_material m on f.id = m.file_id where m.is_recycle =0 "; + $sql = "select count(id) as num from bf_file where 1"; $data = $this->fetch($sql); $this->filenum = $data['num']; }else{ @@ -118,11 +119,11 @@ public function initExport() } //查询待导入文件数 - $sql = "select count(s.id) as num from source s left join res_prop rp on s.id = rp.iid where rp.action =0 "; + //$sql = "select count(s.id) as num from source s left join res_prop rp on s.id = rp.iid where rp.action =0 "; + $sql = "select count(id) as num from source where 1 "; $data = $this->fetch($sql); $this->filenum = $data['num']; } - //如果没有数据,视为导入成功 if (!$this->filenum) { C::t('pichome_vapp')->update($this->appid, array('state' => 4)); @@ -399,11 +400,13 @@ public function export($force = false){ } //记录导入起始位置,以备中断后从此处,更改导入状态 C::t('pichome_vapp')->update($this->appid, array('percent' => $percent, 'donum' => $this->donum, 'state' => $state)); + + } + if($state == 2){ + $lastid = $lastid+1; + C::t('pichome_vapp')->update($this->appid,array('lastid' => $lastid)); } - $time4= microtime(true); - $lastid = $lastid+1; - C::t('pichome_vapp')->update($this->appid,array('lastid' => $lastid)); return array('success' => true); } public function oldexport($force = false){ @@ -641,10 +644,10 @@ public function oldexport($force = false){ if ($state == 3) { $lastid = 0; } + //记录导入起始位置,以备中断后从此处,更改导入状态 C::t('pichome_vapp')->update($this->appid, array('percent' => $percent, 'donum' => $this->donum, 'state' => $state)); } - $time4= microtime(true); $lastid = $lastid+1; C::t('pichome_vapp')->update($this->appid,array('lastid' => $lastid)); @@ -727,11 +730,12 @@ public function check_file($total) foreach ($data as $v) { $rid = $v['rid']; $iid = DB::result_first("select bid from %t where rid = %s and appid = %s",array('billfish_record',$rid,$this->appid)); + if($this->version < 30){ - $sql = "select count(*) as num from source where id = $iid"; + $sql = "select count(s.id) as numsource s left join res_prop rp on s.id = rp.iid where rp.action =0 and s.id = $iid"; }else{ //查询billfish中是否有该数据 - $sql = "select count(*) as num from bf_file where id = $iid"; + $sql = "select count(f.id) as num from bf_file f left join bf_material m on f.id = m.file_id where m.is_recycle =0 and f.id = $iid"; } $numdata = $this->fetch($sql); diff --git a/dzz/billfish/classes/getpichomethumb.php b/dzz/billfish/classes/getpichomethumb.php index c1f424c..a623f2c 100644 --- a/dzz/billfish/classes/getpichomethumb.php +++ b/dzz/billfish/classes/getpichomethumb.php @@ -12,7 +12,7 @@ class getpichomethumb public function run(&$data) { $thumbid = DB::result_first("select thumb from %t where appid = %s and rid = %s", array('billfish_record', $data['appid'], $data['rid'])); - if(isset($data['version']) && $data['version'] > 16){ + if(isset($data['version']) && $data['version'] >=30){ $bid = DB::result_first("select bid from %t where rid = %s",array('billfish_record',$data['rid'])); $thumbdir = dechex($bid); $thumbdir = (string) $thumbdir; diff --git a/dzz/pichome/share.php b/dzz/pichome/share.php index 26aefb9..aa87241 100644 --- a/dzz/pichome/share.php +++ b/dzz/pichome/share.php @@ -4,9 +4,9 @@ } $sid = isset($_GET['sid']) ? dzzdecode($_GET['sid'],'',0):''; -$sharedata = C::t('pichome_share')->fetch_by_idandtype($sid); +$sharedata = C::t('pichome_share')->fetch_by_id($sid); $resourcesdata = $sharedata['resourcesdata']; -$resourcesdata['share'] = 0; + $colors = array(); foreach($resourcesdata['colors'] as $cval){ $colors[] = $cval; @@ -26,11 +26,6 @@ $foldernames[] = $fval; } $resourcesdata['foldernames'] = json_encode($foldernames); -$theme = GetThemeColor(); -$ismobile = helper_browser::ismobile(); -if (($ismobile)) { - include template('mobile/page/share'); -} else { - include template('pc/page/share'); -} +$theme = GetThemeColor(); +include template('pc/page/share'); \ No newline at end of file