From 27d5ade7f422c925c0aa3cc1730c9a8461b349d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?old=E6=98=93?= <156663459@qq.com> Date: Tue, 10 Oct 2023 18:15:27 +0800 Subject: [PATCH] bug xied --- .../Front/EnrollMentPlansController.cs | 4 +-- .../Front/MyHistoryInfoController.cs | 5 ++-- New_College.Api/Startup.cs | 26 +++---------------- 3 files changed, 8 insertions(+), 27 deletions(-) diff --git a/New_College.Api/Controllers/Front/EnrollMentPlansController.cs b/New_College.Api/Controllers/Front/EnrollMentPlansController.cs index 6e7b9f2..8514d06 100644 --- a/New_College.Api/Controllers/Front/EnrollMentPlansController.cs +++ b/New_College.Api/Controllers/Front/EnrollMentPlansController.cs @@ -46,8 +46,8 @@ namespace New_College.Api.Controllers.Front Expression> whereexp = Expressionable.Create() //创建表达式 .And(c => c.Location == request.Location) .And(c => c.Years == request.Years) - .AndIF(!string.IsNullOrEmpty(request.UniversityName), w => w.UniversityName.Contains(request.UniversityName)) - .AndIF(!string.IsNullOrEmpty(request.MajorName), w => w.Major.Contains(request.MajorName)).ToExpression(); + .AndIF(!string.IsNullOrEmpty(request.UniversityName), w =>SqlFunc.Contains(w.UniversityName, request.UniversityName)) + .AndIF(!string.IsNullOrEmpty(request.MajorName), w => SqlFunc.Contains(w.Major, request.MajorName)).ToExpression(); var pageModel = await this.d_PlanMajorDesc.QueryPage(whereexp, request.PageIndex, request.PageSize); diff --git a/New_College.Api/Controllers/Front/MyHistoryInfoController.cs b/New_College.Api/Controllers/Front/MyHistoryInfoController.cs index ed9e84f..20f30dd 100644 --- a/New_College.Api/Controllers/Front/MyHistoryInfoController.cs +++ b/New_College.Api/Controllers/Front/MyHistoryInfoController.cs @@ -7,6 +7,7 @@ using Microsoft.AspNetCore.Mvc; using New_College.IServices; using New_College.Model; using New_College.Model.ViewModels.Result; +using SqlSugar; namespace New_College.Api.Controllers.Front { @@ -37,11 +38,11 @@ namespace New_College.Api.Controllers.Front var response = new List(); try { - var query = await _MyHistory.Query(e => e.UId == CustomerId); + var query = await _MyHistory.Query(e => e.CustomerId == CustomerId); if (query.Any()) { var uids = query.Select(s => s.UId).ToList(); - var universitysinfo = await this._UniversityServices.Query(q => uids.Contains(q.Id)); + var universitysinfo = await this._UniversityServices.Query(q =>SqlFunc.ContainsArray(uids,q.Id)); response = universitysinfo.Select(s => new MyHistoryResponse() { AreaName = s.Area_Name, diff --git a/New_College.Api/Startup.cs b/New_College.Api/Startup.cs index 1b61a29..d92f0a7 100644 --- a/New_College.Api/Startup.cs +++ b/New_College.Api/Startup.cs @@ -64,27 +64,7 @@ namespace New_College AliYunOssConfig.bucket = Appsettings.app(new string[] { "AliYunOss", "bucket" }).ObjToString(); AliYunOssConfig.endpoint = Appsettings.app(new string[] { "AliYunOss", "endpoint" }).ObjToString(); - ////微信app支付 - //WeiXinPayConfig.NotifyUrl= Appsettings.app(new string[] { "WeChatPay", "NotifyUrl" }).ObjToString(); - //WeiXinPayConfig.APP_ID= Appsettings.app(new string[] { "WeChatPay", "AppId" }).ObjToString(); - //WeiXinPayConfig.MCHID= Appsettings.app(new string[] { "WeChatPay", "MchId" }).ObjToString(); - ////支付宝app支付 - //AliPayConfig.APP_ID = Appsettings.app(new string[] { "Alipay", "AppId" }).ObjToString(); - //AliPayConfig.APP_PRIVATE_KEY = Appsettings.app(new string[] { "Alipay", "AppPrivateKey" }).ObjToString(); - //AliPayConfig.ALIPAY_PUBLIC_KEY = Appsettings.app(new string[] { "Alipay", "AlipayPublicKey" }).ObjToString(); - //AliPayConfig.CHARSET = Appsettings.app(new string[] { "Alipay", "CHARSET" }).ObjToString(); - //AliPayConfig.NotifyUrl = Appsettings.app(new string[] { "Alipay", "NotifyUrl" }).ObjToString(); - //支付信息传入 - //PayInfoQuery.CreateIp= Appsettings.app(new string[] { "PayInfoQuery", "CreateIp" }).ObjToString(); - //PayInfoQuery.ApiUrl= Appsettings.app(new string[] { "PayInfoQuery", "ApiUrl" }).ObjToString(); - - //支付注入 - //services.AddAlipay(); - //services.AddWeChatPay(); - - //services.Configure(Configuration.GetSection("WeChatPay")); - //services.Configure(Configuration.GetSection("Alipay")); - + services.AddMemoryCacheSetup(); @@ -201,7 +181,7 @@ namespace New_College // 开启异常中间件,要放到最后 //app.UseExceptionHandlerMidd(); // 性能分析 - app.UseMiniProfiler(); + //app.UseMiniProfiler(); // 用户访问记录 app.UseRecordAccessLogsMildd(); @@ -215,7 +195,7 @@ namespace New_College }); // 生成种子数据 - app.UseSeedDataMildd(myContext, Env.WebRootPath); + // app.UseSeedDataMildd(myContext, Env.WebRootPath); // 开启QuartzNetJob调度服务 app.UseQuartzJobMildd(tasksQzServices, schedulerCenter); //服务注册