From 1086478532dc202ad970825a6f5f4e96a085353c Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期五, 13 八月 2021 16:01:32 +0800
Subject: [PATCH] 1. 新增问题位置获取接口 2. 修复修改问题界面问题子类不随问题大类随动变换问题
---
app/src/main/java/cn/flightfeather/thirdappmodule/repository/ProblemRepository.kt | 27 +++++++++++++++++++++------
1 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/repository/ProblemRepository.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/repository/ProblemRepository.kt
index 1203700..271d51f 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/repository/ProblemRepository.kt
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/repository/ProblemRepository.kt
@@ -6,6 +6,7 @@
import cn.flightfeather.thirdappmodule.bean.vo.ProblemDetailVo
import cn.flightfeather.thirdappmodule.bean.vo.ProblemlistVo
import cn.flightfeather.thirdappmodule.common.net.*
+import cn.flightfeather.thirdappmodule.httpservice.DomainItemService
import cn.flightfeather.thirdappmodule.httpservice.InspectionService
import cn.flightfeather.thirdappmodule.httpservice.MediaFileService
import cn.flightfeather.thirdappmodule.httpservice.ProblemListService
@@ -39,12 +40,11 @@
/**
* 鑾峰彇鍦烘櫙闂鍙�変綅缃�
*/
- fun getLocationList(resultCallBack: ResultCallBack<ArrayList<Domainitem>>) {
- val dbService = domainDao.getLocationList().map {
- Response.success(ArrayList<Domainitem>().apply { addAll(it) })
- }
+ fun getLocationList(sceneType: Int, resultCallBack: ResultCallBack<ArrayList<Domainitem>>) {
- RetrofitFactory.executeResult(dbService, object : ResultObserver<ArrayList<Domainitem>>() {
+ val service = retrofit.create(DomainItemService::class.java).getLocation(sceneType)
+
+ RetrofitFactory.executeResult(service, object : ResultObserver<ArrayList<Domainitem>>() {
override fun onSuccess(result: ArrayList<Domainitem>?) {
resultCallBack.onSuccess(result)
}
@@ -52,8 +52,22 @@
override fun onFailure(e: Throwable, isNetWorkError: Boolean) {
resultCallBack.onFailure()
}
-
})
+
+// val dbService = domainDao.getLocationList().map {
+// Response.success(ArrayList<Domainitem>().apply { addAll(it) })
+// }
+//
+// RetrofitFactory.executeResult(dbService, object : ResultObserver<ArrayList<Domainitem>>() {
+// override fun onSuccess(result: ArrayList<Domainitem>?) {
+// resultCallBack.onSuccess(result)
+// }
+//
+// override fun onFailure(e: Throwable, isNetWorkError: Boolean) {
+// resultCallBack.onFailure()
+// }
+//
+// })
}
/**
@@ -78,6 +92,7 @@
* 鑾峰彇瀵瑰簲鍦烘櫙涓嬫墍鏈夐棶棰樼被鍨�
*/
fun getProblemType(taskTypeId: Byte, cityCode: String, districtCode: String, sceneTypeId: Byte, resultCallBack: ResultCallBack<ArrayList<Problemtype>>) {
+
val dbService = domainDao.getProblemType(taskTypeId, cityCode, districtCode, sceneTypeId).map {
Response.success(ArrayList<Problemtype>().apply { addAll(it) })
}
--
Gitblit v1.9.3