设备使用记录相关操作类

dev2.0
anthonywj 2 years ago
parent 024431999a
commit 98951a39f0

@ -0,0 +1,9 @@
package com.glxp.api.dao.inv;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glxp.api.entity.inv.DeviceAssetUsageEntity;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface DeviceAssetUsageMapper extends BaseMapper<DeviceAssetUsageEntity> {
}

@ -0,0 +1,75 @@
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_usage")
public class DeviceAssetUsageEntity implements Serializable {
/**
* ID
*/
@TableId(value = "id", type = IdType.INPUT)
private Long id;
/**
* 使
*/
@TableField(value = "code")
private String code;
/**
* 使
*/
@TableField(value = "`user`")
private String user;
/**
*
*/
@TableField(value = "startTime")
private Date startTime;
/**
*
*/
@TableField(value = "endTime")
private Date endTime;
/**
*
*/
@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;
}

@ -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.dao.inv.DeviceAssetUsageMapper;
import com.glxp.api.entity.inv.DeviceAssetUsageEntity;
@Service
public class DeviceAssetUsageService extends ServiceImpl<DeviceAssetUsageMapper, DeviceAssetUsageEntity> {
}

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.glxp.api.dao.inv.DeviceAssetUsageMapper">
<resultMap id="BaseResultMap" type="com.glxp.api.entity.inv.DeviceAssetUsageEntity">
<!--@mbg.generated-->
<!--@Table device_asset_usage-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="user" jdbcType="VARCHAR" property="user" />
<result column="startTime" jdbcType="TIMESTAMP" property="startTime" />
<result column="endTime" jdbcType="TIMESTAMP" property="endTime" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="createUser" jdbcType="VARCHAR" property="createUser" />
<result column="createTime" jdbcType="TIMESTAMP" property="createTime" />
<result column="updateUser" jdbcType="VARCHAR" property="updateUser" />
<result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, code, `user`, startTime, endTime, remark, `createUser`, createTime, updateUser,
updateTime
</sql>
</mapper>

@ -223,3 +223,18 @@ CREATE TABLE IF NOT EXISTS `device_asset_user` (
`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;
CREATE TABLE IF NOT EXISTS `device_asset_usage` (
`id` bigint NOT NULL COMMENT '雪花ID',
`code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '使用记录号',
`user` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '使用人',
`startTime` datetime(0) NULL DEFAULT NULL COMMENT '开始时间',
`endTime` datetime(0) NULL DEFAULT NULL COMMENT '结束时间',
`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(255) 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;

Loading…
Cancel
Save