feat:离线支持
This commit is contained in:
1 parent
12597ba258
commit
0af163738f
15 files changed
+89
-112
No files matched your search
@@ -12,33 +12,23 @@ abstract class CanteenSpuDao {
|
||||
@insert
|
||||
Future<void> batchSave(List<CanteenSpuEntity> entitys);
|
||||
|
||||
Future<int> delByIds(List<String> codes) async {
|
||||
if (ObjectUtil.isEmptyList(codes)) return -1;
|
||||
final app = Get.find<AppControl>();
|
||||
final database = app.dataBase.database;
|
||||
final placeholders = List.generate(codes.length, (index) => '?').join(', ');
|
||||
final sql = '''
|
||||
UPDATE canteen_spu SET delFlag = 1
|
||||
WHERE
|
||||
serviceUniqueCode IN ($placeholders)
|
||||
AND strftime('%Y-%m-%d', saleDate) = strftime('%Y-%m-%d', 'now', 'localtime')
|
||||
''';
|
||||
return await database.rawUpdate(sql, [...codes]);
|
||||
}
|
||||
|
||||
@Query('''
|
||||
DELETE FROM canteen_spu
|
||||
''')
|
||||
Future<void> delAllByType();
|
||||
|
||||
@Query('''
|
||||
DELETE FROM canteen_spu WHERE strftime('%Y-%m-%d', saleDate) = strftime('%Y-%m-%d', :dayStr)
|
||||
''')
|
||||
Future<void> delAllByDay(String dayStr);
|
||||
|
||||
@delete
|
||||
Future<void> batchDel(List<CanteenSpuEntity> entitys);
|
||||
|
||||
@Query("""
|
||||
UPDATE canteen_spu SET isDefault = :isDefault
|
||||
WHERE
|
||||
delFlag = 0
|
||||
AND serviceUniqueCode = :uniqueCode AND hourType = :hourType
|
||||
serviceUniqueCode = :uniqueCode AND hourType = :hourType
|
||||
AND strftime('%Y-%m-%d', saleDate) = strftime('%Y-%m-%d', 'now', 'localtime')
|
||||
""")
|
||||
Future<void> edit(bool isDefault, String uniqueCode, String hourType);
|
||||
@@ -49,8 +39,7 @@ abstract class CanteenSpuDao {
|
||||
@Query("""
|
||||
SELECT DISTINCT COUNT(0) FROM canteen_spu
|
||||
WHERE
|
||||
delFlag = 0
|
||||
AND (:hourType = '-1' OR INSTR(',' || hourType || ',', ',' || :hourType || ',') > 0)
|
||||
(:hourType = '-1' OR INSTR(',' || hourType || ',', ',' || :hourType || ',') > 0)
|
||||
AND strftime('%Y-%m-%d', saleDate) = strftime('%Y-%m-%d', 'now', 'localtime')
|
||||
""")
|
||||
Future<int?> getCount(String hourType);
|
||||
@@ -58,8 +47,7 @@ abstract class CanteenSpuDao {
|
||||
@Query('''
|
||||
SELECT * FROM canteen_spu
|
||||
WHERE
|
||||
delFlag = 0
|
||||
AND serviceUniqueCode = :code
|
||||
serviceUniqueCode = :code
|
||||
AND (:saleDate = '-1' OR strftime('%Y-%m-%d', saleDate) = strftime('%Y-%m-%d', :saleDate))
|
||||
LIMIT 1
|
||||
''')
|
||||
@@ -73,8 +61,7 @@ abstract class CanteenSpuDao {
|
||||
FROM canteen_spu
|
||||
LEFT JOIN classify ON canteen_spu.classifyServiceUniqueCode = classify.serviceUniqueCode
|
||||
WHERE
|
||||
canteen_spu.delFlag = 0
|
||||
AND (:classifyServiceUniqueCode = '-1' OR canteen_spu.classifyServiceUniqueCode = :classifyServiceUniqueCode)
|
||||
(:classifyServiceUniqueCode = '-1' OR canteen_spu.classifyServiceUniqueCode = :classifyServiceUniqueCode)
|
||||
AND (:hourType = '-1' OR INSTR(',' || hourType || ',', ',' || :hourType || ',') > 0)
|
||||
AND (:saleDate = '-1' OR strftime('%Y-%m-%d', saleDate) = strftime('%Y-%m-%d', :saleDate))
|
||||
ORDER BY classify.sort, canteen_spu.price
|
||||
@@ -90,8 +77,7 @@ abstract class CanteenSpuDao {
|
||||
FROM canteen_spu
|
||||
LEFT JOIN classify ON canteen_spu.classifyServiceUniqueCode = classify.serviceUniqueCode
|
||||
WHERE
|
||||
canteen_spu.delFlag = 0
|
||||
AND (:classifyServiceUniqueCode = '-1' OR canteen_spu.classifyServiceUniqueCode = :classifyServiceUniqueCode)
|
||||
(:classifyServiceUniqueCode = '-1' OR canteen_spu.classifyServiceUniqueCode = :classifyServiceUniqueCode)
|
||||
AND (:hourType = '-1' OR INSTR(',' || canteen_spu.hourType || ',', ',' || :hourType || ',') > 0)
|
||||
AND strftime('%Y-%m-%d', saleDate) = strftime('%Y-%m-%d', 'now', 'localtime')
|
||||
ORDER BY classify.sort, classify.id, canteen_spu.price
|
||||
@@ -107,10 +93,8 @@ abstract class CanteenSpuDao {
|
||||
@Query('''
|
||||
SELECT * FROM canteen_spu
|
||||
WHERE
|
||||
delFlag = 0
|
||||
AND isDefault = 1
|
||||
isDefault = 1
|
||||
AND (:hourType = '-1' OR hourType = :hourType)
|
||||
AND strftime('%Y-%m-%d', saleDate) = strftime('%Y-%m-%d', 'now', 'localtime')
|
||||
''')
|
||||
Future<List<CanteenSpuEntity>> getDefault(String hourType);
|
||||
}
|
||||
@@ -122,7 +122,7 @@ class _$AppDatabase extends AppDatabase {
|
||||
await database.execute(
|
||||
'CREATE TABLE IF NOT EXISTS `order_record` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `uniqueCode` TEXT NOT NULL, `serviceUniqueCode` TEXT NOT NULL, `sysType` TEXT NOT NULL, `userCode` TEXT NOT NULL, `username` TEXT, `hourType` TEXT, `price` INTEGER NOT NULL, `extraPrice` INTEGER NOT NULL, `payPrice` INTEGER NOT NULL, `walletId` TEXT, `orderSourceTypeId` TEXT, `type` TEXT NOT NULL, `status` TEXT NOT NULL, `payType` TEXT NOT NULL, `productDesc` TEXT, `count` INTEGER NOT NULL, `weight` REAL NOT NULL, `payTime` TEXT, `createTime` TEXT NOT NULL)');
|
||||
await database.execute(
|
||||
'CREATE TABLE IF NOT EXISTS `canteen_spu` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `serviceUniqueCode` TEXT NOT NULL, `classifyServiceUniqueCode` TEXT NOT NULL, `hourType` INTEGER, `saleDate` TEXT NOT NULL, `name` TEXT NOT NULL, `price` INTEGER NOT NULL, `image` TEXT, `isDefault` INTEGER NOT NULL, `status` INTEGER NOT NULL, `sort` INTEGER NOT NULL, `createTime` TEXT NOT NULL, `updateTime` TEXT NOT NULL, `delFlag` INTEGER NOT NULL)');
|
||||
'CREATE TABLE IF NOT EXISTS `canteen_spu` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `serviceUniqueCode` TEXT NOT NULL, `classifyServiceUniqueCode` TEXT NOT NULL, `hourType` INTEGER, `saleDate` TEXT NOT NULL, `name` TEXT NOT NULL, `price` INTEGER NOT NULL, `image` TEXT, `isDefault` INTEGER NOT NULL, `status` INTEGER NOT NULL, `sort` INTEGER NOT NULL, `createTime` TEXT NOT NULL, `updateTime` TEXT NOT NULL)');
|
||||
await database.execute(
|
||||
'CREATE TABLE IF NOT EXISTS `supermarket_sku` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `serviceUniqueCode` TEXT NOT NULL, `spuId` TEXT NOT NULL, `barCode` TEXT NOT NULL, `spec` TEXT NOT NULL, `unit` TEXT NOT NULL, `packageNum` INTEGER NOT NULL, `purchasePrice` INTEGER NOT NULL, `retailPrice` INTEGER NOT NULL, `promotionPrice` INTEGER NOT NULL)');
|
||||
await database.execute(
|
||||
@@ -613,8 +613,7 @@ class _$CanteenSpuDao extends CanteenSpuDao {
|
||||
'status': item.status,
|
||||
'sort': item.sort,
|
||||
'createTime': _dateTimeConverter.encode(item.createTime),
|
||||
'updateTime': _dateTimeConverter.encode(item.updateTime),
|
||||
'delFlag': _boolConverter.encode(item.delFlag)
|
||||
'updateTime': _dateTimeConverter.encode(item.updateTime)
|
||||
}),
|
||||
_canteenSpuEntityUpdateAdapter = UpdateAdapter(
|
||||
database,
|
||||
@@ -633,8 +632,7 @@ class _$CanteenSpuDao extends CanteenSpuDao {
|
||||
'status': item.status,
|
||||
'sort': item.sort,
|
||||
'createTime': _dateTimeConverter.encode(item.createTime),
|
||||
'updateTime': _dateTimeConverter.encode(item.updateTime),
|
||||
'delFlag': _boolConverter.encode(item.delFlag)
|
||||
'updateTime': _dateTimeConverter.encode(item.updateTime)
|
||||
}),
|
||||
_canteenSpuEntityDeletionAdapter = DeletionAdapter(
|
||||
database,
|
||||
@@ -653,8 +651,7 @@ class _$CanteenSpuDao extends CanteenSpuDao {
|
||||
'status': item.status,
|
||||
'sort': item.sort,
|
||||
'createTime': _dateTimeConverter.encode(item.createTime),
|
||||
'updateTime': _dateTimeConverter.encode(item.updateTime),
|
||||
'delFlag': _boolConverter.encode(item.delFlag)
|
||||
'updateTime': _dateTimeConverter.encode(item.updateTime)
|
||||
});
|
||||
|
||||
final sqflite.DatabaseExecutor database;
|
||||
@@ -674,6 +671,13 @@ class _$CanteenSpuDao extends CanteenSpuDao {
|
||||
await _queryAdapter.queryNoReturn('DELETE FROM canteen_spu');
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> delAllByDay(String dayStr) async {
|
||||
await _queryAdapter.queryNoReturn(
|
||||
'DELETE FROM canteen_spu WHERE strftime(\'%Y-%m-%d\', saleDate) = strftime(\'%Y-%m-%d\', ?1)',
|
||||
arguments: [dayStr]);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> edit(
|
||||
bool isDefault,
|
||||
@@ -681,14 +685,14 @@ class _$CanteenSpuDao extends CanteenSpuDao {
|
||||
String hourType,
|
||||
) async {
|
||||
await _queryAdapter.queryNoReturn(
|
||||
'UPDATE canteen_spu SET isDefault = ?1 WHERE delFlag = 0 AND serviceUniqueCode = ?2 AND hourType = ?3 AND strftime(\'%Y-%m-%d\', saleDate) = strftime(\'%Y-%m-%d\', \'now\', \'localtime\')',
|
||||
'UPDATE canteen_spu SET isDefault = ?1 WHERE serviceUniqueCode = ?2 AND hourType = ?3 AND strftime(\'%Y-%m-%d\', saleDate) = strftime(\'%Y-%m-%d\', \'now\', \'localtime\')',
|
||||
arguments: [_boolConverter.encode(isDefault), uniqueCode, hourType]);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<int?> getCount(String hourType) async {
|
||||
return _queryAdapter.query(
|
||||
'SELECT DISTINCT COUNT(0) FROM canteen_spu WHERE delFlag = 0 AND (?1 = \'-1\' OR INSTR(\',\' || hourType || \',\', \',\' || ?1 || \',\') > 0) AND strftime(\'%Y-%m-%d\', saleDate) = strftime(\'%Y-%m-%d\', \'now\', \'localtime\')',
|
||||
'SELECT DISTINCT COUNT(0) FROM canteen_spu WHERE (?1 = \'-1\' OR INSTR(\',\' || hourType || \',\', \',\' || ?1 || \',\') > 0) AND strftime(\'%Y-%m-%d\', saleDate) = strftime(\'%Y-%m-%d\', \'now\', \'localtime\')',
|
||||
mapper: (Map<String, Object?> row) => row.values.first as int,
|
||||
arguments: [hourType]);
|
||||
}
|
||||
@@ -699,8 +703,8 @@ class _$CanteenSpuDao extends CanteenSpuDao {
|
||||
String saleDate,
|
||||
) async {
|
||||
return _queryAdapter.query(
|
||||
'SELECT * FROM canteen_spu WHERE delFlag = 0 AND serviceUniqueCode = ?1 AND (?2 = \'-1\' OR strftime(\'%Y-%m-%d\', saleDate) = strftime(\'%Y-%m-%d\', ?2)) LIMIT 1',
|
||||
mapper: (Map<String, Object?> row) => CanteenSpuEntity(id: row['id'] as int?, serviceUniqueCode: row['serviceUniqueCode'] as String, classifyServiceUniqueCode: row['classifyServiceUniqueCode'] as String, hourType: row['hourType'] == null ? null : ProductHourType.values[row['hourType'] as int], saleDate: _dateTimeConverter.decode(row['saleDate'] as String), name: row['name'] as String, price: row['price'] as int, image: row['image'] as String?, isDefault: _boolConverter.decode(row['isDefault'] as int), status: row['status'] as int, sort: row['sort'] as int, createTime: _dateTimeConverter.decode(row['createTime'] as String), updateTime: _dateTimeConverter.decode(row['updateTime'] as String), delFlag: _boolConverter.decode(row['delFlag'] as int)),
|
||||
'SELECT * FROM canteen_spu WHERE serviceUniqueCode = ?1 AND (?2 = \'-1\' OR strftime(\'%Y-%m-%d\', saleDate) = strftime(\'%Y-%m-%d\', ?2)) LIMIT 1',
|
||||
mapper: (Map<String, Object?> row) => CanteenSpuEntity(id: row['id'] as int?, serviceUniqueCode: row['serviceUniqueCode'] as String, classifyServiceUniqueCode: row['classifyServiceUniqueCode'] as String, hourType: row['hourType'] == null ? null : ProductHourType.values[row['hourType'] as int], saleDate: _dateTimeConverter.decode(row['saleDate'] as String), name: row['name'] as String, price: row['price'] as int, image: row['image'] as String?, isDefault: _boolConverter.decode(row['isDefault'] as int), status: row['status'] as int, sort: row['sort'] as int, createTime: _dateTimeConverter.decode(row['createTime'] as String), updateTime: _dateTimeConverter.decode(row['updateTime'] as String)),
|
||||
arguments: [code, saleDate]);
|
||||
}
|
||||
|
||||
@@ -711,8 +715,8 @@ class _$CanteenSpuDao extends CanteenSpuDao {
|
||||
String saleDate,
|
||||
) async {
|
||||
return _queryAdapter.queryList(
|
||||
'SELECT canteen_spu.* FROM canteen_spu LEFT JOIN classify ON canteen_spu.classifyServiceUniqueCode = classify.serviceUniqueCode WHERE canteen_spu.delFlag = 0 AND (?1 = \'-1\' OR canteen_spu.classifyServiceUniqueCode = ?1) AND (?2 = \'-1\' OR INSTR(\',\' || hourType || \',\', \',\' || ?2 || \',\') > 0) AND (?3 = \'-1\' OR strftime(\'%Y-%m-%d\', saleDate) = strftime(\'%Y-%m-%d\', ?3)) ORDER BY classify.sort, canteen_spu.price',
|
||||
mapper: (Map<String, Object?> row) => CanteenSpuEntity(id: row['id'] as int?, serviceUniqueCode: row['serviceUniqueCode'] as String, classifyServiceUniqueCode: row['classifyServiceUniqueCode'] as String, hourType: row['hourType'] == null ? null : ProductHourType.values[row['hourType'] as int], saleDate: _dateTimeConverter.decode(row['saleDate'] as String), name: row['name'] as String, price: row['price'] as int, image: row['image'] as String?, isDefault: _boolConverter.decode(row['isDefault'] as int), status: row['status'] as int, sort: row['sort'] as int, createTime: _dateTimeConverter.decode(row['createTime'] as String), updateTime: _dateTimeConverter.decode(row['updateTime'] as String), delFlag: _boolConverter.decode(row['delFlag'] as int)),
|
||||
'SELECT canteen_spu.* FROM canteen_spu LEFT JOIN classify ON canteen_spu.classifyServiceUniqueCode = classify.serviceUniqueCode WHERE (?1 = \'-1\' OR canteen_spu.classifyServiceUniqueCode = ?1) AND (?2 = \'-1\' OR INSTR(\',\' || hourType || \',\', \',\' || ?2 || \',\') > 0) AND (?3 = \'-1\' OR strftime(\'%Y-%m-%d\', saleDate) = strftime(\'%Y-%m-%d\', ?3)) ORDER BY classify.sort, canteen_spu.price',
|
||||
mapper: (Map<String, Object?> row) => CanteenSpuEntity(id: row['id'] as int?, serviceUniqueCode: row['serviceUniqueCode'] as String, classifyServiceUniqueCode: row['classifyServiceUniqueCode'] as String, hourType: row['hourType'] == null ? null : ProductHourType.values[row['hourType'] as int], saleDate: _dateTimeConverter.decode(row['saleDate'] as String), name: row['name'] as String, price: row['price'] as int, image: row['image'] as String?, isDefault: _boolConverter.decode(row['isDefault'] as int), status: row['status'] as int, sort: row['sort'] as int, createTime: _dateTimeConverter.decode(row['createTime'] as String), updateTime: _dateTimeConverter.decode(row['updateTime'] as String)),
|
||||
arguments: [classifyServiceUniqueCode, hourType, saleDate]);
|
||||
}
|
||||
|
||||
@@ -724,16 +728,16 @@ class _$CanteenSpuDao extends CanteenSpuDao {
|
||||
int offset,
|
||||
) async {
|
||||
return _queryAdapter.queryList(
|
||||
'SELECT canteen_spu.* FROM canteen_spu LEFT JOIN classify ON canteen_spu.classifyServiceUniqueCode = classify.serviceUniqueCode WHERE canteen_spu.delFlag = 0 AND (?1 = \'-1\' OR canteen_spu.classifyServiceUniqueCode = ?1) AND (?2 = \'-1\' OR INSTR(\',\' || canteen_spu.hourType || \',\', \',\' || ?2 || \',\') > 0) AND strftime(\'%Y-%m-%d\', saleDate) = strftime(\'%Y-%m-%d\', \'now\', \'localtime\') ORDER BY classify.sort, classify.id, canteen_spu.price LIMIT ?3 OFFSET ?4',
|
||||
mapper: (Map<String, Object?> row) => CanteenSpuEntity(id: row['id'] as int?, serviceUniqueCode: row['serviceUniqueCode'] as String, classifyServiceUniqueCode: row['classifyServiceUniqueCode'] as String, hourType: row['hourType'] == null ? null : ProductHourType.values[row['hourType'] as int], saleDate: _dateTimeConverter.decode(row['saleDate'] as String), name: row['name'] as String, price: row['price'] as int, image: row['image'] as String?, isDefault: _boolConverter.decode(row['isDefault'] as int), status: row['status'] as int, sort: row['sort'] as int, createTime: _dateTimeConverter.decode(row['createTime'] as String), updateTime: _dateTimeConverter.decode(row['updateTime'] as String), delFlag: _boolConverter.decode(row['delFlag'] as int)),
|
||||
'SELECT canteen_spu.* FROM canteen_spu LEFT JOIN classify ON canteen_spu.classifyServiceUniqueCode = classify.serviceUniqueCode WHERE (?1 = \'-1\' OR canteen_spu.classifyServiceUniqueCode = ?1) AND (?2 = \'-1\' OR INSTR(\',\' || canteen_spu.hourType || \',\', \',\' || ?2 || \',\') > 0) AND strftime(\'%Y-%m-%d\', saleDate) = strftime(\'%Y-%m-%d\', \'now\', \'localtime\') ORDER BY classify.sort, classify.id, canteen_spu.price LIMIT ?3 OFFSET ?4',
|
||||
mapper: (Map<String, Object?> row) => CanteenSpuEntity(id: row['id'] as int?, serviceUniqueCode: row['serviceUniqueCode'] as String, classifyServiceUniqueCode: row['classifyServiceUniqueCode'] as String, hourType: row['hourType'] == null ? null : ProductHourType.values[row['hourType'] as int], saleDate: _dateTimeConverter.decode(row['saleDate'] as String), name: row['name'] as String, price: row['price'] as int, image: row['image'] as String?, isDefault: _boolConverter.decode(row['isDefault'] as int), status: row['status'] as int, sort: row['sort'] as int, createTime: _dateTimeConverter.decode(row['createTime'] as String), updateTime: _dateTimeConverter.decode(row['updateTime'] as String)),
|
||||
arguments: [classifyServiceUniqueCode, hourType, pageSize, offset]);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<List<CanteenSpuEntity>> getDefault(String hourType) async {
|
||||
return _queryAdapter.queryList(
|
||||
'SELECT * FROM canteen_spu WHERE delFlag = 0 AND isDefault = 1 AND (?1 = \'-1\' OR hourType = ?1) AND strftime(\'%Y-%m-%d\', saleDate) = strftime(\'%Y-%m-%d\', \'now\', \'localtime\')',
|
||||
mapper: (Map<String, Object?> row) => CanteenSpuEntity(id: row['id'] as int?, serviceUniqueCode: row['serviceUniqueCode'] as String, classifyServiceUniqueCode: row['classifyServiceUniqueCode'] as String, hourType: row['hourType'] == null ? null : ProductHourType.values[row['hourType'] as int], saleDate: _dateTimeConverter.decode(row['saleDate'] as String), name: row['name'] as String, price: row['price'] as int, image: row['image'] as String?, isDefault: _boolConverter.decode(row['isDefault'] as int), status: row['status'] as int, sort: row['sort'] as int, createTime: _dateTimeConverter.decode(row['createTime'] as String), updateTime: _dateTimeConverter.decode(row['updateTime'] as String), delFlag: _boolConverter.decode(row['delFlag'] as int)),
|
||||
'SELECT * FROM canteen_spu WHERE isDefault = 1 AND (?1 = \'-1\' OR hourType = ?1)',
|
||||
mapper: (Map<String, Object?> row) => CanteenSpuEntity(id: row['id'] as int?, serviceUniqueCode: row['serviceUniqueCode'] as String, classifyServiceUniqueCode: row['classifyServiceUniqueCode'] as String, hourType: row['hourType'] == null ? null : ProductHourType.values[row['hourType'] as int], saleDate: _dateTimeConverter.decode(row['saleDate'] as String), name: row['name'] as String, price: row['price'] as int, image: row['image'] as String?, isDefault: _boolConverter.decode(row['isDefault'] as int), status: row['status'] as int, sort: row['sort'] as int, createTime: _dateTimeConverter.decode(row['createTime'] as String), updateTime: _dateTimeConverter.decode(row['updateTime'] as String)),
|
||||
arguments: [hourType]);
|
||||
}
|
||||
|
||||
|
||||
@@ -49,9 +49,6 @@ class CanteenSpuEntity extends Equatable {
|
||||
/// 同步时间
|
||||
DateTime updateTime;
|
||||
|
||||
/// 是否删除
|
||||
bool delFlag;
|
||||
|
||||
CanteenSpuEntity({
|
||||
this.id,
|
||||
required this.serviceUniqueCode,
|
||||
@@ -66,7 +63,6 @@ class CanteenSpuEntity extends Equatable {
|
||||
required this.sort,
|
||||
required this.createTime,
|
||||
required this.updateTime,
|
||||
required this.delFlag,
|
||||
});
|
||||
|
||||
factory CanteenSpuEntity.fromJson(Map<String, dynamic> json) =>
|
||||
|
||||
@@ -21,7 +21,6 @@ CanteenSpuEntity _$CanteenSpuEntityFromJson(Map<String, dynamic> json) =>
|
||||
sort: (json['sort'] as num).toInt(),
|
||||
createTime: DateTime.parse(json['createTime'] as String),
|
||||
updateTime: DateTime.parse(json['updateTime'] as String),
|
||||
delFlag: json['delFlag'] as bool,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$CanteenSpuEntityToJson(CanteenSpuEntity instance) =>
|
||||
@@ -39,7 +38,6 @@ Map<String, dynamic> _$CanteenSpuEntityToJson(CanteenSpuEntity instance) =>
|
||||
'sort': instance.sort,
|
||||
'createTime': instance.createTime.toIso8601String(),
|
||||
'updateTime': instance.updateTime.toIso8601String(),
|
||||
'delFlag': instance.delFlag,
|
||||
};
|
||||
|
||||
const _$ProductHourTypeEnumMap = {
|
||||
|
||||
Reference in new issue
Block a user