| | |
| | | <property name="alias" value="r"/> |
| | | </include> |
| | | from ba_log r |
| | | where |
| | | <trim prefix="and" suffixOverrides="and"> |
| | | <trim prefix="where " suffixOverrides="and"> |
| | | <if test="userId != null and userId != ''"> |
| | | user_id = #{userId,jdbcType=BIGINT} and |
| | | </if> |
| | |
| | | res_ip =#{resIp,jdbcType=VARCHAR} and |
| | | </if> |
| | | </trim> |
| | | order by id DESC |
| | | order by id desc |
| | | <trim prefix="limit " > |
| | | <if test="start != null and count != null"> |
| | | #{start}, #{count} |
| | | </if> |
| | | </trim> |
| | | </select> |
| | | |
| | | <select id="selectSomeCount" resultType="java.lang.Long"> |
| | | select count(1) |
| | | from ba_log r |
| | | <trim prefix="where " suffixOverrides="and"> |
| | | <if test="userId != null and userId != ''"> |
| | | user_id = #{userId,jdbcType=BIGINT} and |
| | | </if> |
| | | <if test="content != null and content != '' "> |
| | | content like concat('%', #{content}, '%') and |
| | | </if> |
| | | <if test="createDt != null and createDt != '' "> |
| | | create_dt = #{createDt,jdbcType=TIMESTAMP} and |
| | | </if> |
| | | <if test="resIp != null and resIp != '' "> |
| | | res_ip =#{resIp,jdbcType=VARCHAR} and |
| | | </if> |
| | | </trim> |
| | | </select> |
| | | </mapper> |