|
@@ -8,6 +8,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
+
|
|
|
/**
|
|
|
* <p>
|
|
|
* 前端控制器
|
|
@@ -22,6 +24,9 @@ public class UserController {
|
|
|
@Autowired
|
|
|
private UserService userService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private HttpServletRequest request;
|
|
|
+
|
|
|
/**
|
|
|
* 管理员登录网页端
|
|
|
* username 用户名
|
|
@@ -40,7 +45,7 @@ public class UserController {
|
|
|
@RequestMapping("/loginEmployee")
|
|
|
public HttpRespMsg loginEmployee(@RequestParam String username, @RequestParam String password) {
|
|
|
String property = System.getProperty("java.io.tmpdir");
|
|
|
- System.out.println("tomcat临时目录=="+property);
|
|
|
+ System.out.println("tomcat临时目录==" + property);
|
|
|
return userService.loginEmployee(username, password);
|
|
|
}
|
|
|
|
|
@@ -49,14 +54,14 @@ public class UserController {
|
|
|
*/
|
|
|
@RequestMapping("/getEmployeeList")
|
|
|
public HttpRespMsg getEmployeeList() {
|
|
|
- return userService.getEmployeeList();
|
|
|
+ return userService.getEmployeeList(request);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 删除用户
|
|
|
*/
|
|
|
@RequestMapping("/deleteUser")
|
|
|
- public HttpRespMsg deleteUser(@RequestParam String userId){
|
|
|
+ public HttpRespMsg deleteUser(@RequestParam String userId) {
|
|
|
return userService.deleteUser(userId);
|
|
|
}
|
|
|
}
|