diff --git a/CoreCms.Net.Configuration/GlobalConstVars.cs b/CoreCms.Net.Configuration/GlobalConstVars.cs
index 407a58d..13e435a 100644
--- a/CoreCms.Net.Configuration/GlobalConstVars.cs
+++ b/CoreCms.Net.Configuration/GlobalConstVars.cs
@@ -282,9 +282,11 @@
public const string CacheSQRoomUnavailableTimes = "CacheSQRoomUnavailableTimes";
public const string CacheSQReservations = "CacheSQReservations";
public const string CacheSQReservationParticipants = "CacheSQReservationParticipants";
+ public const string CacheCoreCmsUserBlacklist = "CacheCoreCmsUserBlacklist";
+
}
diff --git a/CoreCms.Net.IRepository/User/ICoreCmsUserBlacklistRepository.cs b/CoreCms.Net.IRepository/User/ICoreCmsUserBlacklistRepository.cs
new file mode 100644
index 0000000..b0fc35d
--- /dev/null
+++ b/CoreCms.Net.IRepository/User/ICoreCmsUserBlacklistRepository.cs
@@ -0,0 +1,103 @@
+/***********************************************************************
+ * Project: CoreCms
+ * ProjectName: 核心内容管理系统
+ * Web: https://www.corecms.net
+ * Author: 大灰灰
+ * Email: jianweie@163.com
+ * CreateTime: 2025/9/9 15:26:08
+ * 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 SqlSugar;
+
+
+namespace CoreCms.Net.IRepository
+{
+ ///
+ /// 工厂接口
+ ///
+ public interface ICoreCmsUserBlacklistRepository : IBaseRepository
+ {
+ #region 重写增删改查操作===========================================================
+
+ ///
+ /// 重写异步插入方法
+ ///
+ ///
+ ///
+ new Task InsertAsync(CoreCmsUserBlacklist entity);
+
+
+ ///
+ /// 重写异步更新方法
+ ///
+ ///
+ ///
+ new Task UpdateAsync(CoreCmsUserBlacklist entity);
+
+
+ ///
+ /// 重写异步更新方法
+ ///
+ ///
+ ///
+ new Task UpdateAsync(List entity);
+
+
+ ///
+ /// 重写删除指定ID的数据
+ ///
+ ///
+ ///
+ new Task DeleteByIdAsync(object id);
+
+
+ ///
+ /// 重写删除指定ID集合的数据(批量删除)
+ ///
+ ///
+ ///
+ new Task DeleteByIdsAsync(int[] ids);
+
+ #endregion
+
+ #region 获取缓存的所有数据==========================================================
+
+ ///
+ /// 获取缓存的所有数据
+ ///
+ ///
+ Task> GetCaChe();
+
+ ///
+ /// 更新cache
+ ///
+ Task> UpdateCaChe();
+
+ #endregion
+
+
+ ///
+ /// 重写根据条件查询分页数据
+ ///
+ /// 判断集合
+ /// 排序方式
+ /// 当前页面索引
+ /// 分布大小
+ ///
+ /// 是否使用WITH(NOLOCK)
+ ///
+ new Task> QueryPageAsync(
+ Expression> predicate,
+ Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
+ int pageSize = 20, bool blUseNoLock = false);
+
+ }
+}
diff --git a/CoreCms.Net.IServices/User/ICoreCmsUserBlacklistServices.cs b/CoreCms.Net.IServices/User/ICoreCmsUserBlacklistServices.cs
new file mode 100644
index 0000000..8148590
--- /dev/null
+++ b/CoreCms.Net.IServices/User/ICoreCmsUserBlacklistServices.cs
@@ -0,0 +1,99 @@
+/***********************************************************************
+ * Project: CoreCms
+ * ProjectName: 核心内容管理系统
+ * Web: https://www.corecms.net
+ * Author: 大灰灰
+ * Email: jianweie@163.com
+ * CreateTime: 2025/9/9 15:26:08
+ * 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 SqlSugar;
+
+namespace CoreCms.Net.IServices
+{
+ ///
+ /// 服务工厂接口
+ ///
+ public interface ICoreCmsUserBlacklistServices : IBaseServices
+ {
+ #region 重写增删改查操作===========================================================
+
+ ///
+ /// 重写异步插入方法
+ ///
+ ///
+ ///
+ new Task InsertAsync(CoreCmsUserBlacklist entity);
+
+ ///
+ /// 重写异步更新方法
+ ///
+ ///
+ ///
+ new Task UpdateAsync(CoreCmsUserBlacklist entity);
+
+ ///
+ /// 重写异步更新方法
+ ///
+ ///
+ ///
+ new Task UpdateAsync(List entity);
+
+ ///
+ /// 重写删除指定ID的数据
+ ///
+ ///
+ ///
+ new Task DeleteByIdAsync(object id);
+
+ ///
+ /// 重写删除指定ID集合的数据(批量删除)
+ ///
+ ///
+ ///
+ new Task DeleteByIdsAsync(int[] ids);
+
+ #endregion
+
+
+ #region 获取缓存的所有数据==========================================================
+
+ ///
+ /// 获取缓存的所有数据
+ ///
+ ///
+ Task> GetCaChe();
+
+ ///
+ /// 更新cache
+ ///
+ Task> UpdateCaChe();
+
+ #endregion
+
+ #region 重写根据条件查询分页数据
+ ///
+ /// 重写根据条件查询分页数据
+ ///
+ /// 判断集合
+ /// 排序方式
+ /// 当前页面索引
+ /// 分布大小
+ ///
+ /// 是否使用WITH(NOLOCK)
+ ///
+ new Task> QueryPageAsync(
+ Expression> predicate,
+ Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
+ int pageSize = 20, bool blUseNoLock = false);
+ #endregion
+ }
+}
diff --git a/CoreCms.Net.Model/Entities/User/CoreCmsUserBlacklist.cs b/CoreCms.Net.Model/Entities/User/CoreCmsUserBlacklist.cs
new file mode 100644
index 0000000..ead5ad9
--- /dev/null
+++ b/CoreCms.Net.Model/Entities/User/CoreCmsUserBlacklist.cs
@@ -0,0 +1,89 @@
+/***********************************************************************
+ * Project: CoreCms
+ * ProjectName: 核心内容管理系统
+ * Web: https://www.corecms.net
+ * Author: 大灰灰
+ * Email: jianweie@163.com
+ * CreateTime: 2025/9/9 15:26:08
+ * Description: 暂无
+ ***********************************************************************/
+
+using SqlSugar;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+
+namespace CoreCms.Net.Model.Entities
+{
+ ///
+ ///
+ ///
+ public partial class CoreCmsUserBlacklist
+ {
+ ///
+ /// 构造函数
+ ///
+ public CoreCmsUserBlacklist()
+ {
+ }
+
+ ///
+ ///
+ ///
+ [Display(Name = "")]
+
+ [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
+
+ [Required(ErrorMessage = "请输入{0}")]
+ public System.Int32 Id { get; set; }
+
+
+ ///
+ /// 用户id
+ ///
+ [Display(Name = "用户id")]
+
+ [Required(ErrorMessage = "请输入{0}")]
+
+
+
+ public System.Int32 UserId { get; set; }
+
+
+ ///
+ /// 拉黑用户id
+ ///
+ [Display(Name = "拉黑用户id")]
+
+ [Required(ErrorMessage = "请输入{0}")]
+
+
+
+ public System.Int32 BlockedUserId { get; set; }
+
+
+ ///
+ /// 拉黑说明
+ ///
+ [Display(Name = "拉黑说明")]
+
+
+ [StringLength(maximumLength:500,ErrorMessage = "{0}不能超过{1}字")]
+
+
+ public System.String Reason { get; set; }
+
+
+ ///
+ /// 拉黑时间
+ ///
+ [Display(Name = "拉黑时间")]
+
+
+
+
+
+ public System.DateTime? CreatedTime { get; set; }
+
+
+ }
+}
diff --git a/CoreCms.Net.Model/ViewModels/SQ/SQReservationsDto.cs b/CoreCms.Net.Model/ViewModels/SQ/SQReservationsDto.cs
index e587f04..50d2abc 100644
--- a/CoreCms.Net.Model/ViewModels/SQ/SQReservationsDto.cs
+++ b/CoreCms.Net.Model/ViewModels/SQ/SQReservationsDto.cs
@@ -4,6 +4,7 @@ using CoreCms.Net.Model.Entities;
using System;
using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -15,4 +16,38 @@ namespace CoreCms.Net.Model.ViewModels.SQ
{
public List Participants { get; set; }
}
+ ///
+ ///
+ ///
+ [AutoMap(typeof(SQReservations))]
+ public class SQReservationsMyDto : SQReservations
+ {
+ ///
+ /// 加入时间
+ ///
+
+
+ public System.DateTime join_time { get; set; }
+
+
+ ///
+ /// 退出时间
+ ///
+
+ public System.DateTime? quit_time { get; set; }
+
+
+ ///
+ /// 状态,0正常,1已退出
+ ///
+ [Display(Name = "状态,0正常,1已退出")]
+
+ [Required(ErrorMessage = "请输入{0}")]
+
+
+
+ public System.Int32 pstatus { get; set; }
+ }
+
+
}
diff --git a/CoreCms.Net.Repository/User/CoreCmsUserBlacklistRepository.cs b/CoreCms.Net.Repository/User/CoreCmsUserBlacklistRepository.cs
new file mode 100644
index 0000000..206708e
--- /dev/null
+++ b/CoreCms.Net.Repository/User/CoreCmsUserBlacklistRepository.cs
@@ -0,0 +1,236 @@
+/***********************************************************************
+ * Project: CoreCms
+ * ProjectName: 核心内容管理系统
+ * Web: https://www.corecms.net
+ * Author: 大灰灰
+ * Email: jianweie@163.com
+ * CreateTime: 2025/9/9 15:26:08
+ * Description: 暂无
+ ***********************************************************************/
+
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Threading.Tasks;
+using CoreCms.Net.Caching.Manual;
+using CoreCms.Net.Configuration;
+using CoreCms.Net.Model.Entities;
+using CoreCms.Net.Model.ViewModels.Basics;
+using CoreCms.Net.IRepository;
+using CoreCms.Net.IRepository.UnitOfWork;
+using CoreCms.Net.Model.ViewModels.UI;
+using SqlSugar;
+
+namespace CoreCms.Net.Repository
+{
+ ///
+ /// 接口实现
+ ///
+ public class CoreCmsUserBlacklistRepository : BaseRepository, ICoreCmsUserBlacklistRepository
+ {
+ private readonly IUnitOfWork _unitOfWork;
+ public CoreCmsUserBlacklistRepository(IUnitOfWork unitOfWork) : base(unitOfWork)
+ {
+ _unitOfWork = unitOfWork;
+ }
+
+ #region 实现重写增删改查操作==========================================================
+
+ ///
+ /// 重写异步插入方法
+ ///
+ /// 实体数据
+ ///
+ public new async Task InsertAsync(CoreCmsUserBlacklist entity)
+ {
+ var jm = new AdminUiCallBack();
+
+ var bl = await DbClient.Insertable(entity).ExecuteReturnIdentityAsync() > 0;
+ jm.code = bl ? 0 : 1;
+ jm.msg = bl ? GlobalConstVars.CreateSuccess : GlobalConstVars.CreateFailure;
+ if (bl)
+ {
+ await UpdateCaChe();
+ }
+
+ return jm;
+ }
+
+ ///
+ /// 重写异步更新方法
+ ///
+ ///
+ ///
+ public new async Task UpdateAsync(CoreCmsUserBlacklist entity)
+ {
+ var jm = new AdminUiCallBack();
+
+ var oldModel = await DbClient.Queryable().In(entity.Id).SingleAsync();
+ if (oldModel == null)
+ {
+ jm.msg = "不存在此信息";
+ return jm;
+ }
+ //事物处理过程开始
+ oldModel.Id = entity.Id;
+ oldModel.UserId = entity.UserId;
+ oldModel.BlockedUserId = entity.BlockedUserId;
+ oldModel.Reason = entity.Reason;
+ oldModel.CreatedTime = entity.CreatedTime;
+
+ //事物处理过程结束
+ var bl = await DbClient.Updateable(oldModel).ExecuteCommandHasChangeAsync();
+ jm.code = bl ? 0 : 1;
+ jm.msg = bl ? GlobalConstVars.EditSuccess : GlobalConstVars.EditFailure;
+ if (bl)
+ {
+ await UpdateCaChe();
+ }
+
+ return jm;
+ }
+
+ ///
+ /// 重写异步更新方法
+ ///
+ ///
+ ///
+ public new async Task UpdateAsync(List entity)
+ {
+ var jm = new AdminUiCallBack();
+
+ var bl = await DbClient.Updateable(entity).ExecuteCommandHasChangeAsync();
+ jm.code = bl ? 0 : 1;
+ jm.msg = bl ? GlobalConstVars.EditSuccess : GlobalConstVars.EditFailure;
+ if (bl)
+ {
+ await UpdateCaChe();
+ }
+
+ return jm;
+ }
+
+ ///
+ /// 重写删除指定ID的数据
+ ///
+ ///
+ ///
+ public new async Task DeleteByIdAsync(object id)
+ {
+ var jm = new AdminUiCallBack();
+
+ var bl = await DbClient.Deleteable(id).ExecuteCommandHasChangeAsync();
+ jm.code = bl ? 0 : 1;
+ jm.msg = bl ? GlobalConstVars.DeleteSuccess : GlobalConstVars.DeleteFailure;
+ if (bl)
+ {
+ await UpdateCaChe();
+ }
+
+ return jm;
+ }
+
+ ///
+ /// 重写删除指定ID集合的数据(批量删除)
+ ///
+ ///
+ ///
+ public new async Task DeleteByIdsAsync(int[] ids)
+ {
+ var jm = new AdminUiCallBack();
+
+ var bl = await DbClient.Deleteable().In(ids).ExecuteCommandHasChangeAsync();
+ jm.code = bl ? 0 : 1;
+ jm.msg = bl ? GlobalConstVars.DeleteSuccess : GlobalConstVars.DeleteFailure;
+ if (bl)
+ {
+ await UpdateCaChe();
+ }
+
+ return jm;
+ }
+
+ #endregion
+
+ #region 获取缓存的所有数据==========================================================
+
+ ///
+ /// 获取缓存的所有数据
+ ///
+ ///
+ public async Task> GetCaChe()
+ {
+ var cache = ManualDataCache.Instance.Get>(GlobalConstVars.CacheCoreCmsUserBlacklist);
+ if (cache != null)
+ {
+ return cache;
+ }
+ return await UpdateCaChe();
+ }
+
+ ///
+ /// 更新cache
+ ///
+ public async Task> UpdateCaChe()
+ {
+ var list = await DbClient.Queryable().With(SqlWith.NoLock).ToListAsync();
+ ManualDataCache.Instance.Set(GlobalConstVars.CacheCoreCmsUserBlacklist, list);
+ return list;
+ }
+
+ #endregion
+
+
+ #region 重写根据条件查询分页数据
+ ///
+ /// 重写根据条件查询分页数据
+ ///
+ /// 判断集合
+ /// 排序方式
+ /// 当前页面索引
+ /// 分布大小
+ ///
+ /// 是否使用WITH(NOLOCK)
+ ///
+ public new async Task> QueryPageAsync(Expression> predicate,
+ Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
+ int pageSize = 20, bool blUseNoLock = false)
+ {
+ RefAsync totalCount = 0;
+ List page;
+ if (blUseNoLock)
+ {
+ page = await DbClient.Queryable()
+ .OrderByIF(orderByExpression != null, orderByExpression, orderByType)
+ .WhereIF(predicate != null, predicate).Select(p => new CoreCmsUserBlacklist
+ {
+ Id = p.Id,
+ UserId = p.UserId,
+ BlockedUserId = p.BlockedUserId,
+ Reason = p.Reason,
+ CreatedTime = p.CreatedTime,
+
+ }).With(SqlWith.NoLock).ToPageListAsync(pageIndex, pageSize, totalCount);
+ }
+ else
+ {
+ page = await DbClient.Queryable()
+ .OrderByIF(orderByExpression != null, orderByExpression, orderByType)
+ .WhereIF(predicate != null, predicate).Select(p => new CoreCmsUserBlacklist
+ {
+ Id = p.Id,
+ UserId = p.UserId,
+ BlockedUserId = p.BlockedUserId,
+ Reason = p.Reason,
+ CreatedTime = p.CreatedTime,
+
+ }).ToPageListAsync(pageIndex, pageSize, totalCount);
+ }
+ var list = new PageList(page, pageIndex, pageSize, totalCount);
+ return list;
+ }
+
+ #endregion
+
+ }
+}
diff --git a/CoreCms.Net.Services/User/CoreCmsUserBlacklistServices.cs b/CoreCms.Net.Services/User/CoreCmsUserBlacklistServices.cs
new file mode 100644
index 0000000..e3eea4e
--- /dev/null
+++ b/CoreCms.Net.Services/User/CoreCmsUserBlacklistServices.cs
@@ -0,0 +1,137 @@
+/***********************************************************************
+ * Project: CoreCms
+ * ProjectName: 核心内容管理系统
+ * Web: https://www.corecms.net
+ * Author: 大灰灰
+ * Email: jianweie@163.com
+ * CreateTime: 2025/9/9 15:26:08
+ * Description: 暂无
+ ***********************************************************************/
+
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Threading.Tasks;
+using CoreCms.Net.Configuration;
+using CoreCms.Net.IRepository;
+using CoreCms.Net.IRepository.UnitOfWork;
+using CoreCms.Net.IServices;
+using CoreCms.Net.Model.Entities;
+using CoreCms.Net.Model.ViewModels.Basics;
+using CoreCms.Net.Model.ViewModels.UI;
+using SqlSugar;
+
+
+namespace CoreCms.Net.Services
+{
+ ///
+ /// 接口实现
+ ///
+ public class CoreCmsUserBlacklistServices : BaseServices, ICoreCmsUserBlacklistServices
+ {
+ private readonly ICoreCmsUserBlacklistRepository _dal;
+ private readonly IUnitOfWork _unitOfWork;
+
+ public CoreCmsUserBlacklistServices(IUnitOfWork unitOfWork, ICoreCmsUserBlacklistRepository dal)
+ {
+ this._dal = dal;
+ base.BaseDal = dal;
+ _unitOfWork = unitOfWork;
+ }
+
+ #region 实现重写增删改查操作==========================================================
+
+ ///
+ /// 重写异步插入方法
+ ///
+ /// 实体数据
+ ///
+ public new async Task InsertAsync(CoreCmsUserBlacklist entity)
+ {
+ return await _dal.InsertAsync(entity);
+ }
+
+ ///
+ /// 重写异步更新方法方法
+ ///
+ ///
+ ///
+ public new async Task UpdateAsync(CoreCmsUserBlacklist entity)
+ {
+ return await _dal.UpdateAsync(entity);
+ }
+
+ ///
+ /// 重写异步更新方法方法
+ ///
+ ///
+ ///
+ public new async Task UpdateAsync(List entity)
+ {
+ return await _dal.UpdateAsync(entity);
+ }
+
+ ///
+ /// 重写删除指定ID的数据
+ ///
+ ///
+ ///
+ public new async Task DeleteByIdAsync(object id)
+ {
+ return await _dal.DeleteByIdAsync(id);
+ }
+
+ ///
+ /// 重写删除指定ID集合的数据(批量删除)
+ ///
+ ///
+ ///
+ public new async Task DeleteByIdsAsync(int[] ids)
+ {
+ return await _dal.DeleteByIdsAsync(ids);
+ }
+
+ #endregion
+
+ #region 获取缓存的所有数据==========================================================
+
+ ///
+ /// 获取缓存的所有数据
+ ///
+ ///
+ public async Task> GetCaChe()
+ {
+ return await _dal.GetCaChe();
+ }
+
+ ///
+ /// 更新cache
+ ///
+ public async Task> UpdateCaChe()
+ {
+ return await _dal.UpdateCaChe();
+ }
+
+ #endregion
+
+ #region 重写根据条件查询分页数据
+ ///
+ /// 重写根据条件查询分页数据
+ ///
+ /// 判断集合
+ /// 排序方式
+ /// 当前页面索引
+ /// 分布大小
+ ///
+ /// 是否使用WITH(NOLOCK)
+ ///
+ public new async Task> QueryPageAsync(Expression> predicate,
+ Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
+ int pageSize = 20, bool blUseNoLock = false)
+ {
+ return await _dal.QueryPageAsync(predicate, orderByExpression, orderByType, pageIndex, pageSize, blUseNoLock);
+ }
+ #endregion
+
+ }
+}
diff --git a/CoreCms.Net.Web.Admin/Controllers/User/CoreCmsUserBlacklistController.cs b/CoreCms.Net.Web.Admin/Controllers/User/CoreCmsUserBlacklistController.cs
new file mode 100644
index 0000000..c7a467a
--- /dev/null
+++ b/CoreCms.Net.Web.Admin/Controllers/User/CoreCmsUserBlacklistController.cs
@@ -0,0 +1,551 @@
+/***********************************************************************
+ * Project: CoreCms
+ * ProjectName: 核心内容管理系统
+ * Web: https://www.corecms.net
+ * Author: 大灰灰
+ * Email: jianweie@163.com
+ * CreateTime: 2025/9/9 15:26:08
+ * Description: 暂无
+ ***********************************************************************/
+
+
+using System;
+using System.ComponentModel;
+using System.IO;
+using System.Linq;
+using System.Linq.Expressions;
+using System.Threading.Tasks;
+using CoreCms.Net.Configuration;
+using CoreCms.Net.Model.Entities;
+using CoreCms.Net.Model.Entities.Expression;
+using CoreCms.Net.Model.FromBody;
+using CoreCms.Net.Model.ViewModels.UI;
+using CoreCms.Net.Filter;
+using CoreCms.Net.Loging;
+using CoreCms.Net.IServices;
+using CoreCms.Net.Utility.Helper;
+using CoreCms.Net.Utility.Extensions;
+using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.AspNetCore.Mvc;
+using NPOI.HSSF.UserModel;
+using SqlSugar;
+using CoreCms.Net.Web.Admin.Infrastructure;
+
+namespace CoreCms.Net.Web.Admin.Controllers
+{
+ ///
+ ///
+ ///
+ [Description("")]
+ [Route("api/[controller]/[action]")]
+ [ApiController]
+ [RequiredErrorForAdmin]
+ [Authorize]
+ public class CoreCmsUserBlacklistController : ControllerBase
+ {
+ private readonly IWebHostEnvironment _webHostEnvironment;
+ private readonly ICoreCmsUserBlacklistServices _CoreCmsUserBlacklistServices;
+
+ ///
+ /// 构造函数
+ ///
+ public CoreCmsUserBlacklistController(IWebHostEnvironment webHostEnvironment
+ ,ICoreCmsUserBlacklistServices CoreCmsUserBlacklistServices
+ )
+ {
+ _webHostEnvironment = webHostEnvironment;
+ _CoreCmsUserBlacklistServices = CoreCmsUserBlacklistServices;
+ }
+
+ #region 获取列表============================================================
+ // POST: Api/CoreCmsUserBlacklist/GetPageList
+ ///
+ /// 获取列表
+ ///
+ ///
+ [HttpPost]
+ [Description("获取列表")]
+ public async Task GetPageList()
+ {
+ var jm = new AdminUiCallBack();
+ var pageCurrent = Request.Form["page"].FirstOrDefault().ObjectToInt(1);
+ var pageSize = Request.Form["limit"].FirstOrDefault().ObjectToInt(30);
+ var where = PredicateBuilder.True();
+ //获取排序字段
+ var orderField = Request.Form["orderField"].FirstOrDefault();
+
+ Expression> orderEx = orderField switch
+ {
+ "Id" => p => p.Id,"UserId" => p => p.UserId,"BlockedUserId" => p => p.BlockedUserId,"Reason" => p => p.Reason,"CreatedTime" => p => p.CreatedTime,
+ _ => p => p.Id
+ };
+
+ //设置排序方式
+ var orderDirection = Request.Form["orderDirection"].FirstOrDefault();
+ var orderBy = orderDirection switch
+ {
+ "asc" => OrderByType.Asc,
+ "desc" => OrderByType.Desc,
+ _ => OrderByType.Desc
+ };
+ //查询筛选
+
+ // bigint
+ var Id = Request.Form["Id"].FirstOrDefault().ObjectToInt(0);
+ if (Id > 0)
+ {
+ where = where.And(p => p.Id == Id);
+ }
+ //用户id int
+ var UserId = Request.Form["UserId"].FirstOrDefault().ObjectToInt(0);
+ if (UserId > 0)
+ {
+ where = where.And(p => p.UserId == UserId);
+ }
+ //拉黑用户id int
+ var BlockedUserId = Request.Form["BlockedUserId"].FirstOrDefault().ObjectToInt(0);
+ if (BlockedUserId > 0)
+ {
+ where = where.And(p => p.BlockedUserId == BlockedUserId);
+ }
+ //拉黑说明 nvarchar
+ var Reason = Request.Form["Reason"].FirstOrDefault();
+ if (!string.IsNullOrEmpty(Reason))
+ {
+ where = where.And(p => p.Reason.Contains(Reason));
+ }
+ //拉黑时间 datetime
+ var CreatedTime = Request.Form["CreatedTime"].FirstOrDefault();
+ if (!string.IsNullOrEmpty(CreatedTime))
+ {
+ if (CreatedTime.Contains("到"))
+ {
+ var dts = CreatedTime.Split("到");
+ var dtStart = dts[0].Trim().ObjectToDate();
+ where = where.And(p => p.CreatedTime > dtStart);
+ var dtEnd = dts[1].Trim().ObjectToDate();
+ where = where.And(p => p.CreatedTime < dtEnd);
+ }
+ else
+ {
+ var dt = CreatedTime.ObjectToDate();
+ where = where.And(p => p.CreatedTime > dt);
+ }
+ }
+ //获取数据
+ var list = await _CoreCmsUserBlacklistServices.QueryPageAsync(where, orderEx, orderBy, pageCurrent, pageSize, true);
+ //返回数据
+ jm.data = list;
+ jm.code = 0;
+ jm.count = list.TotalCount;
+ jm.msg = "数据调用成功!";
+ return jm;
+ }
+ #endregion
+
+ #region 首页数据============================================================
+ // POST: Api/CoreCmsUserBlacklist/GetIndex
+ ///
+ /// 首页数据
+ ///
+ ///
+ [HttpPost]
+ [Description("首页数据")]
+ public AdminUiCallBack GetIndex()
+ {
+ //返回数据
+ var jm = new AdminUiCallBack { code = 0 };
+ return jm;
+ }
+ #endregion
+
+ #region 创建数据============================================================
+ // POST: Api/CoreCmsUserBlacklist/GetCreate
+ ///
+ /// 创建数据
+ ///
+ ///
+ [HttpPost]
+ [Description("创建数据")]
+ public AdminUiCallBack GetCreate()
+ {
+ //返回数据
+ var jm = new AdminUiCallBack { code = 0 };
+ return jm;
+ }
+ #endregion
+
+ #region 创建提交============================================================
+ // POST: Api/CoreCmsUserBlacklist/DoCreate
+ ///
+ /// 创建提交
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Description("创建提交")]
+ public async Task DoCreate([FromBody]CoreCmsUserBlacklist entity)
+ {
+ var jm = await _CoreCmsUserBlacklistServices.InsertAsync(entity);
+ return jm;
+ }
+ #endregion
+
+ #region 编辑数据============================================================
+ // POST: Api/CoreCmsUserBlacklist/GetEdit
+ ///
+ /// 编辑数据
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Description("编辑数据")]
+ public async Task GetEdit([FromBody]FMIntId entity)
+ {
+ var jm = new AdminUiCallBack();
+
+ var model = await _CoreCmsUserBlacklistServices.QueryByIdAsync(entity.id, false);
+ if (model == null)
+ {
+ jm.msg = "不存在此信息";
+ return jm;
+ }
+ jm.code = 0;
+ jm.data = model;
+
+ return jm;
+ }
+ #endregion
+
+ #region 编辑提交============================================================
+ // POST: Api/CoreCmsUserBlacklist/Edit
+ ///
+ /// 编辑提交
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Description("编辑提交")]
+ public async Task DoEdit([FromBody]CoreCmsUserBlacklist entity)
+ {
+ var jm = await _CoreCmsUserBlacklistServices.UpdateAsync(entity);
+ return jm;
+ }
+ #endregion
+
+ #region 删除数据============================================================
+ // POST: Api/CoreCmsUserBlacklist/DoDelete/10
+ ///
+ /// 单选删除
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Description("单选删除")]
+ public async Task DoDelete([FromBody]FMIntId entity)
+ {
+ var jm = new AdminUiCallBack();
+
+ var model = await _CoreCmsUserBlacklistServices.ExistsAsync(p => p.Id == entity.id, true);
+ if (!model)
+ {
+ jm.msg = GlobalConstVars.DataisNo;
+ return jm;
+ }
+ jm = await _CoreCmsUserBlacklistServices.DeleteByIdAsync(entity.id);
+
+ return jm;
+ }
+ #endregion
+
+ #region 批量删除============================================================
+ // POST: Api/CoreCmsUserBlacklist/DoBatchDelete/10,11,20
+ ///
+ /// 批量删除
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Description("批量删除")]
+ public async Task DoBatchDelete([FromBody]FMArrayIntIds entity)
+ {
+ var jm = await _CoreCmsUserBlacklistServices.DeleteByIdsAsync(entity.id);
+ return jm;
+ }
+
+ #endregion
+
+ #region 预览数据============================================================
+ // POST: Api/CoreCmsUserBlacklist/GetDetails/10
+ ///
+ /// 预览数据
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Description("预览数据")]
+ public async Task GetDetails([FromBody]FMIntId entity)
+ {
+ var jm = new AdminUiCallBack();
+
+ var model = await _CoreCmsUserBlacklistServices.QueryByIdAsync(entity.id, false);
+ if (model == null)
+ {
+ jm.msg = "不存在此信息";
+ return jm;
+ }
+ jm.code = 0;
+ jm.data = model;
+
+ return jm;
+ }
+ #endregion
+
+ #region 选择导出============================================================
+ // POST: Api/CoreCmsUserBlacklist/SelectExportExcel/10
+ ///
+ /// 选择导出
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Description("选择导出")]
+ public async Task SelectExportExcel([FromBody]FMArrayIntIds entity)
+ {
+ var jm = new AdminUiCallBack();
+
+ //创建Excel文件的对象
+ var book = new HSSFWorkbook();
+ //添加一个sheet
+ var mySheet = book.CreateSheet("Sheet1");
+ //获取list数据
+ var listModel = await _CoreCmsUserBlacklistServices.QueryListByClauseAsync(p => entity.id.Contains(p.Id), p => p.Id, OrderByType.Asc, true);
+ //给sheet1添加第一行的头部标题
+ var headerRow = mySheet.CreateRow(0);
+ var headerStyle = ExcelHelper.GetHeaderStyle(book);
+
+ var cell0 = headerRow.CreateCell(0);
+ cell0.SetCellValue("");
+ cell0.CellStyle = headerStyle;
+ mySheet.SetColumnWidth(0, 10 * 256);
+
+ var cell1 = headerRow.CreateCell(1);
+ cell1.SetCellValue("用户id");
+ cell1.CellStyle = headerStyle;
+ mySheet.SetColumnWidth(1, 10 * 256);
+
+ var cell2 = headerRow.CreateCell(2);
+ cell2.SetCellValue("拉黑用户id");
+ cell2.CellStyle = headerStyle;
+ mySheet.SetColumnWidth(2, 10 * 256);
+
+ var cell3 = headerRow.CreateCell(3);
+ cell3.SetCellValue("拉黑说明");
+ cell3.CellStyle = headerStyle;
+ mySheet.SetColumnWidth(3, 10 * 256);
+
+ var cell4 = headerRow.CreateCell(4);
+ cell4.SetCellValue("拉黑时间");
+ cell4.CellStyle = headerStyle;
+ mySheet.SetColumnWidth(4, 10 * 256);
+
+ headerRow.Height = 30 * 20;
+ var commonCellStyle = ExcelHelper.GetCommonStyle(book);
+
+ //将数据逐步写入sheet1各个行
+ for (var i = 0; i < listModel.Count(); i++)
+ {
+ var rowTemp = mySheet.CreateRow(i + 1);
+
+ var rowTemp0 = rowTemp.CreateCell(0);
+ rowTemp0.SetCellValue(listModel[i].Id.ToString());
+ rowTemp0.CellStyle = commonCellStyle;
+
+ var rowTemp1 = rowTemp.CreateCell(1);
+ rowTemp1.SetCellValue(listModel[i].UserId.ToString());
+ rowTemp1.CellStyle = commonCellStyle;
+
+ var rowTemp2 = rowTemp.CreateCell(2);
+ rowTemp2.SetCellValue(listModel[i].BlockedUserId.ToString());
+ rowTemp2.CellStyle = commonCellStyle;
+
+ var rowTemp3 = rowTemp.CreateCell(3);
+ rowTemp3.SetCellValue(listModel[i].Reason.ToString());
+ rowTemp3.CellStyle = commonCellStyle;
+
+ var rowTemp4 = rowTemp.CreateCell(4);
+ rowTemp4.SetCellValue(listModel[i].CreatedTime.ToString());
+ rowTemp4.CellStyle = commonCellStyle;
+
+ }
+ // 导出excel
+ string webRootPath = _webHostEnvironment.WebRootPath;
+ string tpath = "/files/" + DateTime.Now.ToString("yyyy-MM-dd") + "/";
+ string fileName = DateTime.Now.ToString("yyyyMMddHHmmssfff") + "-CoreCmsUserBlacklist导出(选择结果).xls";
+ string filePath = webRootPath + tpath;
+ DirectoryInfo di = new DirectoryInfo(filePath);
+ if (!di.Exists)
+ {
+ di.Create();
+ }
+ FileStream fileHssf = new FileStream(filePath + fileName, FileMode.Create);
+ book.Write(fileHssf);
+ fileHssf.Close();
+
+ jm.code = 0;
+ jm.msg = GlobalConstVars.ExcelExportSuccess;
+ jm.data = tpath + fileName;
+
+ return jm;
+ }
+ #endregion
+
+ #region 查询导出============================================================
+ // POST: Api/CoreCmsUserBlacklist/QueryExportExcel/10
+ ///
+ /// 查询导出
+ ///
+ ///
+ [HttpPost]
+ [Description("查询导出")]
+ public async Task QueryExportExcel()
+ {
+ var jm = new AdminUiCallBack();
+
+ var where = PredicateBuilder.True();
+ //查询筛选
+
+ // bigint
+ var Id = Request.Form["Id"].FirstOrDefault().ObjectToInt(0);
+ if (Id > 0)
+ {
+ where = where.And(p => p.Id == Id);
+ }
+ //用户id int
+ var UserId = Request.Form["UserId"].FirstOrDefault().ObjectToInt(0);
+ if (UserId > 0)
+ {
+ where = where.And(p => p.UserId == UserId);
+ }
+ //拉黑用户id int
+ var BlockedUserId = Request.Form["BlockedUserId"].FirstOrDefault().ObjectToInt(0);
+ if (BlockedUserId > 0)
+ {
+ where = where.And(p => p.BlockedUserId == BlockedUserId);
+ }
+ //拉黑说明 nvarchar
+ var Reason = Request.Form["Reason"].FirstOrDefault();
+ if (!string.IsNullOrEmpty(Reason))
+ {
+ where = where.And(p => p.Reason.Contains(Reason));
+ }
+ //拉黑时间 datetime
+ var CreatedTime = Request.Form["CreatedTime"].FirstOrDefault();
+ if (!string.IsNullOrEmpty(CreatedTime))
+ {
+ var dt = CreatedTime.ObjectToDate();
+ where = where.And(p => p.CreatedTime > dt);
+ }
+ //获取数据
+ //创建Excel文件的对象
+ var book = new HSSFWorkbook();
+ //添加一个sheet
+ var mySheet = book.CreateSheet("Sheet1");
+ //获取list数据
+ var listModel = await _CoreCmsUserBlacklistServices.QueryListByClauseAsync(where, p => p.Id, OrderByType.Asc, true);
+ //给sheet1添加第一行的头部标题
+ var headerRow = mySheet.CreateRow(0);
+ var headerStyle = ExcelHelper.GetHeaderStyle(book);
+
+ var cell0 = headerRow.CreateCell(0);
+ cell0.SetCellValue("");
+ cell0.CellStyle = headerStyle;
+ mySheet.SetColumnWidth(0, 10 * 256);
+
+ var cell1 = headerRow.CreateCell(1);
+ cell1.SetCellValue("用户id");
+ cell1.CellStyle = headerStyle;
+ mySheet.SetColumnWidth(1, 10 * 256);
+
+ var cell2 = headerRow.CreateCell(2);
+ cell2.SetCellValue("拉黑用户id");
+ cell2.CellStyle = headerStyle;
+ mySheet.SetColumnWidth(2, 10 * 256);
+
+ var cell3 = headerRow.CreateCell(3);
+ cell3.SetCellValue("拉黑说明");
+ cell3.CellStyle = headerStyle;
+ mySheet.SetColumnWidth(3, 10 * 256);
+
+ var cell4 = headerRow.CreateCell(4);
+ cell4.SetCellValue("拉黑时间");
+ cell4.CellStyle = headerStyle;
+ mySheet.SetColumnWidth(4, 10 * 256);
+
+
+ headerRow.Height = 30 * 20;
+ var commonCellStyle = ExcelHelper.GetCommonStyle(book);
+
+ //将数据逐步写入sheet1各个行
+ for (var i = 0; i < listModel.Count; i++)
+ {
+ var rowTemp = mySheet.CreateRow(i + 1);
+
+
+ var rowTemp0 = rowTemp.CreateCell(0);
+ rowTemp0.SetCellValue(listModel[i].Id.ToString());
+ rowTemp0.CellStyle = commonCellStyle;
+
+
+
+ var rowTemp1 = rowTemp.CreateCell(1);
+ rowTemp1.SetCellValue(listModel[i].UserId.ToString());
+ rowTemp1.CellStyle = commonCellStyle;
+
+
+
+ var rowTemp2 = rowTemp.CreateCell(2);
+ rowTemp2.SetCellValue(listModel[i].BlockedUserId.ToString());
+ rowTemp2.CellStyle = commonCellStyle;
+
+
+
+ var rowTemp3 = rowTemp.CreateCell(3);
+ rowTemp3.SetCellValue(listModel[i].Reason.ToString());
+ rowTemp3.CellStyle = commonCellStyle;
+
+
+
+ var rowTemp4 = rowTemp.CreateCell(4);
+ rowTemp4.SetCellValue(listModel[i].CreatedTime.ToString());
+ rowTemp4.CellStyle = commonCellStyle;
+
+
+ }
+ // 写入到excel
+ string webRootPath = _webHostEnvironment.WebRootPath;
+ string tpath = "/files/" + DateTime.Now.ToString("yyyy-MM-dd") + "/";
+ string fileName = DateTime.Now.ToString("yyyyMMddHHmmssfff") + "-CoreCmsUserBlacklist导出(查询结果).xls";
+ string filePath = webRootPath + tpath;
+ DirectoryInfo di = new DirectoryInfo(filePath);
+ if (!di.Exists)
+ {
+ di.Create();
+ }
+ FileStream fileHssf = new FileStream(filePath + fileName, FileMode.Create);
+ book.Write(fileHssf);
+ fileHssf.Close();
+
+ jm.code = 0;
+ jm.msg = GlobalConstVars.ExcelExportSuccess;
+ jm.data = tpath + fileName;
+
+ return jm;
+ }
+ #endregion
+
+
+
+ }
+}
diff --git a/CoreCms.Net.Web.Admin/Doc.xml b/CoreCms.Net.Web.Admin/Doc.xml
index 9c07e23..07ef07d 100644
--- a/CoreCms.Net.Web.Admin/Doc.xml
+++ b/CoreCms.Net.Web.Admin/Doc.xml
@@ -4951,6 +4951,89 @@
+
+
+
+
+
+
+
+ 构造函数
+
+
+
+
+ 获取列表
+
+
+
+
+
+ 首页数据
+
+
+
+
+
+ 创建数据
+
+
+
+
+
+ 创建提交
+
+
+
+
+
+
+ 编辑数据
+
+
+
+
+
+
+ 编辑提交
+
+
+
+
+
+
+ 单选删除
+
+
+
+
+
+
+ 批量删除
+
+
+
+
+
+
+ 预览数据
+
+
+
+
+
+
+ 选择导出
+
+
+
+
+
+
+ 查询导出
+
+
+
用户表
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/user/corecmsuserblacklist/create.html b/CoreCms.Net.Web.Admin/wwwroot/views/user/corecmsuserblacklist/create.html
new file mode 100644
index 0000000..63f4fb8
--- /dev/null
+++ b/CoreCms.Net.Web.Admin/wwwroot/views/user/corecmsuserblacklist/create.html
@@ -0,0 +1,71 @@
+
+
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/user/corecmsuserblacklist/details.html b/CoreCms.Net.Web.Admin/wwwroot/views/user/corecmsuserblacklist/details.html
new file mode 100644
index 0000000..7dab6c6
--- /dev/null
+++ b/CoreCms.Net.Web.Admin/wwwroot/views/user/corecmsuserblacklist/details.html
@@ -0,0 +1,72 @@
+
+
\ No newline at end of file
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/user/corecmsuserblacklist/edit.html b/CoreCms.Net.Web.Admin/wwwroot/views/user/corecmsuserblacklist/edit.html
new file mode 100644
index 0000000..65e4f91
--- /dev/null
+++ b/CoreCms.Net.Web.Admin/wwwroot/views/user/corecmsuserblacklist/edit.html
@@ -0,0 +1,71 @@
+
+
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/user/corecmsuserblacklist/index.html b/CoreCms.Net.Web.Admin/wwwroot/views/user/corecmsuserblacklist/index.html
new file mode 100644
index 0000000..86c38db
--- /dev/null
+++ b/CoreCms.Net.Web.Admin/wwwroot/views/user/corecmsuserblacklist/index.html
@@ -0,0 +1,380 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CoreCms.Net.Web.WebApi/Controllers/SQController.cs b/CoreCms.Net.Web.WebApi/Controllers/SQController.cs
new file mode 100644
index 0000000..0f81185
--- /dev/null
+++ b/CoreCms.Net.Web.WebApi/Controllers/SQController.cs
@@ -0,0 +1,162 @@
+using AutoMapper;
+
+using CoreCms.Net.Auth.HttpContextUser;
+using CoreCms.Net.IRepository.UnitOfWork;
+using CoreCms.Net.IServices;
+using CoreCms.Net.Model.Entities;
+using CoreCms.Net.Model.Entities.Expression;
+using CoreCms.Net.Model.ViewModels.SQ;
+using CoreCms.Net.Model.ViewModels.UI;
+
+using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+
+using SqlSugar;
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace CoreCms.Net.Web.WebApi.Controllers;
+
+///
+/// 预约接口
+///
+[Route("api/[controller]/[action]")]
+[ApiController]
+public class SQController : ControllerBase
+{
+ private readonly IWebHostEnvironment _webHostEnvironment;
+ private readonly ISQReservationsServices _SQReservationsServices;
+ private readonly ISQRoomsServices _SQRoomsServices;
+ private readonly ISysDictionaryDataServices _sysDictionaryDataServices;
+ private readonly ISysDictionaryServices _sysDictionaryServices;
+ private readonly ISQReservationParticipantsServices _SQReservationParticipantsServices;
+ private readonly IMapper _mapper;
+ private readonly ICoreCmsUserServices _userServices;
+ private readonly IHttpContextUser _user;
+ private readonly SqlSugarScope _dbBase;
+
+ ///
+ /// 构造函数
+ ///
+ public SQController(IWebHostEnvironment webHostEnvironment
+ , ISQReservationsServices SQReservationsServices
+ , ISQRoomsServices SQRoomsServices
+ , ISysDictionaryServices sysDictionaryServices
+ , ISysDictionaryDataServices sysDictionaryDataServices
+ , ISQReservationParticipantsServices sQReservationParticipantsServices
+ , IMapper mapper
+ , ICoreCmsUserServices userServices
+ , IHttpContextUser user
+ , IUnitOfWork unitOfWork
+ )
+ {
+ _webHostEnvironment = webHostEnvironment;
+ _SQReservationsServices = SQReservationsServices;
+ _SQRoomsServices = SQRoomsServices;
+ _sysDictionaryServices = sysDictionaryServices;
+ _sysDictionaryDataServices = sysDictionaryDataServices;
+ _SQReservationParticipantsServices = sQReservationParticipantsServices;
+ _mapper = mapper;
+ _userServices = userServices;
+ _user = user;
+ _dbBase = unitOfWork.GetDbClient();
+ }
+
+ ///
+ ///
+ ///
+ /// 1发起者,0参与者
+ ///
+ [HttpGet]
+ [Authorize]
+ public async Task GetMyReservation([FromQuery] int type = 0)
+ {
+ var userId = _user.ID;
+
+ //var list = await _SQReservationsServices.GetMyReservation(userId);
+ var list = await _dbBase.Ado.SqlQueryAsync($"select r.*, p.status pstatus,p.join_time, p.quit_time ,p.is_refund from SQReservationParticipants p inner join SQReservations r on p.reservation_id=r.id where p.user_id={userId} and p.role={type}");
+ //SQReservationsMyDto
+ return new WebApiDto()
+ {
+ Data = list,
+ Code = 0,
+ };
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ [HttpGet]
+ public async Task GetReservationList([FromQuery] int pageIndex, [FromQuery] int pageSize = 20)
+ {
+ var userId = _user.ID;
+ var now = DateTime.Now;
+
+ var where = PredicateBuilder.True();
+ where = where.And(it => it.end_time > now);
+ where = where.And(it => it.status < 2);
+ var list = await _SQReservationsServices.QueryPageAsync(where, it => it.start_time, OrderByType.Asc, pageIndex, pageSize, true);
+ var pageList = _mapper.Map>(list);
+ var rIds = list.Select(it => it.id).ToList();
+ if (rIds != null && rIds.Count > 0)
+ {
+ var participants = await _SQReservationParticipantsServices.QueryListByClauseAsync(it => rIds.Contains(it.reservation_id), "", true);
+ List userList = new List();
+ if (participants != null && participants.Count > 0)
+ {
+ var userIds = participants.Select(it => it.user_id).ToList();
+ userList = await _userServices.QueryListByClauseAsync(it => userIds.Contains(it.id), "", true);
+ }
+ foreach (var item in pageList)
+ {
+ var temp = participants.Where(it => it.reservation_id == item.id).OrderBy(it => it.role).ThenBy(it => it.status).ToList();
+ var dto = _mapper.Map>(temp);
+ if (userList != null && userList.Count > 0)
+ {
+ foreach (var p in dto)
+ {
+ var u = userList.FirstOrDefault(it => it.id == p.user_id);
+ if (u != null)
+ {
+ p.UserName = u.nickName;
+ p.AvatarImage = u.avatarImage;
+ }
+ }
+
+ }
+ item.Participants = dto;
+ }
+ }
+ return new WebApiDto()
+ {
+ Data = pageList,
+ Code = 0,
+ Msg = "ok",
+ };
+
+ }
+
+
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ [HttpGet]
+ public async Task GetReservationDetail([FromQuery] int id)
+ {
+ return new WebApiDto()
+ {
+
+ };
+ }
+}
diff --git a/CoreCms.Net.Web.WebApi/Controllers/UserController.cs b/CoreCms.Net.Web.WebApi/Controllers/UserController.cs
index 6d02a3f..548366f 100644
--- a/CoreCms.Net.Web.WebApi/Controllers/UserController.cs
+++ b/CoreCms.Net.Web.WebApi/Controllers/UserController.cs
@@ -1863,7 +1863,12 @@ namespace CoreCms.Net.Web.WebApi.Controllers
sex = entity.sex
},
p => p.id == _user.ID);
-
+ await _userWeChatInfoServices.UpdateAsync(p => new CoreCmsUserWeChatInfo()
+ {
+ nickName = entity.nickName,
+ avatar = entity.avatar,
+ gender = entity.sex
+ }, p => p.userId == _user.ID);
jm.status = up;
jm.msg = jm.status ? "资料保存成功" : "资料保存失败";
diff --git a/CoreCms.Net.Web.WebApi/Doc.xml b/CoreCms.Net.Web.WebApi/Doc.xml
index 1962cf7..01fde95 100644
--- a/CoreCms.Net.Web.WebApi/Doc.xml
+++ b/CoreCms.Net.Web.WebApi/Doc.xml
@@ -757,6 +757,38 @@
+
+
+ 预约接口
+
+
+
+
+ 构造函数
+
+
+
+
+
+
+ 1发起者,0参与者
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
门店调用接口数据
diff --git a/CoreCms.Net.Web.WebApi/Program.cs b/CoreCms.Net.Web.WebApi/Program.cs
index fb2467e..6c3f734 100644
--- a/CoreCms.Net.Web.WebApi/Program.cs
+++ b/CoreCms.Net.Web.WebApi/Program.cs
@@ -10,6 +10,7 @@ using CoreCms.Net.Filter;
using CoreCms.Net.Loging;
using CoreCms.Net.Mapping;
using CoreCms.Net.Middlewares;
+using CoreCms.Net.Model.ViewModels.SQ;
using CoreCms.Net.Swagger;
using CoreCms.Net.Task;
using CoreCms.Net.Web.WebApi.Infrastructure;
@@ -52,7 +53,8 @@ builder.Services.AddCorsSetup();
//session֧(sessioncacheд洢)
builder.Services.AddSession();
// AutoMapper֧
-builder.Services.AddAutoMapper(typeof(AutoMapperConfiguration));
+// AutoMapper֧
+builder.Services.AddAutoMapper(typeof(AutoMapperConfiguration).Assembly, typeof(SQReservationParticipantsDto).Assembly);
//MediatRֻҪעһ,ͬĿ¾ͲҪע
builder.Services.AddMediatR(cfg => cfg.RegisterServicesFromAssembly(typeof(TextMessageEventCommand).Assembly));