<?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.house365.ws.dao.mapper.LogFieldMapper">

    <resultMap id="infoMap" type="com.house365.beans.entity.LogFieldEntity">
        <result property="id" column="id"/>
        <result property="type" column="type"/>
        <result property="field" column="field"/>
        <result property="fieldName" column="field_name"/>
    </resultMap>

    <select id="queryByConditions" resultMap="infoMap" parameterType="map">
        SELECT *
        FROM log_field
        where 1 = 1
        <if test="type != null and type != ''">
            AND type = #{type}
        </if>
        <if test="field != null and field != ''">
            AND field = #{field}
        </if>
    </select>

</mapper>