ci:清理表删除后无效的代码和SQL
This commit is contained in:
+11
-14
@@ -7,7 +7,6 @@ import com.adc.da.report.constant.ReportConstants;
|
||||
import com.adc.da.report.dao.mysql.FileDao;
|
||||
import com.adc.da.report.dao.mysql.ReportDao;
|
||||
import com.adc.da.report.dao.mysql.ReportLabelDao;
|
||||
import com.adc.da.report.dao.mysql.ReportUserDao;
|
||||
import com.adc.da.report.eo.*;
|
||||
import com.adc.da.report.service.*;
|
||||
import com.adc.da.report.util.*;
|
||||
@@ -68,9 +67,6 @@ public class IReportServiceImpl extends ServiceImpl<ReportDao, ReportEntity>
|
||||
@Resource
|
||||
private ReportDao reportDao;
|
||||
|
||||
@Resource
|
||||
private ReportUserDao reportUserDao;
|
||||
|
||||
@Resource
|
||||
private ReportLabelDao reportLabelDao;
|
||||
|
||||
@@ -174,6 +170,7 @@ public class IReportServiceImpl extends ServiceImpl<ReportDao, ReportEntity>
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Deprecated
|
||||
public String insert(ReportEntity entity, List<String> labelList,
|
||||
List<String> reportPreviewUserIdList,
|
||||
List<String> reportPreviewAndDownloadUserIdList) throws IOException {
|
||||
@@ -236,10 +233,10 @@ public class IReportServiceImpl extends ServiceImpl<ReportDao, ReportEntity>
|
||||
});
|
||||
|
||||
} else {
|
||||
entity.setUpdateDate(format.format(new Date()));
|
||||
reportDao.updateById(entity);
|
||||
reportUserDao.delete(new QueryWrapper<ReportUserEntity>()
|
||||
.eq("reportId", entity.getId()));
|
||||
// entity.setUpdateDate(format.format(new Date()));
|
||||
// reportDao.updateById(entity);
|
||||
// reportUserDao.delete(new QueryWrapper<ReportUserEntity>()
|
||||
// .eq("reportId", entity.getId()));
|
||||
|
||||
//修改报表标签关系表(先删后增)
|
||||
iReportLabelService.deleteReportLabelByReportId(new String[]{entity.getId()});
|
||||
@@ -540,9 +537,9 @@ public class IReportServiceImpl extends ServiceImpl<ReportDao, ReportEntity>
|
||||
c.setFileSize(StringUtils.isNotEmpty(fileEntity.getFileSize())
|
||||
? String.valueOf(Integer.parseInt(fileEntity.getFileSize()) / 1024) + "kb" : "0kb");
|
||||
c.setFileName(fileEntity.getFileName());
|
||||
List<String> userIdList = reportUserDao.selectList(
|
||||
new QueryWrapper<ReportUserEntity>().eq("reportId", c.getId()))
|
||||
.stream().map(ReportUserEntity::getUserId).collect(Collectors.toList());
|
||||
// List<String> userIdList = reportUserDao.selectList(
|
||||
// new QueryWrapper<ReportUserEntity>().eq("reportId", c.getId()))
|
||||
// .stream().map(ReportUserEntity::getUserId).collect(Collectors.toList());
|
||||
});
|
||||
return list;
|
||||
}
|
||||
@@ -623,9 +620,9 @@ public class IReportServiceImpl extends ServiceImpl<ReportDao, ReportEntity>
|
||||
c.setFileSize(StringUtils.isNotEmpty(fileEntity.getFileSize())
|
||||
? String.valueOf(Integer.parseInt(fileEntity.getFileSize()) / 1024) + "kb" : "0kb");
|
||||
c.setFileName(fileEntity.getFileName());
|
||||
List<String> userIdList = reportUserDao.selectList(
|
||||
new QueryWrapper<ReportUserEntity>().eq("reportId", c.getId()))
|
||||
.stream().map(ReportUserEntity::getUserId).collect(Collectors.toList());
|
||||
// List<String> userIdList = reportUserDao.selectList(
|
||||
// new QueryWrapper<ReportUserEntity>().eq("reportId", c.getId()))
|
||||
// .stream().map(ReportUserEntity::getUserId).collect(Collectors.toList());
|
||||
});
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
|
||||
<select id="getReportDateList" parameterType="string" resultType="string">
|
||||
select distinct year from TT_REPORT_MANAGE t1
|
||||
left join TR_REPORT_USER t2 on t1.id=t2.reportId
|
||||
where del_flag='0'
|
||||
<if test="usid !='' and usid !=null">
|
||||
and t2.userId=#{usid}
|
||||
@@ -55,13 +54,11 @@
|
||||
pa.user_id
|
||||
FROM
|
||||
TT_REPORT_MANAGE eo
|
||||
LEFT JOIN tr_report_user ru ON eo.id = ru.reportId
|
||||
LEFT JOIN power_apply pa ON pa.report_id = eo.id
|
||||
LEFT JOIN ts_user u on u.USID = eo.createUserId
|
||||
WHERE
|
||||
eo.DEL_FLAG = 0
|
||||
<if test="pageVO.usid !='' and pageVO.usid != null">
|
||||
AND eo.id NOT IN ( SELECT ru.reportId FROM tr_report_user ru WHERE ru.userId = #{pageVO.usid} )
|
||||
AND eo.id NOT IN ( SELECT tt.report_id FROM power_apply tt WHERE tt.user_id = #{pageVO.usid} )
|
||||
AND eo.id NOT IN (SELECT tt.report_id FROM power_apply_act tt LEFT JOIN bus_process_name pro on tt.prc_id = pro.PRC_ID WHERE tt.user_id = #{pageVO.usid} and
|
||||
del_flag != 1 and pro.SUBMIT_STATUS = 1)
|
||||
@@ -120,7 +117,6 @@
|
||||
TT_REPORT_MANAGE eo
|
||||
LEFT JOIN ts_report_content rc ON eo.id = rc.report_id
|
||||
LEFT JOIN ts_user tu ON tu.USID = eo.createUserId
|
||||
LEFT JOIN tr_report_user ru ON eo.id = ru.reportId
|
||||
LEFT JOIN (SELECT report_id, COUNT(id) AS thumbUp FROM report_log_book WHERE type = 3 GROUP BY report_id) AS thumbUpCount ON eo.id = thumbUpCount.report_id
|
||||
LEFT JOIN (SELECT report_id, COUNT(id) AS clicks FROM report_log_book WHERE type = 1 GROUP BY report_id) AS clicksCount ON eo.id = clicksCount.report_id
|
||||
LEFT JOIN (SELECT report_id, COUNT(id) AS download FROM report_log_book WHERE type = 2 GROUP BY report_id) AS downloadCount ON eo.id = downloadCount.report_id
|
||||
|
||||
Reference in New Issue
Block a user