diff --git a/gradle.properties b/gradle.properties index e1b11b3ab9..26151597c3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -58,9 +58,6 @@ MOGO_MODULE_MAIN_INDEPENDENT_VERSION = 1.2.1.11 MOGO_MODULE_OBU_VERSION = 1.2.1.10-SNAPSHOT -MOGO_MODULE_LEFT_PANEL_VERSION = 1.2.1.10-SNAPSHOT - - ## 工程外部模块 # 探路 MOGO_MODULE_TANLU_VERSION=1.2.1.12 @@ -83,6 +80,10 @@ MOGO_MODULE_AD_CARD_VERSION=1.0.1 # 探路上报和分享模块 TANLULIB_VERSION=1.2.1.12 MOGO_MODULE_EVENT_PANEL_VERSION = 1.0.0-SNAPSHOT +MOGO_MODULE_EVENT_PANEL_NOOP_VERSION = 1.0.0-SNAPSHOT +#左侧面板模块 +MOGO_MODULE_LEFT_PANEL_VERSION = 1.2.1.10-SNAPSHOT +MOGO_MODULE_LEFT_PANEL_NOOP_VERSION = 1.2.1.10-SNAPSHOT # Boost分包 BOOST_MULTIDEX_VERSION=1.0.0 diff --git a/modules/mogo-module-event-panel/build.gradle b/modules/mogo-module-event-panel/build.gradle index 285da5304d..393dcdbf49 100644 --- a/modules/mogo-module-event-panel/build.gradle +++ b/modules/mogo-module-event-panel/build.gradle @@ -49,6 +49,9 @@ dependencies { implementation rootProject.ext.dependencies.rxandroid implementation rootProject.ext.dependencies.androidxviewpager2 implementation rootProject.ext.dependencies.androidxrecyclerview + implementation rootProject.ext.dependencies.room + kapt rootProject.ext.dependencies.roomAnnotationProcessor + implementation rootProject.ext.dependencies.roomRxjava if (Boolean.valueOf(RELEASE)) { compileOnly rootProject.ext.dependencies.modulecommon diff --git a/modules/mogo-module-event-panel/src/androidTest/java/com/zhidao/mogo/module/event/panel/ExampleInstrumentedTest.java b/modules/mogo-module-event-panel/src/androidTest/java/com/zhidao/mogo/module/event/panel/ExampleInstrumentedTest.java deleted file mode 100644 index e1c4a62f6e..0000000000 --- a/modules/mogo-module-event-panel/src/androidTest/java/com/zhidao/mogo/module/event/panel/ExampleInstrumentedTest.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.zhidao.mogo.module.event.panel; - -import android.content.Context; - -import androidx.test.platform.app.InstrumentationRegistry; -import androidx.test.ext.junit.runners.AndroidJUnit4; - -import org.junit.Test; -import org.junit.runner.RunWith; - -import static org.junit.Assert.*; - -/** - * Instrumented test, which will execute on an Android device. - * - * @see Testing documentation - */ -@RunWith(AndroidJUnit4.class) -public class ExampleInstrumentedTest { - @Test - public void useAppContext() { - // Context of the app under test. - Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); - assertEquals("com.zhidao.mogo.module.event.panel.test", appContext.getPackageName()); - } -} \ No newline at end of file diff --git a/modules/mogo-module-event-panel/src/main/java/com/zhidao/mogo/module/event/panel/bean/TripRecord.kt b/modules/mogo-module-event-panel/src/main/java/com/zhidao/mogo/module/event/panel/bean/TripRecord.kt new file mode 100644 index 0000000000..d5405f99f6 --- /dev/null +++ b/modules/mogo-module-event-panel/src/main/java/com/zhidao/mogo/module/event/panel/bean/TripRecord.kt @@ -0,0 +1,18 @@ +package com.zhidao.mogo.module.event.panel.bean + +import androidx.room.Entity +import androidx.room.PrimaryKey + +/** + * 出行记录本地存储封装类 + * + * @author + */ +@Entity +class TripRecord { + @PrimaryKey(autoGenerate = true) + var id:Int = 0 + var canUsed:Boolean = true + var isUsed:Boolean = false + var entity:String? = null +} \ No newline at end of file diff --git a/modules/mogo-module-event-panel/src/main/java/com/zhidao/mogo/module/event/panel/dao/TripRecordDao.kt b/modules/mogo-module-event-panel/src/main/java/com/zhidao/mogo/module/event/panel/dao/TripRecordDao.kt new file mode 100644 index 0000000000..bf25058a49 --- /dev/null +++ b/modules/mogo-module-event-panel/src/main/java/com/zhidao/mogo/module/event/panel/dao/TripRecordDao.kt @@ -0,0 +1,19 @@ +package com.zhidao.mogo.module.event.panel.dao + +import androidx.room.* +import com.zhidao.mogo.module.event.panel.bean.TripRecord + +@Dao +interface TripRecordDao { +// fun getAllTripRecord():List + + @Insert + fun insert(vararg tripRecord: TripRecord) + + @Update + fun update(vararg tripRecord: TripRecord) + + @Delete + fun delete(vararg tripRecord: TripRecord) + +} \ No newline at end of file diff --git a/modules/mogo-module-event-panel/src/main/java/com/zhidao/mogo/module/event/panel/dao/TripRecordDatabase.kt b/modules/mogo-module-event-panel/src/main/java/com/zhidao/mogo/module/event/panel/dao/TripRecordDatabase.kt new file mode 100644 index 0000000000..dd4f77900e --- /dev/null +++ b/modules/mogo-module-event-panel/src/main/java/com/zhidao/mogo/module/event/panel/dao/TripRecordDatabase.kt @@ -0,0 +1,19 @@ +package com.zhidao.mogo.module.event.panel.dao + +import android.content.Context +import androidx.room.Database +import androidx.room.Room +import androidx.room.RoomDatabase +import com.zhidao.mogo.module.event.panel.bean.TripRecord + +@Database(entities = [TripRecord::class], version = 1, exportSchema = false) +abstract class TripRecordDatabase : RoomDatabase() { + companion object{ + const val DB_NAME = "TripRecordDatabase.db" + } + fun create(context: Context):TripRecordDatabase { + return Room.databaseBuilder(context, TripRecordDatabase::class.java, DB_NAME).build() + } + + abstract fun getTripRecordDao():TripRecordDao +} \ No newline at end of file diff --git a/modules/mogo-module-event-panel/src/main/java/com/zhidao/mogo/module/event/panel/presenter/TripRecordPresenter.kt b/modules/mogo-module-event-panel/src/main/java/com/zhidao/mogo/module/event/panel/presenter/TripRecordPresenter.kt index b16fc222cd..de0347a980 100644 --- a/modules/mogo-module-event-panel/src/main/java/com/zhidao/mogo/module/event/panel/presenter/TripRecordPresenter.kt +++ b/modules/mogo-module-event-panel/src/main/java/com/zhidao/mogo/module/event/panel/presenter/TripRecordPresenter.kt @@ -1,7 +1,15 @@ package com.zhidao.mogo.module.event.panel.presenter +import com.alibaba.android.arouter.launcher.ARouter import com.mogo.commons.mvp.Presenter +import com.mogo.service.IMogoServiceApis +import com.mogo.service.MogoServicePaths import com.zhidao.mogo.module.event.panel.fragment.TripRecordFragment class TripRecordPresenter(view: TripRecordFragment) : Presenter(view) { + private val serviceApis = ARouter.getInstance().build(MogoServicePaths.PATH_SERVICE_APIS).navigation(view.context) as IMogoServiceApis + + init { + + } } \ No newline at end of file diff --git a/modules/mogo-module-event-panel/src/test/java/com/zhidao/mogo/module/event/panel/ExampleUnitTest.java b/modules/mogo-module-event-panel/src/test/java/com/zhidao/mogo/module/event/panel/ExampleUnitTest.java deleted file mode 100644 index eb38ce1fa4..0000000000 --- a/modules/mogo-module-event-panel/src/test/java/com/zhidao/mogo/module/event/panel/ExampleUnitTest.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.zhidao.mogo.module.event.panel; - -import org.junit.Test; - -import static org.junit.Assert.*; - -/** - * Example local unit test, which will execute on the development machine (host). - * - * @see Testing documentation - */ -public class ExampleUnitTest { - @Test - public void addition_isCorrect() { - assertEquals(4, 2 + 2); - } -} \ No newline at end of file