|  | @@ -80,11 +80,11 @@ public class StudentInstrumentController extends BaseController {
 | 
											
												
													
														|  |          if (studentInstrument.getStudentId() == null) {
 |  |          if (studentInstrument.getStudentId() == null) {
 | 
											
												
													
														|  |              return failed("学生id不能为空");
 |  |              return failed("学生id不能为空");
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  | -        if(studentInstrument.getStartTime() != null){
 |  | 
 | 
											
												
													
														|  | 
 |  | +        if (studentInstrument.getStartTime() != null) {
 | 
											
												
													
														|  |              studentInstrument.setStartTime(DateUtil.trunc(studentInstrument.getStartTime()));
 |  |              studentInstrument.setStartTime(DateUtil.trunc(studentInstrument.getStartTime()));
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -        if(studentInstrument.getEndTime() != null){
 |  | 
 | 
											
												
													
														|  | 
 |  | +        if (studentInstrument.getEndTime() != null) {
 | 
											
												
													
														|  |              studentInstrument.setEndTime(DateUtil.getLastTimeWithDay(studentInstrument.getEndTime()));
 |  |              studentInstrument.setEndTime(DateUtil.getLastTimeWithDay(studentInstrument.getEndTime()));
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |          SysUser student = sysUserFeignService.queryUserById(studentInstrument.getStudentId());
 |  |          SysUser student = sysUserFeignService.queryUserById(studentInstrument.getStudentId());
 | 
											
										
											
												
													
														|  | @@ -92,4 +92,42 @@ public class StudentInstrumentController extends BaseController {
 | 
											
												
													
														|  |          return succeed(studentInstrumentService.addStudentInstrument(studentInstrument));
 |  |          return succeed(studentInstrumentService.addStudentInstrument(studentInstrument));
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +    @ApiOperation(value = "获取乐保信息")
 | 
											
												
													
														|  | 
 |  | +    @GetMapping("/getInfo")
 | 
											
												
													
														|  | 
 |  | +    @PreAuthorize("@pcs.hasPermissions('studentInstrument/getInfo')")
 | 
											
												
													
														|  | 
 |  | +    public HttpResponseResult<StudentInstrument> getInfo(Long id, Integer studentId) {
 | 
											
												
													
														|  | 
 |  | +        SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
											
												
													
														|  | 
 |  | +        if (sysUser == null) {
 | 
											
												
													
														|  | 
 |  | +            return failed("用户信息获取失败");
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +        StudentInstrument studentInstrument = studentInstrumentService.get(id);
 | 
											
												
													
														|  | 
 |  | +        if (studentInstrument == null) {
 | 
											
												
													
														|  | 
 |  | +            return succeed();
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +        if (!studentInstrument.getStudentId().equals(studentId)) {
 | 
											
												
													
														|  | 
 |  | +            return failed("该学生乐器信息不存在");
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +        return succeed(studentInstrument);
 | 
											
												
													
														|  | 
 |  | +    }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +    @ApiOperation(value = "获取乐保信息")
 | 
											
												
													
														|  | 
 |  | +    @PostMapping("/update")
 | 
											
												
													
														|  | 
 |  | +    @PreAuthorize("@pcs.hasPermissions('studentInstrument/update')")
 | 
											
												
													
														|  | 
 |  | +    public HttpResponseResult<StudentInstrument> update(Long id, Integer studentId) {
 | 
											
												
													
														|  | 
 |  | +        SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
											
												
													
														|  | 
 |  | +        if (sysUser == null) {
 | 
											
												
													
														|  | 
 |  | +            return failed("用户信息获取失败");
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +        StudentInstrument studentInstrument = studentInstrumentService.get(id);
 | 
											
												
													
														|  | 
 |  | +        if (studentInstrument == null) {
 | 
											
												
													
														|  | 
 |  | +            return succeed();
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +        if (!studentInstrument.getStudentId().equals(studentId)) {
 | 
											
												
													
														|  | 
 |  | +            return failed("该学生乐器信息不存在");
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +        return succeed(studentInstrument);
 | 
											
												
													
														|  | 
 |  | +    }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |  }
 |  |  }
 |