From d31eee08c3208db8dc4ab8a2abe96e3522d837b6 Mon Sep 17 00:00:00 2001 From: anthonywj Date: Thu, 24 Aug 2023 11:31:04 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E7=9B=B8=E5=85=B3=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E6=93=8D=E4=BD=9C=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inv/DeviceAssetUserController.java | 9 +++ .../api/dao/inv/DeviceAssetUserMapper.java | 9 +++ .../api/entity/inv/DeviceAssetUserEntity.java | 72 +++++++++++++++++++ .../service/inv/DeviceAssetUserService.java | 10 +++ .../mapper/inv/DeviceAssetUserMapper.xml | 23 ++++++ src/main/resources/schemas/schema_v2.2.sql | 39 ++++++++++ 6 files changed, 162 insertions(+) create mode 100644 src/main/java/com/glxp/api/controller/inv/DeviceAssetUserController.java create mode 100644 src/main/java/com/glxp/api/dao/inv/DeviceAssetUserMapper.java create mode 100644 src/main/java/com/glxp/api/entity/inv/DeviceAssetUserEntity.java create mode 100644 src/main/java/com/glxp/api/service/inv/DeviceAssetUserService.java create mode 100644 src/main/resources/mybatis/mapper/inv/DeviceAssetUserMapper.xml diff --git a/src/main/java/com/glxp/api/controller/inv/DeviceAssetUserController.java b/src/main/java/com/glxp/api/controller/inv/DeviceAssetUserController.java new file mode 100644 index 00000000..e277fb7e --- /dev/null +++ b/src/main/java/com/glxp/api/controller/inv/DeviceAssetUserController.java @@ -0,0 +1,9 @@ +package com.glxp.api.controller.inv; + +import com.glxp.api.controller.BaseController; +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@RestController +public class DeviceAssetUserController extends BaseController { +} diff --git a/src/main/java/com/glxp/api/dao/inv/DeviceAssetUserMapper.java b/src/main/java/com/glxp/api/dao/inv/DeviceAssetUserMapper.java new file mode 100644 index 00000000..51b274a3 --- /dev/null +++ b/src/main/java/com/glxp/api/dao/inv/DeviceAssetUserMapper.java @@ -0,0 +1,9 @@ +package com.glxp.api.dao.inv; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.api.entity.inv.DeviceAssetUserEntity; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface DeviceAssetUserMapper extends BaseMapper { +} diff --git a/src/main/java/com/glxp/api/entity/inv/DeviceAssetUserEntity.java b/src/main/java/com/glxp/api/entity/inv/DeviceAssetUserEntity.java new file mode 100644 index 00000000..99f3e6e8 --- /dev/null +++ b/src/main/java/com/glxp/api/entity/inv/DeviceAssetUserEntity.java @@ -0,0 +1,72 @@ +package com.glxp.api.entity.inv; + +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 java.io.Serializable; +import java.util.Date; +import lombok.Data; + +@Data +@TableName(value = "device_asset_user") +public class DeviceAssetUserEntity implements Serializable { + @TableId(value = "id", type = IdType.INPUT) + private Long id; + + /** + * 设备资产编码 + */ + @TableField(value = "devCodeFk") + private String devCodeFk; + + /** + * 相关人员名称 + */ + @TableField(value = "userName") + private String userName; + + /** + * 联系方式1 + */ + @TableField(value = "contact1") + private String contact1; + + /** + * 联系方式2 + */ + @TableField(value = "contact2") + private String contact2; + + /** + * 备注说明 + */ + @TableField(value = "remark") + private String remark; + + /** + * 创建人 + */ + @TableField(value = "`createUser`") + private String createUser; + + /** + * 创建时间 + */ + @TableField(value = "createTime") + private Date createTime; + + /** + * 更新人 + */ + @TableField(value = "updateUser") + private String updateUser; + + /** + * 更新时间 + */ + @TableField(value = "updateTime") + private Date updateTime; + + private static final long serialVersionUID = 1L; +} diff --git a/src/main/java/com/glxp/api/service/inv/DeviceAssetUserService.java b/src/main/java/com/glxp/api/service/inv/DeviceAssetUserService.java new file mode 100644 index 00000000..be215176 --- /dev/null +++ b/src/main/java/com/glxp/api/service/inv/DeviceAssetUserService.java @@ -0,0 +1,10 @@ +package com.glxp.api.service.inv; + +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.glxp.api.entity.inv.DeviceAssetUserEntity; +import com.glxp.api.dao.inv.DeviceAssetUserMapper; +@Service +public class DeviceAssetUserService extends ServiceImpl { + +} diff --git a/src/main/resources/mybatis/mapper/inv/DeviceAssetUserMapper.xml b/src/main/resources/mybatis/mapper/inv/DeviceAssetUserMapper.xml new file mode 100644 index 00000000..88d600b2 --- /dev/null +++ b/src/main/resources/mybatis/mapper/inv/DeviceAssetUserMapper.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + id, devCodeFk, userName, contact1, contact2, remark, `createUser`, createTime, updateUser, + updateTime + + diff --git a/src/main/resources/schemas/schema_v2.2.sql b/src/main/resources/schemas/schema_v2.2.sql index b0de3907..e243e5d4 100644 --- a/src/main/resources/schemas/schema_v2.2.sql +++ b/src/main/resources/schemas/schema_v2.2.sql @@ -184,3 +184,42 @@ INSERT ignore INTO `sys_param_config`(`id`, `parentId`, `paramName`, `paramKey`, INSERT ignore INTO `sys_pdf_template_relevance_label` (`id`, `templateId`, `customerId`, `adminId`, `moduleId`, `localAction`, `remark1`, `remark2`, `remark3`, `printType`, `modelKey`, `updateTime`) VALUES (5, 3, 110, 0, 9, '设备打印', NULL, NULL, NULL, NULL, 'lable', '2023-06-25 15:18:37'); + +CREATE TABLE IF NOT EXISTS `device_asset_cert` ( + `id` bigint NOT NULL, + `devCodeFk` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '设备资产编码外键', + `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '证书名称', + `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '证书编码', + `filePath` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '文件路径', + `vailDate` datetime(0) NULL DEFAULT NULL COMMENT '生效期', + `expireDate` datetime(0) NULL DEFAULT NULL COMMENT '失效期', + `status` tinyint NULL DEFAULT NULL COMMENT '证书状态', + `type` tinyint NULL DEFAULT NULL COMMENT '证书类型(1:资质证书;2:技术材料)', + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注说明', + `createUser` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人', + `createTime` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `updateUser` datetime(0) NULL DEFAULT NULL COMMENT '更新人', + `updateTime` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of device_asset_cert +-- ---------------------------- + +SET FOREIGN_KEY_CHECKS = 1; + + +CREATE TABLE IF NOT EXISTS `device_asset_user` ( + `id` bigint NOT NULL COMMENT '雪花ID', + `devCodeFk` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '设备资产编码', + `userName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '相关人员名称', + `contact1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '联系方式1', + `contact2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '联系方式2', + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注说明', + `createUser` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人', + `createTime` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `updateUser` varchar(0) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '更新人', + `updateTime` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;