From 55b196ea2e28a8d859c85326f2147a4f7b7196de Mon Sep 17 00:00:00 2001
From: zuojincheng <lf_zuo@163.com>
Date: 星期四, 10 四月 2025 10:58:32 +0800
Subject: [PATCH] feat(general): 新增开卡信息保存功能并优化界面布局- 新增 CardRegistrationBean 数据模型用于保存开卡信息 - 在数据库中添加 card_registration 表用于存储开卡记录 - 优化 NewCard2Activity 界面布局,调整样式和间距 - 添加协程支持,实现异步保存开卡信息到数据库 - 更新颜色配置,统一使用新加的 base_blue_bg 和 base_green_bg颜色
---
generallibrary/src/main/java/com/dayu/general/bean/card/BaseCard.kt | 44 ++++++++++++++++++++++----------------------
1 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/generallibrary/src/main/java/com/dayu/general/bean/card/BaseCard.kt b/generallibrary/src/main/java/com/dayu/general/bean/card/BaseCard.kt
index 7a8f09f..0429fcf 100644
--- a/generallibrary/src/main/java/com/dayu/general/bean/card/BaseCard.kt
+++ b/generallibrary/src/main/java/com/dayu/general/bean/card/BaseCard.kt
@@ -1,12 +1,12 @@
package com.dayu.general.bean.card
-import com.dayu.baselibrary.tools.HexUtil
+import com.dayu.baselibrary.tools.BaseCard
import com.dayu.general.bean.db.CardData
import com.dayu.general.dao.AppDataBase
import com.dayu.general.tool.CardCommon
import com.tencent.bugly.crashreport.CrashReport
-open class BaseCard {
+open class BaseCard : BaseCard() {
var cardData: String? = null //鏍囪瘑鐮�
companion object {
@@ -33,25 +33,25 @@
}
- /**
- * 鍓�15涓瓧鑺傜畻鏈疮鍔犲拰 涓嶅惈杩涗綅
- *
- * @param data 婧愭暟鎹�
- * @return 16杩涘埗
- */
- fun getByteSum(data: ByteArray?): Byte {
- if (data != null) {
- var sum = 0
- for (b in data) {
- sum += b.toInt() and 0xFF // & 0xFF 鍙互灏嗗瓧鑺傛墿灞曚负姝f暣鏁帮紝閬垮厤绗﹀彿浣嶇殑褰卞搷
- }
- var hex = HexUtil.get10to16CompleteHex(sum)
- hex = HexUtil.spaceHex(hex)
- val hexArr = hex.split(" ".toRegex()).dropLastWhile { it.isEmpty() }
- .toTypedArray()
- return HexUtil.hexToByte(hexArr[hexArr.size - 1])
- }
- return 0
- }
+// /**
+// * 鍓�15涓瓧鑺傜畻鏈疮鍔犲拰 涓嶅惈杩涗綅
+// *
+// * @param data 婧愭暟鎹�
+// * @return 16杩涘埗
+// */
+// fun getByteSum(data: ByteArray?): Byte {
+// if (data != null) {
+// var sum = 0
+// for (b in data) {
+// sum += b.toInt() and 0xFF // & 0xFF 鍙互灏嗗瓧鑺傛墿灞曚负姝f暣鏁帮紝閬垮厤绗﹀彿浣嶇殑褰卞搷
+// }
+// var hex = HexUtil.get10to16CompleteHex(sum)
+// hex = HexUtil.spaceHex(hex)
+// val hexArr = hex.split(" ".toRegex()).dropLastWhile { it.isEmpty() }
+// .toTypedArray()
+// return HexUtil.hexToByte(hexArr[hexArr.size - 1])
+// }
+// return 0
+// }
}
\ No newline at end of file
--
Gitblit v1.8.0