defence_strong_enemy/target/classes/mapper/FuelBaseStrongMapper.xml
2025-07-23 16:29:53 +08:00

80 lines
3.7 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.FuelBaseStrongMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.hshh.nation.fuel.entity.FuelBaseStrong">
<id column="id" property="id" />
<result column="base_img" property="baseImg" />
<result column="base_name" property="baseName" />
<result column="unit_amount" property="unitAmount" />
<result column="team_equip_id" property="teamEquipId" />
<result column="team_store_id" property="teamStoreId" />
<result column="parent_id" property="parentId" />
<result column="express_fuel_amount" property="expressFuelAmount" />
<result column="express_fuel_capacity" property="expressFuelCapacity" />
<result column="once_transport_ability" property="onceTransportAbility" />
<result column="express_nozzle_amount" property="expressNozzleAmount" />
<result column="simultaneous_wheel_ability" property="simultaneousWheelAbility" />
<result column="simultaneous_track_ability" property="simultaneousTrackAbility" />
<result column="express_hour" property="expressHour" />
<result column="take_back_hour" property="takeBackHour" />
<result column="base_coordinate" property="baseCoordinate" />
<result column="base_capacity" property="baseCapacity" />
<result column="driving_avg_speed" property="drivingAvgSpeed" />
<result column="driving_max_speed" property="drivingMaxSpeed" />
<result column="store_up_limit" property="storeUpLimit" />
<result column="load_up_limit" property="loadUpLimit" />
<result column="army_memo" property="armyMemo" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id, base_img, base_name, unit_amount, team_equip_id, team_store_id, parent_id, express_fuel_amount, express_fuel_capacity, once_transport_ability, express_nozzle_amount, simultaneous_wheel_ability, simultaneous_track_ability, express_hour, take_back_hour, base_coordinate, base_capacity, driving_avg_speed, driving_max_speed, store_up_limit, load_up_limit, army_memo
</sql>
<select id="list" resultType="com.hshh.nation.fuel.entity.FuelBaseStrong" parameterType="com.hshh.nation.fuel.entity.FuelBaseStrong">
SELECT
@rownum := @rownum + 1 AS seq,
t.*
FROM (
SELECT * FROM defence_fuel_base_strong
<where>
<if test="model.baseName != null and model.baseName !='' ">
base_name like concat('%', #{model.baseName},'%')
</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.FuelBaseStrong" parameterType="com.hshh.nation.fuel.entity.FuelBaseStrong" databaseId="dm">
SELECT
t.seq,
t.*
FROM (
SELECT
ROW_NUMBER() OVER (ORDER BY id ASC) AS seq,
a.*
FROM defence_fuel_base_strong a
<where>
<if test="model.baseName != null and model.baseName !='' ">
base_name like '%'||#{model.baseName}||'%'
</if>
</where>) t
WHERE t.seq > #{model.start} AND t.seq &lt;= (#{model.start} + #{model.pageSize})
</select>
<select id="count" resultType="java.lang.Long">
select count(id) from defence_fuel_base_strong
<where>
<if test="model.baseName != null and model.baseName !='' ">
base_name like concat('%', #{model.baseName},'%')
</if>
</where>
</select>
</mapper>