diff --git a/adc-da-report/src/main/java/com/adc/da/report/service/IReportLabelService.java b/adc-da-report/src/main/java/com/adc/da/report/service/IReportLabelService.java index 0192326..50b1347 100644 --- a/adc-da-report/src/main/java/com/adc/da/report/service/IReportLabelService.java +++ b/adc-da-report/src/main/java/com/adc/da/report/service/IReportLabelService.java @@ -3,8 +3,6 @@ package com.adc.da.report.service; import com.adc.da.report.eo.ReportLabelEntity; import com.baomidou.mybatisplus.extension.service.IService; -import java.util.List; - /** * @author ThinkBook * @description 针对表【ts_report_label】的数据库操作Service @@ -16,5 +14,5 @@ public interface IReportLabelService extends IService { * 根据报表Id删除所有报表标签关系 * @param reportIds 报表id */ - void deleteReportLabelByReportId(List reportIds); + void deleteReportLabelByReportId(String[] reportIds); } 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 8ccadd2..6a1e5a3 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 @@ -151,7 +151,7 @@ public class IReportServiceImpl extends ServiceImpl }); //修改报表标签关系表(先删后增) - iReportLabelService.deleteReportLabelByReportId(Collections.singletonList(entity.getId())); + iReportLabelService.deleteReportLabelByReportId(new String[]{entity.getId()}); //插入报表标签关系表 labelList.forEach((label) -> { @@ -286,7 +286,7 @@ public class IReportServiceImpl extends ServiceImpl List nameList = new ArrayList<>(); String[] idList = ids.split(","); //删除所有报表标签关系记录 - iReportLabelService.deleteReportLabelByReportId(Collections.singletonList(Arrays.toString(idList))); + iReportLabelService.deleteReportLabelByReportId(idList); for (String id : idList) { ReportEntity entity = reportDao.selectById(id); entity.setDelFlag("1"); diff --git a/adc-da-report/src/main/java/com/adc/da/report/service/impl/ReportLabelServiceImpl.java b/adc-da-report/src/main/java/com/adc/da/report/service/impl/ReportLabelServiceImpl.java index 2e56309..3795cc3 100644 --- a/adc-da-report/src/main/java/com/adc/da/report/service/impl/ReportLabelServiceImpl.java +++ b/adc-da-report/src/main/java/com/adc/da/report/service/impl/ReportLabelServiceImpl.java @@ -8,7 +8,6 @@ import com.adc.da.report.dao.mysql.ReportLabelDao; import org.springframework.stereotype.Service; import javax.annotation.Resource; -import java.util.List; /** * @author ThinkBook @@ -23,9 +22,11 @@ public class ReportLabelServiceImpl extends ServiceImpl reportId) { + public void deleteReportLabelByReportId(String[] reportId) { LambdaQueryWrapper reportLabelWrapper = new LambdaQueryWrapper<>(); - reportLabelWrapper.in(ReportLabelEntity::getReportId, reportId); + for (String id : reportId) { + reportLabelWrapper.eq(ReportLabelEntity::getReportId, id); + } reportLabelDao.delete(reportLabelWrapper); } }