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); } }