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
5ae1ea18
Commit
5ae1ea18
authored
Mar 14, 2022
by
刘鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat : 星链 倾诉日志更改参数
parent
34f14462
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
80 additions
and
33 deletions
+80
-33
config.gradle
config.gradle
+4
-5
AudioHomeActivity.kt
m-audioim/src/main/java/com/ydl/audioim/AudioHomeActivity.kt
+0
-0
YDLavManager.kt
m-audioim/src/main/java/com/ydl/audioim/YDLavManager.kt
+26
-2
CallEventRequestBody.kt
m-audioim/src/main/java/com/ydl/audioim/bean/CallEventRequestBody.kt
+12
-0
AudioApiRequestUtil.kt
m-audioim/src/main/java/com/ydl/audioim/http/AudioApiRequestUtil.kt
+35
-13
AudioNetAPi.kt
m-audioim/src/main/java/com/ydl/audioim/http/AudioNetAPi.kt
+2
-7
ConsultantAudioHomeActivity.kt
m-audioim/src/main/java/com/ydl/consultantim/ConsultantAudioHomeActivity.kt
+1
-6
No files found.
config.gradle
View file @
5ae1ea18
...
...
@@ -5,7 +5,7 @@ ext {
ydlPublishVersion
=
[
// -------------- 业务模块 --------------
//第三步 若干
"m-confide"
:
"0.0.49.2
5
"
,
"m-confide"
:
"0.0.49.2
8
"
,
"m-consultant"
:
"0.0.60.03"
,
"m-fm"
:
"0.0.30.04"
,
"m-user"
:
"0.0.61.94"
,
...
...
@@ -39,7 +39,7 @@ ext {
"ydl-webview"
:
"0.0.38.47"
,
"ydl-media"
:
"0.0.21.42"
,
"ydl-pay"
:
"0.0.18.19"
,
"m-audioim"
:
"0.0.49.29.4
6
"
,
"m-audioim"
:
"0.0.49.29.4
9
"
,
"ydl-flutter-base"
:
"0.0.14.38"
,
//以下 几乎不会动
...
...
@@ -88,7 +88,7 @@ ext {
// -------------- 业务模块 --------------
//第三步 若干
"m-confide"
:
"0.0.49.2
5
"
,
"m-confide"
:
"0.0.49.2
8
"
,
"m-consultant"
:
"0.0.60.03"
,
"m-fm"
:
"0.0.30.07"
,
"m-user"
:
"0.0.61.94"
,
...
...
@@ -114,14 +114,13 @@ ext {
"m-dynamic-api"
:
"0.0.3.71"
,
//-------------- 功能组件 --------------
//第一步
"ydl-platform"
:
"0.0.40.77"
,
//第二步 若干
"ydl-webview"
:
"0.0.38.47"
,
"ydl-media"
:
"0.0.21.42"
,
"ydl-pay"
:
"0.0.18.19"
,
"m-audioim"
:
"0.0.49.29.4
6
"
,
"m-audioim"
:
"0.0.49.29.4
9
"
,
"ydl-flutter-base"
:
"0.0.14.38"
,
//以下 几乎不会动
...
...
m-audioim/src/main/java/com/ydl/audioim/AudioHomeActivity.kt
View file @
5ae1ea18
This diff is collapsed.
Click to expand it.
m-audioim/src/main/java/com/ydl/audioim/YDLavManager.kt
View file @
5ae1ea18
...
...
@@ -451,7 +451,8 @@ class YDLavManager {
if
(
TextUtils
.
isEmpty
(
userId
)
||
userId
?:
"0"
<=
"0"
)
{
//如果uid为空或小于等于0 ,则不进行登录,因为uid为0也会登录成功,会导致后面uid正确时无法登录
LogUtil
.
e
(
"[agora]login-uid:$userId"
)
AliYunRichLogsHelper
.
getInstance
().
sendRichLog
(
AliYunLogConfig
.
AGORA
,
"uid为空或小于等于0 ,则不进行登录 login-uid:$userId"
)
AliYunRichLogsHelper
.
getInstance
()
.
sendRichLog
(
AliYunLogConfig
.
AGORA
,
"uid为空或小于等于0 ,则不进行登录 login-uid:$userId"
)
return
}
isOnlineRtm
=
true
...
...
@@ -687,7 +688,10 @@ class YDLavManager {
override
fun
onMessageReceived
(
message
:
RTMMesssage
,
userId
:
Int
)
{
LogUtil
.
i
(
"[agora]onMessageReceived:${message.text} -->uid:$userId"
)
AliYunRichLogsHelper
.
getInstance
()
.
sendRichLog
(
AliYunLogConfig
.
AGORA
,
"onMessageReceived:${message.text} -->uid:$userId"
)
.
sendRichLog
(
AliYunLogConfig
.
AGORA
,
"onMessageReceived:${message.text} -->uid:$userId"
)
}
override
fun
onConnectionStateChanged
(
state
:
Int
,
reason
:
Int
)
{
...
...
@@ -717,4 +721,23 @@ class YDLavManager {
}
}
}
/**
* 倾诉日志
* @param session 通话业务id
* @param status 状态:01通话中(不影响通话的事件) 10:拨打 20未拨通 30未接通 40 接通 50挂断 60断线 70重连 80 呼叫方信号 90 被呼叫方信号
* @param res 上报的详细
* @param line 载体:1.网易 2.中国移动(双呼)3.联通 4.华为 5.糖猫-联通 7:声网 8:微信 10:新移动
* */
fun
callEventSave
(
status
:
String
,
res
:
String
,
session
:
String
?,
line
:
String
)
{
AudioApiRequestUtil
.
callEventSave
(
session
,
line
,
status
,
res
)
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
()
}
}
\ No newline at end of file
m-audioim/src/main/java/com/ydl/audioim/bean/CallEventRequestBody.kt
0 → 100644
View file @
5ae1ea18
package
com.ydl.audioim.bean
/**
* 星链-倾诉日志请求参数
* */
data class
CallEventRequestBody
(
var
session
:
String
?,
var
line
:
String
,
var
status
:
String
,
var
response
:
String
,
var
eventTime
:
String
)
m-audioim/src/main/java/com/ydl/audioim/http/AudioApiRequestUtil.kt
View file @
5ae1ea18
...
...
@@ -2,6 +2,7 @@ package com.ydl.audioim.http
import
com.google.gson.Gson
import
com.ydl.audioim.bean.AgoraTokenResponse
import
com.ydl.audioim.bean.CallEventRequestBody
import
com.ydl.audioim.bean.ConnectBean
import
com.ydl.audioim.http.command.ConnectCommand
import
com.ydl.audioim.http.command.ConnectExceptionCommand
...
...
@@ -32,9 +33,9 @@ class AudioApiRequestUtil {
*/
fun
connectListen
(
cmd
:
ConnectCommand
):
Observable
<
BaseAPIResponse
<
ConnectBean
>>
{
return
RxUtils
.
mapObservable
(
cmd
)
.
flatMap
{
it
->
YDLHttpUtils
.
obtainApi
(
AudioNetAPi
::
class
.
java
).
connectListen
(
it
)
}
.
flatMap
{
it
->
YDLHttpUtils
.
obtainApi
(
AudioNetAPi
::
class
.
java
).
connectListen
(
it
)
}
}
/**
...
...
@@ -71,7 +72,10 @@ class AudioApiRequestUtil {
*/
fun
connectException
(
param
:
ConnectExceptionCommand
):
Observable
<
BaseAPIResponse
<
Any
>>
{
var
str
=
Gson
().
toJson
(
param
)
val
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json; charset=utf-8"
),
str
)
as
RequestBody
val
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json; charset=utf-8"
),
str
)
as
RequestBody
return
YDLHttpUtils
.
obtainApi
(
AudioNetAPi
::
class
.
java
).
connectException
(
body
)
}
...
...
@@ -80,7 +84,10 @@ class AudioApiRequestUtil {
*/
fun
noticeServerPush
(
param
:
NoticePushCommand
):
Observable
<
BaseResponse
<
Any
>>
{
var
str
=
Gson
().
toJson
(
param
)
val
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json; charset=utf-8"
),
str
)
as
RequestBody
val
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json; charset=utf-8"
),
str
)
as
RequestBody
return
YDLHttpUtils
.
obtainApi
(
AudioNetAPi
::
class
.
java
).
noticeServerPush
(
body
)
}
...
...
@@ -95,19 +102,33 @@ class AudioApiRequestUtil {
* 获取声网登录token
*/
fun
listenToken
(
cmd
:
ListenTokenCmd
):
Observable
<
BaseResponse
<
ListenTokenBean
>>
{
return
YDLHttpUtils
.
obtainApi
(
AudioNetAPi
::
class
.
java
).
listenToken
(
NetworkParamsUtils
.
getMaps
(
cmd
))
return
YDLHttpUtils
.
obtainApi
(
AudioNetAPi
::
class
.
java
)
.
listenToken
(
NetworkParamsUtils
.
getMaps
(
cmd
))
}
fun
callEndStatusUpdate
(
channelId
:
String
,
endStatus
:
Int
,
msg
:
String
):
Observable
<
BaseAPIResponse
<
Any
>>
{
return
YDLHttpUtils
.
obtainApi
(
AudioNetAPi
::
class
.
java
).
callEndStatusUpdate
(
channelId
,
endStatus
,
msg
)
fun
callEndStatusUpdate
(
channelId
:
String
,
endStatus
:
Int
,
msg
:
String
):
Observable
<
BaseAPIResponse
<
Any
>>
{
return
YDLHttpUtils
.
obtainApi
(
AudioNetAPi
::
class
.
java
)
.
callEndStatusUpdate
(
channelId
,
endStatus
,
msg
)
}
fun
callEventSave
(
session
:
String
?,
line
:
String
,
status
:
String
,
reponse
:
String
):
Observable
<
BaseAPIResponse
<
Any
>>
{
fun
callEventSave
(
session
:
String
?,
line
:
String
,
status
:
String
,
response
:
String
):
Observable
<
BaseAPIResponse
<
Any
>>
{
var
eventTime
=
TimeUtil
.
getNowDatetime
()
return
YDLHttpUtils
.
obtainApi
(
AudioNetAPi
::
class
.
java
).
callEventSave
(
session
,
eventTime
,
line
,
status
,
reponse
)
var
param
=
CallEventRequestBody
(
session
,
line
,
status
,
response
,
eventTime
);
var
str
=
Gson
().
toJson
(
param
)
val
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json; charset=utf-8"
),
str
)
as
RequestBody
return
YDLHttpUtils
.
obtainApi
(
AudioNetAPi
::
class
.
java
).
callEventSave
(
body
)
}
}
}
\ No newline at end of file
m-audioim/src/main/java/com/ydl/audioim/http/AudioNetAPi.kt
View file @
5ae1ea18
...
...
@@ -76,11 +76,5 @@ interface AudioNetAPi {
//倾诉事件上报接口
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
,
"Content-Type:application/json"
)
@POST
(
"call/v1/event/save"
)
fun
callEventSave
(
@Query
(
"session"
)
session
:
String
?,
@Query
(
"eventTime"
)
eventTime
:
String
,
@Query
(
"line"
)
line
:
String
,
@Query
(
"status"
)
status
:
String
,
@Query
(
"reponse"
)
reponse
:
String
):
Observable
<
BaseAPIResponse
<
Any
>>
fun
callEventSave
(
@Body
body
:
RequestBody
):
Observable
<
BaseAPIResponse
<
Any
>>
}
\ No newline at end of file
m-audioim/src/main/java/com/ydl/consultantim/ConsultantAudioHomeActivity.kt
View file @
5ae1ea18
...
...
@@ -24,7 +24,6 @@ import com.tbruyelle.rxpermissions2.RxPermissions
import
com.ydl.audioim.BuildConfig
import
com.ydl.audioim.R
import
com.ydl.audioim.YDLavManager
import
com.ydl.audioim.http.AudioApiRequestUtil
import
com.ydl.audioim.http.command.ConnectExceptionCommand
import
com.ydl.audioim.http.command.PayLoad
import
com.ydl.audioim.player.AudioPlayer
...
...
@@ -1111,10 +1110,6 @@ class ConsultantAudioHomeActivity :
session
:
String
?
=
channelToken
,
line
:
String
=
"7"
)
{
AudioApiRequestUtil
.
callEventSave
(
session
,
line
,
status
,
res
)
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
()
YDLavManager
.
instances
.
callEventSave
(
status
,
res
,
session
,
line
)
}
}
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