From 6fe27234c4a38cbb4f702c41417b5fdbff529485 Mon Sep 17 00:00:00 2001 From: Mzaxd Date: Thu, 20 Apr 2023 15:16:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9ReportQueryVo,=E6=94=B9=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8=E6=A0=87=E7=AD=BE=E5=85=B3=E7=B3=BB=E5=AE=9E=E4=BD=93?= =?UTF-8?q?=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/adc/da/report/eo/ReportLabelEntity.java | 13 ++++++++++--- .../report/service/impl/IReportServiceImpl.java | 8 +++++--- .../java/com/adc/da/report/vo/ReportQueryVo.java | 16 +++------------- 3 files changed, 18 insertions(+), 19 deletions(-) diff --git a/adc-da-report/src/main/java/com/adc/da/report/eo/ReportLabelEntity.java b/adc-da-report/src/main/java/com/adc/da/report/eo/ReportLabelEntity.java index 5ce751c..e2fa208 100644 --- a/adc-da-report/src/main/java/com/adc/da/report/eo/ReportLabelEntity.java +++ b/adc-da-report/src/main/java/com/adc/da/report/eo/ReportLabelEntity.java @@ -1,5 +1,6 @@ package com.adc.da.report.eo; +import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; @@ -20,14 +21,20 @@ import lombok.experimental.Accessors; @AllArgsConstructor @Accessors(chain = true) public class ReportLabelEntity implements Serializable { + /** - * + * + */ + @TableId(value = "id",type = IdType.INPUT) + private String id; + + /** + * 报告id */ - @TableId private String reportId; /** - * + * 标签id */ private String labelId; diff --git a/adc-da-report/src/main/java/com/adc/da/report/service/impl/IReportServiceImpl.java b/adc-da-report/src/main/java/com/adc/da/report/service/impl/IReportServiceImpl.java index bce1176..6d5ace9 100644 --- a/adc-da-report/src/main/java/com/adc/da/report/service/impl/IReportServiceImpl.java +++ b/adc-da-report/src/main/java/com/adc/da/report/service/impl/IReportServiceImpl.java @@ -19,6 +19,7 @@ import com.adc.da.util.utils.UUID; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import lombok.extern.slf4j.Slf4j; import javax.annotation.Resource; @@ -45,7 +46,8 @@ import java.util.stream.Collectors; @Slf4j @Service -public class IReportServiceImpl implements IReportService { +public class IReportServiceImpl extends ServiceImpl + implements IReportService { @Resource private StringRedisTemplate stringRedisTemplate; @@ -107,7 +109,7 @@ public class IReportServiceImpl implements IReportService { //插入报表标签关系表 labelList.forEach((label) -> { - ReportLabelEntity reportLabelEntity = new ReportLabelEntity(entity.getId(), label); + ReportLabelEntity reportLabelEntity = new ReportLabelEntity(UUID.randomUUID10(), entity.getId(), label); reportLabelDao.insert(reportLabelEntity); }); @@ -145,7 +147,7 @@ public class IReportServiceImpl implements IReportService { reportLabelDao.deleteById(entity.getId()); //插入报表标签关系表 labelList.forEach((label) -> { - ReportLabelEntity reportLabelEntity = new ReportLabelEntity(entity.getId(), label); + ReportLabelEntity reportLabelEntity = new ReportLabelEntity(UUID.randomUUID10(), entity.getId(), label); reportLabelDao.insert(reportLabelEntity); }); diff --git a/adc-da-report/src/main/java/com/adc/da/report/vo/ReportQueryVo.java b/adc-da-report/src/main/java/com/adc/da/report/vo/ReportQueryVo.java index 6a185fb..d60dc75 100644 --- a/adc-da-report/src/main/java/com/adc/da/report/vo/ReportQueryVo.java +++ b/adc-da-report/src/main/java/com/adc/da/report/vo/ReportQueryVo.java @@ -22,24 +22,14 @@ public class ReportQueryVo { private int pageSize; /** - * 搜索内容 + * 全文模糊检索的关键词 */ private String keyContent; /** - * 标签1 + * 标签集合 */ - private List labelOneId; - - /** - * 标签2 - */ - private List labelTwoId; - - /** - * 标签3 - */ - private List labelThreeId; + private List labelId; /** * 年