This commit is contained in:
wangh 2023-11-17 11:14:36 +08:00
parent 4ef7e1cdca
commit de70f12c56
2 changed files with 9 additions and 28 deletions

View File

@ -48,6 +48,7 @@ public class OilGun extends BaseEntity {
* 油罐名称 * 油罐名称
*/ */
private String tankName; private String tankName;
private String oilNumber;

View File

@ -14,6 +14,7 @@
<result property="updateBy" column="update_by" jdbcType="INTEGER"/> <result property="updateBy" column="update_by" jdbcType="INTEGER"/>
<result property="numberId" column="number_id" jdbcType="INTEGER"/> <result property="numberId" column="number_id" jdbcType="INTEGER"/>
<result property="tankName" column="tank_name" jdbcType="VARCHAR"/> <result property="tankName" column="tank_name" jdbcType="VARCHAR"/>
<result property="oilNumber" column="oil_number" jdbcType="VARCHAR"/>
<result property="oilMachineGunNumber" column="oil_machine_gun_number" jdbcType="VARCHAR"/> <result property="oilMachineGunNumber" column="oil_machine_gun_number" jdbcType="VARCHAR"/>
</resultMap> </resultMap>
@ -28,35 +29,14 @@
<!--查询指定行数据--> <!--查询指定行数据-->
<select id="queryAllByLimit" resultMap="OilGunMap"> <select id="queryAllByLimit" resultMap="OilGunMap">
select select
id, gun_name, tank_id, status, store_id, create_time, update_time, create_by, update_by og.id, og.gun_name, og.tank_id, og.status, og.store_id, og.create_time,og.update_time, og.create_by, og.update_by, ot.oil_number, ot.number_id
from oil_gun from oil_gun og
left join oil_tank ot on og.tank_id = ot.id
<where> <where>
<if test="id != null"> og.store_id = #{oilGun.storeId}
and id = #{id}
</if> <if test="oilGun.numberId != null">
<if test="gunName != null and gunName != ''"> and ot.number_id = #{oilGun.numberId}
and gun_name = #{gunName}
</if>
<if test="tankId != null">
and tank_id = #{tankId}
</if>
<if test="status != null and status != ''">
and status = #{status}
</if>
<if test="storeId != null">
and store_id = #{storeId}
</if>
<if test="createTime != null">
and create_time = #{createTime}
</if>
<if test="updateTime != null">
and update_time = #{updateTime}
</if>
<if test="createBy != null">
and create_by = #{createBy}
</if>
<if test="updateBy != null">
and update_by = #{updateBy}
</if> </if>
</where> </where>
</select> </select>