-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
55 changed files
with
2,215 additions
and
245 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
...min/src/main/java/com/oddfar/campus/admin/controller/monitor/SysLogininforController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
package com.oddfar.campus.admin.controller.monitor; | ||
|
||
import com.oddfar.campus.common.annotation.ApiResource; | ||
import com.oddfar.campus.common.annotation.Log; | ||
import com.oddfar.campus.common.domain.PageResult; | ||
import com.oddfar.campus.common.domain.R; | ||
import com.oddfar.campus.common.domain.entity.SysLoginLogEntity; | ||
import com.oddfar.campus.common.enums.ResBizTypeEnum; | ||
import com.oddfar.campus.framework.service.SysLoginLogService; | ||
import com.oddfar.campus.framework.web.service.SysPasswordService; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.security.access.prepost.PreAuthorize; | ||
import org.springframework.web.bind.annotation.*; | ||
|
||
|
||
/** | ||
* 系统访问记录 | ||
* | ||
* @author ruoyi | ||
*/ | ||
@RestController | ||
@RequestMapping("/monitor/logininfor") | ||
@Log(openLog = false) | ||
@ApiResource(name = "登录日志管理", resBizType = ResBizTypeEnum.SYSTEM) | ||
public class SysLogininforController { | ||
@Autowired | ||
private SysLoginLogService logininforService; | ||
|
||
@Autowired | ||
private SysPasswordService passwordService; | ||
|
||
@PreAuthorize("@ss.hasPermi('monitor:logininfor:list')") | ||
@GetMapping(value = "/list",name = "登录日志-分类列表") | ||
public R list(SysLoginLogEntity logininfor) { | ||
PageResult<SysLoginLogEntity> page = logininforService.selectLogininforPage(logininfor); | ||
return R.ok().put(page); | ||
} | ||
|
||
@PreAuthorize("@ss.hasPermi('monitor:logininfor:remove')") | ||
@DeleteMapping(value = "/{infoIds}",name = "登录日志-删除") | ||
public R remove(@PathVariable Long[] infoIds) { | ||
return R.ok(logininforService.deleteLogininforByIds(infoIds)); | ||
} | ||
|
||
@PreAuthorize("@ss.hasPermi('monitor:logininfor:remove')") | ||
@DeleteMapping(value = "/clean",name = "登录日志-清空") | ||
public R clean() { | ||
logininforService.cleanLogininfor(); | ||
return R.ok(); | ||
} | ||
|
||
@PreAuthorize("@ss.hasPermi('monitor:logininfor:unlock')") | ||
@GetMapping(value = "/unlock/{userName}",name = "登录日志-解锁") | ||
public R unlock(@PathVariable("userName") String userName) { | ||
passwordService.clearLoginRecordCache(userName); | ||
return R.ok(); | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
...-admin/src/main/java/com/oddfar/campus/admin/controller/monitor/SysOperlogController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package com.oddfar.campus.admin.controller.monitor; | ||
|
||
import com.oddfar.campus.common.annotation.ApiResource; | ||
import com.oddfar.campus.common.annotation.Log; | ||
import com.oddfar.campus.common.domain.PageResult; | ||
import com.oddfar.campus.common.domain.R; | ||
import com.oddfar.campus.common.domain.entity.SysOperLogEntity; | ||
import com.oddfar.campus.common.enums.ResBizTypeEnum; | ||
import com.oddfar.campus.framework.service.SysOperLogService; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.security.access.prepost.PreAuthorize; | ||
import org.springframework.web.bind.annotation.*; | ||
|
||
/** | ||
* 操作日志记录 | ||
*/ | ||
@RestController | ||
@RequestMapping("/monitor/operlog") | ||
@Log(openLog = false) | ||
@ApiResource(name = "操作日志管理", resBizType = ResBizTypeEnum.SYSTEM) | ||
public class SysOperlogController { | ||
|
||
@Autowired | ||
private SysOperLogService operLogService; | ||
|
||
@PreAuthorize("@ss.hasPermi('monitor:operlog:list')") | ||
@GetMapping(value = "/list", name = "操作日志-分页") | ||
public R list(SysOperLogEntity operLog) { | ||
PageResult<SysOperLogEntity> page = operLogService.selectOperLogPage(operLog); | ||
return R.ok().put(page); | ||
} | ||
|
||
|
||
@PreAuthorize("@ss.hasPermi('monitor:operlog:remove')") | ||
@DeleteMapping(value = "/{operIds}", name = "操作日志-删除") | ||
public R remove(@PathVariable Long[] operIds) { | ||
return R.ok(operLogService.deleteOperLogByIds(operIds)); | ||
} | ||
|
||
@PreAuthorize("@ss.hasPermi('monitor:operlog:remove')") | ||
@DeleteMapping(value = "/clean", name = "操作日志-清空") | ||
public R clean() { | ||
operLogService.cleanOperLog(); | ||
return R.ok(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.