mybaitis 中 like 使用百分号统配写法

<select id="find" parameterType="map" resultMap="awardMap">

select *,a.id as a_id,p.id as p_id  

from award a,param_award p

where a.param_award_id = p.id and p.award_name like CONCAT('%','${awardName}','%' ) limit #{start},#{size};

</select>

 

<resultMap type="com.gfz.entity.Award" id="awardMap" autoMapping="true">

<id column="a_id" property="id"/>

<association property="paramAward"  javaType="com.gfz.entity.ParamAward">

<result column="p_id" property="id"/>

<result column="award_name" property="awardName"/>

</association>

</resultMap>

你可能感兴趣的:(like)