Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
loveisland
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘小敏
loveisland
Commits
8df939bd
Commit
8df939bd
authored
May 18, 2026
by
刘小敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
3D试戴消息通知完善
parent
86180074
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
7 deletions
+13
-7
AiVideoGen.php
addons/shopro/job/AiVideoGen.php
+10
-7
AiVideoSuccess.php
addons/shopro/notification/ai/AiVideoSuccess.php
+0
-0
Notification.php
...in/controller/shopro/notification/traits/Notification.php
+3
-0
No files found.
addons/shopro/job/AiVideoGen.php
View file @
8df939bd
...
...
@@ -193,7 +193,7 @@ class AiVideoGen extends BaseJob
$this
->
debug_log
(
'[AI视频]保存本地视频成功 sql: '
.
db
()
->
getLastSql
());
// ========== 新增:发送消息通知 ==========
// $this->sendNotification($user_id, config('shopro.api_host').$video_url
);
$this
->
sendNotification
(
$user_id
,
$taskid
);
// 删除队列job
$this
->
debug_log
(
'[AI视频]删除Job'
);
...
...
@@ -267,7 +267,7 @@ class AiVideoGen extends BaseJob
/**
* 发送AI视频生成成功通知
*/
private
function
sendNotification
(
$user_id
,
$
video_url
)
private
function
sendNotification
(
$user_id
,
$
taskid
)
{
try
{
// 获取用户信息
...
...
@@ -279,14 +279,17 @@ class AiVideoGen extends BaseJob
// 获取AI试戴记录
$aiTryon
=
AiTryOnModel
::
where
(
'user_id'
,
$user_id
)
->
where
(
'ai_
url'
,
$video_url
)
->
where
(
'ai_
task_id'
,
$taskid
)
->
find
();
// 发送通知
NotificationFacade
::
send
(
$user
,
new
AiVideoSuccess
([
'ai_tryon'
=>
$aiTryon
?
$aiTryon
->
toArray
()
:
[],
'user'
=>
$user
->
toArray
()
]));
$user
=
User
::
where
(
'id'
,
$user_id
)
->
find
();
$user
&&
$user
->
notify
(
new
AiVideoSuccess
([
'ai_tryon'
=>
$aiTryon
?
$aiTryon
->
toArray
()
:
[],
'user'
=>
$user
->
toArray
()
])
);
$this
->
debug_log
(
'[AI视频通知]通知发送成功: user_id='
.
$user_id
);
return
true
;
...
...
addons/shopro/notification/AiVideoSuccess.php
→
addons/shopro/notification/
ai/
AiVideoSuccess.php
View file @
8df939bd
File moved
application/admin/controller/shopro/notification/traits/Notification.php
View file @
8df939bd
...
...
@@ -24,6 +24,9 @@ trait Notification
// 活动
\addons\shopro\notification\activity\GrouponFail
::
class
,
\addons\shopro\notification\activity\GrouponFinish
::
class
,
// AI试戴
\addons\shopro\notification\ai\AiVideoSuccess
::
class
,
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment