Merge remote-tracking branch 'origin/main'

This commit is contained in:
2025-07-04 15:11:31 +08:00
55 changed files with 2400 additions and 226 deletions

View File

@ -0,0 +1,106 @@
package com.fuyuanshen.app.domain;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fuyuanshen.common.tenant.core.TenantEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
/**
* @Description: 设备表
* @Author: WY
* @Date: 2025/5/16
**/
@Data
@TableName("app_device")
public class APPDevice extends TenantEntity {
@TableId(value = "app_device_id", type = IdType.AUTO)
@Schema(name = "ID")
private Long id;
@Schema(name = "设备类型")
private Long deviceType;
@Schema(name = "设备类型名称")
private String deviceTypeName;
@Schema(name = "客户号")
private Long customerId;
@Schema(name = "所属客户")
private String customerName;
/*@Schema(name = "设备编号")
private String deviceNo;*/
@Schema(name = "设备名称")
private String deviceName;
@Schema(name = "设备图片")
private String devicePic;
@Schema(name = "设备MAC")
private String deviceMac;
@Schema(name = "设备IMEI")
private String deviceImei;
@Schema(name = "设备SN")
private String deviceSn;
@Schema(name = "经度")
private String longitude;
@Schema(name = "纬度")
private String latitude;
@Schema(name = "备注")
private String remark;
@TableField(exist = false)
@Schema(name = "设备类型名称")
private String typeName;
/**
* 租户ID
*/
@TableField(value = "tenant_id")
@Schema(hidden = true)
private String tenantId;
/**
* 设备状态
* 0 失效
* 1 正常
*/
@Schema(name = "设备状态")
private Integer deviceStatus;
/**
* 绑定状态
* 0 未绑定
* 1 已绑定
*/
@Schema(name = "绑定状态")
private Integer bindingStatus;
/**
* 绑定类型
* 0 APP
* 1 小程序
*/
@Schema(name = "绑定类型")
private Integer bindingType;
public void copy(APPDevice source) {
BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true));
}
}

View File

@ -0,0 +1,56 @@
package com.fuyuanshen.app.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fuyuanshen.common.tenant.core.TenantEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import java.io.Serializable;
/**
* @Description: 设备类型
* @Author: WY
* @Date: 2025/5/14
**/
@Data
@TableName("app_device_type")
public class APPDeviceType extends TenantEntity {
@TableId(value = "id", type = IdType.AUTO)
@Schema(name = "ID", hidden = true)
private Long id;
@Schema(name = "客户号")
private Long customerId;
@Schema(name = "创建该类型的客户")
private Long ownerCustomerId;
/**
* 租户ID
*/
// @TableField(value = "tenant_id")
// @ApiModelProperty(hidden = true)
// private Long tenantId;
@NotBlank(message = "设备类型名称不能为空")
@Schema(name = "类型名称", required = true)
private String typeName;
@Schema(name = "是否支持蓝牙")
private Boolean isSupportBle;
@Schema(name = "定位方式", example = "0:无;1:GPS;2:基站;3:wifi;4:北斗")
private String locateMode;
@Schema(name = "联网方式", example = "0:无;1:4G;2:WIFI")
private String networkWay;
@Schema(name = "通讯方式", example = "0:4G;1:蓝牙")
private String communicationMode;
}

View File

@ -0,0 +1,26 @@
package com.fuyuanshen.app.domain.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
/**
* @author: 默苍璃
* @date: 2025-06-1818:36
*/
@Data
public class APPUnbindDTO {
// @NotBlank(message = "设备MAC不能为空")
@Schema(name = "设备MAC", required = true)
private String deviceMac;
@Schema(name = "设备IMEI")
private String deviceImei;
@NotNull(message = "客户号不能为空")
@Schema(name = "客户号")
private Long customerId;
}

View File

@ -0,0 +1,65 @@
package com.fuyuanshen.app.domain.query;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.sql.Timestamp;
import java.util.List;
import java.util.Set;
/**
* @Description:
* @Author: WY
* @Date: 2025/5/16
**/
@Data
public class APPDeviceQueryCriteria {
@Schema(name = "设备名称")
private String deviceName;
@Schema(name = "设备类型")
private Long deviceType;
@Schema(name = "设备MAC")
private String deviceMac;
@Schema(name = "设备IMEI")
private String deviceImei;
@Schema(name = "设备SN")
private String deviceSn;
/**
* 设备状态
* 0 失效
* 1 正常
*/
@Schema(name = "设备状态 0 失效 1 正常 ")
private Integer deviceStatus;
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'")
@Schema(name = "创建时间")
private List<Timestamp> createTime;
@Schema(name = "页码", example = "1")
private Integer page = 1;
@Schema(name = "每页数据量", example = "10")
private Integer size = 10;
@Schema(name = "客户id")
private Long customerId;
private Set<Long> customerIds;
@Schema(name = "当前所有者")
private Long currentOwnerId;
@Schema(name = "租户ID")
private Long tenantId;
@Schema(name = "通讯方式", example = "0:4G;1:蓝牙")
private Integer communicationMode;
}