Commit f99ccbc4 authored by 吴春's avatar 吴春

提交支付回调修改

parent 341670f7
...@@ -37,5 +37,11 @@ namespace Edu.Cache ...@@ -37,5 +37,11 @@ namespace Edu.Cache
/// </summary> /// </summary>
public static string Student_Frozen_Key = "Edu_Student_Frozen_"; public static string Student_Frozen_Key = "Edu_Student_Frozen_";
/// <summary>
/// 微信支付回调key
/// </summary>
public static string WeChatPay_Callback_Key = "WeChatPay_Callback_Key_";
} }
} }
...@@ -71,12 +71,32 @@ namespace Edu.Cache.User ...@@ -71,12 +71,32 @@ namespace Edu.Cache.User
{ {
TimeSpan ts = GetExpirTime(JwtExpirTime); TimeSpan ts = GetExpirTime(JwtExpirTime);
redis.StringSet(cacheKey, Data, ts); redis.StringSet(cacheKey, Data, ts);
} }
catch (Exception) catch (Exception)
{ {
} }
} }
/// <summary>
/// 获取缓存
/// </summary>
/// <param name="cacheKey"></param>
/// <param name="Data"></param>
/// <param name="JwtExpirTime"></param>
public static object Get(string cacheKey, object Data, int JwtExpirTime)
{
try
{
object info = redis.StringGet<object>(cacheKey);
return info;
}
catch (Exception)
{
return "";
}
}
/// <summary> /// <summary>
/// 账号仓储层对象 /// 账号仓储层对象
/// </summary> /// </summary>
...@@ -88,7 +108,7 @@ namespace Edu.Cache.User ...@@ -88,7 +108,7 @@ namespace Edu.Cache.User
/// <param name="Id">账号Id</param> /// <param name="Id">账号Id</param>
/// <param name="apiRequestFromEnum">请求来源</param> /// <param name="apiRequestFromEnum">请求来源</param>
/// <returns></returns> /// <returns></returns>
public static UserInfo GetUserLoginInfo(object Id, ApiRequestFromEnum apiRequestFromEnum= ApiRequestFromEnum.WebAdmin) public static UserInfo GetUserLoginInfo(object Id, ApiRequestFromEnum apiRequestFromEnum = ApiRequestFromEnum.WebAdmin)
{ {
UserInfo userInfo = null; UserInfo userInfo = null;
if (Id != null) if (Id != null)
...@@ -100,7 +120,7 @@ namespace Edu.Cache.User ...@@ -100,7 +120,7 @@ namespace Edu.Cache.User
} }
catch (Exception ex) catch (Exception ex)
{ {
Common.Plugin.LogHelper.Write(ex, "GetUserLoginInfo"); Common.Plugin.LogHelper.Write(ex, "GetUserLoginInfo");
} }
if (userInfo == null) if (userInfo == null)
{ {
......
...@@ -190,5 +190,10 @@ namespace Edu.Model.Entity.Course ...@@ -190,5 +190,10 @@ namespace Edu.Model.Entity.Course
/// 补课课时 /// 补课课时
/// </summary> /// </summary>
public int MakeUpHours { get; set; } public int MakeUpHours { get; set; }
/// <summary>
/// 学生头像
/// </summary>
public string StuIcon { get; set; }
} }
} }
...@@ -963,7 +963,7 @@ namespace Edu.Module.Course ...@@ -963,7 +963,7 @@ namespace Edu.Module.Course
{ {
list.Add(new list.Add(new
{ {
UserIcon = "", UserIcon = item.StuIcon,
item.Id, item.Id,
SexStr = item.Sex == 1 ? "男" : "女", SexStr = item.Sex == 1 ? "男" : "女",
item.GuestName, item.GuestName,
......
...@@ -1525,6 +1525,13 @@ namespace Edu.Module.Course ...@@ -1525,6 +1525,13 @@ namespace Edu.Module.Course
{ {
LogContent += ",总课时由【" + gModel.TotalHours + "】修改为【" + dmodel.TotalHours + "】"; LogContent += ",总课时由【" + gModel.TotalHours + "】修改为【" + dmodel.TotalHours + "】";
} }
if (gModel.StuIcon != dmodel.StuIcon)
{
LogContent += ",学生头像由【" + gModel.StuIcon + "】修改为【" + dmodel.StuIcon + "】";
}
gModel.StuIcon = dmodel.StuIcon;
gModel.TotalHours = dmodel.TotalHours; gModel.TotalHours = dmodel.TotalHours;
gModel.UpdateTime = dmodel.UpdateTime; gModel.UpdateTime = dmodel.UpdateTime;
...@@ -1543,6 +1550,19 @@ namespace Edu.Module.Course ...@@ -1543,6 +1550,19 @@ namespace Edu.Module.Course
School_Id = dmodel.School_Id, School_Id = dmodel.School_Id,
SourceId = gModel.OrderId SourceId = gModel.OrderId
}); });
if (!string.IsNullOrWhiteSpace(dmodel.StuIcon))//更新学生表中的头像
{
var orderGuestModel = student_OrderGuestRepository.GetStrOrderGuestListRepository(new RB_Student_OrderGuest_ViewModel { ClassId = gModel.ClassId, OrderId = gModel.OrderId, GuestId = gModel.Id }).FirstOrDefault();
if (orderGuestModel != null && orderGuestModel.Student_Id > 0)
{
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
{nameof(RB_Student_ViewModel.StuIcon),dmodel.StuIcon},
};
studentRepository.Update(fileds, new WhereHelper(nameof(RB_Student_ViewModel.StuId), orderGuestModel.Student_Id));
}
}
} }
} }
else else
...@@ -1603,12 +1623,13 @@ namespace Edu.Module.Course ...@@ -1603,12 +1623,13 @@ namespace Edu.Module.Course
School_Id = classmodel.School_Id, School_Id = classmodel.School_Id,
Status = DateStateEnum.Normal, Status = DateStateEnum.Normal,
StuBirth = dmodel.BirthDate, StuBirth = dmodel.BirthDate,
StuIcon = "", StuIcon = dmodel.StuIcon,
StuName = dmodel.GuestName, StuName = dmodel.GuestName,
StuSex = dmodel.Sex - 1, StuSex = dmodel.Sex - 1,
StuTel = dmodel.Mobile, StuTel = dmodel.Mobile,
UpdateBy = dmodel.CreateBy, UpdateBy = dmodel.CreateBy,
UpdateTime = DateTime.Now UpdateTime = DateTime.Now,
}); });
int AccountId = accountRepository.Insert(new Model.Entity.User.RB_Account() int AccountId = accountRepository.Insert(new Model.Entity.User.RB_Account()
{ {
...@@ -1650,7 +1671,7 @@ namespace Edu.Module.Course ...@@ -1650,7 +1671,7 @@ namespace Edu.Module.Course
Group_Id = dmodel.Group_Id, Group_Id = dmodel.Group_Id,
LogContent = LogContent, LogContent = LogContent,
School_Id = dmodel.School_Id, School_Id = dmodel.School_Id,
SourceId = dmodel.OrderId SourceId = dmodel.OrderId,
}); });
} }
} }
......
...@@ -1435,6 +1435,23 @@ namespace Edu.WebApi.Controllers.Course ...@@ -1435,6 +1435,23 @@ namespace Edu.WebApi.Controllers.Course
bool retult = classModule.UpdateTimeClassVideo(extModel.VideoUrl, extModel.ClassTimeId); bool retult = classModule.UpdateTimeClassVideo(extModel.VideoUrl, extModel.ClassTimeId);
return retult ? ApiResult.Success("课堂视频更新成功") : ApiResult.Failed("课堂视频更新失败"); return retult ? ApiResult.Success("课堂视频更新成功") : ApiResult.Failed("课堂视频更新失败");
} }
/// <summary>
/// 获取学员列表
/// </summary>
/// <returns></returns>
[HttpPost]
[Microsoft.AspNetCore.Authorization.AllowAnonymous]
public ApiResult GetStudentByClassId()
{
var classId = base.ParmJObj.GetInt("ClassId");
var schoolId = 0;
var Group_Id = base.ParmJObj.GetInt("Group_Id", 100000);
var data = classModule.GetClassStudentListModule(classId, schoolId, Group_Id);
return ApiResult.Success(data: data);
}
#endregion #endregion
} }
......
...@@ -883,6 +883,7 @@ namespace Edu.WebApi.Controllers.Course ...@@ -883,6 +883,7 @@ namespace Edu.WebApi.Controllers.Course
x.VolunteerMajor, x.VolunteerMajor,
x.Price, x.Price,
x.StudyRemark, x.StudyRemark,
x.StuIcon
}); });
return ApiResult.Success("", pageModel); return ApiResult.Success("", pageModel);
} }
...@@ -920,7 +921,8 @@ namespace Edu.WebApi.Controllers.Course ...@@ -920,7 +921,8 @@ namespace Edu.WebApi.Controllers.Course
Price=base.ParmJObj.GetDecimal("Price"), Price=base.ParmJObj.GetDecimal("Price"),
StudyRemark=base.ParmJObj.GetStringValue("StudyRemark"), StudyRemark=base.ParmJObj.GetStringValue("StudyRemark"),
BirthDate=base.ParmJObj.GetDateTime("BirthDate"), BirthDate=base.ParmJObj.GetDateTime("BirthDate"),
TotalHours=base.ParmJObj.GetInt("TotalHours") TotalHours=base.ParmJObj.GetInt("TotalHours"),
StuIcon = base.ParmJObj.GetStringValue("StuIcon"),
}; };
if (dmodel.OrderId <= 0) if (dmodel.OrderId <= 0)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment