|
@@ -87,7 +87,8 @@ namespace TEAMModelOS.Controllers.Syllabus
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- builder.Error("SubjectCode is null or empty!", "SubjectCode is null or empty!");
|
|
|
+ throw new BizException("SubjectCode is null or empty!", ResponseCode.PARAMS_ERROR);
|
|
|
+
|
|
|
}
|
|
|
return builder.Data(data).Extend(new Dictionary<string, object> { { "count", data.Count } }).build();
|
|
|
}
|
|
@@ -128,7 +129,7 @@ namespace TEAMModelOS.Controllers.Syllabus
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- builder.Error("SubjectCode is null or empty!", "SubjectCode is null or empty!");
|
|
|
+ throw new BizException("SubjectCode is null or empty!", ResponseCode.PARAMS_ERROR);
|
|
|
}
|
|
|
return builder.Data(data).Extend(new Dictionary<string, object> { { "count", data.Count } }).build();
|
|
|
}
|
|
@@ -235,7 +236,7 @@ namespace TEAMModelOS.Controllers.Syllabus
|
|
|
else
|
|
|
{
|
|
|
throw new BizException("参数异常", ResponseCode.PARAMS_ERROR);
|
|
|
- //builder.Error(false,ResponseCode.PARAMS_ERROR,"参数异常");
|
|
|
+
|
|
|
}
|
|
|
return builder.Data(data.OrderBy(m => m.order)).Extend(new Dictionary<string, object> { { "count", data.Count } }).build();
|
|
|
}
|
|
@@ -259,7 +260,7 @@ namespace TEAMModelOS.Controllers.Syllabus
|
|
|
else
|
|
|
{
|
|
|
throw new BizException("参数异常", ResponseCode.PARAMS_ERROR);
|
|
|
- //builder.Error(false, ResponseCode.PARAMS_ERROR, "参数异常");
|
|
|
+
|
|
|
}
|
|
|
return builder.Data(data.OrderBy(m => m.order)).Extend(new Dictionary<string, object> { { "count", data.Count } }).build();
|
|
|
}
|
|
@@ -280,7 +281,7 @@ namespace TEAMModelOS.Controllers.Syllabus
|
|
|
List<Knowledge> ts = await knowledgeService.SaveOrUpdateKnowledge(request.@params);
|
|
|
if (ts.Count > 0) builder.Data(ts).Extend(new Dictionary<string, object> { { "count", ts.Count } });
|
|
|
else throw new BizException("失败", ResponseCode.FAILED);
|
|
|
- //builder.Error(false, ResponseCode.FAILED, "失败");
|
|
|
+
|
|
|
}
|
|
|
return builder.build();
|
|
|
}
|
|
@@ -326,18 +327,17 @@ namespace TEAMModelOS.Controllers.Syllabus
|
|
|
}
|
|
|
else {
|
|
|
throw new BizException("删除失败", ResponseCode.FAILED);
|
|
|
- //builder.Error(false, ResponseCode.FAILED, "删除失败");
|
|
|
+
|
|
|
}
|
|
|
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
//throw new BizException("未找到对应删除数据", ResponseCode.NOT_FOUND);
|
|
|
- //builder.Error(false, ResponseCode.NOT_FOUND, "未找到对应删除数据");
|
|
|
+
|
|
|
}
|
|
|
|
|
|
return schoolBlocks;
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|