Commit 176089d3 by 刘鹏

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

parent 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.26", "ydl-medical-pay" : "0.0.01.28",
"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.26", "ydl-medical-pay" : "0.0.01.28",
"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",
......
...@@ -34,7 +34,7 @@ class MedicalPayServiceImpl { ...@@ -34,7 +34,7 @@ class MedicalPayServiceImpl {
* @param bizId 订单id * @param bizId 订单id
* @param bizType 1-问诊订单 3-药品订单 * @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) return YDLHttpUtils.obtainApi(MedicalPayServices::class.java).getSurplusPayTime(bizId,bizType)
} }
} }
......
...@@ -25,7 +25,7 @@ interface MedicalPayServices { ...@@ -25,7 +25,7 @@ interface MedicalPayServices {
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA_URL) @Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA_URL)
fun getSurplusPayTime( fun getSurplusPayTime(
@Query("bizId") bizId: String, @Query("bizId") bizId: String,
@Query("bizType") bizType: String @Query("bizType") bizType: Int
): Observable<BaseResponse<PayTimeRespose>> ): Observable<BaseResponse<Long>>
} }
\ No newline at end of file
...@@ -191,17 +191,12 @@ class MedicalPayActivity : BaseActivity() { ...@@ -191,17 +191,12 @@ class MedicalPayActivity : BaseActivity() {
@SuppressLint("CheckResult") @SuppressLint("CheckResult")
private fun backCheck() { private fun backCheck() {
//获取订单结束时间 //获取订单结束时间
val bizType = if (mPayBizType == MEDICAL_ORDER_TYPE) { MedicalPayServiceImpl.getSurplusPayTime(mOrderId, mPayBizType)
"3"
} else {
"1"
}
MedicalPayServiceImpl.getSurplusPayTime(mOrderId, bizType)
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.subscribe({ response -> .subscribe({ response ->
if (response.code == 200) { if (response.code == 200) {
showCloseDialog(response.data.surplusPayTime) showCloseDialog(response.data)
} else { } else {
finish() finish()
} }
...@@ -217,10 +212,11 @@ class MedicalPayActivity : BaseActivity() { ...@@ -217,10 +212,11 @@ class MedicalPayActivity : BaseActivity() {
* 关闭弹窗 * 关闭弹窗
* */ * */
private fun showCloseDialog(timeStamp: Long) { private fun showCloseDialog(timeStamp: Long) {
val title = if (mPayBizType == MEDICAL_ORDER_TYPE) { val title = if (mPayBizType == INQUIRY_ORDER_TYPE) {
"\n请在23小时59分23秒内完成支付,超时将会自动取消\n"
} else {
"\n已为您锁定问诊名额,请在24小时59分00秒内完成支付,超时名额自动取消\n" "\n已为您锁定问诊名额,请在24小时59分00秒内完成支付,超时名额自动取消\n"
} else {
"\n请在23小时59分23秒内完成支付,超时将会自动取消\n"
} }
val builder = TimeBackDialog.Builder(this@MedicalPayActivity, "center", true) val builder = TimeBackDialog.Builder(this@MedicalPayActivity, "center", true)
...@@ -255,11 +251,10 @@ class MedicalPayActivity : BaseActivity() { ...@@ -255,11 +251,10 @@ 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) { if (mPayBizType == INQUIRY_ORDER_TYPE) {
builder.setMessageToMedicalView("${hour}小时${minute}分${second}")
} else {
builder.setMessageToTextView("${hour}小时${minute}分${second}") 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