Commit cf4f60adfc574d5e4de36d5c394a22dd350f3aee
Merge remote-tracking branch 'origin/master'
Showing
7 changed files
with
22 additions
and
44 deletions
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/RegistrationInfoView.java
| @@ -38,11 +38,11 @@ public class RegistrationInfoView implements MvpView, OnDateSetListener { | @@ -38,11 +38,11 @@ public class RegistrationInfoView implements MvpView, OnDateSetListener { | ||
| 38 | 38 | ||
| 39 | public void initView() { | 39 | public void initView() { |
| 40 | fragment.binding.topbar.addLeftImageButton(R.drawable.top_back_black, R.id.fragment_back).setOnClickListener(v -> { | 40 | fragment.binding.topbar.addLeftImageButton(R.drawable.top_back_black, R.id.fragment_back).setOnClickListener(v -> { |
| 41 | - goLineDetail(); | 41 | + fragment.getActivity().finish(); |
| 42 | }); | 42 | }); |
| 43 | fragment.binding.topbar.setTitle("填写报名信息"); | 43 | fragment.binding.topbar.setTitle("填写报名信息"); |
| 44 | fragment.binding.commitInfo.setOnClickListener(v -> fragment.commitInfo()); | 44 | fragment.binding.commitInfo.setOnClickListener(v -> fragment.commitInfo()); |
| 45 | - fragment.binding.toLineDetail.setOnClickListener(v -> goLineDetail()); | 45 | + fragment.binding.toLineDetail.setOnClickListener(v -> fragment.getActivity().finish()); |
| 46 | sex = new BottomMenuDialog.Builder(fragment.getActivity()) | 46 | sex = new BottomMenuDialog.Builder(fragment.getActivity()) |
| 47 | .addMenu("男", new View.OnClickListener() { | 47 | .addMenu("男", new View.OnClickListener() { |
| 48 | @Override | 48 | @Override |
| @@ -101,12 +101,6 @@ public class RegistrationInfoView implements MvpView, OnDateSetListener { | @@ -101,12 +101,6 @@ public class RegistrationInfoView implements MvpView, OnDateSetListener { | ||
| 101 | EventBus.getDefault().post(new MessageEvent(Constant.REGISTRATION_SUCCESS, "")); | 101 | EventBus.getDefault().post(new MessageEvent(Constant.REGISTRATION_SUCCESS, "")); |
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | - private void goLineDetail() { | ||
| 105 | - Intent intent = new Intent(fragment.getActivity(), RunRaceDetailActivity.class); | ||
| 106 | - intent.putExtra("isRegisterResult", true); | ||
| 107 | - fragment.getActivity().setResult(1002, intent); | ||
| 108 | - fragment.getActivity().finish(); | ||
| 109 | - } | ||
| 110 | 104 | ||
| 111 | @Override | 105 | @Override |
| 112 | public void onDateSet(TimePickerDialog timePickerView, long millseconds) { | 106 | public void onDateSet(TimePickerDialog timePickerView, long millseconds) { |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/RunRaceDetailFragmentView.java
| @@ -372,7 +372,7 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { | @@ -372,7 +372,7 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { | ||
| 372 | public void onClick(View view) { | 372 | public void onClick(View view) { |
| 373 | //立即报名 | 373 | //立即报名 |
| 374 | if ("0".equals(fragment.binding.rlScrollViewStartBtn.getTag())) { | 374 | if ("0".equals(fragment.binding.rlScrollViewStartBtn.getTag())) { |
| 375 | - RegistrationInfoActivity.newInstance(fragment.getActivity(), 1001); | 375 | + RegistrationInfoActivity.newInstance(fragment.getActivity()); |
| 376 | } else { | 376 | } else { |
| 377 | startStepService(getContext()); | 377 | startStepService(getContext()); |
| 378 | } | 378 | } |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/sql/dao/DaoMaster.java
| @@ -21,14 +21,14 @@ public class DaoMaster extends AbstractDaoMaster { | @@ -21,14 +21,14 @@ 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 | - CollUserStepEntityDao.createTable(db, ifNotExists); | ||
| 25 | UserStepEntityDao.createTable(db, ifNotExists); | 24 | UserStepEntityDao.createTable(db, ifNotExists); |
| 25 | + CollUserStepEntityDao.createTable(db, ifNotExists); | ||
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | /** Drops underlying database table using DAOs. */ | 28 | /** Drops underlying database table using DAOs. */ |
| 29 | public static void dropAllTables(Database db, boolean ifExists) { | 29 | public static void dropAllTables(Database db, boolean ifExists) { |
| 30 | - CollUserStepEntityDao.dropTable(db, ifExists); | ||
| 31 | UserStepEntityDao.dropTable(db, ifExists); | 30 | UserStepEntityDao.dropTable(db, ifExists); |
| 31 | + CollUserStepEntityDao.dropTable(db, ifExists); | ||
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | /** | 34 | /** |
| @@ -47,8 +47,8 @@ public class DaoMaster extends AbstractDaoMaster { | @@ -47,8 +47,8 @@ public class DaoMaster extends AbstractDaoMaster { | ||
| 47 | 47 | ||
| 48 | public DaoMaster(Database db) { | 48 | public DaoMaster(Database db) { |
| 49 | super(db, SCHEMA_VERSION); | 49 | super(db, SCHEMA_VERSION); |
| 50 | - registerDaoClass(CollUserStepEntityDao.class); | ||
| 51 | registerDaoClass(UserStepEntityDao.class); | 50 | registerDaoClass(UserStepEntityDao.class); |
| 51 | + registerDaoClass(CollUserStepEntityDao.class); | ||
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | public DaoSession newSession() { | 54 | public DaoSession newSession() { |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/sql/dao/DaoSession.java
| @@ -8,11 +8,11 @@ import org.greenrobot.greendao.database.Database; | @@ -8,11 +8,11 @@ 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.CollUserStepEntity; | ||
| 12 | import com.cnlive.moudle.pedometer.sql.entity.UserStepEntity; | 11 | import com.cnlive.moudle.pedometer.sql.entity.UserStepEntity; |
| 12 | +import com.cnlive.moudle.pedometer.sql.entity.CollUserStepEntity; | ||
| 13 | 13 | ||
| 14 | -import com.cnlive.moudle.pedometer.sql.dao.CollUserStepEntityDao; | ||
| 15 | import com.cnlive.moudle.pedometer.sql.dao.UserStepEntityDao; | 14 | import com.cnlive.moudle.pedometer.sql.dao.UserStepEntityDao; |
| 15 | +import com.cnlive.moudle.pedometer.sql.dao.CollUserStepEntityDao; | ||
| 16 | 16 | ||
| 17 | // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. | 17 | // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. |
| 18 | 18 | ||
| @@ -23,40 +23,40 @@ import com.cnlive.moudle.pedometer.sql.dao.UserStepEntityDao; | @@ -23,40 +23,40 @@ import com.cnlive.moudle.pedometer.sql.dao.UserStepEntityDao; | ||
| 23 | */ | 23 | */ |
| 24 | public class DaoSession extends AbstractDaoSession { | 24 | public class DaoSession extends AbstractDaoSession { |
| 25 | 25 | ||
| 26 | - private final DaoConfig collUserStepEntityDaoConfig; | ||
| 27 | private final DaoConfig userStepEntityDaoConfig; | 26 | private final DaoConfig userStepEntityDaoConfig; |
| 27 | + private final DaoConfig collUserStepEntityDaoConfig; | ||
| 28 | 28 | ||
| 29 | - private final CollUserStepEntityDao collUserStepEntityDao; | ||
| 30 | private final UserStepEntityDao userStepEntityDao; | 29 | private final UserStepEntityDao userStepEntityDao; |
| 30 | + private final CollUserStepEntityDao collUserStepEntityDao; | ||
| 31 | 31 | ||
| 32 | public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig> | 32 | public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig> |
| 33 | daoConfigMap) { | 33 | daoConfigMap) { |
| 34 | super(db); | 34 | super(db); |
| 35 | 35 | ||
| 36 | - collUserStepEntityDaoConfig = daoConfigMap.get(CollUserStepEntityDao.class).clone(); | ||
| 37 | - collUserStepEntityDaoConfig.initIdentityScope(type); | ||
| 38 | - | ||
| 39 | userStepEntityDaoConfig = daoConfigMap.get(UserStepEntityDao.class).clone(); | 36 | userStepEntityDaoConfig = daoConfigMap.get(UserStepEntityDao.class).clone(); |
| 40 | userStepEntityDaoConfig.initIdentityScope(type); | 37 | userStepEntityDaoConfig.initIdentityScope(type); |
| 41 | 38 | ||
| 42 | - collUserStepEntityDao = new CollUserStepEntityDao(collUserStepEntityDaoConfig, this); | 39 | + collUserStepEntityDaoConfig = daoConfigMap.get(CollUserStepEntityDao.class).clone(); |
| 40 | + collUserStepEntityDaoConfig.initIdentityScope(type); | ||
| 41 | + | ||
| 43 | userStepEntityDao = new UserStepEntityDao(userStepEntityDaoConfig, this); | 42 | userStepEntityDao = new UserStepEntityDao(userStepEntityDaoConfig, this); |
| 43 | + collUserStepEntityDao = new CollUserStepEntityDao(collUserStepEntityDaoConfig, this); | ||
| 44 | 44 | ||
| 45 | - registerDao(CollUserStepEntity.class, collUserStepEntityDao); | ||
| 46 | registerDao(UserStepEntity.class, userStepEntityDao); | 45 | registerDao(UserStepEntity.class, userStepEntityDao); |
| 46 | + registerDao(CollUserStepEntity.class, collUserStepEntityDao); | ||
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | public void clear() { | 49 | public void clear() { |
| 50 | - collUserStepEntityDaoConfig.clearIdentityScope(); | ||
| 51 | userStepEntityDaoConfig.clearIdentityScope(); | 50 | userStepEntityDaoConfig.clearIdentityScope(); |
| 52 | - } | ||
| 53 | - | ||
| 54 | - public CollUserStepEntityDao getCollUserStepEntityDao() { | ||
| 55 | - return collUserStepEntityDao; | 51 | + collUserStepEntityDaoConfig.clearIdentityScope(); |
| 56 | } | 52 | } |
| 57 | 53 | ||
| 58 | public UserStepEntityDao getUserStepEntityDao() { | 54 | public UserStepEntityDao getUserStepEntityDao() { |
| 59 | return userStepEntityDao; | 55 | return userStepEntityDao; |
| 60 | } | 56 | } |
| 61 | 57 | ||
| 58 | + public CollUserStepEntityDao getCollUserStepEntityDao() { | ||
| 59 | + return collUserStepEntityDao; | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | } | 62 | } |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/activity/RegistrationInfoActivity.java
| @@ -16,9 +16,9 @@ import com.example.moudle_pedometer.R; | @@ -16,9 +16,9 @@ import com.example.moudle_pedometer.R; | ||
| 16 | */ | 16 | */ |
| 17 | public class RegistrationInfoActivity extends AppCompatActivity { | 17 | public class RegistrationInfoActivity extends AppCompatActivity { |
| 18 | 18 | ||
| 19 | - public static void newInstance(Activity context,int resultCode){ | 19 | + public static void newInstance(Activity context){ |
| 20 | Intent intent = new Intent(context,RegistrationInfoActivity.class); | 20 | Intent intent = new Intent(context,RegistrationInfoActivity.class); |
| 21 | - context.startActivityForResult(intent,resultCode); | 21 | + context.startActivity(intent); |
| 22 | } | 22 | } |
| 23 | 23 | ||
| 24 | @Override | 24 | @Override |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/activity/RunRaceDetailActivity.java
| @@ -76,14 +76,6 @@ public class RunRaceDetailActivity extends QMUIFragmentActivity { | @@ -76,14 +76,6 @@ public class RunRaceDetailActivity extends QMUIFragmentActivity { | ||
| 76 | } | 76 | } |
| 77 | 77 | ||
| 78 | @Override | 78 | @Override |
| 79 | - protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { | ||
| 80 | - super.onActivityResult(requestCode, resultCode, data); | ||
| 81 | - if (resultCode == 1002) { | ||
| 82 | - | ||
| 83 | - } | ||
| 84 | - } | ||
| 85 | - | ||
| 86 | - @Override | ||
| 87 | public void onBackPressed() { | 79 | public void onBackPressed() { |
| 88 | super.onBackPressed(); | 80 | super.onBackPressed(); |
| 89 | if (getCurrentFragment()!=null) { | 81 | if (getCurrentFragment()!=null) { |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/fragment/RegistrationInfoFragment.java
| @@ -38,8 +38,6 @@ import com.example.moudle_pedometer.R; | @@ -38,8 +38,6 @@ import com.example.moudle_pedometer.R; | ||
| 38 | import com.example.moudle_pedometer.databinding.FragmentRegistrationInfoBinding; | 38 | import com.example.moudle_pedometer.databinding.FragmentRegistrationInfoBinding; |
| 39 | import com.jzxiang.pickerview.TimePickerDialog; | 39 | import com.jzxiang.pickerview.TimePickerDialog; |
| 40 | 40 | ||
| 41 | -import java.util.ArrayList; | ||
| 42 | -import java.util.List; | ||
| 43 | 41 | ||
| 44 | /** | 42 | /** |
| 45 | * Created by hanyayun 019/05/29. | 43 | * Created by hanyayun 019/05/29. |
| @@ -48,7 +46,6 @@ public class RegistrationInfoFragment extends MvpBindingFragment<RegistrationInf | @@ -48,7 +46,6 @@ public class RegistrationInfoFragment extends MvpBindingFragment<RegistrationInf | ||
| 48 | 46 | ||
| 49 | 47 | ||
| 50 | public TimePickerDialog pickerDialog; | 48 | public TimePickerDialog pickerDialog; |
| 51 | - private final String TAG = "RegistrationInfo"; | ||
| 52 | 49 | ||
| 53 | public static RegistrationInfoFragment newInstance() { | 50 | public static RegistrationInfoFragment newInstance() { |
| 54 | RegistrationInfoFragment fragment = new RegistrationInfoFragment(); | 51 | RegistrationInfoFragment fragment = new RegistrationInfoFragment(); |
| @@ -67,10 +64,6 @@ public class RegistrationInfoFragment extends MvpBindingFragment<RegistrationInf | @@ -67,10 +64,6 @@ public class RegistrationInfoFragment extends MvpBindingFragment<RegistrationInf | ||
| 67 | } | 64 | } |
| 68 | 65 | ||
| 69 | public void commitInfo() { | 66 | public void commitInfo() { |
| 70 | - | ||
| 71 | -// getPresenter().commitInfo(getActivity(), CommonInfo.getStreetId(getActivity()), "10514343", "15210479774", | ||
| 72 | -// binding.sexText.getText().toString().trim().equals("未选择") ? "" : binding.sexText.getText().toString().trim(), | ||
| 73 | -// binding.birthday.getText().toString().trim().equals("未选择") ? "" : binding.birthday.getText().toString().trim()); | ||
| 74 | addMonitorToFence(1); | 67 | addMonitorToFence(1); |
| 75 | } | 68 | } |
| 76 | 69 | ||
| @@ -143,7 +136,6 @@ public class RegistrationInfoFragment extends MvpBindingFragment<RegistrationInf | @@ -143,7 +136,6 @@ public class RegistrationInfoFragment extends MvpBindingFragment<RegistrationInf | ||
| 143 | } else { | 136 | } else { |
| 144 | QMUITipDialogUtil.dismessDialog(); | 137 | QMUITipDialogUtil.dismessDialog(); |
| 145 | } | 138 | } |
| 146 | - | ||
| 147 | } | 139 | } |
| 148 | 140 | ||
| 149 | @Override | 141 | @Override |