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.
33 lines
1.3 KiB
33 lines
1.3 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="org.dromara.sample.manage.mapper.IDeviceProMapper">
|
|
<resultMap id="listDeviceProEntityMap" type="org.dromara.sample.manage.model.entity.DeviceProEntity">
|
|
<result column="pro_id" property="id"/>
|
|
<result column="pro_name" property="proName"/>
|
|
<result column="bind_code" property="bindCode"/>
|
|
<result column="bind_type" property="bindType"/>
|
|
<result column="nick_name" property="nickName"/>
|
|
<result column="create_time" property="createTime"/>
|
|
</resultMap>
|
|
<select id="listDeviceProEntityMap" resultMap="listDeviceProEntityMap">
|
|
SELECT
|
|
dp.id pro_id,
|
|
dp.pro_name,
|
|
dp.bind_code,
|
|
dp.bind_type,
|
|
dp.nick_name,
|
|
dp.create_time
|
|
FROM
|
|
manage_device_pro dp
|
|
<where>
|
|
<if test="condition.bind_code != null and condition.bind_code != ''">
|
|
and dp.bind_code like concat(concat('%',#{condition.bind_code}),'%')
|
|
</if>
|
|
<if test="condition.pro_name != null and condition.pro_name != ''">
|
|
and dp.pro_name like concat(concat('%',#{condition.pro_name}),'%')
|
|
</if>
|
|
</where>
|
|
</select>
|
|
</mapper>
|
|
|