<?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.sinata.system.mapper.MwBusinessDeviceMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="com.sinata.system.domain.MwBusinessDevice">
|
<id column="ID" property="id" />
|
<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="DEPARTMENT_ID" property="departmentId" />
|
<result column="DEVICE_NAME" property="deviceName" />
|
<result column="DEVICE_NUMBER" property="deviceNumber" />
|
<result column="PURCHASE_DATE" property="purchaseDate" />
|
<result column="DEVICE_STATUS" property="deviceStatus" />
|
<result column="SERVICE_LIFETIME" property="serviceLifetime" />
|
<result column="REMARK" property="remark" />
|
</resultMap>
|
|
<!-- 通用查询结果列 -->
|
<sql id="Base_Column_List">
|
DEL_FLAG,
|
CREATE_BY,
|
CREATE_TIME,
|
UPDATE_BY,
|
UPDATE_TIME,
|
ID, DEPARTMENT_ID, DEVICE_NAME, DEVICE_NUMBER, PURCHASE_DATE, DEVICE_STATUS, SERVICE_LIFETIME, REMARK
|
</sql>
|
<select id="pageList" resultType="com.sinata.system.domain.vo.MwBusinessDeviceVO">
|
SELECT MBD.ID,
|
MBD.DEPARTMENT_ID,
|
MBD.DEVICE_NAME,
|
MBD.DEVICE_NUMBER,
|
MBD.PURCHASE_DATE,
|
MBD.DEVICE_STATUS,
|
MBD.SERVICE_LIFETIME,
|
MBD.REMARK,
|
SD.DEPARTMENT_NAME
|
FROM MW_BUSINESS_DEVICE MBD
|
LEFT JOIN SYS_DEPARTMENT SD ON SD.ID = MBD.DEPARTMENT_ID
|
<where>
|
MBD.DEL_FLAG = 0
|
<if test="treeCode != null and treeCode != ''">
|
AND SD.TREE_CODE LIKE CONCAT(#{treeCode},'%')
|
</if>
|
<if test="query.deviceNumber != null and query.deviceNumber != ''">
|
AND MBD.DEVICE_NUMBER LIKE CONCAT('%',#{query.deviceNumber},'%')
|
</if>
|
<if test="query.deviceName != null and query.deviceName != ''">
|
AND MBD.DEVICE_NAME LIKE CONCAT('%',#{query.deviceName},'%')
|
</if>
|
<if test="query.deviceStatus != null">
|
AND MBD.DEVICE_STATUS = #{query.deviceStatus}
|
</if>
|
</where>
|
</select>
|
|
</mapper>
|