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
73727d29
Commit
73727d29
authored
Jul 07, 2021
by
霍志良
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/4.2.60' into 4.2.60
parents
ee80ff49
b8c73b1a
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
256 additions
and
103 deletions
+256
-103
config.gradle
config.gradle
+6
-6
SearchApi.kt
m-consultant/src/main/java/com/yidianling/consultant/model/SearchApi.kt
+13
-14
ConsultAssistantDialogUtils.kt
m-consultant/src/main/java/com/yidianling/consultant/modular/singlton/ConsultAssistantDialogUtils.kt
+0
-0
ConsultAssistantEntryUtils.kt
m-consultant/src/main/java/com/yidianling/consultant/modular/utils/ConsultAssistantEntryUtils.kt
+40
-38
ConsultantIn.kt
m-consultant/src/main/java/com/yidianling/consultant/router/ConsultantIn.kt
+15
-5
IMChatUtil.kt
m-im/src/main/java/com/yidianling/im/helper/IMChatUtil.kt
+84
-23
ImRetrofitApi.kt
m-im/src/main/java/com/yidianling/im/http/ImRetrofitApi.kt
+26
-2
IMServiceImpl.kt
m-im/src/main/java/com/yidianling/im/modular/service/IMServiceImpl.kt
+5
-0
CmsExamQuestionPaperActivity.kt
m-im/src/main/java/com/yidianling/im/ui/activity/CmsExamQuestionPaperActivity.kt
+0
-0
QuestionAdapter.java
m-im/src/main/java/com/yidianling/uikit/business/session/view/question/QuestionAdapter.java
+1
-1
QuestionOneCheckListener.kt
m-im/src/main/java/com/yidianling/uikit/business/session/view/question/QuestionOneCheckListener.kt
+2
-1
ServiceImpl.kt
m-im/src/main/java/com/yidianling/uikit/custom/http/ServiceImpl.kt
+12
-0
IImService.kt
m-im/src/main/modular_api/com/yidianling/im/api/service/IImService.kt
+52
-13
No files found.
config.gradle
View file @
73727d29
...
...
@@ -6,11 +6,11 @@ ext {
// -------------- 业务模块 --------------
//第三步 若干
"m-confide"
:
"0.0.49.09"
,
"m-consultant"
:
"0.0.59.8
8
"
,
"m-consultant"
:
"0.0.59.8
9
"
,
"m-fm"
:
"0.0.30.03"
,
"m-user"
:
"0.0.61.37"
,
"m-home"
:
"0.0.22.67"
,
"m-im"
:
"0.0.19.
29
"
,
"m-im"
:
"0.0.19.
31
"
,
"m-dynamic"
:
"0.0.7.24"
,
"m-article"
:
"0.0.0.10"
,
...
...
@@ -28,7 +28,7 @@ ext {
"m-tests-api"
:
"0.0.2"
,
"m-user-api"
:
"0.0.10.17"
,
"m-home-api"
:
"0.0.4.2"
,
"m-im-api"
:
"0.0.12.2
2
"
,
"m-im-api"
:
"0.0.12.2
3
"
,
"m-dynamic-api"
:
"0.0.3.71"
,
//-------------- 功能组件 --------------
...
...
@@ -89,11 +89,11 @@ ext {
//第三步 若干
"m-confide"
:
"0.0.49.09"
,
"m-consultant"
:
"0.0.59.8
8
"
,
"m-consultant"
:
"0.0.59.8
9
"
,
"m-fm"
:
"0.0.30.01"
,
"m-user"
:
"0.0.61.37"
,
"m-home"
:
"0.0.22.67"
,
"m-im"
:
"0.0.19.
29
"
,
"m-im"
:
"0.0.19.
31
"
,
"m-dynamic"
:
"0.0.7.24"
,
"m-article"
:
"0.0.0.8"
,
...
...
@@ -110,7 +110,7 @@ ext {
"m-tests-api"
:
"0.0.2"
,
"m-user-api"
:
"0.0.10.17"
,
"m-home-api"
:
"0.0.4.2"
,
"m-im-api"
:
"0.0.12.2
2
"
,
"m-im-api"
:
"0.0.12.2
3
"
,
"m-dynamic-api"
:
"0.0.3.71"
,
//-------------- 功能组件 --------------
...
...
m-consultant/src/main/java/com/yidianling/consultant/model/SearchApi.kt
View file @
73727d29
...
...
@@ -63,20 +63,6 @@ interface SearchApi {
fun
getConsultAssistantRequest
(
@Query
(
"switchKey"
)
switchKey
:
String
):
Observable
<
BaseAPIResponse
<
Boolean
>>
//获取咨询助理uid
/*
* location字段说明(sign1存储页面位置,1:首页导医入口进入2:M站入口进入3:问答列表页进入4:我的入口进入
* 5:情绪疏导在线咨询入口进入6:咨询列表页导医入口进入7:实用心理课入口进入8:实用心理课课程列表页进入9:测评解读页进入
* 10:搜索页面进入11:首页咨询列表进入12:厌学的真相在线咨询入口,0是小壹意向客户传0)
*
* ffrom_2 亲子教育添加字段
*naviType = "1";导医配置开关,返100跳转咨询tab,如果返其他则维持原有逻辑。
* */
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
,
"Content-Type:application/json"
)
@GET
(
"consult/assistant/chat-distribute"
)
fun
getConsultAssistantUidRequest
(
@Query
(
"location"
)
location
:
Int
,
@Query
(
"ffrom_2"
)
ffrom
:
String
?,
@Query
(
"naviType"
)
naviType
:
String
=
"1"
):
Observable
<
BaseAPIResponse
<
Long
>>
//获取咨询助理uid
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
,
"Content-Type:application/json"
)
@POST
(
"doctor/querySpecialTopic"
)
fun
getBigShotData
():
Observable
<
BaseAPIResponse
<
ExpertSearchTopShowBean
>>
...
...
@@ -93,4 +79,16 @@ interface SearchApi {
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
,
"Content-Type:application/json"
)
@GET
(
"consult/assistant/chat-time-setting"
)
fun
getJumpTypeRequest
():
Observable
<
BaseAPIResponse
<
Int
>>
/**
* 100 有配置接口
* */
@GET
(
"consult/assistant/chat-route-config"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
,
"Content-Type:application/json"
)
fun
getChatRouteConfig
(
@Query
(
"location"
)
location
:
Int
,
@Query
(
"naviType"
)
naviType
:
String
=
"1"
):
Observable
<
BaseAPIResponse
<
Long
>>
}
\ No newline at end of file
m-consultant/src/main/java/com/yidianling/consultant/modular/singlton/ConsultAssistantDialogUtils.kt
View file @
73727d29
This diff is collapsed.
Click to expand it.
m-consultant/src/main/java/com/yidianling/consultant/modular/utils/ConsultAssistantEntryUtils.kt
View file @
73727d29
...
...
@@ -7,14 +7,13 @@ import com.ydl.ydl_router.manager.YDLRouterManager
import
com.ydl.ydl_router.manager.YDLRouterParams
import
com.ydl.ydlcommon.data.http.ThrowableConsumer
import
com.ydl.ydlcommon.router.IYDLRouterConstant
import
com.ydl.ydlcommon.utils.ActivityManager
import
com.ydl.ydlcommon.utils.ActivityManager.Companion.getInstance
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.ydl.ydlnet.YDLHttpUtils
import
com.yidianling.common.tools.LogUtil
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.consultant.ConsultAssistantCenterActivity
import
com.yidianling.consultant.ExpertSearchActivity
import
com.yidianling.consultant.HotSearchActivity
import
com.yidianling.consultant.constants.ConsultBIConstants
import
com.yidianling.consultant.model.SearchApi
import
com.yidianling.consultant.router.ConsultantIn
...
...
@@ -27,15 +26,15 @@ import io.reactivex.schedulers.Schedulers
class
ConsultAssistantEntryUtils
{
companion
object
{
@SuppressLint
(
"CheckResult"
)
fun
jumpConsultAssistant
(
activity
:
Activity
,
location
:
Int
,
ffrom2
:
String
?)
{
fun
jumpConsultAssistant
(
activity
:
Activity
,
location
:
Int
,
ffrom2
:
String
?)
{
ActionCountUtils
.
count
(
ConsultBIConstants
.
POSITION_DAOYI_ADVERTISEMENT_CLICK
,
"$location"
)
if
(
ConsultantIn
.
loginByOneKeyLogin
(
activity
,
true
))
{
if
(
ConsultantIn
.
loginByOneKeyLogin
(
activity
,
true
))
{
// 请求接口获取咨询助理的uid
SearchApi
.
getSearchApi
().
getConsultAssistantUidRequest
(
location
,
ffrom2
)
YDLHttpUtils
.
obtainApi
(
SearchApi
::
class
.
java
).
getChatRouteConfig
(
location
)
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
(
Consumer
{
...
...
@@ -44,35 +43,35 @@ class ConsultAssistantEntryUtils {
* 7使用心理课进入,8使用心理课列表页进入,9测评解读页进入,10搜索页进入,11注册引导页
* 0小壹点击前往
* */
if
(
it
.
data
==
100L
&&(
location
<=
11
))
{
if
(
it
.
data
==
100L
&&
(
location
<=
11
))
{
//跳转咨询tab栏目
if
(
location
==
1
||
location
==
4
||
location
==
6
||
location
==
3
)
{
if
(
activity
is
ExpertSearchActivity
&&!
activity
.
isFinishing
)
{
if
(
location
==
1
||
location
==
4
||
location
==
6
||
location
==
3
)
{
if
(
activity
is
ExpertSearchActivity
&&
!
activity
.
isFinishing
)
{
activity
.
finish
()
}
EventBus
.
getDefault
().
post
(
HomeModuleTabEvent
(
2
))
}
else
{
if
(
activity
.
componentName
.
toString
().
contains
(
"CourseListContainerActivity"
)
){
}
else
{
if
(
activity
.
componentName
.
toString
()
.
contains
(
"CourseListContainerActivity"
)
)
{
getInstance
()
.
getSecondTaskActivity
()
?.
finish
()
activity
.
finish
()
}
else
{
if
(
null
!=
activity
&&!
activity
.
isFinishing
)
{
}
else
{
if
(
null
!=
activity
&&
!
activity
.
isFinishing
)
{
activity
.
finish
()
}
}
EventBus
.
getDefault
().
post
(
HomeModuleTabEvent
(
2
))
}
}
else
{
if
(
it
.
code
==
"200"
&&
it
.
data
!=
0
.
toLong
()
&&
null
!=
activity
)
{
}
else
if
(
it
.
data
==
0L
)
{
//去前置信息收集页
ConsultantIn
.
startP2PSession
(
activity
as
AppCompatActivity
,
it
.
data
.
toString
()
location
,
ffrom2
)
}
else
{
ToastUtil
.
toastShort
(
"咨询助理忙碌中,请稍后再试"
)
}
}
},
object
:
ThrowableConsumer
()
{
override
fun
accept
(
msg
:
String
)
{
...
...
@@ -84,31 +83,34 @@ class ConsultAssistantEntryUtils {
}
/*
* 根据Type0,1跳自主,2跳导医
* 在跳自主的(type=1)情况下,点击item是跳专家详情页
*
* */
/*
* 根据Type0,1跳自主,2跳导医
* 在跳自主的(type=1)情况下,点击item是跳专家详情页
*
* */
@SuppressLint
(
"CheckResult"
)
fun
getTypeJump
(
activity
:
Activity
,
location
:
Int
,
doctorUid
:
Int
,
url
:
String
?)
{
fun
getTypeJump
(
activity
:
Activity
,
location
:
Int
,
doctorUid
:
Int
,
url
:
String
?)
{
SearchApi
.
getSearchApi
().
getJumpTypeRequest
()
.
subscribeOn
((
Schedulers
.
io
()))
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
(
Consumer
{
when
(
it
.
code
)
{
"200"
->
{
when
(
it
.
data
)
{
0
->
{
.
subscribe
(
Consumer
{
when
(
it
.
code
)
{
"200"
->
{
when
(
it
.
data
)
{
0
->
{
jumpToAutoTalk
(
activity
,
doctorUid
)
}
1
->
{
if
(
url
.
isNullOrEmpty
()){
1
->
{
if
(
url
.
isNullOrEmpty
())
{
jumpToAutoTalk
(
activity
,
doctorUid
)
}
else
{
}
else
{
if
(
url
.
startsWith
(
"http"
))
{
YDLRouterManager
.
router
(
IYDLRouterConstant
.
ROUTER_H5_H5
,
YDLRouterParams
().
putExtra
(
IYDLRouterConstant
.
EXTRA_URL
,
url
),
""
YDLRouterParams
().
putExtra
(
IYDLRouterConstant
.
EXTRA_URL
,
url
),
""
)
}
else
{
YDLRouterManager
.
router
(
url
)
...
...
@@ -116,20 +118,20 @@ class ConsultAssistantEntryUtils {
}
}
2
->
{
jumpConsultAssistant
(
activity
,
location
,
null
)
2
->
{
jumpConsultAssistant
(
activity
,
location
,
null
)
}
else
->
{
else
->
{
jumpToAutoTalk
(
activity
,
doctorUid
)
LogUtil
.
e
(
it
.
data
.
toString
())
}
}
}
else
->
{
else
->
{
ToastUtil
.
toastShort
(
it
.
code
)
}
}
},
object
:
ThrowableConsumer
()
{
},
object
:
ThrowableConsumer
()
{
override
fun
accept
(
msg
:
String
)
{
ToastUtil
.
toastShort
(
msg
)
}
...
...
m-consultant/src/main/java/com/yidianling/consultant/router/ConsultantIn.kt
View file @
73727d29
...
...
@@ -2,7 +2,6 @@ package com.yidianling.consultant.router
import
android.app.Activity
import
android.content.Context
import
androidx.appcompat.app.AppCompatActivity
import
com.ydl.ydlcommon.modular.ModularServiceManager
import
com.yidianling.im.api.service.IImService
import
com.yidianling.user.api.service.IAppService
...
...
@@ -22,6 +21,7 @@ object ConsultantIn {
fun
getAppService
():
IAppService
{
return
ModularServiceManager
.
provide
(
IAppService
::
class
.
java
)
}
fun
getUserService
():
IUserService
{
return
ModularServiceManager
.
provide
(
IUserService
::
class
.
java
)
}
...
...
@@ -39,7 +39,14 @@ object ConsultantIn {
getImService
().
startP2PSession
(
context
,
toUid
)
}
fun
mainIntent
(
activity
:
Activity
){
/**
* 去前置信息收集页
* */
fun
startP2PSession
(
context
:
Activity
,
location
:
Int
,
ffrom2
:
String
?)
{
getImService
().
startP2PSession
(
context
,
location
,
ffrom2
)
}
fun
mainIntent
(
activity
:
Activity
)
{
getAppService
().
mainIntent
(
activity
)
}
...
...
@@ -48,7 +55,9 @@ object ConsultantIn {
}
fun
toLogin
(
activity
:
Activity
)
{
activity
.
startActivity
(
ModularServiceManager
.
provide
(
IUserService
::
class
.
java
).
loginWayIntent
(
activity
))
activity
.
startActivity
(
ModularServiceManager
.
provide
(
IUserService
::
class
.
java
).
loginWayIntent
(
activity
)
)
}
/**
...
...
@@ -56,7 +65,7 @@ object ConsultantIn {
* @param isOpenDialog true:一键登录使用弹窗展示 false:一键登录使用全屏模式
* @return true:已登录,不触发登录跳转,false:未登录,优先一键登录
* */
fun
loginByOneKeyLogin
(
context
:
Context
,
isOpenDialog
:
Boolean
)
:
Boolean
{
return
getUserService
().
loginByOneKeyLogin
(
context
,
isOpenDialog
)
fun
loginByOneKeyLogin
(
context
:
Context
,
isOpenDialog
:
Boolean
)
:
Boolean
{
return
getUserService
().
loginByOneKeyLogin
(
context
,
isOpenDialog
)
}
}
\ No newline at end of file
m-im/src/main/java/com/yidianling/im/helper/IMChatUtil.kt
View file @
73727d29
package
com.yidianling.im.helper
import
android.annotation.SuppressLint
import
android.app.Activity
import
android.content.Context
import
android.text.TextUtils
import
android.view.View
...
...
@@ -17,6 +18,7 @@ import com.ydl.ydlcommon.modular.ModularServiceManager
import
com.ydl.ydlcommon.ui.LoadingDialogFragment
import
com.ydl.ydlcommon.ui.LoadingDialogFragment.Companion.newInstance
import
com.ydl.ydlcommon.utils.NetworkParamsUtils
import
com.ydl.ydlcommon.utils.SharedPreferencesEditor
import
com.ydl.ydlcommon.utils.UserInfoCache
import
com.ydl.ydlcommon.utils.log.AliYunLogConfig
import
com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper
...
...
@@ -49,6 +51,7 @@ import com.yidianling.uikit.custom.http.response.RecommendExpertBean
import
com.yidianling.uikit.custom.widget.TitleBarBottom
import
com.yidianling.user.api.service.IUserService
import
io.reactivex.android.schedulers.AndroidSchedulers
import
io.reactivex.functions.Consumer
import
io.reactivex.schedulers.Schedulers
import
retrofit2.HttpException
import
java.net.URLEncoder
...
...
@@ -84,6 +87,58 @@ object IMChatUtil {
}
/**
* 跳转前置信息收集页
* */
@SuppressLint
(
"CheckResult"
)
fun
startCms
(
context
:
Activity
,
location
:
Int
,
ffrom2
:
String
?)
{
ImRetrofitApi
.
Companion
.
getImRetrofitApi
()
.
getSystemConfigByKeyword
(
"lx_collect_card_config"
)
.
compose
(
RxUtils
.
resultJavaData
())
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
{
val
skipTime
=
it
.
value1
.
toLong
()
if
(
isJumpToIm
(
skipTime
))
{
// 请求接口获取咨询助理的uid
getImJavaApi
().
getConsultAssistantUidRequest
(
location
,
ffrom2
)
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
{
uidBean
->
/*
* location=1首页,3问答列表页,4我的入口,5亲子在线咨询入口,6咨询列表页导医入口,
* 7使用心理课进入,8使用心理课列表页进入,9测评解读页进入,10搜索页进入,11注册引导页
* 0小壹点击前往
* */
if
(
uidBean
.
code
==
"200"
&&
uidBean
.
data
!=
0
.
toLong
())
{
startChat
(
context
as
AppCompatActivity
,
uidBean
.
data
.
toString
(),
0
)
}
else
{
ToastUtil
.
toastShort
(
"咨询助理忙碌中,请稍后再试"
)
}
}
}
else
{
//没有时间限制,跳转到前置信息收集
CmsExamQuestionPaperActivity
.
start
(
context
,
location
,
ffrom2
)
}
}
}
/***
* 判断今天是否展示过
* */
private
fun
isJumpToIm
(
skip_time
:
Long
):
Boolean
{
val
time
=
System
.
currentTimeMillis
()
val
skipTime
=
SharedPreferencesEditor
.
getString
(
"skip_time_"
)
if
(
skipTime
==
null
||
skipTime
.
isEmpty
())
{
return
false
}
val
timeDifference
=
(
time
-
skipTime
.
toLong
())
/
1000
return
timeDifference
<
skip_time
}
/**
* 私聊列表进入,后置数据请求
*
* @param context
...
...
@@ -107,7 +162,11 @@ object IMChatUtil {
.
subscribe
({
res
:
BaseResponse
<
UserTypeBean
>
->
if
(
res
.
code
==
200
&&
res
.
data
!=
null
)
{
if
(
res
.
data
!!
.
collectEvent
&&
TextUtils
.
equals
(
res
.
data
!!
.
userType
,
USER_TYPE_ASSISTANT
.
toString
()))
{
if
(
res
.
data
!!
.
collectEvent
&&
TextUtils
.
equals
(
res
.
data
!!
.
userType
,
USER_TYPE_ASSISTANT
.
toString
()
)
)
{
//和助理私聊需要打开信息采集弹窗
prepareAssistantChatData
(
context
,
...
...
@@ -119,12 +178,31 @@ object IMChatUtil {
.
compose
(
RxUtils
.
resultJavaData
())
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
{
.
subscribe
({
val
skipTime
=
it
.
value1
.
toLong
()
if
(
isJumpToIm
(
skipTime
))
{
SessionHelper
.
startP2PSession
(
context
,
chatItemBean
.
utype
,
chatItemBean
.
toUid
.
toString
(),
null
,
P2PCustomActionHandlerImpl
(
chatItemBean
)
)
}
else
{
CmsExamQuestionPaperActivity
.
start
(
context
,
chatItemBean
.
toUid
.
toString
(),
expertInfo
,
0
,
it
.
value1
)
0
,
it
.
value1
)
}
},{
SessionHelper
.
startP2PSession
(
context
,
chatItemBean
.
utype
,
chatItemBean
.
toUid
.
toString
(),
null
,
P2PCustomActionHandlerImpl
(
chatItemBean
)
)
})
}
})
}
else
{
...
...
@@ -218,30 +296,12 @@ object IMChatUtil {
})
{
t
:
Throwable
?
->
handleError
(
context
,
t
!!
)
}
}
else
if
(
TextUtils
.
equals
(
res
.
data
!!
.
userType
,
USER_TYPE_ASSISTANT
.
toString
()))
{
//助理
prepareAssistantChatData
(
context
,
toUid
,
object
:
ChatDataRequestListener
{
override
fun
onSuccess
(
expertInfo
:
IMExpertBuild
)
{
//新前置信息收集入口
ImRetrofitApi
.
Companion
.
getImRetrofitApi
()
.
getSystemConfigByKeyword
(
"lx_collect_card_config"
)
.
compose
(
RxUtils
.
resultJavaData
())
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
{
CmsExamQuestionPaperActivity
.
start
(
context
,
toUid
,
expertInfo
,
isFromQingShu
,
it
.
value1
)
}
}
})
}
else
{
prepareAssistantChatData
(
context
,
toUid
,
object
:
ChatDataRequestListener
{
override
fun
onSuccess
(
expertInfo
:
IMExpertBuild
)
{
startChatSession
(
toUid
,
expertInfo
,
isFromQingShu
,
context
)
}
})
}
}
else
{
if
(
loadingDialog
!=
null
&&
loadingDialog
!!
.
isVisible
)
{
...
...
@@ -254,7 +314,8 @@ object IMChatUtil {
loadingDialog
?.
dismissAllowingStateLoss
()
}
handleError
(
context
,
throwable
!!
)
})
}
)
}
...
...
m-im/src/main/java/com/yidianling/im/http/ImRetrofitApi.kt
View file @
73727d29
...
...
@@ -118,13 +118,18 @@ interface ImRetrofitApi {
/**已完成订单*/
@GET
(
"consult/user/order/affirmComplete"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
)
fun
affirmComplete
(
@Query
(
"id"
)
orderId
:
String
):
Observable
<
BaseAPIResponse
<
Any
>>
fun
affirmComplete
(
@Query
(
"id"
)
orderId
:
String
):
Observable
<
BaseAPIResponse
<
Any
>>
//回答问题接口
@POST
(
"chat/sendCustomizeMessage"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
)
fun
lingxiAnswerQuestion
(
@Body
body
:
RequestBody
):
Observable
<
BaseAPIResponse
<
Any
>>
//回答问题接口批量发送
@POST
(
"chat/batchSendCustomizeMessage"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
)
fun
batchSendCustomizeMessage
(
@Body
body
:
RequestBody
):
Observable
<
BaseAPIResponse
<
Any
>>
//发送通知接口
@POST
(
"chat/sendNoticeMessage"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
)
...
...
@@ -134,5 +139,23 @@ interface ImRetrofitApi {
/**已完成订单*/
@GET
(
"systemconfig/getSystemConfigByKeyword"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
)
fun
getSystemConfigByKeyword
(
@Query
(
"keyword"
)
keyword
:
String
):
Observable
<
BaseAPIResponse
<
SystemConfigByKeywordBean
>>
fun
getSystemConfigByKeyword
(
@Query
(
"keyword"
)
keyword
:
String
):
Observable
<
BaseAPIResponse
<
SystemConfigByKeywordBean
>>
//获取咨询助理uid
/*
* location字段说明(sign1存储页面位置,1:首页导医入口进入2:M站入口进入3:问答列表页进入4:我的入口进入
* 5:情绪疏导在线咨询入口进入6:咨询列表页导医入口进入7:实用心理课入口进入8:实用心理课课程列表页进入9:测评解读页进入
* 10:搜索页面进入11:首页咨询列表进入12:厌学的真相在线咨询入口,0是小壹意向客户传0)
*
* ffrom_2 亲子教育添加字段
*naviType = "1";导医配置开关,返100跳转咨询tab,如果返其他则维持原有逻辑。
* */
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
,
"Content-Type:application/json"
)
@GET
(
"consult/assistant/chat-distribute"
)
fun
getConsultAssistantUidRequest
(
@Query
(
"location"
)
location
:
Int
,
@Query
(
"ffrom_2"
)
ffrom
:
String
?,
@Query
(
"naviType"
)
naviType
:
String
=
"1"
):
Observable
<
BaseAPIResponse
<
Long
>>
}
\ No newline at end of file
m-im/src/main/java/com/yidianling/im/modular/service/IMServiceImpl.kt
View file @
73727d29
...
...
@@ -39,6 +39,7 @@ import com.yidianling.im.session.SessionHelper
import
com.yidianling.im.session.extension.CustomAttachModifyTime
import
com.yidianling.im.session.extension.CustomAttachSubScriptTime
import
com.yidianling.im.session.extension.CustomAttachmentTest
import
com.yidianling.im.ui.activity.CmsExamQuestionPaperActivity
import
com.yidianling.im.ui.page.NewMultiMessageFragment
import
com.yidianling.nimbase.common.media.picker.PickImageHelper
import
com.yidianling.uikit.api.NimUIKit
...
...
@@ -65,6 +66,10 @@ class IMServiceImpl : IImService {
IMChatUtil
.
startChat
(
context
as
AppCompatActivity
,
toUid
,
0
)
}
override
fun
startP2PSession
(
context
:
Activity
,
location
:
Int
,
ffrom2
:
String
?)
{
IMChatUtil
.
startCms
(
context
,
location
,
ffrom2
)
}
override
fun
startP2PXiaoYi
(
context
:
Context
)
{
if
(!
ImIn
.
loginByOneKeyLogin
(
context
,
true
))
{
return
...
...
m-im/src/main/java/com/yidianling/im/ui/activity/CmsExamQuestionPaperActivity.kt
View file @
73727d29
This diff is collapsed.
Click to expand it.
m-im/src/main/java/com/yidianling/uikit/business/session/view/question/QuestionAdapter.java
View file @
73727d29
...
...
@@ -123,7 +123,7 @@ public class QuestionAdapter extends BaseMultiItemQuickAdapter<QuestionMultiItem
}
oneCheckAdapter
.
getData
().
get
(
position
).
check
=
true
;
oneCheckAdapter
.
notifyDataSetChanged
();
mOneCheckListener
.
zsItemClick
(
data
.
get
(
position
).
name
,
item
.
type6Position
);
mOneCheckListener
.
zsItemClick
(
getCheckOptionsBeans
(
oneCheckAdapter
),
item
.
questionsBean
,
item
.
type6Position
);
}
});
}
...
...
m-im/src/main/java/com/yidianling/uikit/business/session/view/question/QuestionOneCheckListener.kt
View file @
73727d29
...
...
@@ -26,5 +26,5 @@ interface QuestionOneCheckListener {
/**
* 主诉单选点击 多选确定按钮点击获取item信息
*/
fun
zsItemClick
(
answer
:
String
,
postion
:
Int
)
fun
zsItemClick
(
list
:
List
<
OptionsBean
>,
question
:
QuestionsBean
,
postion
:
Int
)
}
\ No newline at end of file
m-im/src/main/java/com/yidianling/uikit/custom/http/ServiceImpl.kt
View file @
73727d29
...
...
@@ -169,4 +169,15 @@ class ServiceImpl private constructor() {
return
YDLHttpUtils
.
obtainApi
(
ImRetrofitApi
::
class
.
java
).
lingxiAnswerQuestion
(
body
)
}
/**
* 去聊天批量发送 回答问题
*/
fun
batchSendCustomizeMessage
(
params
:
String
):
Observable
<
BaseAPIResponse
<
Any
>>
{
val
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json; charset=utf-8"
),
params
)
as
RequestBody
return
YDLHttpUtils
.
obtainApi
(
ImRetrofitApi
::
class
.
java
).
batchSendCustomizeMessage
(
body
)
}
}
\ No newline at end of file
m-im/src/main/modular_api/com/yidianling/im/api/service/IImService.kt
View file @
73727d29
...
...
@@ -5,11 +5,7 @@ import android.app.Application
import
android.content.Context
import
androidx.fragment.app.Fragment
import
com.alibaba.android.arouter.facade.template.IProvider
import
com.yidianling.im.api.bean.IMInitConfigBean
import
com.yidianling.im.api.bean.IMLoginInfo
import
com.yidianling.im.api.bean.IMRegisterObserverCustomNotificationCallBack
import
com.yidianling.im.api.bean.IMRequestCallback
import
com.yidianling.im.api.bean.IMSendCustomNotificationResultCallBack
import
com.yidianling.im.api.bean.*
import
com.yidianling.im.api.listener.ApiStringResponseCallback
/**
...
...
@@ -25,6 +21,9 @@ interface IImService : IProvider {
// 打开私聊界面
fun
startP2PSession
(
context
:
Activity
,
toUid
:
String
)
// 打开信息前置收集页
fun
startP2PSession
(
context
:
Activity
,
location
:
Int
,
ffrom2
:
String
?)
fun
setAccount
(
account
:
String
)
fun
setChattingAccountAll
()
...
...
@@ -43,6 +42,7 @@ interface IImService : IProvider {
fun
logout
()
fun
clear
()
/**
* 创建一条普通文本消息
* @param sessionId 聊天对象ID
...
...
@@ -50,17 +50,37 @@ interface IImService : IProvider {
*/
fun
createTextMessage
(
sessionId
:
String
?,
content
:
String
,
callback
:
IMRequestCallback
<
Void
>)
fun
sendSubscriptionTimeMessage
(
sessionId
:
String
?,
content
:
String
,
callback
:
IMRequestCallback
<
Void
>)
fun
sendSubscriptionTimeMessage
(
sessionId
:
String
?,
content
:
String
,
callback
:
IMRequestCallback
<
Void
>
)
fun
showSelector
(
activity
:
Activity
,
requestCode
:
Int
)
fun
sendTestResultMessage
(
uid
:
String
,
content
:
String
,
title
:
String
?,
head
:
String
?,
url
:
String
?,
id
:
Int
,
share_url
:
String
?,
callback
:
IMRequestCallback
<
Void
>)
fun
sendTestResultMessage
(
uid
:
String
,
content
:
String
,
title
:
String
?,
head
:
String
?,
url
:
String
?,
id
:
Int
,
share_url
:
String
?,
callback
:
IMRequestCallback
<
Void
>
)
fun
startChat
(
context
:
Activity
,
toUid
:
String
,
flag
:
Int
,
canTalk
:
Int
)
fun
startChat
(
context
:
Activity
,
toUid
:
String
,
flag
:
Int
,
canTalk
:
Int
,
isFramQingsu
:
Int
,
isFromMessageList
:
Boolean
)
fun
startChat
(
context
:
Activity
,
toUid
:
String
,
flag
:
Int
,
canTalk
:
Int
,
isFramQingsu
:
Int
,
isFromMessageList
:
Boolean
)
fun
startChatCloseReplaceChat
(
context
:
Activity
,
toUid
:
String
)
fun
startChatCloseReplaceChat
(
context
:
Activity
,
toUid
:
String
)
/**
...
...
@@ -77,7 +97,11 @@ interface IImService : IProvider {
/**
* 发送自定义通知
*/
fun
sendCustomNotification
(
toUid
:
String
,
content
:
String
,
callback
:
IMSendCustomNotificationResultCallBack
)
fun
sendCustomNotification
(
toUid
:
String
,
content
:
String
,
callback
:
IMSendCustomNotificationResultCallBack
)
/**
* 注册自定通知接收器
...
...
@@ -112,7 +136,14 @@ interface IImService : IProvider {
fun
startKefuChat
(
context
:
Context
,
toUid
:
String
,
flag
:
Int
,
canTalk
:
Int
)
//
fun
startP2PSession
(
mContext
:
Context
,
userType
:
Int
,
account
:
String
,
toChatUsername
:
String
,
toName
:
String
,
head
:
String
)
fun
startP2PSession
(
mContext
:
Context
,
userType
:
Int
,
account
:
String
,
toChatUsername
:
String
,
toName
:
String
,
head
:
String
)
fun
updateUserHead
(
head
:
String
?)
...
...
@@ -136,11 +167,18 @@ interface IImService : IProvider {
fun
getChatUid
(
context
:
Context
?,
uid
:
String
,
callback
:
ApiStringResponseCallback
)
fun
chatScheule
(
context
:
Activity
,
userUrl
:
String
,
docUrl
:
String
,
dsmId
:
Int
,
title
:
String
,
toUid
:
Int
)
fun
chatScheule
(
context
:
Activity
,
userUrl
:
String
,
docUrl
:
String
,
dsmId
:
Int
,
title
:
String
,
toUid
:
Int
)
fun
initIm
(
app
:
Application
,
activity
:
Class
<
out
Activity
>)
fun
initIm
(
app
:
Application
,
activity
:
Class
<
out
Activity
>,
imInitBean
:
IMInitConfigBean
)
fun
initIm
(
app
:
Application
,
activity
:
Class
<
out
Activity
>,
imInitBean
:
IMInitConfigBean
)
fun
isWifiOr3G
(
activity
:
Activity
):
Boolean
}
\ No newline at end of file
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