| | |
| | | from ba_block |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <select id="selectTotal" parameterType="java.lang.Long" resultType="java.lang.Long"> |
| | | <!--@mbg.generated--> |
| | | <select id="selectTotal" parameterType="java.util.Map" resultType="java.lang.Long"> |
| | | select |
| | | count(*) |
| | | from ba_block |
| | | <trim prefix="where "> |
| | | <if test="name != null"> |
| | | name like '%#{name,jdbcType=VARCHAR}%' and |
| | | </if> |
| | | <if test="header != null"> |
| | | header = '#{header,jdbcType=VARCHAR}' and |
| | | </if> |
| | | <if test="phone != null"> |
| | | phone = '#{phone,jdbcType=VARCHAR}' and |
| | | </if> |
| | | <if test="area != null"> |
| | | area = #{area,jdbcType=INTEGER} |
| | | </if> |
| | | </trim> |
| | | <trim prefix="where "> |
| | | <if test="name != null"> |
| | | name like '%#{name,jdbcType=VARCHAR}%' and |
| | | </if> |
| | | <if test="header != null"> |
| | | header = '#{header,jdbcType=VARCHAR}' and |
| | | </if> |
| | | <if test="phone != null"> |
| | | phone = '#{phone,jdbcType=VARCHAR}' and |
| | | </if> |
| | | <if test="area != null"> |
| | | area = #{area,jdbcType=INTEGER} |
| | | </if> |
| | | </trim> |
| | | </select> |
| | | <select id="selectSome" parameterType="java.util.Map" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | |
| | | area = #{area,jdbcType=INTEGER} |
| | | </if> |
| | | </trim> |
| | | order by id DESC |
| | | <trim prefix="limit " > |
| | | <if test="queryStart != null and queryCount != null"> |
| | | #{queryStart}, #{queryCount} |
| | | <if test="start != null and count != null"> |
| | | #{start}, #{count} |
| | | </if> |
| | | </trim> |
| | | </select> |