<select id="selectByRecord" resultMap="BaseResultMap" parameterType="com.hka.api.staff.StaffInfo.Staff" >
select
<include refid="Base_Column_List"/>
from staff
<where>
<if test="staffNo!=null and staffNo!='' ">
staff_no = #{staffNo,jdbcType=VARCHAR}
</if>
<if test="staffCode!=null and staffCode!=''">
staff_code = #{staffCode,jdbcType=VARCHAR}
</if>
</where>
</select>
List<Staff> selectByRecord( Staff staff);
不需要用@Param 注解 |