<?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>
|