diff --git a/src/main/java/com/codesdream/ase/component/permission/ASEJSONTokenAuthenticationFilter.java b/src/main/java/com/codesdream/ase/component/permission/ASEJSONTokenAuthenticationFilter.java index a518944..e8c0585 100644 --- a/src/main/java/com/codesdream/ase/component/permission/ASEJSONTokenAuthenticationFilter.java +++ b/src/main/java/com/codesdream/ase/component/permission/ASEJSONTokenAuthenticationFilter.java @@ -30,15 +30,9 @@ import java.util.Optional; @Slf4j public class ASEJSONTokenAuthenticationFilter extends OncePerRequestFilter { - @Resource - private JSONParameter jsonParameter; - @Resource private JSONRandomCodeGenerator randomCodeGenerator; - @Resource - private AJAXRequestChecker ajaxRequestChecker; - @Resource private AuthService authService; diff --git a/src/main/java/com/codesdream/ase/controller/LeavesController.java b/src/main/java/com/codesdream/ase/controller/LeavesController.java index 6b19fc6..a415cf2 100644 --- a/src/main/java/com/codesdream/ase/controller/LeavesController.java +++ b/src/main/java/com/codesdream/ase/controller/LeavesController.java @@ -3,8 +3,6 @@ package com.codesdream.ase.controller; import com.alibaba.fastjson.JSONObject; import com.codesdream.ase.component.datamanager.JSONParameter; import com.codesdream.ase.component.json.request.UserLeaveRequest; -import com.codesdream.ase.component.json.respond.FailedSONRespond; -import com.codesdream.ase.component.json.respond.JSONBaseRespondObject; import com.codesdream.ase.component.permission.ASEUsernameEncoder; import com.codesdream.ase.service.LeavesService; import lombok.extern.slf4j.Slf4j; @@ -35,13 +33,13 @@ public class LeavesController { @Resource private ASEUsernameEncoder usernameEncoder; - @RequestMapping(value = "/") + @RequestMapping(value = "/leave") String printLeave(Model model) { return "Leave"; } //提交请假申请 - @RequestMapping(value = "/Leave/check", method = RequestMethod.POST) + @RequestMapping(value = "/leave/check", method = RequestMethod.POST) @ResponseBody String requestLeave(HttpServletRequest request){ diff --git a/src/main/java/com/codesdream/ase/controller/LoginController.java b/src/main/java/com/codesdream/ase/controller/LoginController.java index eb319aa..2c9ee57 100644 --- a/src/main/java/com/codesdream/ase/controller/LoginController.java +++ b/src/main/java/com/codesdream/ase/controller/LoginController.java @@ -37,8 +37,6 @@ public class LoginController { @Resource private IUserService userService; - @Resource - private ASEUsernameEncoder usernameEncoder; @RequestMapping(value = "/login") String printLogin(Model model) { diff --git a/src/main/java/com/codesdream/ase/model/leaves/Leave.java b/src/main/java/com/codesdream/ase/model/leaves/Leave.java index 5cf3b32..e5ef606 100644 --- a/src/main/java/com/codesdream/ase/model/leaves/Leave.java +++ b/src/main/java/com/codesdream/ase/model/leaves/Leave.java @@ -4,9 +4,10 @@ import com.codesdream.ase.model.permission.User; import lombok.Data; import java.util.*; import javax.persistence.*; + @Data @Entity -@Table(name = "leave") +@Table(name = "leaves") public class Leave { @Id @GeneratedValue(strategy = GenerationType.AUTO) @@ -23,15 +24,15 @@ public class Leave { //请假类型 病假,事假等 - @Column(name = "type", nullable = false) + @Column(nullable = false) private String type; //批准状态 - @Column(name = "Authentication", nullable = false) - private String Authentication; + @Column(nullable = false) + private String authentication; //审核备注 @Column - private String Comment; + private String comment; //开始时间 @Column(nullable = false) private Date startTime; diff --git a/src/main/java/com/codesdream/ase/repository/leaves/LeaveRepository.java b/src/main/java/com/codesdream/ase/repository/leaves/LeaveRepository.java index 5ea51c1..ee238b0 100644 --- a/src/main/java/com/codesdream/ase/repository/leaves/LeaveRepository.java +++ b/src/main/java/com/codesdream/ase/repository/leaves/LeaveRepository.java @@ -7,6 +7,5 @@ import java.util.Optional; public interface LeaveRepository extends CrudRepository{ - Optional findByTitle(String title) ; - Optional findByCreator(String creatorName); + }