Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
app_push
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ikcrm_server
app_push
Commits
ec90dccb
Commit
ec90dccb
authored
May 28, 2020
by
liangyuzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据增长过快,暂时没有业务使用这张表停掉notification_statistic表统计
parent
aea41661
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
app/controllers/pushs_controller.rb
+1
-1
app/services/push_tool_client.rb
+4
-4
No files found.
app/controllers/pushs_controller.rb
View file @
ec90dccb
...
@@ -83,7 +83,7 @@ class PushsController < ApplicationController
...
@@ -83,7 +83,7 @@ class PushsController < ApplicationController
params
[
:sync_push
]
||=
false
params
[
:sync_push
]
||=
false
push_sync
(
params
[
:sync_push
],
{
device_ids_opts:
device_ids_opts
,
message:
message
,
app_type:
params
[
:app_type
],
igetui_opts:
igetui_opts
.
merge
(
pusher_type:
'push_message_to_list'
)})
push_sync
(
params
[
:sync_push
],
{
device_ids_opts:
device_ids_opts
,
message:
message
,
app_type:
params
[
:app_type
],
igetui_opts:
igetui_opts
.
merge
(
pusher_type:
'push_message_to_list'
)})
NotificationStatistic
.
create_by_params
(
igetui_opts
,
message
,
device_ids_opts
,
params
[
:app_type
])
#
NotificationStatistic.create_by_params(igetui_opts, message, device_ids_opts, params[:app_type])
render
json:
{
code:
0
,
message:
'success'
,
data:
{
remind:
"请使用新的api,此api近期将不再维护,请尽快迁移到新的api,新api地址 http://apidoc.weiwenjia.com/docs/internal-dev-api/internal-dev-api-1boq6ctdm8m57"
}}
render
json:
{
code:
0
,
message:
'success'
,
data:
{
remind:
"请使用新的api,此api近期将不再维护,请尽快迁移到新的api,新api地址 http://apidoc.weiwenjia.com/docs/internal-dev-api/internal-dev-api-1boq6ctdm8m57"
}}
...
...
app/services/push_tool_client.rb
View file @
ec90dccb
...
@@ -15,14 +15,14 @@ class PushToolClient
...
@@ -15,14 +15,14 @@ class PushToolClient
if
igetui_android_client_ids
.
present?
if
igetui_android_client_ids
.
present?
igetui_android_client_ids
.
each_pair
do
|
app_type
,
ids
|
igetui_android_client_ids
.
each_pair
do
|
app_type
,
ids
|
Igetui
::
Pusher
.
new
(
ids
,
@opts
.
merge
(
device_platform:
'android'
,
app_type:
app_type
)).
perform
Igetui
::
Pusher
.
new
(
ids
,
@opts
.
merge
(
device_platform:
'android'
,
app_type:
app_type
)).
perform
NotificationStatistic
.
static_notification
(
@opts
.
merge
(
app_type:
app_type
),
ids
,
'igetui'
,
'android'
)
#
NotificationStatistic.static_notification(@opts.merge(app_type: app_type), ids,'igetui', 'android' )
end
end
end
end
if
igetui_ios_client_ids
.
present?
if
igetui_ios_client_ids
.
present?
igetui_ios_client_ids
.
each_pair
do
|
app_type
,
ids
|
igetui_ios_client_ids
.
each_pair
do
|
app_type
,
ids
|
Igetui
::
Pusher
.
new
(
ids
,
@opts
.
merge
(
device_platform:
'ios'
,
app_type:
app_type
)).
perform
Igetui
::
Pusher
.
new
(
ids
,
@opts
.
merge
(
device_platform:
'ios'
,
app_type:
app_type
)).
perform
NotificationStatistic
.
static_notification
(
@opts
.
merge
(
app_type:
app_type
),
ids
,
'igetui'
,
'ios'
)
#
NotificationStatistic.static_notification(@opts.merge(app_type: app_type), ids,'igetui', 'ios' )
end
end
end
end
...
@@ -35,7 +35,7 @@ class PushToolClient
...
@@ -35,7 +35,7 @@ class PushToolClient
xiaomi_client_ids
.
each_pair
do
|
app_type
,
ids
|
xiaomi_client_ids
.
each_pair
do
|
app_type
,
ids
|
message
=
@opts
[
:message
].
merge
(
@opts
[
:message
][
:transmission_content
]
||
{})
message
=
@opts
[
:message
].
merge
(
@opts
[
:message
][
:transmission_content
]
||
{})
Xiaomi
::
Pusher
.
new
(
ids
,
message
,
app_type
).
perform
Xiaomi
::
Pusher
.
new
(
ids
,
message
,
app_type
).
perform
NotificationStatistic
.
static_notification
(
@opts
.
merge
(
app_type:
app_type
),
ids
,
'xiaomi'
)
#
NotificationStatistic.static_notification(@opts.merge(app_type: app_type), ids,'xiaomi')
end
end
end
end
...
@@ -44,7 +44,7 @@ class PushToolClient
...
@@ -44,7 +44,7 @@ class PushToolClient
huawei_client_ids
.
each_pair
do
|
app_type
,
ids
|
huawei_client_ids
.
each_pair
do
|
app_type
,
ids
|
message
=
@opts
[
:message
].
merge
(
@opts
[
:message
][
:transmission_content
]
||
{})
message
=
@opts
[
:message
].
merge
(
@opts
[
:message
][
:transmission_content
]
||
{})
Huawei
::
Pusher
.
new
(
ids
,
message
,
app_type
).
perform
Huawei
::
Pusher
.
new
(
ids
,
message
,
app_type
).
perform
NotificationStatistic
.
static_notification
(
@opts
.
merge
(
app_type:
app_type
),
ids
,
'huawei'
)
#
NotificationStatistic.static_notification(@opts.merge(app_type: app_type), ids,'huawei')
end
end
end
end
end
end
...
...
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