@RequestMapping("/apply_positions")
public String applyPositions(@RequestParam("id") int id){
String s_account=SecurityUtils.getSubject().getPrincipal().toString();
Student student=studentService.getOne(s_account);
Position position=positionService.getOne(id);
StudentPosition studentPosition=new StudentPosition();
studentPosition.setStudent(student);
studentPosition.setPosition(position);
studentPosition.setApplicationStatus(ApplicationStatus.APPLIED);
studentPositionService.save(studentPosition);
return "redirect:/student/browse_positions";
}
像这种 我要整个都封装在studentPositionService的save方法里吗,