2个文件已删除
	
		
		2 文件已重命名
	
		
		17个文件已修改
	
	
 
	
	
	
	
	
	
	
	
|  |  |  | 
|---|
|  |  |  | versionName "2.2" | 
|---|
|  |  |  | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ndk { | 
|---|
|  |  |  | abiFilters 'armeabi-v7a' | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //        ndk { | 
|---|
|  |  |  | //            abiFilters 'armeabi-v7a' | 
|---|
|  |  |  | //        } | 
|---|
|  |  |  | signingConfig signingConfigs.debug | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | import androidx.annotation.NonNull; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.dayu.baselibrary.activity.BaseActivity; | 
|---|
|  |  |  | import com.dayu.baselibrary.dao.BaseDaoSingleton; | 
|---|
|  |  |  | import com.dayu.baselibrary.dbbean.PassWordBean; | 
|---|
|  |  |  | import com.dayu.baselibrary.utils.BaseCommon; | 
|---|
|  |  |  | import com.dayu.baselibrary.utils.TipUtil; | 
|---|
|  |  |  | import com.dayu.baselibrary.utils.WSMD5; | 
|---|
|  |  |  | import com.dayu.baselibrary.view.LibraryDialog; | 
|---|
|  |  |  | import com.dayu.henanlibrary.HeNanApplication; | 
|---|
|  |  |  | import com.dayu.henanlibrary.dao.HNBaseDaoSingleton; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.dayu.henanlibrary.dbBean.PassWordBean; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.dayu.qihealonelibrary.activity.HomeActivity; | 
|---|
|  |  |  | import com.dayu.recharge.MyApplication; | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ActivityLoginBinding binding; | 
|---|
|  |  |  | PassWordBean passWordBean; | 
|---|
|  |  |  | //    com.dayu.qihealonelibrary.dbBean.PassWordBean | 
|---|
|  |  |  | int clickNumber; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | 
|---|
|  |  |  | super.onCreate(savedInstanceState); | 
|---|
|  |  |  | binding = ActivityLoginBinding.inflate(LayoutInflater.from(this)); | 
|---|
|  |  |  | setContentView(binding.getRoot()); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | getPermission(); | 
|---|
|  |  |  | initView(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | if (type == BaseCommon.HeNanLibrary) { | 
|---|
|  |  |  | getHNPermission(); | 
|---|
|  |  |  | } else if (type == BaseCommon.QHAloneLibrary) { | 
|---|
|  |  |  | getQHAlonePermission(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | MyApplication.myApplication.initApplication(); | 
|---|
|  |  |  | startToHomeActivity(); | 
|---|
|  |  |  | 
|---|
|  |  |  | if (!file.exists()) { | 
|---|
|  |  |  | file.mkdirs(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | passWordBean = HNBaseDaoSingleton.getInstance(LoginActivity.this).loginPsDao().findFirst(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | e.printStackTrace(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private void getQHAlonePermission() { | 
|---|
|  |  |  | private void getPermission() { | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | XXPermissions.with(this) | 
|---|
|  |  |  | .permission( | 
|---|
|  |  |  | 
|---|
|  |  |  | if (!file.exists()) { | 
|---|
|  |  |  | file.mkdirs(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | passWordBean = HNBaseDaoSingleton.getInstance(LoginActivity.this).loginPsDao().findFirst(); | 
|---|
|  |  |  | passWordBean = BaseDaoSingleton.getInstance(LoginActivity.this).loginPsDao().findFirst(); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | e.printStackTrace(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import androidx.appcompat.app.AppCompatActivity; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.dayu.baselibrary.dao.AppDatabase; | 
|---|
|  |  |  | import com.dayu.baselibrary.dao.BaseDaoSingleton; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * Created by zuoxiao on 2018/12/20. | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public final String SIGN = "308202b8308201a0020101300d06092a864886f70d01010b05003022310f300d06035504030c06e5a4a7e7a6b9310f300d06035504070c06e5a4a9e6b4a5301e170d3233313132303035333131325a170d3438313131333035333131325a3022310f300d06035504030c06e5a4a7e7a6b9310f300d06035504070c06e5a4a9e6b4a530820122300d06092a864886f70d01010105000382010f003082010a0282010100a0924f3d618e4a622def691e16e54ce5bdfd035bd73e7cb947d2bf3bd0c00afa26e52963e0299fc06d76d153be696c5285d630577e1dcb2b740a72b6d904482217de308fb91c8435441ed05e844ced1e5c3446d82cb8f38751049df26a42adcfc33f1f12c2ce03f676e5d148aad800ace89670b87835e2c02a8570a0b6740d9c0669d4cb3c597d0b2dd49fc0904e885773b6d3a87d9f1e73eb526e0d1a9e9e3c48d986938286cd824151b5a6214faf89d3e699524511b23c86d3b110a7f0bb56a6d2436f69816538a62a38cb1fee6eb685d267cc200df8af51b936bd280beaa2023f75678d77a11ac6de734b30af63d394c8b63bccf2115a47ea15c9212c740d0203010001300d06092a864886f70d01010b05000382010100307cafa9b14be91ba6424cfcc6aed75b069a1c4d6eb646eab0de93f372f236f5f0a6097499df99391075d6ced18d419a2b15adb041890e2b56a3bfbd6be40efee99c5c713ba8ea1d45da09b67916106116e96eb735271c4d53e0739f753145cbc42e149ad3d9507d422ec1c6f1a7f792a4542f9a64f0de3d4f4af69f0fb3390ef3577dcf8844cf744426d173b0934d879148062c5ca64022dc99af370dbfeaf2b5d4a279b20c54a361bca12c25bf185c2885519bbbc36e46ddb083080f0cc5b1f2eafe964ebce5071b0ae7d92a34a9193861b996d2c0299b1993f41063a27038199365a6e3cb27a02ffa9facdc48a63713eb5fbf90e9fd73056aba16b28e5fee"; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public AppDatabase baseBaseDao; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | protected void onCreate(Bundle savedInstanceState) { | 
|---|
|  |  |  | super.onCreate(savedInstanceState); | 
|---|
|  |  |  | 
|---|
|  |  |  | Log.i(TAG, "isMyApp"); | 
|---|
|  |  |  | this.finish(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | baseBaseDao = BaseDaoSingleton.getInstance(this); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | import androidx.room.RoomDatabase; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.dayu.baselibrary.dbbean.LibraryBean; | 
|---|
|  |  |  | import com.dayu.baselibrary.dbbean.PassWordBean; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | * Date: 2023-11-05 16:23 | 
|---|
|  |  |  | * Description: | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Database(entities = {LibraryBean.class}, version = AppDatabase.version, exportSchema = false) | 
|---|
|  |  |  | @Database(entities = {LibraryBean.class, PassWordBean.class}, version = AppDatabase.version, exportSchema = false) | 
|---|
|  |  |  | public abstract class AppDatabase extends RoomDatabase { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public final static int version = 3; | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public abstract LibraryDao libraryDao(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public abstract LoginPsDao loginPsDao(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| File was renamed from henanlibrary/src/main/java/com/dayu/henanlibrary/dao/LoginPsDao.java | 
|  |  |  | 
|---|
|  |  |  | package com.dayu.henanlibrary.dao; | 
|---|
|  |  |  | package com.dayu.baselibrary.dao; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import androidx.room.Dao; | 
|---|
|  |  |  | import androidx.room.Delete; | 
|---|
|  |  |  | 
|---|
|  |  |  | import androidx.room.Query; | 
|---|
|  |  |  | import androidx.room.Update; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.dayu.henanlibrary.dbBean.PassWordBean; | 
|---|
|  |  |  | import com.dayu.baselibrary.dbbean.PassWordBean; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * Copyright (C), 2023, | 
|---|
| File was renamed from henanlibrary/src/main/java/com/dayu/henanlibrary/dbBean/PassWordBean.java | 
|  |  |  | 
|---|
|  |  |  | package com.dayu.henanlibrary.dbBean; | 
|---|
|  |  |  | package com.dayu.baselibrary.dbbean; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import androidx.room.Entity; | 
|---|
|  |  |  | import androidx.room.PrimaryKey; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Entity | 
|---|
|  |  |  | public class PassWordBean { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | setCanceledOnTouchOutside(false); | 
|---|
|  |  |  | RadioGroup radioGroup = findViewById(R.id.radioLibrary); | 
|---|
|  |  |  | libraryDao = BaseDaoSingleton.getInstance(mContext).libraryDao(); | 
|---|
|  |  |  | libraryBean = libraryDao.findFirst(); | 
|---|
|  |  |  | if (libraryBean == null) { | 
|---|
|  |  |  | libraryBean = new LibraryBean(); | 
|---|
|  |  |  | if (libraryDao != null) { | 
|---|
|  |  |  | libraryBean = libraryDao.findFirst(); | 
|---|
|  |  |  | if (libraryBean == null) { | 
|---|
|  |  |  | libraryBean = new LibraryBean(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | radioGroup.setOnCheckedChangeListener((group, checkedId) -> { | 
|---|
|  |  |  | ischose = true; | 
|---|
|  |  |  | // 当选中的RadioButton发生变化时调用 | 
|---|
|  |  |  | if (checkedId == R.id.henanLibrary) { | 
|---|
|  |  |  | type = 0; | 
|---|
|  |  |  | libraryBean.setType(type); | 
|---|
|  |  |  | data = "确认选择河南版本吗?"; | 
|---|
|  |  |  | } else if (checkedId == R.id.qhAloneLibrary) {// 处理选中Option 2的逻辑 | 
|---|
|  |  |  | type = 1; | 
|---|
|  |  |  | libraryBean.setType(type); | 
|---|
|  |  |  | data = "确认选择齐河单机版本吗?"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | TextView okBtn = findViewById(R.id.ok); | 
|---|
|  |  |  | okBtn.setOnClickListener(v -> { | 
|---|
|  |  |  | if (ischose) { | 
|---|
|  |  |  | //二次确认 | 
|---|
|  |  |  | confirmDialog = new ConfirmDialog(mContext, data, new View.OnClickListener() { | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public void onClick(View v) { | 
|---|
|  |  |  | libraryDao.insert(libraryBean); | 
|---|
|  |  |  | mLibraryBack.listener(type); | 
|---|
|  |  |  | LibraryDialog.this.dismiss(); | 
|---|
|  |  |  | confirmDialog.dismiss(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | confirmDialog.show(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | radioGroup.setOnCheckedChangeListener((group, checkedId) -> { | 
|---|
|  |  |  | ischose = true; | 
|---|
|  |  |  | // 当选中的RadioButton发生变化时调用 | 
|---|
|  |  |  | if (checkedId == R.id.henanLibrary) { | 
|---|
|  |  |  | type = 0; | 
|---|
|  |  |  | libraryBean.setType(type); | 
|---|
|  |  |  | data = "确认选择河南版本吗?"; | 
|---|
|  |  |  | } else if (checkedId == R.id.qhAloneLibrary) {// 处理选中Option 2的逻辑 | 
|---|
|  |  |  | type = 1; | 
|---|
|  |  |  | libraryBean.setType(type); | 
|---|
|  |  |  | data = "确认选择齐河单机版本吗?"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | TextView okBtn = findViewById(R.id.ok); | 
|---|
|  |  |  | okBtn.setOnClickListener(v -> { | 
|---|
|  |  |  | if (ischose) { | 
|---|
|  |  |  | //二次确认 | 
|---|
|  |  |  | confirmDialog = new ConfirmDialog(mContext, data, new View.OnClickListener() { | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public void onClick(View v) { | 
|---|
|  |  |  | libraryDao.insert(libraryBean); | 
|---|
|  |  |  | mLibraryBack.listener(type); | 
|---|
|  |  |  | LibraryDialog.this.dismiss(); | 
|---|
|  |  |  | confirmDialog.dismiss(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | confirmDialog.show(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | mDialogBack = dialogBack; | 
|---|
|  |  |  | initView(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public void onBackPressed() { | 
|---|
|  |  |  | // 拦截返回键事件,不执行默认的操作 | 
|---|
|  |  |  | // 如果想要对话框消失,可以在此处调用 super.onBackPressed(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | private void initView() { | 
|---|
|  |  |  | getWindow().setGravity(Gravity.CENTER); | 
|---|
|  |  |  | setContentView(R.layout.text_dialog); | 
|---|
|  |  |  | 
|---|
|  |  |  | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | 
|---|
|  |  |  | android:layout_width="match_parent" | 
|---|
|  |  |  | android:layout_height="match_parent" | 
|---|
|  |  |  | android:background="#00ffffff" | 
|---|
|  |  |  | android:background="#40000000" | 
|---|
|  |  |  | android:gravity="center" | 
|---|
|  |  |  | android:orientation="vertical"> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | 
|---|
|  |  |  | android:layout_width="match_parent" | 
|---|
|  |  |  | android:layout_height="match_parent" | 
|---|
|  |  |  | android:background="#00ffffff" | 
|---|
|  |  |  | android:background="#40000000" | 
|---|
|  |  |  | android:gravity="center" | 
|---|
|  |  |  | android:orientation="vertical"> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | 
|---|
|  |  |  | android:layout_width="match_parent" | 
|---|
|  |  |  | android:layout_height="match_parent" | 
|---|
|  |  |  | android:background="#00ffffff" | 
|---|
|  |  |  | android:background="#40000000" | 
|---|
|  |  |  | android:gravity="center" | 
|---|
|  |  |  | android:orientation="vertical"> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | 
|---|
|  |  |  | android:layout_width="match_parent" | 
|---|
|  |  |  | android:layout_height="match_parent" | 
|---|
|  |  |  | android:background="#00ffffff" | 
|---|
|  |  |  | android:background="#40000000" | 
|---|
|  |  |  | android:gravity="center" | 
|---|
|  |  |  | android:orientation="vertical"> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | public void onResume() { | 
|---|
|  |  |  | super.onResume(); | 
|---|
|  |  |  | if (!ifNFCUse(this)) { | 
|---|
|  |  |  | this.finish(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //设置处理优于所有其他NFC的处理 | 
|---|
|  |  |  | if (mNfcAdapter != null) | 
|---|
|  |  |  | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | protected Boolean ifNFCUse(Activity context) { | 
|---|
|  |  |  | if (mNfcAdapter == null) { | 
|---|
|  |  |  | TipUtil.show(context, "设备不支持NFC!"); | 
|---|
|  |  |  | TipUtil.show(context, "设备不支持NFC!", new TipUtil.TipListener() { | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public void onCancle() { | 
|---|
|  |  |  | BaseNfcActivity.this.finish(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | return false; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (mNfcAdapter != null && !mNfcAdapter.isEnabled()) { | 
|---|
|  |  |  | 
|---|
|  |  |  | import android.text.TextUtils; | 
|---|
|  |  |  | import android.view.LayoutInflater; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.dayu.baselibrary.dbbean.PassWordBean; | 
|---|
|  |  |  | import com.dayu.baselibrary.utils.TipUtil; | 
|---|
|  |  |  | import com.dayu.baselibrary.utils.WSMD5; | 
|---|
|  |  |  | import com.dayu.henanlibrary.databinding.ActivityPswHnBinding; | 
|---|
|  |  |  | import com.dayu.henanlibrary.dbBean.PassWordBean; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * Copyright (C), 2023, | 
|---|
|  |  |  | 
|---|
|  |  |  | setContentView(pswBinding.getRoot()); | 
|---|
|  |  |  | pswBinding.waterOk.setOnClickListener(v -> { | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | passWordBean = baseDao.loginPsDao().findFirst(); | 
|---|
|  |  |  | passWordBean = baseBaseDao.loginPsDao().findFirst(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (!TextUtils.isEmpty(pswBinding.pswNew.getText().toString()) && !TextUtils.isEmpty(pswBinding.pswOld.getText().toString()) && !TextUtils.isEmpty(pswBinding.pswNewAgin.getText().toString())) { | 
|---|
|  |  |  | if ((passWordBean != null | 
|---|
|  |  |  | 
|---|
|  |  |  | if (pswBinding.pswNew.getText().toString().equals(pswBinding.pswNewAgin.getText().toString())) { | 
|---|
|  |  |  | String passWord = WSMD5.getMD5Str(pswBinding.pswNewAgin.getText().toString()); | 
|---|
|  |  |  | passWordBean.setPassWord(passWord); | 
|---|
|  |  |  | baseDao.loginPsDao().insert(passWordBean); | 
|---|
|  |  |  | baseBaseDao.loginPsDao().insert(passWordBean); | 
|---|
|  |  |  | TipUtil.show(PassWordActivity.this, "密码修改完成", () -> { | 
|---|
|  |  |  | PassWordActivity.this.finish(); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | 
|---|
|  |  |  | import com.dayu.henanlibrary.dbBean.ElectricPriceBean; | 
|---|
|  |  |  | import com.dayu.henanlibrary.dbBean.IdentityBean; | 
|---|
|  |  |  | import com.dayu.henanlibrary.dbBean.IpBean; | 
|---|
|  |  |  | import com.dayu.henanlibrary.dbBean.PassWordBean; | 
|---|
|  |  |  | import com.dayu.henanlibrary.dbBean.PowerBean; | 
|---|
|  |  |  | import com.dayu.henanlibrary.dbBean.RechargeBean; | 
|---|
|  |  |  | import com.dayu.henanlibrary.dbBean.UserCardBean; | 
|---|
|  |  |  | 
|---|
|  |  |  | * Date: 2023-11-05 16:23 | 
|---|
|  |  |  | * Description: | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Database(entities = {CardData.class, DeviceNumber.class, IdentityBean.class, DomainBean.class, ElectricPriceBean.class, IpBean.class, AdminDataBean.class, PassWordBean.class, UserCardBean.class, RechargeBean.class, PowerBean.class}, version = com.dayu.baselibrary.dao.AppDatabase.version, exportSchema = false) | 
|---|
|  |  |  | @Database(entities = {CardData.class, DeviceNumber.class, IdentityBean.class, DomainBean.class, ElectricPriceBean.class, IpBean.class, AdminDataBean.class,  UserCardBean.class, RechargeBean.class, PowerBean.class}, version = com.dayu.baselibrary.dao.AppDatabase.version, exportSchema = false) | 
|---|
|  |  |  | public abstract class AppDatabase extends RoomDatabase { | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public abstract AdminDataDao adminDao(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public abstract LoginPsDao loginPsDao(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public abstract UserCardDao userCardDao(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | # Location of the SDK. This is only used by Gradle. | 
|---|
|  |  |  | # For customization when using a Version Control System, please read the | 
|---|
|  |  |  | # header note. | 
|---|
|  |  |  | #Mon May 13 11:15:58 CST 2024 | 
|---|
|  |  |  | #ndk.dir=D\:\\android\\sdk\\ndk\\android-ndk-r21 | 
|---|
|  |  |  | sdk.dir=D\:\\AndroidStudio\\sdk | 
|---|
|  |  |  | #Fri May 17 09:12:28 CST 2024 | 
|---|
|  |  |  | sdk.dir=D\:\\android\\sdk | 
|---|
|  |  |  | 
|---|
|  |  |  | public void onResume() { | 
|---|
|  |  |  | super.onResume(); | 
|---|
|  |  |  | if (!ifNFCUse(this)) { | 
|---|
|  |  |  | this.finish(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //设置处理优于所有其他NFC的处理 | 
|---|
|  |  |  | if (mNfcAdapter != null) | 
|---|
|  |  |  | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | protected Boolean ifNFCUse(Activity context) { | 
|---|
|  |  |  | if (mNfcAdapter == null) { | 
|---|
|  |  |  | TipUtil.show(context, "设备不支持NFC!"); | 
|---|
|  |  |  | TipUtil.show(context, "设备不支持NFC!", new TipUtil.TipListener() { | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public void onCancle() { | 
|---|
|  |  |  | BaseNfcActivity.this.finish(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | return false; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (mNfcAdapter != null && !mNfcAdapter.isEnabled()) { | 
|---|
|  |  |  | 
|---|
|  |  |  | import android.view.LayoutInflater; | 
|---|
|  |  |  | import android.view.View; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.dayu.baselibrary.dbbean.PassWordBean; | 
|---|
|  |  |  | import com.dayu.baselibrary.utils.TipUtil; | 
|---|
|  |  |  | import com.dayu.baselibrary.utils.WSMD5; | 
|---|
|  |  |  | import com.dayu.qihealonelibrary.databinding.ActivityPswQhaBinding; | 
|---|
|  |  |  | import com.dayu.qihealonelibrary.dbBean.PassWordBean; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public void onClick(View v) { | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | passWordBean = baseDao.loginPsDao().findFirst(); | 
|---|
|  |  |  | passWordBean = baseBaseDao.loginPsDao().findFirst(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (!TextUtils.isEmpty(pswBinding.pswNew.getText().toString()) && !TextUtils.isEmpty(pswBinding.pswOld.getText().toString()) && !TextUtils.isEmpty(pswBinding.pswNewAgin.getText().toString())) { | 
|---|
|  |  |  | if ((passWordBean != null | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (pswBinding.pswNew.getText().toString().equals(pswBinding.pswNewAgin.getText().toString())) { | 
|---|
|  |  |  | passWordBean.setPassWord(pswBinding.pswNewAgin.getText().toString()); | 
|---|
|  |  |  | baseDao.loginPsDao().insert(passWordBean); | 
|---|
|  |  |  | baseBaseDao.loginPsDao().insert(passWordBean); | 
|---|
|  |  |  | TipUtil.show(PassWordActivity.this, "密码修改完成", () -> { | 
|---|
|  |  |  | PassWordActivity.this.finish(); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | 
|---|
|  |  |  | import com.dayu.qihealonelibrary.dbBean.ElectricPriceBean; | 
|---|
|  |  |  | import com.dayu.qihealonelibrary.dbBean.IdentityBean; | 
|---|
|  |  |  | import com.dayu.qihealonelibrary.dbBean.IpBean; | 
|---|
|  |  |  | import com.dayu.qihealonelibrary.dbBean.PassWordBean; | 
|---|
|  |  |  | import com.dayu.qihealonelibrary.dbBean.PassWordCardBean; | 
|---|
|  |  |  | import com.dayu.qihealonelibrary.dbBean.PowerBean; | 
|---|
|  |  |  | import com.dayu.qihealonelibrary.dbBean.RechargeBean; | 
|---|
|  |  |  | 
|---|
|  |  |  | * Date: 2023-11-05 16:23 | 
|---|
|  |  |  | * Description: | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Database(entities = {RegionBean.class, PassWordCardBean.class, CardData.class, DeviceNumber.class, IdentityBean.class, DomainBean.class, ElectricPriceBean.class, IpBean.class, AdminDataBean.class, PassWordBean.class, UserCardBean.class, RechargeBean.class, PowerBean.class}, version = com.dayu.baselibrary.dao.AppDatabase.version, exportSchema = false) | 
|---|
|  |  |  | @Database(entities = {RegionBean.class, PassWordCardBean.class, CardData.class, DeviceNumber.class, IdentityBean.class, DomainBean.class, ElectricPriceBean.class, IpBean.class, AdminDataBean.class,  UserCardBean.class, RechargeBean.class, PowerBean.class}, version = com.dayu.baselibrary.dao.AppDatabase.version, exportSchema = false) | 
|---|
|  |  |  | public abstract class QHAloneAppDatabase extends RoomDatabase { | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public abstract AdminDataDao adminDao(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public abstract LoginPsDao loginPsDao(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public abstract UserCardDao userCardDao(); | 
|---|
|  |  |  |  | 
|---|