12345678910111213141516171819202122232425262728293031 |
- <?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.hssx.cloudmodel.mapper.CompanyMapper">
- <!-- 通用查询映射结果 -->
- <resultMap id="BaseResultMap" type="com.hssx.cloudmodel.entity.Company">
- <id column="id" property="id" />
- <result column="company_name" property="companyName" />
- <result column="company_address" property="companyAddress" />
- <result column="company_type" property="companyType" />
- </resultMap>
- <!-- 通用查询结果列 -->
- <sql id="Base_Column_List">
- id, company_name, company_address, company_type
- </sql>
- <select id="getListByKeyName" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List"/>
- from
- tb_company
- <where>
- <if test="keyName != null and keyName != ''">
- company_name like concat('%',#{keyName},'%')
- </if>
- </where>
- Limit #{start},#{pageSize}
- </select>
- </mapper>
|