From b496b0317d4096e823b8129fdea9490eeb44d9ef Mon Sep 17 00:00:00 2001 From: chuyan <1047381936@qq.com> Date: Tue, 1 Sep 2020 15:35:37 +0800 Subject: [PATCH] =?UTF-8?q?fourth=20deletion=20=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E5=AF=86=E7=A0=81=E6=9B=B4=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HandlingErrorsException.java | 2 + .../codesdream/ase/model/leaves/Leave.java | 48 ------------------- .../repository/leaves/LeaveRepository.java | 10 ---- src/main/resources/application-dev.properties | 2 +- 4 files changed, 3 insertions(+), 59 deletions(-) delete mode 100644 src/main/java/com/codesdream/ase/model/leaves/Leave.java delete mode 100644 src/main/java/com/codesdream/ase/repository/leaves/LeaveRepository.java diff --git a/src/main/java/com/codesdream/ase/exception/innerservererror/HandlingErrorsException.java b/src/main/java/com/codesdream/ase/exception/innerservererror/HandlingErrorsException.java index e87c712..21bf735 100644 --- a/src/main/java/com/codesdream/ase/exception/innerservererror/HandlingErrorsException.java +++ b/src/main/java/com/codesdream/ase/exception/innerservererror/HandlingErrorsException.java @@ -1,11 +1,13 @@ package com.codesdream.ase.exception.innerservererror; import lombok.Data; +import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; // 处理错误对应的异常类 @Data @NoArgsConstructor +@EqualsAndHashCode(callSuper = false) public class HandlingErrorsException extends RuntimeException { public HandlingErrorsException(String msg){ super(msg); diff --git a/src/main/java/com/codesdream/ase/model/leaves/Leave.java b/src/main/java/com/codesdream/ase/model/leaves/Leave.java deleted file mode 100644 index 5f65fc7..0000000 --- a/src/main/java/com/codesdream/ase/model/leaves/Leave.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.codesdream.ase.model.leaves; - -import com.codesdream.ase.model.permission.User; -import lombok.Data; -import java.util.*; -import javax.persistence.*; - -@Data -@Entity -@Table(name = "leaves") -public class Leave { - //请假的编号 - @Id - @GeneratedValue(strategy = GenerationType.AUTO) - private int id; - //发出人 - @Column - private String userFrom; - //审批人容器 - @ManyToMany(cascade = CascadeType.MERGE, fetch = FetchType.LAZY) - private Set userTo; - //请假原因 - @Column - private String reasonToLeave; - - - //请假类型 病假,事假等 - @Column(nullable = false) - private String type; - //批准状态 - @Column(nullable = false) - private String authentication="Pending"; - - //审核备注 - @Column - private String comment; - //开始时间 - @Column(nullable = false) - private Date startTime; - - @Column(nullable = false) - private Date endTime; - //申请时间 - private Date applyTime; - //认证时间 - private Date authTime; - -} diff --git a/src/main/java/com/codesdream/ase/repository/leaves/LeaveRepository.java b/src/main/java/com/codesdream/ase/repository/leaves/LeaveRepository.java deleted file mode 100644 index 80ca8cf..0000000 --- a/src/main/java/com/codesdream/ase/repository/leaves/LeaveRepository.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.codesdream.ase.repository.leaves; -import com.codesdream.ase.model.leaves.Leave; -import org.springframework.data.repository.CrudRepository; - -import java.util.Optional; - -public interface LeaveRepository extends CrudRepository{ - - -} diff --git a/src/main/resources/application-dev.properties b/src/main/resources/application-dev.properties index 240adf1..c743d9e 100644 --- a/src/main/resources/application-dev.properties +++ b/src/main/resources/application-dev.properties @@ -14,7 +14,7 @@ spring.jpa.properties.hibernate.enable_lazy_load_no_trans=true spring.datasource.url=jdbc:mariadb://localhost:3306/ase?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC spring.datasource.username=root -spring.datasource.password=#a9b9fa6422 +spring.datasource.password=mariadbroot spring.datasource.driver-class-name=org.mariadb.jdbc.Driver server.error.whitelabel.enabled=false