mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-11-19 03:37:39 +08:00
增加管理员日志详情接口
This commit is contained in:
@@ -28,4 +28,6 @@ import xyz.playedu.common.types.paginate.PaginationResult;
|
||||
*/
|
||||
public interface AdminLogService extends IService<AdminLog> {
|
||||
PaginationResult<AdminLog> paginate(int page, int size, AdminLogPaginateFiler filter);
|
||||
|
||||
AdminLog find(Integer id, Integer adminId);
|
||||
}
|
||||
|
||||
@@ -44,4 +44,12 @@ public class AdminLogServiceImpl extends ServiceImpl<AdminLogMapper, AdminLog>
|
||||
|
||||
return pageResult;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AdminLog find(Integer id, Integer adminId) {
|
||||
if (adminId == 0) {
|
||||
return getOne(query().getWrapper().eq("id", id));
|
||||
}
|
||||
return getOne(query().getWrapper().eq("id", id).eq("admin_id", adminId));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,9 @@
|
||||
</sql>
|
||||
|
||||
<select id="paginate" resultType="xyz.playedu.common.domain.AdminLog">
|
||||
SELECT `admin_logs`.*
|
||||
SELECT `admin_logs`.`id`,`admin_logs`.`admin_id`,`admin_logs`.`admin_name`,`admin_logs`.`module`,`admin_logs`.`title`,
|
||||
`admin_logs`.`opt`,`admin_logs`.`method`,`admin_logs`.`request_method`,`admin_logs`.`url`,`admin_logs`.`ip`,`admin_logs`.`param`,
|
||||
`admin_logs`.`ip_area`,`admin_logs`.`created_at`
|
||||
FROM `admin_logs`
|
||||
<where>
|
||||
<if test="adminId != null">
|
||||
|
||||
Reference in New Issue
Block a user