123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <?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.usky.iot.mapper.DmpDeviceInfoMapper">
- <!-- 通用查询映射结果 -->
- <resultMap id="BaseResultMap" type="com.usky.iot.domain.DmpDeviceInfo">
- <id column="id" property="id" />
- <result column="device_id" property="deviceId" />
- <result column="device_name" property="deviceName" />
- <result column="device_type" property="deviceType" />
- <result column="product_id" property="productId" />
- <result column="sim_code" property="simCode" />
- <result column="imsi_code" property="imsiCode" />
- <result column="node_type" property="nodeType" />
- <result column="group_id" property="groupId" />
- <result column="delete_flag" property="deleteFlag" />
- <result column="created_by" property="createdBy" />
- <result column="created_time" property="createdTime" />
- <result column="updated_by" property="updatedBy" />
- <result column="updated_time" property="updatedTime" />
- <result column="tenant_id" property="tenantId" />
- </resultMap>
- <!-- <select id="page" resultType="com.usky.iot.domain.DmpDeviceInfo">-->
- <!-- select ddi.*,dds.device_status as deviceStatus-->
- <!-- from dmp_device ddi-->
- <!-- left join dmp_device_status dds-->
- <!-- on ddi.device_id = dds.device_id and ddi.product_id = dds.product_id-->
- <!-- <where>-->
- <!-- <if test="ar.deviceName != null">-->
- <!-- and ddi.device_name like CONCAT('%',#{ar.deviceName},'%')-->
- <!-- </if>-->
- <!-- <if test="ar.productId != null">-->
- <!-- and ddi.product_id = #{ar.productId}-->
- <!-- </if>-->
- <!-- <if test="ar.serviceStatus != null">-->
- <!-- and ddi.service_status = #{ar.serviceStatus}-->
- <!-- </if>-->
- <!-- <if test="ar.deviceStatus != null">-->
- <!-- and dds.device_status = #{ar.deviceStatus}-->
- <!-- </if>-->
- <!-- <if test="1 == 1">-->
- <!-- and ddi.delete_flag = 0 and ddi.tenant_id = #{tenantId}-->
- <!-- </if>-->
- <!-- </where>-->
- <!-- order by ddi.id desc-->
- <!-- </select>-->
- <select id="getProductInfo" resultType="com.usky.iot.domain.DmpProductInfo">
- select dpi.*
- from dmp_product dpi
- <where>
- <if test="productCode != null">
- and dpi.product_code = #{productCode}
- </if>
- <if test="1 == 1">
- and dpi.delete_flag = 0
- </if>
- </where>
- </select>
- <select id="attributeList" resultType="com.usky.backend.domain.ProductTVAttributeVO">
- select dpa.product_id as productId,dpa.attribute_code as attributeCode,dpa.attribute_name as attributeName,dpa.attribute_unit as attributeUnit,dpt.product_code as productCode
- from dmp_product_attribute dpa
- left join dmp_product dpt
- on dpa.product_id = dpt.id
- <where>
- <if test="procutIdList != null and procutIdList.size() > 0">
- AND dpa.product_id in
- <foreach item="item" collection="procutIdList" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="1 == 1">
- and dpa.delete_flag = 0
- </if>
- </where>
- </select>
- </mapper>
|