|
...
|
...
|
@@ -117,33 +117,4 @@ class LoginController extends BaseController |
|
|
|
$this->response('success',Code::SUCCESS,$str);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function ceshi(){
|
|
|
|
$templateModel = new TemplateModule();
|
|
|
|
$imageModel = new Image();
|
|
|
|
$list = $templateModel->list([],'id',['image']);
|
|
|
|
$data = [];
|
|
|
|
foreach ($list as $v){
|
|
|
|
$v['image'] = basename($v['image']);
|
|
|
|
if(!isset($data[$v['image']])){
|
|
|
|
$info = $imageModel->read(['hash'=>$v['image']]);
|
|
|
|
if($info !== false){
|
|
|
|
$data[$v['image']] = $v['image'];
|
|
|
|
$param = [
|
|
|
|
'size'=>$info['size'],
|
|
|
|
'path'=>$info['path'],
|
|
|
|
'hash'=>$info['hash'],
|
|
|
|
'type'=>$info['type'],
|
|
|
|
'mime'=>$info['mime'],
|
|
|
|
'created_at'=>date('Y-m-d H:i:s'),
|
|
|
|
'updated_at'=>date('Y-m-d H:i:s')
|
|
|
|
];
|
|
|
|
var_dump("cp /www/wwwroot/develop.globalso.com/public/upload{$info['path']} /www/wwwroot/develop.globalso.com/public/uploads{$info['path']}");
|
|
|
|
die();
|
|
|
|
shell_exec("cp /www/wwwroot/develop.globalso.com/public/upload{$info['path']} /www/wwwroot/develop.globalso.com/public/uploads{$info['path']}");
|
|
|
|
$rs = DB::table('gl_images')->insert($param);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|