duhuizhe
2024-04-19 64c4fd3c7067c7626dc960a70b4bc2c3662bc653
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?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="${context.packageName}.mapper.${context.bizEnBigName}Mapper" >
  <select id="selectList" parameterType="${context.packageName}.domain.query.${context.bizEnBigName}Query" resultType="${context.packageName}.domain.${context.bizEnBigName}">
    select <include refid="Base_Column_List"></include>
    from ${context.tableName}
    <where>
      <% for(item in queryTableInfo!){ %>
      <% if(item.name != 'id' ){ %>
      <% if(item.type == 'String' ){ %>
      <if test="${item.propertyName}!=null and ${item.propertyName}!=''">
        and ${item.name} like concat('%',#{${item.propertyName}},'%')
      </if>
      <% }else{ %>
      <if test="${item.propertyName}!=null">
        and ${item.name} =#{${item.propertyName}}
      </if>
      <% } %>
      <% } %>
      <% } %>
    </where>
  </select>
</mapper>