|
|
@@ -167,6 +167,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
Fields.Add("SeoKeyword", DateTime.Now.ToString("yyyyMMddHHmmssfff") + function.get_Random(8));
|
|
|
Fields.Add("SeoDescription", data.SeoDescription);
|
|
|
int Id = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Add("MsgAlert", Fields, 0);
|
|
|
+ string error = "";
|
|
|
if (!string.IsNullOrEmpty(MakerCodes))
|
|
|
{
|
|
|
string[] MakerCodeList = MakerCodes.Replace("\r", "").Replace("\n", ",").Split(',');
|
|
|
@@ -187,10 +188,14 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
else
|
|
|
{
|
|
|
new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Delete("MsgAlert", Id);
|
|
|
- return "创客" + item + "不存在或者已经添加了相关信息";
|
|
|
+ error += "创客" + item + "不存在或者已经添加了相关信息" + '\n';
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if (!string.IsNullOrEmpty(error))
|
|
|
+ {
|
|
|
+ return "Warning|" + error;
|
|
|
+ }
|
|
|
AddSysLog(data.Id.ToString(), "MsgAlert", "add");
|
|
|
db.SaveChanges();
|
|
|
|
|
|
@@ -262,6 +267,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
Fields.Add("SeoTitle", data.SeoTitle);
|
|
|
Fields.Add("SeoDescription", data.SeoDescription);
|
|
|
new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Edit("MsgAlert", Fields, data.Id);
|
|
|
+ string error = "";
|
|
|
var duserSwapWhite = db.UserSwapWhite.Where(m => m.QueryCount == data.Id).ToList();
|
|
|
foreach (var item in duserSwapWhite)
|
|
|
{
|
|
|
@@ -286,10 +292,14 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- return "创客" + item + "不存在或者已经添加了相关信息";
|
|
|
+ error += "创客" + item + "不存在或者已经添加了相关信息" + '\n';
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if (!string.IsNullOrEmpty(error))
|
|
|
+ {
|
|
|
+ return "Warning|" + error;
|
|
|
+ }
|
|
|
AddSysLog(data.Id.ToString(), "MsgAlert", "update");
|
|
|
db.SaveChanges();
|
|
|
|