feat(智能柜): 添加归属类型字段以支持分类功能
在智能柜模块中新增`belong_type`字段,用于区分柜子的归属类型(0-借还柜,1-固资通)。该字段已添加到DTO、Entity和查询条件中,并同步更新了数据库表结构。此修改为后续功能扩展提供了基础支持。
This commit is contained in:
parent
68bffc0b73
commit
944a6bc722
|
@ -43,6 +43,10 @@ public class SmartCabinetEntity extends BaseEntity<SmartCabinetEntity> {
|
|||
@TableField("main_cabinet")
|
||||
private Long mainCabinet;
|
||||
|
||||
@ApiModelProperty("归属类型(0-借还柜 1-固资通)")
|
||||
@TableField("belong_type")
|
||||
private Integer belongType;
|
||||
|
||||
@ApiModelProperty("归属主柜名称")
|
||||
@TableField(exist = false)
|
||||
private String mainCabinetName;
|
||||
|
|
|
@ -37,6 +37,9 @@ public class SmartCabinetDTO {
|
|||
@ExcelColumn(name = "归属主柜ID")
|
||||
private Long mainCabinet;
|
||||
|
||||
@ExcelColumn(name = "归属类型(0-借还柜 1-固资通)")
|
||||
private Integer belongType;
|
||||
|
||||
@ExcelColumn(name = "归属主柜名称")
|
||||
private String mainCabinetName;
|
||||
|
||||
|
|
|
@ -18,6 +18,8 @@ public class SearchSmartCabinetQuery<T> extends AbstractPageQuery<T> {
|
|||
private Date endTime;
|
||||
private Long mqttServerId;
|
||||
private Long shopId;
|
||||
|
||||
private Integer belongType;
|
||||
|
||||
@Override
|
||||
public QueryWrapper<T> addQueryCondition() {
|
||||
|
@ -28,6 +30,7 @@ public class SearchSmartCabinetQuery<T> extends AbstractPageQuery<T> {
|
|||
.eq(cabinetType != null, "sc.cabinet_type", cabinetType)
|
||||
.eq(mqttServerId!= null, "sc.mqtt_server_id", mqttServerId)
|
||||
.eq(shopId!= null, "sc.shop_id", shopId)
|
||||
.eq(belongType!= null, "sc.belong_type", belongType)
|
||||
.eq(StrUtil.isNotEmpty(templateNo), "sc.template_no", templateNo)
|
||||
.eq("sc.deleted", false)
|
||||
.between(startTime != null && endTime != null, "sc.create_time", startTime, endTime);
|
||||
|
|
|
@ -12,4 +12,9 @@ CREATE TABLE `ab98_user_tag` (
|
|||
PRIMARY KEY (`tag_id`),
|
||||
KEY `idx_user` (`ab98_user_id`),
|
||||
CONSTRAINT `fk_tag_user` FOREIGN KEY (`ab98_user_id`) REFERENCES `ab98_user` (`ab98_user_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户标签表';
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户标签表';
|
||||
|
||||
|
||||
ALTER TABLE `smart_cabinet`
|
||||
ADD COLUMN `belong_type` TINYINT NOT NULL DEFAULT 0 COMMENT '归属类型(0-借还柜 1-固资通)'
|
||||
AFTER `main_cabinet`;
|
Loading…
Reference in New Issue