diff --git a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/MiddleApplication.java b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/MiddleApplication.java index f678c01..71bedcb 100644 --- a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/MiddleApplication.java +++ b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/MiddleApplication.java @@ -10,7 +10,7 @@ import org.springframework.context.annotation.ComponentScan; @EnableBladeFeign @SpringCloudApplication -@MapperScan("com.hnac.hzims.*.**.mapper.**") +@MapperScan("com.hnac.hzims.**.mapper.**") @ComponentScan(basePackages = {"com.hnac.*"}) public class MiddleApplication { static { diff --git a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/controller/SysLogController.java b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/controller/SysLogController.java index d36294b..e06411e 100644 --- a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/controller/SysLogController.java +++ b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/controller/SysLogController.java @@ -95,11 +95,11 @@ public class SysLogController { * 根据Id获取日志数据 * @return */ + @ApiOperation("根据Id获取日志数据") + @GetMapping("/get/{id}") @ApiResponses({ @ApiResponse(code = 200,message = "OK",response = SysLog.class), }) - @ApiOperation("根据Id获取日志数据") - @GetMapping("/get/{id}") public R getById(@PathVariable Long id) { SysLog sysLog = sysLogService.getById(id); return R.data(sysLog); diff --git a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/entity/Statistics.java b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/entity/Statistics.java index 7a8a7e9..6dbcae6 100644 --- a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/entity/Statistics.java +++ b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/entity/Statistics.java @@ -1,5 +1,6 @@ package com.hnac.hzims.middle.systemlog.entity; +import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import java.time.LocalDateTime; import com.baomidou.mybatisplus.annotation.TableField; @@ -33,7 +34,7 @@ public class Statistics implements Serializable { * 编号 */ @ApiModelProperty("编号") - @TableField("id") + @TableId("id") private Long id; diff --git a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/entity/SysLog.java b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/entity/SysLog.java index 5bb4897..d9e5131 100644 --- a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/entity/SysLog.java +++ b/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; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; 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; diff --git a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/StatisticsMapper.java b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/StatisticsMapper.java index f314b73..66c3c85 100644 --- a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/StatisticsMapper.java +++ b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/StatisticsMapper.java @@ -6,7 +6,9 @@ import com.hnac.hzims.middle.systemlog.entity.Statistics; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.hnac.hzims.middle.systemlog.vo.StatisticsResponseVo; import com.hnac.hzims.middle.systemlog.vo.StatisticsVo; +import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; /** *

diff --git a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/StatisticsMapper.xml b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/StatisticsMapper.xml index a8c53e1..f8e11c7 100644 --- a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/StatisticsMapper.xml +++ b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/StatisticsMapper.xml @@ -5,6 +5,14 @@ diff --git a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/SysLogMapper.java b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/SysLogMapper.java index 98df167..9bce1df 100644 --- a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/SysLogMapper.java +++ b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/SysLogMapper.java @@ -7,7 +7,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.hnac.hzims.middle.systemlog.vo.StatisticsTitleResponseVo; import com.hnac.hzims.middle.systemlog.vo.StatisticsVo; import com.hnac.hzims.middle.systemlog.vo.SysLogStatisticsVo; +import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; import java.util.List; @@ -37,4 +39,12 @@ public interface SysLogMapper extends BaseMapper { * @return */ IPage statisticsTitleByModuleName(Page moduleName, @Param("statisticsVo") StatisticsVo statisticsVo); + + + /** + * 根据Id获取日志数据 + * @param id + * @return + */ + SysLog getSysLogById(@Param("id") Long id); } diff --git a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/SysLogMapper.xml b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/SysLogMapper.xml index af48743..2ad6ef4 100644 --- a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/SysLogMapper.xml +++ b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/SysLogMapper.xml @@ -35,4 +35,38 @@ group by title; + + + diff --git a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/SysLogService.java b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/SysLogService.java index f61b2d8..1a02aa6 100644 --- a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/SysLogService.java +++ b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/SysLogService.java @@ -46,4 +46,7 @@ public interface SysLogService extends IService { */ IPage statisticsTitleByModuleName(Page statisticsTitleResponseVoPage, StatisticsVo statisticsVo); + + + } diff --git a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/StatisticsServiceImpl.java b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/StatisticsServiceImpl.java index 0df0a4c..e6c9baa 100644 --- a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/StatisticsServiceImpl.java +++ b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/StatisticsServiceImpl.java @@ -33,10 +33,6 @@ public class StatisticsServiceImpl extends ServiceImpl impleme } + + /** * 日志查询接口 * @param sysLog