|
@ -46,6 +46,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* Created by zhangdan on 2017/12/25.
|
|
@ -1149,12 +1150,7 @@ public class EduArticleService {
|
|
|
|
|
|
String sql = "select batch_no code from wlyy_health_edu_article_patient_copy group by batch_no";
|
|
|
List<Map<String, Object>> queryids = jdbcTemplate.queryForList(sql);
|
|
|
List<String> ids = new ArrayList<>();
|
|
|
for (Map<String, Object> idMap : queryids) {
|
|
|
if (idMap.containsKey("code") && !org.springframework.util.StringUtils.isEmpty(idMap.get("code"))) {
|
|
|
ids.add(idMap.get("code").toString());
|
|
|
}
|
|
|
}
|
|
|
List<String> ids = queryids.stream().map(one -> one.containsKey("code") ? one.get("code").toString() : "").collect(Collectors.toList());
|
|
|
int count = deleteEsByBatchNo(ids);
|
|
|
returnMap.put("deleteBatch", ids.size());
|
|
|
returnMap.put("deleteCount", Integer.valueOf(count));
|
|
@ -1249,4 +1245,5 @@ public class EduArticleService {
|
|
|
resultMap.put("count", a);
|
|
|
return resultMap;
|
|
|
}
|
|
|
|
|
|
}
|