平安校园
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

25 lines
770 B

  1. namespace SafeCampus.Application.Services.Business.PersonFacesService;
  2. public class PersonFacesService:DbRepository<PersonFaces>, IPersonFacesService
  3. {
  4. public async Task<bool> BatchAdd(List<PersonFaces> list)
  5. {
  6. var oldList = await GetListAsync(x => x.PersonId == list[0].PersonId);
  7. await DeleteAsync(oldList);
  8. await InsertRangeAsync(list);
  9. return true;
  10. }
  11. public async Task<bool> Add(PersonFaces entity)
  12. {
  13. await InsertAsync(entity);
  14. return true;
  15. }
  16. public async Task<bool> Delete(string personId, List<string> faceIds)
  17. {
  18. var delList = await GetListAsync(x => x.PersonId == personId && faceIds.Contains(x.FaceId));
  19. await DeleteAsync(delList);
  20. return true;
  21. }
  22. }