|
@@ -66,11 +66,12 @@ namespace GxPress.Repository.Implement.Media
|
|
|
{
|
|
|
using (var transactionScope = new TransactionScope())
|
|
|
{
|
|
|
- //删除媒体库
|
|
|
- await mediaLibraryRepository.DeleteAsync(Q.Where(nameof(Entity.tede2.Media.MediaLibrary.MediaId), id));
|
|
|
- //删除媒体标签
|
|
|
- await mediaLableRepository.DeleteAsync(Q.Where(nameof(Entity.tede2.Media.MediaLable.MediaId), id));
|
|
|
- await _repository.DeleteAsync(id);
|
|
|
+ // //删除媒体库
|
|
|
+ // await mediaLibraryRepository.DeleteAsync(Q.Where(nameof(Entity.tede2.Media.MediaLibrary.MediaId), id));
|
|
|
+ // //删除媒体标签
|
|
|
+ // await mediaLableRepository.DeleteAsync(Q.Where(nameof(Entity.tede2.Media.MediaLable.MediaId), id));
|
|
|
+
|
|
|
+ await _repository.UpdateAsync(Q.Where(nameof(Entity.tede2.Media.Media.Id), id).Set(nameof(Entity.tede2.Media.Media.IsDelete), true));
|
|
|
transactionScope.Complete();
|
|
|
}
|
|
|
}
|
|
@@ -146,6 +147,7 @@ namespace GxPress.Repository.Implement.Media
|
|
|
{
|
|
|
var result = new PagedList<Entity.tede2.Media.Media>();
|
|
|
var query = Q.NewQuery();
|
|
|
+ query.Where(nameof(Entity.tede2.Media.Media.IsDelete), request.IsDelete);
|
|
|
query.Where(nameof(Entity.tede2.Media.Media.MediaType), request.MediaType);
|
|
|
result.Total = await _repository.CountAsync(query);
|
|
|
var item = await _repository.GetAllAsync(query.ForPage(request.Page, request.PerPage).OrderByDesc(nameof(Entity.tede2.Media.Media.Sort)));
|