staging #20
|
|
@ -38,7 +38,7 @@ namespace Learn.Archives.API.Controllers
|
||||||
{
|
{
|
||||||
if (roleId == 0) Oh.Error("无效的角色");
|
if (roleId == 0) Oh.Error("无效的角色");
|
||||||
if (!userInfo.IsSa) Oh.Error("无权访问");
|
if (!userInfo.IsSa) Oh.Error("无权访问");
|
||||||
var role = roleService.GetByIdAsync(roleId);
|
var role = await roleService.GetByIdAsync(roleId);
|
||||||
if (role == null) Oh.Error("无效的角色");
|
if (role == null) Oh.Error("无效的角色");
|
||||||
return await mrService.AsQueryable()
|
return await mrService.AsQueryable()
|
||||||
.Where(s=>s.RoleId==roleId)
|
.Where(s=>s.RoleId==roleId)
|
||||||
|
|
|
||||||
|
|
@ -153,6 +153,25 @@ namespace Learn.Archives.API.Controllers
|
||||||
impError.Add(s);
|
impError.Add(s);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
//基础信息校验
|
||||||
|
if (string.IsNullOrEmpty(s.UserType) ||
|
||||||
|
string.IsNullOrEmpty(s.School)||
|
||||||
|
string.IsNullOrEmpty(s.Class) ||
|
||||||
|
string.IsNullOrEmpty(s.Phone)||
|
||||||
|
string.IsNullOrEmpty(s.RealName)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
s.ErrorMsg = "基础信息未能检查通过/请检查 导入行中 是否缺少了[任职信息类型/学校/班级/年级/名称//手机号]";
|
||||||
|
impError.Add(s);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
//无效的任教学科
|
||||||
|
if (!string.IsNullOrEmpty(s.Subject) && s.Subject.ToEnum<SubjectEnum>()==null)
|
||||||
|
{
|
||||||
|
s.ErrorMsg = "无效的任教学科";
|
||||||
|
impError.Add(s);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
userCenterImp.Add(new UserExcelExportData()
|
userCenterImp.Add(new UserExcelExportData()
|
||||||
{
|
{
|
||||||
UserType = s.UserType,
|
UserType = s.UserType,
|
||||||
|
|
@ -162,7 +181,7 @@ namespace Learn.Archives.API.Controllers
|
||||||
School = s.School,
|
School = s.School,
|
||||||
Grade = gStr,
|
Grade = gStr,
|
||||||
Class = s.Class,
|
Class = s.Class,
|
||||||
ClassType = s.ClassType,
|
ClassType = s.ClassType??ClassTypeEnum.云校班.ToString(),
|
||||||
Phone = s.Phone,
|
Phone = s.Phone,
|
||||||
RealName = s.RealName,
|
RealName = s.RealName,
|
||||||
Stages = s.Grade.Contains("初") ? StudentStagesEnum.初中.ToString() : StudentStagesEnum.高中.ToString()
|
Stages = s.Grade.Contains("初") ? StudentStagesEnum.初中.ToString() : StudentStagesEnum.高中.ToString()
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
"OtherDBArr": [
|
"OtherDBArr": [
|
||||||
{
|
{
|
||||||
"ConfigId": 1001, //用户中心
|
"ConfigId": 1001, //用户中心
|
||||||
"ConnectionString": "AllowLoadLocalInfile=true;Server=rm-2vc20nd3d11g0oh6g2o.rwlb.cn-chengdu.rds.aliyuncs.com;User ID=marking;Password=poiuytPOIUYT098765)(*&^%;Port=3306;Database=usercenter;CharSet=utf8mb4;pooling=true;SslMode=None",
|
"ConnectionString": "AllowLoadLocalInfile=true;Server=rm-2vc20nd3d11g0oh6g2o.rwlb.cn-chengdu.rds.aliyuncs.com;User ID=marking;Password=poiuytPOIUYT098765)(*&^%;Port=3306;Database=usercenter_v1;CharSet=utf8mb4;pooling=true;SslMode=None",
|
||||||
"SqlType": "MySql"
|
"SqlType": "MySql"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue