改ReportQueryVo,改报表标签关系实体类

This commit is contained in:
2023-04-20 15:16:14 +08:00
parent a9ca68af08
commit 6fe27234c4
3 changed files with 18 additions and 19 deletions
@@ -1,5 +1,6 @@
package com.adc.da.report.eo; package com.adc.da.report.eo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
@@ -20,14 +21,20 @@ import lombok.experimental.Accessors;
@AllArgsConstructor @AllArgsConstructor
@Accessors(chain = true) @Accessors(chain = true)
public class ReportLabelEntity implements Serializable { public class ReportLabelEntity implements Serializable {
/** /**
* *
*/
@TableId(value = "id",type = IdType.INPUT)
private String id;
/**
* 报告id
*/ */
@TableId
private String reportId; private String reportId;
/** /**
* * 标签id
*/ */
private String labelId; private String labelId;
@@ -19,6 +19,7 @@ import com.adc.da.util.utils.UUID;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import javax.annotation.Resource; import javax.annotation.Resource;
@@ -45,7 +46,8 @@ import java.util.stream.Collectors;
@Slf4j @Slf4j
@Service @Service
public class IReportServiceImpl implements IReportService { public class IReportServiceImpl extends ServiceImpl<ReportDao, ReportEntity>
implements IReportService {
@Resource @Resource
private StringRedisTemplate stringRedisTemplate; private StringRedisTemplate stringRedisTemplate;
@@ -107,7 +109,7 @@ public class IReportServiceImpl implements IReportService {
//插入报表标签关系表 //插入报表标签关系表
labelList.forEach((label) -> { labelList.forEach((label) -> {
ReportLabelEntity reportLabelEntity = new ReportLabelEntity(entity.getId(), label); ReportLabelEntity reportLabelEntity = new ReportLabelEntity(UUID.randomUUID10(), entity.getId(), label);
reportLabelDao.insert(reportLabelEntity); reportLabelDao.insert(reportLabelEntity);
}); });
@@ -145,7 +147,7 @@ public class IReportServiceImpl implements IReportService {
reportLabelDao.deleteById(entity.getId()); reportLabelDao.deleteById(entity.getId());
//插入报表标签关系表 //插入报表标签关系表
labelList.forEach((label) -> { labelList.forEach((label) -> {
ReportLabelEntity reportLabelEntity = new ReportLabelEntity(entity.getId(), label); ReportLabelEntity reportLabelEntity = new ReportLabelEntity(UUID.randomUUID10(), entity.getId(), label);
reportLabelDao.insert(reportLabelEntity); reportLabelDao.insert(reportLabelEntity);
}); });
@@ -22,24 +22,14 @@ public class ReportQueryVo {
private int pageSize; private int pageSize;
/** /**
* 搜索内容 * 全文模糊检索的关键词
*/ */
private String keyContent; private String keyContent;
/** /**
* 标签1 * 标签集合
*/ */
private List<String> labelOneId; private List<String> labelId;
/**
* 标签2
*/
private List<String> labelTwoId;
/**
* 标签3
*/
private List<String> labelThreeId;
/** /**
* 年 * 年