75 lines
2.9 KiB
XML
75 lines
2.9 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.fuel.mapper.FuelSoftJarMapper">
|
|
|
|
<!-- 通用查询映射结果 -->
|
|
<resultMap id="BaseResultMap" type="com.hshh.nation.fuel.entity.FuelSoftJar">
|
|
<id column="id" property="id" />
|
|
|
|
<result column="belong_unit" property="belongUnit" />
|
|
<result column="jar_no" property="jarNo" />
|
|
<result column="jar_type" property="jarType" />
|
|
<result column="jar_capacity" property="jarCapacity" />
|
|
<result column="jar_length" property="jarLength" />
|
|
<result column="jar_width" property="jarWidth" />
|
|
<result column="jar_height" property="jarHeight" />
|
|
<result column="jar_diameter" property="jarDiameter" />
|
|
<result column="jar_empty_weight" property="jarEmptyWeight" />
|
|
<result column="jar_status" property="jarStatus" />
|
|
<result column="jar_build_date" property="jarBuildDate" />
|
|
<result column="jar_fuel_type" property="jarFuelType" />
|
|
<result column="jar_now_fuel_type" property="jarNowFuelType" />
|
|
<result column="jar_coordinate" property="jarCoordinate" />
|
|
<result column="jar_meno" property="jarMeno" />
|
|
</resultMap>
|
|
|
|
<!-- 通用查询结果列 -->
|
|
<sql id="Base_Column_List">
|
|
id, jar_img, belong_unit, jar_no, jar_type, jar_capacity, jar_length, jar_width, jar_height, jar_diameter, jar_empty_weight, jar_status, jar_build_date, jar_fuel_type, jar_now_fuel_type, jar_coordinate, jar_meno
|
|
</sql>
|
|
|
|
<select id="list" resultType="com.hshh.nation.fuel.entity.FuelSoftJar" parameterType="com.hshh.nation.fuel.entity.FuelSoftJar">
|
|
SELECT
|
|
@rownum := @rownum + 1 AS seq,
|
|
t.*
|
|
FROM (
|
|
SELECT * FROM defence_fuel_soft_jar
|
|
<where>
|
|
<if test="model.jarNo != null and model.jarNo !=''">
|
|
jar_no like concat('%', #{model.jarNo},'%')
|
|
</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.fuel.entity.FuelSoftJar" parameterType="com.hshh.nation.fuel.entity.FuelSoftJar" databaseId="dm">
|
|
SELECT
|
|
t.seq,
|
|
t.*
|
|
FROM (
|
|
SELECT
|
|
ROW_NUMBER() OVER (ORDER BY id ASC) AS seq,
|
|
a.*
|
|
FROM defence_fuel_soft_jar a
|
|
<where>
|
|
<if test="model.jarNo != null and model.jarNo !=''">
|
|
jar_no like '%'|| #{model.jarNo}||'%'
|
|
</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_fuel_soft_jar
|
|
<where>
|
|
<if test="model.jarNo != null and model.jarNo !=''">
|
|
jar_no like concat('%', #{model.jarNo},'%')
|
|
</if>
|
|
</where>
|
|
|
|
|
|
</select>
|
|
|
|
</mapper>
|
|
|