This commit is contained in:
ronger 2023-07-19 07:59:59 +08:00
commit f95a65bc5a
3 changed files with 5 additions and 6 deletions

View File

@ -56,7 +56,7 @@ public class PortfolioLuceneServiceImpl implements PortfolioLuceneService {
int totalCount = list.size(); int totalCount = list.size();
int perThreadCount = 3000; int perThreadCount = 3000;
// 加1避免线程池的参数为0 // 加1避免线程池的参数为0
int threadCount = totalCount / perThreadCount + (totalCount % perThreadCount == 0 ? 0 : 1); int threadCount = totalCount / perThreadCount + (totalCount % perThreadCount == 0 ? 1 : 0);
ExecutorService pool = Executors.newFixedThreadPool(threadCount); ExecutorService pool = Executors.newFixedThreadPool(threadCount);
CountDownLatch countDownLatch1 = new CountDownLatch(1); CountDownLatch countDownLatch1 = new CountDownLatch(1);
CountDownLatch countDownLatch2 = new CountDownLatch(threadCount); CountDownLatch countDownLatch2 = new CountDownLatch(threadCount);

View File

@ -131,9 +131,6 @@ public class TagServiceImpl extends AbstractService<Tag> implements TagService {
} else { } else {
tag.setTagIconPath(tag.getTagIconPath()); tag.setTagIconPath(tag.getTagIconPath());
} }
tag.setTagStatus(tag.getTagStatus());
tag.setTagDescription(tag.getTagDescription());
tag.setTagReservation(tag.getTagReservation());
tag.setCreatedTime(new Date()); tag.setCreatedTime(new Date());
tag.setUpdatedTime(tag.getCreatedTime()); tag.setUpdatedTime(tag.getCreatedTime());
result = tagMapper.insertSelective(tag); result = tagMapper.insertSelective(tag);

View File

@ -125,7 +125,9 @@
where topic.id = vtt.id_topic and topic.topic_uri = #{topicName}))) order by updated_time desc where topic.id = vtt.id_topic and topic.topic_uri = #{topicName}))) order by updated_time desc
</select> </select>
<select id="selectArticlesByTagName" resultMap="DTOResultMap"> <select id="selectArticlesByTagName" resultMap="DTOResultMap">
select art.*,su.nickname,su.avatar_url from forest_article art join forest_user su on art.article_author_id = su.id order by updated_time desc select art.*,su.nickname,su.avatar_url from forest_article art join forest_user su on art.article_author_id = su.id where
FIND_IN_SET(#{tagName},art.article_tags) > 0
order by updated_time desc
</select> </select>
<select id="selectUserArticles" resultMap="DTOResultMap"> <select id="selectUserArticles" resultMap="DTOResultMap">
select art.*,su.nickname,su.avatar_url from forest_article art join forest_user su on su.id = #{idUser} select art.*,su.nickname,su.avatar_url from forest_article art join forest_user su on su.id = #{idUser}
@ -162,4 +164,4 @@
and FIND_IN_SET('公告',art.article_tags) > 0 and FIND_IN_SET('公告',art.article_tags) > 0
order by updated_time desc order by updated_time desc
</select> </select>
</mapper> </mapper>