226 lines
16 KiB
XML
226 lines
16 KiB
XML
|
|
<?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.xdadan.erp.wms.mapper.WmsWarehouseMapper">
|
||
|
|
|
||
|
|
<resultMap type="WmsWarehouse" id="WmsWarehouseResult">
|
||
|
|
<result property="id" column="id" />
|
||
|
|
<result property="code" column="code" />
|
||
|
|
<result property="name" column="name" />
|
||
|
|
<result property="intefaceType" column="inteface_type" />
|
||
|
|
<result property="warehouseType" column="warehouse_type" />
|
||
|
|
<result property="warehouseProp" column="warehouse_prop" />
|
||
|
|
<result property="bondedType" column="bonded_type" />
|
||
|
|
<result property="ownType" column="own_type" />
|
||
|
|
<result property="contact" column="contact" />
|
||
|
|
<result property="tel" column="tel" />
|
||
|
|
<result property="country" column="country" />
|
||
|
|
<result property="province" column="province" />
|
||
|
|
<result property="city" column="city" />
|
||
|
|
<result property="district" column="district" />
|
||
|
|
<result property="address" column="address" />
|
||
|
|
<result property="zip" column="zip" />
|
||
|
|
<result property="sendCompany" column="send_company" />
|
||
|
|
<result property="sendName" column="send_name" />
|
||
|
|
<result property="sendProvince" column="send_province" />
|
||
|
|
<result property="sendCity" column="send_city" />
|
||
|
|
<result property="sendDistrict" column="send_district" />
|
||
|
|
<result property="sendTel" column="send_tel" />
|
||
|
|
<result property="sendAddress" column="send_address" />
|
||
|
|
<result property="sendZip" column="send_zip" />
|
||
|
|
<result property="status" column="status" />
|
||
|
|
<result property="orderNum" column="order_num" />
|
||
|
|
<result property="coordinate" column="coordinate" />
|
||
|
|
<result property="extParam" column="ext_param" />
|
||
|
|
<result property="tenantId" column="tenant_id" />
|
||
|
|
<result property="delFlag" column="del_flag" />
|
||
|
|
<result property="createBy" column="create_by" />
|
||
|
|
<result property="createTime" column="create_time" />
|
||
|
|
<result property="updateBy" column="update_by" />
|
||
|
|
<result property="updateTime" column="update_time" />
|
||
|
|
<result property="remark" column="remark" />
|
||
|
|
</resultMap>
|
||
|
|
|
||
|
|
<sql id="selectWmsWarehouseVo">
|
||
|
|
select id, code, name, inteface_type, warehouse_type, warehouse_prop, bonded_type, own_type, contact, tel, country, province, city, district, address, zip, send_company, send_name, send_province, send_city, send_district, send_tel, send_address, send_zip, status, order_num, coordinate, ext_param, tenant_id, del_flag, create_by, create_time, update_by, update_time, remark from wms_warehouse
|
||
|
|
</sql>
|
||
|
|
|
||
|
|
<select id="selectWmsWarehouseList" parameterType="WmsWarehouse" resultMap="WmsWarehouseResult">
|
||
|
|
<include refid="selectWmsWarehouseVo"/>
|
||
|
|
<where>
|
||
|
|
<if test="id != null "> and id = #{id}</if>
|
||
|
|
<if test="code != null and code != ''"> and code like concat('%', #{code}, '%')</if>
|
||
|
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||
|
|
<if test="intefaceType != null and intefaceType != ''"> and inteface_type like concat('%', #{intefaceType}, '%')</if>
|
||
|
|
<if test="warehouseType != null and warehouseType != ''"> and warehouse_type like concat('%', #{warehouseType}, '%')</if>
|
||
|
|
<if test="warehouseProp != null and warehouseProp != ''"> and warehouse_prop like concat('%', #{warehouseProp}, '%')</if>
|
||
|
|
<if test="bondedType != null and bondedType != ''"> and bonded_type like concat('%', #{bondedType}, '%')</if>
|
||
|
|
<if test="ownType != null and ownType != ''"> and own_type like concat('%', #{ownType}, '%')</if>
|
||
|
|
<if test="contact != null and contact != ''"> and contact like concat('%', #{contact}, '%')</if>
|
||
|
|
<if test="tel != null and tel != ''"> and tel like concat('%', #{tel}, '%')</if>
|
||
|
|
<if test="country != null and country != ''"> and country like concat('%', #{country}, '%')</if>
|
||
|
|
<if test="province != null and province != ''"> and province like concat('%', #{province}, '%')</if>
|
||
|
|
<if test="city != null and city != ''"> and city like concat('%', #{city}, '%')</if>
|
||
|
|
<if test="district != null and district != ''"> and district like concat('%', #{district}, '%')</if>
|
||
|
|
<if test="address != null and address != ''"> and address like concat('%', #{address}, '%')</if>
|
||
|
|
<if test="zip != null and zip != ''"> and zip like concat('%', #{zip}, '%')</if>
|
||
|
|
<if test="sendCompany != null and sendCompany != ''"> and send_company like concat('%', #{sendCompany}, '%')</if>
|
||
|
|
<if test="sendName != null and sendName != ''"> and send_name like concat('%', #{sendName}, '%')</if>
|
||
|
|
<if test="sendProvince != null and sendProvince != ''"> and send_province like concat('%', #{sendProvince}, '%')</if>
|
||
|
|
<if test="sendCity != null and sendCity != ''"> and send_city like concat('%', #{sendCity}, '%')</if>
|
||
|
|
<if test="sendDistrict != null and sendDistrict != ''"> and send_district like concat('%', #{sendDistrict}, '%')</if>
|
||
|
|
<if test="sendTel != null and sendTel != ''"> and send_tel like concat('%', #{sendTel}, '%')</if>
|
||
|
|
<if test="sendAddress != null and sendAddress != ''"> and send_address like concat('%', #{sendAddress}, '%')</if>
|
||
|
|
<if test="sendZip != null and sendZip != ''"> and send_zip like concat('%', #{sendZip}, '%')</if>
|
||
|
|
<if test="status != null "> and status = #{status}</if>
|
||
|
|
<if test="orderNum != null "> and order_num = #{orderNum}</if>
|
||
|
|
<if test="coordinate != null and coordinate != ''"> and coordinate like concat('%', #{coordinate}, '%')</if>
|
||
|
|
<if test="extParam != null and extParam != ''"> and ext_param like concat('%', #{extParam}, '%')</if>
|
||
|
|
<if test="tenantId != null and tenantId != ''"> and tenant_id like concat('%', #{tenantId}, '%')</if>
|
||
|
|
<if test="delFlag != null and delFlag != ''"> and del_flag like concat('%', #{delFlag}, '%')</if>
|
||
|
|
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
|
||
|
|
<if test="createTime != null "> and create_time = #{createTime}</if>
|
||
|
|
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
|
||
|
|
<if test="updateTime != null "> and update_time = #{updateTime}</if>
|
||
|
|
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
|
||
|
|
</where>
|
||
|
|
order by create_time desc
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="selectWmsWarehouseById" parameterType="Long" resultMap="WmsWarehouseResult">
|
||
|
|
select id, code, name, inteface_type, warehouse_type, warehouse_prop, bonded_type, own_type, contact, tel, country, province, city, district, address, zip, send_company, send_name, send_province, send_city, send_district, send_tel, send_address, send_zip, status, order_num, coordinate, ext_param, tenant_id, del_flag, create_by, create_time, update_by, update_time, remark
|
||
|
|
from wms_warehouse a
|
||
|
|
where a.id = #{id}
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<insert id="insertWmsWarehouse" parameterType="WmsWarehouse">
|
||
|
|
insert into wms_warehouse
|
||
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
|
<if test="id != null">id,</if>
|
||
|
|
<if test="code != null and code != ''">code,</if>
|
||
|
|
<if test="name != null and name != ''">name,</if>
|
||
|
|
<if test="intefaceType != null and intefaceType != ''">inteface_type,</if>
|
||
|
|
<if test="warehouseType != null and warehouseType != ''">warehouse_type,</if>
|
||
|
|
<if test="warehouseProp != null and warehouseProp != ''">warehouse_prop,</if>
|
||
|
|
<if test="bondedType != null and bondedType != ''">bonded_type,</if>
|
||
|
|
<if test="ownType != null and ownType != ''">own_type,</if>
|
||
|
|
<if test="contact != null and contact != ''">contact,</if>
|
||
|
|
<if test="tel != null and tel != ''">tel,</if>
|
||
|
|
<if test="country != null and country != ''">country,</if>
|
||
|
|
<if test="province != null and province != ''">province,</if>
|
||
|
|
<if test="city != null and city != ''">city,</if>
|
||
|
|
<if test="district != null and district != ''">district,</if>
|
||
|
|
<if test="address != null and address != ''">address,</if>
|
||
|
|
<if test="zip != null and zip != ''">zip,</if>
|
||
|
|
<if test="sendCompany != null and sendCompany != ''">send_company,</if>
|
||
|
|
<if test="sendName != null and sendName != ''">send_name,</if>
|
||
|
|
<if test="sendProvince != null and sendProvince != ''">send_province,</if>
|
||
|
|
<if test="sendCity != null and sendCity != ''">send_city,</if>
|
||
|
|
<if test="sendDistrict != null and sendDistrict != ''">send_district,</if>
|
||
|
|
<if test="sendTel != null and sendTel != ''">send_tel,</if>
|
||
|
|
<if test="sendAddress != null and sendAddress != ''">send_address,</if>
|
||
|
|
<if test="sendZip != null and sendZip != ''">send_zip,</if>
|
||
|
|
<if test="status != null">status,</if>
|
||
|
|
<if test="orderNum != null">order_num,</if>
|
||
|
|
<if test="coordinate != null and coordinate != ''">coordinate,</if>
|
||
|
|
<if test="extParam != null and extParam != ''">ext_param,</if>
|
||
|
|
<if test="tenantId != null and tenantId != ''">tenant_id,</if>
|
||
|
|
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
||
|
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||
|
|
<if test="createTime != null">create_time,</if>
|
||
|
|
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||
|
|
<if test="updateTime != null">update_time,</if>
|
||
|
|
<if test="remark != null and remark != ''">remark,</if>
|
||
|
|
</trim>
|
||
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
|
<if test="id != null">#{id},</if>
|
||
|
|
<if test="code != null and code != ''">#{code},</if>
|
||
|
|
<if test="name != null and name != ''">#{name},</if>
|
||
|
|
<if test="intefaceType != null and intefaceType != ''">#{intefaceType},</if>
|
||
|
|
<if test="warehouseType != null and warehouseType != ''">#{warehouseType},</if>
|
||
|
|
<if test="warehouseProp != null and warehouseProp != ''">#{warehouseProp},</if>
|
||
|
|
<if test="bondedType != null and bondedType != ''">#{bondedType},</if>
|
||
|
|
<if test="ownType != null and ownType != ''">#{ownType},</if>
|
||
|
|
<if test="contact != null and contact != ''">#{contact},</if>
|
||
|
|
<if test="tel != null and tel != ''">#{tel},</if>
|
||
|
|
<if test="country != null and country != ''">#{country},</if>
|
||
|
|
<if test="province != null and province != ''">#{province},</if>
|
||
|
|
<if test="city != null and city != ''">#{city},</if>
|
||
|
|
<if test="district != null and district != ''">#{district},</if>
|
||
|
|
<if test="address != null and address != ''">#{address},</if>
|
||
|
|
<if test="zip != null and zip != ''">#{zip},</if>
|
||
|
|
<if test="sendCompany != null and sendCompany != ''">#{sendCompany},</if>
|
||
|
|
<if test="sendName != null and sendName != ''">#{sendName},</if>
|
||
|
|
<if test="sendProvince != null and sendProvince != ''">#{sendProvince},</if>
|
||
|
|
<if test="sendCity != null and sendCity != ''">#{sendCity},</if>
|
||
|
|
<if test="sendDistrict != null and sendDistrict != ''">#{sendDistrict},</if>
|
||
|
|
<if test="sendTel != null and sendTel != ''">#{sendTel},</if>
|
||
|
|
<if test="sendAddress != null and sendAddress != ''">#{sendAddress},</if>
|
||
|
|
<if test="sendZip != null and sendZip != ''">#{sendZip},</if>
|
||
|
|
<if test="status != null">#{status},</if>
|
||
|
|
<if test="orderNum != null">#{orderNum},</if>
|
||
|
|
<if test="coordinate != null and coordinate != ''">#{coordinate},</if>
|
||
|
|
<if test="extParam != null and extParam != ''">#{extParam},</if>
|
||
|
|
<if test="tenantId != null and tenantId != ''">#{tenantId},</if>
|
||
|
|
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
||
|
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||
|
|
<if test="createTime != null">#{createTime},</if>
|
||
|
|
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||
|
|
<if test="updateTime != null">#{updateTime},</if>
|
||
|
|
<if test="remark != null and remark != ''">#{remark},</if>
|
||
|
|
</trim>
|
||
|
|
</insert>
|
||
|
|
|
||
|
|
<update id="updateWmsWarehouse" parameterType="WmsWarehouse">
|
||
|
|
update wms_warehouse
|
||
|
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
|
<if test="code != null and code != ''">code = #{code},</if>
|
||
|
|
<if test="name != null and name != ''">name = #{name},</if>
|
||
|
|
<if test="intefaceType != null and intefaceType != ''">inteface_type = #{intefaceType},</if>
|
||
|
|
<if test="warehouseType != null and warehouseType != ''">warehouse_type = #{warehouseType},</if>
|
||
|
|
<if test="warehouseProp != null and warehouseProp != ''">warehouse_prop = #{warehouseProp},</if>
|
||
|
|
<if test="bondedType != null and bondedType != ''">bonded_type = #{bondedType},</if>
|
||
|
|
<if test="ownType != null and ownType != ''">own_type = #{ownType},</if>
|
||
|
|
<if test="contact != null and contact != ''">contact = #{contact},</if>
|
||
|
|
<if test="tel != null and tel != ''">tel = #{tel},</if>
|
||
|
|
<if test="country != null and country != ''">country = #{country},</if>
|
||
|
|
<if test="province != null and province != ''">province = #{province},</if>
|
||
|
|
<if test="city != null and city != ''">city = #{city},</if>
|
||
|
|
<if test="district != null and district != ''">district = #{district},</if>
|
||
|
|
<if test="address != null and address != ''">address = #{address},</if>
|
||
|
|
<if test="zip != null and zip != ''">zip = #{zip},</if>
|
||
|
|
<if test="sendCompany != null and sendCompany != ''">send_company = #{sendCompany},</if>
|
||
|
|
<if test="sendName != null and sendName != ''">send_name = #{sendName},</if>
|
||
|
|
<if test="sendProvince != null and sendProvince != ''">send_province = #{sendProvince},</if>
|
||
|
|
<if test="sendCity != null and sendCity != ''">send_city = #{sendCity},</if>
|
||
|
|
<if test="sendDistrict != null and sendDistrict != ''">send_district = #{sendDistrict},</if>
|
||
|
|
<if test="sendTel != null and sendTel != ''">send_tel = #{sendTel},</if>
|
||
|
|
<if test="sendAddress != null and sendAddress != ''">send_address = #{sendAddress},</if>
|
||
|
|
<if test="sendZip != null and sendZip != ''">send_zip = #{sendZip},</if>
|
||
|
|
<if test="status != null">status = #{status},</if>
|
||
|
|
<if test="orderNum != null">order_num = #{orderNum},</if>
|
||
|
|
<if test="coordinate != null and coordinate != ''">coordinate = #{coordinate},</if>
|
||
|
|
<if test="extParam != null and extParam != ''">ext_param = #{extParam},</if>
|
||
|
|
<if test="tenantId != null and tenantId != ''">tenant_id = #{tenantId},</if>
|
||
|
|
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
||
|
|
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||
|
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||
|
|
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||
|
|
</trim>
|
||
|
|
where id = #{id}
|
||
|
|
</update>
|
||
|
|
|
||
|
|
<delete id="deleteWmsWarehouseById" parameterType="Long">
|
||
|
|
delete from wms_warehouse where id = #{id}
|
||
|
|
</delete>
|
||
|
|
|
||
|
|
<delete id="deleteWmsWarehouseByIds" parameterType="String">
|
||
|
|
delete from wms_warehouse where id in
|
||
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||
|
|
#{id}
|
||
|
|
</foreach>
|
||
|
|
</delete>
|
||
|
|
</mapper>
|