|
@@ -270,8 +270,12 @@ public class CourseController extends ControllerSupport {
|
|
|
Long rootOrgId = accessUser.getRootOrgId();
|
|
|
|
|
|
String code = domain.getCode();
|
|
|
+ String name = domain.getName();
|
|
|
if (StringUtils.isBlank(code)) {
|
|
|
- throw new StatusException("B-620001", "code is blank");
|
|
|
+ throw new StatusException("B-620001", "课程编码不能为空");
|
|
|
+ }
|
|
|
+ if (StringUtils.isBlank(name)) {
|
|
|
+ throw new StatusException("B-620001", "课程名称不能为空");
|
|
|
}
|
|
|
CourseEntity course = courseRepo.findByRootOrgIdAndCode(rootOrgId, code);
|
|
|
if (null != course) {
|
|
@@ -305,6 +309,15 @@ public class CourseController extends ControllerSupport {
|
|
|
User accessUser = getAccessUser();
|
|
|
Long rootOrgId = accessUser.getRootOrgId();
|
|
|
|
|
|
+ String code = domain.getCode();
|
|
|
+ String name = domain.getName();
|
|
|
+ if (StringUtils.isBlank(code)) {
|
|
|
+ throw new StatusException("B-620001", "课程编码不能为空");
|
|
|
+ }
|
|
|
+ if (StringUtils.isBlank(name)) {
|
|
|
+ throw new StatusException("B-620001", "课程名称不能为空");
|
|
|
+ }
|
|
|
+
|
|
|
CourseInfo info = new CourseInfo();
|
|
|
info.setRootOrgId(rootOrgId);
|
|
|
info.setCode(domain.getCode());
|