Browse Source

修改日志系统查询

zhongwei
段飞宇 1 year ago
parent
commit
c8afc3c596
  1. 3
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/controller/SysLogController.java
  2. 4
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/entity/SysLog.java
  3. 8
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/SysLogMapper.java
  4. 34
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/SysLogMapper.xml
  5. 3
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/SysLogService.java
  6. 2
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/SysLogServiceImpl.java

3
hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/controller/SysLogController.java

@ -95,9 +95,6 @@ public class SysLogController {
* 根据Id获取日志数据 * 根据Id获取日志数据
* @return * @return
*/ */
@ApiResponses({
@ApiResponse(code = 200,message = "OK",response = SysLog.class),
})
@ApiOperation("根据Id获取日志数据") @ApiOperation("根据Id获取日志数据")
@GetMapping("/get/{id}") @GetMapping("/get/{id}")
public R getById(@PathVariable Long id) { public R getById(@PathVariable Long id) {

4
hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/entity/SysLog.java

@ -1,5 +1,7 @@
package com.hnac.hzims.middle.systemlog.entity; package com.hnac.hzims.middle.systemlog.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import java.time.LocalDateTime; import java.time.LocalDateTime;
@ -36,7 +38,7 @@ public class SysLog implements Serializable {
/** /**
* 操作日志编号 * 操作日志编号
*/ */
@TableField("id") @TableId(value = "id",type = IdType.ASSIGN_ID)
private Long id; private Long id;

8
hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/SysLogMapper.java

@ -37,4 +37,12 @@ public interface SysLogMapper extends BaseMapper<SysLog> {
* @return * @return
*/ */
IPage<StatisticsTitleResponseVo> statisticsTitleByModuleName(Page<StatisticsTitleResponseVo> moduleName, @Param("statisticsVo") StatisticsVo statisticsVo); IPage<StatisticsTitleResponseVo> statisticsTitleByModuleName(Page<StatisticsTitleResponseVo> moduleName, @Param("statisticsVo") StatisticsVo statisticsVo);
/**
* 根据Id获取日志数据
* @param id
* @return
*/
SysLog getSysLogById(@Param("id") Long id);
} }

34
hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/SysLogMapper.xml

@ -35,4 +35,38 @@
group by title; group by title;
</select> </select>
<select id="getSysLogById" resultType="com.hnac.hzims.middle.systemlog.entity.SysLog">
select id,
tenant_id,
server_ip,
server_host,
server_name,
env,
operation_user_id,
operation_user_name,
path,
user_agent,
method,
method_class,
method_name,
cost_time,
parameter,
module_name,
title,
action,
operator_type,
business_type,
json_result,
local_ip,
error_msg,
operation_time,
status,
create_time,
update_time,
is_deleted
from hzims_sys_log
where id = #{id}
</select>
</mapper> </mapper>

3
hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/SysLogService.java

@ -46,4 +46,7 @@ public interface SysLogService extends IService<SysLog> {
*/ */
IPage<StatisticsTitleResponseVo> statisticsTitleByModuleName(Page<StatisticsTitleResponseVo> statisticsTitleResponseVoPage, IPage<StatisticsTitleResponseVo> statisticsTitleByModuleName(Page<StatisticsTitleResponseVo> statisticsTitleResponseVoPage,
StatisticsVo statisticsVo); StatisticsVo statisticsVo);
} }

2
hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/SysLogServiceImpl.java

@ -67,6 +67,8 @@ public class SysLogServiceImpl extends ServiceImpl<SysLogMapper, SysLog> impleme
} }
/** /**
* 日志查询接口 * 日志查询接口
* @param sysLog * @param sysLog

Loading…
Cancel
Save