Commit 48dbee81 by rongkailun

【修改】视频管理、专题管理级别筛选

parent 30a24a3a
...@@ -29,7 +29,9 @@ public class NewtopicServiceImpl extends ServiceImpl<NewtopicDao, NewtopicEntity ...@@ -29,7 +29,9 @@ public class NewtopicServiceImpl extends ServiceImpl<NewtopicDao, NewtopicEntity
queryWrapper.orderByDesc("ClassId"); queryWrapper.orderByDesc("ClassId");
queryWrapper.eq("parentid",0); queryWrapper.eq("parentid",0);
if(params.containsKey("levels")) { if(params.containsKey("levels")) {
if(params.get("levels") !=null){
queryWrapper.eq("levels",params.get("levels")); queryWrapper.eq("levels",params.get("levels"));
}
} else{ } else{
queryWrapper.gt("levels",0); queryWrapper.gt("levels",0);
} }
......
...@@ -67,9 +67,14 @@ ...@@ -67,9 +67,14 @@
<if test="params.clanguage !=null and params.clanguage !=''"> <if test="params.clanguage !=null and params.clanguage !=''">
and clanguage =#{params.clanguage} and clanguage =#{params.clanguage}
</if> </if>
<if test="params.levels !=null"> <choose>
and levels = #{params.levels} <when test="params.levels !=null">
</if> AND levels = #{newsParams.levels}
</when>
<otherwise>
AND levels > 0
</otherwise>
</choose>
ORDER BY releasedate desc ORDER BY releasedate desc
</select> </select>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment