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
9847efdf
Commit
9847efdf
authored
Mar 17, 2022
by
刘鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat : 支付返回倒计时接口更改
parent
8cee3a49
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
10 deletions
+47
-10
config.gradle
config.gradle
+2
-2
TimeBackDialog.java
ydl-medical-pay/src/main/java/com/medical/ydl/medical/dialog/TimeBackDialog.java
+16
-0
MedicalPayServiceImpl.kt
ydl-medical-pay/src/main/java/com/medical/ydl/medical/http/MedicalPayServiceImpl.kt
+5
-3
MedicalPayServices.kt
ydl-medical-pay/src/main/java/com/medical/ydl/medical/http/MedicalPayServices.kt
+6
-2
MedicalPayActivity.kt
ydl-medical-pay/src/main/java/com/medical/ydl/medical/pay/MedicalPayActivity.kt
+18
-3
No files found.
config.gradle
View file @
9847efdf
...
@@ -41,7 +41,7 @@ ext {
...
@@ -41,7 +41,7 @@ ext {
"ydl-webview"
:
"0.0.38.57"
,
"ydl-webview"
:
"0.0.38.57"
,
"ydl-media"
:
"0.0.21.10"
,
"ydl-media"
:
"0.0.21.10"
,
"ydl-pay"
:
"0.0.18.19"
,
"ydl-pay"
:
"0.0.18.19"
,
"ydl-medical-pay"
:
"0.0.01.2
3
"
,
"ydl-medical-pay"
:
"0.0.01.2
6
"
,
"m-audioim"
:
"0.0.49.29.37"
,
"m-audioim"
:
"0.0.49.29.37"
,
"ydl-flutter-base"
:
"0.0.14.26"
,
"ydl-flutter-base"
:
"0.0.14.26"
,
...
@@ -126,7 +126,7 @@ ext {
...
@@ -126,7 +126,7 @@ ext {
"ydl-webview"
:
"0.0.38.57"
,
"ydl-webview"
:
"0.0.38.57"
,
"ydl-media"
:
"0.0.21.10"
,
"ydl-media"
:
"0.0.21.10"
,
"ydl-pay"
:
"0.0.18.19"
,
"ydl-pay"
:
"0.0.18.19"
,
"ydl-medical-pay"
:
"0.0.01.2
3
"
,
"ydl-medical-pay"
:
"0.0.01.2
6
"
,
"m-audioim"
:
"0.0.49.29.37"
,
"m-audioim"
:
"0.0.49.29.37"
,
"ydl-flutter-base"
:
"0.0.14.26"
,
"ydl-flutter-base"
:
"0.0.14.26"
,
...
...
ydl-medical-pay/src/main/java/com/medical/ydl/medical/dialog/TimeBackDialog.java
View file @
9847efdf
...
@@ -166,6 +166,22 @@ public class TimeBackDialog extends Dialog {
...
@@ -166,6 +166,22 @@ public class TimeBackDialog extends Dialog {
}
}
/**
/**
* 倒计时控件
*/
public
void
setMessageToMedicalView
(
String
str
)
{
String
strStart
=
"\n请在"
;
String
strEnd
=
"内完成支付,超时将会自动取消\n"
;
SpannableString
ss
=
new
SpannableString
(
strStart
+
str
+
strEnd
);
ss
.
setSpan
(
new
ForegroundColorSpan
(
Color
.
parseColor
(
"#FF7766"
)),
strStart
.
length
(),
str
.
length
()
+
strStart
.
length
(),
Spannable
.
SPAN_EXCLUSIVE_EXCLUSIVE
);
if
(
message_tv
!=
null
)
{
message_tv
.
setTypeface
(
Typeface
.
defaultFromStyle
(
Typeface
.
BOLD
));
message_tv
.
setText
(
ss
);
}
}
/**
* 设置对话框界面
* 设置对话框界面
*
*
* @param v View
* @param v View
...
...
ydl-medical-pay/src/main/java/com/medical/ydl/medical/http/MedicalPayServiceImpl.kt
View file @
9847efdf
...
@@ -31,10 +31,11 @@ class MedicalPayServiceImpl {
...
@@ -31,10 +31,11 @@ class MedicalPayServiceImpl {
/**
/**
* 获取下单的信息
* 获取下单的信息
* @param inquiryOrderId 订单id
* @param bizId 订单id
* @param bizType 1-问诊订单 3-药品订单
*/
*/
fun
getSurplusPayTime
(
inquiryOrderId
:
String
):
Observable
<
BaseResponse
<
PayTimeRespose
>>
{
fun
getSurplusPayTime
(
bizId
:
String
,
bizType
:
String
):
Observable
<
BaseResponse
<
PayTimeRespose
>>
{
return
YDLHttpUtils
.
obtainApi
(
MedicalPayServices
::
class
.
java
).
getSurplusPayTime
(
inquiryOrderId
)
return
YDLHttpUtils
.
obtainApi
(
MedicalPayServices
::
class
.
java
).
getSurplusPayTime
(
bizId
,
bizType
)
}
}
}
}
}
}
\ No newline at end of file
ydl-medical-pay/src/main/java/com/medical/ydl/medical/http/MedicalPayServices.kt
View file @
9847efdf
...
@@ -21,8 +21,11 @@ interface MedicalPayServices {
...
@@ -21,8 +21,11 @@ interface MedicalPayServices {
/**
/**
* 获取订单结束时间
* 获取订单结束时间
*/
*/
@GET
(
"api/
client/inquiry/v1/get
SurplusPayTime"
)
@GET
(
"api/
pay/getBiz
SurplusPayTime"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA_URL
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA_URL
)
fun
getSurplusPayTime
(
@Query
(
"inquiryOrderId"
)
inquiryOrderId
:
String
):
Observable
<
BaseResponse
<
PayTimeRespose
>>
fun
getSurplusPayTime
(
@Query
(
"bizId"
)
bizId
:
String
,
@Query
(
"bizType"
)
bizType
:
String
):
Observable
<
BaseResponse
<
PayTimeRespose
>>
}
}
\ No newline at end of file
ydl-medical-pay/src/main/java/com/medical/ydl/medical/pay/MedicalPayActivity.kt
View file @
9847efdf
...
@@ -191,7 +191,12 @@ class MedicalPayActivity : BaseActivity() {
...
@@ -191,7 +191,12 @@ class MedicalPayActivity : BaseActivity() {
@SuppressLint
(
"CheckResult"
)
@SuppressLint
(
"CheckResult"
)
private
fun
backCheck
()
{
private
fun
backCheck
()
{
//获取订单结束时间
//获取订单结束时间
MedicalPayServiceImpl
.
getSurplusPayTime
(
mOrderId
)
val
bizType
=
if
(
mPayBizType
==
MEDICAL_ORDER_TYPE
)
{
"3"
}
else
{
"1"
}
MedicalPayServiceImpl
.
getSurplusPayTime
(
mOrderId
,
bizType
)
.
subscribeOn
(
Schedulers
.
io
())
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
({
response
->
.
subscribe
({
response
->
...
@@ -212,9 +217,15 @@ class MedicalPayActivity : BaseActivity() {
...
@@ -212,9 +217,15 @@ class MedicalPayActivity : BaseActivity() {
* 关闭弹窗
* 关闭弹窗
* */
* */
private
fun
showCloseDialog
(
timeStamp
:
Long
)
{
private
fun
showCloseDialog
(
timeStamp
:
Long
)
{
val
title
=
if
(
mPayBizType
==
MEDICAL_ORDER_TYPE
)
{
"\n请在23小时59分23秒内完成支付,超时将会自动取消\n"
}
else
{
"\n已为您锁定问诊名额,请在24小时59分00秒内完成支付,超时名额自动取消\n"
}
val
builder
=
TimeBackDialog
.
Builder
(
this
@MedicalPayActivity
,
"center"
,
true
)
val
builder
=
TimeBackDialog
.
Builder
(
this
@MedicalPayActivity
,
"center"
,
true
)
builder
.
setTitle
(
""
)
builder
.
setTitle
(
""
)
builder
.
setMessage
(
"\n已为您锁定问诊名额,请在24小时59分00秒内完成支付,超时名额自动取消\n"
)
builder
.
setMessage
(
title
)
builder
.
setPositiveButton
(
builder
.
setPositiveButton
(
"继续支付"
"继续支付"
)
{
dialog
,
which
->
)
{
dialog
,
which
->
...
@@ -244,8 +255,12 @@ class MedicalPayActivity : BaseActivity() {
...
@@ -244,8 +255,12 @@ class MedicalPayActivity : BaseActivity() {
//单位秒
//单位秒
var
second
=
var
second
=
(
millisUntilFinished
-
hour
*
(
1000
*
60
*
60
)
-
minute
*
(
1000
*
60
))
/
1000
(
millisUntilFinished
-
hour
*
(
1000
*
60
*
60
)
-
minute
*
(
1000
*
60
))
/
1000
if
(
mPayBizType
==
MEDICAL_ORDER_TYPE
)
{
builder
.
setMessageToMedicalView
(
"${hour}小时${minute}分${second}"
)
builder
.
setMessageToTextView
(
"${hour}小时${minute}分${second}"
)
}
else
{
builder
.
setMessageToTextView
(
"${hour}小时${minute}分${second}"
)
}
}
}
override
fun
onFinish
()
{
override
fun
onFinish
()
{
...
...
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