diff --git a/New_College.Api/Controllers/Front/LibraryController.cs b/New_College.Api/Controllers/Front/LibraryController.cs
index 9512973..92e9711 100644
--- a/New_College.Api/Controllers/Front/LibraryController.cs
+++ b/New_College.Api/Controllers/Front/LibraryController.cs
@@ -531,9 +531,9 @@ namespace New_College.Api.Controllers.Front
///
///
[HttpGet]
- public async Task> GetRequestEnrollmentinproductionDetailResult([FromQuery] StringIdQuery query)
+ public MessageModel GetRequestEnrollmentinproductionDetailResult([FromQuery] StringIdQuery query)
{
- return await iD_LongIdMapServices.GetRequestEnrollmentinproductionDetailResult(query);
+ return iD_LongIdMapServices.GetRequestEnrollmentinproductionDetailResult(query);
}
diff --git a/New_College.Api/Controllers/OAuthController.cs b/New_College.Api/Controllers/OAuthController.cs
index 4530c5e..03c8759 100644
--- a/New_College.Api/Controllers/OAuthController.cs
+++ b/New_College.Api/Controllers/OAuthController.cs
@@ -33,37 +33,40 @@ namespace New_College.Controllers
///
///
///
- [Route("login")]
- public async Task> Login([FromQuery] ThridLoginRequestDto dto)
- {
- string token = string.Empty;
- if (dto == null)
- {
- return new MessageModel()
- {
- success = false,
- msg = "参数错误",
+ //[Route("login")]
+ //public async Task> Login([FromQuery] ThridLoginRequestDto dto)
+ //{
+ // string token = string.Empty;
+ // if (dto == null)
+ // {
+ // return new MessageModel()
+ // {
+ // success = false,
+ // msg = "参数错误",
- };
- }
- if (ThridConfig.secretKey != dto.secretKey)
- {
- return new MessageModel()
- {
- success = false,
- msg = "密钥错误",
- };
- }
- //首先判断是否存在账户|不存在则创建新的账户,存在则直接登录
+ // };
+ // }
+ // if (ThridConfig.secretKey != dto.secretKey)
+ // {
+ // return new MessageModel()
+ // {
+ // success = false,
+ // msg = "密钥错误",
+ // };
+ // }
+ // //首先判断是否存在账户|
+ // //不存在则创建新的账户|
+ // //存在则直接登录|
+
- return new MessageModel()
- {
- msg = "ok",
- success = true,
- response = token
- };
- }
+ // return new MessageModel()
+ // {
+ // msg = "ok",
+ // success = true,
+ // response = token
+ // };
+ //}
///
/// Oauth2验证回调
diff --git a/New_College.Api/New_College.Model.xml b/New_College.Api/New_College.Model.xml
index 7e83ba7..66ca357 100644
--- a/New_College.Api/New_College.Model.xml
+++ b/New_College.Api/New_College.Model.xml
@@ -3424,6 +3424,21 @@
退出重新登录时传此值
+
+
+ 状态:0、未启用,1、启用,2、禁用
+
+
+
+
+ 学生数据是否初始化(省份,选科等)
+
+
+
+
+ 是否为VIP
+
+
无权限
diff --git a/New_College.Api/New_College.xml b/New_College.Api/New_College.xml
index 6e9a77a..55b3f38 100644
--- a/New_College.Api/New_College.xml
+++ b/New_College.Api/New_College.xml
@@ -1382,13 +1382,6 @@
-
-
- 三方登录
-
-
-
-
Oauth2验证回调
diff --git a/New_College.Api/Startup.cs b/New_College.Api/Startup.cs
index c0e471a..d44498d 100644
--- a/New_College.Api/Startup.cs
+++ b/New_College.Api/Startup.cs
@@ -87,7 +87,7 @@ namespace New_College
//三方验证
ThridConfig.secretKey = Appsettings.app(new string[] { "ThridConfig", "secretKey" });
-
+ ThridConfig.Url = Appsettings.app(new string[] { "ThridConfig", "Url" });
services.AddMemoryCacheSetup();
diff --git a/New_College.Api/appsettings.Development.json b/New_College.Api/appsettings.Development.json
index 2afffc4..81e3d32 100644
--- a/New_College.Api/appsettings.Development.json
+++ b/New_College.Api/appsettings.Development.json
@@ -246,7 +246,8 @@
"SerialNumber": "1B304596B953D156B37863FF52FCAE40B458C9F2" //(新)证书序列号
},
"ThridConfig": {
- "secretKey": "01eb9ee95ba00e440ece83f904ef9640"
+ "secretKey": "01eb9ee95ba00e440ece83f904ef9640",
+ "Url": "http://api.carrerwebapi.com/api/oauth/SyncUpdateStudentInfo"
}
}
diff --git a/New_College.Common/GlobalVar/WeiXinConfig.cs b/New_College.Common/GlobalVar/WeiXinConfig.cs
index 9434cbe..78e35d4 100644
--- a/New_College.Common/GlobalVar/WeiXinConfig.cs
+++ b/New_College.Common/GlobalVar/WeiXinConfig.cs
@@ -5,6 +5,8 @@
{
public static string secretKey { get; set; }
+
+ public static string Url { get; set; }
}
public static class WeixinConfig
{
diff --git a/New_College.IServices/ID_LongIdMapServices.cs b/New_College.IServices/ID_LongIdMapServices.cs
index d470c11..6e34439 100644
--- a/New_College.IServices/ID_LongIdMapServices.cs
+++ b/New_College.IServices/ID_LongIdMapServices.cs
@@ -96,12 +96,13 @@ namespace New_College.IServices
///
MessageModel> GetEnrollmentinproductionResult(UniversityGeneralRequest query);
+
///
/// 获取招生简介详情
///
///
///
- Task> GetRequestEnrollmentinproductionDetailResult(StringIdQuery query);
+ MessageModel GetRequestEnrollmentinproductionDetailResult(StringIdQuery query);
}
}
\ No newline at end of file
diff --git a/New_College.Model/Request/SyncUpdateStudentInfoDto.cs b/New_College.Model/Request/SyncUpdateStudentInfoDto.cs
new file mode 100644
index 0000000..d75b0e1
--- /dev/null
+++ b/New_College.Model/Request/SyncUpdateStudentInfoDto.cs
@@ -0,0 +1,52 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace New_College.Model
+{
+
+ public class SyncUpdateCustomerDto
+ {
+ public string key { get; set; }
+
+ public SyncUpdateStudentInfoDto syncUpdateStudentInfoDto { get; set; }
+ }
+ public class SyncUpdateStudentInfoDto
+ {
+ public string UserCode { get; set; }
+ public string OpenId { get; set; }
+ public string NickName { get; set; }
+ public int Gender { get; set; }
+ public string Phone { get; set; }
+
+ public string UserPwd { get; set; }
+
+ public string Salt { get; set; }
+
+ public string SchoolName { get; set; }
+
+ public string ClassName { get; set; }
+
+ public int AreaId { get; set; } = 0;
+
+ public string AreaName { get; set; }
+
+ ///
+ /// 状态:0、未启用,1、启用,2、禁用
+ ///
+ public int? Status { get; set; } = 1;
+
+ ///
+ ///学生数据是否初始化(省份,选科等)
+ ///
+ public bool? Datainit { get; set; } = false;
+ ///
+ /// 是否为VIP
+ ///
+ public bool IsVIP { get; set; } = false;
+
+ public int Year { get; set; }
+ }
+}
diff --git a/New_College.Model/ViewModels/Result/EnrollmentinproductionResult.cs b/New_College.Model/ViewModels/Result/EnrollmentinproductionResult.cs
index 898e994..3b2cc27 100644
--- a/New_College.Model/ViewModels/Result/EnrollmentinproductionResult.cs
+++ b/New_College.Model/ViewModels/Result/EnrollmentinproductionResult.cs
@@ -59,6 +59,41 @@ namespace New_College.Model.ViewModels
public List Data { get; set; }
}
+
+ public class Rootobject
+ {
+ public collegeDetailResult result { get; set; }
+ public string code { get; set; }
+ public string message { get; set; }
+ public string fullMessage { get; set; }
+ public DateTime timestamp { get; set; }
+ public bool isSuccess { get; set; }
+ }
+
+ public class collegeDetailResult
+ {
+ public string collegeCode { get; set; }
+ public string collegeName { get; set; }
+ public string title { get; set; }
+ public string content { get; set; }
+ public string summary { get; set; }
+ public string metaKeywords { get; set; }
+ public string metaDescription { get; set; }
+ public int year { get; set; }
+ public string[] tags { get; set; }
+ public int rank { get; set; }
+ public int hits { get; set; }
+ public int type { get; set; }
+ public bool isArt { get; set; }
+ public bool isShow { get; set; }
+ public string editor { get; set; }
+ public DateTime updatedAt { get; set; }
+ public DateTime createdAt { get; set; }
+ }
+
+
+
+
public class RequestQuery : BasePageRequest
{
public string Id { get; set; }
diff --git a/New_College.Services/D_LongIdMapServices.cs b/New_College.Services/D_LongIdMapServices.cs
index b6b3704..facd915 100644
--- a/New_College.Services/D_LongIdMapServices.cs
+++ b/New_College.Services/D_LongIdMapServices.cs
@@ -1046,32 +1046,35 @@ namespace New_College.Services
};
}
+
+
///
/// 获取招生简介详情
///
///
///
- public async Task> GetRequestEnrollmentinproductionDetailResult(StringIdQuery query)
+ public MessageModel GetRequestEnrollmentinproductionDetailResult(StringIdQuery query)
{
- if (string.IsNullOrWhiteSpace(query.Id))
+ //http://192.168.104.104:3000/youzy.dms.basiclib.api.college.news.get?id=65d152e0b306093ad50dc039&isAddHits=true
+ var info = HttpHelper.PostApi(string.Format("http://192.168.104.104:3000/youzy.dms.basiclib.api.college.news.get?id={0}&isAddHits=true", query.Id));
+ if (info.isSuccess == true)
{
- return new MessageModel() { success = false, msg = "传入为空" };
+ return new MessageModel()
+ {
+ success = true,
+ msg = "获取成功",
+ response = info.result
+ };
}
- var stringBuilder = new StringBuilder();
- stringBuilder.AppendFormat("Id={0}", query.Id);
- var info = HttpHelper.GetApi("https://hbs.yrtsedu.cn/", "api/University/GetEnrollmentinproductionDetali", stringBuilder.ToString());
- if (info.Success == false)
+ return new MessageModel()
{
- return new MessageModel() { success = false, msg = "请求失败" };
- }
- return new MessageModel()
- {
- success = info.Success,
- msg = "获取成功",
- response = info.Data
+ success = info.isSuccess,
+ msg = "获取失败",
};
}
+
+
#region 数据导入
@@ -2076,6 +2079,8 @@ namespace New_College.Services
return true;
}
+
+
diff --git a/New_College.Services/V_CustomerInfoServices.cs b/New_College.Services/V_CustomerInfoServices.cs
index c304669..70b8f56 100644
--- a/New_College.Services/V_CustomerInfoServices.cs
+++ b/New_College.Services/V_CustomerInfoServices.cs
@@ -19,6 +19,8 @@ using NPOI.SS.Formula.Functions;
using System.Net.Http;
using System.Text;
using Newtonsoft.Json;
+using New_College.Common.HttpRestSharp;
+using System.Data.Entity;
namespace New_College.Services
{
@@ -44,7 +46,7 @@ namespace New_College.Services
{
try
{
- // DingHookHelper.DingTalkHookMessage("UpdateCasdoorPwd", JsonConvert.SerializeObject(query));
+ // DingHookHelper.DingTalkHookMessage("UpdateCasdoorPwd", JsonConvert.SerializeObject(query));
var list = await _casdoorUserRepository.Query(e => e.id == query.openId);
if (list != null && list.Count() > 0)
{
@@ -159,6 +161,16 @@ namespace New_College.Services
}
+ ///
+ /// 更新生涯平台数据
+ ///
+ ///
+ ///
+ private void UpdateSYCustomer(SyncUpdateCustomerDto sync)
+ {
+ var postres = HttpHelper.PostApi(ThridConfig.Url, JsonConvert.SerializeObject(sync));
+
+ }
///
/// 完善用户信息
@@ -170,7 +182,6 @@ namespace New_College.Services
var info = await _dal.QueryById(query.StudentId);
if (info == null)
return new CustomerInfoResult() { Status = 3 };
-
if (query.AreaId > 0)
{
info.AreaId = query.AreaId;
@@ -202,7 +213,7 @@ namespace New_College.Services
}
if (query.Expectedscore > 0)
{
-
+
info.Expectedscore = query.Expectedscore;
}
if (query.Year > 0)
@@ -230,6 +241,32 @@ namespace New_College.Services
var result = await _dal.Update(info);
if (result)
{
+ //
+ Task.Factory.StartNew(() =>
+ {
+ UpdateSYCustomer(new SyncUpdateCustomerDto()
+ {
+ syncUpdateStudentInfoDto = new SyncUpdateStudentInfoDto()
+ {
+ AreaId = info.AreaId,
+ AreaName = info.AreaName,
+ ClassName = info.ClassName,
+ Datainit = true,
+ Gender = info.Gender,
+ IsVIP = info.IsVIP,
+ NickName = info.NickName,
+ OpenId = info.OpenId,
+ Phone = info.Phone,
+ Salt = info.Salt,
+ SchoolName = info.SchoolName,
+ Status = info.Status,
+ UserCode = info.UserCode,
+ UserPwd = info.UserPwd,
+ Year = info.Year
+ },
+ key = ThridConfig.secretKey
+ });
+ });
return new CustomerInfoResult()
{
Status = 1,