SupplierMapper.xml 3.21 KB
<?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.huaheng.pc.general.supplier.mapper.SupplierMapper">

    <select id="selectEntity" resultType="com.huaheng.pc.general.supplier.domain.Supplier">
        SELECT id, warehouseId, warehouseCode, code, code2, name, address1, address2, city, province, country, postalCode, attentionTo, phoneNum, mobile, faxNum, email, created, createdBy, lastUpdated, lastUpdatedBy, enable, deleted, userDef1, userDef2, userDef3
        FROM supplier
        <where>
            <if test="id != null">
                AND id = #{id}
            </if>
            <if test="warehouseId != null">
                AND warehouseId = #{warehouseId}
            </if>
            <if test="warehouseCode != null">
                AND warehouseCode = #{warehouseCode}
            </if>
            <if test="code != null">
                AND code = #{code}
            </if>
            <if test="code2 != null">
                AND code2 = #{code2}
            </if>
            <if test="name != null">
                AND name = #{name}
            </if>
            <if test="address1 != null">
                AND address1 = #{address1}
            </if>
            <if test="address2 != null">
                AND address2 = #{address2}
            </if>
            <if test="city != null">
                AND city = #{city}
            </if>
            <if test="province != null">
                AND province = #{province}
            </if>
            <if test="country != null">
                AND country = #{country}
            </if>
            <if test="postalCode != null">
                AND postalCode = #{postalCode}
            </if>
            <if test="attentionTo != null">
                AND attentionTo = #{attentionTo}
            </if>
            <if test="phoneNum != null">
                AND phoneNum = #{phoneNum}
            </if>
            <if test="mobile != null">
                AND mobile = #{mobile}
            </if>
            <if test="faxNum != null">
                AND faxNum = #{faxNum}
            </if>
            <if test="email != null">
                AND email = #{email}
            </if>
            <if test="created != null">
                AND created = #{created}
            </if>
            <if test="createdBy != null">
                AND createdBy = #{createdBy}
            </if>
            <if test="lastUpdated != null">
                AND lastUpdated = #{lastUpdated}
            </if>
            <if test="lastUpdatedBy != null">
                AND lastUpdatedBy = #{lastUpdatedBy}
            </if>
            <if test="enable != null">
                AND enable = #{enable}
            </if>
            <if test="deleted != null">
                AND deleted = #{deleted}
            </if>
            <if test="userDef1 != null">
                AND userDef1 = #{userDef1}
            </if>
            <if test="userDef2 != null">
                AND userDef2 = #{userDef2}
            </if>
            <if test="userDef3 != null">
                AND userDef3 = #{userDef3}
            </if>
        </where>
    </select>
    
    
</mapper>