parent
f9a75ded16
commit
21fd53fc3c
@ -0,0 +1,20 @@
|
|||||||
|
package com.markma.leave_manager_spb.controller;
|
||||||
|
|
||||||
|
import com.markma.leave_manager_spb.entity.OutDetail;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import com.markma.leave_manager_spb.repository.OutDetailRepository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/outDetail")
|
||||||
|
public class OutDetailHandler {
|
||||||
|
@Autowired
|
||||||
|
private OutDetailRepository outDetailRepository;
|
||||||
|
|
||||||
|
@GetMapping("/findAll")
|
||||||
|
public List<OutDetail> findAll() {
|
||||||
|
return outDetailRepository.findAll();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
package com.markma.leave_manager_spb.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Data
|
||||||
|
public class OutDetail {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Integer id;
|
||||||
|
private Integer userid;
|
||||||
|
private Integer leave_detail_id;
|
||||||
|
private String out_time;
|
||||||
|
private String return_time;
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
package com.markma.leave_manager_spb.repository;
|
||||||
|
|
||||||
|
import com.markma.leave_manager_spb.entity.OutDetail;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
public interface OutDetailRepository extends JpaRepository<OutDetail, Integer> {
|
||||||
|
}
|
Loading…
Reference in new issue