Commit e4357635 authored by 黄奎's avatar 黄奎

页面修改

parent c543a200
......@@ -71,12 +71,13 @@ namespace Edu.Cache.User
{
TimeSpan ts = GetExpirTime(JwtExpirTime);
redis.StringSet(cacheKey, Data, ts);
}
catch (Exception)
{
}
}
/// <summary>
......@@ -139,13 +140,25 @@ namespace Edu.Cache.User
Id = model.Id,
Group_Id = model.Group_Id,
School_Id = model.School_Id,
AccountType=model.AccountType,
AccountName = model.AccountName,
GroupName = model.GroupName,
SchoolName = model.SchoolName,
Token = token,
ApiRequestFromEnum = apiRequestFromEnum,
DeptId = model.Dept_Id,
PostId = model.Post_Id
PostId = model.Post_Id,
AccountId = model.AccountId,
UserMobile = model.Account,
ErpToken = "",
MallToken = "",
JHMallBaseId = "",
JHTenantId = "",
GroupLogo = model.GroupLogo,
UserIcon = model.UserIcon,
DeptName = model.DeptName,
PostName = model.PostName,
Email = model.Email,
};
UserInfoSet(Cache.CacheKey.User_Login_Key + Id.ToString(), userInfo, Common.Config.JwtExpirTime);
}
......@@ -158,5 +171,15 @@ namespace Edu.Cache.User
}
return userInfo;
}
/// <summary>
/// 清除用户缓存
/// </summary>
/// <param name="Id"></param>
public static void ClearUserLoginCache(object Id)
{
string cacheKey = Cache.CacheKey.User_Login_Key + Id.ToString();
redis.KeyDelete(cacheKey);
}
}
}
\ No newline at end of file
......@@ -1537,7 +1537,7 @@ namespace Edu.Module.Course
Group_Id = checkModel.Group_Id,
MakeUpStatus = 3,
OrderGuestId = checkModel.OrderGuestId
}) > 0;
});
}
}
return flag;
......
......@@ -380,7 +380,7 @@ namespace Edu.WebApi.Controllers.Course
}
}
}
flag = classModule.UpdateClassTimeModule(item.ClassId, Common.Plugin.JsonHelper.Serialize(dateList));
//flag = classModule.UpdateClassTimeModule(item.ClassId, Common.Plugin.JsonHelper.Serialize(dateList));
}
var classTimeList = classModule.GetClassTimeListModule(new RB_Class_Time_ViewModel());
int basicMintues= classModule.GetBasicMinutesModule(classTimeList[0].Group_Id);
......@@ -391,13 +391,16 @@ namespace Edu.WebApi.Controllers.Course
var startDate = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd") + " " + item.StartTime + ":00");
var endDate = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd") + " " + item.EndTime + ":00");
TimeSpan span = endDate.Subtract(startDate);
if (span.TotalMinutes % basicMintues == 0)
if (item.TimeHour <= 0)
{
item.TimeHour = Convert.ToDecimal(span.TotalMinutes / basicMintues);
}
if (item.TimeHour > 0)
{
flag = classModule.UpdateClassPlanTimeModule(item.ClassTimeId, item.TimeHour);
if (span.TotalMinutes % basicMintues == 0)
{
item.TimeHour = Convert.ToDecimal(span.TotalMinutes / basicMintues);
}
if (item.TimeHour > 0)
{
flag = classModule.UpdateClassPlanTimeModule(item.ClassTimeId, item.TimeHour);
}
}
}
});
......
......@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Edu.AOP;
using Edu.Cache.User;
using Edu.Common.API;
using Edu.Common.Plugin;
using Edu.Model.ViewModel.Course;
......@@ -145,6 +146,10 @@ namespace Edu.WebApi.Controllers.User
updateModel.UpdateBy = base.UserInfo.Id;
updateModel.UpdateTime = DateTime.Now;
bool flag = employeeModule.SetEmployeeModule(updateModel);
if (flag)
{
UserReidsCache.ClearUserLoginCache(base.UserInfo.Id);
}
return flag ? ApiResult.Success() : ApiResult.Failed();
}
......
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