瀏覽代碼

新增报名注册接口

周箭河 5 年之前
父節點
當前提交
dcbb1d55fe

+ 2 - 2
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/StudentRegistration.java

@@ -35,11 +35,11 @@ public class StudentRegistration {
 	private String currentClass;
 	private String currentClass;
 	
 	
 	/** 报名科目 */
 	/** 报名科目 */
-	@ApiModelProperty(value = "报名科目",required = false)
+	@ApiModelProperty(value = "报名科目",required = true)
 	private Integer subjectId;
 	private Integer subjectId;
 
 
 	/** 报名科目 */
 	/** 报名科目 */
-	@ApiModelProperty(value = "实际科目",required = false)
+	@ApiModelProperty(value = "实际科目",hidden = true)
 	private Integer actualSubjectId;
 	private Integer actualSubjectId;
 	
 	
 	/** 是否允许调剂 */
 	/** 是否允许调剂 */

+ 28 - 0
mec-student/src/main/java/com/ym/mec/student/controller/RegisterController.java

@@ -0,0 +1,28 @@
+package com.ym.mec.student.controller;
+
+import com.ym.mec.biz.dal.entity.StudentRegistration;
+import com.ym.mec.biz.service.StudentRegistrationService;
+import com.ym.mec.common.controller.BaseController;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RequestMapping("register")
+@Api(tags = "乐团服务")
+@RestController
+public class RegisterController extends BaseController {
+
+    @Autowired
+    private StudentRegistrationService studentRegistrationService;
+
+
+    @ApiOperation(value = "新增学生报名信息")
+    @PostMapping("/add")
+    public Object add(StudentRegistration studentRegistration) {
+        studentRegistrationService.insert(studentRegistration);
+        return succeed();
+    }
+}