132 lines
4.5 KiB
C#
132 lines
4.5 KiB
C#
/***********************************************************************
|
||
* Project: CoreCms
|
||
* ProjectName: 核心内容管理系统
|
||
* Web: https://www.corecms.net
|
||
* Author: 大灰灰
|
||
* Email: jianweie@163.com
|
||
* CreateTime: 2025/9/2 12:47:30
|
||
* Description: 暂无
|
||
***********************************************************************/
|
||
|
||
using System;
|
||
using System.Collections.Generic;
|
||
using System.Linq.Expressions;
|
||
using System.Threading.Tasks;
|
||
|
||
using CoreCms.Net.Model.Entities;
|
||
using CoreCms.Net.Model.ViewModels.Basics;
|
||
using CoreCms.Net.Model.ViewModels.UI;
|
||
using CoreCms.Net.Model.ViewModels.SQ;
|
||
|
||
using SqlSugar;
|
||
|
||
namespace CoreCms.Net.IServices
|
||
{
|
||
/// <summary>
|
||
/// 房间表 服务工厂接口
|
||
/// </summary>
|
||
public interface ISQRoomsServices : IBaseServices<SQRooms>
|
||
{
|
||
#region 重写增删改查操作===========================================================
|
||
|
||
/// <summary>
|
||
/// 重写异步插入方法
|
||
/// </summary>
|
||
/// <param name="entity"></param>
|
||
/// <returns></returns>
|
||
new Task<AdminUiCallBack> InsertAsync(SQRooms entity);
|
||
|
||
/// <summary>
|
||
/// 重写异步更新方法
|
||
/// </summary>
|
||
/// <param name="entity"></param>
|
||
/// <returns></returns>
|
||
new Task<AdminUiCallBack> UpdateAsync(SQRooms entity);
|
||
|
||
/// <summary>
|
||
/// 重写异步更新方法
|
||
/// </summary>
|
||
/// <param name="entity"></param>
|
||
/// <returns></returns>
|
||
new Task<AdminUiCallBack> UpdateAsync(List<SQRooms> entity);
|
||
|
||
/// <summary>
|
||
/// 重写删除指定ID的数据
|
||
/// </summary>
|
||
/// <param name="id"></param>
|
||
/// <returns></returns>
|
||
new Task<AdminUiCallBack> DeleteByIdAsync(object id);
|
||
|
||
/// <summary>
|
||
/// 重写删除指定ID集合的数据(批量删除)
|
||
/// </summary>
|
||
/// <param name="ids"></param>
|
||
/// <returns></returns>
|
||
new Task<AdminUiCallBack> DeleteByIdsAsync(int[] ids);
|
||
|
||
#endregion
|
||
|
||
|
||
#region 获取缓存的所有数据==========================================================
|
||
|
||
/// <summary>
|
||
/// 获取缓存的所有数据
|
||
/// </summary>
|
||
/// <returns></returns>
|
||
Task<List<SQRooms>> GetCaChe();
|
||
|
||
/// <summary>
|
||
/// 更新cache
|
||
/// </summary>
|
||
Task<List<SQRooms>> UpdateCaChe();
|
||
|
||
#endregion
|
||
|
||
#region 重写根据条件查询分页数据
|
||
/// <summary>
|
||
/// 重写根据条件查询分页数据
|
||
/// </summary>
|
||
/// <param name="predicate">判断集合</param>
|
||
/// <param name="orderByType">排序方式</param>
|
||
/// <param name="pageIndex">当前页面索引</param>
|
||
/// <param name="pageSize">分布大小</param>
|
||
/// <param name="orderByExpression"></param>
|
||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||
/// <returns></returns>
|
||
new Task<IPageList<SQRooms>> QueryPageAsync(
|
||
Expression<Func<SQRooms, bool>> predicate,
|
||
Expression<Func<SQRooms, object>> orderByExpression, OrderByType orderByType, int pageIndex = 1,
|
||
int pageSize = 20, bool blUseNoLock = false);
|
||
#endregion
|
||
|
||
#region 获取所有数据
|
||
/// <summary>
|
||
/// 获取所有数据
|
||
/// </summary>
|
||
/// <returns></returns>
|
||
Task<List<SQRooms>> GetRoomList();
|
||
#endregion
|
||
|
||
#region 按时段预约相关方法
|
||
|
||
/// <summary>
|
||
/// 获取房间列表及时段状态
|
||
/// </summary>
|
||
/// <param name="date">查询日期</param>
|
||
/// <param name="showOnlyAvailable">是否只显示可用房间</param>
|
||
/// <param name="currentTimeSlot">当前时段类型(配合showOnlyAvailable使用)</param>
|
||
/// <returns>房间列表DTO</returns>
|
||
Task<List<SQRoomListDto>> GetRoomListWithSlotsAsync(DateTime date, bool showOnlyAvailable = false, int? currentTimeSlot = null);
|
||
|
||
/// <summary>
|
||
/// 获取房间详情
|
||
/// </summary>
|
||
/// <param name="roomId">房间ID</param>
|
||
/// <param name="date">查询日期</param>
|
||
/// <returns>房间详情DTO</returns>
|
||
Task<SQRoomDetailDto> GetRoomDetailAsync(int roomId, DateTime date);
|
||
|
||
#endregion
|
||
}
|
||
}
|