Commit 176089d3 by 刘鹏

feat : 支付返回获取订单时间接口参数更改

parent 9847efdf
......@@ -41,7 +41,7 @@ ext {
"ydl-webview" : "0.0.38.57",
"ydl-media" : "0.0.21.10",
"ydl-pay" : "0.0.18.19",
"ydl-medical-pay" : "0.0.01.26",
"ydl-medical-pay" : "0.0.01.28",
"m-audioim" : "0.0.49.29.37",
"ydl-flutter-base": "0.0.14.26",
......@@ -126,7 +126,7 @@ ext {
"ydl-webview" : "0.0.38.57",
"ydl-media" : "0.0.21.10",
"ydl-pay" : "0.0.18.19",
"ydl-medical-pay" : "0.0.01.26",
"ydl-medical-pay" : "0.0.01.28",
"m-audioim" : "0.0.49.29.37",
"ydl-flutter-base": "0.0.14.26",
......
......@@ -34,7 +34,7 @@ class MedicalPayServiceImpl {
* @param bizId 订单id
* @param bizType 1-问诊订单 3-药品订单
*/
fun getSurplusPayTime(bizId: String,bizType:String): Observable<BaseResponse<PayTimeRespose>> {
fun getSurplusPayTime(bizId: String,bizType:Int): Observable<BaseResponse<Long>> {
return YDLHttpUtils.obtainApi(MedicalPayServices::class.java).getSurplusPayTime(bizId,bizType)
}
}
......
......@@ -25,7 +25,7 @@ interface MedicalPayServices {
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA_URL)
fun getSurplusPayTime(
@Query("bizId") bizId: String,
@Query("bizType") bizType: String
): Observable<BaseResponse<PayTimeRespose>>
@Query("bizType") bizType: Int
): Observable<BaseResponse<Long>>
}
\ No newline at end of file
......@@ -191,17 +191,12 @@ class MedicalPayActivity : BaseActivity() {
@SuppressLint("CheckResult")
private fun backCheck() {
//获取订单结束时间
val bizType = if (mPayBizType == MEDICAL_ORDER_TYPE) {
"3"
} else {
"1"
}
MedicalPayServiceImpl.getSurplusPayTime(mOrderId, bizType)
MedicalPayServiceImpl.getSurplusPayTime(mOrderId, mPayBizType)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe({ response ->
if (response.code == 200) {
showCloseDialog(response.data.surplusPayTime)
showCloseDialog(response.data)
} else {
finish()
}
......@@ -217,10 +212,11 @@ class MedicalPayActivity : BaseActivity() {
* 关闭弹窗
* */
private fun showCloseDialog(timeStamp: Long) {
val title = if (mPayBizType == MEDICAL_ORDER_TYPE) {
"\n请在23小时59分23秒内完成支付,超时将会自动取消\n"
} else {
val title = if (mPayBizType == INQUIRY_ORDER_TYPE) {
"\n已为您锁定问诊名额,请在24小时59分00秒内完成支付,超时名额自动取消\n"
} else {
"\n请在23小时59分23秒内完成支付,超时将会自动取消\n"
}
val builder = TimeBackDialog.Builder(this@MedicalPayActivity, "center", true)
......@@ -255,11 +251,10 @@ class MedicalPayActivity : BaseActivity() {
//单位秒
var second =
(millisUntilFinished - hour * (1000 * 60 * 60) - minute * (1000 * 60)) / 1000
if (mPayBizType == MEDICAL_ORDER_TYPE) {
builder.setMessageToMedicalView("${hour}小时${minute}分${second}")
} else {
if (mPayBizType == INQUIRY_ORDER_TYPE) {
builder.setMessageToTextView("${hour}小时${minute}分${second}")
} else {
builder.setMessageToMedicalView("${hour}小时${minute}分${second}")
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment