Commit 3dc5665b8364458bc8e24e376afa05ac5cf94575

Authored by YangShuai
1 parent d833e259

1 修改编译版本测试,无法上传图片问题

.idea/gradle.xml
1 <?xml version="1.0" encoding="UTF-8"?> 1 <?xml version="1.0" encoding="UTF-8"?>
2 <project version="4"> 2 <project version="4">
  3 + <component name="GradleMigrationSettings" migrationVersion="1" />
3 <component name="GradleSettings"> 4 <component name="GradleSettings">
4 <option name="linkedExternalProjectsSettings"> 5 <option name="linkedExternalProjectsSettings">
5 <GradleProjectSettings> 6 <GradleProjectSettings>
6 - <compositeConfiguration>  
7 - <compositeBuild compositeDefinitionSource="SCRIPT" />  
8 - </compositeConfiguration> 7 + <option name="testRunner" value="PLATFORM" />
9 <option name="distributionType" value="DEFAULT_WRAPPED" /> 8 <option name="distributionType" value="DEFAULT_WRAPPED" />
10 <option name="externalProjectPath" value="$PROJECT_DIR$" /> 9 <option name="externalProjectPath" value="$PROJECT_DIR$" />
11 <option name="modules"> 10 <option name="modules">
config.gradle
@@ -21,7 +21,7 @@ ext { @@ -21,7 +21,7 @@ ext {
21 //编译方式 21 //编译方式
22 debug : false, 22 debug : false,
23 //版本号 23 //版本号
24 - version: "1.0.10", 24 + version: "1.0.10-beta1",
25 //Lib库前缀 25 //Lib库前缀
26 packeg : "com.cnlive.module", 26 packeg : "com.cnlive.module",
27 //Lib库名称 27 //Lib库名称
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/model/Constant.java
@@ -37,7 +37,7 @@ public class Constant { @@ -37,7 +37,7 @@ public class Constant {
37 /*****************************************运营工具其他值,非标志位****************************************************/ 37 /*****************************************运营工具其他值,非标志位****************************************************/
38 public static final double PASS_RATE = 0.7;//通过率70% 38 public static final double PASS_RATE = 0.7;//通过率70%
39 public static final int CHECK_ACCURACY = 50;//判断用户是否完成的精度范围 39 public static final int CHECK_ACCURACY = 50;//判断用户是否完成的精度范围
40 - public static final int LOCA_ACCURACY = 100;//定位过滤精度 40 + public static final int LOCA_ACCURACY = 1000;//定位过滤精度
41 public static final int LOCA_END_POINT_ACCURACY = 20;//终点位置比较精度 41 public static final int LOCA_END_POINT_ACCURACY = 20;//终点位置比较精度
42 public static final int LOCA_START_POINT_ACCURACY = 20;//起点位置比较精度 42 public static final int LOCA_START_POINT_ACCURACY = 20;//起点位置比较精度
43 public static final int FENCE_OFFSET = 50;//围栏偏离距离 43 public static final int FENCE_OFFSET = 50;//围栏偏离距离
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/sql/dao/DaoMaster.java
@@ -21,20 +21,20 @@ public class DaoMaster extends AbstractDaoMaster { @@ -21,20 +21,20 @@ public class DaoMaster extends AbstractDaoMaster {
21 21
22 /** Creates underlying database table using DAOs. */ 22 /** Creates underlying database table using DAOs. */
23 public static void createAllTables(Database db, boolean ifNotExists) { 23 public static void createAllTables(Database db, boolean ifNotExists) {
  24 + CalorieEntityDao.createTable(db, ifNotExists);
24 CollFailedEntityDao.createTable(db, ifNotExists); 25 CollFailedEntityDao.createTable(db, ifNotExists);
25 CollUserStepEntityDao.createTable(db, ifNotExists); 26 CollUserStepEntityDao.createTable(db, ifNotExists);
26 FailedEntityDao.createTable(db, ifNotExists); 27 FailedEntityDao.createTable(db, ifNotExists);
27 UserStepEntityDao.createTable(db, ifNotExists); 28 UserStepEntityDao.createTable(db, ifNotExists);
28 - CalorieEntityDao.createTable(db, ifNotExists);  
29 } 29 }
30 30
31 /** Drops underlying database table using DAOs. */ 31 /** Drops underlying database table using DAOs. */
32 public static void dropAllTables(Database db, boolean ifExists) { 32 public static void dropAllTables(Database db, boolean ifExists) {
  33 + CalorieEntityDao.dropTable(db, ifExists);
33 CollFailedEntityDao.dropTable(db, ifExists); 34 CollFailedEntityDao.dropTable(db, ifExists);
34 CollUserStepEntityDao.dropTable(db, ifExists); 35 CollUserStepEntityDao.dropTable(db, ifExists);
35 FailedEntityDao.dropTable(db, ifExists); 36 FailedEntityDao.dropTable(db, ifExists);
36 UserStepEntityDao.dropTable(db, ifExists); 37 UserStepEntityDao.dropTable(db, ifExists);
37 - CalorieEntityDao.dropTable(db, ifExists);  
38 } 38 }
39 39
40 /** 40 /**
@@ -53,11 +53,11 @@ public class DaoMaster extends AbstractDaoMaster { @@ -53,11 +53,11 @@ public class DaoMaster extends AbstractDaoMaster {
53 53
54 public DaoMaster(Database db) { 54 public DaoMaster(Database db) {
55 super(db, SCHEMA_VERSION); 55 super(db, SCHEMA_VERSION);
  56 + registerDaoClass(CalorieEntityDao.class);
56 registerDaoClass(CollFailedEntityDao.class); 57 registerDaoClass(CollFailedEntityDao.class);
57 registerDaoClass(CollUserStepEntityDao.class); 58 registerDaoClass(CollUserStepEntityDao.class);
58 registerDaoClass(FailedEntityDao.class); 59 registerDaoClass(FailedEntityDao.class);
59 registerDaoClass(UserStepEntityDao.class); 60 registerDaoClass(UserStepEntityDao.class);
60 - registerDaoClass(CalorieEntityDao.class);  
61 } 61 }
62 62
63 public DaoSession newSession() { 63 public DaoSession newSession() {
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/sql/dao/DaoSession.java
@@ -8,17 +8,17 @@ import org.greenrobot.greendao.database.Database; @@ -8,17 +8,17 @@ import org.greenrobot.greendao.database.Database;
8 import org.greenrobot.greendao.identityscope.IdentityScopeType; 8 import org.greenrobot.greendao.identityscope.IdentityScopeType;
9 import org.greenrobot.greendao.internal.DaoConfig; 9 import org.greenrobot.greendao.internal.DaoConfig;
10 10
  11 +import com.cnlive.moudle.pedometer.sql.entity.CalorieEntity;
11 import com.cnlive.moudle.pedometer.sql.entity.CollFailedEntity; 12 import com.cnlive.moudle.pedometer.sql.entity.CollFailedEntity;
12 import com.cnlive.moudle.pedometer.sql.entity.CollUserStepEntity; 13 import com.cnlive.moudle.pedometer.sql.entity.CollUserStepEntity;
13 import com.cnlive.moudle.pedometer.sql.entity.FailedEntity; 14 import com.cnlive.moudle.pedometer.sql.entity.FailedEntity;
14 import com.cnlive.moudle.pedometer.sql.entity.UserStepEntity; 15 import com.cnlive.moudle.pedometer.sql.entity.UserStepEntity;
15 -import com.cnlive.moudle.pedometer.sql.entity.CalorieEntity;  
16 16
  17 +import com.cnlive.moudle.pedometer.sql.dao.CalorieEntityDao;
17 import com.cnlive.moudle.pedometer.sql.dao.CollFailedEntityDao; 18 import com.cnlive.moudle.pedometer.sql.dao.CollFailedEntityDao;
18 import com.cnlive.moudle.pedometer.sql.dao.CollUserStepEntityDao; 19 import com.cnlive.moudle.pedometer.sql.dao.CollUserStepEntityDao;
19 import com.cnlive.moudle.pedometer.sql.dao.FailedEntityDao; 20 import com.cnlive.moudle.pedometer.sql.dao.FailedEntityDao;
20 import com.cnlive.moudle.pedometer.sql.dao.UserStepEntityDao; 21 import com.cnlive.moudle.pedometer.sql.dao.UserStepEntityDao;
21 -import com.cnlive.moudle.pedometer.sql.dao.CalorieEntityDao;  
22 22
23 // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. 23 // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
24 24
@@ -29,22 +29,25 @@ import com.cnlive.moudle.pedometer.sql.dao.CalorieEntityDao; @@ -29,22 +29,25 @@ import com.cnlive.moudle.pedometer.sql.dao.CalorieEntityDao;
29 */ 29 */
30 public class DaoSession extends AbstractDaoSession { 30 public class DaoSession extends AbstractDaoSession {
31 31
  32 + private final DaoConfig calorieEntityDaoConfig;
32 private final DaoConfig collFailedEntityDaoConfig; 33 private final DaoConfig collFailedEntityDaoConfig;
33 private final DaoConfig collUserStepEntityDaoConfig; 34 private final DaoConfig collUserStepEntityDaoConfig;
34 private final DaoConfig failedEntityDaoConfig; 35 private final DaoConfig failedEntityDaoConfig;
35 private final DaoConfig userStepEntityDaoConfig; 36 private final DaoConfig userStepEntityDaoConfig;
36 - private final DaoConfig calorieEntityDaoConfig;  
37 37
  38 + private final CalorieEntityDao calorieEntityDao;
38 private final CollFailedEntityDao collFailedEntityDao; 39 private final CollFailedEntityDao collFailedEntityDao;
39 private final CollUserStepEntityDao collUserStepEntityDao; 40 private final CollUserStepEntityDao collUserStepEntityDao;
40 private final FailedEntityDao failedEntityDao; 41 private final FailedEntityDao failedEntityDao;
41 private final UserStepEntityDao userStepEntityDao; 42 private final UserStepEntityDao userStepEntityDao;
42 - private final CalorieEntityDao calorieEntityDao;  
43 43
44 public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig> 44 public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
45 daoConfigMap) { 45 daoConfigMap) {
46 super(db); 46 super(db);
47 47
  48 + calorieEntityDaoConfig = daoConfigMap.get(CalorieEntityDao.class).clone();
  49 + calorieEntityDaoConfig.initIdentityScope(type);
  50 +
48 collFailedEntityDaoConfig = daoConfigMap.get(CollFailedEntityDao.class).clone(); 51 collFailedEntityDaoConfig = daoConfigMap.get(CollFailedEntityDao.class).clone();
49 collFailedEntityDaoConfig.initIdentityScope(type); 52 collFailedEntityDaoConfig.initIdentityScope(type);
50 53
@@ -57,28 +60,29 @@ public class DaoSession extends AbstractDaoSession { @@ -57,28 +60,29 @@ public class DaoSession extends AbstractDaoSession {
57 userStepEntityDaoConfig = daoConfigMap.get(UserStepEntityDao.class).clone(); 60 userStepEntityDaoConfig = daoConfigMap.get(UserStepEntityDao.class).clone();
58 userStepEntityDaoConfig.initIdentityScope(type); 61 userStepEntityDaoConfig.initIdentityScope(type);
59 62
60 - calorieEntityDaoConfig = daoConfigMap.get(CalorieEntityDao.class).clone();  
61 - calorieEntityDaoConfig.initIdentityScope(type);  
62 - 63 + calorieEntityDao = new CalorieEntityDao(calorieEntityDaoConfig, this);
63 collFailedEntityDao = new CollFailedEntityDao(collFailedEntityDaoConfig, this); 64 collFailedEntityDao = new CollFailedEntityDao(collFailedEntityDaoConfig, this);
64 collUserStepEntityDao = new CollUserStepEntityDao(collUserStepEntityDaoConfig, this); 65 collUserStepEntityDao = new CollUserStepEntityDao(collUserStepEntityDaoConfig, this);
65 failedEntityDao = new FailedEntityDao(failedEntityDaoConfig, this); 66 failedEntityDao = new FailedEntityDao(failedEntityDaoConfig, this);
66 userStepEntityDao = new UserStepEntityDao(userStepEntityDaoConfig, this); 67 userStepEntityDao = new UserStepEntityDao(userStepEntityDaoConfig, this);
67 - calorieEntityDao = new CalorieEntityDao(calorieEntityDaoConfig, this);  
68 68
  69 + registerDao(CalorieEntity.class, calorieEntityDao);
69 registerDao(CollFailedEntity.class, collFailedEntityDao); 70 registerDao(CollFailedEntity.class, collFailedEntityDao);
70 registerDao(CollUserStepEntity.class, collUserStepEntityDao); 71 registerDao(CollUserStepEntity.class, collUserStepEntityDao);
71 registerDao(FailedEntity.class, failedEntityDao); 72 registerDao(FailedEntity.class, failedEntityDao);
72 registerDao(UserStepEntity.class, userStepEntityDao); 73 registerDao(UserStepEntity.class, userStepEntityDao);
73 - registerDao(CalorieEntity.class, calorieEntityDao);  
74 } 74 }
75 75
76 public void clear() { 76 public void clear() {
  77 + calorieEntityDaoConfig.clearIdentityScope();
77 collFailedEntityDaoConfig.clearIdentityScope(); 78 collFailedEntityDaoConfig.clearIdentityScope();
78 collUserStepEntityDaoConfig.clearIdentityScope(); 79 collUserStepEntityDaoConfig.clearIdentityScope();
79 failedEntityDaoConfig.clearIdentityScope(); 80 failedEntityDaoConfig.clearIdentityScope();
80 userStepEntityDaoConfig.clearIdentityScope(); 81 userStepEntityDaoConfig.clearIdentityScope();
81 - calorieEntityDaoConfig.clearIdentityScope(); 82 + }
  83 +
  84 + public CalorieEntityDao getCalorieEntityDao() {
  85 + return calorieEntityDao;
82 } 86 }
83 87
84 public CollFailedEntityDao getCollFailedEntityDao() { 88 public CollFailedEntityDao getCollFailedEntityDao() {
@@ -97,8 +101,4 @@ public class DaoSession extends AbstractDaoSession { @@ -97,8 +101,4 @@ public class DaoSession extends AbstractDaoSession {
97 return userStepEntityDao; 101 return userStepEntityDao;
98 } 102 }
99 103
100 - public CalorieEntityDao getCalorieEntityDao() {  
101 - return calorieEntityDao;  
102 - }  
103 -  
104 } 104 }