查询设备分享列表(web)

This commit is contained in:
2025-08-29 10:29:53 +08:00
parent 760738bcdd
commit 3969e50566
7 changed files with 169 additions and 64 deletions

View File

@ -1,5 +1,7 @@
package com.fuyuanshen.app.domain.bo;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fuyuanshen.app.domain.AppDeviceShare;
import com.fuyuanshen.common.mybatis.core.domain.BaseEntity;
import io.github.linpeilie.annotations.AutoMapper;
@ -7,6 +9,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.util.Date;
/**
* 设备分享业务对象 app_device_share
*
@ -35,10 +39,16 @@ public class AppDeviceShareBo extends BaseEntity {
/**
* 功能权限1灯光模式2激光模式3开机画面4人员信息登记5发送信息6产品信息
以逗号分隔
* 以逗号分隔
*/
private String permission;
/**
* 分享用户
* share_user
*/
private String shareUser;
/**
* 备注
*/
@ -46,4 +56,11 @@ public class AppDeviceShareBo extends BaseEntity {
private String smsCode;
/**
* 分享时间
*/
private Date shareStartTime;
private Date shareEndTime;
}

View File

@ -18,5 +18,13 @@ import org.apache.ibatis.annotations.Param;
public interface AppDeviceShareMapper extends BaseMapperPlus<AppDeviceShare, AppDeviceShareVo> {
IPage<AppDeviceShareVo> otherDeviceShareList(@Param("bo") AppDeviceShareBo bo, Page<AppDeviceShareVo> page);
Page<AppDeviceShareVo> selectAppDeviceShareList(@Param("bo") AppDeviceShareBo bo,Page<AppDeviceShareVo> page);
Page<AppDeviceShareVo> selectAppDeviceShareList(@Param("bo") AppDeviceShareBo bo, Page<AppDeviceShareVo> page);
/**
* 查询设备分享列表(web)
*
* @param bo 设备分享
* @return 设备分享
*/
Page<AppDeviceShareVo> selectWebDeviceShareList(@Param("bo") AppDeviceShareBo bo, Page<AppDeviceShareVo> page);
}

View File

@ -1,27 +1,27 @@
<?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">
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
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">
@ -47,4 +47,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and ad.device_id = #{bo.deviceId}
</if>
</select>
<!-- 查询设备分享列表(web) -->
<select id="selectWebDeviceShareList" resultType="com.fuyuanshen.app.domain.vo.AppDeviceShareVo">
select *
from
app_device_share ad
<where>
<if test="bo.deviceId != null">
and ad.device_id = #{bo.deviceId}
</if>
<if test="bo.shareUser != null">
and ad.share_user = #{bo.shareUser}
</if>
<if test="criteria.shareStartTime != null and criteria.hareEndTime != null">
and d.create_time between #{bo.shareStartTime} and #{bo.shareEndTime}
</if>
</where>
</select>
</mapper>