Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄嘉阳
/
iot-platform-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
600ea9f9
authored
Sep 05, 2023
by
杨伟程
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
设备建表
parent
35e57c70
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
324 additions
and
1 deletions
db/inti-elder.sql
server-generator/src/main/java/com/makeit/com/makeit/controller/PlatDeviceController.java
server-generator/src/main/java/com/makeit/com/makeit/controller/PlatDeviceOtherController.java
server-generator/src/test/java/CodeGenerator.java
server-service/src/main/java/com/makeit/entity/platform/device/PlatDevice.java
server-service/src/main/java/com/makeit/entity/platform/device/PlatDeviceOther.java
server-service/src/main/java/com/makeit/mapper/platform/device/PlatDeviceMapper.java
server-service/src/main/java/com/makeit/mapper/platform/device/PlatDeviceOtherMapper.java
server-service/src/main/java/com/makeit/service/platform/device/PlatDeviceOtherService.java
server-service/src/main/java/com/makeit/service/platform/device/PlatDeviceService.java
server-service/src/main/java/com/makeit/service/platform/device/impl/PlatDeviceOtherServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/device/impl/PlatDeviceServiceImpl.java
db/inti-elder.sql
View file @
600ea9f9
...
...
@@ -233,4 +233,54 @@ CREATE TABLE `plat_alarm_config`
)
ENGINE
=
INNODB
DEFAULT
CHARSET
=
utf8mb4
COMMENT
=
'告警配置'
;
CREATE
TABLE
`plat_device`
(
`id`
varchar
(
64
)
NOT
NULL
COMMENT
'id'
,
ori_device_id
varchar
(
64
)
NOT
NULL
COMMENT
'原始设备ID'
,
name
varchar
(
100
)
NOT
NULL
COMMENT
'设备名称'
,
product_name
varchar
(
100
)
NOT
NULL
COMMENT
'产品名称'
,
firmware_version
varchar
(
100
)
NOT
NULL
COMMENT
'固件版本'
,
registration_date
datetime
NOT
NULL
COMMENT
'注册时间'
,
last_online_data
datetime
NOT
NULL
COMMENT
'最后上线时间'
,
description
VARCHAR
(
1024
)
DEFAULT
NULL
COMMENT
'说明'
,
status
char
(
1
)
NOT
NULL
COMMENT
'状态 数据字典 1 在线 0离线'
,
org_id
varchar
(
64
)
NULL
COMMENT
'组织id'
,
city_org_id
varchar
(
64
)
NULL
COMMENT
'城市组织id'
,
district_org_id
varchar
(
64
)
NULL
COMMENT
'区组织id'
,
street_org_id
varchar
(
64
)
NULL
COMMENT
'街道组织id'
,
org_path
varchar
(
64
)
NULL
COMMENT
'组织路径'
,
`create_by`
varchar
(
64
)
DEFAULT
NULL
COMMENT
'创建者'
,
`create_date`
datetime
DEFAULT
NULL
COMMENT
'创建时间'
,
`update_by`
varchar
(
64
)
DEFAULT
NULL
COMMENT
'更新者'
,
`update_date`
datetime
DEFAULT
NULL
COMMENT
'更新时间'
,
del_flag
char
(
1
)
not
null
comment
' 删除标志 0否 1是 '
,
`tenant_id`
varchar
(
64
)
DEFAULT
NULL
COMMENT
' 租户id '
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COMMENT
=
'设备'
;
CREATE
TABLE
`plat_device_other`
(
`id`
varchar
(
64
)
NOT
NULL
COMMENT
'id'
,
device_id
varchar
(
64
)
NOT
NULL
COMMENT
'设备id'
,
ori_device_id
varchar
(
64
)
NOT
NULL
COMMENT
'原始设备id'
,
installation
varchar
(
64
)
NULL
COMMENT
'设备安装方式'
,
indicator_light
varchar
(
64
)
NULL
COMMENT
'开关指示灯'
,
attribute
varchar
(
3000
)
NULL
COMMENT
'设备属性json'
,
wifi_name
varchar
(
200
)
NOT
NULL
COMMENT
'wifi名称'
,
wifi_password
varchar
(
200
)
NOT
NULL
COMMENT
'wifi密码'
,
protocol_address
varchar
(
100
)
NOT
NULL
COMMENT
'协议地址'
,
protocol_port
varchar
(
100
)
NOT
NULL
COMMENT
'协议端口'
,
protocol_account
varchar
(
200
)
NOT
NULL
COMMENT
'协议账号'
,
protocol_password
varchar
(
200
)
NOT
NULL
COMMENT
'协议密码'
,
`create_by`
varchar
(
64
)
DEFAULT
NULL
COMMENT
'创建者'
,
`create_date`
datetime
DEFAULT
NULL
COMMENT
'创建时间'
,
`update_by`
varchar
(
64
)
DEFAULT
NULL
COMMENT
'更新者'
,
`update_date`
datetime
DEFAULT
NULL
COMMENT
'更新时间'
,
del_flag
char
(
1
)
not
null
comment
' 删除标志 0否 1是 '
,
`tenant_id`
varchar
(
64
)
DEFAULT
NULL
COMMENT
' 租户id '
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COMMENT
=
'设备其他信息'
;
server-generator/src/main/java/com/makeit/com/makeit/controller/PlatDeviceController.java
0 → 100644
View file @
600ea9f9
package
com
.
makeit
.
com
.
makeit
.
controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* <p>
* 设备 前端控制器
* </p>
*
* @author eugene young
* @since 2023-09-05
*/
@RestController
@RequestMapping
(
"/plat-device"
)
public
class
PlatDeviceController
{
}
server-generator/src/main/java/com/makeit/com/makeit/controller/PlatDeviceOtherController.java
0 → 100644
View file @
600ea9f9
package
com
.
makeit
.
com
.
makeit
.
controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* <p>
* 设备其他信息 前端控制器
* </p>
*
* @author eugene young
* @since 2023-09-05
*/
@RestController
@RequestMapping
(
"/plat-device-other"
)
public
class
PlatDeviceOtherController
{
}
server-generator/src/test/java/CodeGenerator.java
View file @
600ea9f9
...
...
@@ -106,7 +106,7 @@ public class CodeGenerator {
// 使用重点 下列字段填写表名 运行方法
// strategy.setInclude("edu_teacher","..."); // 多表-逆向工程
strategy
.
setInclude
(
"plat_
alarm_config
"
);
strategy
.
setInclude
(
"plat_
device"
,
"plat_device_other
"
);
strategy
.
setNaming
(
NamingStrategy
.
underline_to_camel
);
//数据库表映射到实体的命名策略
strategy
.
setTablePrefix
(
pc
.
getModuleName
()
+
"_"
);
//生成实体属性时去掉表"_"前缀并且第一个字母大写 如:gmt_create -> gmtCreate
...
...
server-service/src/main/java/com/makeit/entity/platform/device/PlatDevice.java
0 → 100644
View file @
600ea9f9
package
com
.
makeit
.
entity
.
platform
.
device
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
java.time.LocalDateTime
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.makeit.common.entity.BaseBusEntity
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* <p>
* 设备
* </p>
*
* @author eugene young
* @since 2023-09-05
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"PlatDevice对象"
,
description
=
"设备"
)
public
class
PlatDevice
extends
BaseBusEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"原始设备ID"
)
private
String
oriDeviceId
;
@ApiModelProperty
(
value
=
"设备名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"产品名称"
)
private
String
productName
;
@ApiModelProperty
(
value
=
"固件版本"
)
private
String
firmwareVersion
;
@ApiModelProperty
(
value
=
"注册时间"
)
private
LocalDateTime
registrationDate
;
@ApiModelProperty
(
value
=
"最后上线时间"
)
private
LocalDateTime
lastOnlineData
;
@ApiModelProperty
(
value
=
"说明"
)
private
String
description
;
@ApiModelProperty
(
value
=
"状态 数据字典 1 在线 0离线"
)
private
String
status
;
@ApiModelProperty
(
value
=
"组织id"
)
private
String
orgId
;
@ApiModelProperty
(
value
=
"城市组织id"
)
private
String
cityOrgId
;
@ApiModelProperty
(
value
=
"区组织id"
)
private
String
districtOrgId
;
@ApiModelProperty
(
value
=
"街道组织id"
)
private
String
streetOrgId
;
@ApiModelProperty
(
value
=
"组织路径"
)
private
String
orgPath
;
}
server-service/src/main/java/com/makeit/entity/platform/device/PlatDeviceOther.java
0 → 100644
View file @
600ea9f9
package
com
.
makeit
.
entity
.
platform
.
device
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.makeit.common.entity.BaseBusEntity
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* <p>
* 设备其他信息
* </p>
*
* @author eugene young
* @since 2023-09-05
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"PlatDeviceOther对象"
,
description
=
"设备其他信息"
)
public
class
PlatDeviceOther
extends
BaseBusEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"设备id"
)
private
String
deviceId
;
@ApiModelProperty
(
value
=
"原始设备id"
)
private
String
oriDeviceId
;
@ApiModelProperty
(
value
=
"设备安装方式"
)
private
String
installation
;
@ApiModelProperty
(
value
=
"开关指示灯"
)
private
String
indicatorLight
;
@ApiModelProperty
(
value
=
"设备属性json"
)
private
String
attribute
;
@ApiModelProperty
(
value
=
"wifi名称"
)
private
String
wifiName
;
@ApiModelProperty
(
value
=
"wifi密码"
)
private
String
wifiPassword
;
@ApiModelProperty
(
value
=
"协议地址"
)
private
String
protocolAddress
;
@ApiModelProperty
(
value
=
"协议端口"
)
private
String
protocolPort
;
@ApiModelProperty
(
value
=
"协议账号"
)
private
String
protocolAccount
;
@ApiModelProperty
(
value
=
"协议密码"
)
private
String
protocolPassword
;
}
server-service/src/main/java/com/makeit/mapper/platform/device/PlatDeviceMapper.java
0 → 100644
View file @
600ea9f9
package
com
.
makeit
.
mapper
.
platform
.
device
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.makeit.entity.platform.device.PlatDevice
;
/**
* <p>
* 设备 Mapper 接口
* </p>
*
* @author eugene young
* @since 2023-09-05
*/
public
interface
PlatDeviceMapper
extends
BaseMapper
<
PlatDevice
>
{
}
server-service/src/main/java/com/makeit/mapper/platform/device/PlatDeviceOtherMapper.java
0 → 100644
View file @
600ea9f9
package
com
.
makeit
.
mapper
.
platform
.
device
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.makeit.entity.platform.device.PlatDeviceOther
;
/**
* <p>
* 设备其他信息 Mapper 接口
* </p>
*
* @author eugene young
* @since 2023-09-05
*/
public
interface
PlatDeviceOtherMapper
extends
BaseMapper
<
PlatDeviceOther
>
{
}
server-service/src/main/java/com/makeit/service/platform/device/PlatDeviceOtherService.java
0 → 100644
View file @
600ea9f9
package
com
.
makeit
.
service
.
platform
.
device
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.makeit.entity.platform.device.PlatDeviceOther
;
/**
* <p>
* 设备其他信息 服务类
* </p>
*
* @author eugene young
* @since 2023-09-05
*/
public
interface
PlatDeviceOtherService
extends
IService
<
PlatDeviceOther
>
{
}
server-service/src/main/java/com/makeit/service/platform/device/PlatDeviceService.java
0 → 100644
View file @
600ea9f9
package
com
.
makeit
.
service
.
platform
.
device
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.makeit.entity.platform.device.PlatDevice
;
/**
* <p>
* 设备 服务类
* </p>
*
* @author eugene young
* @since 2023-09-05
*/
public
interface
PlatDeviceService
extends
IService
<
PlatDevice
>
{
}
server-service/src/main/java/com/makeit/service/platform/device/impl/PlatDeviceOtherServiceImpl.java
0 → 100644
View file @
600ea9f9
package
com
.
makeit
.
service
.
platform
.
device
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.makeit.entity.platform.device.PlatDeviceOther
;
import
com.makeit.mapper.platform.device.PlatDeviceOtherMapper
;
import
com.makeit.service.platform.device.PlatDeviceOtherService
;
import
org.springframework.stereotype.Service
;
/**
* <p>
* 设备其他信息 服务实现类
* </p>
*
* @author eugene young
* @since 2023-09-05
*/
@Service
public
class
PlatDeviceOtherServiceImpl
extends
ServiceImpl
<
PlatDeviceOtherMapper
,
PlatDeviceOther
>
implements
PlatDeviceOtherService
{
}
server-service/src/main/java/com/makeit/service/platform/device/impl/PlatDeviceServiceImpl.java
0 → 100644
View file @
600ea9f9
package
com
.
makeit
.
service
.
platform
.
device
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.makeit.entity.platform.device.PlatDevice
;
import
com.makeit.mapper.platform.device.PlatDeviceMapper
;
import
com.makeit.service.platform.device.PlatDeviceService
;
import
org.springframework.stereotype.Service
;
/**
* <p>
* 设备 服务实现类
* </p>
*
* @author eugene young
* @since 2023-09-05
*/
@Service
public
class
PlatDeviceServiceImpl
extends
ServiceImpl
<
PlatDeviceMapper
,
PlatDevice
>
implements
PlatDeviceService
{
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment