Commit fee528f8 authored by 刘小敏's avatar 刘小敏

3D试戴接口优化

parent 44bbb7bf
...@@ -132,7 +132,7 @@ class AiTryon extends Common ...@@ -132,7 +132,7 @@ class AiTryon extends Common
$userService = new User(); $userService = new User();
$res = $userService->deductPoints($user->id, 10); $res = $userService->deductPoints($user->id, 10);
if ($res === 0) { if ($res === 0) {
$this->error('免费次数已用完,积分不足 无法试戴'); $this->error('免费次数已用完,积分不足无法试戴');
} }
} }
...@@ -165,7 +165,7 @@ class AiTryon extends Common ...@@ -165,7 +165,7 @@ class AiTryon extends Common
$attachment = $upload->uploadBase64($res['data']); $attachment = $upload->uploadBase64($res['data']);
// 记录入参日志 // 记录入参日志
Log::info('用户ID:'. $user->id .' AI生成图片 保存到本地接口接口出参:'.json_encode($attachment)); custom_log('用户ID:'. $user->id .' AI生成图片 保存到本地接口接口出参:'.json_encode($attachment), 'gen_ai_img_api');
if($attachment['code'] == 0){ if($attachment['code'] == 0){
$tryonData['ai_status'] = 2; $tryonData['ai_status'] = 2;
...@@ -246,7 +246,7 @@ class AiTryon extends Common ...@@ -246,7 +246,7 @@ class AiTryon extends Common
$userService = new User(); $userService = new User();
$res = $userService->deductPoints($user->id, 10); $res = $userService->deductPoints($user->id, 10);
if ($res === 0) { if ($res === 0) {
$this->error('免费次数已用完,积分不足 无法试戴'); $this->error('免费次数已用完,积分不足无法试戴');
} }
} }
......
...@@ -96,7 +96,7 @@ class Ai ...@@ -96,7 +96,7 @@ class Ai
]; ];
} catch (\Exception $e) { } catch (\Exception $e) {
Log::error('用户ID:'. $userId . ' response_format'. $response_format .' AI生成图片异常:' . $e->getMessage()); format_log_error_custom_name($e, '[AI生成图片接口异常]','用户ID:'. $userId . ' response_format'. $response_format .' AI生成图片异常:' . $e->getMessage(), 'gen_ai_img_api');
return [ return [
'code' => 0 , 'code' => 0 ,
'msg' => '图片生成失败' 'msg' => '图片生成失败'
...@@ -172,10 +172,10 @@ class Ai ...@@ -172,10 +172,10 @@ class Ai
]; ];
} catch (\Exception $e) { } catch (\Exception $e) {
Log::error('用户ID:'. $userId .' AI生成视频异常:' . $e->getMessage()); format_log_error_custom_name($e, '[AI生成视频接口异常]','用户ID:'. $userId . $e->getMessage(), 'gen_ai_video_api');
return [ return [
'code' => 0 , 'code' => 0 ,
'msg' => '请求异常:' . $e->getMessage() 'msg' => '图片生成失败'
]; ];
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment