develop
old易 2023-10-10 18:15:27 +08:00
parent 02d6692244
commit 27d5ade7f4
3 changed files with 8 additions and 27 deletions

View File

@ -46,8 +46,8 @@ namespace New_College.Api.Controllers.Front
Expression<Func<D_PlanMajorDesc, bool>> whereexp = Expressionable.Create<D_PlanMajorDesc>() //创建表达式
.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);

View File

@ -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<MyHistoryResponse>();
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,

View File

@ -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<WeChatPayOptions>(Configuration.GetSection("WeChatPay"));
//services.Configure<AlipayOptions>(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);
//服务注册