Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
7c78459d
Commit
7c78459d
authored
Feb 08, 2021
by
刘鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix openinstall渠道统计问题修复
parent
b0b34809
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
18 deletions
+26
-18
ActionCountUtils.kt
ydl-platform/src/main/java/com/ydl/ydlcommon/utils/actionutil/ActionCountUtils.kt
+26
-18
No files found.
ydl-platform/src/main/java/com/ydl/ydlcommon/utils/actionutil/ActionCountUtils.kt
View file @
7c78459d
...
...
@@ -107,6 +107,7 @@ class ActionCountUtils {
)
{
count
(
uid
,
partId
,
position
,
url
,
api
,
signs
=
*
arrayOf
(
sign1
))
}
/*
*
* 测试用埋点,现在服务端统一用百度埋点
...
...
@@ -196,34 +197,43 @@ class ActionCountUtils {
*/
fun
baiduCount
(
partId
:
String
,
position
:
String
,
convertType
:
Int
)
{
val
userId
=
ModularServiceManager
.
getPlatformUserService
()
?.
getUser
()
?.
userId
?:
""
baiduCount
(
userId
,
partId
,
position
,
""
,
""
,
convertType
,
""
)
baiduCount
(
userId
,
partId
,
position
,
""
,
""
,
convertType
,
""
)
}
/**
* 百度检测数据埋点调用的方法
*/
fun
baiduCount
(
partId
:
String
,
position
:
String
,
convertType
:
Int
,
openInstallKey
:
String
)
{
val
userId
=
ModularServiceManager
.
getPlatformUserService
()
?.
getUser
()
?.
userId
?:
""
baiduCount
(
userId
,
partId
,
position
,
""
,
""
,
convertType
,
""
)
baiduCount
(
userId
,
partId
,
position
,
""
,
""
,
convertType
,
openInstallKey
)
}
/**
* 百度检测数据埋点调用的方法
*/
fun
baiduCount
(
uid
:
String
?,
partId
:
String
,
position
:
String
,
url
:
String
,
api
:
String
,
convertType
:
Int
)
{
fun
baiduCount
(
uid
:
String
?,
partId
:
String
,
position
:
String
,
url
:
String
,
api
:
String
,
convertType
:
Int
)
{
val
userId
=
ModularServiceManager
.
getPlatformUserService
()
?.
getUser
()
?.
userId
?:
""
baiduCount
(
userId
,
partId
,
position
,
url
,
api
,
convertType
,
""
)
baiduCount
(
userId
,
partId
,
position
,
url
,
api
,
convertType
,
""
)
}
/**
* @param openInstallKey openInstall统计渠道的key和Value值
* */
fun
baiduCount
(
uid
:
String
?,
partId
:
String
,
position
:
String
,
url
:
String
,
api
:
String
,
convertType
:
Int
,
openInstallKey
:
String
?
uid
:
String
?,
partId
:
String
,
position
:
String
,
url
:
String
,
api
:
String
,
convertType
:
Int
,
openInstallKey
:
String
?
)
{
try
{
val
actionDataParams
=
ActionDataBean
.
Builder
()
...
...
@@ -265,13 +275,13 @@ class ActionCountUtils {
baiduActionDataParams
.
convertTime
(
System
.
currentTimeMillis
()
/
1000
)
baiduActionDataParams
.
appid
(
0
.
toLong
())
baiduActionDataParams
.
appName
(
appName
)
try
{
try
{
@SuppressLint
(
"HardwareIds"
)
val
id
=
Settings
.
Secure
.
getString
(
RxTool
.
getContext
().
contentResolver
,
Settings
.
Secure
.
ANDROID_ID
)
LogUtil
.
e
(
"androidid未加密:${id}"
)
LogUtil
.
e
(
"androidid未加密:${id}"
)
}
catch
(
e
:
java
.
lang
.
Exception
)
{
}
...
...
@@ -297,14 +307,12 @@ class ActionCountUtils {
actionDataParams
.
sign2
(
gson
)
actionDataParams
.
sign3
(
YdlCommonOut
.
getChannelName
())
//openInstall渠道统计
openInstallKey
?.
let
{
actionDataParams
.
sign4
(
it
)
}
openInstallKey
?.
let
{
actionDataParams
.
sign4
(
it
)
}
//剩余额外参数根据需求定义
//请求
ActionCountUtils
.
request
(
actionDataParams
.
build
())
}
catch
(
e
:
Exception
)
{
}
}
...
...
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