初始化
This commit is contained in:
95
ruoyi-admin/src/main/resources/mapper/bas/WcsPortMapper.xml
Normal file
95
ruoyi-admin/src/main/resources/mapper/bas/WcsPortMapper.xml
Normal file
@@ -0,0 +1,95 @@
|
||||
<?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.ruoyi.bas.port.mapper.WcsPortMapper">
|
||||
|
||||
<resultMap type="WcsPort" id="WcsPortResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="portCode" column="port_code" />
|
||||
<result property="portName" column="port_name" />
|
||||
<result property="portType" column="port_type" />
|
||||
<result property="portRegion" column="port_region" />
|
||||
<result property="spare1" column="spare1" />
|
||||
<result property="spare2" column="spare2" />
|
||||
<result property="spare3" column="spare3" />
|
||||
<result property="status" column="status" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWcsPortVo">
|
||||
select id, port_code, port_name, port_type, port_region, spare1, spare2, spare3, status from wcs_port
|
||||
</sql>
|
||||
|
||||
<select id="selectWcsPortList" parameterType="WcsPort" resultMap="WcsPortResult">
|
||||
<include refid="selectWcsPortVo"/>
|
||||
<where>
|
||||
<if test="portCode != null and portCode != ''"> and port_code = #{portCode}</if>
|
||||
<if test="portName != null and portName != ''"> and port_name like concat('%', #{portName}, '%')</if>
|
||||
<if test="portType != null and portType != ''"> and port_type = #{portType}</if>
|
||||
<if test="portRegion != null and portRegion != ''"> and port_region = #{portRegion}</if>
|
||||
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
|
||||
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
|
||||
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectWcsPortById" parameterType="Long" resultMap="WcsPortResult">
|
||||
<include refid="selectWcsPortVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
<select id="selectWcsPortByPortCode" resultMap="WcsPortResult">
|
||||
<include refid="selectWcsPortVo"/>
|
||||
where port_code = #{portCode}
|
||||
</select>
|
||||
|
||||
<insert id="insertWcsPort" parameterType="WcsPort" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into wcs_port
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="portCode != null">port_code,</if>
|
||||
<if test="portName != null">port_name,</if>
|
||||
<if test="portType != null">port_type,</if>
|
||||
<if test="portRegion != null">port_region,</if>
|
||||
<if test="spare1 != null">spare1,</if>
|
||||
<if test="spare2 != null">spare2,</if>
|
||||
<if test="spare3 != null">spare3,</if>
|
||||
<if test="status != null">status,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="portCode != null">#{portCode},</if>
|
||||
<if test="portName != null">#{portName},</if>
|
||||
<if test="portType != null">#{portType},</if>
|
||||
<if test="portRegion != null">#{portRegion},</if>
|
||||
<if test="spare1 != null">#{spare1},</if>
|
||||
<if test="spare2 != null">#{spare2},</if>
|
||||
<if test="spare3 != null">#{spare3},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateWcsPort" parameterType="WcsPort">
|
||||
update wcs_port
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="portCode != null">port_code = #{portCode},</if>
|
||||
<if test="portName != null">port_name = #{portName},</if>
|
||||
<if test="portType != null">port_type = #{portType},</if>
|
||||
<if test="portRegion != null">port_region = #{portRegion},</if>
|
||||
<if test="spare1 != null">spare1 = #{spare1},</if>
|
||||
<if test="spare2 != null">spare2 = #{spare2},</if>
|
||||
<if test="spare3 != null">spare3 = #{spare3},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteWcsPortById" parameterType="Long">
|
||||
delete from wcs_port where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWcsPortByIds" parameterType="String">
|
||||
delete from wcs_port where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user