feat:bug fixed
parent
d11ea7a4e7
commit
bba933cf62
|
|
@ -2,6 +2,7 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using New_College.IServices;
|
||||
|
|
@ -105,6 +106,23 @@ namespace New_College.Api.Controllers.Back
|
|||
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[AllowAnonymous]
|
||||
public async Task<bool> Init([FromQuery] string key)
|
||||
{
|
||||
if (key == "brapuk6fon0wachiMlth2t3lb4a0h7ji")
|
||||
{
|
||||
await d_UserSettingBase.UpdateBaseInit();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据用户是否为Vip获取相应权限
|
||||
/// </summary>
|
||||
|
|
@ -117,6 +135,27 @@ namespace New_College.Api.Controllers.Back
|
|||
var custom = await _CustomerInfoServices.Query(c => c.Id == query.CustomerId);
|
||||
if (custom.Any())
|
||||
{
|
||||
var tellist = SHanDongTel.Tel.Split("|").ToList();
|
||||
|
||||
if (tellist.Contains(custom.FirstOrDefault().Phone))
|
||||
{
|
||||
return new VipPowerRolesViewsDTO()
|
||||
{
|
||||
IsVip = true,
|
||||
minProRole = new MinProRole()
|
||||
{
|
||||
ScoreCount = 99,
|
||||
SearchCount = 99,
|
||||
ShowCount = 99
|
||||
},
|
||||
pcRole = new PCRole()
|
||||
{
|
||||
ScoreCount = 99,
|
||||
SearchCount = 99,
|
||||
ShowCount = 99
|
||||
}
|
||||
};
|
||||
}
|
||||
var isverfiy = await d_UserSettingBase.Query(c => c.CustomerId == query.CustomerId);
|
||||
if (!isverfiy.Any())
|
||||
{
|
||||
|
|
@ -135,7 +174,7 @@ namespace New_College.Api.Controllers.Back
|
|||
{
|
||||
ScoreCount = c.ScoreCount,
|
||||
SearchCount = c.SearchCount,
|
||||
ShowCount=c.ShowCount
|
||||
ShowCount = c.ShowCount
|
||||
}).FirstOrDefault();
|
||||
}
|
||||
else
|
||||
|
|
@ -145,7 +184,7 @@ namespace New_College.Api.Controllers.Back
|
|||
{
|
||||
ScoreCount = 3,
|
||||
SearchCount = 10,
|
||||
ShowCount=10
|
||||
ShowCount = 10
|
||||
};
|
||||
response.minProRole = new MinProRole()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -108,6 +108,13 @@
|
|||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:New_College.Api.Controllers.Back.VipCardController.Init(System.String)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="key"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:New_College.Api.Controllers.Back.VipCardController.CheckRoles(New_College.Model.ViewModels.IdQuery)">
|
||||
<summary>
|
||||
根据用户是否为Vip获取相应权限
|
||||
|
|
|
|||
|
|
@ -69,6 +69,8 @@ namespace New_College
|
|||
WeixinConfig.SerialNumber = Appsettings.app(new string[] { "WeChatPay", "SerialNumber" }).ObjToString();
|
||||
WeixinConfig.PrivateKey = Appsettings.app(new string[] { "WeChatPay", "PrivateKey" }).ObjToString();
|
||||
|
||||
SHanDongTel.Tel = Appsettings.app(new string[] { "SHanDongTel", "Tel" });
|
||||
|
||||
//阿里云oss配置
|
||||
AliYunOssConfig.wendpoint = Appsettings.app(new string[] { "AliYunOss", "wendpoint" }).ObjToString();
|
||||
AliYunOssConfig.accessKeyId = Appsettings.app(new string[] { "AliYunOss", "accessKeyId" }).ObjToString();
|
||||
|
|
@ -250,7 +252,7 @@ namespace New_College
|
|||
});
|
||||
|
||||
// 生成种子数据
|
||||
// app.UseSeedDataMildd(myContext, Env.WebRootPath);
|
||||
// app.UseSeedDataMildd(myContext, Env.WebRootPath);
|
||||
// 开启QuartzNetJob调度服务
|
||||
app.UseQuartzJobMildd(tasksQzServices, schedulerCenter);
|
||||
//服务注册
|
||||
|
|
|
|||
|
|
@ -248,6 +248,10 @@
|
|||
"ThridConfig": {
|
||||
"secretKey": "01eb9ee95ba00e440ece83f904ef9640",
|
||||
"Url": "http://api.carrerwebapi.com/api/oauth/SyncUpdateStudentInfo"
|
||||
},
|
||||
"SHanDongTel": {
|
||||
"Tel": "15662627992|18724728603|17362186261|15264182912"
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -244,5 +244,9 @@
|
|||
"NotifyUrl": "https://zytb.ycymedu.com/api/front/WeixinPay/PayNotify",
|
||||
"PrivateKey": "cert/apiclient_cert.p12", //(新)证书私钥
|
||||
"SerialNumber": "1B304596B953D156B37863FF52FCAE40B458C9F2" //(新)证书序列号
|
||||
},
|
||||
"SHanDongTel": {
|
||||
"Tel": "15662627992|18724728603|17362186261|15264182912"
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,18 @@
|
|||
|
||||
public static string Url { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static class SHanDongTel
|
||||
{
|
||||
public static string Tel { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public static class WeixinConfig
|
||||
{
|
||||
/// <summary>
|
||||
|
|
@ -46,6 +58,7 @@
|
|||
/// </summary>
|
||||
public static string NotifyUrl { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -17,19 +17,19 @@ namespace New_College.Common
|
|||
/// <returns></returns>
|
||||
public static int GetPlanPercentage(int LowScore, int requestScore)
|
||||
{
|
||||
int minscore = requestScore - 60;//最小
|
||||
int constscore = requestScore;//中位数
|
||||
int maxscore = requestScore + 15;//最大
|
||||
//int minscore = requestScore - 60;//最小
|
||||
//int constscore = requestScore;//中位数
|
||||
//int maxscore = requestScore + 15;//最大
|
||||
int percentage = 0;
|
||||
if (LowScore >= requestScore - 26 && LowScore <= minscore)
|
||||
if (LowScore >= requestScore - 60 && LowScore <= requestScore - 26)
|
||||
{
|
||||
percentage = new Random().Next(81, 99);
|
||||
}
|
||||
if (LowScore >= requestScore - 1 && LowScore <= requestScore - 26)
|
||||
if (LowScore <= requestScore - 1 && LowScore >= requestScore - 26)
|
||||
{
|
||||
percentage = new Random().Next(31, 80);
|
||||
}
|
||||
if (LowScore >= requestScore && LowScore <= maxscore)
|
||||
if (LowScore >= requestScore && LowScore <= requestScore + 15)
|
||||
{
|
||||
percentage = new Random().Next(1, 30);
|
||||
}
|
||||
|
|
@ -44,12 +44,12 @@ namespace New_College.Common
|
|||
/// <returns></returns>
|
||||
public static int GetPlanScore(int LowScore, int requestScore)
|
||||
{
|
||||
int minscore = requestScore - 60;//最小
|
||||
// int constscore = requestScore;//中位数
|
||||
int maxscore = requestScore + 15;//最大
|
||||
//int minscore = requestScore - 60;//最小
|
||||
// // int constscore = requestScore;//中位数
|
||||
//int maxscore = requestScore + 15;//最大
|
||||
int type = 0;
|
||||
// int type = LowScore <= minscore ? 0 : minscore < LowScore && LowScore <= constscore ? 1 : LowScore > constscore && LowScore <= maxscore ? 2 : 0;
|
||||
if (LowScore >= requestScore - 26 && LowScore <= minscore)
|
||||
if (LowScore >= requestScore - 60 && LowScore <= requestScore - 26)
|
||||
{
|
||||
type = 0;
|
||||
}
|
||||
|
|
@ -57,7 +57,7 @@ namespace New_College.Common
|
|||
{
|
||||
type = 1;
|
||||
}
|
||||
if (LowScore >= requestScore && LowScore <= maxscore)
|
||||
if (LowScore >= requestScore && LowScore <= requestScore + 15)
|
||||
{
|
||||
type = 2;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,59 +20,66 @@ namespace New_College.Common
|
|||
/// <returns></returns>
|
||||
public static string UniversityCodeConvertRulesMap(string code)
|
||||
{
|
||||
if (string.IsNullOrEmpty(code))
|
||||
try
|
||||
{
|
||||
return code;
|
||||
if (string.IsNullOrEmpty(code) || code.Length < 4)
|
||||
{
|
||||
return code;
|
||||
}
|
||||
int strleft = int.Parse(code.Substring(0, 2));
|
||||
string strright = code.Substring(2, code.Length - 2);
|
||||
string codestr = string.Empty;
|
||||
switch (strleft)
|
||||
{
|
||||
case 10:
|
||||
codestr = "A";
|
||||
break;
|
||||
case 11:
|
||||
codestr = "B";
|
||||
break;
|
||||
case 12:
|
||||
codestr = "C";
|
||||
break;
|
||||
case 13:
|
||||
codestr = "D";
|
||||
break;
|
||||
case 14:
|
||||
codestr = "E";
|
||||
break;
|
||||
case 15:
|
||||
codestr = "T";
|
||||
break;
|
||||
case 16:
|
||||
codestr = "F";
|
||||
break;
|
||||
case 18:
|
||||
codestr = "G";
|
||||
break;
|
||||
case 19:
|
||||
codestr = "H";
|
||||
break;
|
||||
case 50:
|
||||
codestr = "K";
|
||||
break;
|
||||
case 51:
|
||||
codestr = "M";
|
||||
break;
|
||||
case 81:
|
||||
codestr = "N";
|
||||
break;
|
||||
case 91:
|
||||
codestr = "P";
|
||||
break;
|
||||
default:
|
||||
codestr = strleft.ToString();
|
||||
break;
|
||||
}
|
||||
return codestr + strright;
|
||||
}
|
||||
int strleft = int.Parse(code.Substring(0, 2));
|
||||
string strright = code.Substring(2, code.Length-2);
|
||||
string codestr = string.Empty;
|
||||
switch (strleft)
|
||||
catch (Exception ex)
|
||||
{
|
||||
case 10:
|
||||
codestr = "A";
|
||||
break;
|
||||
case 11:
|
||||
codestr = "B";
|
||||
break;
|
||||
case 12:
|
||||
codestr = "C";
|
||||
break;
|
||||
case 13:
|
||||
codestr = "D";
|
||||
break;
|
||||
case 14:
|
||||
codestr = "E";
|
||||
break;
|
||||
case 15:
|
||||
codestr = "T";
|
||||
break;
|
||||
case 16:
|
||||
codestr = "F";
|
||||
break;
|
||||
case 18:
|
||||
codestr = "G";
|
||||
break;
|
||||
case 19:
|
||||
codestr = "H";
|
||||
break;
|
||||
case 50:
|
||||
codestr = "K";
|
||||
break;
|
||||
case 51:
|
||||
codestr = "M";
|
||||
break;
|
||||
case 81:
|
||||
codestr = "N";
|
||||
break;
|
||||
case 91:
|
||||
codestr = "P";
|
||||
break;
|
||||
default:
|
||||
codestr = strleft.ToString();
|
||||
break;
|
||||
return ex.Message;
|
||||
}
|
||||
return codestr + strright;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ namespace New_College.Services
|
|||
.AndIF(!string.IsNullOrWhiteSpace(request.Ownership), c => c.Ownership == request.Ownership)
|
||||
.AndIF(!string.IsNullOrWhiteSpace(request.Nature), c => SqlFunc.ContainsArray(NatureNames, c.Nature))
|
||||
.AndIF(universityarry.Any(), c => SqlFunc.ContainsArray(universityarry, c.UniversityName))
|
||||
.AndIF(request.EndScore > endscore || request.StartScore < startscore, c => SqlFunc.Between(c._23Score, request.StartScore, request.EndScore))
|
||||
.AndIF(request.EndScore > request.StartScore, c => SqlFunc.Between(c._23Score, request.StartScore, request.EndScore))
|
||||
.ToExpression();
|
||||
var querylist = await this.sNeedDataInfoServices.Query(expression3);
|
||||
|
||||
|
|
@ -286,10 +286,10 @@ namespace New_College.Services
|
|||
});
|
||||
return new AIGOPageModel<AIGOResponse>()
|
||||
{
|
||||
data = responselist,
|
||||
c = responselist.Where(c => c.Type == 2).Count(),
|
||||
w = responselist.Where(c => c.Type == 1).Count(),
|
||||
b = responselist.Where(c => c.Type == 0).Count(),
|
||||
data = responselist.Where(e => e.planCount > 0).ToList(),
|
||||
c = responselist.Where(c => c.Type == 2 && c.planCount > 0).Count(),
|
||||
w = responselist.Where(c => c.Type == 1 && c.planCount > 0).Count(),
|
||||
b = responselist.Where(c => c.Type == 0 && c.planCount > 0).Count(),
|
||||
dataCount = query.dataCount,
|
||||
page = query.page,
|
||||
pageCount = query.pageCount,
|
||||
|
|
|
|||
|
|
@ -94,17 +94,15 @@ namespace New_College.Services
|
|||
var modelslist = new List<D_UserSettingBase>();
|
||||
var customerlist = await _CustomerInfoRepository.Query(c => c.IsDelete == false);
|
||||
var userbaselist = await _userSettingBaseRepository.Query(c => c.IsDelete == false);
|
||||
customerlist.ForEach(async c =>
|
||||
customerlist.ForEach(c =>
|
||||
{
|
||||
var userbaseinfo = userbaselist.Where(e => e.CustomerId == c.Id);
|
||||
if (userbaselist.Any())
|
||||
userbaselist.Where(e => e.CustomerId == c.Id).ToList().ForEach(models =>
|
||||
{
|
||||
var models = userbaselist.FirstOrDefault();
|
||||
models.ScoreCount = c.IsVIP ? 10 : 3;
|
||||
models.SearchCount = c.IsVIP ? 9999 : 10;
|
||||
models.ShowCount = c.IsVIP ? 9999 : 10;
|
||||
modelslist.Add(models);
|
||||
}
|
||||
});
|
||||
});
|
||||
await _userSettingBaseRepository.UpdateAllBaseInfo(modelslist);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -616,6 +616,12 @@ namespace New_College.Services
|
|||
AcademicYear = item.AcademicYear,
|
||||
planItems = new List<PlanItem>()
|
||||
{
|
||||
new PlanItem() {
|
||||
PlanCount=int.Parse(item._23Count),
|
||||
RankLine=int.Parse(item._22ScoreLine),
|
||||
Scoreline=int.Parse(item._23Score),
|
||||
Year="2023"
|
||||
},
|
||||
new PlanItem() {
|
||||
PlanCount=int.Parse(item._22Count),
|
||||
RankLine=int.Parse(item._22ScoreLine),
|
||||
|
|
@ -1218,7 +1224,7 @@ namespace New_College.Services
|
|||
id = item.PlanMagorIds.First();
|
||||
}
|
||||
}
|
||||
var descinfo = await t_TbSNeedDataInfoRepository.Query(x => PlanIds.Contains(x.ID));
|
||||
var descinfo = await t_TbSNeedDataInfoRepository.Query(x => PlanIds.Contains(x.ID));
|
||||
var universityids = query.details.Select(x => x.UniversityId).ToList();
|
||||
var universityinfo = await d_UniversityRepository.Query(x => universityids.Contains(x.Id) && x.IsDelete == false, "Rank asc");
|
||||
int sort = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue