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
6f802002
Commit
6f802002
authored
Mar 14, 2022
by
刘鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat : 星链 倾诉日志
parent
aa851d91
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
111 additions
and
90 deletions
+111
-90
WVClickAbstractListener.java
app/src/main/java/com/ydl/component/service/web/WVClickAbstractListener.java
+0
-5
config.gradle
config.gradle
+6
-6
AudioHomeActivity.kt
m-audioim/src/main/java/com/ydl/audioim/AudioHomeActivity.kt
+0
-0
AudioApiRequestUtil.kt
m-audioim/src/main/java/com/ydl/audioim/http/AudioApiRequestUtil.kt
+10
-0
AudioNetAPi.kt
m-audioim/src/main/java/com/ydl/audioim/http/AudioNetAPi.kt
+11
-0
ConsultantAudioHomeActivity.kt
m-audioim/src/main/java/com/ydl/consultantim/ConsultantAudioHomeActivity.kt
+0
-0
ConfideHomeApi.kt
m-confide/src/main/java/com/ydl/confide/home/http/ConfideHomeApi.kt
+9
-5
ConfideHomeHttpImpl.kt
m-confide/src/main/java/com/ydl/confide/home/http/ConfideHomeHttpImpl.kt
+18
-18
IConfideHomeHttp.kt
m-confide/src/main/java/com/ydl/confide/home/http/IConfideHomeHttp.kt
+4
-3
ConfideWebServiceImpl.kt
m-confide/src/main/java/com/ydl/confide/home/modular/service/ConfideWebServiceImpl.kt
+36
-41
TimeUtil.java
m-im/src/main/java/com/yidianling/avchatkit/common/util/TimeUtil.java
+17
-12
TimeUtil.java
ydl-platform/src/main/java/com/ydl/ydlcommon/utils/TimeUtil.java
+0
-0
No files found.
app/src/main/java/com/ydl/component/service/web/WVClickAbstractListener.java
View file @
6f802002
...
...
@@ -361,12 +361,7 @@ public class WVClickAbstractListener implements WebViewClientClickListener {
@Override
public
void
confideConnect
(
H5JsBean
.
H5JsCmd
.
Params
jsData
)
{
// ModularServiceManager.INSTANCE.provide(IConfideService.class).connectionJava(jsData.getId(),jsData.getConfideType(),mContext,null,jsData.getCallType());
((
IConfideService
)
ARouter
.
getInstance
().
build
(
"/confide/ConfideService"
).
navigation
()).
connectionJava
(
jsData
.
getId
(),
3
,
mContext
,
null
,
jsData
.
getCallType
());
}
@Override
...
...
config.gradle
View file @
6f802002
...
...
@@ -5,7 +5,7 @@ ext {
ydlPublishVersion
=
[
// -------------- 业务模块 --------------
//第三步 若干
"m-confide"
:
"0.0.49.2
1
"
,
"m-confide"
:
"0.0.49.2
5
"
,
"m-consultant"
:
"0.0.60.03"
,
"m-fm"
:
"0.0.30.04"
,
"m-user"
:
"0.0.61.94"
,
...
...
@@ -33,13 +33,13 @@ ext {
//-------------- 功能组件 --------------
//第一步
"ydl-platform"
:
"0.0.40.7
6
"
,
"ydl-platform"
:
"0.0.40.7
7
"
,
//第二步 若干
"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
5
"
,
"m-audioim"
:
"0.0.49.29.4
6
"
,
"ydl-flutter-base"
:
"0.0.14.38"
,
//以下 几乎不会动
...
...
@@ -88,7 +88,7 @@ ext {
// -------------- 业务模块 --------------
//第三步 若干
"m-confide"
:
"0.0.49.2
1
"
,
"m-confide"
:
"0.0.49.2
5
"
,
"m-consultant"
:
"0.0.60.03"
,
"m-fm"
:
"0.0.30.07"
,
"m-user"
:
"0.0.61.94"
,
...
...
@@ -115,13 +115,13 @@ ext {
//-------------- 功能组件 --------------
//第一步
"ydl-platform"
:
"0.0.40.7
6
"
,
"ydl-platform"
:
"0.0.40.7
7
"
,
//第二步 若干
"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
5
"
,
"m-audioim"
:
"0.0.49.29.4
6
"
,
"ydl-flutter-base"
:
"0.0.14.38"
,
//以下 几乎不会动
...
...
m-audioim/src/main/java/com/ydl/audioim/AudioHomeActivity.kt
View file @
6f802002
This diff is collapsed.
Click to expand it.
m-audioim/src/main/java/com/ydl/audioim/http/AudioApiRequestUtil.kt
View file @
6f802002
...
...
@@ -12,6 +12,7 @@ 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.utils.NetworkParamsUtils
import
com.ydl.ydlcommon.utils.TimeUtil
import
com.ydl.ydlnet.YDLHttpUtils
import
io.reactivex.Observable
import
okhttp3.MediaType
...
...
@@ -100,5 +101,13 @@ class AudioApiRequestUtil {
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
>>
{
var
eventTime
=
TimeUtil
.
getNowDatetime
()
return
YDLHttpUtils
.
obtainApi
(
AudioNetAPi
::
class
.
java
).
callEventSave
(
session
,
eventTime
,
line
,
status
,
reponse
)
}
}
}
\ No newline at end of file
m-audioim/src/main/java/com/ydl/audioim/http/AudioNetAPi.kt
View file @
6f802002
...
...
@@ -73,4 +73,14 @@ interface AudioNetAPi {
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
)
fun
callEndStatusUpdate
(
@Query
(
"channelId"
)
channelId
:
String
,
@Query
(
"endStatus"
)
endStatus
:
Int
,
@Query
(
"msg"
)
msg
:
String
):
Observable
<
BaseAPIResponse
<
Any
>>
//倾诉事件上报接口
@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
>>
}
\ No newline at end of file
m-audioim/src/main/java/com/ydl/consultantim/ConsultantAudioHomeActivity.kt
View file @
6f802002
This diff is collapsed.
Click to expand it.
m-confide/src/main/java/com/ydl/confide/home/http/ConfideHomeApi.kt
View file @
6f802002
...
...
@@ -15,19 +15,22 @@ import retrofit2.http.*
* @Company 壹点灵
* @date 2018/8/10
*/
interface
ConfideHomeApi
{
interface
ConfideHomeApi
{
//倾诉首页
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
,
"Content-Type:application/json"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
,
"Content-Type:application/json"
)
@GET
fun
confideHome
(
@Url
url
:
String
,
@Query
(
"cateSource"
)
cateSource
:
Int
):
Observable
<
BaseAPIResponse
<
MutableList
<
ConfideHomeDataBean
>>>
fun
confideHome
(
@Url
url
:
String
,
@Query
(
"cateSource"
)
cateSource
:
Int
):
Observable
<
BaseAPIResponse
<
MutableList
<
ConfideHomeDataBean
>>>
//每日精选 换一批
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
,
"Content-Type:application/json"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
,
"Content-Type:application/json"
)
@GET
fun
recommedChange
(
@Url
url
:
String
):
Observable
<
BaseAPIResponse
<
ConfideHomeDataBean
>>
//连接-java接口
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
,
"Content-Type:application/json"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
,
"Content-Type:application/json"
)
@GET
(
"auth/listen/dial"
)
fun
connectJava
(
@QueryMap
params
:
Map
<
String
,
String
>):
Observable
<
BaseAPIResponse
<
ConfideConnectResponse
>>
}
\ No newline at end of file
m-confide/src/main/java/com/ydl/confide/home/http/ConfideHomeHttpImpl.kt
View file @
6f802002
...
...
@@ -16,7 +16,7 @@ import io.reactivex.Observable
* @Company 壹点灵
* @date 2018/7/26
*/
class
ConfideHomeHttpImpl
private
constructor
()
:
IConfideHomeHttp
{
class
ConfideHomeHttpImpl
private
constructor
()
:
IConfideHomeHttp
{
companion
object
{
fun
getInstance
():
ConfideHomeHttpImpl
{
...
...
@@ -34,40 +34,39 @@ class ConfideHomeHttpImpl private constructor(): IConfideHomeHttp{
override
fun
confideHomeRequest
():
Observable
<
BaseAPIResponse
<
MutableList
<
ConfideHomeDataBean
>>>
{
return
RxUtils
.
mapObservable
(
ConfideHomeParam
(
0
))
.
flatMap
{
confideHomeApi
.
confideHome
(
HttpConfig
.
JAVA_BASE_URL
+
"auth/listen/home"
,
2
)
}
.
flatMap
{
confideHomeApi
.
confideHome
(
HttpConfig
.
JAVA_BASE_URL
+
"auth/listen/home"
,
2
)
}
}
override
fun
recommendList
(
param
:
ConfideRecommendParam
):
Observable
<
BaseAPIResponse
<
ConfideHomeDataBean
>>
{
override
fun
recommendList
(
param
:
ConfideRecommendParam
):
Observable
<
BaseAPIResponse
<
ConfideHomeDataBean
>>
{
val
inUid
=
StringBuffer
()
for
(
i
in
param
.
notInUid
.
indices
)
{
inUid
.
append
(
param
.
notInUid
[
i
])
if
(
i
<
param
.
notInUid
.
size
-
1
)
{
if
(
i
<
param
.
notInUid
.
size
-
1
)
{
inUid
.
append
(
","
)
}
}
val
sb
=
StringBuffer
()
sb
.
append
(
"page"
).
append
(
"="
).
append
(
param
.
page
).
append
(
"&"
)
.
append
(
"sortType"
).
append
(
"="
).
append
(
param
.
getSortType
()).
append
(
"&"
)
.
append
(
"sexType"
).
append
(
"="
).
append
(
param
.
getSexType
()).
append
(
"&"
)
.
append
(
"ageType"
).
append
(
"="
).
append
(
param
.
getAgeType
()).
append
(
"&"
)
.
append
(
"goodType"
).
append
(
"="
).
append
(
param
.
getGoodType
()).
append
(
"&"
)
.
append
(
"notInUid"
).
append
(
"="
).
append
(
inUid
.
toString
()).
append
(
"&"
)
.
append
(
"sortType"
).
append
(
"="
).
append
(
param
.
getSortType
()).
append
(
"&"
)
.
append
(
"sexType"
).
append
(
"="
).
append
(
param
.
getSexType
()).
append
(
"&"
)
.
append
(
"ageType"
).
append
(
"="
).
append
(
param
.
getAgeType
()).
append
(
"&"
)
.
append
(
"goodType"
).
append
(
"="
).
append
(
param
.
getGoodType
()).
append
(
"&"
)
.
append
(
"notInUid"
).
append
(
"="
).
append
(
inUid
.
toString
()).
append
(
"&"
)
val
confideParam
=
sb
.
toString
()
return
RxUtils
.
mapObservable
(
param
)
.
flatMap
{
confideHomeApi
.
recommedChange
(
HttpConfig
.
JAVA_BASE_URL
+
"auth/listen/nsearch?"
+
confideParam
)
}
.
flatMap
{
confideHomeApi
.
recommedChange
(
HttpConfig
.
JAVA_BASE_URL
+
"auth/listen/nsearch?"
+
confideParam
)
}
}
override
fun
connectionJava
(
connectParam
:
ConnectParamJava
):
Observable
<
BaseAPIResponse
<
ConfideConnectResponse
>>
{
return
RxUtils
.
mapObservable
(
connectParam
)
.
flatMap
{
it
->
YDLHttpUtils
.
obtainApi
(
ConfideHomeApi
::
class
.
java
).
connectJava
(
it
)
}
.
flatMap
{
it
->
YDLHttpUtils
.
obtainApi
(
ConfideHomeApi
::
class
.
java
).
connectJava
(
it
)
}
}
}
\ No newline at end of file
m-confide/src/main/java/com/ydl/confide/home/http/IConfideHomeHttp.kt
View file @
6f802002
...
...
@@ -13,7 +13,7 @@ import io.reactivex.Observable
* @Company 壹点灵
* @date 2018/7/26
*/
interface
IConfideHomeHttp
{
interface
IConfideHomeHttp
{
/**
* 倾诉首页请求
*/
...
...
@@ -22,8 +22,8 @@ interface IConfideHomeHttp{
/**
* 为你推荐列表
*/
fun
recommendList
(
param
:
ConfideRecommendParam
):
Observable
<
BaseAPIResponse
<
ConfideHomeDataBean
>>
fun
recommendList
(
param
:
ConfideRecommendParam
):
Observable
<
BaseAPIResponse
<
ConfideHomeDataBean
>>
//倾诉链接,java接口,支持axb和声网
fun
connectionJava
(
connectParam
:
ConnectParamJava
)
:
Observable
<
BaseAPIResponse
<
ConfideConnectResponse
>>
fun
connectionJava
(
connectParam
:
ConnectParamJava
):
Observable
<
BaseAPIResponse
<
ConfideConnectResponse
>>
}
\ No newline at end of file
m-confide/src/main/java/com/ydl/confide/home/modular/service/ConfideWebServiceImpl.kt
View file @
6f802002
...
...
@@ -13,15 +13,12 @@ import com.ydl.audioim.widget.AxbConfirmDialog
import
com.ydl.confide.home.bean.ConnectParamJava
import
com.ydl.confide.home.constants.FinalString
import
com.ydl.confide.home.http.ConfideHomeDataManager
import
com.ydl.confide.home.util.ConfideNetworkUtil
import
com.ydl.webview.H5Params
import
com.ydl.webview.NewH5Activity
import
com.ydl.webview.TellData
import
com.ydl.ydlcommon.base.BaseApp
import
com.ydl.ydlcommon.modular.ModularServiceManager
import
com.ydl.ydlcommon.utils.remind.ToastHelper
import
com.ydl.ydlcommon.view.dialog.CommonDialog
import
com.yidianling.common.tools.RxSPTool
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.user.api.service.IUserService
import
com.yidianling.ydl_pay.pay.payDialog.CallBack
...
...
@@ -111,7 +108,7 @@ class ConfideWebServiceImpl {
if
(
it
.
data
?.
dialDetail
?.
callConnectType
?:
-
1
==
3
)
{
//声网
it
.
data
?.
dialDetail
?.
agoraExpertInfo
?:
return
@subscribe
if
(!
YDLavManager
.
isOnlineRtm
){
// 判断如果账号在其它设备登录rtm是否在线
if
(!
YDLavManager
.
isOnlineRtm
)
{
// 判断如果账号在其它设备登录rtm是否在线
ToastUtil
.
toastShort
(
"网络通话错误代码001"
)
return
@subscribe
}
...
...
@@ -170,43 +167,41 @@ class ConfideWebServiceImpl {
isShowAXB
:
Boolean
,
dialStatus
:
String
)
{
if
(
expertInfo
.
listenerStatus
!=
1
)
{
ToastHelper
.
show
(
"老师正在通话中,请稍后重试"
)
return
}
if
(
TextUtils
.
isEmpty
(
expertInfo
.
channelId
))
{
ToastHelper
.
show
(
"服务端返回参数异常,请刷新页面后重试"
)
return
}
if
(
expertInfo
.
remainingTime
?.
remainingTime
==
null
)
{
expertInfo
.
remainingTime
=
ExpertInfoBean
.
ListenRemainingTime
(
expertInfo
.
totalDuration
);
}
ARouter
.
getInstance
().
build
(
"/av/AudioHomeActivity"
)
.
withString
(
IntentConstants
.
INTENT_EXPERT_HEAD_URL
,
expertInfo
.
expertHeadUrl
)
.
withString
(
IntentConstants
.
INTENT_EXPERT_NAME
,
expertInfo
.
expertName
)
.
withString
(
IntentConstants
.
INTENT_EXPERT_TIPS
,
expertInfo
.
expertTips
)
.
withString
(
IntentConstants
.
INTENT_ROOM_ID
,
expertInfo
.
channelId
)
.
withString
(
IntentConstants
.
INTENT_REMAIN_TIME
,
expertInfo
.
remainingTime
.
remainingTime
)
.
withString
(
IntentConstants
.
INTENT_CALL_ID
,
call_id
)
.
withString
(
IntentConstants
.
INTENT_RELATION_ID
,
"${relation_id}"
)
.
withString
(
IntentConstants
.
INTENT_TOKEN
,
expertInfo
.
token
)
.
withString
(
IntentConstants
.
INTENT_SIGNAL_TOKEN
,
expertInfo
.
signalToken
)
.
withString
(
IntentConstants
.
INTENT_LISTENER_UID
,
expertInfo
.
listenerUid
)
.
withString
(
IntentConstants
.
INTENT_TOTAL_DURATION
,
expertInfo
.
totalDuration
)
.
withString
(
IntentConstants
.
INTENT_COMMENT_URL
,
expertInfo
.
commentUrl
)
.
withString
(
IntentConstants
.
INTENT_LISTEN_ID
,
confideId
.
toString
())
.
withString
(
IntentConstants
.
INTENT_DIALSTATUS
,
dialStatus
)
.
withBoolean
(
IntentConstants
.
INTENT_ISSHOWAXB
,
isShowAXB
)
.
navigation
(
activity
)
if
(
expertInfo
.
listenerStatus
!=
1
)
{
ToastHelper
.
show
(
"老师正在通话中,请稍后重试"
)
return
}
if
(
TextUtils
.
isEmpty
(
expertInfo
.
channelId
))
{
ToastHelper
.
show
(
"服务端返回参数异常,请刷新页面后重试"
)
return
}
if
(
expertInfo
.
remainingTime
?.
remainingTime
==
null
)
{
expertInfo
.
remainingTime
=
ExpertInfoBean
.
ListenRemainingTime
(
expertInfo
.
totalDuration
);
}
ARouter
.
getInstance
().
build
(
"/av/AudioHomeActivity"
)
.
withString
(
IntentConstants
.
INTENT_EXPERT_HEAD_URL
,
expertInfo
.
expertHeadUrl
)
.
withString
(
IntentConstants
.
INTENT_EXPERT_NAME
,
expertInfo
.
expertName
)
.
withString
(
IntentConstants
.
INTENT_EXPERT_TIPS
,
expertInfo
.
expertTips
)
.
withString
(
IntentConstants
.
INTENT_ROOM_ID
,
expertInfo
.
channelId
)
.
withString
(
IntentConstants
.
INTENT_REMAIN_TIME
,
expertInfo
.
remainingTime
.
remainingTime
)
.
withString
(
IntentConstants
.
INTENT_CALL_ID
,
call_id
)
.
withString
(
IntentConstants
.
INTENT_RELATION_ID
,
"${relation_id}"
)
.
withString
(
IntentConstants
.
INTENT_TOKEN
,
expertInfo
.
token
)
.
withString
(
IntentConstants
.
INTENT_SIGNAL_TOKEN
,
expertInfo
.
signalToken
)
.
withString
(
IntentConstants
.
INTENT_LISTENER_UID
,
expertInfo
.
listenerUid
)
.
withString
(
IntentConstants
.
INTENT_TOTAL_DURATION
,
expertInfo
.
totalDuration
)
.
withString
(
IntentConstants
.
INTENT_COMMENT_URL
,
expertInfo
.
commentUrl
)
.
withString
(
IntentConstants
.
INTENT_LISTEN_ID
,
confideId
.
toString
())
.
withString
(
IntentConstants
.
INTENT_DIALSTATUS
,
dialStatus
)
.
withBoolean
(
IntentConstants
.
INTENT_ISSHOWAXB
,
isShowAXB
)
.
navigation
(
activity
)
}
}
m-im/src/main/java/com/yidianling/avchatkit/common/util/TimeUtil.java
View file @
6f802002
...
...
@@ -9,6 +9,10 @@ import java.util.GregorianCalendar;
import
java.util.Locale
;
import
java.util.TimeZone
;
/**
* @author liupeng
* 日期转换工具
*/
public
class
TimeUtil
{
public
static
boolean
isEarly
(
int
days
,
long
time
)
{
...
...
@@ -235,15 +239,12 @@ public class TimeUtil {
cal2
.
setTime
(
date2
);
int
subYear
=
cal1
.
get
(
Calendar
.
YEAR
)
-
cal2
.
get
(
Calendar
.
YEAR
);
if
(
0
==
subYear
)
{
if
(
cal1
.
get
(
Calendar
.
WEEK_OF_YEAR
)
==
cal2
.
get
(
Calendar
.
WEEK_OF_YEAR
))
return
true
;
return
cal1
.
get
(
Calendar
.
WEEK_OF_YEAR
)
==
cal2
.
get
(
Calendar
.
WEEK_OF_YEAR
);
}
else
if
(
1
==
subYear
&&
11
==
cal2
.
get
(
Calendar
.
MONTH
))
{
// 如果12月的最后一周横跨来年第一周的话则最后一周即算做来年的第一周
if
(
cal1
.
get
(
Calendar
.
WEEK_OF_YEAR
)
==
cal2
.
get
(
Calendar
.
WEEK_OF_YEAR
))
return
true
;
return
cal1
.
get
(
Calendar
.
WEEK_OF_YEAR
)
==
cal2
.
get
(
Calendar
.
WEEK_OF_YEAR
);
}
else
if
(-
1
==
subYear
&&
11
==
cal1
.
get
(
Calendar
.
MONTH
))
{
if
(
cal1
.
get
(
Calendar
.
WEEK_OF_YEAR
)
==
cal2
.
get
(
Calendar
.
WEEK_OF_YEAR
))
return
true
;
return
cal1
.
get
(
Calendar
.
WEEK_OF_YEAR
)
==
cal2
.
get
(
Calendar
.
WEEK_OF_YEAR
);
}
return
false
;
}
...
...
@@ -262,17 +263,18 @@ public class TimeUtil {
int
hour
=
0
;
int
minute
=
0
;
int
second
=
0
;
if
(
time
<=
0
)
if
(
time
<=
0
)
{
return
"00:00"
;
else
{
}
else
{
minute
=
time
/
60
;
if
(
minute
<
60
)
{
second
=
time
%
60
;
timeStr
=
unitFormat
(
minute
)
+
":"
+
unitFormat
(
second
);
}
else
{
hour
=
minute
/
60
;
if
(
hour
>
99
)
if
(
hour
>
99
)
{
return
"99:59:59"
;
}
minute
=
minute
%
60
;
second
=
time
-
hour
*
3600
-
minute
*
60
;
timeStr
=
unitFormat
(
hour
)
+
":"
+
unitFormat
(
minute
)
+
":"
+
unitFormat
(
second
);
...
...
@@ -283,17 +285,20 @@ public class TimeUtil {
public
static
String
unitFormat
(
int
i
)
{
String
retStr
=
null
;
if
(
i
>=
0
&&
i
<
10
)
if
(
i
>=
0
&&
i
<
10
)
{
retStr
=
"0"
+
Integer
.
toString
(
i
);
else
retStr
=
""
+
i
;
}
else
{
retStr
=
""
+
i
;
}
return
retStr
;
}
public
static
String
getElapseTimeForShow
(
int
milliseconds
)
{
StringBuilder
sb
=
new
StringBuilder
();
int
seconds
=
milliseconds
/
1000
;
if
(
seconds
<
1
)
if
(
seconds
<
1
)
{
seconds
=
1
;
}
int
hour
=
seconds
/
(
60
*
60
);
if
(
hour
!=
0
)
{
sb
.
append
(
hour
).
append
(
"小时"
);
...
...
ydl-platform/src/main/java/com/ydl/ydlcommon/utils/TimeUtil.java
0 → 100644
View file @
6f802002
This diff is collapsed.
Click to expand it.
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