zhangback
8 天以前 3974fad5d836431e417e99220cc07bb5b0aba331
tms/src/main/resources/mapper/tms/TmsConsignorMapper.xml
@@ -9,8 +9,8 @@
        <result property="consignorCode"    column="consignor_code"    />
        <result property="consignorName"    column="consignor_name"    />
        <result property="customerId"    column="customer_id"    />
        <result property="customerSysCode"    column="customer_sys_code"    />
        <result property="customerName"    column="customer_name"    />
        <result property="customerSysCode"    column="customer_sys_code"    />
        <result property="consignorType"    column="consignor_type"    />
        <result property="contactName"    column="contact_name"    />
        <result property="contactPhone"    column="contact_phone"    />
@@ -29,10 +29,12 @@
        <result property="updateBy"    column="update_by"    />
        <result property="updateTime"    column="update_time"    />
        <result property="remark"    column="remark"    />
        <result property="regionLabel"    column="region_label"    />
        <result property="electronicFenceRange"    column="electronic_fence_range"    />
    </resultMap>
    <sql id="selectTmsConsignorVo">
        select thisTab.id, thisTab.consignor_code, thisTab.consignor_name, thisTab.customer_id, thisTab.customer_sys_code, thisTab.customer_name, thisTab.consignor_type, thisTab.contact_name, thisTab.contact_phone, thisTab.contact_email, thisTab.country_id, thisTab.province_id, thisTab.city_id, thisTab.district_id, thisTab.street_id, thisTab.address_detail, thisTab.dispatch_transport_area, thisTab.map_location, thisTab.status, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time, thisTab.remark from tms_consignor AS thisTab
        select thisTab.id, thisTab.consignor_code, thisTab.consignor_name, thisTab.customer_id, thisTab.customer_name, thisTab.customer_sys_code, thisTab.consignor_type, thisTab.contact_name, thisTab.contact_phone, thisTab.contact_email, thisTab.country_id, thisTab.province_id, thisTab.city_id, thisTab.district_id, thisTab.street_id, thisTab.address_detail, thisTab.dispatch_transport_area, thisTab.map_location, thisTab.status, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time, thisTab.remark, thisTab.region_label ,thisTab.electronic_fence_range from tms_consignor AS thisTab
    </sql>
    <sql id="selectTmsConsignorVoCount">
        select count(0) from tms_consignor as thisTab
