CooperateTenantMapper.xml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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.yonge.cooleshow.biz.dal.mapper.CooperateTenantMapper">
  4. <!-- 表字段 -->
  5. <sql id="baseColumns">
  6. t.id_ AS id
  7. , t.cooperate_tenant_name_ AS cooperateTenantName
  8. , t.cooperate_tenant_nature_ AS cooperateTenantNature
  9. , t.contacts_ AS contacts
  10. , t.phone_ AS phone
  11. , t.create_time_ AS createTime
  12. , t.update_time_ AS updateTime
  13. </sql>
  14. <select id="selectPage" resultType="com.yonge.cooleshow.biz.dal.entity.CooperateTenant">
  15. SELECT
  16. <include refid="baseColumns"/>
  17. FROM cooperate_tenant t
  18. <where>
  19. <if test="param.keyword != null">
  20. and (t.cooperate_tenant_name_ like concat('%',#{param.keyword},'%')
  21. or t.contacts_ like concat('%',#{param.keyword},'%')
  22. or t.phone_ like concat('%',#{param.keyword},'%')
  23. )
  24. </if>
  25. <if test="param.cooperateTenantNature != null">
  26. and t.cooperate_tenant_nature_ = #{param.cooperateTenantNature}
  27. </if>
  28. <if test="param.submitStartTime != null">
  29. and t.create_time_ >= #{param.submitStartTime}
  30. </if>
  31. <if test="param.submitEndTime != null">
  32. and #{param.submitEndTime} >= t.create_time_
  33. </if>
  34. </where>
  35. order by t.id_ desc
  36. </select>
  37. </mapper>