forked from dyf/fys-Multi-tenant
51 lines
1.8 KiB
XML
51 lines
1.8 KiB
XML
<?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.fuyuanshen.app.mapper.AppDeviceShareMapper">
|
|
|
|
<select id="otherDeviceShareList" resultType="com.fuyuanshen.app.domain.vo.AppDeviceShareVo">
|
|
select d.device_name,
|
|
d.device_mac,
|
|
d.device_sn,
|
|
d.device_imei,
|
|
d.device_pic,
|
|
dt.type_name,
|
|
dt.communication_mode,
|
|
dt.app_model_dictionary detailPageUrl,
|
|
d.bluetooth_name,
|
|
c.binding_time,
|
|
ad.*,u.user_name otherPhonenumber
|
|
from
|
|
app_device_share ad
|
|
left join device d on ad.device_id = d.id
|
|
left join app_user u on ad.create_by = u.user_id
|
|
inner join device_type dt on d.device_type = dt.id
|
|
inner join app_device_bind_record c on d.id = c.device_id
|
|
where ad.phonenumber = #{bo.phonenumber}
|
|
</select>
|
|
<select id="selectAppDeviceShareList" resultType="com.fuyuanshen.app.domain.vo.AppDeviceShareVo">
|
|
select d.device_name,
|
|
d.device_mac,
|
|
d.device_sn,
|
|
d.device_imei,
|
|
d.device_pic,
|
|
dt.type_name,
|
|
dt.communication_mode,
|
|
d.bluetooth_name,
|
|
dt.app_model_dictionary detailPageUrl,
|
|
c.binding_time,
|
|
ad.*,u.user_name otherPhonenumber
|
|
from
|
|
app_device_share ad
|
|
left join device d on ad.device_id = d.id
|
|
left join app_user u on ad.create_by = u.user_id
|
|
inner join device_type dt on d.device_type = dt.id
|
|
inner join app_device_bind_record c on d.id = c.device_id
|
|
where ad.create_by = #{bo.createBy}
|
|
<if test="bo.deviceId != null">
|
|
and ad.device_id = #{bo.deviceId}
|
|
</if>
|
|
</select>
|
|
</mapper>
|