yangys
2024-03-04 c51a042cfb8453265acf2b764b82bd17019b9b1b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.qianwen.mdc.mapper.ManufacturerMapper">
  <resultMap id="BaseResultMap" type="com.qianwen.mdc.domain.Manufacturer">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="name" jdbcType="VARCHAR" property="name" />
  </resultMap>
 
 
    <select id="queryPage" resultType="com.qianwen.mdc.dto.manufacturer.ManufacturerDTO">
      SELECT id,name
      FROM manufacturer
      <where>
           <if test="dto.name != null and dto.name != ''">
               <bind name="name" value="'%' + dto.name + '%'" />
           and name like #{name}
         </if>
      </where>
     </select>
</mapper>