|
@@ -5,10 +5,12 @@ import com.qmth.boot.api.constant.ApiConstant;
|
|
import com.qmth.exam.reserve.bean.student.StudentInfo;
|
|
import com.qmth.exam.reserve.bean.student.StudentInfo;
|
|
import com.qmth.exam.reserve.bean.student.WechatBindReq;
|
|
import com.qmth.exam.reserve.bean.student.WechatBindReq;
|
|
import com.qmth.exam.reserve.controller.BaseController;
|
|
import com.qmth.exam.reserve.controller.BaseController;
|
|
|
|
+import com.qmth.exam.reserve.service.StudentService;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.LoggerFactory;
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
+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;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@@ -22,24 +24,26 @@ public class StudentController extends BaseController {
|
|
|
|
|
|
private static final Logger log = LoggerFactory.getLogger(StudentController.class);
|
|
private static final Logger log = LoggerFactory.getLogger(StudentController.class);
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private StudentService studentService;
|
|
|
|
+
|
|
@ApiOperation(value = "考生账号与微信号绑定")
|
|
@ApiOperation(value = "考生账号与微信号绑定")
|
|
@PostMapping(value = "/wechat/binding")
|
|
@PostMapping(value = "/wechat/binding")
|
|
public void binding(@RequestBody WechatBindReq req) {
|
|
public void binding(@RequestBody WechatBindReq req) {
|
|
- //todo
|
|
|
|
|
|
+ req.setStudentId(curLoginStudent().getId());
|
|
|
|
+ studentService.bindingWechat(req);
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "考生账号与微信号解绑")
|
|
@ApiOperation(value = "考生账号与微信号解绑")
|
|
@PostMapping(value = "/wechat/unbind")
|
|
@PostMapping(value = "/wechat/unbind")
|
|
- public void unbind(@RequestBody WechatBindReq req) {
|
|
|
|
- //todo
|
|
|
|
|
|
+ public void unbind() {
|
|
|
|
+ studentService.unbindWechatByStudentId(curLoginStudent().getId());
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "获取考生信息")
|
|
@ApiOperation(value = "获取考生信息")
|
|
@PostMapping(value = "/info")
|
|
@PostMapping(value = "/info")
|
|
public StudentInfo info() {
|
|
public StudentInfo info() {
|
|
- StudentInfo info = new StudentInfo();
|
|
|
|
- //todo
|
|
|
|
- return info;
|
|
|
|
|
|
+ return studentService.findInfoByStudentId(curLoginStudent().getId());
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|