|
|
@@ -3,6 +3,7 @@
|
|
|
namespace app\task\controller;
|
|
|
|
|
|
use TCPDF;
|
|
|
+use app\common\model\Certificate;
|
|
|
|
|
|
class Test
|
|
|
{
|
|
|
@@ -74,4 +75,15 @@ class Test
|
|
|
// 输出PDF
|
|
|
$pdf->Output('AA.pdf', 'I');
|
|
|
}
|
|
|
+
|
|
|
+ public function repairTask()
|
|
|
+ {
|
|
|
+ $model = new Certificate();
|
|
|
+ $list = $model->with(['file', 'category'])
|
|
|
+ ->where('is_delete', '=', 0)->select();
|
|
|
+ return $list->each(function ($item) {
|
|
|
+ $item['file_type'] = $item->file['file_type'];
|
|
|
+ $item->save();
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|