BannersMapperExt.xml 800 B

1234567891011121314151617181920212223
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.goafanti.common.dao.BannersMapper">
  4. <select id="findBannerList" resultMap="BaseResultMap">
  5. select
  6. <include refid="Base_Column_List" />
  7. from banners where 1=1
  8. <if test="sign != null">
  9. and sign = #{sign,jdbcType=VARCHAR}
  10. </if>
  11. order by id desc
  12. <if test="pageNo != null and pageSize != null">
  13. limit #{pageNo,jdbcType=INTEGER}, #{pageSize,jdbcType=INTEGER}
  14. </if>
  15. </select>
  16. <select id="findBannerListCount" parameterType="java.lang.String" resultType="java.lang.Integer">
  17. select count(1)
  18. from banners where 1=1
  19. <if test="sign != null">
  20. and sign = #{sign,jdbcType=VARCHAR}
  21. </if>
  22. </select>
  23. </mapper>