|
@@ -9,6 +9,7 @@ import com.yonge.cooleshow.common.entity.HttpResponseResult;
|
|
import com.yonge.toolset.base.exception.BizException;
|
|
import com.yonge.toolset.base.exception.BizException;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
@@ -38,6 +39,12 @@ public class OpenTeacherController extends BaseController {
|
|
@PostMapping("/submit")
|
|
@PostMapping("/submit")
|
|
@ApiOperation(value = "新增", notes = "传入teacher")
|
|
@ApiOperation(value = "新增", notes = "传入teacher")
|
|
public HttpResponseResult<Boolean> submit(@Valid @RequestBody TeacherSubmitReq teacherSubmitReq) {
|
|
public HttpResponseResult<Boolean> submit(@Valid @RequestBody TeacherSubmitReq teacherSubmitReq) {
|
|
|
|
+
|
|
|
|
+ // 验证码不能为空
|
|
|
|
+ if (StringUtils.isBlank(teacherSubmitReq.getCode())) {
|
|
|
|
+ throw new BizException("验证码不能为空");
|
|
|
|
+ }
|
|
|
|
+
|
|
Long tenantId = teacherSubmitReq.getTenantId();
|
|
Long tenantId = teacherSubmitReq.getTenantId();
|
|
if (tenantId == null) {
|
|
if (tenantId == null) {
|
|
throw new BizException("未选择机构");
|
|
throw new BizException("未选择机构");
|