yaozc
2023-07-07 c752e33fe402e2179e7e6795f567d41c044ca3c6
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/rest/AttendanceLeaveController.java
@@ -95,15 +95,16 @@
    @PostMapping(value = "/getYearTimeLength")
    @Log("获取年假时长")
    @ApiOperation("计算请假时长")
    public ResponseEntity<Object> getYearTimeLength() throws ParseException {
        return new ResponseEntity<>(attendanceLeaveService.getYearTimeLength(), HttpStatus.OK);
    @ApiOperation("获取年假时长")
    public ResponseEntity<Object> getYearTimeLength(@RequestBody Long userId) throws ParseException {
        return new ResponseEntity<>(attendanceLeaveService.getYearTimeLength(userId), HttpStatus.OK);
    }
    @PutMapping(value = "/approve")
    @Log("审核功能")
    @ApiOperation("审核功能")
    public ResponseEntity<Object> checkApprove(@Validated @RequestBody AttendanceLeave resources){
    @PreAuthorize("@el.check('attendanceLeave:approve')")
    public ResponseEntity<Object> checkApprove(@Validated @RequestBody AttendanceLeave resources) throws Exception {
        attendanceLeaveService.updateApprove(resources);
        return new ResponseEntity<>(HttpStatus.NO_CONTENT);
    }