diff --git a/agileboot-domain/src/main/java/com/agileboot/domain/cabinet/smartCabinet/db/SmartCabinetEntity.java b/agileboot-domain/src/main/java/com/agileboot/domain/cabinet/smartCabinet/db/SmartCabinetEntity.java index 9cb7f44..010859e 100644 --- a/agileboot-domain/src/main/java/com/agileboot/domain/cabinet/smartCabinet/db/SmartCabinetEntity.java +++ b/agileboot-domain/src/main/java/com/agileboot/domain/cabinet/smartCabinet/db/SmartCabinetEntity.java @@ -43,6 +43,10 @@ public class SmartCabinetEntity extends BaseEntity { @TableField("main_cabinet") private Long mainCabinet; + @ApiModelProperty("归属类型(0-借还柜 1-固资通)") + @TableField("belong_type") + private Integer belongType; + @ApiModelProperty("归属主柜名称") @TableField(exist = false) private String mainCabinetName; diff --git a/agileboot-domain/src/main/java/com/agileboot/domain/cabinet/smartCabinet/dto/SmartCabinetDTO.java b/agileboot-domain/src/main/java/com/agileboot/domain/cabinet/smartCabinet/dto/SmartCabinetDTO.java index eb98b76..1ad81ec 100644 --- a/agileboot-domain/src/main/java/com/agileboot/domain/cabinet/smartCabinet/dto/SmartCabinetDTO.java +++ b/agileboot-domain/src/main/java/com/agileboot/domain/cabinet/smartCabinet/dto/SmartCabinetDTO.java @@ -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; diff --git a/agileboot-domain/src/main/java/com/agileboot/domain/cabinet/smartCabinet/query/SearchSmartCabinetQuery.java b/agileboot-domain/src/main/java/com/agileboot/domain/cabinet/smartCabinet/query/SearchSmartCabinetQuery.java index a881ea4..aa78b14 100644 --- a/agileboot-domain/src/main/java/com/agileboot/domain/cabinet/smartCabinet/query/SearchSmartCabinetQuery.java +++ b/agileboot-domain/src/main/java/com/agileboot/domain/cabinet/smartCabinet/query/SearchSmartCabinetQuery.java @@ -18,6 +18,8 @@ public class SearchSmartCabinetQuery extends AbstractPageQuery { private Date endTime; private Long mqttServerId; private Long shopId; + + private Integer belongType; @Override public QueryWrapper addQueryCondition() { @@ -28,6 +30,7 @@ public class SearchSmartCabinetQuery extends AbstractPageQuery { .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); diff --git a/sql/20250521_ab98_user_tag.sql b/sql/20250521_ab98_user_tag.sql index e4599b5..bfad6e6 100644 --- a/sql/20250521_ab98_user_tag.sql +++ b/sql/20250521_ab98_user_tag.sql @@ -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='用户标签表'; \ No newline at end of file +) 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`; \ No newline at end of file