Commit 2e996b01 2e996b01b85bfbde41a09a251b212c97b7d0cdd2 by 杨俊

fix(develop): Init

1 parent bd6a9388
......@@ -35,21 +35,8 @@ MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="hello@example.com"
MAIL_FROM_NAME="${APP_NAME}"
JPUSH_KEY=860a3d4ecfaf3c38eb539c4e
JPUSH_SECRET=df208c0eb485ed3ab3b18ff2
IM_KEY=
IM_SECRET=
WECHAT_OFFICIAL_ACCOUNT_APPID=
WECHAT_OFFICIAL_ACCOUNT_SECRET=
WECHAT_OFFICIAL_ACCOUNT_TOKEN=
WECHAT_OFFICIAL_ACCOUNT_AES_KEY=
WECHAT_MINI_APP_APPID=
WECHAT_MINI_APP_SECRET=
WECHAT_MINI_APP_TOKEN=
WECHAT_MINI_APP_AES_KEY=
OCTANE_SERVER=swoole
OCTANE_HTTPS=true
......
<?php
namespace App\Channels;
use App\Models\User;
use Illuminate\Notifications\Notification;
class JPushNotificationChannel
{
public function send(User $notifiable, Notification $notification): void
{
// @phpstan-ignore-next-line
$notification->toJPush($notifiable);
}
}
<?php
namespace App\Channels;
use App\Models\User;
use Illuminate\Notifications\Notification;
class WechatNotificationChannel
{
public function send(User $notifiable, Notification $notification): void
{
// @phpstan-ignore-next-line
$notification->toWechat($notifiable);
}
}
......@@ -6,8 +6,6 @@
use App\Helpers\OperationLog;
use App\Http\Container\AdminSection\Requests\User\CertifyUpdateRequest;
use App\Http\Service\UserService;
use App\Jobs\UserSingerLimitJob;
use App\Models\User;
use App\Models\UserCertify;
use App\Models\Views\UserLastCertify;
use App\Notifications\UserCertifyFailNotification;
......@@ -79,15 +77,6 @@ public function update(CertifyUpdateRequest $request, UserCertify $certify): Res
};
} catch (SingerLimitException $exception) {
DB::rollBack();
$master = User::query()->find($exception->masterId, ['id', 'nick_name']);
UserSingerLimitJob::dispatch([
'title' => sprintf('%s:歌手额度已满', $master?->getAttribute('nick_name')),
'content' => sprintf('审核歌手认证:%s', $user->getAttribute('nick_name'))
], [
'title' => sprintf('%s:同意歌手加入', $master->getAttribute('nick_name')),
'content' => sprintf('歌手:%s', $user->getAttribute('nick_name')),
'limit' => $exception->maxSingerNum
]);
return $this->fail(ApiCode::VALIDATION_ERROR, '团队内歌手名额已满');
} catch (RuntimeException $exception) {
......
......@@ -12,7 +12,6 @@
use App\Http\Request\BooleanStatusRequest;
use App\Http\Request\UserChangePwdRequest;
use App\Http\Service\UserService;
use App\Jobs\UserSingerLimitJob;
use App\Jobs\UserSyncIMJob;
use App\Models\Activity;
use App\Models\GroupHasMember;
......@@ -127,15 +126,6 @@ public function update(UserUpdateRequest $request, User $user): Response
return $this->successWithData($user->load(['authTags:id,name', 'roles:id,name', 'projects:id,name']), ApiCode::UPDATE_SUCCESS);
} catch (SingerLimitException $exception) {
DB::rollBack();
$master = User::query()->find($exception->masterId, ['id', 'nick_name']);
UserSingerLimitJob::dispatch([
'title' => sprintf('%s:歌手额度已满', $master?->getAttribute('nick_name')),
'content' => sprintf('编辑歌手信息:%s', $user->getAttribute('nick_name'))
], [
'title' => sprintf('%s:编辑成员信息', $user->getAttribute('nick_name')),
'content' => sprintf('经纪人:%s', $master->getAttribute('nick_name')),
'limit' => $exception->maxSingerNum
]);
return $this->fail(ApiCode::VALIDATION_ERROR, '团队内歌手名额已满');
} catch (RuntimeException $exception) {
DB::rollBack();
......
......@@ -14,7 +14,6 @@
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Http;
class AuditionController extends ApiController
......@@ -22,63 +21,63 @@ class AuditionController extends ApiController
public function collection(Request $request)
{
$status = $request->get('status', 'all');
$text = $request->get('text', '');
$status = $request->get('status', 'all');
$text = $request->get('text', '');
$pageSize = $request->integer('size', 10);
$song_type = $request->get('song_type', 1);
$song_type = $request->get('song_type', 1);
$user_id = Auth::id();
$activity_ids = DB::table('user_activity_collections')
->where('user_id', $user_id)
->whereNull('deleted_at')
->orderByDesc('created_at')
->pluck('activity_id')->toArray();
$query = Activity::query();
if (!empty($text)){
$query->where('song_name', 'like', '%'.$text.'%');
$query = Activity::query();
if (!empty($text)) {
$query->where('song_name', 'like', '%' . $text . '%');
}
if ($status == 'active'){
if ($status === 'active') {
$query->where('status', 1);
}
$data =$query
$data = $query
->with('user:id,nick_name,avatar')
->whereIn('id', $activity_ids)
->where('song_type', $song_type)
->with(['tags:id,name', 'submitUsers:id,nick_name,intro,real_name,avatar,province,city,company,rate'])
->select(['id','cover','song_name','status','is_official','created_at','sub_title','guide','guide_clip','project_id', 'user_id','lyric','clip_lyric','sex','mark','speed','lang'])
->select(['id', 'cover', 'song_name', 'status', 'is_official', 'created_at', 'sub_title', 'guide', 'guide_clip', 'project_id', 'user_id', 'lyric', 'clip_lyric', 'sex', 'mark', 'speed', 'lang'])
->withCount(['attend_user as attend_count', 'viewUsersCount as view_count'])
->orderByRaw(DB::raw("FIELD(id, " . implode(',', $activity_ids) . ")"))
->paginate($pageSize);
$config_ids = DB::table('system_config')
$config_ids = DB::table('system_config')
->whereIn('identifier', ['activity_lang', 'activity_speed', 'activity_sex', 'activity_mark'])
->whereNull('deleted_at')
->pluck('id')
->toArray();
$configs = DB::table('system_config')
$configs = DB::table('system_config')
->whereIn('parent_id', $config_ids)
->whereNull('deleted_at')->get(['identifier', 'name', 'content']);
$view_activity_ids = array_column($data->items(), 'id');
$view_activity_ids = array_column($data->items(), 'id');
$collection_at_list = DB::table('user_activity_collections')
->whereIn('activity_id', $view_activity_ids)
->where('user_id', $user_id)
->whereNull('deleted_at')
->pluck('created_at', 'activity_id')
->toArray();
$projectIds = array_column($data->items(), 'project_id');
$projectList = Project::query()->leftJoin('users','users.id','=','projects.master_id')->whereIn('projects.id',$projectIds)
->where('projects.status','=',1)
->where('projects.deleted_at','=',null)->select(['projects.*','users.nick_name','users.real_name','users.avatar'])->get()->toArray();
foreach ($projectList as $k=>$v){
$projectIds = array_column($data->items(), 'project_id');
$projectList = Project::query()->leftJoin('users', 'users.id', '=', 'projects.master_id')->whereIn('projects.id', $projectIds)
->where('projects.status', '=', 1)
->where('projects.deleted_at', '=', NULL)->select(['projects.*', 'users.nick_name', 'users.real_name', 'users.avatar'])->get()->toArray();
foreach ($projectList as $k => $v) {
$projectList[$k]['master'] = [
'id'=>$v['master_id'],
'nick_name'=>$v['nick_name'],
'real_name'=>$v['real_name'],
'avatar'=>$v['avatar']
'id' => $v['master_id'],
'nick_name' => $v['nick_name'],
'real_name' => $v['real_name'],
'avatar' => $v['avatar']
];
unset($projectList[$k]['nick_name']);
unset($projectList[$k]['real_name']);
unset($projectList[$k]['avatar']);
}
$data->each(static function (Activity $activity) use ($configs){
$data->each(static function (Activity $activity) use ($configs) {
$langs = [];
$lang = $activity->lang ?? [];
foreach ($configs as $c) {
......@@ -101,14 +100,10 @@ public function collection(Request $request)
});
$result = json_decode(json_encode($data->items()), true);
foreach ($result as &$v) {
$project = array_filter(array_map(function ($item) use($v){
if($item['id']==$v['project_id']){
return $item;
}
},$projectList));
$project = array_filter(array_map(static fn($item) => $item['id'] === $v['project_id'] ? $item : NULL, $projectList));
$v['project'] = array_values($project);
$v['collection_at'] = !empty($collection_at_list[$v['id']]) ? $collection_at_list[$v['id']]: '';
$v['project'] = array_values($project);
$v['collection_at'] = !empty($collection_at_list[$v['id']]) ? $collection_at_list[$v['id']] : '';
unset($v['user_id'], $v['project_id']);
}
......@@ -121,7 +116,7 @@ public function sub(Request $request)
if (empty($activity_id)) {
return JsonResource::success('收藏失败-参数错误。请联系管理员', code: 201);
}
$user_id = Auth::id();
$user_id = Auth::id();
$is_activity = DB::table('user_activity_collections')
->where('user_id', $user_id)
->where('activity_id', $activity_id)
......@@ -129,60 +124,32 @@ public function sub(Request $request)
->orderByDesc('created_at')
->pluck('id')->first();
if (!empty($is_activity)) {
return JsonResource::success('请勿重复收藏', code: 400 );
return JsonResource::success('请勿重复收藏', code: 400);
}
DB::table('user_activity_collections')->insert([
'user_id'=> $user_id,
'activity_id'=> $activity_id,
'created_at'=> date('Y-m-d H:i:s', time()),
'updated_at'=> date('Y-m-d H:i:s', time())
'user_id' => $user_id,
'activity_id' => $activity_id,
'created_at' => date('Y-m-d H:i:s', time()),
'updated_at' => date('Y-m-d H:i:s', time())
]);
$user = DB::table('users')->where('id', $user_id)->first();
$user = DB::table('users')->where('id', $user_id)->first();
$business_id = $user->business_id;
$role = $user->role;
$role = $user->role;
# 有商务且为歌手
if ($business_id && $role=='Singer') {
if ($business_id && $role === 'Singer') {
$msg_data = [
'title' => '',
'content' => '',
'sender_id' => $user_id,
'title' => '',
'content' => '',
'sender_id' => $user_id,
'receiver_id' => $user_id,
'activity_id' => $activity_id,
'type' => 2,
'is_read' => 0,
'is_bind' => 1,
'created_at'=> date('Y-m-d H:i:s', time()),
'updated_at'=> date('Y-m-d H:i:s', time())
'type' => 2,
'is_read' => 0,
'is_bind' => 1,
'created_at' => date('Y-m-d H:i:s', time()),
'updated_at' => date('Y-m-d H:i:s', time())
];
DB::table('user_messages')->insert($msg_data);
$activity = DB::table('activitys')->where('id', $activity_id)->first();
$song_name = !empty($activity->id) ? $activity->song_name : '';
# 推送消息给推荐人
$business = DB::table('users')->where('id', $business_id)->first();
$business_unionid = !empty($business->id) ? $business->unionid : '';
if (!empty($business_unionid)) {
$business_wechat_official = DB::table('wechat_official_users')->where('union_id', $business_unionid)->where('is_subscribe', 1)->first();
if (!empty($business_wechat_official->id)) {
$business_open_id = $business_wechat_official->open_id;
$name = $user->nick_name . '(' . $user->real_name . ')';
$channel = 'singer_related';
if (env('TEST_URL', false)) {
$url = 'https://hi-sing-admin-dev.hikoon.com/api/provider/wechat/pushSubscribeMessage';
} else {
$url = 'https://hi-sing-admin.hikoon.com/api/provider/wechat/pushSubscribeMessage';
}
$md5_str = $channel . $business_open_id . 'tb0iwb7TE9TIbkG8iFsxldrHJRFdeP1g';
$req_data = [
'secret' => md5($md5_str),
'channel' => 'singer_related',
'open_ids' => [$business_open_id],
'data' => ["title" => "您的歌手收藏了试唱活动", "name" => $name, "intro" => "收藏了试唱活动《" . $song_name . "》",
"remark" => "点击前往 >",
"page" => "packageMy/pages/like?tab=1"]
];
$resp = Http::asJson()->post($url, $req_data)->json();
}
}
}
return JsonResource::success('收藏成功');
......@@ -191,42 +158,42 @@ public function sub(Request $request)
public function unsub(Request $request)
{
$activity_id = $request->get('activity_id');
$user_id = Auth::id();
$user_id = Auth::id();
$is_activity = DB::table('user_activity_collections')
->where('user_id', $user_id)
->where('activity_id', $activity_id)
->whereNull('deleted_at')
->orderByDesc('created_at')
->first();
if (empty($is_activity->id)) {
if (empty($is_activity)) {
return JsonResource::success('未收藏不能取消', code: 400);
}
DB::table('user_activity_collections')->where('id', $is_activity->id)->update([
'updated_at'=> date('Y-m-d H:i:s', time()),
'deleted_at'=> date('Y-m-d H:i:s', time())
'updated_at' => date('Y-m-d H:i:s', time()),
'deleted_at' => date('Y-m-d H:i:s', time())
]);
$m_data = ['sender_id'=>$user_id,'activity_id'=>$activity_id,'type'=>2, 'is_read' => 0];
$m_data = ['sender_id' => $user_id, 'activity_id' => $activity_id, 'type' => 2, 'is_read' => 0];
DB::table('user_messages')->where($m_data)->update([
'deleted_at'=> date('Y-m-d H:i:s', time())
'deleted_at' => date('Y-m-d H:i:s', time())
]);
return JsonResource::success('已取消收藏');
}
public function bandLinkActivity(Request $request)
{
$id = $request->get('id');
$pageSize = $request->integer('size', 10);
$page = $request->integer('page', 1);
$id = $request->get('id');
$pageSize = $request->integer('size', 10);
$page = $request->integer('page', 1);
$song_type = $request->get('song_type', 1);
$song_name = $request->get('song_name', '');
$user_id = Auth::id();
$query = DB::table('activitys')
$user_id = Auth::id();
$query = DB::table('activitys')
->where('project_id', $id)
->where('audit_status', 1)
->where('status', 1)
->where('song_type', $song_type);
if (!empty($song_name)) {
$query->where('song_name', 'like', '%'.$song_name.'%');
$query->where('song_name', 'like', '%' . $song_name . '%');
}
$activity_ids = $query
->whereNull('deleted_at')
......@@ -238,9 +205,9 @@ public function bandLinkActivity(Request $request)
->where('user_id', $user_id)
->whereNull('deleted_at')
->pluck('activity_id')->toArray();
$activity_id_list = [];
$activity_id_list = [];
foreach ($activity_ids as $v) {
if (!in_array($v, $unlike_activity_ids)){
if (!in_array($v, $unlike_activity_ids)) {
$activity_id_list[] = $v;
}
}
......@@ -255,57 +222,57 @@ public function bandLinkActivity(Request $request)
(select count(*) from user_view_activitys where user_view_activitys.activity_id = activitys.id ) as view_count,
(select count(*) from activity_has_users where activity_has_users.activity_id = activitys.id and activity_has_users.type='Submit' AND activity_has_users.deleted_at is NULL ) as attend_count
from `activitys`
left join `user_activity_collections` as uac on `uac`.`activity_id` = `activitys`.`id` and `uac`.user_id=".$user_id." and `uac`.deleted_at is NULL
left join `user_view_activitys` as uva on `uva`.`activity_id` = `activitys`.`id` and `uva`.user_id=".$user_id."
left join `activity_has_users` as ahu on `ahu`.`activity_id` = `activitys`.`id` and `ahu`.user_id=".$user_id." and `ahu`.`type`='Submit' and `ahu`.deleted_at is NULL
where activitys.id IN (".implode(',', $activity_ids).") AND activitys.`status`=1 AND audit_status=1 AND activitys.deleted_at is NULL GROUP BY activitys.id,uac.id,uva.id,ahu.id ";
left join `user_activity_collections` as uac on `uac`.`activity_id` = `activitys`.`id` and `uac`.user_id=" . $user_id . " and `uac`.deleted_at is NULL
left join `user_view_activitys` as uva on `uva`.`activity_id` = `activitys`.`id` and `uva`.user_id=" . $user_id . "
left join `activity_has_users` as ahu on `ahu`.`activity_id` = `activitys`.`id` and `ahu`.user_id=" . $user_id . " and `ahu`.`type`='Submit' and `ahu`.deleted_at is NULL
where activitys.id IN (" . implode(',', $activity_ids) . ") AND activitys.`status`=1 AND audit_status=1 AND activitys.deleted_at is NULL GROUP BY activitys.id,uac.id,uva.id,ahu.id ";
if ($song_type == 2) {
$sort_sql = "order by p_is_top desc,publish_at desc";
} else {
$sort_sql = "order by p_is_top desc,is_listen asc,activitys.weight desc,activitys.created_at desc";
}
$def_sql = $def_sql.$sort_sql;
$def_sql = $def_sql . $sort_sql;
$sql = $def_sql." limit ".$pageSize." offset ".($page - 1) * $pageSize;
$total_sql = "SELECT COUNT(*) AS total_count FROM (".$def_sql.") AS subquery";
$total = DB::select($total_sql)[0]->total_count;
$result = DB::select($sql);
$list = json_decode(json_encode($result), true);
$sql = $def_sql . " limit " . $pageSize . " offset " . ($page - 1) * $pageSize;
$total_sql = "SELECT COUNT(*) AS total_count FROM (" . $def_sql . ") AS subquery";
$total = DB::select($total_sql)[0]->total_count;
$result = DB::select($sql);
$list = json_decode(json_encode($result), true);
$search_activity_id = array_column($list, 'id');
$data =Activity::query()
$data = Activity::query()
->whereIn('id', $search_activity_id)
->with(['linkArranger:id,nick_name', 'tags:id,name', 'project:id,name,cover,is_promote', 'comfirmTime:project_id,average_day,updated_at'])
->select(['id','cover','song_name','status','sub_title','guide','guide_clip','project_id', 'user_id','lyric','clip_lyric','sex','mark','speed','lang','p_is_top', 'publish_at','estimate_release_at','guide_duration','guide_clip_duration','karaoke','karaoke_clip', 'expand'])
->select(['id', 'cover', 'song_name', 'status', 'sub_title', 'guide', 'guide_clip', 'project_id', 'user_id', 'lyric', 'clip_lyric', 'sex', 'mark', 'speed', 'lang', 'p_is_top', 'publish_at', 'estimate_release_at', 'guide_duration', 'guide_clip_duration', 'karaoke', 'karaoke_clip', 'expand'])
->withCount(['publicAudio as public_audio_count', 'totalSong as total_song_count', 'onlineSong as online_song_count'])
->paginate($pageSize, pageName:'limit');
->paginate($pageSize, pageName: 'limit');
// 获取用户收藏
$userCollection = UserActivityCollectionPivot::query()
$userCollection = UserActivityCollectionPivot::query()
->selectRaw('activity_id,1 as num')
->where('user_id', $user_id)
->pluck('num', 'activity_id')->toArray();
$config = SystemConfig::query()->where('status', 1)
$config = SystemConfig::query()->where('status', 1)
->whereHas('parent', fn(Builder $builder) => $builder->where('status', 1)->whereIn('identifier', ['activity_mark', 'activity_lang', 'activity_speed', 'activity_sex']))
->get(['name', 'identifier', 'content']);
$now_activity_ids = array_column($data->items(), 'id');
$now_project_ids = array_column($data->items(), 'project_id');
$view_id_list = DB::table('user_view_activitys')
$now_project_ids = array_column($data->items(), 'project_id');
$view_id_list = DB::table('user_view_activitys')
->whereIn('activity_id', $now_activity_ids)
->where('user_id', $user_id)
->whereNull('deleted_at')
->pluck('activity_id')
->toArray();
$last_ids_list = DB::table('activitys')
$last_ids_list = DB::table('activitys')
->whereIn('id', $now_activity_ids)
->where('created_at', '>=', now()->subDays(7))
->whereNull('deleted_at')
->pluck('id')
->toArray();
$master_list = UserProjectPivot::query()
$master_list = UserProjectPivot::query()
->whereIn('project_id', $now_project_ids)
->where('user_id', $user_id)
->pluck('project_id')
->toArray();
$share_user = ActivityShareUser::query()
$share_user = ActivityShareUser::query()
->whereIn('activity_id', $now_activity_ids)
->where('user_id', $user_id)
->pluck('activity_id')
......@@ -354,7 +321,7 @@ public function bandLinkActivity(Request $request)
$is_promote = 0;
if ($activity->getRelation('project')) {
$is_promote = $activity->getRelation('project')->is_promote;
$project = $activity->getRelation('project')->toArray();
$project = $activity->getRelation('project')->toArray();
unset($project['is_promote']);
$activity->setAttribute('project', [$project]);
}
......@@ -362,7 +329,7 @@ public function bandLinkActivity(Request $request)
$activity->unsetRelation('project');
});
$result = json_decode(json_encode($data->items()), true);
$result = json_decode(json_encode($data->items()), true);
$result_map = [];
foreach ($result as &$v) {
unset($v['user_id'], $v['project_id']);
......
......@@ -12,7 +12,6 @@
use App\Http\Service\GroupDataService;
use App\Http\Service\GroupInviteService;
use App\Http\Service\UserService;
use App\Jobs\UserSingerLimitJob;
use App\Models\Activity;
use App\Models\ActivityUser;
use App\Models\GroupHasMember;
......@@ -190,15 +189,7 @@ public function gropuInvite(GroupInviteRequest $request)
}
//判断歌手额度
$maxSingerNum = User::query()->whereKey($invite_id)->value('business_singer_limit');
if ($is_singer_tag and $singer_tag_count >= $maxSingerNum) {
UserSingerLimitJob::dispatch([
'title' => $title1,
'content' => $content1
], [
'title' => $title2,
'content' => $content2,
'limit' => $maxSingerNum
]);
if ($is_singer_tag && $singer_tag_count >= $maxSingerNum) {
return JsonResource::fail(JsonResource::TEAM_INVITE_SINGER_LIMIT, code: 403);
}
......@@ -295,14 +286,6 @@ public function handleInvite(HandleInviteRequest $request, GroupInviteService $g
$maxSingerNum = User::query()->whereKey($invite_id)->value('business_singer_limit');
if ($is_singer_tag and $singer_tag_count >= $maxSingerNum) {
GroupInvite::query()->where(['invite_id' => $invite_id, 'user_id' => $member_id, 'type' => $type, 'status' => 1])->update(['status' => 4]);
UserSingerLimitJob::dispatch([
'title' => $title1,
'content' => $content1
], [
'title' => $title2,
'content' => $content2,
'limit' => $maxSingerNum
]);
return JsonResource::fail(JsonResource::TEAM_JOIN_SINGER_LIMIT, code: 403);
}
}
......
......@@ -11,7 +11,6 @@
use App\Http\Container\AppSection\Requests\UserAuthExamineRequests;
use App\Http\Service\UserService;
use App\Jobs\UserApplyCertifyJob;
use App\Jobs\UserSingerLimitJob;
use App\Models\GroupHasMember;
use App\Models\SystemTag;
use App\Models\User;
......@@ -53,15 +52,6 @@ public function story(UserAuthCreateRequest $request)
if ($masterId) {
$maxSingerNum = User::query()->whereKey($masterId)->value('business_singer_limit');
if ($is_singer_tag && $singer_tag_count >= $maxSingerNum) {
$master = User::query()->find($masterId, ['id', 'nick_name']);
UserSingerLimitJob::dispatch([
'title' => sprintf('%s:歌手额度已满', $master?->getAttribute('nick_name')),
'content' => sprintf('%s:提交歌手认证', $user?->getAttribute('nick_name'))
], [
'title' => sprintf('%s:提交歌手认证', $user?->getAttribute('nick_name')),
'content' => sprintf('经纪人:%s', $master->getAttribute('nick_name')),
'limit' => $maxSingerNum
]);
return JsonResource::fail(JsonResource::TEAM_INVITE_SINGER_LIMIT, code: 403);
}
}
......@@ -144,15 +134,6 @@ public function examine(UserAuthExamineRequests $request)
return JsonResource::success(JsonResource::UPDATE_SUCCESS);
} catch (SingerLimitException $exception) {
DB::rollBack();
$master = User::query()->find($exception->masterId, ['id', 'nick_name']);
UserSingerLimitJob::dispatch([
'title' => sprintf('%s:歌手额度已满', $master?->getAttribute('nick_name')),
'content' => sprintf('审核歌手认证:%s', $user->getAttribute('nick_name'))
], [
'title' => sprintf('%s:审核歌手认证', $user->getAttribute('nick_name')),
'content' => sprintf('经纪人:%s', $master->getAttribute('nick_name')),
'limit' => $exception->maxSingerNum
]);
return JsonResource::fail(JsonResource::TEAM_INVITE_SINGER_LIMIT, code: 403);
......
<?php
namespace App\Jobs;
use App\Enums\UserOfficialStatusEnum;
use App\Models\SystemConfig;
use App\Models\User;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Arr;
class UserSingerLimitJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public array $jPushMessage;
public array $wechatMessage;
public int $defaultLimit;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct(array $jPushMessage, array $wechatMessage)
{
$this->jPushMessage = $jPushMessage;
$this->wechatMessage = $wechatMessage;
$this->defaultLimit = SystemConfig::query()->where('identifier', 'svMC9TNFz2Acx8ccPdAIH')->value('content') ?? 3;
}
/**
* Execute the job.
*
* @return void
*/
public function handle(): void
{
}
}
......@@ -49,16 +49,4 @@ public function via(mixed $notifiable): array
}
private function getProjectName(): string
{
return Arr::get($this->activity, 'project.name', '');
}
/**
* @return bool
*/
private function hasProject(): bool
{
return !empty($this->getProjectName());
}
}
......
......@@ -42,17 +42,4 @@ public function via(mixed $notifiable): array
{
return [];
}
private function getProjectName(): string
{
return Arr::get($this->activity, 'project.name', '');
}
/**
* @return bool
*/
private function hasProject(): bool
{
return !empty($this->getProjectName());
}
}
......
......@@ -35,17 +35,4 @@ public function via(mixed $notifiable): array
{
return [];
}
private function getProjectName(): string
{
return Arr::get($this->activity, 'project.name', '');
}
/**
* @return bool
*/
private function hasProject(): bool
{
return !empty($this->getProjectName());
}
}
......
......@@ -53,12 +53,4 @@ public function via(mixed $notifiable): array
{
return [];
}
/**
* @return string
*/
protected function formatChangeLabel(): string
{
return collect($this->change)->map(fn($item) => sprintf('[%s]', $item))->join('、');
}
}
......
......@@ -2,9 +2,7 @@
namespace App\Providers;
use App\Channels\JPushNotificationChannel;
use App\Channels\SmsNotificationChannel;
use App\Channels\WechatNotificationChannel;
use App\Support\Model;
use Illuminate\Database\Events\QueryExecuted;
use Illuminate\Support\Facades\DB;
......@@ -22,8 +20,6 @@ class AppServiceProvider extends ServiceProvider
*/
public function register(): void
{
Notification::extend('wechat', static fn() => new WechatNotificationChannel);
Notification::extend('jPush', static fn() => new JPushNotificationChannel);
Notification::extend('sms', static fn() => new SmsNotificationChannel);
if (!$this->app->isProduction()) {
......
......@@ -25,7 +25,6 @@
"hikoon/laravel-api": "0.1.4.9",
"hikoon/laravel-jwt": "^0.1.3",
"inertiajs/inertia-laravel": "^0.6.11",
"jpush/jpush": "^3.6",
"laravel/framework": "^9.52.4",
"laravel/horizon": "^5.19",
"laravel/octane": "^1.3",
......@@ -33,7 +32,6 @@
"laravel/tinker": "^2.7",
"lorisleiva/laravel-actions": "^2.7",
"overtrue/laravel-easy-sms": "^2.1",
"overtrue/laravel-wechat": "^7.1",
"pbmedia/laravel-ffmpeg": "^8.3",
"tencent/tls-sig-api-v2": "^1.1",
"torann/geoip": "^3.0",
......
......@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "5b6123f121cdae0e82e10fa177d1da85",
"content-hash": "638f5028cdbfdd0a0242652abeccfacf",
"packages": [
{
"name": "adbario/php-dot-notation",
......@@ -2528,53 +2528,6 @@
"time": "2023-10-27T10:59:02+00:00"
},
{
"name": "jpush/jpush",
"version": "v3.6.8",
"source": {
"type": "git",
"url": "https://github.com/jpush/jpush-api-php-client.git",
"reference": "ebb191e8854a35c3fb7a6626028b3a23132cbe2c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/jpush/jpush-api-php-client/zipball/ebb191e8854a35c3fb7a6626028b3a23132cbe2c",
"reference": "ebb191e8854a35c3fb7a6626028b3a23132cbe2c",
"shasum": ""
},
"require": {
"ext-curl": "*",
"php": ">=5.3.3"
},
"require-dev": {
"phpunit/phpunit": "*"
},
"type": "library",
"autoload": {
"psr-4": {
"JPush\\": "src/JPush/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "JPush",
"email": "support@jpush.cn",
"homepage": "https://www.jpush.cn/",
"role": "Developer"
}
],
"description": "JPush API PHP Client",
"homepage": "https://github.com/jpush/jpush-api-php-client",
"support": {
"issues": "https://github.com/jpush/jpush-api-php-client/issues",
"source": "https://github.com/jpush/jpush-api-php-client/tree/v3.6.8"
},
"time": "2021-08-12T07:43:39+00:00"
},
{
"name": "laminas/laminas-diactoros",
"version": "2.24.0",
"source": {
......@@ -4420,149 +4373,6 @@
"time": "2023-02-08T01:06:31+00:00"
},
{
"name": "nyholm/psr7",
"version": "1.5.1",
"source": {
"type": "git",
"url": "https://github.com/Nyholm/psr7.git",
"reference": "f734364e38a876a23be4d906a2a089e1315be18a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Nyholm/psr7/zipball/f734364e38a876a23be4d906a2a089e1315be18a",
"reference": "f734364e38a876a23be4d906a2a089e1315be18a",
"shasum": ""
},
"require": {
"php": ">=7.1",
"php-http/message-factory": "^1.0",
"psr/http-factory": "^1.0",
"psr/http-message": "^1.0"
},
"provide": {
"psr/http-factory-implementation": "1.0",
"psr/http-message-implementation": "1.0"
},
"require-dev": {
"http-interop/http-factory-tests": "^0.9",
"php-http/psr7-integration-tests": "^1.0",
"phpunit/phpunit": "^7.5 || 8.5 || 9.4",
"symfony/error-handler": "^4.4"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.4-dev"
}
},
"autoload": {
"psr-4": {
"Nyholm\\Psr7\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Tobias Nyholm",
"email": "tobias.nyholm@gmail.com"
},
{
"name": "Martijn van der Ven",
"email": "martijn@vanderven.se"
}
],
"description": "A fast PHP7 implementation of PSR-7",
"homepage": "https://tnyholm.se",
"keywords": [
"psr-17",
"psr-7"
],
"support": {
"issues": "https://github.com/Nyholm/psr7/issues",
"source": "https://github.com/Nyholm/psr7/tree/1.5.1"
},
"funding": [
{
"url": "https://github.com/Zegnat",
"type": "github"
},
{
"url": "https://github.com/nyholm",
"type": "github"
}
],
"time": "2022-06-22T07:13:36+00:00"
},
{
"name": "nyholm/psr7-server",
"version": "1.0.2",
"source": {
"type": "git",
"url": "https://github.com/Nyholm/psr7-server.git",
"reference": "b846a689844cef114e8079d8c80f0afd96745ae3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Nyholm/psr7-server/zipball/b846a689844cef114e8079d8c80f0afd96745ae3",
"reference": "b846a689844cef114e8079d8c80f0afd96745ae3",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0",
"psr/http-factory": "^1.0",
"psr/http-message": "^1.0"
},
"require-dev": {
"nyholm/nsa": "^1.1",
"nyholm/psr7": "^1.3",
"phpunit/phpunit": "^7.0 || ^8.5 || ^9.3"
},
"type": "library",
"autoload": {
"psr-4": {
"Nyholm\\Psr7Server\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Tobias Nyholm",
"email": "tobias.nyholm@gmail.com"
},
{
"name": "Martijn van der Ven",
"email": "martijn@vanderven.se"
}
],
"description": "Helper classes to handle PSR-7 server requests",
"homepage": "http://tnyholm.se",
"keywords": [
"psr-17",
"psr-7"
],
"support": {
"issues": "https://github.com/Nyholm/psr7-server/issues",
"source": "https://github.com/Nyholm/psr7-server/tree/1.0.2"
},
"funding": [
{
"url": "https://github.com/Zegnat",
"type": "github"
},
{
"url": "https://github.com/nyholm",
"type": "github"
}
],
"time": "2021-05-12T11:11:27+00:00"
},
{
"name": "overtrue/easy-sms",
"version": "2.4.2",
"source": {
......@@ -4693,153 +4503,6 @@
"time": "2023-01-17T01:11:00+00:00"
},
{
"name": "overtrue/laravel-wechat",
"version": "7.2.0",
"source": {
"type": "git",
"url": "https://github.com/overtrue/laravel-wechat.git",
"reference": "2ef8b18b525e054838770c60bfcfbd30ac9ede65"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/overtrue/laravel-wechat/zipball/2ef8b18b525e054838770c60bfcfbd30ac9ede65",
"reference": "2ef8b18b525e054838770c60bfcfbd30ac9ede65",
"shasum": ""
},
"require": {
"illuminate/container": "^9.0|^10.0",
"w7corp/easywechat": "^6.0.0"
},
"require-dev": {
"brainmaestro/composer-git-hooks": "dev-master",
"jetbrains/phpstorm-attributes": "^1.0",
"laravel/framework": "^10.0",
"laravel/pint": "^1.5"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Overtrue\\LaravelWeChat\\ServiceProvider"
]
},
"hooks": {
"pre-commit": [
"composer check-style"
],
"pre-push": [
"composer check-style"
]
}
},
"autoload": {
"psr-4": {
"Overtrue\\LaravelWeChat\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "overtrue",
"email": "anzhengchao@gmail.com"
}
],
"description": "微信 SDK for Laravel",
"keywords": [
"laravel",
"sdk",
"wechat",
"weixin"
],
"support": {
"issues": "https://github.com/overtrue/laravel-wechat/issues",
"source": "https://github.com/overtrue/laravel-wechat/tree/7.2.0"
},
"funding": [
{
"url": "https://github.com/overtrue",
"type": "github"
}
],
"time": "2023-02-15T08:16:22+00:00"
},
{
"name": "overtrue/socialite",
"version": "4.8.0",
"source": {
"type": "git",
"url": "https://github.com/overtrue/socialite.git",
"reference": "e55fdf50f8003be8f03a85a7e5a5b7c5716f4c9a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/overtrue/socialite/zipball/e55fdf50f8003be8f03a85a7e5a5b7c5716f4c9a",
"reference": "e55fdf50f8003be8f03a85a7e5a5b7c5716f4c9a",
"shasum": ""
},
"require": {
"ext-json": "*",
"ext-openssl": "*",
"guzzlehttp/guzzle": "^7.0",
"php": ">=8.0.2",
"symfony/http-foundation": "^6.0",
"symfony/psr-http-message-bridge": "^2.1"
},
"require-dev": {
"jetbrains/phpstorm-attributes": "^1.0",
"laravel/pint": "^1.2",
"mockery/mockery": "^1.3",
"phpstan/phpstan": "^1.7",
"phpunit/phpunit": "^9.0"
},
"type": "library",
"autoload": {
"files": [
"src/Contracts/FactoryInterface.php",
"src/Contracts/UserInterface.php",
"src/Contracts/ProviderInterface.php"
],
"psr-4": {
"Overtrue\\Socialite\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "overtrue",
"email": "anzhengchao@gmail.com"
}
],
"description": "A collection of OAuth 2 packages.",
"keywords": [
"Feishu",
"login",
"oauth",
"qcloud",
"qq",
"social",
"wechat",
"weibo"
],
"support": {
"issues": "https://github.com/overtrue/socialite/issues",
"source": "https://github.com/overtrue/socialite/tree/4.8.0"
},
"funding": [
{
"url": "https://github.com/overtrue",
"type": "github"
}
],
"time": "2023-01-10T14:29:55+00:00"
},
{
"name": "pbmedia/laravel-ffmpeg",
"version": "8.3.0",
"dist": {
......@@ -4981,60 +4644,6 @@
"time": "2022-12-09T13:57:05+00:00"
},
{
"name": "php-http/message-factory",
"version": "v1.0.2",
"source": {
"type": "git",
"url": "https://github.com/php-http/message-factory.git",
"reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-http/message-factory/zipball/a478cb11f66a6ac48d8954216cfed9aa06a501a1",
"reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1",
"shasum": ""
},
"require": {
"php": ">=5.4",
"psr/http-message": "^1.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"psr-4": {
"Http\\Message\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Márk Sági-Kazár",
"email": "mark.sagikazar@gmail.com"
}
],
"description": "Factory interfaces for PSR-7 HTTP Message",
"homepage": "http://php-http.org",
"keywords": [
"factory",
"http",
"message",
"stream",
"uri"
],
"support": {
"issues": "https://github.com/php-http/message-factory/issues",
"source": "https://github.com/php-http/message-factory/tree/master"
},
"time": "2015-12-19T14:08:53+00:00"
},
{
"name": "phpoption/phpoption",
"version": "1.9.1",
"source": {
......@@ -6422,197 +6031,40 @@
"time": "2023-02-14T08:44:56+00:00"
},
{
"name": "symfony/event-dispatcher-contracts",
"version": "v3.2.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher-contracts.git",
"reference": "0ad3b6f1e4e2da5690fefe075cd53a238646d8dd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/0ad3b6f1e4e2da5690fefe075cd53a238646d8dd",
"reference": "0ad3b6f1e4e2da5690fefe075cd53a238646d8dd",
"shasum": ""
},
"require": {
"php": ">=8.1",
"psr/event-dispatcher": "^1"
},
"suggest": {
"symfony/event-dispatcher-implementation": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "3.3-dev"
},
"thanks": {
"name": "symfony/contracts",
"url": "https://github.com/symfony/contracts"
}
},
"autoload": {
"psr-4": {
"Symfony\\Contracts\\EventDispatcher\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Generic abstractions related to dispatching event",
"homepage": "https://symfony.com",
"keywords": [
"abstractions",
"contracts",
"decoupling",
"interfaces",
"interoperability",
"standards"
],
"support": {
"source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.2.1"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2023-03-01T10:32:47+00:00"
},
{
"name": "symfony/finder",
"version": "v6.2.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
"reference": "20808dc6631aecafbe67c186af5dcb370be3a0eb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/20808dc6631aecafbe67c186af5dcb370be3a0eb",
"reference": "20808dc6631aecafbe67c186af5dcb370be3a0eb",
"shasum": ""
},
"require": {
"php": ">=8.1"
},
"require-dev": {
"symfony/filesystem": "^6.0"
},
"type": "library",
"autoload": {
"psr-4": {
"Symfony\\Component\\Finder\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Finds files and directories via an intuitive fluent interface",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/finder/tree/v6.2.7"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2023-02-16T09:57:23+00:00"
},
{
"name": "symfony/http-client",
"version": "v6.2.7",
"name": "symfony/event-dispatcher-contracts",
"version": "v3.2.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-client.git",
"reference": "0a5be6cbc570ae23b51b49d67341f378629d78e4"
"url": "https://github.com/symfony/event-dispatcher-contracts.git",
"reference": "0ad3b6f1e4e2da5690fefe075cd53a238646d8dd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-client/zipball/0a5be6cbc570ae23b51b49d67341f378629d78e4",
"reference": "0a5be6cbc570ae23b51b49d67341f378629d78e4",
"url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/0ad3b6f1e4e2da5690fefe075cd53a238646d8dd",
"reference": "0ad3b6f1e4e2da5690fefe075cd53a238646d8dd",
"shasum": ""
},
"require": {
"php": ">=8.1",
"psr/log": "^1|^2|^3",
"symfony/deprecation-contracts": "^2.1|^3",
"symfony/http-client-contracts": "^3",
"symfony/service-contracts": "^1.0|^2|^3"
},
"provide": {
"php-http/async-client-implementation": "*",
"php-http/client-implementation": "*",
"psr/http-client-implementation": "1.0",
"symfony/http-client-implementation": "3.0"
"psr/event-dispatcher": "^1"
},
"require-dev": {
"amphp/amp": "^2.5",
"amphp/http-client": "^4.2.1",
"amphp/http-tunnel": "^1.0",
"amphp/socket": "^1.1",
"guzzlehttp/promises": "^1.4",
"nyholm/psr7": "^1.0",
"php-http/httplug": "^1.0|^2.0",
"psr/http-client": "^1.0",
"symfony/dependency-injection": "^5.4|^6.0",
"symfony/http-kernel": "^5.4|^6.0",
"symfony/process": "^5.4|^6.0",
"symfony/stopwatch": "^5.4|^6.0"
"suggest": {
"symfony/event-dispatcher-implementation": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "3.3-dev"
},
"thanks": {
"name": "symfony/contracts",
"url": "https://github.com/symfony/contracts"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\HttpClient\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
"Symfony\\Contracts\\EventDispatcher\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
......@@ -6628,10 +6080,18 @@
"homepage": "https://symfony.com/contributors"
}
],
"description": "Provides powerful methods to fetch HTTP resources synchronously or asynchronously",
"description": "Generic abstractions related to dispatching event",
"homepage": "https://symfony.com",
"keywords": [
"abstractions",
"contracts",
"decoupling",
"interfaces",
"interoperability",
"standards"
],
"support": {
"source": "https://github.com/symfony/http-client/tree/v6.2.7"
"source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.2.1"
},
"funding": [
{
......@@ -6647,44 +6107,35 @@
"type": "tidelift"
}
],
"time": "2023-02-21T10:54:55+00:00"
"time": "2023-03-01T10:32:47+00:00"
},
{
"name": "symfony/http-client-contracts",
"version": "v3.2.1",
"name": "symfony/finder",
"version": "v6.2.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-client-contracts.git",
"reference": "df2ecd6cb70e73c1080e6478aea85f5f4da2c48b"
"url": "https://github.com/symfony/finder.git",
"reference": "20808dc6631aecafbe67c186af5dcb370be3a0eb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/df2ecd6cb70e73c1080e6478aea85f5f4da2c48b",
"reference": "df2ecd6cb70e73c1080e6478aea85f5f4da2c48b",
"url": "https://api.github.com/repos/symfony/finder/zipball/20808dc6631aecafbe67c186af5dcb370be3a0eb",
"reference": "20808dc6631aecafbe67c186af5dcb370be3a0eb",
"shasum": ""
},
"require": {
"php": ">=8.1"
},
"suggest": {
"symfony/http-client-implementation": ""
"require-dev": {
"symfony/filesystem": "^6.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "3.3-dev"
},
"thanks": {
"name": "symfony/contracts",
"url": "https://github.com/symfony/contracts"
}
},
"autoload": {
"psr-4": {
"Symfony\\Contracts\\HttpClient\\": ""
"Symfony\\Component\\Finder\\": ""
},
"exclude-from-classmap": [
"/Test/"
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
......@@ -6693,26 +6144,18 @@
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Generic abstractions related to HTTP clients",
"description": "Finds files and directories via an intuitive fluent interface",
"homepage": "https://symfony.com",
"keywords": [
"abstractions",
"contracts",
"decoupling",
"interfaces",
"interoperability",
"standards"
],
"support": {
"source": "https://github.com/symfony/http-client-contracts/tree/v3.2.1"
"source": "https://github.com/symfony/finder/tree/v6.2.7"
},
"funding": [
{
......@@ -6728,7 +6171,7 @@
"type": "tidelift"
}
],
"time": "2023-03-01T10:32:47+00:00"
"time": "2023-02-16T09:57:23+00:00"
},
{
"name": "symfony/http-foundation",
......@@ -7658,85 +7101,6 @@
"time": "2022-11-03T14:55:06+00:00"
},
{
"name": "symfony/polyfill-php81",
"version": "v1.27.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php81.git",
"reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/707403074c8ea6e2edaf8794b0157a0bfa52157a",
"reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Php81\\": ""
},
"classmap": [
"Resources/stubs"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"polyfill",
"portable",
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php81/tree/v1.27.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2022-11-03T14:55:06+00:00"
},
{
"name": "symfony/polyfill-uuid",
"version": "v1.27.0",
"source": {
......@@ -8679,57 +8043,6 @@
"time": "2020-12-02T07:22:57+00:00"
},
{
"name": "thenorthmemory/xml",
"version": "1.1.1",
"source": {
"type": "git",
"url": "https://github.com/TheNorthMemory/xml.git",
"reference": "6f50c63450a0b098772423f8bdc3c4ad2c4c30bb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/TheNorthMemory/xml/zipball/6f50c63450a0b098772423f8bdc3c4ad2c4c30bb",
"reference": "6f50c63450a0b098772423f8bdc3c4ad2c4c30bb",
"shasum": ""
},
"require": {
"ext-libxml": "*",
"ext-simplexml": "*",
"php": ">=7.1.2"
},
"require-dev": {
"phpstan/phpstan": "^0.12.89 || ^1.0",
"phpunit/phpunit": "^7.5 || ^8.5.16 || ^9.3.5"
},
"type": "library",
"autoload": {
"psr-4": {
"TheNorthMemory\\Xml\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"Apache-2.0"
],
"authors": [
{
"name": "James ZHANG",
"homepage": "https://github.com/TheNorthMemory"
}
],
"description": "A wrapper of the XML parser and builder",
"homepage": "https://github.com/TheNorthMemory/xml",
"keywords": [
"xml-builder",
"xml-parser"
],
"support": {
"issues": "https://github.com/TheNorthMemory/xml/issues",
"source": "https://github.com/TheNorthMemory/xml/tree/1.1.1"
},
"time": "2023-01-15T06:01:13+00:00"
},
{
"name": "tijsverkoyen/css-to-inline-styles",
"version": "2.2.6",
"source": {
......@@ -9135,106 +8448,6 @@
"time": "2022-03-08T17:03:00+00:00"
},
{
"name": "w7corp/easywechat",
"version": "6.11.2",
"source": {
"type": "git",
"url": "https://github.com/w7corp/easywechat.git",
"reference": "515c09e187c9eb84cef46f0086a66e1e20e8a80b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/w7corp/easywechat/zipball/515c09e187c9eb84cef46f0086a66e1e20e8a80b",
"reference": "515c09e187c9eb84cef46f0086a66e1e20e8a80b",
"shasum": ""
},
"require": {
"ext-curl": "*",
"ext-fileinfo": "*",
"ext-libxml": "*",
"ext-openssl": "*",
"ext-simplexml": "*",
"ext-sodium": "*",
"monolog/monolog": "^2.2|^3.0",
"nyholm/psr7": "^1.5",
"nyholm/psr7-server": "^1.0",
"overtrue/socialite": "^3.5.4|^4.0.1",
"php": ">=8.0.2",
"psr/http-client": "^1.0",
"psr/simple-cache": "^1.0|^2.0|^3.0",
"symfony/cache": "^5.4|^6.0",
"symfony/http-client": "^5.4|^6.0",
"symfony/http-foundation": "^5.4|^6.0",
"symfony/mime": "^5.4|^6.0",
"symfony/polyfill-php81": "^1.25",
"symfony/psr-http-message-bridge": "^2.1.2",
"thenorthmemory/xml": "^1.0"
},
"require-dev": {
"brainmaestro/composer-git-hooks": "^2.8",
"jetbrains/phpstorm-attributes": "^1.0",
"laravel/pint": "^1.2",
"mikey179/vfsstream": "^1.6",
"mockery/mockery": "^1.4.4",
"phpstan/phpstan": "^1.0",
"phpunit/phpunit": "^9.5",
"symfony/var-dumper": "^5.2"
},
"type": "library",
"extra": {
"hooks": {
"pre-commit": [
"composer check-style",
"composer phpstan",
"composer test"
],
"pre-push": [
"composer check-style"
],
"config": {
"stop-on-failure": [
"pre-commit",
"pre-push"
]
}
}
},
"autoload": {
"psr-4": {
"EasyWeChat\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "overtrue",
"email": "anzhengchao@gmail.com"
}
],
"description": "微信SDK",
"keywords": [
"easywechat",
"sdk",
"wechat",
"weixin",
"weixin-sdk"
],
"support": {
"issues": "https://github.com/w7corp/easywechat/issues",
"source": "https://github.com/w7corp/easywechat/tree/6.11.2"
},
"funding": [
{
"url": "https://github.com/overtrue",
"type": "github"
}
],
"time": "2023-03-16T07:09:44+00:00"
},
{
"name": "webmozart/assert",
"version": "1.11.0",
"source": {
......
......@@ -213,8 +213,7 @@
*/
'aliases' => Facade::defaultAliases()->merge([
'EasyWeChat' => Overtrue\LaravelWeChat\EasyWeChat::class,
'GeoIP' => \Torann\GeoIP\Facades\GeoIP::class,
'GeoIP' => \Torann\GeoIP\Facades\GeoIP::class,
// 'ExampleClass' => App\Example\ExampleClass::class,
])->toArray(),
......
<?php
return [
/*
* 默认配置,将会合并到各模块中
*/
'defaults' => [
'http' => [
'timeout' => 5.0,
],
],
/*
* 公众号
*/
'official_account' => [
'default' => [
'app_id' => env('WECHAT_OFFICIAL_ACCOUNT_APPID', ''), // AppID
'secret' => env('WECHAT_OFFICIAL_ACCOUNT_SECRET', ''), // AppSecret
'token' => env('WECHAT_OFFICIAL_ACCOUNT_TOKEN', ''), // Token
'aes_key' => env('WECHAT_OFFICIAL_ACCOUNT_AES_KEY', ''), // EncodingAESKey
/*
* OAuth 配置
*
* scopes:公众平台(snsapi_userinfo / snsapi_base),开放平台:snsapi_login
* callback:OAuth授权完成后的回调页地址(如果使用中间件,则随便填写。。。)
* enforce_https:是否强制使用 HTTPS 跳转
*/
// 'oauth' => [
// 'scopes' => array_map('trim', explode(',', env('WECHAT_OFFICIAL_ACCOUNT_OAUTH_SCOPES', 'snsapi_userinfo'))),
// 'callback' => env('WECHAT_OFFICIAL_ACCOUNT_OAUTH_CALLBACK', '/examples/oauth_callback.php'),
// 'enforce_https' => true,
// ],
/**
* 接口请求相关配置,超时时间等,具体可用参数请参考:
* https://github.com/symfony/symfony/blob/6.0/src/Symfony/Contracts/HttpClient/HttpClientInterface.php#L26
*/
'http' => [
'timeout' => 5.0,
'base_uri' => 'https://api.weixin.qq.com/',
],
],
],
/*
* 开放平台第三方平台
*/
// 'open_platform' => [
// 'default' => [
// 'app_id' => env('WECHAT_OPEN_PLATFORM_APPID', ''),
// 'secret' => env('WECHAT_OPEN_PLATFORM_SECRET', ''),
// 'token' => env('WECHAT_OPEN_PLATFORM_TOKEN', ''),
// 'aes_key' => env('WECHAT_OPEN_PLATFORM_AES_KEY', ''),
/**
* 接口请求相关配置,超时时间等,具体可用参数请参考:
* https://github.com/symfony/symfony/blob/6.0/src/Symfony/Contracts/HttpClient/HttpClientInterface.php#L26
*/
// 'http' => [
// 'timeout' => 5.0,
// // 如果你在国外想要覆盖默认的 url 的时候才使用,根据不同的模块配置不同的 uri
// 'base_uri' => 'https://api.weixin.qq.com/',
// ],
// ],
// ],
/*
* 小程序
*/
'mini_app' => [
'default' => [
'app_id' => env('WECHAT_MINI_APP_APPID', ''),
'secret' => env('WECHAT_MINI_APP_SECRET', ''),
'token' => env('WECHAT_MINI_APP_TOKEN', ''),
'aes_key' => env('WECHAT_MINI_APP_AES_KEY', ''),
/**
* 接口请求相关配置,超时时间等,具体可用参数请参考:
* https://github.com/symfony/symfony/blob/6.0/src/Symfony/Contracts/HttpClient/HttpClientInterface.php#L26
*/
'http' => [
'timeout' => 5.0,
'base_uri' => 'https://api.weixin.qq.com/',
],
],
],
/*
* 微信支付
*/
// 'pay' => [
// 'default' => [
// 'app_id' => env('WECHAT_PAY_APPID', ''),
// 'mch_id' => env('WECHAT_PAY_MCH_ID', 'your-mch-id'),
// 'private_key' => '/data/private/certs/apiclient_key.pem',
// 'certificate' => '/data/private/certs/apiclient_cert.pem',
// 'notify_url' => 'http://example.com/payments/wechat-notify', // 默认支付结果通知地址
// /**
// * 证书序列号,可通过命令从证书获取:
// * `openssl x509 -in application_cert.pem -noout -serial`
// */
// 'certificate_serial_no' => '6F2BADBE1738B07EE45C6A85C5F86EE343CAABC3',
//
// 'http' => [
// 'base_uri' => 'https://api.mch.weixin.qq.com/',
// ],
//
// // v2 API 秘钥
// //'v2_secret_key' => '26db3e15cfedb44abfbb5fe94fxxxxx',
//
// // v3 API 秘钥
// //'secret_key' => '43A03299A3C3FED3D8CE7B820Fxxxxx',
//
// // 注意 此处为微信支付平台证书 https://pay.weixin.qq.com/wiki/doc/apiv3/apis/wechatpay5_1.shtml
// 'platform_certs' => [
// '/data/private/certs/platform_key.pem',
// ],
// ],
// ],
/*
* 企业微信
*/
// 'work' => [
// 'default' => [
// 'corp_id' => env('WECHAT_WORK_CORP_ID', ''),
// 'secret' => env('WECHAT_WORK_SECRET', ''),
// 'token' => env('WECHAT_WORK_TOKEN', ''),
// 'aes_key' => env('WECHAT_WORK_AES_KEY', ''),
/**
* 接口请求相关配置,超时时间等,具体可用参数请参考:
* https://github.com/symfony/symfony/blob/6.0/src/Symfony/Contracts/HttpClient/HttpClientInterface.php#L26
*/
// 'http' => [
// 'timeout' => 5.0,
// // 如果你在国外想要覆盖默认的 url 的时候才使用,根据不同的模块配置不同的 uri
// 'base_uri' => 'https://api.weixin.qq.com/',
// ],
// ],
// ],
/*
* 企业微信开放平台
*/
// 'open_work' => [
// 'default' => [
// 'corp_id' => env('WECHAT_OPEN_WORK_CORP_ID', ''),
// 'provider_secret' => env('WECHAT_OPEN_WORK_SECRET', ''),
// 'token' => env('WECHAT_OPEN_WORK_TOKEN', ''),
// 'aes_key' => env('WECHAT_OPEN_WORK_AES_KEY', ''),
/**
* 接口请求相关配置,超时时间等,具体可用参数请参考:
* https://github.com/symfony/symfony/blob/6.0/src/Symfony/Contracts/HttpClient/HttpClientInterface.php#L26
*/
// 'http' => [
// 'timeout' => 5.0,
// // 如果你在国外想要覆盖默认的 url 的时候才使用,根据不同的模块配置不同的 uri
// 'base_uri' => 'https://api.weixin.qq.com/',
// ],
// ],
// ],
];
......@@ -117,18 +117,6 @@
'emergency' => [
'path' => storage_path('logs/laravel.log'),
],
'wechat' => [
'driver' => 'daily',
'path' => storage_path('logs/wechat.log'),
'level' => env('LOG_LEVEL', 'debug'),
'days' => 7,
],
'jpush' => [
'driver' => 'daily',
'path' => storage_path('logs/jpush.log'),
'level' => env('LOG_LEVEL', 'debug'),
'days' => 7,
],
'im' => [
'driver' => 'daily',
'path' => storage_path('logs/im.log'),
......
......@@ -37,12 +37,6 @@
'secret' => env('IM_SECRET', ''),
'prefix' => env('IM_PREFIX', ''),
],
'jpush' => [
'key' => env('JPUSH_KEY', ''),
'secret' => env('JPUSH_SECRET', ''),
'apns_production' => env('JPUSH_APNS_PRODUCTION', false),
'prefix' => env('JPUSH_PREFIX', '')
],
'easy-sms' => [
'timeout' => 5.0,
'default' => [
......