mirror of
https://gitee.com/beecue/fastbee.git
synced 2025-12-18 17:05:55 +08:00
zhaothird
This commit is contained in:
@@ -34,12 +34,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</where>
|
||||
order by order_num
|
||||
</select>
|
||||
|
||||
<select id="selectCategoryList1" parameterType="com.ruoyi.iot.domain.Category" resultMap="CategoryResult">
|
||||
<include refid="selectCategoryVo"/>
|
||||
<where>
|
||||
<if test="categoryName != null and categoryName != ''"> and category_name = #{categoryName}</if>
|
||||
<if test="tenantName != null and tenantName != ''"> and tenant_name = #{tenantName} or is_sys = 1</if>
|
||||
<if test="isSys != null "> and is_sys = #{isSys}</if>
|
||||
</where>
|
||||
order by order_num
|
||||
</select>
|
||||
<select id="selectCategoryShortList" resultMap="CategoryShortResult">
|
||||
select category_id, category_name
|
||||
from iot_category
|
||||
order by order_num
|
||||
</select>
|
||||
<select id="selectCategoryShortList1" resultMap="CategoryShortResult">
|
||||
select category_id, category_name
|
||||
from iot_category
|
||||
<where>
|
||||
<if test="categoryName != null and categoryName != ''"> and category_name = #{categoryName}</if>
|
||||
<if test="tenantName != null and tenantName != ''"> and tenant_name = #{tenantName} or is_sys = 1</if>
|
||||
<if test="isSys != null "> and is_sys = #{isSys}</if>
|
||||
</where>
|
||||
order by order_num
|
||||
</select>
|
||||
|
||||
<select id="selectCategoryByCategoryId" parameterType="Long" resultMap="CategoryResult">
|
||||
<include refid="selectCategoryVo"/>
|
||||
|
||||
@@ -109,7 +109,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
select device_id, device_name, product_name, user_name, serial_number, firmware_version, status,rssi,is_shadow ,
|
||||
is_custom_location, active_time,network_address,longitude,latitude from iot_device
|
||||
<where>
|
||||
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
||||
<if test="userName != null and userName != ''"> and user_name = #{userName}</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectDeviceList" parameterType="com.ruoyi.iot.domain.Device" resultMap="DeviceResult">
|
||||
@@ -129,6 +129,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
<select id="selectDeviceList1" parameterType="com.ruoyi.iot.domain.Device" resultMap="DeviceResult">
|
||||
<include refid="selectDeviceVo"/>
|
||||
<where>
|
||||
<if test="deviceName != null and deviceName != ''"> and device_name = #{deviceName}</if>
|
||||
<if test="productId != null "> and product_id = #{productId}</if>
|
||||
<if test="productName != null and productName != ''"> and product_name = #{productName}</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="userName != null and userName != ''"> and user_name= #{userName}</if>
|
||||
<if test="tenantId != null "> and tenant_id = #{tenantId}</if>
|
||||
<if test="tenantName != null and tenantName != ''"> and tenant_name= #{tenantName}</if>
|
||||
<if test="serialNumber != null and serialNumber != ''"> and serial_number = #{serialNumber}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="networkAddress != null and networkAddress != ''"> and network_address = #{networkAddress} </if>
|
||||
<if test="params.beginActiveTime != null and params.beginActiveTime != '' and params.endActiveTime != null and params.endActiveTime != ''"> and active_time between #{params.beginActiveTime} and #{params.endActiveTime}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectAllDeviceShortList" parameterType="com.ruoyi.iot.domain.Device" resultMap="DeviceAllShortResult">
|
||||
select device_id, device_name, product_name, user_name, serial_number, firmware_version, status,rssi,is_shadow ,
|
||||
@@ -159,6 +176,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
<select id="selectDeviceShortList1" parameterType="com.ruoyi.iot.domain.Device" resultMap="DeviceShortResult">
|
||||
<include refid="selectDeviceShortVo"/>
|
||||
<where>
|
||||
<if test="deviceName != null and deviceName != ''"> and device_name = #{deviceName}</if>
|
||||
<if test="productId != null "> and product_id = #{productId}</if>
|
||||
<if test="productName != null and productName != ''"> and product_name = #{productName}</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="userName != null and userName != ''"> and user_name = #{userName}</if>
|
||||
<if test="tenantId != null "> and tenant_id = #{tenantId}</if>
|
||||
<if test="tenantName != null and tenantName != ''"> and tenant_name=#{tenantName}</if>
|
||||
<if test="serialNumber != null and serialNumber != ''"> and serial_number = #{serialNumber}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="params.beginActiveTime != null and params.beginActiveTime != '' and params.endActiveTime != null and params.endActiveTime != ''"> and active_time between #{params.beginActiveTime} and #{params.endActiveTime}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectDeviceByDeviceId" parameterType="Long" resultMap="DeviceResult">
|
||||
<include refid="selectDeviceVo"/>
|
||||
|
||||
@@ -23,7 +23,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
select firmware_id, firmware_name, product_id, product_name, tenant_id, tenant_name, is_sys, version, file_path, create_time, update_time, remark from iot_firmware
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="selectFirmwareList" parameterType="com.ruoyi.iot.domain.Firmware" resultMap="FirmwareResult">
|
||||
<include refid="selectFirmwareVo"/>
|
||||
<where>
|
||||
|
||||
@@ -31,6 +31,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</where>
|
||||
order by group_order
|
||||
</select>
|
||||
<select id="selectGroupList1" parameterType="com.ruoyi.iot.domain.Group" resultMap="GroupResult">
|
||||
<include refid="selectGroupVo"/>
|
||||
<where>
|
||||
<if test="groupName != null and groupName != ''"> and group_name = #{groupName}</if>
|
||||
<if test="userName != null and userName != ''"> and user_name = #{userName}</if>
|
||||
</where>
|
||||
order by group_order
|
||||
</select>
|
||||
|
||||
<select id="selectGroupByGroupId" parameterType="Long" resultMap="GroupResult">
|
||||
<include refid="selectGroupVo"/>
|
||||
|
||||
@@ -51,10 +51,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
<select id="selectProductList1" parameterType="com.ruoyi.iot.domain.Product" resultMap="ProductResult">
|
||||
<include refid="selectProductVo"/>
|
||||
<where>
|
||||
<if test="productName != null and productName != ''"> and product_name=#{productName}</if>
|
||||
<if test="categoryId != null "> and category_id = #{categoryId}</if>
|
||||
<if test="categoryName != null and categoryName != ''"> and category_name = #{categoryName}</if>
|
||||
<if test="tenantId != null "> and tenant_id = #{tenantId}</if>
|
||||
<if test="tenantName != null and tenantName != ''"> and tenant_name = #{tenantName} or is_sys = 1</if>
|
||||
<if test="isSys != null "> and is_sys = #{isSys}</if>
|
||||
<if test="isAuthorize != null "> and is_authorize = #{isAuthorize}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="deviceType != null "> and device_type = #{deviceType}</if>
|
||||
<if test="networkMethod != null "> and network_method = #{networkMethod}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectProductShortList" parameterType="Long" resultMap="ProductShortResult">
|
||||
select product_id,product_name from iot_product
|
||||
where tenant_id=#{userId}
|
||||
where tenant_id=#{userId} or is_sys = 1
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
@@ -34,6 +34,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
<select id="selectThingsModelTemplateList1" parameterType="com.ruoyi.iot.domain.ThingsModelTemplate" resultMap="ThingsModelTemplateResult">
|
||||
<include refid="selectThingsModelTemplateVo"/>
|
||||
<where>
|
||||
<if test="templateName != null and templateName != ''"> and template_name = #{templateName}</if>
|
||||
<if test="type != null "> and type = #{type}</if>
|
||||
<if test="specs != null and specs != ''"> and specs = #{specs}</if>
|
||||
<if test="tenantName != null and tenantName != ''"> and create_by = #{tenantName} or is_sys = 1</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectThingsModelTemplateByTemplateId" parameterType="Long" resultMap="ThingsModelTemplateResult">
|
||||
<include refid="selectThingsModelTemplateVo"/>
|
||||
|
||||
Reference in New Issue
Block a user