diff --git a/app/src/main/java/com/casic/app/smartwell/greendao/DaoMaster.java b/app/src/main/java/com/casic/app/smartwell/greendao/DaoMaster.java index 319dfbe..9f9f3f4 100644 --- a/app/src/main/java/com/casic/app/smartwell/greendao/DaoMaster.java +++ b/app/src/main/java/com/casic/app/smartwell/greendao/DaoMaster.java @@ -6,9 +6,9 @@ import android.util.Log; import org.greenrobot.greendao.AbstractDaoMaster; +import org.greenrobot.greendao.database.StandardDatabase; import org.greenrobot.greendao.database.Database; import org.greenrobot.greendao.database.DatabaseOpenHelper; -import org.greenrobot.greendao.database.StandardDatabase; import org.greenrobot.greendao.identityscope.IdentityScopeType; @@ -19,9 +19,7 @@ public class DaoMaster extends AbstractDaoMaster { public static final int SCHEMA_VERSION = 1; - /** - * Creates underlying database table using DAOs. - */ + /** Creates underlying database table using DAOs. */ public static void createAllTables(Database db, boolean ifNotExists) { NoticeLocaleBeanDao.createTable(db, ifNotExists); } diff --git a/app/src/main/java/com/casic/app/smartwell/greendao/DaoMaster.java b/app/src/main/java/com/casic/app/smartwell/greendao/DaoMaster.java index 319dfbe..9f9f3f4 100644 --- a/app/src/main/java/com/casic/app/smartwell/greendao/DaoMaster.java +++ b/app/src/main/java/com/casic/app/smartwell/greendao/DaoMaster.java @@ -6,9 +6,9 @@ import android.util.Log; import org.greenrobot.greendao.AbstractDaoMaster; +import org.greenrobot.greendao.database.StandardDatabase; import org.greenrobot.greendao.database.Database; import org.greenrobot.greendao.database.DatabaseOpenHelper; -import org.greenrobot.greendao.database.StandardDatabase; import org.greenrobot.greendao.identityscope.IdentityScopeType; @@ -19,9 +19,7 @@ public class DaoMaster extends AbstractDaoMaster { public static final int SCHEMA_VERSION = 1; - /** - * Creates underlying database table using DAOs. - */ + /** Creates underlying database table using DAOs. */ public static void createAllTables(Database db, boolean ifNotExists) { NoticeLocaleBeanDao.createTable(db, ifNotExists); } diff --git a/app/src/main/java/com/casic/app/smartwell/greendao/DaoSession.java b/app/src/main/java/com/casic/app/smartwell/greendao/DaoSession.java index c574564..196fe19 100644 --- a/app/src/main/java/com/casic/app/smartwell/greendao/DaoSession.java +++ b/app/src/main/java/com/casic/app/smartwell/greendao/DaoSession.java @@ -1,6 +1,6 @@ package com.casic.app.smartwell.greendao; -import com.casic.app.smartwell.model.NoticeLocaleBean; +import java.util.Map; import org.greenrobot.greendao.AbstractDao; import org.greenrobot.greendao.AbstractDaoSession; @@ -8,13 +8,15 @@ import org.greenrobot.greendao.identityscope.IdentityScopeType; import org.greenrobot.greendao.internal.DaoConfig; -import java.util.Map; +import com.casic.app.smartwell.model.NoticeLocaleBean; + +import com.casic.app.smartwell.greendao.NoticeLocaleBeanDao; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. /** * {@inheritDoc} - * + * * @see org.greenrobot.greendao.AbstractDaoSession */ public class DaoSession extends AbstractDaoSession { @@ -34,7 +36,7 @@ registerDao(NoticeLocaleBean.class, noticeLocaleBeanDao); } - + public void clear() { noticeLocaleBeanDaoConfig.clearIdentityScope(); } diff --git a/app/src/main/java/com/casic/app/smartwell/greendao/DaoMaster.java b/app/src/main/java/com/casic/app/smartwell/greendao/DaoMaster.java index 319dfbe..9f9f3f4 100644 --- a/app/src/main/java/com/casic/app/smartwell/greendao/DaoMaster.java +++ b/app/src/main/java/com/casic/app/smartwell/greendao/DaoMaster.java @@ -6,9 +6,9 @@ import android.util.Log; import org.greenrobot.greendao.AbstractDaoMaster; +import org.greenrobot.greendao.database.StandardDatabase; import org.greenrobot.greendao.database.Database; import org.greenrobot.greendao.database.DatabaseOpenHelper; -import org.greenrobot.greendao.database.StandardDatabase; import org.greenrobot.greendao.identityscope.IdentityScopeType; @@ -19,9 +19,7 @@ public class DaoMaster extends AbstractDaoMaster { public static final int SCHEMA_VERSION = 1; - /** - * Creates underlying database table using DAOs. - */ + /** Creates underlying database table using DAOs. */ public static void createAllTables(Database db, boolean ifNotExists) { NoticeLocaleBeanDao.createTable(db, ifNotExists); } diff --git a/app/src/main/java/com/casic/app/smartwell/greendao/DaoSession.java b/app/src/main/java/com/casic/app/smartwell/greendao/DaoSession.java index c574564..196fe19 100644 --- a/app/src/main/java/com/casic/app/smartwell/greendao/DaoSession.java +++ b/app/src/main/java/com/casic/app/smartwell/greendao/DaoSession.java @@ -1,6 +1,6 @@ package com.casic.app.smartwell.greendao; -import com.casic.app.smartwell.model.NoticeLocaleBean; +import java.util.Map; import org.greenrobot.greendao.AbstractDao; import org.greenrobot.greendao.AbstractDaoSession; @@ -8,13 +8,15 @@ import org.greenrobot.greendao.identityscope.IdentityScopeType; import org.greenrobot.greendao.internal.DaoConfig; -import java.util.Map; +import com.casic.app.smartwell.model.NoticeLocaleBean; + +import com.casic.app.smartwell.greendao.NoticeLocaleBeanDao; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. /** * {@inheritDoc} - * + * * @see org.greenrobot.greendao.AbstractDaoSession */ public class DaoSession extends AbstractDaoSession { @@ -34,7 +36,7 @@ registerDao(NoticeLocaleBean.class, noticeLocaleBeanDao); } - + public void clear() { noticeLocaleBeanDaoConfig.clearIdentityScope(); } diff --git a/app/src/main/java/com/casic/app/smartwell/greendao/NoticeLocaleBeanDao.java b/app/src/main/java/com/casic/app/smartwell/greendao/NoticeLocaleBeanDao.java index a7c544a..3ee3247 100644 --- a/app/src/main/java/com/casic/app/smartwell/greendao/NoticeLocaleBeanDao.java +++ b/app/src/main/java/com/casic/app/smartwell/greendao/NoticeLocaleBeanDao.java @@ -3,18 +3,18 @@ import android.database.Cursor; import android.database.sqlite.SQLiteStatement; -import com.casic.app.smartwell.model.NoticeLocaleBean; - import org.greenrobot.greendao.AbstractDao; import org.greenrobot.greendao.Property; +import org.greenrobot.greendao.internal.DaoConfig; import org.greenrobot.greendao.database.Database; import org.greenrobot.greendao.database.DatabaseStatement; -import org.greenrobot.greendao.internal.DaoConfig; + +import com.casic.app.smartwell.model.NoticeLocaleBean; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. -/** +/** * DAO for table "NOTICE_LOCALE_BEAN". - */ +*/ public class NoticeLocaleBeanDao extends AbstractDao { public static final String TABLENAME = "NOTICE_LOCALE_BEAN"; @@ -41,16 +41,14 @@ public NoticeLocaleBeanDao(DaoConfig config) { super(config); } - + public NoticeLocaleBeanDao(DaoConfig config, DaoSession daoSession) { super(config, daoSession); } - /** - * Creates the underlying database table. - */ + /** Creates the underlying database table. */ public static void createTable(Database db, boolean ifNotExists) { - String constraint = ifNotExists ? "IF NOT EXISTS ": ""; + String constraint = ifNotExists? "IF NOT EXISTS ": ""; db.execSQL("CREATE TABLE " + constraint + "\"NOTICE_LOCALE_BEAN\" (" + // "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id "\"MESSAGE_ID\" TEXT UNIQUE ," + // 1: messageId @@ -184,7 +182,7 @@ if (isRead != null) { stmt.bindString(10, isRead); } - + String noticeTime = entity.getNoticeTime(); if (noticeTime != null) { stmt.bindString(11, noticeTime); @@ -194,22 +192,22 @@ @Override public Long readKey(Cursor cursor, int offset) { return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0); - } + } @Override public NoticeLocaleBean readEntity(Cursor cursor, int offset) { NoticeLocaleBean entity = new NoticeLocaleBean( // - cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id - cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // messageId - cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // appid - cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // clientId - cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // taskId - cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // userId - cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // title - cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // content - cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // deviceCode - cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // isRead - cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10) // noticeTime + cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id + cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // messageId + cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // appid + cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // clientId + cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // taskId + cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // userId + cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // title + cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // content + cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // deviceCode + cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // isRead + cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10) // noticeTime ); return entity; } @@ -227,17 +225,17 @@ entity.setDeviceCode(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8)); entity.setIsRead(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9)); entity.setNoticeTime(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10)); - } - + } + @Override protected final Long updateKeyAfterInsert(NoticeLocaleBean entity, long rowId) { entity.setId(rowId); return rowId; } - + @Override public Long getKey(NoticeLocaleBean entity) { - if (entity != null) { + if(entity != null) { return entity.getId(); } else { return null; diff --git a/app/src/main/java/com/casic/app/smartwell/greendao/DaoMaster.java b/app/src/main/java/com/casic/app/smartwell/greendao/DaoMaster.java index 319dfbe..9f9f3f4 100644 --- a/app/src/main/java/com/casic/app/smartwell/greendao/DaoMaster.java +++ b/app/src/main/java/com/casic/app/smartwell/greendao/DaoMaster.java @@ -6,9 +6,9 @@ import android.util.Log; import org.greenrobot.greendao.AbstractDaoMaster; +import org.greenrobot.greendao.database.StandardDatabase; import org.greenrobot.greendao.database.Database; import org.greenrobot.greendao.database.DatabaseOpenHelper; -import org.greenrobot.greendao.database.StandardDatabase; import org.greenrobot.greendao.identityscope.IdentityScopeType; @@ -19,9 +19,7 @@ public class DaoMaster extends AbstractDaoMaster { public static final int SCHEMA_VERSION = 1; - /** - * Creates underlying database table using DAOs. - */ + /** Creates underlying database table using DAOs. */ public static void createAllTables(Database db, boolean ifNotExists) { NoticeLocaleBeanDao.createTable(db, ifNotExists); } diff --git a/app/src/main/java/com/casic/app/smartwell/greendao/DaoSession.java b/app/src/main/java/com/casic/app/smartwell/greendao/DaoSession.java index c574564..196fe19 100644 --- a/app/src/main/java/com/casic/app/smartwell/greendao/DaoSession.java +++ b/app/src/main/java/com/casic/app/smartwell/greendao/DaoSession.java @@ -1,6 +1,6 @@ package com.casic.app.smartwell.greendao; -import com.casic.app.smartwell.model.NoticeLocaleBean; +import java.util.Map; import org.greenrobot.greendao.AbstractDao; import org.greenrobot.greendao.AbstractDaoSession; @@ -8,13 +8,15 @@ import org.greenrobot.greendao.identityscope.IdentityScopeType; import org.greenrobot.greendao.internal.DaoConfig; -import java.util.Map; +import com.casic.app.smartwell.model.NoticeLocaleBean; + +import com.casic.app.smartwell.greendao.NoticeLocaleBeanDao; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. /** * {@inheritDoc} - * + * * @see org.greenrobot.greendao.AbstractDaoSession */ public class DaoSession extends AbstractDaoSession { @@ -34,7 +36,7 @@ registerDao(NoticeLocaleBean.class, noticeLocaleBeanDao); } - + public void clear() { noticeLocaleBeanDaoConfig.clearIdentityScope(); } diff --git a/app/src/main/java/com/casic/app/smartwell/greendao/NoticeLocaleBeanDao.java b/app/src/main/java/com/casic/app/smartwell/greendao/NoticeLocaleBeanDao.java index a7c544a..3ee3247 100644 --- a/app/src/main/java/com/casic/app/smartwell/greendao/NoticeLocaleBeanDao.java +++ b/app/src/main/java/com/casic/app/smartwell/greendao/NoticeLocaleBeanDao.java @@ -3,18 +3,18 @@ import android.database.Cursor; import android.database.sqlite.SQLiteStatement; -import com.casic.app.smartwell.model.NoticeLocaleBean; - import org.greenrobot.greendao.AbstractDao; import org.greenrobot.greendao.Property; +import org.greenrobot.greendao.internal.DaoConfig; import org.greenrobot.greendao.database.Database; import org.greenrobot.greendao.database.DatabaseStatement; -import org.greenrobot.greendao.internal.DaoConfig; + +import com.casic.app.smartwell.model.NoticeLocaleBean; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. -/** +/** * DAO for table "NOTICE_LOCALE_BEAN". - */ +*/ public class NoticeLocaleBeanDao extends AbstractDao { public static final String TABLENAME = "NOTICE_LOCALE_BEAN"; @@ -41,16 +41,14 @@ public NoticeLocaleBeanDao(DaoConfig config) { super(config); } - + public NoticeLocaleBeanDao(DaoConfig config, DaoSession daoSession) { super(config, daoSession); } - /** - * Creates the underlying database table. - */ + /** Creates the underlying database table. */ public static void createTable(Database db, boolean ifNotExists) { - String constraint = ifNotExists ? "IF NOT EXISTS ": ""; + String constraint = ifNotExists? "IF NOT EXISTS ": ""; db.execSQL("CREATE TABLE " + constraint + "\"NOTICE_LOCALE_BEAN\" (" + // "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id "\"MESSAGE_ID\" TEXT UNIQUE ," + // 1: messageId @@ -184,7 +182,7 @@ if (isRead != null) { stmt.bindString(10, isRead); } - + String noticeTime = entity.getNoticeTime(); if (noticeTime != null) { stmt.bindString(11, noticeTime); @@ -194,22 +192,22 @@ @Override public Long readKey(Cursor cursor, int offset) { return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0); - } + } @Override public NoticeLocaleBean readEntity(Cursor cursor, int offset) { NoticeLocaleBean entity = new NoticeLocaleBean( // - cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id - cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // messageId - cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // appid - cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // clientId - cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // taskId - cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // userId - cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // title - cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // content - cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // deviceCode - cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // isRead - cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10) // noticeTime + cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id + cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // messageId + cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // appid + cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // clientId + cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // taskId + cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // userId + cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // title + cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // content + cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // deviceCode + cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // isRead + cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10) // noticeTime ); return entity; } @@ -227,17 +225,17 @@ entity.setDeviceCode(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8)); entity.setIsRead(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9)); entity.setNoticeTime(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10)); - } - + } + @Override protected final Long updateKeyAfterInsert(NoticeLocaleBean entity, long rowId) { entity.setId(rowId); return rowId; } - + @Override public Long getKey(NoticeLocaleBean entity) { - if (entity != null) { + if(entity != null) { return entity.getId(); } else { return null; diff --git a/app/src/main/java/com/casic/app/smartwell/view/SplashScreenActivity.kt b/app/src/main/java/com/casic/app/smartwell/view/SplashScreenActivity.kt index f53ee53..b60a8ab 100644 --- a/app/src/main/java/com/casic/app/smartwell/view/SplashScreenActivity.kt +++ b/app/src/main/java/com/casic/app/smartwell/view/SplashScreenActivity.kt @@ -20,11 +20,11 @@ userViewModel.userDetailModel.observe(this@SplashScreenActivity, { if (it.code == 200) { navigatePageTo() - finish() + } else { + navigatePageTo() } + finish() }) - navigatePageTo() - finish() } override fun onTick(millisUntilFinished: Long) {