feat:超市数据库

This commit is contained in:
dzc committed 2025-03-17 12:07:11 +08:00
1 parent 9a98ac8e1c
commit fa4bb78f8b
25 files changed
+307 -185

No files matched your search

+1 -1
View File
@@ -22,7 +22,7 @@ class FaceManageController extends GetxController {
RxInt pageSize = RxInt(15);
final TextEditingController usernameC = TextEditingController();
final usernameC = TextEditingController();
late StreamSubscription mqUpdateListen;
@@ -10,7 +10,7 @@ import 'package:pj_supermarket_cloud/common/index.dart';
class ProductManageController extends GetxController {
static const _tag = "商品管理 Controller";
RxList<ProductEntity> productList = <ProductEntity>[].obs;
RxList<CanteenSpuEntity> productList = <CanteenSpuEntity>[].obs;
ProductHourType hourType = ProductHourType.MORNING;
@@ -110,7 +110,7 @@ class ProductManageController extends GetxController {
}
// 切换是否默认
Future<void> trigger(ProductEntity v) async {
Future<void> trigger(CanteenSpuEntity v) async {
try {
final isSure = await appMessageDialog(
Get.context!,
@@ -123,7 +123,7 @@ class ProductManageController extends GetxController {
);
final app = Get.find<AppControl>();
final productDao = app.dataBase.getProductDao;
final editObj = ProductEntity.fromJson(v.toJson());
final editObj = CanteenSpuEntity.fromJson(v.toJson());
editObj.isDefault = !editObj.isDefault;
await productDao.edit(
editObj.isDefault,