|
@@ -2,6 +2,10 @@
|
|
|
|
|
|
|
|
namespace App\Console\Commands;
|
|
namespace App\Console\Commands;
|
|
|
|
|
|
|
|
|
|
+use Illuminate\Support\Facades\Log;
|
|
|
|
|
+
|
|
|
|
|
+use Carbon\Carbon;
|
|
|
|
|
+
|
|
|
use Illuminate\Support\Facades\Validator;
|
|
use Illuminate\Support\Facades\Validator;
|
|
|
use Illuminate\Console\Command;
|
|
use Illuminate\Console\Command;
|
|
|
use App\Models\Sentence;
|
|
use App\Models\Sentence;
|
|
@@ -13,6 +17,7 @@ use App\Models\Tag;
|
|
|
use App\Models\TagMap;
|
|
use App\Models\TagMap;
|
|
|
use App\Models\Channel;
|
|
use App\Models\Channel;
|
|
|
use App\Http\Api\MdRender;
|
|
use App\Http\Api\MdRender;
|
|
|
|
|
+use App\Services\PaliTextService;
|
|
|
|
|
|
|
|
class UpgradeProgressChapter extends Command
|
|
class UpgradeProgressChapter extends Command
|
|
|
{
|
|
{
|
|
@@ -21,7 +26,7 @@ class UpgradeProgressChapter extends Command
|
|
|
* php artisan upgrade:progress.chapter --book=168 --para=915 --channel=19f53a65-81db-4b7d-8144-ac33f1217d34
|
|
* php artisan upgrade:progress.chapter --book=168 --para=915 --channel=19f53a65-81db-4b7d-8144-ac33f1217d34
|
|
|
* @var string
|
|
* @var string
|
|
|
*/
|
|
*/
|
|
|
- protected $signature = 'upgrade:progress.chapter {--book=} {--para=} {--channel=} {--driver=str}';
|
|
|
|
|
|
|
+ protected $signature = 'upgrade:progress.chapter {--book=} {--para=} {--channel=} {--driver=str} {--resume}';
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* The console command description.
|
|
* The console command description.
|
|
@@ -30,6 +35,8 @@ class UpgradeProgressChapter extends Command
|
|
|
*/
|
|
*/
|
|
|
protected $description = '更新章节完成度,以channel为单位';
|
|
protected $description = '更新章节完成度,以channel为单位';
|
|
|
|
|
|
|
|
|
|
+ const COMPLETION_RATE = 0.9;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* Create a new command instance.
|
|
* Create a new command instance.
|
|
|
*
|
|
*
|
|
@@ -47,110 +54,118 @@ class UpgradeProgressChapter extends Command
|
|
|
*/
|
|
*/
|
|
|
public function handle()
|
|
public function handle()
|
|
|
{
|
|
{
|
|
|
- if(\App\Tools\Tools::isStop()){
|
|
|
|
|
|
|
+ if (\App\Tools\Tools::isStop()) {
|
|
|
return 0;
|
|
return 0;
|
|
|
}
|
|
}
|
|
|
- $this->info("upgrade:progresschapter start.");
|
|
|
|
|
- $startTime = time();
|
|
|
|
|
|
|
+ $paliTextService = app(PaliTextService::class);
|
|
|
|
|
+
|
|
|
|
|
+ $this->info("upgrade:progresschapter start.");
|
|
|
|
|
+ $startTime = time();
|
|
|
$book = $this->option('book');
|
|
$book = $this->option('book');
|
|
|
$para = $this->option('para');
|
|
$para = $this->option('para');
|
|
|
$channelId = $this->option('channel');
|
|
$channelId = $this->option('channel');
|
|
|
|
|
|
|
|
\App\Tools\Markdown::driver($this->option('driver'));
|
|
\App\Tools\Markdown::driver($this->option('driver'));
|
|
|
|
|
|
|
|
- $tagCount=0;
|
|
|
|
|
|
|
+ $tagCount = 0;
|
|
|
#第一步 查询有多少书有译文
|
|
#第一步 查询有多少书有译文
|
|
|
- if($book){
|
|
|
|
|
- $books = Sentence::where('book_id',$book)
|
|
|
|
|
- ->groupby('book_id')
|
|
|
|
|
- ->select('book_id')
|
|
|
|
|
- ->get();
|
|
|
|
|
- }else{
|
|
|
|
|
- $books = Sentence::where('strlen','>',0)
|
|
|
|
|
- ->where('book_id','<',1000)
|
|
|
|
|
- ->where('channel_uid','<>','')
|
|
|
|
|
|
|
+ if ($book) {
|
|
|
|
|
+ if ($this->option('resume')) {
|
|
|
|
|
+ $table = Sentence::whereBetween('book_id', [$book, 217]);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ $table = Sentence::where('book_id', $book);
|
|
|
|
|
+ }
|
|
|
|
|
+ $books = $table->groupby('book_id')
|
|
|
|
|
+ ->select('book_id')
|
|
|
|
|
+ ->get();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ $books = Sentence::where('strlen', '>', 0)
|
|
|
|
|
+ ->where('book_id', '<', 1000)
|
|
|
|
|
+ ->whereNotNull('channel_uid')
|
|
|
->groupby('book_id')
|
|
->groupby('book_id')
|
|
|
->select('book_id')
|
|
->select('book_id')
|
|
|
->get();
|
|
->get();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
- $bar = $this->output->createProgressBar(count($books));
|
|
|
|
|
|
|
+ $totalBook = count($books);
|
|
|
|
|
|
|
|
foreach ($books as $book) {
|
|
foreach ($books as $book) {
|
|
|
- if($para){
|
|
|
|
|
- $table = PaliText::where('book',$book->book_id)
|
|
|
|
|
- ->where('paragraph','<=',$para);
|
|
|
|
|
- }else{
|
|
|
|
|
- $table = PaliText::where('book',$book->book_id);
|
|
|
|
|
|
|
+ $this->info("{$book->book_id} start total {$totalBook}");
|
|
|
|
|
+ if ($para) {
|
|
|
|
|
+ $table = PaliText::where('book', $book->book_id)
|
|
|
|
|
+ ->where('paragraph', '<=', $para);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ $table = PaliText::where('book', $book->book_id);
|
|
|
}
|
|
}
|
|
|
- $chapters = $table->where('level','>',0)
|
|
|
|
|
- ->where('level','<',8)
|
|
|
|
|
- ->select('paragraph','chapter_strlen','chapter_len')
|
|
|
|
|
|
|
+ $chapters = $table->where('level', '>', 0)
|
|
|
|
|
+ ->where('level', '<', 8)
|
|
|
|
|
+ ->select('paragraph', 'chapter_strlen', 'chapter_len')
|
|
|
->get();
|
|
->get();
|
|
|
|
|
|
|
|
foreach ($chapters as $key => $chapter) {
|
|
foreach ($chapters as $key => $chapter) {
|
|
|
# code...
|
|
# code...
|
|
|
- $chapter_strlen = PaliSentence::where('book',$book->book_id)
|
|
|
|
|
- ->whereBetween('paragraph',[$chapter->paragraph,$chapter->paragraph+$chapter->chapter_len-1])
|
|
|
|
|
- ->sum('length');
|
|
|
|
|
- if($chapter_strlen == 0){
|
|
|
|
|
- $this->error('chapter_strlen is 0 book:'.$book->book_id.' paragraph:'.$chapter->paragraph.'-'.($chapter->paragraph+$chapter->chapter_len-1));
|
|
|
|
|
|
|
+ $chapter_strlen = PaliSentence::where('book', $book->book_id)
|
|
|
|
|
+ ->whereBetween('paragraph', [$chapter->paragraph, $chapter->paragraph + $chapter->chapter_len - 1])
|
|
|
|
|
+ ->sum('length');
|
|
|
|
|
+ if ($chapter_strlen == 0) {
|
|
|
|
|
+ $this->error('chapter_strlen is 0 book:' . $book->book_id . ' paragraph:' . $chapter->paragraph . '-' . ($chapter->paragraph + $chapter->chapter_len - 1));
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
|
- $table = Progress::where('book',$book->book_id)
|
|
|
|
|
- ->whereBetween('para',[$chapter->paragraph,$chapter->paragraph+$chapter->chapter_len-1]);
|
|
|
|
|
- if($channelId){
|
|
|
|
|
- $table->where('channel_id',$channelId);
|
|
|
|
|
|
|
+ $table = Progress::where('book', $book->book_id)
|
|
|
|
|
+ ->whereBetween('para', [$chapter->paragraph, $chapter->paragraph + $chapter->chapter_len - 1]);
|
|
|
|
|
+ if ($channelId) {
|
|
|
|
|
+ $table->where('channel_id', $channelId);
|
|
|
}
|
|
}
|
|
|
$strlen = $table->groupby('channel_id')
|
|
$strlen = $table->groupby('channel_id')
|
|
|
- ->selectRaw('channel_id, sum(all_strlen) as cp_len')
|
|
|
|
|
- ->get();
|
|
|
|
|
|
|
+ ->selectRaw('channel_id, sum(all_strlen) as cp_len')
|
|
|
|
|
+ ->get();
|
|
|
foreach ($strlen as $final) {
|
|
foreach ($strlen as $final) {
|
|
|
# code...
|
|
# code...
|
|
|
# 计算此段落完成时间
|
|
# 计算此段落完成时间
|
|
|
- $finalAt = Progress::where('book',$book->book_id)
|
|
|
|
|
- ->whereBetween('para',[$chapter->paragraph,$chapter->paragraph+$chapter->chapter_len-1])
|
|
|
|
|
- ->where('channel_id',$final->channel_id)
|
|
|
|
|
- ->max('created_at');
|
|
|
|
|
- $updateAt = Progress::where('book',$book->book_id)
|
|
|
|
|
- ->whereBetween('para',[$chapter->paragraph,$chapter->paragraph+$chapter->chapter_len-1])
|
|
|
|
|
- ->where('channel_id',$final->channel_id)
|
|
|
|
|
- ->max('updated_at');
|
|
|
|
|
- $transTexts = Sentence::where('book_id',$book->book_id)
|
|
|
|
|
- ->whereBetween('paragraph',[$chapter->paragraph+1,$chapter->paragraph+$chapter->chapter_len-1])
|
|
|
|
|
- ->where('channel_uid',$final->channel_id)
|
|
|
|
|
- ->select('content')
|
|
|
|
|
- ->orderBy('paragraph')
|
|
|
|
|
- ->orderBy('word_start')
|
|
|
|
|
- ->get();
|
|
|
|
|
-
|
|
|
|
|
- $mdRender = new MdRender(['format'=>'simple']);
|
|
|
|
|
|
|
+ $finalAt = Progress::where('book', $book->book_id)
|
|
|
|
|
+ ->whereBetween('para', [$chapter->paragraph, $chapter->paragraph + $chapter->chapter_len - 1])
|
|
|
|
|
+ ->where('channel_id', $final->channel_id)
|
|
|
|
|
+ ->max('created_at');
|
|
|
|
|
+ $updateAt = Progress::where('book', $book->book_id)
|
|
|
|
|
+ ->whereBetween('para', [$chapter->paragraph, $chapter->paragraph + $chapter->chapter_len - 1])
|
|
|
|
|
+ ->where('channel_id', $final->channel_id)
|
|
|
|
|
+ ->max('updated_at');
|
|
|
|
|
+ $transTexts = Sentence::where('book_id', $book->book_id)
|
|
|
|
|
+ ->whereBetween('paragraph', [$chapter->paragraph + 1, $chapter->paragraph + $chapter->chapter_len - 1])
|
|
|
|
|
+ ->where('channel_uid', $final->channel_id)
|
|
|
|
|
+ ->select('content')
|
|
|
|
|
+ ->orderBy('paragraph')
|
|
|
|
|
+ ->orderBy('word_start')
|
|
|
|
|
+ ->get();
|
|
|
|
|
+
|
|
|
|
|
+ $mdRender = new MdRender(['format' => 'simple']);
|
|
|
|
|
|
|
|
#查询标题
|
|
#查询标题
|
|
|
- $title = Sentence::where('book_id',$book->book_id)
|
|
|
|
|
- ->where('paragraph',$chapter->paragraph)
|
|
|
|
|
- ->where('channel_uid',$final->channel_id)
|
|
|
|
|
- ->value('content');
|
|
|
|
|
- $title = $mdRender->convert($title,[$final->channel_id]);
|
|
|
|
|
|
|
+ $title = Sentence::where('book_id', $book->book_id)
|
|
|
|
|
+ ->where('paragraph', $chapter->paragraph)
|
|
|
|
|
+ ->where('channel_uid', $final->channel_id)
|
|
|
|
|
+ ->value('content');
|
|
|
|
|
+ $title = $mdRender->convert($title, [$final->channel_id]);
|
|
|
|
|
|
|
|
$summaryText = "";
|
|
$summaryText = "";
|
|
|
foreach ($transTexts as $text) {
|
|
foreach ($transTexts as $text) {
|
|
|
# code...
|
|
# code...
|
|
|
- $textContent = $mdRender->convert($text->content,[$final->channel_id]);
|
|
|
|
|
- $summaryText .= str_replace("\n","",$textContent);
|
|
|
|
|
- if(mb_strlen($summaryText,"UTF-8")>255){
|
|
|
|
|
|
|
+ $textContent = $mdRender->convert($text->content, [$final->channel_id]);
|
|
|
|
|
+ $summaryText .= str_replace("\n", "", $textContent);
|
|
|
|
|
+ if (mb_strlen($summaryText, "UTF-8") > 255) {
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//查询语言
|
|
//查询语言
|
|
|
- $channelLang = Channel::where('uid',$final->channel_id)->value('lang');
|
|
|
|
|
- $lang = explode('-',$channelLang)[0];
|
|
|
|
|
|
|
+ $channelLang = Channel::where('uid', $final->channel_id)->value('lang');
|
|
|
|
|
+ $lang = explode('-', $channelLang)[0];
|
|
|
$attributes = [
|
|
$attributes = [
|
|
|
- 'book'=>$book->book_id,
|
|
|
|
|
- 'para'=>$chapter->paragraph,
|
|
|
|
|
- 'channel_id'=>$final->channel_id];
|
|
|
|
|
|
|
+ 'book' => $book->book_id,
|
|
|
|
|
+ 'para' => $chapter->paragraph,
|
|
|
|
|
+ 'channel_id' => $final->channel_id
|
|
|
|
|
+ ];
|
|
|
|
|
|
|
|
$rules = array(
|
|
$rules = array(
|
|
|
'book' => 'integer',
|
|
'book' => 'integer',
|
|
@@ -163,78 +178,129 @@ class UpgradeProgressChapter extends Command
|
|
|
$this->error("Validator is fails");
|
|
$this->error("Validator is fails");
|
|
|
return 0;
|
|
return 0;
|
|
|
}
|
|
}
|
|
|
- if(ProgressChapter::where($attributes)->exists()){
|
|
|
|
|
|
|
+ if (ProgressChapter::where($attributes)->exists()) {
|
|
|
$chapterData = ProgressChapter::where($attributes)->first();
|
|
$chapterData = ProgressChapter::where($attributes)->first();
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
$chapterData = new ProgressChapter;
|
|
$chapterData = new ProgressChapter;
|
|
|
$chapterData->book = $attributes["book"];
|
|
$chapterData->book = $attributes["book"];
|
|
|
$chapterData->para = $attributes["para"];
|
|
$chapterData->para = $attributes["para"];
|
|
|
$chapterData->channel_id = $attributes["channel_id"];
|
|
$chapterData->channel_id = $attributes["channel_id"];
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+ $progress = $final->cp_len / $chapter_strlen;
|
|
|
|
|
+ $addChapter = false;
|
|
|
|
|
+ if ($progress >= self::COMPLETION_RATE) {
|
|
|
|
|
+ if (empty($chapterData->completed_at)) {
|
|
|
|
|
+ // 添加新的章节了
|
|
|
|
|
+ $chapterData->completed_at = $finalAt;
|
|
|
|
|
+ $addChapter = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
$chapterData->lang = $lang;
|
|
$chapterData->lang = $lang;
|
|
|
- $chapterData->all_trans = $final->cp_len/$chapter_strlen;
|
|
|
|
|
- $chapterData->public = $final->cp_len/$chapter_strlen;
|
|
|
|
|
- $chapterData->progress = $final->cp_len/$chapter_strlen;
|
|
|
|
|
- $chapterData->title = $title? mb_substr($title,0,255,"UTF-8"):"";
|
|
|
|
|
- $chapterData->summary = $summaryText? mb_substr($summaryText,0,255,"UTF-8"):"";
|
|
|
|
|
|
|
+ $chapterData->all_trans = $progress;
|
|
|
|
|
+ $chapterData->public = $progress;
|
|
|
|
|
+ $chapterData->progress = $progress;
|
|
|
|
|
+ $chapterData->title = $title ? mb_substr($title, 0, 255, "UTF-8") : "";
|
|
|
|
|
+ $chapterData->summary = $summaryText ? mb_substr($summaryText, 0, 255, "UTF-8") : "";
|
|
|
$chapterData->created_at = $finalAt;
|
|
$chapterData->created_at = $finalAt;
|
|
|
$chapterData->updated_at = $updateAt;
|
|
$chapterData->updated_at = $updateAt;
|
|
|
$chapterData->save();
|
|
$chapterData->save();
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if ($addChapter) {
|
|
|
|
|
+ // 添加新的章节了
|
|
|
|
|
+ //修改父目录
|
|
|
|
|
+ $loop = 0;
|
|
|
|
|
+ $currBook = $attributes["book"];
|
|
|
|
|
+ $currPara = $attributes["para"];
|
|
|
|
|
+ while ($parent = $paliTextService->getParent($currBook, $currPara)) {
|
|
|
|
|
+ $parentChapter = ProgressChapter::where('book', $currBook)
|
|
|
|
|
+ ->where('para', $parent->paragraph)
|
|
|
|
|
+ ->where('channel_id', $attributes["channel_id"])
|
|
|
|
|
+ ->first();
|
|
|
|
|
+ if ($parentChapter) {
|
|
|
|
|
+ $currPara = $parent->paragraph;
|
|
|
|
|
+ if (
|
|
|
|
|
+ is_null($parentChapter->last_chapter_completed_at) ||
|
|
|
|
|
+ Carbon::parse($finalAt)->gt(Carbon::parse($parentChapter->last_chapter_completed_at))
|
|
|
|
|
+ ) {
|
|
|
|
|
+ $parentChapter->last_chapter_completed_at = $finalAt;
|
|
|
|
|
+ // 计算字章节有多少已经完成
|
|
|
|
|
+ $chapterEnd = $parent->paragraph + $parent->chapter_len - 1;
|
|
|
|
|
+ $totalCompleted = ProgressChapter::where('book', $currBook)
|
|
|
|
|
+ ->whereBetween('para', [$parent->paragraph, $chapterEnd])
|
|
|
|
|
+ ->where('channel_id', $attributes["channel_id"])
|
|
|
|
|
+ ->whereNotNull('completed_at')
|
|
|
|
|
+ ->count();
|
|
|
|
|
+ $parentChapter->completed_chapters = $totalCompleted;
|
|
|
|
|
+ $parentChapter->save();
|
|
|
|
|
+ /*
|
|
|
|
|
+ Log::info('update last_chapter_completed_at', [
|
|
|
|
|
+ 'para' => $parent->paragraph,
|
|
|
|
|
+ 'completed' => $totalCompleted
|
|
|
|
|
+ ]);
|
|
|
|
|
+ */
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ $loop++;
|
|
|
|
|
+ }
|
|
|
|
|
+ //Log::info('update parent completed loop ' . $loop);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
$wasCreated = $chapterData->wasRecentlyCreated;
|
|
$wasCreated = $chapterData->wasRecentlyCreated;
|
|
|
$wasChanged = $chapterData->wasChanged();
|
|
$wasChanged = $chapterData->wasChanged();
|
|
|
#查询路径
|
|
#查询路径
|
|
|
$path = json_decode(
|
|
$path = json_decode(
|
|
|
- PaliText::where('book',$book->book_id)
|
|
|
|
|
- ->where('paragraph',$chapter->paragraph)
|
|
|
|
|
- ->value('path'));
|
|
|
|
|
|
|
+ PaliText::where('book', $book->book_id)
|
|
|
|
|
+ ->where('paragraph', $chapter->paragraph)
|
|
|
|
|
+ ->value('path')
|
|
|
|
|
+ );
|
|
|
|
|
|
|
|
- if($path){
|
|
|
|
|
|
|
+ if ($path) {
|
|
|
//查询标签
|
|
//查询标签
|
|
|
$tags = [];
|
|
$tags = [];
|
|
|
foreach ($path as $key => $value) {
|
|
foreach ($path as $key => $value) {
|
|
|
# code...
|
|
# code...
|
|
|
- if($value->level>0){
|
|
|
|
|
- $paliTextUuid = PaliText::where('book',$value->book)
|
|
|
|
|
- ->where('paragraph',$value->paragraph)
|
|
|
|
|
- ->value('uid');
|
|
|
|
|
- $tagUuids = TagMap::where('table_name','pali_texts')
|
|
|
|
|
- ->where('anchor_id',$paliTextUuid)
|
|
|
|
|
- ->select(['tag_id'])
|
|
|
|
|
- ->get();
|
|
|
|
|
|
|
+ if ($value->level > 0) {
|
|
|
|
|
+ $paliTextUuid = PaliText::where('book', $value->book)
|
|
|
|
|
+ ->where('paragraph', $value->paragraph)
|
|
|
|
|
+ ->value('uid');
|
|
|
|
|
+ $tagUuids = TagMap::where('table_name', 'pali_texts')
|
|
|
|
|
+ ->where('anchor_id', $paliTextUuid)
|
|
|
|
|
+ ->select(['tag_id'])
|
|
|
|
|
+ ->get();
|
|
|
foreach ($tagUuids as $key => $taguuid) {
|
|
foreach ($tagUuids as $key => $taguuid) {
|
|
|
# code...
|
|
# code...
|
|
|
- $tags[$taguuid['tag_id']]=1;
|
|
|
|
|
|
|
+ $tags[$taguuid['tag_id']] = 1;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//更新标签映射表
|
|
//更新标签映射表
|
|
|
//删除旧的标签映射表
|
|
//删除旧的标签映射表
|
|
|
- TagMap::where('table_name' , 'progress_chapters')
|
|
|
|
|
- ->where('anchor_id' , $chapterData->uid)
|
|
|
|
|
- ->delete();
|
|
|
|
|
|
|
+ TagMap::where('table_name', 'progress_chapters')
|
|
|
|
|
+ ->where('anchor_id', $chapterData->uid)
|
|
|
|
|
+ ->delete();
|
|
|
foreach ($tags as $key => $tag) {
|
|
foreach ($tags as $key => $tag) {
|
|
|
# code...
|
|
# code...
|
|
|
$tagmap = TagMap::create([
|
|
$tagmap = TagMap::create([
|
|
|
- 'table_name' => 'progress_chapters',
|
|
|
|
|
- 'anchor_id' => $chapterData->uid,
|
|
|
|
|
- 'tag_id' => $key
|
|
|
|
|
- ]);
|
|
|
|
|
- if($tagmap){
|
|
|
|
|
|
|
+ 'table_name' => 'progress_chapters',
|
|
|
|
|
+ 'anchor_id' => $chapterData->uid,
|
|
|
|
|
+ 'tag_id' => $key
|
|
|
|
|
+ ]);
|
|
|
|
|
+ if ($tagmap) {
|
|
|
$tagCount++;
|
|
$tagCount++;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- $bar->advance();
|
|
|
|
|
}
|
|
}
|
|
|
- $bar->finish();
|
|
|
|
|
- $time = time() - $startTime;
|
|
|
|
|
- $this->info("upgrade:progresschapter finished in {$time}s tag count:{$tagCount}");
|
|
|
|
|
|
|
+ $time = time() - $startTime;
|
|
|
|
|
+ $this->info("upgrade:progresschapter finished in {$time}s tag count:{$tagCount}");
|
|
|
return 0;
|
|
return 0;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|