Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
PaoPao
/
serviceWork
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
b2fe476d
...
b2fe476d8c1504a349e378a0776413793c368e2b
authored
2024-05-27 16:36:31 +0800
by
杨俊
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix(develop): 移除用户 微信|极光 推送消息
1 parent
76456d51
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
14 additions
and
372 deletions
app/Mail/ActivityMaterialMail.php
app/Notifications/ActivityApplyFailNotification.php
app/Notifications/ActivityApplySuccessNotification.php
app/Notifications/ActivitySingerSubmitWorkPassNotification.php
app/Notifications/ActivitySingerSubmitWorkRejectNotification.php
app/Notifications/ActivitySubmitWorkPassNotification.php
app/Notifications/ActivitySubmitWorkRejectNotification.php
app/Notifications/ActivityToDownNotification.php
app/Notifications/ActivityToSendNotification.php
app/Notifications/ActivityToUpNotification.php
app/Notifications/ActivityUpdateNotification.php
app/Notifications/UserCertifyApplyNotification.php
app/Notifications/UserCertifyFailNotification.php
app/Notifications/UserCertifySuccessNotification.php
app/Mail/ActivityMaterialMail.php
View file @
b2fe476
...
...
@@ -97,7 +97,7 @@ protected function getFileType(string $url): string
public
function
envelope
()
:
Envelope
{
return
new
Envelope
(
subject
:
'【
海星试唱
】《'
.
$this
->
getActivityName
()
.
'》- 物料资源'
,
subject
:
'【
泡泡留声
】《'
.
$this
->
getActivityName
()
.
'》- 物料资源'
,
);
}
...
...
app/Notifications/ActivityApplyFailNotification.php
View file @
b2fe476
...
...
@@ -3,8 +3,6 @@
namespace
App\Notifications
;
use
App\Models\Activity
;
use
App\Models\User
;
use
Carbon\Carbon
;
use
Illuminate\Bus\Queueable
;
use
Illuminate\Contracts\Queue\ShouldQueue
;
use
Illuminate\Notifications\Notification
;
...
...
@@ -44,45 +42,7 @@ public function __construct(Activity $activity, string $msg)
*/
public
function
via
(
mixed
$notifiable
)
:
array
{
return
[
'wechat'
,
'jPush'
];
return
[];
}
/**
* Get the mail representation of the notification.
*
* @param \App\Models\User $notifiable
* @return array<string,string>
*/
public
function
toJPush
(
User
$notifiable
)
:
array
{
return
[
'user'
=>
$notifiable
->
getKey
(),
'title'
=>
'《'
.
$this
->
activity
->
getAttribute
(
'song_name'
)
.
'》未通过审核'
,
'content'
=>
trim
(
$this
->
msg
)
];
}
/**
* Get the array representation of the notification.
*
* @param \App\Models\User $notifiable
* @return array<string,string>
*/
public
function
toWechat
(
User
$notifiable
)
:
array
{
$songName
=
$this
->
activity
->
getAttribute
(
'song_name'
);
$project
=
$this
->
activity
->
getAttribute
(
'project'
);
return
[
'openId'
=>
$notifiable
->
getWechatNotificationKey
(),
'template'
=>
'KAaWdyUbceiAg4ThqIt4LqOFMse85hsPOIpH3pldQsg'
,
'data'
=>
[
'first'
=>
'您的试唱活动上架申请未通过!'
,
'keyword1'
=>
'平台运营'
,
'keyword2'
=>
$project
?
sprintf
(
'#%s#《%s》'
,
$project
->
name
,
$songName
)
:
sprintf
(
'《%s》'
,
$songName
),
'keyword3'
=>
Carbon
::
now
()
->
format
(
'Y/m/d'
),
'remark'
=>
trim
(
$this
->
msg
)
]
];
}
}
...
...
app/Notifications/ActivityApplySuccessNotification.php
View file @
b2fe476
...
...
@@ -37,41 +37,6 @@ public function __construct(Activity $activity)
*/
public
function
via
(
mixed
$notifiable
)
:
array
{
return
[
'wechat'
,
'jPush'
];
}
/**
* @param \App\Models\User $notifiable
* @return array<string,string>
*/
public
function
toJPush
(
User
$notifiable
)
:
array
{
return
[
'user'
=>
$notifiable
->
getKey
(),
'title'
=>
'《'
.
$this
->
activity
->
getAttribute
(
'song_name'
)
.
'》'
,
'content'
=>
'已通过审核,正在为您安排上架~'
];
}
/**
* @param \App\Models\User $notifiable
* @return array<string,string>
*/
public
function
toWechat
(
User
$notifiable
)
:
array
{
$songName
=
$this
->
activity
->
getAttribute
(
'song_name'
);
$project
=
$this
->
activity
->
getAttribute
(
'project'
);
return
[
'openId'
=>
$notifiable
->
getWechatNotificationKey
(),
'template'
=>
'KAaWdyUbceiAg4ThqIt4LqOFMse85hsPOIpH3pldQsg'
,
'data'
=>
[
'first'
=>
'您的试唱活动上架申请已通过!'
,
'keyword1'
=>
'平台运营'
,
'keyword2'
=>
$project
?
sprintf
(
'#%s#《%s》'
,
$project
->
name
,
$songName
)
:
sprintf
(
'《%s》'
,
$songName
),
'keyword3'
=>
Carbon
::
now
()
->
format
(
'Y/m/d'
),
'remark'
=>
'正在为您安排上架~'
]
];
return
[];
}
}
...
...
app/Notifications/ActivitySingerSubmitWorkPassNotification.php
View file @
b2fe476
...
...
@@ -31,39 +31,6 @@ public function __construct(ActivityWork $work)
*/
public
function
via
()
:
array
{
return
[
'wechat'
,
'jPush'
];
}
/**
* @param \App\Models\User $notifiable
* @return array
*/
public
function
toJPush
(
User
$notifiable
)
:
array
{
return
[
'user'
=>
$notifiable
->
getKey
(),
'title'
=>
'您的歌手成功达成合作'
,
'content'
=>
sprintf
(
"您的歌手%s参与试唱活动《%s》达成合作"
,
$this
->
work
->
getAttribute
(
'user_nick_name'
),
$this
->
work
->
getAttribute
(
'activity_name'
)),
'data'
=>
[
'type'
=>
'ToComplete'
,
'value'
=>
$this
->
work
->
getAttribute
(
'user_id'
)]
];
}
/**
* @param \App\Models\User $notifiable
* @return array
*/
public
function
toWechat
(
User
$notifiable
)
:
array
{
return
[
'openId'
=>
$notifiable
->
getWechatNotificationKey
(),
'template'
=>
'-qM3dii-zb8nnvPunYDFyPmNptnKzdkgiWRH4-nK8vA'
,
'page'
=>
'packageMy/pages/myMember/detail?id='
.
$this
->
work
->
getAttribute
(
'activity_id'
),
'data'
=>
[
'first'
=>
'恭喜,您的歌手成功达成合作'
,
'keyword1'
=>
$this
->
work
->
getUserFullName
(),
'keyword2'
=>
'参与试唱《'
.
$this
->
work
->
getAttribute
(
'activity_name'
)
.
'》达成合作'
,
'remark'
=>
'点击查看 >'
]
];
return
[];
}
}
...
...
app/Notifications/ActivitySingerSubmitWorkRejectNotification.php
View file @
b2fe476
...
...
@@ -32,39 +32,6 @@ public function __construct(ActivityWork $work)
*/
public
function
via
()
:
array
{
return
[
'wechat'
,
'jPush'
];
}
/**
* @param \App\Models\User $notifiable
* @return array
*/
public
function
toJPush
(
User
$notifiable
)
:
array
{
return
[
'user'
=>
$notifiable
->
getKey
(),
'title'
=>
'您的歌手试唱未选中'
,
'content'
=>
sprintf
(
"您的歌手%s参与试唱活动《%s》未达成合作"
,
$this
->
work
->
getAttribute
(
'user_nick_name'
),
$this
->
work
->
getAttribute
(
'activity_name'
)),
'data'
=>
[
'type'
=>
'ToComplete'
,
'value'
=>
$this
->
work
->
getAttribute
(
'user_id'
)]
];
}
/**
* @param \App\Models\User $notifiable
* @return array
*/
public
function
toWechat
(
User
$notifiable
)
:
array
{
return
[
'openId'
=>
$notifiable
->
getWechatNotificationKey
(),
'template'
=>
'-qM3dii-zb8nnvPunYDFyPmNptnKzdkgiWRH4-nK8vA'
,
'page'
=>
'packageMy/pages/myMember/detail?id='
.
$this
->
work
->
getAttribute
(
'activity_id'
),
'data'
=>
[
'first'
=>
'您的歌手提交的试唱未被采纳'
,
'keyword1'
=>
$this
->
work
->
getUserFullName
(),
'keyword2'
=>
'参与试唱《'
.
$this
->
work
->
getAttribute
(
'activity_name'
)
.
'》未达成合作'
,
'remark'
=>
'感谢参与,期待下次合作'
]
];
return
[];
}
}
...
...
app/Notifications/ActivitySubmitWorkPassNotification.php
View file @
b2fe476
...
...
@@ -31,7 +31,7 @@ public function __construct(ActivityWork $work)
*/
public
function
via
()
:
array
{
return
[
'sms'
,
'jPush'
];
return
[
'sms'
];
}
/**
...
...
@@ -52,18 +52,4 @@ public function toSms(User $notifiable): array
]
];
}
/**
* @param \App\Models\User $notifiable
* @return array
*/
public
function
toJPush
(
User
$notifiable
)
:
array
{
return
[
'user'
=>
$notifiable
->
getKey
(),
'title'
=>
'《'
.
$this
->
work
->
getAttribute
(
'activity_name'
)
.
'》试唱结果通知'
,
'content'
=>
'恭喜,您参与的试唱已达成合作!'
,
'data'
=>
[
'type'
=>
'ToMysing'
,
'value'
=>
$this
->
work
->
getAttribute
(
'activity_id'
)]
];
}
}
...
...
app/Notifications/ActivitySubmitWorkRejectNotification.php
View file @
b2fe476
...
...
@@ -32,7 +32,7 @@ public function __construct(ActivityWork $work)
*/
public
function
via
()
:
array
{
return
[
'sms'
,
'jPush'
];
return
[
'sms'
];
}
/**
...
...
@@ -50,18 +50,4 @@ public function toSms(User $notifiable): array
]
];
}
/**
* @param \App\Models\User $notifiable
* @return array
*/
public
function
toJPush
(
User
$notifiable
)
:
array
{
return
[
'user'
=>
$notifiable
->
getKey
(),
'title'
=>
'《'
.
$this
->
work
->
getAttribute
(
'activity_name'
)
.
'》试唱结果通知'
,
'content'
=>
'感谢您参与的试唱,很遗憾暂未能成合作。'
,
'data'
=>
[
'type'
=>
'ToMysing'
,
'value'
=>
$this
->
work
->
getAttribute
(
'activity_id'
)]
];
}
}
...
...
app/Notifications/ActivityToDownNotification.php
View file @
b2fe476
...
...
@@ -45,7 +45,7 @@ public function __construct(Activity $activity, User $operator, string $msg = ''
*/
public
function
via
(
mixed
$notifiable
)
:
array
{
return
[
'wechat'
,
'jPush'
];
return
[];
}
...
...
@@ -61,41 +61,4 @@ private function hasProject(): bool
{
return
!
empty
(
$this
->
getProjectName
());
}
/**
* Get the mail representation of the notification.
*
* @param mixed $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public
function
toJPush
(
User
$notifiable
)
:
array
{
return
[
'user'
=>
$notifiable
->
getKey
(),
'title'
=>
sprintf
(
'《%s》已下架'
,
$this
->
activity
->
getAttribute
(
'song_name'
)),
'content'
=>
$this
->
msg
];
}
/**
* Get the array representation of the notification.
*
* @param mixed $notifiable
* @return array
*/
public
function
toWechat
(
User
$notifiable
)
:
array
{
return
[
'openId'
=>
$notifiable
->
getWechatNotificationKey
(),
'template'
=>
'WBZT-2STQZXOC5ED5a_vS5XHS1KiTmtSeEMapXEqMpg'
,
'data'
=>
[
'first'
=>
$this
->
hasProject
()
?
sprintf
(
'[%s]试唱歌曲已下架'
,
$this
->
getProjectName
())
:
'试唱歌曲已下架'
,
'keyword1'
=>
sprintf
(
'《%s》'
,
$this
->
activity
->
getAttribute
(
'song_name'
)),
'keyword2'
=>
$this
->
operator
->
getFullName
(),
'keyword3'
=>
Carbon
::
now
()
->
toDateTimeString
(),
'keyword4'
=>
$this
->
msg
,
'remark'
=>
''
]
];
}
}
...
...
app/Notifications/ActivityToSendNotification.php
View file @
b2fe476
...
...
@@ -40,7 +40,7 @@ public function __construct(Activity $activity, User $operator)
*/
public
function
via
(
mixed
$notifiable
)
:
array
{
return
[
'wechat'
,
'jPush'
];
return
[];
}
private
function
getProjectName
()
:
string
...
...
@@ -55,39 +55,4 @@ private function hasProject(): bool
{
return
!
empty
(
$this
->
getProjectName
());
}
/**
* Get the mail representation of the notification.
*
* @param mixed $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public
function
toJPush
(
User
$notifiable
)
:
array
{
return
[
'user'
=>
$notifiable
->
getKey
(),
'title'
=>
sprintf
(
'《%s》已发行'
,
$this
->
activity
->
getAttribute
(
'song_name'
)),
'content'
=>
'填写歌曲发行链接,状态变更为已发行'
];
}
/**
* Get the array representation of the notification.
*
* @param mixed $notifiable
* @return array
*/
public
function
toWechat
(
User
$notifiable
)
:
array
{
return
[
'openId'
=>
$notifiable
->
getWechatNotificationKey
(),
'template'
=>
'v0wGK-Z7r0RIm8P5D586X8MJxKNv-UkzvcS-7vJ2G7s'
,
'data'
=>
[
'first'
=>
sprintf
(
'《%s》已发行'
,
$this
->
activity
->
getAttribute
(
'song_name'
)),
'keyword1'
=>
$this
->
hasProject
()
?
$this
->
getProjectName
()
:
'无'
,
'keyword2'
=>
Carbon
::
now
()
->
toDateTimeString
(),
'remark'
=>
sprintf
(
'%s 填写歌曲发行链接,状态变更为已发行'
,
$this
->
operator
->
getFullName
())
]
];
}
}
...
...
app/Notifications/ActivityToUpNotification.php
View file @
b2fe476
...
...
@@ -33,7 +33,7 @@ public function __construct(Activity $activity, User $operator)
public
function
via
(
mixed
$notifiable
)
:
array
{
return
[
'wechat'
,
'jPush'
];
return
[];
}
private
function
getProjectName
()
:
string
...
...
@@ -48,30 +48,4 @@ private function hasProject(): bool
{
return
!
empty
(
$this
->
getProjectName
());
}
public
function
toJPush
(
User
$notifiable
)
:
array
{
return
[
'user'
=>
$notifiable
->
getKey
(),
'title'
=>
sprintf
(
'《%s》重新上架'
,
$this
->
activity
->
getAttribute
(
'song_name'
)),
'content'
=>
'重新上架(自动通过,无需审批)'
,
'data'
=>
[
'type'
=>
'ToActivity'
,
'value'
=>
$this
->
activity
->
getKey
()]
];
}
public
function
toWechat
(
User
$notifiable
)
:
array
{
return
[
'openId'
=>
$notifiable
->
getWechatNotificationKey
(),
'template'
=>
'o9i6qtgr4ghtGvU-piimB9_mAaSOAXDDMzqx9zXYkss'
,
'data'
=>
[
'first'
=>
$this
->
hasProject
()
?
sprintf
(
'[%s]试唱歌曲重新上架'
,
$this
->
getProjectName
())
:
'试唱歌曲重新上架'
,
'keyword1'
=>
sprintf
(
'《%s》'
,
$this
->
activity
->
getAttribute
(
'song_name'
)),
'keyword2'
=>
$this
->
operator
->
getFullName
(),
'keyword3'
=>
Carbon
::
now
()
->
toDateTimeString
(),
'keyword4'
=>
'试唱歌曲重新上架(自动通过,无需审批)'
,
'remark'
=>
''
]
];
}
}
...
...
app/Notifications/ActivityUpdateNotification.php
View file @
b2fe476
...
...
@@ -51,7 +51,7 @@ public function __construct(Activity $activity, User $operator, array $change =
*/
public
function
via
(
mixed
$notifiable
)
:
array
{
return
[
'wechat'
,
'jPush'
];
return
[];
}
/**
...
...
@@ -61,42 +61,4 @@ protected function formatChangeLabel(): string
{
return
collect
(
$this
->
change
)
->
map
(
fn
(
$item
)
=>
sprintf
(
'[%s]'
,
$item
))
->
join
(
'、'
);
}
/**
* @param \App\Models\User $notifiable
* @return array<string,string>
*/
public
function
toJPush
(
User
$notifiable
)
:
array
{
$format
=
$this
->
formatChangeLabel
();
return
[
'user'
=>
$notifiable
->
getKey
(),
'title'
=>
'《'
.
$this
->
activity
->
getAttribute
(
'song_name'
)
.
'》信息被修改'
,
'content'
=>
sprintf
(
'%s %s'
,
$this
->
operator
->
getFullName
(),
empty
(
$format
)
?
''
:
'修改了:'
.
$format
)
];
}
/**
* @param \App\Models\User $notifiable
* @return array<string,string>
*/
public
function
toWechat
(
User
$notifiable
)
:
array
{
$songName
=
$this
->
activity
->
getAttribute
(
'song_name'
);
$project
=
$this
->
activity
->
getAttribute
(
'project'
);
$format
=
$this
->
formatChangeLabel
();
return
[
'openId'
=>
$notifiable
->
getWechatNotificationKey
(),
'template'
=>
'v0wGK-Z7r0RIm8P5D586X8MJxKNv-UkzvcS-7vJ2G7s'
,
'data'
=>
[
'first'
=>
sprintf
(
'%s 修改了试唱歌曲《%s》'
,
$this
->
operator
->
getFullName
(),
$songName
),
'keyword1'
=>
$project
?
$project
->
name
:
'无'
,
'keyword2'
=>
Carbon
::
now
()
->
toDateTimeString
(),
'remark'
=>
sprintf
(
'用户修改的信息 %s'
,
empty
(
$format
)
?
''
:
'包含:'
.
$format
)
],
'page'
=>
'pages/index/index?previewId='
.
$this
->
activity
->
getKey
()
];
}
}
...
...
app/Notifications/UserCertifyApplyNotification.php
View file @
b2fe476
...
...
@@ -34,31 +34,6 @@ public function __construct(UserCertify $userCertify)
*/
public
function
via
()
:
array
{
return
[
'wechat'
,
'jPush'
];
}
public
function
toJPush
(
User
$notifiable
)
:
array
{
return
[
'user'
=>
$notifiable
->
getKey
(),
'title'
=>
$this
->
applyUser
->
getAttribute
(
'nick_name'
)
.
'提交了认证申请'
,
'content'
=>
'点击查看详情'
,
'data'
=>
[
'type'
=>
'userAuth'
,
'value'
=>
''
]
];
}
public
function
toWechat
(
User
$notifiable
)
:
array
{
return
[
'openId'
=>
$notifiable
->
getAttribute
(
'official_id'
),
'template'
=>
'DWu2Opezt2ricor_x38tq-PWna8k26ehJbhRbNwua4c'
,
'data'
=>
[
'keyword1'
=>
$this
->
applyUser
->
getAttribute
(
'nick_name'
),
'keyword2'
=>
(
string
)
$this
->
userCertify
->
getAttribute
(
'created_at'
),
'keyword3'
=>
'无'
,
],
"page"
=>
'/packageLogin/pages/applyList'
];
return
[];
}
}
...
...
app/Notifications/UserCertifyFailNotification.php
View file @
b2fe476
...
...
@@ -29,21 +29,7 @@ public function __construct()
*/
public
function
via
()
:
array
{
return
[
'sms'
,
'jPush'
];
}
/**
* @param \App\Models\User $notifiable
* @return array
*/
public
function
toJPush
(
User
$notifiable
)
:
array
{
return
[
'user'
=>
$notifiable
->
getKey
(),
'title'
=>
'认证申请未通过'
,
'content'
=>
'点击查看详情'
,
'data'
=>
[
'type'
=>
'OpenApp'
,
'value'
=>
''
]
];
return
[
'sms'
];
}
/**
...
...
app/Notifications/UserCertifySuccessNotification.php
View file @
b2fe476
...
...
@@ -29,21 +29,7 @@ public function __construct()
*/
public
function
via
()
:
array
{
return
[
'sms'
,
'jPush'
];
}
/**
* @param \App\Models\User $notifiable
* @return array
*/
public
function
toJPush
(
User
$notifiable
)
:
array
{
return
[
'user'
=>
$notifiable
->
getKey
(),
'title'
=>
'认证申请已经通过'
,
'content'
=>
'点击前往海星试唱挑选歌曲'
,
'data'
=>
[
'type'
=>
'OpenApp'
,
'value'
=>
''
]
];
return
[
'sms'
];
}
/**
...
...
Please
register
or
sign in
to post a comment