修复错误代码;

This commit is contained in:
Saturneric 2020-03-17 23:50:53 +08:00
parent 5bb3cfe375
commit 27ebd6205a
5 changed files with 9 additions and 19 deletions

View File

@ -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;

View File

@ -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){

View File

@ -37,8 +37,6 @@ public class LoginController {
@Resource
private IUserService userService;
@Resource
private ASEUsernameEncoder usernameEncoder;
@RequestMapping(value = "/login")
String printLogin(Model model) {

View File

@ -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;

View File

@ -7,6 +7,5 @@ import java.util.Optional;
public interface LeaveRepository extends CrudRepository<Leave, Integer>{
Optional<Leave> findByTitle(String title) ;
Optional<Leave> findByCreator(String creatorName);
}