Merge branch 'develop' into feature/mzl_dev
This commit is contained in:
@@ -90,6 +90,9 @@ class UserService
|
|||||||
if (isset($p['id']) && $p['id']) {
|
if (isset($p['id']) && $p['id']) {
|
||||||
$config['where']['id'] = $p['id'];
|
$config['where']['id'] = $p['id'];
|
||||||
}
|
}
|
||||||
|
if (isset($p['corp_id']) && $p['corp_id']) {
|
||||||
|
$config['where']['corp_id'] = $p['corp_id'];
|
||||||
|
}
|
||||||
|
|
||||||
$config['fields'] = ['id','sn', 'name', 'email', 'sex', 'phone', 'avatar', 'corp_id', 'country_id', 'position', 'report_to', 'status', 'created_at'];
|
$config['fields'] = ['id','sn', 'name', 'email', 'sex', 'phone', 'avatar', 'corp_id', 'country_id', 'position', 'report_to', 'status', 'created_at'];
|
||||||
|
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ class UploadController
|
|||||||
$originalName = $file->getUploadName();
|
$originalName = $file->getUploadName();
|
||||||
|
|
||||||
$result = Storage::adapter('oss')
|
$result = Storage::adapter('oss')
|
||||||
->path('vehicle_album/' . $sceneUrl . date('Ymd'))
|
->path('x_server/' . $sceneUrl . date('Ymd'))
|
||||||
->size(1024*1024*5)
|
->size(1024*1024*5)
|
||||||
->upload($file);
|
->upload($file);
|
||||||
|
|
||||||
@@ -128,7 +128,7 @@ class UploadController
|
|||||||
}
|
}
|
||||||
|
|
||||||
$result = Storage::adapter('oss')
|
$result = Storage::adapter('oss')
|
||||||
->path('vehicle_album/' . $sceneUrl . date('Ymd'))
|
->path('x_server/' . $sceneUrl . date('Ymd'))
|
||||||
->size(1024*1024*5)
|
->size(1024*1024*5)
|
||||||
->extYes(['image/jpeg','image/png'])
|
->extYes(['image/jpeg','image/png'])
|
||||||
->extNo(['image/gif'])
|
->extNo(['image/gif'])
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ class UploadService
|
|||||||
*
|
*
|
||||||
* @param Request $request
|
* @param Request $request
|
||||||
* - path: 本地文件绝对路径
|
* - path: 本地文件绝对路径
|
||||||
* - scene: 业务分区/场景(可选)
|
* - scene: 业务分区/场景
|
||||||
* - category: 文件分类(可选)
|
* - category: 文件分类(可选)
|
||||||
* - original_name: 原始文件名(可选)
|
* - original_name: 原始文件名(可选)
|
||||||
*/
|
*/
|
||||||
@@ -24,7 +24,7 @@ class UploadService
|
|||||||
$filePath = $param['path'];
|
$filePath = $param['path'];
|
||||||
$scene = $param['scene'];
|
$scene = $param['scene'];
|
||||||
$category = $param['category']??'general';
|
$category = $param['category']??'general';
|
||||||
$providedOriginalName = $param['original_name'];
|
$providedOriginalName = $param['original_name']??'';
|
||||||
|
|
||||||
if (empty($filePath)) {
|
if (empty($filePath)) {
|
||||||
Log::error('本地文件路径不能为空',$param);
|
Log::error('本地文件路径不能为空',$param);
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
namespace app\queue\utils;
|
namespace app\queue\utils;
|
||||||
|
|
||||||
|
|
||||||
|
use support\Log;
|
||||||
|
|
||||||
class XunfeiFanyi
|
class XunfeiFanyi
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -117,10 +119,12 @@ digest: %s", "ntrans.xfyun.cn", $date, $digestBase64);
|
|||||||
return $data["data"]["result"];
|
return $data["data"]["result"];
|
||||||
} else {
|
} else {
|
||||||
$this->error = $data["message"];
|
$this->error = $data["message"];
|
||||||
|
Log::error("XunfeiFanyi 失败: ".$data["message"],[$data]);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} catch (\Throwable $th) {
|
} catch (\Throwable $th) {
|
||||||
$this->error = $th->getMessage();
|
$this->error = $th->getMessage();
|
||||||
|
Log::error("XunfeiFanyi 错误: ".$th->getMessage());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user