优化博客

This commit is contained in:
limqhz
2022-05-10 02:21:30 +08:00
parent 1826e4bb9a
commit b0b9e80f8a
28 changed files with 339 additions and 227 deletions

View File

@@ -2,4 +2,20 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.quinn.mapper.SourceMapper">
<select id="listPageStar" resultType="com.quinn.pojo.SourceWithStar">
select id,sid,source_name,detail,source_type,category_id,category_name,en_name,file_type,down_record,gmt_create,gmt_update,
(select count(1) from qn_star c where c.topic_id = sid and c.topic_category = 'SOURCE') as star
from qn_source
<where>
<if test="querySource.name!=null and querySource.name != ''">
and source_name like CONCAT('%',#{querySource.name},'%')
</if>
<if test="querySource.category > 0">
and category_id = #{querySource.category}
</if>
</where>
order by gmt_create desc
limit #{myPageParam.pageNum},#{myPageParam.size}
</select>
</mapper>