|
@@ -2,7 +2,6 @@ package com.ym.mec.web.controller;
|
|
|
|
|
|
import com.ym.mec.common.controller.BaseController;
|
|
|
import com.ym.mec.web.dal.entity.StudentRegistration;
|
|
|
-import com.ym.mec.web.dal.page.StudentApplyDetailQueryInfo;
|
|
|
import com.ym.mec.web.dal.page.StudentRegistrationQueryInfo;
|
|
|
import com.ym.mec.web.service.StudentRegistrationService;
|
|
|
import io.swagger.annotations.*;
|
|
@@ -11,7 +10,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.Date;
|
|
|
-import java.util.HashMap;
|
|
|
|
|
|
@RequestMapping("studentRegistration")
|
|
|
@Api(tags = "学生报名信息服务")
|
|
@@ -23,40 +21,38 @@ public class StudentRegistrationController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "新增学生报名信息")
|
|
|
@PostMapping("/add")
|
|
|
- public Object add(@RequestBody StudentRegistration studentRegistration) {
|
|
|
+ public Object add(StudentRegistration studentRegistration) {
|
|
|
studentRegistrationService.insert(studentRegistration);
|
|
|
return succeed();
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "删除学生报名信息")
|
|
|
- @DeleteMapping("/del/{id}")
|
|
|
+ @PostMapping("/del/{id}")
|
|
|
public Object del(@ApiParam(value = "学生报名信息编号", required = true) @PathVariable("id") Long id) {
|
|
|
studentRegistrationService.delete(id);
|
|
|
return succeed();
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "修改学生报名信息")
|
|
|
- @PutMapping("/update")
|
|
|
- public Object update(@RequestBody StudentRegistration studentRegistration) {
|
|
|
+ @PostMapping("/update")
|
|
|
+ public Object update(StudentRegistration studentRegistration) {
|
|
|
studentRegistration.setUpdateTime(new Date());
|
|
|
studentRegistrationService.update(studentRegistration);
|
|
|
return succeed();
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "批量调剂学生报名专业")
|
|
|
- @PutMapping("/batchUpdateSubject")
|
|
|
- public Object batchUpdateSubject(@RequestBody HashMap<String, String> param) {
|
|
|
- String userId = param.get("userId");
|
|
|
- String subId = param.get("subId");
|
|
|
- if (StringUtils.isEmpty(userId) || StringUtils.isEmpty(subId)) {
|
|
|
+ @PostMapping("/batchUpdateSubject")
|
|
|
+ public Object batchUpdateSubject(String userId,Integer subId) {
|
|
|
+ if (StringUtils.isEmpty(userId) || subId == null) {
|
|
|
return failed();
|
|
|
}
|
|
|
- return succeed(studentRegistrationService.batchUpdateSubject(userId, Integer.parseInt(subId)));
|
|
|
+ return succeed(studentRegistrationService.batchUpdateSubject(userId, subId));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "乐团【报名中、缴费中】 学生详情列表分页查询")
|
|
|
- @PostMapping("/queryStudentApplyDetail")
|
|
|
- public Object queryStudentApplyDetail(@RequestBody StudentRegistrationQueryInfo queryInfo) {
|
|
|
+ @GetMapping("/queryStudentApplyDetail")
|
|
|
+ public Object queryStudentApplyDetail(StudentRegistrationQueryInfo queryInfo) {
|
|
|
return succeed(studentRegistrationService.queryStudentDetailPage(queryInfo));
|
|
|
}
|
|
|
|
|
@@ -64,9 +60,7 @@ public class StudentRegistrationController extends BaseController {
|
|
|
@GetMapping("/queryFeeDetail")
|
|
|
@ApiImplicitParams({@ApiImplicitParam(name = "studentId", value = "学生编号", required = true, dataType = "Integer"),
|
|
|
@ApiImplicitParam(name = "musicGroupId", value = "乐团编号", required = true, dataType = "String")})
|
|
|
- public Object queryFeeDetail(@RequestBody HashMap<String, String> param) {
|
|
|
- String studentId = param.get("studentId");
|
|
|
- String musicGroupId = param.get("musicGroupId");
|
|
|
+ public Object queryFeeDetail(String studentId,String musicGroupId) {
|
|
|
if (StringUtils.isEmpty(studentId) || StringUtils.isEmpty(musicGroupId)) {
|
|
|
return succeed(studentRegistrationService.queryFeeDetail(Integer.parseInt(studentId), musicGroupId));
|
|
|
}
|