feat:智能柜货柜生成
This commit is contained in:
1 parent
e962da405b
commit
b2d7db1f52
13 files changed
+276
-20
No files matched your search
+27
@@ -0,0 +1,27 @@
|
||||
package com.bsd.pjcloud.hard.api.constant;
|
||||
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 硬件授权类型
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum HardAuthTypeEnum {
|
||||
|
||||
HARD_DDOR_AUTH("10", "智能柜授权"),
|
||||
;
|
||||
private final String type;
|
||||
private final String description;
|
||||
|
||||
public static HardAuthTypeEnum valueOfByType(String type) {
|
||||
if (ObjectUtil.isEmpty(type)) return null;
|
||||
return Arrays.stream(values()).filter(v -> ObjectUtil.equals(type, v.getType())).findFirst().get();
|
||||
}
|
||||
|
||||
}
|
||||
+8
-1
@@ -1,6 +1,7 @@
|
||||
package com.bsd.pjcloud.hard.api.dto;
|
||||
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@@ -14,9 +15,15 @@ public class HardAuthAppDto {
|
||||
/**
|
||||
* 智能柜设备id
|
||||
*/
|
||||
@NotEmpty(message = "智能柜设备id不能为空")
|
||||
@NotNull(message = "智能柜设备id不能为空")
|
||||
private Long doorHardId;
|
||||
|
||||
/**
|
||||
* 货柜编号
|
||||
*/
|
||||
@NotNull(message = "货柜编号不能为空")
|
||||
private Integer cabinetNo;
|
||||
|
||||
/**
|
||||
* 是否授权
|
||||
*/
|
||||
|
||||
+115
@@ -0,0 +1,115 @@
|
||||
package com.bsd.pjcloud.hard.api.entity.manager;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.bsd.pjcloud.common.core.util.TenantTable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 智能柜货柜
|
||||
*
|
||||
* @author dzc
|
||||
* @date 2025-04-15 18:28:46
|
||||
*/
|
||||
@Data
|
||||
@TenantTable
|
||||
@TableName("hard_door_cabinet")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "智能柜货柜")
|
||||
public class HardDoorCabinetEntity extends Model<HardDoorCabinetEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@Schema(description="编号")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 智能柜编号
|
||||
*/
|
||||
@Schema(description="智能柜编号")
|
||||
private Long hardDoorId;
|
||||
|
||||
/**
|
||||
* 货柜编号(1,2)
|
||||
*/
|
||||
@Schema(description="货柜编号(1,2)")
|
||||
private Integer cabinetNo;
|
||||
|
||||
/**
|
||||
* 锁在线1:在线;2:离线;
|
||||
*/
|
||||
@Schema(description="锁在线1:在线;2:离线;")
|
||||
private String isLockOnline;
|
||||
|
||||
/**
|
||||
* 锁状态1:开锁;2:关锁;
|
||||
*/
|
||||
@Schema(description="锁状态1:开锁;2:关锁;")
|
||||
private Integer lockStatus;
|
||||
|
||||
/**
|
||||
* 门状态1:门关;2:门开
|
||||
*/
|
||||
@Schema(description="门状态1:门关;2:门开")
|
||||
private Integer doorStatus;
|
||||
|
||||
/**
|
||||
* 货柜售卖状态1:在售;2:停售
|
||||
*/
|
||||
@Schema(description="货柜售卖状态1:在售;2:停售")
|
||||
private Integer saleStatus;
|
||||
|
||||
/**
|
||||
* 二维码
|
||||
*/
|
||||
@Schema(description="二维码")
|
||||
private String qrCode;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="创建人")
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@Schema(description="修改人")
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@Schema(description="修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 删除标记
|
||||
*/
|
||||
@TableLogic
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="删除标记")
|
||||
private String delFlag;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@Schema(description="租户ID")
|
||||
private Long tenantId;
|
||||
}
|
||||
Reference in new issue
Block a user