From c8afc3c596c3ecb2fadfd2cd0e9222b8c6b5b743 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AE=B5=E9=A3=9E=E5=AE=87?= <2684146481@qq.com> Date: Fri, 30 Jun 2023 11:06:24 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../systemlog/controller/SysLogController.java | 3 -- .../hnac/hzims/middle/systemlog/entity/SysLog.java | 4 ++- .../middle/systemlog/mapper/SysLogMapper.java | 8 +++++ .../hzims/middle/systemlog/mapper/SysLogMapper.xml | 34 ++++++++++++++++++++++ .../middle/systemlog/service/SysLogService.java | 3 ++ .../systemlog/service/impl/SysLogServiceImpl.java | 2 ++ 6 files changed, 50 insertions(+), 4 deletions(-) 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..c3c4e3e 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,9 +95,6 @@ public class SysLogController { * 根据Id获取日志数据 * @return */ - @ApiResponses({ - @ApiResponse(code = 200,message = "OK",response = SysLog.class), - }) @ApiOperation("根据Id获取日志数据") @GetMapping("/get/{id}") public R getById(@PathVariable 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/SysLogMapper.java b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/SysLogMapper.java index 98df167..84065eb 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 @@ -37,4 +37,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/SysLogServiceImpl.java b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/SysLogServiceImpl.java index 31b9d93..e4a9e94 100644 --- a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/SysLogServiceImpl.java +++ b/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 impleme } + + /** * 日志查询接口 * @param sysLog From f417ae36270bee13e432a5dac454cc2477e83829 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AE=B5=E9=A3=9E=E5=AE=87?= <2684146481@qq.com> Date: Fri, 30 Jun 2023 11:24:01 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/hnac/hzims/middle/MiddleApplication.java | 2 +- .../main/java/com/hnac/hzims/middle/systemlog/entity/Statistics.java | 3 ++- .../java/com/hnac/hzims/middle/systemlog/mapper/StatisticsMapper.java | 3 +++ .../main/java/com/hnac/hzims/middle/systemlog/mapper/SysLogMapper.java | 3 +++ 4 files changed, 9 insertions(+), 2 deletions(-) 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/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/mapper/StatisticsMapper.java b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/StatisticsMapper.java index f314b73..ec84925 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; /** *

@@ -16,6 +18,7 @@ import org.apache.ibatis.annotations.Param; * @author dfy * @since 2023-04-08 */ +@Repository public interface StatisticsMapper extends BaseMapper { 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 84065eb..9d468d3 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; @@ -19,6 +21,7 @@ import java.util.List; * @author dfy * @since 2023-04-04 */ +@Repository public interface SysLogMapper extends BaseMapper { /** From 22db8e5abf4fa7f6accbb12159a5871e8dc18e7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AE=B5=E9=A3=9E=E5=AE=87?= <2684146481@qq.com> Date: Fri, 30 Jun 2023 15:59:08 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E5=88=86=E9=A1=B5=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hzims/middle/systemlog/controller/SysLogController.java | 3 +++ .../hnac/hzims/middle/systemlog/mapper/StatisticsMapper.java | 1 - .../hnac/hzims/middle/systemlog/mapper/StatisticsMapper.xml | 8 ++++++++ .../com/hnac/hzims/middle/systemlog/mapper/SysLogMapper.java | 1 - .../middle/systemlog/service/impl/StatisticsServiceImpl.java | 10 +++------- 5 files changed, 14 insertions(+), 9 deletions(-) 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 c3c4e3e..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 @@ -97,6 +97,9 @@ public class SysLogController { */ @ApiOperation("根据Id获取日志数据") @GetMapping("/get/{id}") + @ApiResponses({ + @ApiResponse(code = 200,message = "OK",response = SysLog.class), + }) 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/mapper/StatisticsMapper.java b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/StatisticsMapper.java index ec84925..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 @@ -18,7 +18,6 @@ import org.springframework.stereotype.Repository; * @author dfy * @since 2023-04-08 */ -@Repository public interface StatisticsMapper extends BaseMapper { 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 9d468d3..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 @@ -21,7 +21,6 @@ import java.util.List; * @author dfy * @since 2023-04-04 */ -@Repository public interface SysLogMapper extends BaseMapper { /** 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