TestMapper.xml 965 B

1234567891011121314151617181920212223242526
  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.css.simulation.resource.demo.mapper.TestMapper" >
  4. <resultMap id="TestVOMap" type="api.common.pojo.vo.demo.TestVO">
  5. <id column="ID" property="id" jdbcType="VARCHAR" />
  6. <result column="NAME" property="name" jdbcType="VARCHAR" />
  7. <result column="AGE" property="age" jdbcType="INTEGER" />
  8. </resultMap>
  9. <select id="getTestPageList" parameterType="api.common.pojo.param.demo.TestPageParam" resultMap="TestVOMap">
  10. select
  11. id,
  12. name,
  13. age
  14. from test t
  15. <where>
  16. t.is_deleted = '0'
  17. <if test="name != null and name != ''">
  18. and t.name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
  19. </if>
  20. order by create_time desc
  21. </where>
  22. </select>
  23. </mapper>