puzhibing
2023-11-25 53e7558400dcacecdce70e39ebfe1727740f9296
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package com.dsh.other.controller;
 
 
import com.dsh.other.entity.SysLoginLog;
import com.dsh.other.service.SysLoginLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
import java.util.Date;
 
@RestController
@RequestMapping("")
public class UserLoginLogController {
 
 
    @Autowired
    private SysLoginLogService ssllService;
 
 
    @PostMapping("/appUser/logOut")
    public void logOut(@RequestBody Integer appUserId) {
        SysLoginLog sysLoginLog = new SysLoginLog();
        sysLoginLog.setCreatetime(new Date());
        sysLoginLog.setUserid(appUserId);
        sysLoginLog.setSucceed("执行成功");
        sysLoginLog.setMessage("退出成功");
        sysLoginLog.setLogname("APP用户退出账号");
        ssllService.save(sysLoginLog);
    }
 
    @PostMapping("/appUser/cancellation")
    public void cancellation(@RequestBody Integer appUserId) {
        SysLoginLog sysLoginLog = new SysLoginLog();
        sysLoginLog.setCreatetime(new Date());
        sysLoginLog.setUserid(appUserId);
        sysLoginLog.setSucceed("执行成功");
        sysLoginLog.setMessage("注销成功");
        sysLoginLog.setLogname("APP用户注销账号");
        ssllService.save(sysLoginLog);
    }
 
 
}