<?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>
|