调整栏目查询异常
This commit is contained in:
parent
c07bdfd6c7
commit
856f874aed
|
|
@ -78,7 +78,7 @@ public interface NewsMapper {
|
||||||
|
|
||||||
|
|
||||||
@Select("<script>" +
|
@Select("<script>" +
|
||||||
"select " +
|
"select distinct " +
|
||||||
"news.id as id," +
|
"news.id as id," +
|
||||||
"news.draft_id as draftId," +
|
"news.draft_id as draftId," +
|
||||||
"news.title as title," +
|
"news.title as title," +
|
||||||
|
|
@ -120,7 +120,7 @@ public interface NewsMapper {
|
||||||
@Param("offset") int offset);
|
@Param("offset") int offset);
|
||||||
|
|
||||||
@Select("<script>" +
|
@Select("<script>" +
|
||||||
"select count(*) from news " +
|
"select count(*) from (select distinct news.* from news " +
|
||||||
"<if test=\"column != null\">" +
|
"<if test=\"column != null\">" +
|
||||||
"inner join news_column_rel on news.id = news_column_rel.news_id " +
|
"inner join news_column_rel on news.id = news_column_rel.news_id " +
|
||||||
"</if>" +
|
"</if>" +
|
||||||
|
|
@ -134,7 +134,7 @@ public interface NewsMapper {
|
||||||
"<if test=\"status != null\">" +
|
"<if test=\"status != null\">" +
|
||||||
"and news.status = #{status} " +
|
"and news.status = #{status} " +
|
||||||
"</if>" +
|
"</if>" +
|
||||||
"</where>" +
|
"</where>) tmp" +
|
||||||
"</script>")
|
"</script>")
|
||||||
int queryTotal(@Param("keyword") String keyword,
|
int queryTotal(@Param("keyword") String keyword,
|
||||||
@Param("column") String columnParam,
|
@Param("column") String columnParam,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue