<?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.buss.mapper.DmWarshipMapper">
|
|
<resultMap type="DmWarship" id="DmWarshipResult">
|
<id property="shipNo" column="SHIP_NO" />
|
<result property="shipType" column="SHIP_TYPE" />
|
<result property="TONNAGE" column="TONNAGE" />
|
<result property="DRAFT" column="DRAFT" />
|
<result property="LEADER" column="LEADER" />
|
<result property="STAFF" column="STAFF" />
|
<result property="grpName" column="GRP_NAME" />
|
<result property="LEVEL" column="LEVEL" />
|
<result property="LAT" column="LAT" />
|
<result property="LON" column="LON" />
|
<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" />
|
</resultMap>
|
|
<sql id="selectDmWarshipVo">
|
select SHIP_NO, SHIP_TYPE, TONNAGE, DRAFT, LEADER, STAFF, GRP_NAME, LEVEL, LAT, LON, DEL_FLAG, CREATE_BY, CREATE_TIME, UPDATE_BY, UPDATE_TIME from dm_warship
|
</sql>
|
|
<select id="selectDmWarshipList" parameterType="DmWarship" resultMap="DmWarshipResult">
|
<include refid="selectDmWarshipVo"/>
|
<where>
|
<if test="shipNo != null and shipNo != ''"> and SHIP_NO = #{shipNo}</if>
|
<if test="shipType != null and shipType != ''"> and SHIP_TYPE = #{shipType}</if>
|
<if test="TONNAGE != null "> and TONNAGE = #{TONNAGE}</if>
|
<if test="DRAFT != null "> and DRAFT = #{DRAFT}</if>
|
<if test="LEADER != null and LEADER != ''"> and LEADER = #{LEADER}</if>
|
<if test="STAFF != null "> and STAFF = #{STAFF}</if>
|
<if test="grpName != null and grpName != ''"> and GRP_NAME like concat('%', #{grpName}, '%')</if>
|
<if test="LEVEL != null "> and LEVEL = #{LEVEL}</if>
|
<if test="LAT != null "> and LAT = #{LAT}</if>
|
<if test="LON != null "> and LON = #{LON}</if>
|
<if test="delFlag != null and delFlag != ''"> and DEL_FLAG = #{delFlag}</if>
|
<if test="createBy != null and createBy != ''"> and CREATE_BY = #{createBy}</if>
|
<if test="createTime != null "> and CREATE_TIME = #{createTime}</if>
|
<if test="updateBy != null and updateBy != ''"> and UPDATE_BY = #{updateBy}</if>
|
<if test="updateTime != null "> and UPDATE_TIME = #{updateTime}</if>
|
</where>
|
</select>
|
|
<select id="selectDmWarshipByShipNo" parameterType="String" resultMap="DmWarshipResult">
|
<include refid="selectDmWarshipVo"/>
|
where SHIP_NO = #{shipNo}
|
</select>
|
|
<insert id="insertDmWarship" parameterType="DmWarship">
|
insert into dm_warship
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="shipNo != null and shipNo != ''">SHIP_NO,</if>
|
<if test="shipType != null">SHIP_TYPE,</if>
|
<if test="TONNAGE != null">TONNAGE,</if>
|
<if test="DRAFT != null">DRAFT,</if>
|
<if test="LEADER != null">LEADER,</if>
|
<if test="STAFF != null">STAFF,</if>
|
<if test="grpName != null">GRP_NAME,</if>
|
<if test="LEVEL != null">LEVEL,</if>
|
<if test="LAT != null">LAT,</if>
|
<if test="LON != null">LON,</if>
|
<if test="delFlag != null">DEL_FLAG,</if>
|
<if test="createBy != null">CREATE_BY,</if>
|
<if test="createTime != null">CREATE_TIME,</if>
|
<if test="updateBy != null">UPDATE_BY,</if>
|
<if test="updateTime != null">UPDATE_TIME,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="shipNo != null and shipNo != ''">#{shipNo},</if>
|
<if test="shipType != null">#{shipType},</if>
|
<if test="TONNAGE != null">#{TONNAGE},</if>
|
<if test="DRAFT != null">#{DRAFT},</if>
|
<if test="LEADER != null">#{LEADER},</if>
|
<if test="STAFF != null">#{STAFF},</if>
|
<if test="grpName != null">#{grpName},</if>
|
<if test="LEVEL != null">#{LEVEL},</if>
|
<if test="LAT != null">#{LAT},</if>
|
<if test="LON != null">#{LON},</if>
|
<if test="delFlag != null">#{delFlag},</if>
|
<if test="createBy != null">#{createBy},</if>
|
<if test="createTime != null">#{createTime},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
</trim>
|
</insert>
|
|
<update id="updateDmWarship" parameterType="DmWarship">
|
update dm_warship
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="shipType != null">SHIP_TYPE = #{shipType},</if>
|
<if test="TONNAGE != null">TONNAGE = #{TONNAGE},</if>
|
<if test="DRAFT != null">DRAFT = #{DRAFT},</if>
|
<if test="LEADER != null">LEADER = #{LEADER},</if>
|
<if test="STAFF != null">STAFF = #{STAFF},</if>
|
<if test="grpName != null">GRP_NAME = #{grpName},</if>
|
<if test="LEVEL != null">LEVEL = #{LEVEL},</if>
|
<if test="LAT != null">LAT = #{LAT},</if>
|
<if test="LON != null">LON = #{LON},</if>
|
<if test="delFlag != null">DEL_FLAG = #{delFlag},</if>
|
<if test="createBy != null">CREATE_BY = #{createBy},</if>
|
<if test="createTime != null">CREATE_TIME = #{createTime},</if>
|
<if test="updateBy != null">UPDATE_BY = #{updateBy},</if>
|
<if test="updateTime != null">UPDATE_TIME = #{updateTime},</if>
|
</trim>
|
where SHIP_NO = #{shipNo}
|
</update>
|
|
<delete id="deleteDmWarshipByShipNo" parameterType="String">
|
delete from dm_warship where SHIP_NO = #{shipNo}
|
</delete>
|
|
<delete id="deleteDmWarshipByShipNos" parameterType="String">
|
delete from dm_warship where SHIP_NO in
|
<foreach item="shipNo" collection="array" open="(" separator="," close=")">
|
#{shipNo}
|
</foreach>
|
</delete>
|
|
</mapper>
|