Beispiel #1
0
        public async Task DeleteGroup()
        {
            List <string> ids = Body["groupIds"].ToObject <List <string> >();

            LiteDb.DeleteMany <Group>(g => ids.Contains(g._id));
            await ResponseSuccessAsync(ids);
        }
        public async Task DeleteHistoryGroup(string historyId)
        {
            // 删除发送记录
            LiteDb.DeleteMany <SendItem>(item => item.historyId == historyId);

            // 删除组
            LiteDb.Delete <HistoryGroup>(historyId);

            // 获取状态
            await ResponseSuccessAsync(true);
        }
Beispiel #3
0
        public async Task DeleteEmails(string id)
        {
            var group = LiteDb.SingleOrDefault <Group>($"_id='{id}'");

            if (group == null)
            {
                await ResponseErrorAsync($"未通过{id}找到组");

                return;
            }

            // 删除组id对应的所有邮箱
            LiteDb.DeleteMany <SendBox>($"groupId='{id}'");
            LiteDb.DeleteMany <ReceiveBox>($"groupId='{id}'");

            await ResponseSuccessAsync("success");
        }