@@ -42,14 +44,23 @@
        <if test="consignorCode != null  and consignorCode != ''"> and thisTab.consignor_code = #{consignorCode}</if>
        <if test="consignorName != null  and consignorName != ''"> and  thisTab.consignor_name like concat('%', #{consignorName}, '%')</if>
        <if test="customerId != null "> and thisTab.customer_id = #{customerId}</if>
        <if test="customerSysCode != null  and customerSysCode != ''"> and thisTab.customer_sys_code = #{customerSysCode}</if>
        <if test="customerName != null  and customerName != ''"> and  thisTab.customer_name like concat('%', #{customerName}, '%')</if>
        <if test="customerSysCode != null  and customerSysCode != ''"> and thisTab.customer_sys_code = #{customerSysCode}</if>
        <if test="consignorType != null "> and thisTab.consignor_type = #{consignorType}</if>
        <if test="contactName != null  and contactName != ''"> and  thisTab.contact_name like concat('%', #{contactName}, '%')</if>
        <if test="contactPhone != null  and contactPhone != ''"> and thisTab.contact_phone = #{contactPhone}</if>
        <if test="contactEmail != null  and contactEmail != ''"> and thisTab.contact_email = #{contactEmail}</if>
        <if test="countryId != null  and countryId != ''"> and thisTab.country_id = #{countryId}</if>
        <if test="provinceId != null  and provinceId != ''"> and thisTab.province_id = #{provinceId}</if>
        <if test="cityId != null  and cityId != ''"> and thisTab.city_id = #{cityId}</if>
        <if test="districtId != null  and districtId != ''"> and thisTab.district_id = #{districtId}</if>
        <if test="streetId != null  and streetId != ''"> and thisTab.street_id = #{streetId}</if>
        <if test="addressDetail != null  and addressDetail != ''"> and thisTab.address_detail = #{addressDetail}</if>
        <if test="dispatchTransportArea != null  and dispatchTransportArea != ''"> and thisTab.dispatch_transport_area = #{dispatchTransportArea}</if>
        <if test="mapLocation != null  and mapLocation != ''"> and thisTab.map_location = #{mapLocation}</if>
        <if test="status != null "> and thisTab.status = #{status}</if>
        <if test="updateBy != null  and updateBy != ''"> and thisTab.update_by = #{updateBy}</if>
        <if test="updateTime != null "> and thisTab.update_time = #{updateTime}</if>
        <if test="regionLabel != null  and regionLabel != ''"> and thisTab.region_label = #{regionLabel}</if>
        <if test="electronicFenceRange != null "> and thisTab.electronic_fence_range = #{electronicFenceRange}</if>
    </sql>
    <!--查询-->
@@ -80,8 +91,8 @@
            <if test="consignorCode != null and consignorCode != ''">consignor_code,</if>
            <if test="consignorName != null and consignorName != ''">consignor_name,</if>
            <if test="customerId != null">customer_id,</if>
            <if test="customerSysCode != null and customerSysCode != ''">customer_sys_code,</if>
            <if test="customerName != null">customer_name,</if>
            <if test="customerSysCode != null and customerSysCode != ''">customer_sys_code,</if>
            <if test="consignorType != null">consignor_type,</if>
            <if test="contactName != null and contactName != ''">contact_name,</if>
            <if test="contactPhone != null">contact_phone,</if>
@@ -100,13 +111,15 @@
            <if test="updateBy != null">update_by,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="remark != null">remark,</if>
            <if test="regionLabel != null">region_label,</if>
            <if test="electronicFenceRange != null">electronic_fence_range,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="consignorCode != null and consignorCode != ''">#{consignorCode},</if>
            <if test="consignorName != null and consignorName != ''">#{consignorName},</if>
            <if test="customerId != null">#{customerId},</if>
            <if test="customerSysCode != null and customerSysCode != ''">#{customerSysCode},</if>
            <if test="customerName != null">#{customerName},</if>
            <if test="customerSysCode != null and customerSysCode != ''">#{customerSysCode},</if>
            <if test="consignorType != null">#{consignorType},</if>
            <if test="contactName != null and contactName != ''">#{contactName},</if>
            <if test="contactPhone != null">#{contactPhone},</if>
@@ -125,17 +138,19 @@
            <if test="updateBy != null">#{updateBy},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="remark != null">#{remark},</if>
            <if test="regionLabel != null">#{regionLabel},</if>
            <if test="electronicFenceRange != null">#{electronicFenceRange},</if>
        </trim>
    </insert>
    <insert id="insertTmsConsignorBatch" parameterType="java.util.List"  useGeneratedKeys="true" keyProperty="id">
        insert into tms_consignor
        <trim prefix="(" suffix=") values" suffixOverrides=",">
            id,consignor_code,consignor_name,customer_id,customer_sys_code,customer_name,consignor_type,contact_name,contact_phone,contact_email,country_id,province_id,city_id,district_id,street_id,address_detail,dispatch_transport_area,map_location,status,create_by,create_time,update_by,update_time,remark,
            id,consignor_code,consignor_name,customer_id,customer_name,customer_sys_code,consignor_type,contact_name,contact_phone,contact_email,country_id,province_id,city_id,district_id,street_id,address_detail,dispatch_transport_area,map_location,status,create_by,create_time,update_by,update_time,remark,region_label,electronic_fence_range
        </trim>
        <foreach item="item" index="index" collection="list" separator=",">
            <trim prefix="(" suffix=") " suffixOverrides=",">
                #{item.id},#{item.consignorCode},#{item.consignorName},#{item.customerId},#{item.customerSysCode},#{item.customerName},#{item.consignorType},#{item.contactName},#{item.contactPhone},#{item.contactEmail},#{item.countryId},#{item.provinceId},#{item.cityId},#{item.districtId},#{item.streetId},#{item.addressDetail},#{item.dispatchTransportArea},#{item.mapLocation},#{item.status},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.remark},
                #{item.id},#{item.consignorCode},#{item.consignorName},#{item.customerId},#{item.customerName},#{item.customerSysCode},#{item.consignorType},#{item.contactName},#{item.contactPhone},#{item.contactEmail},#{item.countryId},#{item.provinceId},#{item.cityId},#{item.districtId},#{item.streetId},#{item.addressDetail},#{item.dispatchTransportArea},#{item.mapLocation},#{item.status},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.remark},#{item.regionLabel},#{item.electronicFenceRange},
            </trim>
        </foreach>
    </insert>
@@ -147,8 +162,8 @@
            <if test="consignorCode != null and consignorCode != ''">consignor_code = #{consignorCode},</if>
            <if test="consignorName != null and consignorName != ''">consignor_name = #{consignorName},</if>
            <if test="customerId != null">customer_id = #{customerId},</if>
            <if test="customerSysCode != null and customerSysCode != ''">customer_sys_code = #{customerSysCode},</if>
            <if test="customerName != null">customer_name = #{customerName},</if>
            <if test="customerSysCode != null and customerSysCode != ''">customer_sys_code = #{customerSysCode},</if>
            <if test="consignorType != null">consignor_type = #{consignorType},</if>
            <if test="contactName != null and contactName != ''">contact_name = #{contactName},</if>
            <if test="contactPhone != null">contact_phone = #{contactPhone},</if>
@@ -167,6 +182,8 @@
            <if test="updateBy != null">update_by = #{updateBy},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="remark != null">remark = #{remark},</if>
            <if test="regionLabel != null">region_label = #{regionLabel},</if>
            <if test="electronicFenceRange != null">electronic_fence_range = #{electronicFenceRange},</if>
        </trim>
        where id = #{id}
    </update>
@@ -178,8 +195,8 @@
                <if test="item.consignorCode != null and item.consignorCode != ''">consignor_code = #{item.consignorCode},</if>
                <if test="item.consignorName != null and item.consignorName != ''">consignor_name = #{item.consignorName},</if>
                <if test="item.customerId != null">customer_id = #{item.customerId},</if>
                <if test="item.customerSysCode != null and item.customerSysCode != ''">customer_sys_code = #{item.customerSysCode},</if>
                <if test="item.customerName != null">customer_name = #{item.customerName},</if>
                <if test="item.customerSysCode != null and item.customerSysCode != ''">customer_sys_code = #{item.customerSysCode},</if>
                <if test="item.consignorType != null">consignor_type = #{item.consignorType},</if>
                <if test="item.contactName != null and item.contactName != ''">contact_name = #{item.contactName},</if>
                <if test="item.contactPhone != null">contact_phone = #{item.contactPhone},</if>
@@ -198,6 +215,8 @@
                <if test="item.updateBy != null">update_by = #{item.updateBy},</if>
                <if test="item.updateTime != null">update_time = #{item.updateTime},</if>
                <if test="item.remark != null">remark = #{item.remark},</if>
                <if test="item.regionLabel != null">region_label = #{item.regionLabel},</if>
                <if test="item.electronicFenceRange != null">electronic_fence_range = #{item.electronicFenceRange},</if>
            </trim>
            where id = #{item.id}
        </foreach>