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
3ad3f065
Commit
3ad3f065
authored
Jul 03, 2021
by
刘鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加控制时间接口
parent
9d2467ed
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
58 additions
and
10 deletions
+58
-10
config.gradle
config.gradle
+1
-1
SystemConfigByKeywordBean.java
m-im/src/main/java/com/yidianling/im/bean/SystemConfigByKeywordBean.java
+21
-0
IMChatUtil.kt
m-im/src/main/java/com/yidianling/im/helper/IMChatUtil.kt
+21
-6
ImRetrofitApi.kt
m-im/src/main/java/com/yidianling/im/http/ImRetrofitApi.kt
+7
-0
CmsExamQuestionPaperActivity.kt
m-im/src/main/java/com/yidianling/im/ui/activity/CmsExamQuestionPaperActivity.kt
+8
-3
No files found.
config.gradle
View file @
3ad3f065
...
...
@@ -10,7 +10,7 @@ ext {
"m-fm"
:
"0.0.30.03"
,
"m-user"
:
"0.0.61.37"
,
"m-home"
:
"0.0.22.65"
,
"m-im"
:
"0.0.19.2
5
"
,
"m-im"
:
"0.0.19.2
6
"
,
"m-dynamic"
:
"0.0.7.22"
,
"m-article"
:
"0.0.0.10"
,
...
...
m-im/src/main/java/com/yidianling/im/bean/SystemConfigByKeywordBean.java
0 → 100644
View file @
3ad3f065
package
com
.
yidianling
.
im
.
bean
;
public
class
SystemConfigByKeywordBean
{
/**
* id : 464
* type : lingxi_set
* name : 灵犀跳转前置信息页时间配置
* keyword : lx_collect_card_config
* isOpen : 1
* sortNumber : 0
* remark :
* createTime : Jul 1, 2021 2:55:12 PM
* updateTime : Jul 3, 2021 4:54:47 PM
* value1 : 120
* value2 :
* value3 :
*/
public
String
value1
;
}
m-im/src/main/java/com/yidianling/im/helper/IMChatUtil.kt
View file @
3ad3f065
...
...
@@ -10,6 +10,7 @@ import com.ydl.webview.H5Params
import
com.ydl.webview.NewH5Activity
import
com.ydl.ydlcommon.data.http.BaseAPIResponse
import
com.ydl.ydlcommon.data.http.BaseResponse
import
com.ydl.ydlcommon.data.http.RxUtils
import
com.ydl.ydlcommon.data.http.RxUtils.applySchedulers
import
com.ydl.ydlcommon.data.http.UpLoadLogUtils.upLoadLog
import
com.ydl.ydlcommon.modular.ModularServiceManager
...
...
@@ -30,6 +31,7 @@ import com.yidianling.im.bean.GetExpert
import
com.yidianling.im.bean.UserTypeBean
import
com.yidianling.im.bridge.P2PCustomActionHandlerImpl
import
com.yidianling.im.config.constants.ImConstants
import
com.yidianling.im.http.ImRetrofitApi
import
com.yidianling.im.http.ImRetrofitApi.Companion.getImJavaApi
import
com.yidianling.im.http.ImRetrofitApi.Companion.getImRetrofitApi
import
com.yidianling.im.router.ImIn
...
...
@@ -112,10 +114,17 @@ object IMChatUtil {
chatItemBean
.
toUid
.
toString
(),
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
,
chatItemBean
.
toUid
.
toString
(),
expertInfo
,
0
)
0
,
it
.
value1
)
}
}
})
}
else
{
...
...
@@ -212,13 +221,19 @@ object IMChatUtil {
}
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
context
,
toUid
,
expertInfo
,
isFromQingShu
,
it
.
value1
)
}
}
})
}
else
{
prepareAssistantChatData
(
context
,
toUid
,
object
:
ChatDataRequestListener
{
...
...
m-im/src/main/java/com/yidianling/im/http/ImRetrofitApi.kt
View file @
3ad3f065
...
...
@@ -129,4 +129,10 @@ interface ImRetrofitApi {
@POST
(
"chat/sendNoticeMessage"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
)
fun
lingxiSendNotice
(
@Body
body
:
RequestBody
):
Observable
<
BaseAPIResponse
<
Any
>>
/**已完成订单*/
@GET
(
"systemconfig/getSystemConfigByKeyword"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
)
fun
getSystemConfigByKeyword
(
@Query
(
"keyword"
)
keyword
:
String
):
Observable
<
BaseAPIResponse
<
SystemConfigByKeywordBean
>>
}
\ No newline at end of file
m-im/src/main/java/com/yidianling/im/ui/activity/CmsExamQuestionPaperActivity.kt
View file @
3ad3f065
...
...
@@ -80,13 +80,18 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
private
lateinit
var
expertInfo
:
IMExpertBuild
private
lateinit
var
toUid
:
String
private
var
isFromQingShu
:
Int
=
0
private
var
skip_time
:
Long
=
0
@JvmStatic
fun
start
(
context
:
Context
,
toUid
:
String
,
expertInfo
:
IMExpertBuild
,
isFromQingShu
:
Int
)
{
fun
start
(
context
:
Context
,
toUid
:
String
,
expertInfo
:
IMExpertBuild
,
isFromQingShu
:
Int
,
skip_time
:
String
)
{
val
starter
=
Intent
(
context
,
CmsExamQuestionPaperActivity
::
class
.
java
)
this
.
expertInfo
=
expertInfo
this
.
toUid
=
toUid
this
.
isFromQingShu
=
isFromQingShu
this
.
skip_time
=
skip_time
.
toLong
()
context
.
startActivity
(
starter
)
}
}
...
...
@@ -663,13 +668,13 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
if
(
skipTime
==
null
||
skipTime
.
isEmpty
())
{
return
false
}
val
timeDifference
=
time
-
skipTime
.
toLong
()
val
timeDifference
=
(
time
-
skipTime
.
toLong
())
/
1000
val
second
=
1000
val
minute
=
second
*
60
val
hour
=
minute
*
60
val
day
=
hour
*
24
return
timeDifference
>
2
*
second
return
timeDifference
>
skip_time
}
/**
...
...
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