feat: 合并配置审核到适配验证页,支持版本切换、编辑、审批/拒绝
This commit is contained in:
@@ -16,6 +16,7 @@ public class SiteAccessSummaryDTO {
|
||||
private int validCount;
|
||||
private int invalidCount;
|
||||
private int uncheckedCount;
|
||||
private int pendingConfigCount;
|
||||
private LocalDateTime lastSubmitted;
|
||||
private List<AccessPageSummaryDTO> pages;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,9 @@ import com.par.core.dto.AccessPageSummaryDTO;
|
||||
import com.par.core.dto.AccessResultDTO;
|
||||
import com.par.core.dto.SiteAccessSummaryDTO;
|
||||
import com.par.core.entity.AccessResult;
|
||||
import com.par.core.entity.SiteConfig;
|
||||
import com.par.core.mapper.AccessResultMapper;
|
||||
import com.par.core.mapper.SiteConfigMapper;
|
||||
import com.par.core.service.AccessResultService;
|
||||
import com.par.core.storage.CachedStorageService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -22,6 +24,7 @@ import java.util.stream.Collectors;
|
||||
public class AccessResultServiceImpl implements AccessResultService {
|
||||
|
||||
private final AccessResultMapper mapper;
|
||||
private final SiteConfigMapper siteConfigMapper;
|
||||
private final CachedStorageService storageService;
|
||||
|
||||
@Override
|
||||
@@ -154,6 +157,19 @@ public class AccessResultServiceImpl implements AccessResultService {
|
||||
site.setUncheckedCount(site.getTotalResults() - site.getValidCount() - site.getInvalidCount());
|
||||
}
|
||||
|
||||
// 补充待审核配置数量
|
||||
List<SiteConfig> pendingConfigs = siteConfigMapper.selectPending();
|
||||
for (SiteConfig c : pendingConfigs) {
|
||||
String sid = c.getSiteId();
|
||||
SiteAccessSummaryDTO site = siteMap.computeIfAbsent(sid, k -> {
|
||||
SiteAccessSummaryDTO s = new SiteAccessSummaryDTO();
|
||||
s.setSiteId(k);
|
||||
s.setPages(new ArrayList<>());
|
||||
return s;
|
||||
});
|
||||
site.setPendingConfigCount(site.getPendingConfigCount() + 1);
|
||||
}
|
||||
|
||||
return new ArrayList<>(siteMap.values());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user