feat:广播

This commit is contained in:
dzc committed 2025-05-12 14:18:15 +08:00
1 parent 5ce8e595b0
commit 903299cd6c
10 files changed
+59 -20

No files matched your search

@@ -13,7 +13,7 @@ abstract class SyncTakeFoodBroadcastTool {
final broadcastDao = appC.dataBase.getBroadcastDao;
// 完成就删除掉
if (msg.isDone) {
await broadcastDao.del(msg.id);
await broadcastDao.del(msg.orderId);
return;
}
final saveObj = BroadcastEntity(
@@ -21,9 +21,10 @@ abstract class SyncTakeFoodBroadcastTool {
broadcastCount: 0,
broadcastMaxCount: msg.broadcastMaxCount,
isBroadcast: true,
isDone: false,
isDone: msg.isDone,
productDesc: msg.productDesc,
serviceCode: msg.id,
serviceOrderCode: msg.orderId,
userId: msg.userId,
username: msg.username,
userMobile: msg.userMobile,
@@ -113,8 +114,13 @@ abstract class SyncTakeFoodBroadcastTool {
static Future<void> queryTodayBroadcast() async {
// 检查有没有网络
if (!AppNetworkTool.isAutoNetwork()) return;
final sysSetting = await AppSettingTool.getSysSetting();
int currentPage = 1;
final pa = {"current": currentPage, "size": 100};
final pa = {
"current": currentPage,
"size": 100,
"hardId": sysSetting.serviceId
};
while (true) {
final isMore = await _queryTodayBroadcastGroup(pa);
if (!isMore) break;
@@ -163,6 +169,7 @@ abstract class SyncTakeFoodBroadcastTool {
isDone: false,
productDesc: obj.productDesc,
serviceCode: obj.id,
serviceOrderCode: obj.bizId!,
userId: obj.userId,
username: obj.username,
userMobile: obj.userMobile,