You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
1.1 KiB
27 lines
1.1 KiB
<?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.iteaj.iboot.msn.iot.mapper.DeviceModelMapper">
|
|
|
|
<!-- 通用查询映射结果 -->
|
|
<resultMap id="BaseResultMap" type="com.iteaj.iboot.msn.iot.entity.DeviceModel">
|
|
<result column="id" property="id" />
|
|
<result column="type_id" property="typeId" />
|
|
<result column="model" property="model" />
|
|
<result column="type_name" property="typeName" />
|
|
<result column="remark" property="remark" />
|
|
</resultMap>
|
|
|
|
<select id="detailOfPage" resultType="com.iteaj.iboot.msn.iot.entity.DeviceModel">
|
|
select a.*, idt.name type_name from iot_device_model a
|
|
left join iot_device_type idt on a.type_id=idt.id
|
|
<where>
|
|
<if test="entity.typeId != null">
|
|
and find_in_set(#{entity.typeId}, idt.path)
|
|
</if>
|
|
<if test="entity.model != null">
|
|
and a.model like '%${entity.model}%'
|
|
</if>
|
|
</where>
|
|
</select>
|
|
|
|
</mapper>
|