Loginlog接口实现
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package com.lovenav.controller;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import com.lovenav.entity.LoginLogs;
|
||||
import com.lovenav.service.LoginLogsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
@RestController
|
||||
public class LoginLogsController {
|
||||
@Autowired
|
||||
LoginLogsService loginLogsService;
|
||||
@RequestMapping("/getUserLoginLogs")
|
||||
public HashMap<Object,Object> getUserLoginLog(LoginLogs loginLogs){
|
||||
|
||||
if (loginLogs==null){
|
||||
return null;
|
||||
}
|
||||
return loginLogsService.getUserLoginLogs(loginLogs);
|
||||
}
|
||||
}
|
@@ -197,11 +197,19 @@ public class UserController {
|
||||
}
|
||||
|
||||
@RequestMapping("/updateUserDetails")
|
||||
public String updateUserDetails(User user){
|
||||
public HashMap<String,Object> updateUserDetails(User user){
|
||||
|
||||
HashMap<String,Object> map=new HashMap<>();
|
||||
if (user==null){
|
||||
return "用户不能为空!";
|
||||
map.put("msg","用户不能为空!");
|
||||
return map;
|
||||
}
|
||||
return userService.updateUserMessage(user);
|
||||
map.put("code",200);
|
||||
map.put("msg",userService.updateUserMessage(user));
|
||||
|
||||
map.put("user",userService.selectByUserId(user));
|
||||
return map;
|
||||
|
||||
}
|
||||
|
||||
@RequestMapping("/deleteUser")
|
||||
|
Reference in New Issue
Block a user