13693261870
2025-07-02 6708810c4de34dfb9513061432d656f91d56ee3a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?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.manage.mapper.DpBerthMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.ruoyi.manage.domain.DmBerth">
        <result column="PKID" property="pkid" />
        <result column="NAME" property="name" />
        <result column="HARBOR_ID" property="harborId" />
        <result column="HARBOR_NAME" property="harborName" />
        <result column="BERTH_LEN" property="berthLen" />
        <result column="DEPTH" property="depth" />
        <result column="STATUS" property="status" />
        <result column="ORDER_NUM" property="orderNum" />
        <result column="DEL_FLAG" property="delFlag" />
        <result column="CREATE_BY" property="createBy" />
        <result column="CREATE_TIME" property="createTime" />
        <result column="UPDATE_BY" property="updateBy" />
        <result column="UPDATE_TIME" property="updateTime" />
        <result column="REMARK" property="remark" />
    </resultMap>
 
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        PKID, NAME, HARBOR_ID, HARBOR_NAME, BERTH_LEN, DEPTH, STATUS, ORDER_NUM, DEL_FLAG, CREATE_BY, CREATE_TIME, UPDATE_BY, UPDATE_TIME, REMARK
    </sql>
 
    <delete id="deleteByWhId">
        delete from DM_BERTH where HARBOR_ID = #{whId}
    </delete>
    <select id="getPageList" resultType="com.ruoyi.manage.domain.DmBerth">
        select a.*,b.HARBOR_NAME as harborName from DM_BERTH a left join DM_HARBOR b on a.HARBOR_ID = b.PKID
        <where>
            <if test="name!=null and name!=''">
                a.NAME like concat('%',#{name},'%')
            </if>
            <if test="harborId!=null and harborId!=0">
                a.harbor_id = #{harborId}
            </if>
        </where>
             order by a.ORDER_NUM DESC limit #{pageSize} offset #{offset}
    </select>
    <select id="getTotal" resultType="java.lang.Long">
        select count(1) from DM_BERTH a left join DM_HARBOR b on a.HARBOR_ID = b.PKID
        <where>
            <if test="name!=null and name!=''">
                a.NAME like concat('%',#{name},'%')
            </if>
            <if test="harborId!=null and harborId!=0">
                a.harbor_id = #{harborId}
            </if>
        </where>
    </select>
 
</mapper>