|
|
@@ -6,6 +6,7 @@ import com.chuanghai.repair.utils.CreateTokenUtil;
|
|
|
import com.chuanghai.repair.utils.ReturnValueUtil;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
+import io.swagger.annotations.ApiParam;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
@@ -25,10 +26,20 @@ public class StudentController {
|
|
|
@ApiOperation("修改学生信息")
|
|
|
@PostMapping(value = "/updateStudent")
|
|
|
public ReturnValueUtil updateStudent(HttpServletRequest request,
|
|
|
- RepairsStudent repairsStudent) {
|
|
|
+ @ApiParam(name = "学生名称", required = true)String studentName,
|
|
|
+ @ApiParam(name = "学生性别 0(男) 1(女)", required = true)String studentSex,
|
|
|
+ @ApiParam(name = "学生手机号码", required = true)String studentPhone,
|
|
|
+ @ApiParam(name = "备选手机号码", required = true)String studentOtherPhone,
|
|
|
+ @ApiParam(name = "学生专业年级班级", required = true)String studentClazz,
|
|
|
+ @ApiParam(name = "学生宿舍", required = true)String dormNumber,
|
|
|
+ @ApiParam(name = "学生校区0(南校区)1(北校区)", required = true)String studentCampus) {
|
|
|
Boolean flag = Boolean.FALSE;
|
|
|
try {
|
|
|
String cardNumber = CreateTokenUtil.getHeadersInfo(request);
|
|
|
+ RepairsStudent repairsStudent = new RepairsStudent(cardNumber,studentName,studentSex,
|
|
|
+ studentPhone,studentOtherPhone,studentClazz,dormNumber,
|
|
|
+ studentCampus,null,null,cardNumber);
|
|
|
+
|
|
|
if (repairsStudent != null) {
|
|
|
repairsStudent.setStudentId(cardNumber);
|
|
|
ArrayList<RepairsStudent> studentArrayList = new ArrayList<>();
|