67,513
社区成员
发帖
与我相关
我的任务
分享
<sql id="sel_sql">
SELECT * FROM NEWS
<trim prefix="where" prefixOverrides="and">
<if test="user_id!=0 and user_id!=null">
and user_id=#{user_id}
</if>
<if test="title!='' and title!=null">
and title like '%${title}%'
</if>
<if test="content!='' and content !=null">
and content like '$%{content}%'
</if>
<if test="timeLine !=null and timeLine !=''">
and createdate #{timeLine}
</if>
</trim>
ORDER BY CREATEDATE
</sql>