92 lines
3.3 KiB
XML
92 lines
3.3 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.hshh.nation.transport.mapper.TransportAirPortMapper">
|
|
|
|
<!-- 通用查询映射结果 -->
|
|
<resultMap id="BaseResultMap" type="com.hshh.nation.transport.entity.TransportAirPort">
|
|
<id column="id" property="id"/>
|
|
<result column="air_port_no" property="airPortNo"/>
|
|
<result column="port_name" property="portName"/>
|
|
|
|
<result column="belong_army_branch" property="belongArmyBranch"/>
|
|
<result column="belong_unit" property="belongUnit"/>
|
|
<result column="port_type" property="portType"/>
|
|
<result column="port_location" property="portLocation"/>
|
|
<result column="port_status" property="portStatus"/>
|
|
<result column="port_level" property="portLevel"/>
|
|
<result column="run_road_length" property="runRoadLength"/>
|
|
<result column="run_road_width" property="runRoadWidth"/>
|
|
<result column="maintain_plane_type" property="maintainPlaneType"/>
|
|
<result column="build_date" property="buildDate"/>
|
|
<result column="run_road_count" property="runRoadCount"/>
|
|
<result column="parking_count" property="parkingCount"/>
|
|
<result column="fuel_store_amount" property="fuelStoreAmount"/>
|
|
<result column="fuel_day_support_amount" property="fuelDaySupportAmount"/>
|
|
<result column="port_meno" property="portMeno"/>
|
|
</resultMap>
|
|
|
|
|
|
<select id="list" resultType="com.hshh.nation.transport.entity.TransportAirPort"
|
|
parameterType="com.hshh.nation.transport.entity.TransportAirPort">
|
|
SELECT
|
|
@rownum := @rownum + 1 AS seq,
|
|
t.*
|
|
FROM (
|
|
SELECT * FROM defence_transport_air_port
|
|
<where>
|
|
<if test="model.portName != null and model.portName !=''">
|
|
port_name like concat('%',#{model.portNo},'%')
|
|
</if>
|
|
</where>
|
|
order by id asc ) t, ( SELECT @rownum := #{model.start} ) r limit
|
|
#{model.start},#{model.pageSize}
|
|
</select>
|
|
|
|
<select id="list" resultType="com.hshh.nation.transport.entity.TransportAirPort"
|
|
parameterType="com.hshh.nation.transport.entity.TransportAirPort" databaseId="dm">
|
|
SELECT
|
|
t.seq,
|
|
t.*
|
|
FROM (
|
|
SELECT
|
|
ROW_NUMBER() OVER (ORDER BY id ASC) AS seq,
|
|
a.*
|
|
FROM defence_transport_air_port a
|
|
<where>
|
|
<if test="model.portName != null and model.portName !=''">
|
|
port_name like '%'||#{model.portNo}||'%'
|
|
</if>
|
|
</where>)t
|
|
WHERE t.seq > #{model.start} AND t.seq <= (#{model.start} + #{model.pageSize})
|
|
</select>
|
|
|
|
<select id="count" resultType="java.lang.Long">
|
|
select count(id) from defence_transport_air_port
|
|
<where>
|
|
<if test="model.portName != null and model.portName !=''">
|
|
port_name like concat('%',#{model.portNo},'%')
|
|
</if>
|
|
</where>
|
|
|
|
|
|
</select>
|
|
<select id="selectAllResource" resultType="com.hshh.nation.transport.bean.PortResource">
|
|
SELECT t1.id,
|
|
t1.air_port_no as no,
|
|
t1.port_name as name,
|
|
t1.port_location as location,
|
|
'air' as typeCode
|
|
FROM defence_transport_air_port t1
|
|
UNION
|
|
(select t2.id,
|
|
t2.port_no as no,
|
|
t2.port_name as name,
|
|
t2.port_location as location,
|
|
'port' as typeCode
|
|
from defence_transport_port t2)
|
|
</select>
|
|
|
|
</mapper>
|
|
|