|
@@ -39,6 +39,26 @@ public class InviteCodeApplication : IInviteCodeApplication, IScopeDependency
|
|
|
await _inviteCodeRepository.AddAsync(entity);
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 删除邀请码
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="ids"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public async Task DeleteInviteCodeAsync(IList<string> ids)
|
|
|
+ {
|
|
|
+ await _inviteCodeRepository.Queryable()
|
|
|
+ .Where(m => ids.Contains(m.Id))
|
|
|
+ .ToListAsync()
|
|
|
+ .Then(async invite =>
|
|
|
+ {
|
|
|
+ for (int i = 0;i < invite.Count;i++)
|
|
|
+ {
|
|
|
+ invite[i].IsDeleted = true;
|
|
|
+ await _inviteCodeRepository.UpdateAsync(invite[i]);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
public ISugarQueryable<InviteCode> GetInviteCodeItemsAsync()
|
|
|
{
|
|
|
return _inviteCodeRepository.Queryable();
|