Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
BYOD
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tutingyin
BYOD
Commits
589d2fcc
Commit
589d2fcc
authored
May 21, 2024
by
tutingyin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: 设备详情拆分
cpu 系统资源 网卡信息 磁盘信息 usb信息
parent
d1d89f8c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
2617 additions
and
4 deletions
+2617
-4
UserTokenFilter.java
...ent/src/main/java/com/skr/mdm/filter/UserTokenFilter.java
+3
-4
EquipmentCPUDTO.java
...socket/src/main/java/com/skr/mdm/dto/EquipmentCPUDTO.java
+46
-0
EquipmentDiskDTO.java
...ocket/src/main/java/com/skr/mdm/dto/EquipmentDiskDTO.java
+101
-0
EquipmentInfoCopyDTO.java
...t/src/main/java/com/skr/mdm/dto/EquipmentInfoCopyDTO.java
+119
-0
EquipmentNetDTO.java
...socket/src/main/java/com/skr/mdm/dto/EquipmentNetDTO.java
+45
-0
EquipmentSysResourceDTO.java
...rc/main/java/com/skr/mdm/dto/EquipmentSysResourceDTO.java
+75
-0
EquipmentUsbDTO.java
...socket/src/main/java/com/skr/mdm/dto/EquipmentUsbDTO.java
+40
-0
EquipmentInfo2ServiceImpl.java
...mdm/service/impl/equipment/EquipmentInfo2ServiceImpl.java
+232
-0
DeviceEquipmentCpuDao.java
.../src/main/java/com/skr/mdm/dao/DeviceEquipmentCpuDao.java
+18
-0
DeviceEquipmentDiskDao.java
...src/main/java/com/skr/mdm/dao/DeviceEquipmentDiskDao.java
+18
-0
DeviceEquipmentInfoCopyDao.java
...main/java/com/skr/mdm/dao/DeviceEquipmentInfoCopyDao.java
+18
-0
DeviceEquipmentNetDao.java
.../src/main/java/com/skr/mdm/dao/DeviceEquipmentNetDao.java
+18
-0
DeviceEquipmentSysSourceDao.java
...ain/java/com/skr/mdm/dao/DeviceEquipmentSysSourceDao.java
+18
-0
DeviceEquipmentUsbDao.java
.../src/main/java/com/skr/mdm/dao/DeviceEquipmentUsbDao.java
+17
-0
RailStrategyDao.java
mdm_dao/src/main/java/com/skr/mdm/dao/RailStrategyDao.java
+62
-0
RailStrategyInfoDao.java
...ao/src/main/java/com/skr/mdm/dao/RailStrategyInfoDao.java
+21
-0
RailStrategyUserDao.java
...ao/src/main/java/com/skr/mdm/dao/RailStrategyUserDao.java
+53
-0
DeviceEquipmentCpuDO.java
...rc/main/java/com/skr/mdm/entity/DeviceEquipmentCpuDO.java
+62
-0
DeviceEquipmentDiskDO.java
...c/main/java/com/skr/mdm/entity/DeviceEquipmentDiskDO.java
+114
-0
DeviceEquipmentInfoCopyDO.java
...in/java/com/skr/mdm/entity/DeviceEquipmentInfoCopyDO.java
+128
-0
DeviceEquipmentNetDO.java
...rc/main/java/com/skr/mdm/entity/DeviceEquipmentNetDO.java
+62
-0
DeviceEquipmentSysSourceDO.java
...n/java/com/skr/mdm/entity/DeviceEquipmentSysSourceDO.java
+89
-0
DeviceEquipmentUsbDO.java
...rc/main/java/com/skr/mdm/entity/DeviceEquipmentUsbDO.java
+56
-0
DeviceEquipmentCpuDao.xml
mdm_dao/src/main/resources/mapper/DeviceEquipmentCpuDao.xml
+125
-0
DeviceEquipmentDiskDao.xml
mdm_dao/src/main/resources/mapper/DeviceEquipmentDiskDao.xml
+236
-0
DeviceEquipmentInfoCopyDao.xml
.../src/main/resources/mapper/DeviceEquipmentInfoCopyDao.xml
+258
-0
DeviceEquipmentNetDao.xml
mdm_dao/src/main/resources/mapper/DeviceEquipmentNetDao.xml
+124
-0
DeviceEquipmentSysSourceDao.xml
...src/main/resources/mapper/DeviceEquipmentSysSourceDao.xml
+186
-0
DeviceEquipmentUsbDao.xml
mdm_dao/src/main/resources/mapper/DeviceEquipmentUsbDao.xml
+124
-0
RailStrategyDao.xml
mdm_dao/src/main/resources/mapper/RailStrategyDao.xml
+0
-0
RailStrategyInfoDao.xml
mdm_dao/src/main/resources/mapper/RailStrategyInfoDao.xml
+74
-0
RailStrategyUserDao.xml
mdm_dao/src/main/resources/mapper/RailStrategyUserDao.xml
+75
-0
No files found.
mdm_client/src/main/java/com/skr/mdm/filter/UserTokenFilter.java
View file @
589d2fcc
...
@@ -34,10 +34,8 @@ public class UserTokenFilter extends OncePerRequestFilter {
...
@@ -34,10 +34,8 @@ public class UserTokenFilter extends OncePerRequestFilter {
static
{
static
{
LOGIN_URL_LIST
.
add
(
"login"
);
LOGIN_URL_LIST
.
add
(
"login"
);
LOGIN_URL_LIST
.
add
(
"imei/login"
);
LOGIN_URL_LIST
.
add
(
"user/login"
);
LOGIN_URL_LIST
.
add
(
"user/login"
);
LOGIN_URL_LIST
.
add
(
"oaid/login"
);
LOGIN_URL_LIST
.
add
(
"serial/login"
);
LOGIN_URL_LIST
.
add
(
"uuid/login"
);
}
}
@Autowired
@Autowired
...
@@ -81,4 +79,4 @@ public class UserTokenFilter extends OncePerRequestFilter {
...
@@ -81,4 +79,4 @@ public class UserTokenFilter extends OncePerRequestFilter {
private
String
getTokenParameter
(
HttpServletRequest
request
)
{
private
String
getTokenParameter
(
HttpServletRequest
request
)
{
return
request
.
getHeader
(
RequestHeaderConstants
.
REQUEST_HEADER_TOKEN
);
return
request
.
getHeader
(
RequestHeaderConstants
.
REQUEST_HEADER_TOKEN
);
}
}
}
}
\ No newline at end of file
mdm_client_websocket/src/main/java/com/skr/mdm/dto/EquipmentCPUDTO.java
0 → 100644
View file @
589d2fcc
package
com
.
skr
.
mdm
.
dto
;
import
lombok.Data
;
/**
* @author tty
* @date 2024/5/21 15:20
* PC cpu信息
*/
@Data
public
class
EquipmentCPUDTO
{
/**
* CPU 架构
*/
private
String
cpuArch
;
/**
* CPU 制造厂商
*/
private
String
cpuMaker
;
/**
* CPU 型号
*/
private
String
cpuModel
;
/**
* CPU 额定主频
*/
private
String
cpuNominalMainFrequency
;
/**
* CPU 核心数量
*/
private
Integer
cpuCore
;
/**
* CPU 对虚拟化的支持
*/
private
String
cpuVirtualization
;
}
\ No newline at end of file
mdm_client_websocket/src/main/java/com/skr/mdm/dto/EquipmentDiskDTO.java
0 → 100644
View file @
589d2fcc
package
com
.
skr
.
mdm
.
dto
;
import
lombok.Data
;
/**
* @author tty
* @date 2024/5/21 15:20
* PC 磁盘
*/
@Data
public
class
EquipmentDiskDTO
{
/**
* 路径
*/
private
String
path
;
/**
* 执照商
*/
private
String
vendor
;
/**
* 型号
*/
private
String
model
;
/**
* 序列号
*/
private
String
serialNum
;
/**
* 磁盘类型
*/
private
Integer
distType
;
/**
* 接口类型
*/
private
Integer
interfaceType
;
/**
* 转速
*/
private
Double
speed
;
/**
* 扇区数量
*/
private
String
numSectors
;
/**
* 扇区字节数
*/
private
String
bytesPerSec
;
/**
* 容量
*/
private
String
diskCapMib
;
/**
* 子分区数量
*/
private
String
numSubpart
;
/**
* uuid
*/
private
Integer
uuid
;
/**
* 是否挂载
*/
private
Integer
isMnt
;
/**
* 挂载路径
*/
private
String
mntPath
;
/**
* 格式化类型
*/
private
Integer
fsType
;
/**
* 分区类型
*/
private
Integer
partType
;
/**
* 固件版本信息
*/
private
String
fwVer
;
}
\ No newline at end of file
mdm_client_websocket/src/main/java/com/skr/mdm/dto/EquipmentInfoCopyDTO.java
0 → 100644
View file @
589d2fcc
package
com
.
skr
.
mdm
.
dto
;
import
lombok.Data
;
import
java.util.List
;
/**
* @author tty
* @date 2024/5/20 15:18
* PC设备详情
*/
@Data
public
class
EquipmentInfoCopyDTO
{
private
EquipmentCPUDTO
equipmentCPUDTO
;
private
EquipmentSysResourceDTO
sysResourceDTO
;
private
List
<
EquipmentUsbDTO
>
equipmentUsbDTOList
;
private
EquipmentDiskDTO
equipmentDiskDTO
;
private
EquipmentNetDTO
equipmentNetDTO
;
/**
* 主板名称
*/
private
String
motherboard
;
/**
* 主板生产时间
*/
private
String
productionDate
;
/**
* 主板生产厂商
*/
private
String
vendor
;
/**
* 系统架构信息
*/
private
String
sysArch
;
/**
* 系统名称
*/
private
String
sysName
;
/**
* 系统版本号
*/
private
String
sysVersion
;
/**
* 内核版本号
*/
private
String
sysKernelVersion
;
/**
* 当前登录用户的用户名
*/
private
String
sysLoginUser
;
/**
* 操作系统项目编号名
*/
private
String
osProjectNumName
;
/**
* 操作系统项目子编号名
*/
private
String
osSubProjectNumName
;
/**
* 操作系统产品标识码
*/
private
String
osProductId
;
/**
* 操作系统宿主机的虚拟机类型
*/
private
String
osHostVmType
;
/**
* 操作系统宿主机的云平台类型
*/
private
String
osCloudPlatformType
;
/**
* 操作系统是否为专用机系统
*/
private
String
osIsDedicatedSystem
;
/**
* 系统分辨率信息
*/
private
String
sysResolution
;
/**
* 系统硬件版本类别
*/
private
String
sysHwVersionType
;
/**
* 系统版本号/补丁版本号
*/
private
String
sysPatchVersion
;
/**
* bios厂商信息
*/
private
String
biosVendor
;
/**
* bios版本信息
*/
private
String
biosVersion
;
}
\ No newline at end of file
mdm_client_websocket/src/main/java/com/skr/mdm/dto/EquipmentNetDTO.java
0 → 100644
View file @
589d2fcc
package
com
.
skr
.
mdm
.
dto
;
import
lombok.Data
;
/**
* @author tty
* @date 2024/5/21 15:20
* PC 网卡
*/
@Data
public
class
EquipmentNetDTO
{
/**
* MAC
*/
private
String
mac
;
/**
* json数组形式
*/
private
String
ipv4
;
/**
* json数组形式
*/
private
String
ipv6
;
/**
* 网卡的有线/无线类型 0:有线 1:无线
*/
private
Integer
nicType
;
/**
* vid
*/
private
Integer
vid
;
/**
* pid
*/
private
Integer
pid
;
}
\ No newline at end of file
mdm_client_websocket/src/main/java/com/skr/mdm/dto/EquipmentSysResourceDTO.java
0 → 100644
View file @
589d2fcc
package
com
.
skr
.
mdm
.
dto
;
import
lombok.Data
;
/**
* @author tty
* @date 2024/5/20 14:56
* 系统资源
*/
@Data
public
class
EquipmentSysResourceDTO
{
/**
* 物理内存总大小
*/
private
String
totalPhyMem
;
/**
* 物理内存使用率
*/
private
String
phyMemRate
;
/**
* 物理内存使用大小
*/
private
String
usedPhyMem
;
/**
* 实际可用的物理内存大小
*/
private
String
availPhyMem
;
/**
* 实际空闲的物理内存大小
*/
private
String
freePhyMem
;
/**
* 所有应用申请的虚拟内存总量
*/
private
String
totalVirtualMem
;
/**
* 系统中 Swap 分区总大小
*/
private
String
totalSwapSpace
;
/**
* Swap 分区使用率
*/
private
String
swapRate
;
/**
* Swap 分区使用量
*/
private
String
usedSwap
;
/**
* Swap 分区空闲大小
*/
private
String
freeSwap
;
/**
* CPU 瞬时使用率
*/
private
String
cpuPeak
;
/**
* 开机时长
*/
private
String
upTime
;
}
\ No newline at end of file
mdm_client_websocket/src/main/java/com/skr/mdm/dto/EquipmentUsbDTO.java
0 → 100644
View file @
589d2fcc
package
com
.
skr
.
mdm
.
dto
;
import
lombok.Data
;
/**
* @author tty
* @date 2024/5/21 15:20
* PC USB
*/
@Data
public
class
EquipmentUsbDTO
{
/**
* 名称
*/
private
String
name
;
/**
* 类型
*/
private
String
type
;
private
String
pid
;
private
String
vid
;
/**
* 序列号
*/
private
String
serialNum
;
/**
* 路径
*/
private
String
path
;
}
\ No newline at end of file
mdm_client_websocket/src/main/java/com/skr/mdm/service/impl/equipment/EquipmentInfo2ServiceImpl.java
0 → 100644
View file @
589d2fcc
package
com
.
skr
.
mdm
.
service
.
impl
.
equipment
;
import
cn.hutool.json.JSONUtil
;
import
com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper
;
import
com.baomidou.mybatisplus.extension.conditions.update.LambdaUpdateChainWrapper
;
import
com.skr.mdm.annotation.CmdHandler
;
import
com.skr.mdm.constant.CmdTypeConstants
;
import
com.skr.mdm.dao.*
;
import
com.skr.mdm.dto.*
;
import
com.skr.mdm.entity.*
;
import
com.skr.mdm.result.ResponseResult
;
import
com.skr.mdm.service.CmdHandlerService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
java.util.List
;
import
java.util.Objects
;
/**
* @author tty
* @date 2024/5/14 17:08
*/
@Slf4j
@CmdHandler
(
cmdType
=
CmdTypeConstants
.
DEV_INFO
)
public
class
EquipmentInfo2ServiceImpl
implements
CmdHandlerService
{
@Autowired
private
DeviceEquipmentDao
equipmentDao
;
@Autowired
private
DeviceEquipmentInfoCopyDao
equipmentInfoDao
;
@Autowired
private
DeviceEquipmentCpuDao
equipmentCpuDao
;
@Autowired
private
DeviceEquipmentSysSourceDao
equipmentSysSourceDao
;
@Autowired
private
DeviceEquipmentUsbDao
equipmentUsbDao
;
@Autowired
private
DeviceEquipmentDiskDao
equipmentDiskDao
;
@Autowired
private
DeviceEquipmentNetDao
equipmentNetDao
;
@Override
public
ResponseResult
cmdHandler
(
Integer
equipmentId
,
String
data
)
{
try
{
EquipmentInfoCopyDTO
equipmentInfoDTO
=
JSONUtil
.
toBean
(
data
,
EquipmentInfoCopyDTO
.
class
);
operationEquipmentInfo
(
equipmentId
,
equipmentInfoDTO
);
operationEquipmentCpu
(
equipmentId
,
equipmentInfoDTO
.
getEquipmentCPUDTO
());
operationEquipmentSysSource
(
equipmentId
,
equipmentInfoDTO
.
getSysResourceDTO
());
operationEquipmentUsb
(
equipmentId
,
equipmentInfoDTO
.
getEquipmentUsbDTOList
());
operationEquipmentDisk
(
equipmentId
,
equipmentInfoDTO
.
getEquipmentDiskDTO
());
operationEquipmentNet
(
equipmentId
,
equipmentInfoDTO
.
getEquipmentNetDTO
());
// 更新主板生产商 生产时间 主板名称
new
LambdaUpdateChainWrapper
<>(
equipmentDao
)
.
set
(
DeviceEquipmentDO:
:
getVendor
,
equipmentInfoDTO
.
getVendor
())
.
set
(
DeviceEquipmentDO:
:
getProductionDate
,
equipmentInfoDTO
.
getProductionDate
())
.
set
(
DeviceEquipmentDO:
:
getMotherboard
,
equipmentInfoDTO
.
getMotherboard
())
.
eq
(
DeviceEquipmentDO:
:
getId
,
equipmentId
)
.
update
();
return
ResponseResult
.
success
();
}
catch
(
Exception
e
)
{
log
.
error
(
"上传设备信息异常: {} {} {} "
,
equipmentId
,
data
,
e
);
return
ResponseResult
.
failure
();
}
}
/**
* 设备详情更新/新增
*
* @param equipmentId
* @param equipmentInfoDTO
*/
private
void
operationEquipmentInfo
(
Integer
equipmentId
,
EquipmentInfoCopyDTO
equipmentInfoDTO
)
{
DeviceEquipmentInfoCopyDO
equipmentInfoDO
=
new
DeviceEquipmentInfoCopyDO
();
BeanUtils
.
copyProperties
(
equipmentInfoDTO
,
equipmentInfoDO
);
equipmentInfoDO
.
setEquipmentId
(
equipmentId
);
DeviceEquipmentInfoCopyDO
dbEquipmentInfoDO
=
new
LambdaQueryChainWrapper
<>(
equipmentInfoDao
)
.
eq
(
DeviceEquipmentInfoCopyDO:
:
getEquipmentId
,
equipmentId
)
.
one
();
if
(
Objects
.
isNull
(
dbEquipmentInfoDO
))
{
// 添加设备信息
equipmentInfoDao
.
insert
(
equipmentInfoDO
);
}
else
{
// 修改设备信息
equipmentInfoDO
.
setId
(
dbEquipmentInfoDO
.
getId
());
equipmentInfoDao
.
updateById
(
equipmentInfoDO
);
}
}
/**
* CPU详情更新/新增
*
* @param equipmentId
* @param equipmentCPUDTO
*/
private
void
operationEquipmentCpu
(
Integer
equipmentId
,
EquipmentCPUDTO
equipmentCPUDTO
)
{
DeviceEquipmentCpuDO
deviceEquipmentCpuDO
=
new
DeviceEquipmentCpuDO
();
BeanUtils
.
copyProperties
(
equipmentCPUDTO
,
deviceEquipmentCpuDO
);
deviceEquipmentCpuDO
.
setEquipmentId
(
equipmentId
);
DeviceEquipmentCpuDO
dbEquipmentInfoDO
=
new
LambdaQueryChainWrapper
<>(
equipmentCpuDao
)
.
eq
(
DeviceEquipmentCpuDO:
:
getEquipmentId
,
equipmentId
)
.
one
();
if
(
Objects
.
isNull
(
dbEquipmentInfoDO
))
{
// 添加设备信息
equipmentCpuDao
.
insertSelective
(
deviceEquipmentCpuDO
);
}
else
{
// 修改设备信息
deviceEquipmentCpuDO
.
setId
(
dbEquipmentInfoDO
.
getId
());
equipmentCpuDao
.
updateByPrimaryKeySelective
(
deviceEquipmentCpuDO
);
}
}
/**
* 系统资源详情更新/新增
*
* @param equipmentId
* @param equipmentSysResourceDTO
*/
private
void
operationEquipmentSysSource
(
Integer
equipmentId
,
EquipmentSysResourceDTO
equipmentSysResourceDTO
)
{
DeviceEquipmentSysSourceDO
equipmentSysSourceDO
=
new
DeviceEquipmentSysSourceDO
();
BeanUtils
.
copyProperties
(
equipmentSysResourceDTO
,
equipmentSysSourceDO
);
equipmentSysSourceDO
.
setEquipmentId
(
equipmentId
);
DeviceEquipmentSysSourceDO
dbSysSourceDO
=
new
LambdaQueryChainWrapper
<>(
equipmentSysSourceDao
)
.
eq
(
DeviceEquipmentSysSourceDO:
:
getEquipmentId
,
equipmentId
)
.
one
();
if
(
Objects
.
isNull
(
dbSysSourceDO
))
{
// 添加设备信息
equipmentSysSourceDao
.
insertSelective
(
equipmentSysSourceDO
);
}
else
{
// 修改设备信息
equipmentSysSourceDO
.
setId
(
dbSysSourceDO
.
getId
());
equipmentSysSourceDao
.
updateByPrimaryKeySelective
(
equipmentSysSourceDO
);
}
}
/**
* USB详情更新/新增
*
* @param equipmentId
* @param equipmentUsbDTOList
*/
private
void
operationEquipmentUsb
(
Integer
equipmentId
,
List
<
EquipmentUsbDTO
>
equipmentUsbDTOList
)
{
if
(
CollectionUtils
.
isNotEmpty
(
equipmentUsbDTOList
))
{
for
(
EquipmentUsbDTO
equipmentUsbDTO
:
equipmentUsbDTOList
)
{
DeviceEquipmentUsbDO
deviceEquipmentUsbDO
=
new
DeviceEquipmentUsbDO
();
BeanUtils
.
copyProperties
(
equipmentUsbDTO
,
deviceEquipmentUsbDO
);
deviceEquipmentUsbDO
.
setEquipmentId
(
equipmentId
);
DeviceEquipmentUsbDO
dbEquipmentUsbDO
=
new
LambdaQueryChainWrapper
<>(
equipmentUsbDao
)
.
eq
(
DeviceEquipmentUsbDO:
:
getEquipmentId
,
equipmentId
)
.
one
();
if
(
Objects
.
isNull
(
dbEquipmentUsbDO
))
{
// 添加设备信息
equipmentUsbDao
.
insertSelective
(
deviceEquipmentUsbDO
);
}
else
{
// 修改设备信息
deviceEquipmentUsbDO
.
setId
(
dbEquipmentUsbDO
.
getId
());
equipmentUsbDao
.
updateByPrimaryKeySelective
(
deviceEquipmentUsbDO
);
}
}
}
}
/**
* 磁盘详情更新/新增
*
* @param equipmentId
* @param equipmentDiskDTO
*/
private
void
operationEquipmentDisk
(
Integer
equipmentId
,
EquipmentDiskDTO
equipmentDiskDTO
)
{
if
(
Objects
.
nonNull
(
equipmentDiskDTO
))
{
DeviceEquipmentDiskDO
deviceEquipmentDiskDO
=
new
DeviceEquipmentDiskDO
();
BeanUtils
.
copyProperties
(
equipmentDiskDTO
,
deviceEquipmentDiskDO
);
deviceEquipmentDiskDO
.
setEquipmentId
(
equipmentId
);
DeviceEquipmentDiskDO
equipmentDiskDO
=
new
LambdaQueryChainWrapper
<>(
equipmentDiskDao
)
.
eq
(
DeviceEquipmentDiskDO:
:
getEquipmentId
,
equipmentId
)
.
one
();
if
(
Objects
.
isNull
(
equipmentDiskDO
))
{
// 添加设备信息
equipmentDiskDao
.
insertSelective
(
deviceEquipmentDiskDO
);
}
else
{
// 修改设备信息
deviceEquipmentDiskDO
.
setId
(
equipmentDiskDO
.
getId
());
equipmentDiskDao
.
updateByPrimaryKeySelective
(
deviceEquipmentDiskDO
);
}
}
}
/**
* 网卡更新/新增
*
* @param equipmentId
* @param equipmentNetDTO
*/
private
void
operationEquipmentNet
(
Integer
equipmentId
,
EquipmentNetDTO
equipmentNetDTO
)
{
if
(
Objects
.
nonNull
(
equipmentNetDTO
))
{
DeviceEquipmentNetDO
equipmentNetDO
=
new
DeviceEquipmentNetDO
();
BeanUtils
.
copyProperties
(
equipmentNetDTO
,
equipmentNetDO
);
equipmentNetDO
.
setEquipmentId
(
equipmentId
);
DeviceEquipmentNetDO
deviceEquipmentNetDO
=
new
LambdaQueryChainWrapper
<>(
equipmentNetDao
)
.
eq
(
DeviceEquipmentNetDO:
:
getEquipmentId
,
equipmentId
)
.
one
();
if
(
Objects
.
isNull
(
deviceEquipmentNetDO
))
{
// 添加设备信息
equipmentNetDao
.
insertSelective
(
equipmentNetDO
);
}
else
{
// 修改设备信息
equipmentNetDO
.
setId
(
deviceEquipmentNetDO
.
getId
());
equipmentNetDao
.
updateByPrimaryKeySelective
(
equipmentNetDO
);
}
}
}
}
\ No newline at end of file
mdm_dao/src/main/java/com/skr/mdm/dao/DeviceEquipmentCpuDao.java
0 → 100644
View file @
589d2fcc
package
com
.
skr
.
mdm
.
dao
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.skr.mdm.entity.DeviceEquipmentCpuDO
;
import
org.springframework.stereotype.Repository
;
@Repository
public
interface
DeviceEquipmentCpuDao
extends
BaseMapper
<
DeviceEquipmentCpuDO
>
{
int
deleteByPrimaryKey
(
Integer
id
);
int
insertSelective
(
DeviceEquipmentCpuDO
record
);
DeviceEquipmentCpuDO
selectByPrimaryKey
(
Integer
id
);
int
updateByPrimaryKeySelective
(
DeviceEquipmentCpuDO
record
);
}
\ No newline at end of file
mdm_dao/src/main/java/com/skr/mdm/dao/DeviceEquipmentDiskDao.java
0 → 100644
View file @
589d2fcc
package
com
.
skr
.
mdm
.
dao
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.skr.mdm.entity.DeviceEquipmentDiskDO
;
import
org.springframework.stereotype.Repository
;
@Repository
public
interface
DeviceEquipmentDiskDao
extends
BaseMapper
<
DeviceEquipmentDiskDO
>
{
int
deleteByPrimaryKey
(
Integer
id
);
int
insertSelective
(
DeviceEquipmentDiskDO
record
);
DeviceEquipmentDiskDO
selectByPrimaryKey
(
Integer
id
);
int
updateByPrimaryKeySelective
(
DeviceEquipmentDiskDO
record
);
}
\ No newline at end of file
mdm_dao/src/main/java/com/skr/mdm/dao/DeviceEquipmentInfoCopyDao.java
0 → 100644
View file @
589d2fcc
package
com
.
skr
.
mdm
.
dao
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.skr.mdm.entity.DeviceEquipmentInfoCopyDO
;
import
org.springframework.stereotype.Repository
;
@Repository
public
interface
DeviceEquipmentInfoCopyDao
extends
BaseMapper
<
DeviceEquipmentInfoCopyDO
>
{
int
deleteByPrimaryKey
(
Integer
id
);
int
insertSelective
(
DeviceEquipmentInfoCopyDO
record
);
DeviceEquipmentInfoCopyDO
selectByPrimaryKey
(
Integer
id
);
int
updateByPrimaryKeySelective
(
DeviceEquipmentInfoCopyDO
record
);
}
\ No newline at end of file
mdm_dao/src/main/java/com/skr/mdm/dao/DeviceEquipmentNetDao.java
0 → 100644
View file @
589d2fcc
package
com
.
skr
.
mdm
.
dao
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.skr.mdm.entity.DeviceEquipmentNetDO
;
import
org.springframework.stereotype.Repository
;
@Repository
public
interface
DeviceEquipmentNetDao
extends
BaseMapper
<
DeviceEquipmentNetDO
>
{
int
deleteByPrimaryKey
(
Integer
id
);
int
insertSelective
(
DeviceEquipmentNetDO
record
);
DeviceEquipmentNetDO
selectByPrimaryKey
(
Integer
id
);
int
updateByPrimaryKeySelective
(
DeviceEquipmentNetDO
record
);
}
\ No newline at end of file
mdm_dao/src/main/java/com/skr/mdm/dao/DeviceEquipmentSysSourceDao.java
0 → 100644
View file @
589d2fcc
package
com
.
skr
.
mdm
.
dao
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.skr.mdm.entity.DeviceEquipmentSysSourceDO
;
import
org.springframework.stereotype.Repository
;
@Repository
public
interface
DeviceEquipmentSysSourceDao
extends
BaseMapper
<
DeviceEquipmentSysSourceDO
>
{
int
deleteByPrimaryKey
(
Integer
id
);
int
insertSelective
(
DeviceEquipmentSysSourceDO
record
);
DeviceEquipmentSysSourceDO
selectByPrimaryKey
(
Integer
id
);
int
updateByPrimaryKeySelective
(
DeviceEquipmentSysSourceDO
record
);
}
\ No newline at end of file
mdm_dao/src/main/java/com/skr/mdm/dao/DeviceEquipmentUsbDao.java
0 → 100644
View file @
589d2fcc
package
com
.
skr
.
mdm
.
dao
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.skr.mdm.entity.DeviceEquipmentUsbDO
;
import
org.springframework.stereotype.Repository
;
@Repository
public
interface
DeviceEquipmentUsbDao
extends
BaseMapper
<
DeviceEquipmentUsbDO
>
{
int
deleteByPrimaryKey
(
Integer
id
);
int
insertSelective
(
DeviceEquipmentUsbDO
record
);
DeviceEquipmentUsbDO
selectByPrimaryKey
(
Integer
id
);
int
updateByPrimaryKeySelective
(
DeviceEquipmentUsbDO
record
);
}
\ No newline at end of file
mdm_dao/src/main/java/com/skr/mdm/dao/RailStrategyDao.java
0 → 100644
View file @
589d2fcc
package
com
.
skr
.
mdm
.
dao
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.skr.mdm.bean.bo.StrategyIssuedBO
;
import
com.skr.mdm.bean.dto.OaLeaveStrategyDTO
;
import
com.skr.mdm.bean.qo.StrategyQueryQO
;
import
com.skr.mdm.bean.vo.statistics.StrategyStatisticsExportVO
;
import
com.skr.mdm.bean.vo.strategy.StrategyVO
;
import
com.skr.mdm.entity.RailStrategyDO
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
/**
* 策略信息表(RailStrategy)表数据库访问层
*
* @author nfq
* @since 2020-08-24 17:58:39
*/
@Repository
public
interface
RailStrategyDao
extends
BaseMapper
<
RailStrategyDO
>
{
/**
* 根据公司ID删除
* @param companyId 公司ID
*/
void
deleteByCompanyId
(
@Param
(
"companyId"
)
Integer
companyId
);
/**
* 策略列表
* @param strategyQueryQO
* @return
*/
List
<
StrategyVO
>
listStrategy
(
StrategyQueryQO
strategyQueryQO
);
/**
* 获取未禁用设备功能策略
* @param equipmentId
* @param state
* @return
*/
List
<
StrategyIssuedBO
>
listStrategyIdByEquipmentId
(
@Param
(
"equipmentId"
)
Integer
equipmentId
,
@Param
(
"state"
)
Integer
state
,
@Param
(
"issuedState"
)
Integer
issuedState
);
/**
* 策略分析导出数据
* @param companyId
* @param issuedSuccessState
* @param executedState
* @param startTime
* @param endTime
* @return
*/
List
<
StrategyStatisticsExportVO
>
listStrategyStatisticsExport
(
@Param
(
"companyId"
)
Integer
companyId
,
@Param
(
"issuedSuccessState"
)
Integer
issuedSuccessState
,
@Param
(
"executedState"
)
Integer
executedState
,
@Param
(
"startTime"
)
String
startTime
,
@Param
(
"endTime"
)
String
endTime
);
List
<
StrategyVO
>
queryStrategyByIdList
(
@Param
(
"oaLeaveStrategyList"
)
List
<
OaLeaveStrategyDTO
>
oaLeaveStrategyList
);
}
\ No newline at end of file
mdm_dao/src/main/java/com/skr/mdm/dao/RailStrategyInfoDao.java
0 → 100644
View file @
589d2fcc
package
com
.
skr
.
mdm
.
dao
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.skr.mdm.bean.vo.strategy.RailStrategyInfoVO
;
import
com.skr.mdm.entity.RailStrategyInfoDO
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
/**
* 策略详情表(RailStrategyInfo)表数据库访问层
*
* @author nfq
* @since 2020-08-24 17:58:40
*/
@Repository
public
interface
RailStrategyInfoDao
extends
BaseMapper
<
RailStrategyInfoDO
>
{
List
<
RailStrategyInfoVO
>
selectStrategyInfoByStrategyId
(
Integer
strategyId
);
}
\ No newline at end of file
mdm_dao/src/main/java/com/skr/mdm/dao/RailStrategyUserDao.java
0 → 100644
View file @
589d2fcc
package
com
.
skr
.
mdm
.
dao
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.skr.mdm.bean.qo.controller.LargeScreenQO
;
import
com.skr.mdm.bean.vo.strategy.StrategyUserVO
;
import
com.skr.mdm.entity.RailStrategyUserDO
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
/**
* 策略用户中间表(RailStrategyUser)表数据库访问层
*
* @author nfq
* @since 2020-08-03 16:02:30
*/
@Repository
public
interface
RailStrategyUserDao
extends
BaseMapper
<
RailStrategyUserDO
>
{
/**
* 根据设备ID删除
* @param equipmentIdList 设备ID集合
*/
void
deleteByEquipmentIdList
(
@Param
(
"equipmentIdList"
)
List
<
Integer
>
equipmentIdList
);
/**
* 批量添加
* @param list
*/
void
insertBatch
(
@Param
(
"list"
)
List
<
RailStrategyUserDO
>
list
);
/**
* 围栏策略作用人列表
* @param strategyId
* @return
*/
List
<
StrategyUserVO
>
listStrategyUser
(
@Param
(
"strategyId"
)
Integer
strategyId
,
@Param
(
"searchType"
)
Integer
searchType
,
@Param
(
"searchValue"
)
String
searchValue
);
/**
* 获取策略设备id
* @param list
* @return
*/
List
<
Integer
>
listEquipmentIdByStrategyIds
(
@Param
(
"list"
)
List
<
Integer
>
list
);
List
<
Integer
>
queryRailStrategyStatisticsList
(
LargeScreenQO
largeScreenQO
);
}
\ No newline at end of file
mdm_dao/src/main/java/com/skr/mdm/entity/DeviceEquipmentCpuDO.java
0 → 100644
View file @
589d2fcc
package
com
.
skr
.
mdm
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
/**
* cpu
* device_equipment_cpu
*/
@Data
@TableName
(
"device_equipment_cpu"
)
public
class
DeviceEquipmentCpuDO
implements
Serializable
{
/**
* id
*/
private
Integer
id
;
/**
* 设备ID
*/
private
Integer
equipmentId
;
/**
* CPU 架构
*/
private
String
cpuArch
;
/**
* CPU 制造厂商
*/
private
String
cpuMaker
;
/**
* CPU 型号
*/
private
String
cpuModel
;
/**
* CPU 额定主频
*/
private
String
cpuNominalMainFrequency
;
/**
* CPU 核心数量
*/
private
Integer
cpuCore
;
/**
* CPU 对虚拟化的支持
*/
private
String
cpuVirtualization
;
private
Date
createTime
;
private
Date
updateTime
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
mdm_dao/src/main/java/com/skr/mdm/entity/DeviceEquipmentDiskDO.java
0 → 100644
View file @
589d2fcc
package
com
.
skr
.
mdm
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
import
lombok.Data
;
/**
* 磁盘信息
* device_equipment_disk
*/
@Data
public
class
DeviceEquipmentDiskDO
implements
Serializable
{
/**
* id
*/
private
Integer
id
;
/**
* 设备ID
*/
private
Integer
equipmentId
;
/**
* 路径
*/
private
String
path
;
/**
* 执照商
*/
private
String
vendor
;
/**
* 型号
*/
private
String
model
;
/**
* 序列号
*/
private
String
serialNum
;
/**
* 磁盘类型
*/
private
Integer
distType
;
/**
* 接口类型
*/
private
Integer
interfaceType
;
/**
* 转速
*/
private
Double
speed
;
/**
* 扇区数量
*/
private
String
numSectors
;
/**
* 扇区字节数
*/
private
String
IntegersPerSec
;
/**
* 容量
*/
private
String
diskCapMib
;
/**
* 子分区数量
*/
private
String
numSubpart
;
/**
* uuid
*/
private
Integer
uuid
;
/**
* 是否挂载
*/
private
Integer
isMnt
;
/**
* 挂载路径
*/
private
String
mntPath
;
/**
* 格式化类型
*/
private
Integer
fsType
;
/**
* 分区类型
*/
private
Integer
partType
;
/**
* 固件版本信息
*/
private
String
fwVer
;
private
Date
createTime
;
private
Date
updateTime
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
mdm_dao/src/main/java/com/skr/mdm/entity/DeviceEquipmentInfoCopyDO.java
0 → 100644
View file @
589d2fcc
package
com
.
skr
.
mdm
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
/**
* 设备信息详情表
* device_equipment_info_copy
*/
@Data
@TableName
(
"device_equipment_info_copy"
)
public
class
DeviceEquipmentInfoCopyDO
implements
Serializable
{
/**
* id
*/
private
Integer
id
;
/**
* 设备ID
*/
private
Integer
equipmentId
;
/**
* 系统架构信息
*/
private
String
sysArch
;
/**
* 系统名称
*/
private
String
sysName
;
/**
* 系统版本号
*/
private
String
sysVersion
;
/**
* 内核版本号
*/
private
String
sysKernelVersion
;
/**
* 当前登录用户的用户名
*/
private
String
sysLoginUser
;
/**
* 操作系统项目编号名
*/
private
String
osProjectNumName
;
/**
* 操作系统项目子编号名
*/
private
String
osSubProjectNumName
;
/**
* 操作系统产品标识码
*/
private
String
osProductId
;
/**
* 操作系统宿主机的虚拟机类型
*/
private
String
osHostVmType
;
/**
* 操作系统宿主机的云平台类型
*/
private
String
osCloudPlatformType
;
/**
* 操作系统是否为专用机系统
*/
private
String
osIsDedicatedSystem
;
/**
* 系统分辨率信息
*/
private
String
sysResolution
;
/**
* 系统硬件版本类别
*/
private
String
sysHwVersionType
;
/**
* 系统版本号/补丁版本号
*/
private
String
sysPatchVersion
;
/**
* bios厂商
*/
private
String
biosVendor
;
/**
* bios版本
*/
private
String
biosVersion
;
/**
* 客户端版本号
*/
private
String
clientVersionCode
;
/**
* 地理位置纬度
*/
private
String
latitude
;
/**
* 地理位置经度
*/
private
String
longitude
;
private
Date
createTime
;
private
Date
updateTime
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
mdm_dao/src/main/java/com/skr/mdm/entity/DeviceEquipmentNetDO.java
0 → 100644
View file @
589d2fcc
package
com
.
skr
.
mdm
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
/**
* 磁盘信息
* device_equipment_net
*/
@Data
@TableName
(
"device_equipment_net"
)
public
class
DeviceEquipmentNetDO
implements
Serializable
{
/**
* id
*/
private
Integer
id
;
/**
* 设备ID
*/
private
Integer
equipmentId
;
/**
* MAC
*/
private
String
mac
;
/**
* json数组形式
*/
private
String
ipv4
;
/**
* json数组形式
*/
private
String
ipv6
;
/**
* 网卡的有线/无线类型 0:有线 1:无线
*/
private
Integer
nicType
;
/**
* vid
*/
private
Integer
vid
;
/**
* pid
*/
private
Integer
pid
;
private
Date
createTime
;
private
Date
updateTime
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
mdm_dao/src/main/java/com/skr/mdm/entity/DeviceEquipmentSysSourceDO.java
0 → 100644
View file @
589d2fcc
package
com
.
skr
.
mdm
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
import
lombok.Data
;
/**
* 系统资源
* device_equipment_sys_source
*/
@Data
public
class
DeviceEquipmentSysSourceDO
implements
Serializable
{
/**
* id
*/
private
Integer
id
;
/**
* 设备ID
*/
private
Integer
equipmentId
;
/**
* 物理内存总大小
*/
private
String
totalPhyMem
;
/**
* 物理内存使用率
*/
private
String
phyMemRate
;
/**
* 物理内存使用大小
*/
private
String
usedPhyMem
;
/**
* 实际可用的物理内存大小
*/
private
String
availPhyMem
;
/**
* 实际空闲的物理内存大小
*/
private
String
freePhyMem
;
/**
* 所有应用申请的虚拟内存总量
*/
private
String
totalVirtualMem
;
/**
* 系统中 Swap 分区总大小
*/
private
String
totalSwapSpace
;
/**
* Swap 分区使用率
*/
private
String
swapRate
;
/**
* Swap 分区使用量
*/
private
String
usedSwap
;
/**
* Swap 分区空闲大小
*/
private
String
freeSwap
;
/**
* CPU 瞬时使用率
*/
private
String
cpuPeak
;
/**
* 开机时长
*/
private
String
upTime
;
private
Date
createTime
;
private
Date
updateTime
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
mdm_dao/src/main/java/com/skr/mdm/entity/DeviceEquipmentUsbDO.java
0 → 100644
View file @
589d2fcc
package
com
.
skr
.
mdm
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
/**
* use设备信息
* device_equipment_usb
*/
@Data
@TableName
(
"device_equipment_usb"
)
public
class
DeviceEquipmentUsbDO
implements
Serializable
{
/**
* id
*/
private
Integer
id
;
/**
* 设备ID
*/
private
Integer
equipmentId
;
/**
* 名称
*/
private
String
name
;
/**
* 类型
*/
private
String
type
;
private
String
pid
;
private
String
vid
;
/**
* 序列号
*/
private
String
serialNum
;
/**
* 路径
*/
private
String
path
;
private
Date
createTime
;
private
Date
updateTime
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
mdm_dao/src/main/resources/mapper/DeviceEquipmentCpuDao.xml
0 → 100644
View file @
589d2fcc
<?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.skr.mdm.dao.DeviceEquipmentCpuDao"
>
<resultMap
id=
"BaseResultMap"
type=
"com.skr.mdm.entity.DeviceEquipmentCpuDO"
>
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<result
column=
"equipment_id"
jdbcType=
"INTEGER"
property=
"equipmentId"
/>
<result
column=
"cpu_arch"
jdbcType=
"VARCHAR"
property=
"cpuArch"
/>
<result
column=
"cpu_maker"
jdbcType=
"VARCHAR"
property=
"cpuMaker"
/>
<result
column=
"cpu_model"
jdbcType=
"VARCHAR"
property=
"cpuModel"
/>
<result
column=
"cpu_nominal_main_frequency"
jdbcType=
"VARCHAR"
property=
"cpuNominalMainFrequency"
/>
<result
column=
"cpu_core"
jdbcType=
"INTEGER"
property=
"cpuCore"
/>
<result
column=
"cpu_virtualization"
jdbcType=
"VARCHAR"
property=
"cpuVirtualization"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, equipment_id, cpu_arch, cpu_maker, cpu_model, cpu_nominal_main_frequency, cpu_core,
cpu_virtualization, create_time, update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from device_equipment_cpu
where id = #{id,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from device_equipment_cpu
where id = #{id,jdbcType=INTEGER}
</delete>
<insert
id=
"insertSelective"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.skr.mdm.entity.DeviceEquipmentCpuDO"
useGeneratedKeys=
"true"
>
insert into device_equipment_cpu
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"equipmentId != null"
>
equipment_id,
</if>
<if
test=
"cpuArch != null"
>
cpu_arch,
</if>
<if
test=
"cpuMaker != null"
>
cpu_maker,
</if>
<if
test=
"cpuModel != null"
>
cpu_model,
</if>
<if
test=
"cpuNominalMainFrequency != null"
>
cpu_nominal_main_frequency,
</if>
<if
test=
"cpuCore != null"
>
cpu_core,
</if>
<if
test=
"cpuVirtualization != null"
>
cpu_virtualization,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"equipmentId != null"
>
#{equipmentId,jdbcType=INTEGER},
</if>
<if
test=
"cpuArch != null"
>
#{cpuArch,jdbcType=VARCHAR},
</if>
<if
test=
"cpuMaker != null"
>
#{cpuMaker,jdbcType=VARCHAR},
</if>
<if
test=
"cpuModel != null"
>
#{cpuModel,jdbcType=VARCHAR},
</if>
<if
test=
"cpuNominalMainFrequency != null"
>
#{cpuNominalMainFrequency,jdbcType=VARCHAR},
</if>
<if
test=
"cpuCore != null"
>
#{cpuCore,jdbcType=INTEGER},
</if>
<if
test=
"cpuVirtualization != null"
>
#{cpuVirtualization,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.skr.mdm.entity.DeviceEquipmentCpuDO"
>
update device_equipment_cpu
<set>
<if
test=
"equipmentId != null"
>
equipment_id = #{equipmentId,jdbcType=INTEGER},
</if>
<if
test=
"cpuArch != null"
>
cpu_arch = #{cpuArch,jdbcType=VARCHAR},
</if>
<if
test=
"cpuMaker != null"
>
cpu_maker = #{cpuMaker,jdbcType=VARCHAR},
</if>
<if
test=
"cpuModel != null"
>
cpu_model = #{cpuModel,jdbcType=VARCHAR},
</if>
<if
test=
"cpuNominalMainFrequency != null"
>
cpu_nominal_main_frequency = #{cpuNominalMainFrequency,jdbcType=VARCHAR},
</if>
<if
test=
"cpuCore != null"
>
cpu_core = #{cpuCore,jdbcType=INTEGER},
</if>
<if
test=
"cpuVirtualization != null"
>
cpu_virtualization = #{cpuVirtualization,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
mdm_dao/src/main/resources/mapper/DeviceEquipmentDiskDao.xml
0 → 100644
View file @
589d2fcc
<?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.skr.mdm.dao.DeviceEquipmentDiskDao"
>
<resultMap
id=
"BaseResultMap"
type=
"com.skr.mdm.entity.DeviceEquipmentDiskDO"
>
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<result
column=
"equipment_id"
jdbcType=
"INTEGER"
property=
"equipmentId"
/>
<result
column=
"path"
jdbcType=
"VARCHAR"
property=
"path"
/>
<result
column=
"vendor"
jdbcType=
"VARCHAR"
property=
"vendor"
/>
<result
column=
"model"
jdbcType=
"VARCHAR"
property=
"model"
/>
<result
column=
"serial_num"
jdbcType=
"VARCHAR"
property=
"serialNum"
/>
<result
column=
"dist_type"
jdbcType=
"TINYINT"
property=
"distType"
/>
<result
column=
"interface_type"
jdbcType=
"TINYINT"
property=
"interfaceType"
/>
<result
column=
"speed"
jdbcType=
"DOUBLE"
property=
"speed"
/>
<result
column=
"num_sectors"
jdbcType=
"VARCHAR"
property=
"numSectors"
/>
<result
column=
"bytes_per_sec"
jdbcType=
"VARCHAR"
property=
"bytesPerSec"
/>
<result
column=
"disk_cap_mib"
jdbcType=
"VARCHAR"
property=
"diskCapMib"
/>
<result
column=
"num_subpart"
jdbcType=
"VARCHAR"
property=
"numSubpart"
/>
<result
column=
"uuid"
jdbcType=
"INTEGER"
property=
"uuid"
/>
<result
column=
"is_mnt"
jdbcType=
"TINYINT"
property=
"isMnt"
/>
<result
column=
"mnt_path"
jdbcType=
"VARCHAR"
property=
"mntPath"
/>
<result
column=
"fs_type"
jdbcType=
"TINYINT"
property=
"fsType"
/>
<result
column=
"part_type"
jdbcType=
"TINYINT"
property=
"partType"
/>
<result
column=
"fw_ver"
jdbcType=
"VARCHAR"
property=
"fwVer"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, equipment_id, `path`, vendor, model, serial_num, dist_type, interface_type, speed,
num_sectors, bytes_per_sec, disk_cap_mib, num_subpart, uuid, is_mnt, mnt_path, fs_type,
part_type, fw_ver, create_time, update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from device_equipment_disk
where id = #{id,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from device_equipment_disk
where id = #{id,jdbcType=INTEGER}
</delete>
<insert
id=
"insertSelective"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.skr.mdm.entity.DeviceEquipmentDiskDO"
useGeneratedKeys=
"true"
>
insert into device_equipment_disk
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"equipmentId != null"
>
equipment_id,
</if>
<if
test=
"path != null"
>
`path`,
</if>
<if
test=
"vendor != null"
>
vendor,
</if>
<if
test=
"model != null"
>
model,
</if>
<if
test=
"serialNum != null"
>
serial_num,
</if>
<if
test=
"distType != null"
>
dist_type,
</if>
<if
test=
"interfaceType != null"
>
interface_type,
</if>
<if
test=
"speed != null"
>
speed,
</if>
<if
test=
"numSectors != null"
>
num_sectors,
</if>
<if
test=
"bytesPerSec != null"
>
bytes_per_sec,
</if>
<if
test=
"diskCapMib != null"
>
disk_cap_mib,
</if>
<if
test=
"numSubpart != null"
>
num_subpart,
</if>
<if
test=
"uuid != null"
>
uuid,
</if>
<if
test=
"isMnt != null"
>
is_mnt,
</if>
<if
test=
"mntPath != null"
>
mnt_path,
</if>
<if
test=
"fsType != null"
>
fs_type,
</if>
<if
test=
"partType != null"
>
part_type,
</if>
<if
test=
"fwVer != null"
>
fw_ver,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"equipmentId != null"
>
#{equipmentId,jdbcType=INTEGER},
</if>
<if
test=
"path != null"
>
#{path,jdbcType=VARCHAR},
</if>
<if
test=
"vendor != null"
>
#{vendor,jdbcType=VARCHAR},
</if>
<if
test=
"model != null"
>
#{model,jdbcType=VARCHAR},
</if>
<if
test=
"serialNum != null"
>
#{serialNum,jdbcType=VARCHAR},
</if>
<if
test=
"distType != null"
>
#{distType,jdbcType=TINYINT},
</if>
<if
test=
"interfaceType != null"
>
#{interfaceType,jdbcType=TINYINT},
</if>
<if
test=
"speed != null"
>
#{speed,jdbcType=DOUBLE},
</if>
<if
test=
"numSectors != null"
>
#{numSectors,jdbcType=VARCHAR},
</if>
<if
test=
"bytesPerSec != null"
>
#{bytesPerSec,jdbcType=VARCHAR},
</if>
<if
test=
"diskCapMib != null"
>
#{diskCapMib,jdbcType=VARCHAR},
</if>
<if
test=
"numSubpart != null"
>
#{numSubpart,jdbcType=VARCHAR},
</if>
<if
test=
"uuid != null"
>
#{uuid,jdbcType=INTEGER},
</if>
<if
test=
"isMnt != null"
>
#{isMnt,jdbcType=TINYINT},
</if>
<if
test=
"mntPath != null"
>
#{mntPath,jdbcType=VARCHAR},
</if>
<if
test=
"fsType != null"
>
#{fsType,jdbcType=TINYINT},
</if>
<if
test=
"partType != null"
>
#{partType,jdbcType=TINYINT},
</if>
<if
test=
"fwVer != null"
>
#{fwVer,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.skr.mdm.entity.DeviceEquipmentDiskDO"
>
update device_equipment_disk
<set>
<if
test=
"equipmentId != null"
>
equipment_id = #{equipmentId,jdbcType=INTEGER},
</if>
<if
test=
"path != null"
>
`path` = #{path,jdbcType=VARCHAR},
</if>
<if
test=
"vendor != null"
>
vendor = #{vendor,jdbcType=VARCHAR},
</if>
<if
test=
"model != null"
>
model = #{model,jdbcType=VARCHAR},
</if>
<if
test=
"serialNum != null"
>
serial_num = #{serialNum,jdbcType=VARCHAR},
</if>
<if
test=
"distType != null"
>
dist_type = #{distType,jdbcType=TINYINT},
</if>
<if
test=
"interfaceType != null"
>
interface_type = #{interfaceType,jdbcType=TINYINT},
</if>
<if
test=
"speed != null"
>
speed = #{speed,jdbcType=DOUBLE},
</if>
<if
test=
"numSectors != null"
>
num_sectors = #{numSectors,jdbcType=VARCHAR},
</if>
<if
test=
"bytesPerSec != null"
>
bytes_per_sec = #{bytesPerSec,jdbcType=VARCHAR},
</if>
<if
test=
"diskCapMib != null"
>
disk_cap_mib = #{diskCapMib,jdbcType=VARCHAR},
</if>
<if
test=
"numSubpart != null"
>
num_subpart = #{numSubpart,jdbcType=VARCHAR},
</if>
<if
test=
"uuid != null"
>
uuid = #{uuid,jdbcType=INTEGER},
</if>
<if
test=
"isMnt != null"
>
is_mnt = #{isMnt,jdbcType=TINYINT},
</if>
<if
test=
"mntPath != null"
>
mnt_path = #{mntPath,jdbcType=VARCHAR},
</if>
<if
test=
"fsType != null"
>
fs_type = #{fsType,jdbcType=TINYINT},
</if>
<if
test=
"partType != null"
>
part_type = #{partType,jdbcType=TINYINT},
</if>
<if
test=
"fwVer != null"
>
fw_ver = #{fwVer,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
mdm_dao/src/main/resources/mapper/DeviceEquipmentInfoCopyDao.xml
0 → 100644
View file @
589d2fcc
<?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.skr.mdm.dao.DeviceEquipmentInfoCopyDao"
>
<resultMap
id=
"BaseResultMap"
type=
"com.skr.mdm.entity.DeviceEquipmentInfoCopyDO"
>
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<result
column=
"equipment_id"
jdbcType=
"INTEGER"
property=
"equipmentId"
/>
<result
column=
"sys_arch"
jdbcType=
"VARCHAR"
property=
"sysArch"
/>
<result
column=
"sys_name"
jdbcType=
"VARCHAR"
property=
"sysName"
/>
<result
column=
"sys_version"
jdbcType=
"VARCHAR"
property=
"sysVersion"
/>
<result
column=
"sys_kernel_version"
jdbcType=
"VARCHAR"
property=
"sysKernelVersion"
/>
<result
column=
"sys_login_user"
jdbcType=
"VARCHAR"
property=
"sysLoginUser"
/>
<result
column=
"os_project_num_name"
jdbcType=
"VARCHAR"
property=
"osProjectNumName"
/>
<result
column=
"os_sub_project_num_name"
jdbcType=
"VARCHAR"
property=
"osSubProjectNumName"
/>
<result
column=
"os_product_id"
jdbcType=
"VARCHAR"
property=
"osProductId"
/>
<result
column=
"os_host_vm_type"
jdbcType=
"VARCHAR"
property=
"osHostVmType"
/>
<result
column=
"os_cloud_platform_type"
jdbcType=
"VARCHAR"
property=
"osCloudPlatformType"
/>
<result
column=
"os_is_dedicated_system"
jdbcType=
"VARCHAR"
property=
"osIsDedicatedSystem"
/>
<result
column=
"sys_resolution"
jdbcType=
"VARCHAR"
property=
"sysResolution"
/>
<result
column=
"sys_hw_version_type"
jdbcType=
"VARCHAR"
property=
"sysHwVersionType"
/>
<result
column=
"sys_patch_version"
jdbcType=
"VARCHAR"
property=
"sysPatchVersion"
/>
<result
column=
"bios_vendor"
jdbcType=
"VARCHAR"
property=
"biosVendor"
/>
<result
column=
"bios_version"
jdbcType=
"VARCHAR"
property=
"biosVersion"
/>
<result
column=
"client_version_code"
jdbcType=
"VARCHAR"
property=
"clientVersionCode"
/>
<result
column=
"latitude"
jdbcType=
"VARCHAR"
property=
"latitude"
/>
<result
column=
"longitude"
jdbcType=
"VARCHAR"
property=
"longitude"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, equipment_id, sys_arch, sys_name, sys_version,
sys_kernel_version, sys_login_user, os_project_num_name, os_sub_project_num_name,
os_product_id, os_host_vm_type, os_cloud_platform_type, os_is_dedicated_system, sys_resolution,
sys_hw_version_type, sys_patch_version, bios_vendor, bios_version, client_version_code,
latitude, longitude, create_time, update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from device_equipment_info_copy
where id = #{id,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from device_equipment_info_copy
where id = #{id,jdbcType=INTEGER}
</delete>
<insert
id=
"insertSelective"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.skr.mdm.entity.DeviceEquipmentInfoCopyDO"
useGeneratedKeys=
"true"
>
insert into device_equipment_info_copy
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"equipmentId != null"
>
equipment_id,
</if>
<if
test=
"sysArch != null"
>
sys_arch,
</if>
<if
test=
"sysName != null"
>
sys_name,
</if>
<if
test=
"sysVersion != null"
>
sys_version,
</if>
<if
test=
"sysKernelVersion != null"
>
sys_kernel_version,
</if>
<if
test=
"sysLoginUser != null"
>
sys_login_user,
</if>
<if
test=
"osProjectNumName != null"
>
os_project_num_name,
</if>
<if
test=
"osSubProjectNumName != null"
>
os_sub_project_num_name,
</if>
<if
test=
"osProductId != null"
>
os_product_id,
</if>
<if
test=
"osHostVmType != null"
>
os_host_vm_type,
</if>
<if
test=
"osCloudPlatformType != null"
>
os_cloud_platform_type,
</if>
<if
test=
"osIsDedicatedSystem != null"
>
os_is_dedicated_system,
</if>
<if
test=
"sysResolution != null"
>
sys_resolution,
</if>
<if
test=
"sysHwVersionType != null"
>
sys_hw_version_type,
</if>
<if
test=
"sysPatchVersion != null"
>
sys_patch_version,
</if>
<if
test=
"biosVendor != null"
>
bios_vendor,
</if>
<if
test=
"biosVersion != null"
>
bios_version,
</if>
<if
test=
"clientVersionCode != null"
>
client_version_code,
</if>
<if
test=
"latitude != null"
>
latitude,
</if>
<if
test=
"longitude != null"
>
longitude,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"equipmentId != null"
>
#{equipmentId,jdbcType=INTEGER},
</if>
<if
test=
"sysArch != null"
>
#{sysArch,jdbcType=VARCHAR},
</if>
<if
test=
"sysName != null"
>
#{sysName,jdbcType=VARCHAR},
</if>
<if
test=
"sysVersion != null"
>
#{sysVersion,jdbcType=VARCHAR},
</if>
<if
test=
"sysKernelVersion != null"
>
#{sysKernelVersion,jdbcType=VARCHAR},
</if>
<if
test=
"sysLoginUser != null"
>
#{sysLoginUser,jdbcType=VARCHAR},
</if>
<if
test=
"osProjectNumName != null"
>
#{osProjectNumName,jdbcType=VARCHAR},
</if>
<if
test=
"osSubProjectNumName != null"
>
#{osSubProjectNumName,jdbcType=VARCHAR},
</if>
<if
test=
"osProductId != null"
>
#{osProductId,jdbcType=VARCHAR},
</if>
<if
test=
"osHostVmType != null"
>
#{osHostVmType,jdbcType=VARCHAR},
</if>
<if
test=
"osCloudPlatformType != null"
>
#{osCloudPlatformType,jdbcType=VARCHAR},
</if>
<if
test=
"osIsDedicatedSystem != null"
>
#{osIsDedicatedSystem,jdbcType=VARCHAR},
</if>
<if
test=
"sysResolution != null"
>
#{sysResolution,jdbcType=VARCHAR},
</if>
<if
test=
"sysHwVersionType != null"
>
#{sysHwVersionType,jdbcType=VARCHAR},
</if>
<if
test=
"sysPatchVersion != null"
>
#{sysPatchVersion,jdbcType=VARCHAR},
</if>
<if
test=
"biosVendor != null"
>
#{biosVendor,jdbcType=VARCHAR},
</if>
<if
test=
"biosVersion != null"
>
#{biosVersion,jdbcType=VARCHAR},
</if>
<if
test=
"clientVersionCode != null"
>
#{clientVersionCode,jdbcType=VARCHAR},
</if>
<if
test=
"latitude != null"
>
#{latitude,jdbcType=VARCHAR},
</if>
<if
test=
"longitude != null"
>
#{longitude,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.skr.mdm.entity.DeviceEquipmentInfoCopyDO"
>
update device_equipment_info_copy
<set>
<if
test=
"equipmentId != null"
>
equipment_id = #{equipmentId,jdbcType=INTEGER},
</if>
<if
test=
"sysArch != null"
>
sys_arch = #{sysArch,jdbcType=VARCHAR},
</if>
<if
test=
"sysName != null"
>
sys_name = #{sysName,jdbcType=VARCHAR},
</if>
<if
test=
"sysVersion != null"
>
sys_version = #{sysVersion,jdbcType=VARCHAR},
</if>
<if
test=
"sysKernelVersion != null"
>
sys_kernel_version = #{sysKernelVersion,jdbcType=VARCHAR},
</if>
<if
test=
"sysLoginUser != null"
>
sys_login_user = #{sysLoginUser,jdbcType=VARCHAR},
</if>
<if
test=
"osProjectNumName != null"
>
os_project_num_name = #{osProjectNumName,jdbcType=VARCHAR},
</if>
<if
test=
"osSubProjectNumName != null"
>
os_sub_project_num_name = #{osSubProjectNumName,jdbcType=VARCHAR},
</if>
<if
test=
"osProductId != null"
>
os_product_id = #{osProductId,jdbcType=VARCHAR},
</if>
<if
test=
"osHostVmType != null"
>
os_host_vm_type = #{osHostVmType,jdbcType=VARCHAR},
</if>
<if
test=
"osCloudPlatformType != null"
>
os_cloud_platform_type = #{osCloudPlatformType,jdbcType=VARCHAR},
</if>
<if
test=
"osIsDedicatedSystem != null"
>
os_is_dedicated_system = #{osIsDedicatedSystem,jdbcType=VARCHAR},
</if>
<if
test=
"sysResolution != null"
>
sys_resolution = #{sysResolution,jdbcType=VARCHAR},
</if>
<if
test=
"sysHwVersionType != null"
>
sys_hw_version_type = #{sysHwVersionType,jdbcType=VARCHAR},
</if>
<if
test=
"sysPatchVersion != null"
>
sys_patch_version = #{sysPatchVersion,jdbcType=VARCHAR},
</if>
<if
test=
"biosVendor != null"
>
bios_vendor = #{biosVendor,jdbcType=VARCHAR},
</if>
<if
test=
"biosVersion != null"
>
bios_version = #{biosVersion,jdbcType=VARCHAR},
</if>
<if
test=
"clientVersionCode != null"
>
client_version_code = #{clientVersionCode,jdbcType=VARCHAR},
</if>
<if
test=
"latitude != null"
>
latitude = #{latitude,jdbcType=VARCHAR},
</if>
<if
test=
"longitude != null"
>
longitude = #{longitude,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
mdm_dao/src/main/resources/mapper/DeviceEquipmentNetDao.xml
0 → 100644
View file @
589d2fcc
<?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.skr.mdm.dao.DeviceEquipmentNetDao"
>
<resultMap
id=
"BaseResultMap"
type=
"com.skr.mdm.entity.DeviceEquipmentNetDO"
>
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<result
column=
"equipment_id"
jdbcType=
"INTEGER"
property=
"equipmentId"
/>
<result
column=
"mac"
jdbcType=
"VARCHAR"
property=
"mac"
/>
<result
column=
"ipv4"
jdbcType=
"VARCHAR"
property=
"ipv4"
/>
<result
column=
"ipv6"
jdbcType=
"VARCHAR"
property=
"ipv6"
/>
<result
column=
"nic_type"
jdbcType=
"TINYINT"
property=
"nicType"
/>
<result
column=
"vid"
jdbcType=
"TINYINT"
property=
"vid"
/>
<result
column=
"pid"
jdbcType=
"TINYINT"
property=
"pid"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, equipment_id, mac, ipv4, ipv6, nic_type, vid, pid, create_time, update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from device_equipment_net
where id = #{id,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from device_equipment_net
where id = #{id,jdbcType=INTEGER}
</delete>
<insert
id=
"insertSelective"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.skr.mdm.entity.DeviceEquipmentNetDO"
useGeneratedKeys=
"true"
>
insert into device_equipment_net
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"equipmentId != null"
>
equipment_id,
</if>
<if
test=
"mac != null"
>
mac,
</if>
<if
test=
"ipv4 != null"
>
ipv4,
</if>
<if
test=
"ipv6 != null"
>
ipv6,
</if>
<if
test=
"nicType != null"
>
nic_type,
</if>
<if
test=
"vid != null"
>
vid,
</if>
<if
test=
"pid != null"
>
pid,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"equipmentId != null"
>
#{equipmentId,jdbcType=INTEGER},
</if>
<if
test=
"mac != null"
>
#{mac,jdbcType=VARCHAR},
</if>
<if
test=
"ipv4 != null"
>
#{ipv4,jdbcType=VARCHAR},
</if>
<if
test=
"ipv6 != null"
>
#{ipv6,jdbcType=VARCHAR},
</if>
<if
test=
"nicType != null"
>
#{nicType,jdbcType=TINYINT},
</if>
<if
test=
"vid != null"
>
#{vid,jdbcType=TINYINT},
</if>
<if
test=
"pid != null"
>
#{pid,jdbcType=TINYINT},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.skr.mdm.entity.DeviceEquipmentNetDO"
>
update device_equipment_net
<set>
<if
test=
"equipmentId != null"
>
equipment_id = #{equipmentId,jdbcType=INTEGER},
</if>
<if
test=
"mac != null"
>
mac = #{mac,jdbcType=VARCHAR},
</if>
<if
test=
"ipv4 != null"
>
ipv4 = #{ipv4,jdbcType=VARCHAR},
</if>
<if
test=
"ipv6 != null"
>
ipv6 = #{ipv6,jdbcType=VARCHAR},
</if>
<if
test=
"nicType != null"
>
nic_type = #{nicType,jdbcType=TINYINT},
</if>
<if
test=
"vid != null"
>
vid = #{vid,jdbcType=TINYINT},
</if>
<if
test=
"pid != null"
>
pid = #{pid,jdbcType=TINYINT},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
mdm_dao/src/main/resources/mapper/DeviceEquipmentSysSourceDao.xml
0 → 100644
View file @
589d2fcc
<?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.skr.mdm.dao.DeviceEquipmentSysSourceDao"
>
<resultMap
id=
"BaseResultMap"
type=
"com.skr.mdm.entity.DeviceEquipmentSysSourceDO"
>
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<result
column=
"equipment_id"
jdbcType=
"INTEGER"
property=
"equipmentId"
/>
<result
column=
"total_phy_mem"
jdbcType=
"VARCHAR"
property=
"totalPhyMem"
/>
<result
column=
"phy_mem_rate"
jdbcType=
"VARCHAR"
property=
"phyMemRate"
/>
<result
column=
"used_phy_mem"
jdbcType=
"VARCHAR"
property=
"usedPhyMem"
/>
<result
column=
"avail_phy_mem"
jdbcType=
"VARCHAR"
property=
"availPhyMem"
/>
<result
column=
"free_phy_mem"
jdbcType=
"VARCHAR"
property=
"freePhyMem"
/>
<result
column=
"total_virtual_mem"
jdbcType=
"VARCHAR"
property=
"totalVirtualMem"
/>
<result
column=
"total_swap_space"
jdbcType=
"VARCHAR"
property=
"totalSwapSpace"
/>
<result
column=
"swap_rate"
jdbcType=
"VARCHAR"
property=
"swapRate"
/>
<result
column=
"used_swap"
jdbcType=
"VARCHAR"
property=
"usedSwap"
/>
<result
column=
"free_swap"
jdbcType=
"VARCHAR"
property=
"freeSwap"
/>
<result
column=
"cpu_peak"
jdbcType=
"VARCHAR"
property=
"cpuPeak"
/>
<result
column=
"up_time"
jdbcType=
"VARCHAR"
property=
"upTime"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, equipment_id, total_phy_mem, phy_mem_rate, used_phy_mem, avail_phy_mem, free_phy_mem,
total_virtual_mem, total_swap_space, swap_rate, used_swap, free_swap, cpu_peak, up_time,
create_time, update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from device_equipment_sys_source
where id = #{id,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from device_equipment_sys_source
where id = #{id,jdbcType=INTEGER}
</delete>
<insert
id=
"insertSelective"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.skr.mdm.entity.DeviceEquipmentSysSourceDO"
useGeneratedKeys=
"true"
>
insert into device_equipment_sys_source
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"equipmentId != null"
>
equipment_id,
</if>
<if
test=
"totalPhyMem != null"
>
total_phy_mem,
</if>
<if
test=
"phyMemRate != null"
>
phy_mem_rate,
</if>
<if
test=
"usedPhyMem != null"
>
used_phy_mem,
</if>
<if
test=
"availPhyMem != null"
>
avail_phy_mem,
</if>
<if
test=
"freePhyMem != null"
>
free_phy_mem,
</if>
<if
test=
"totalVirtualMem != null"
>
total_virtual_mem,
</if>
<if
test=
"totalSwapSpace != null"
>
total_swap_space,
</if>
<if
test=
"swapRate != null"
>
swap_rate,
</if>
<if
test=
"usedSwap != null"
>
used_swap,
</if>
<if
test=
"freeSwap != null"
>
free_swap,
</if>
<if
test=
"cpuPeak != null"
>
cpu_peak,
</if>
<if
test=
"upTime != null"
>
up_time,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"equipmentId != null"
>
#{equipmentId,jdbcType=INTEGER},
</if>
<if
test=
"totalPhyMem != null"
>
#{totalPhyMem,jdbcType=VARCHAR},
</if>
<if
test=
"phyMemRate != null"
>
#{phyMemRate,jdbcType=VARCHAR},
</if>
<if
test=
"usedPhyMem != null"
>
#{usedPhyMem,jdbcType=VARCHAR},
</if>
<if
test=
"availPhyMem != null"
>
#{availPhyMem,jdbcType=VARCHAR},
</if>
<if
test=
"freePhyMem != null"
>
#{freePhyMem,jdbcType=VARCHAR},
</if>
<if
test=
"totalVirtualMem != null"
>
#{totalVirtualMem,jdbcType=VARCHAR},
</if>
<if
test=
"totalSwapSpace != null"
>
#{totalSwapSpace,jdbcType=VARCHAR},
</if>
<if
test=
"swapRate != null"
>
#{swapRate,jdbcType=VARCHAR},
</if>
<if
test=
"usedSwap != null"
>
#{usedSwap,jdbcType=VARCHAR},
</if>
<if
test=
"freeSwap != null"
>
#{freeSwap,jdbcType=VARCHAR},
</if>
<if
test=
"cpuPeak != null"
>
#{cpuPeak,jdbcType=VARCHAR},
</if>
<if
test=
"upTime != null"
>
#{upTime,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.skr.mdm.entity.DeviceEquipmentSysSourceDO"
>
update device_equipment_sys_source
<set>
<if
test=
"equipmentId != null"
>
equipment_id = #{equipmentId,jdbcType=INTEGER},
</if>
<if
test=
"totalPhyMem != null"
>
total_phy_mem = #{totalPhyMem,jdbcType=VARCHAR},
</if>
<if
test=
"phyMemRate != null"
>
phy_mem_rate = #{phyMemRate,jdbcType=VARCHAR},
</if>
<if
test=
"usedPhyMem != null"
>
used_phy_mem = #{usedPhyMem,jdbcType=VARCHAR},
</if>
<if
test=
"availPhyMem != null"
>
avail_phy_mem = #{availPhyMem,jdbcType=VARCHAR},
</if>
<if
test=
"freePhyMem != null"
>
free_phy_mem = #{freePhyMem,jdbcType=VARCHAR},
</if>
<if
test=
"totalVirtualMem != null"
>
total_virtual_mem = #{totalVirtualMem,jdbcType=VARCHAR},
</if>
<if
test=
"totalSwapSpace != null"
>
total_swap_space = #{totalSwapSpace,jdbcType=VARCHAR},
</if>
<if
test=
"swapRate != null"
>
swap_rate = #{swapRate,jdbcType=VARCHAR},
</if>
<if
test=
"usedSwap != null"
>
used_swap = #{usedSwap,jdbcType=VARCHAR},
</if>
<if
test=
"freeSwap != null"
>
free_swap = #{freeSwap,jdbcType=VARCHAR},
</if>
<if
test=
"cpuPeak != null"
>
cpu_peak = #{cpuPeak,jdbcType=VARCHAR},
</if>
<if
test=
"upTime != null"
>
up_time = #{upTime,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
mdm_dao/src/main/resources/mapper/DeviceEquipmentUsbDao.xml
0 → 100644
View file @
589d2fcc
<?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.skr.mdm.dao.DeviceEquipmentUsbDao"
>
<resultMap
id=
"BaseResultMap"
type=
"com.skr.mdm.entity.DeviceEquipmentUsbDO"
>
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<result
column=
"equipment_id"
jdbcType=
"INTEGER"
property=
"equipmentId"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"type"
jdbcType=
"VARCHAR"
property=
"type"
/>
<result
column=
"pid"
jdbcType=
"VARCHAR"
property=
"pid"
/>
<result
column=
"vid"
jdbcType=
"VARCHAR"
property=
"vid"
/>
<result
column=
"serial_num"
jdbcType=
"VARCHAR"
property=
"serialNum"
/>
<result
column=
"path"
jdbcType=
"VARCHAR"
property=
"path"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, equipment_id, `name`, `type`, pid, vid, serial_num, `path`, create_time, update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from device_equipment_usb
where id = #{id,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from device_equipment_usb
where id = #{id,jdbcType=INTEGER}
</delete>
<insert
id=
"insertSelective"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.skr.mdm.entity.DeviceEquipmentUsbDO"
useGeneratedKeys=
"true"
>
insert into device_equipment_usb
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"equipmentId != null"
>
equipment_id,
</if>
<if
test=
"name != null"
>
`name`,
</if>
<if
test=
"type != null"
>
`type`,
</if>
<if
test=
"pid != null"
>
pid,
</if>
<if
test=
"vid != null"
>
vid,
</if>
<if
test=
"serialNum != null"
>
serial_num,
</if>
<if
test=
"path != null"
>
`path`,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"equipmentId != null"
>
#{equipmentId,jdbcType=INTEGER},
</if>
<if
test=
"name != null"
>
#{name,jdbcType=VARCHAR},
</if>
<if
test=
"type != null"
>
#{type,jdbcType=VARCHAR},
</if>
<if
test=
"pid != null"
>
#{pid,jdbcType=VARCHAR},
</if>
<if
test=
"vid != null"
>
#{vid,jdbcType=VARCHAR},
</if>
<if
test=
"serialNum != null"
>
#{serialNum,jdbcType=VARCHAR},
</if>
<if
test=
"path != null"
>
#{path,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.skr.mdm.entity.DeviceEquipmentUsbDO"
>
update device_equipment_usb
<set>
<if
test=
"equipmentId != null"
>
equipment_id = #{equipmentId,jdbcType=INTEGER},
</if>
<if
test=
"name != null"
>
`name` = #{name,jdbcType=VARCHAR},
</if>
<if
test=
"type != null"
>
`type` = #{type,jdbcType=VARCHAR},
</if>
<if
test=
"pid != null"
>
pid = #{pid,jdbcType=VARCHAR},
</if>
<if
test=
"vid != null"
>
vid = #{vid,jdbcType=VARCHAR},
</if>
<if
test=
"serialNum != null"
>
serial_num = #{serialNum,jdbcType=VARCHAR},
</if>
<if
test=
"path != null"
>
`path` = #{path,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
mdm_dao/src/main/resources/mapper/RailStrategyDao.xml
0 → 100644
View file @
589d2fcc
This diff is collapsed.
Click to expand it.
mdm_dao/src/main/resources/mapper/RailStrategyInfoDao.xml
0 → 100644
View file @
589d2fcc
<?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.skr.mdm.dao.RailStrategyInfoDao"
>
<resultMap
id=
"BaseResultMap"
type=
"com.skr.mdm.entity.RailStrategyInfoDO"
>
<!--@Table rail_strategy_info-->
<result
property=
"id"
column=
"id"
jdbcType=
"INTEGER"
/>
<result
property=
"strategyId"
column=
"strategy_id"
jdbcType=
"INTEGER"
/>
<result
property=
"isTimeLimit"
column=
"is_time_limit"
jdbcType=
"INTEGER"
/>
<result
property=
"workDate"
column=
"work_date"
jdbcType=
"INTEGER"
/>
<result
property=
"beginDate"
column=
"begin_date"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"endDate"
column=
"end_date"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"beginTime"
column=
"begin_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"endTime"
column=
"end_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"usbConnection"
column=
"usb_connection"
jdbcType=
"OTHER"
/>
<result
property=
"usbDebugging"
column=
"usb_debugging"
jdbcType=
"OTHER"
/>
<result
property=
"record"
column=
"record"
jdbcType=
"OTHER"
/>
<result
property=
"camera"
column=
"camera"
jdbcType=
"OTHER"
/>
<result
property=
"wifi"
column=
"wifi"
jdbcType=
"OTHER"
/>
<result
property=
"bluetooth"
column=
"bluetooth"
jdbcType=
"OTHER"
/>
<result
property=
"mobileData"
column=
"mobile_data"
jdbcType=
"OTHER"
/>
<result
property=
"gps"
column=
"gps"
jdbcType=
"OTHER"
/>
<result
property=
"sentType"
column=
"sent_type"
jdbcType=
"OTHER"
/>
<result
property=
"conversation"
column=
"conversation"
jdbcType=
"OTHER"
/>
<result
property=
"sms"
column=
"sms"
jdbcType=
"OTHER"
/>
<result
property=
"status"
column=
"status"
jdbcType=
"OTHER"
/>
<result
property=
"sdCard"
column=
"sd_card"
jdbcType=
"OTHER"
/>
<result
property=
"hotShared"
column=
"hot_shared"
jdbcType=
"OTHER"
/>
<result
property=
"nfc"
column=
"nfc"
jdbcType=
"OTHER"
/>
<result
property=
"task"
column=
"task"
jdbcType=
"OTHER"
/>
<result
property=
"homeKey"
column=
"home_key"
jdbcType=
"OTHER"
/>
<result
property=
"stateMenu"
column=
"state_menu"
jdbcType=
"OTHER"
/>
<result
property=
"backKey"
column=
"back_key"
jdbcType=
"OTHER"
/>
<result
property=
"usbOtg"
column=
"usb_otg"
jdbcType=
"OTHER"
/>
<result
property=
"safeMode"
column=
"safe_mode"
jdbcType=
"OTHER"
/>
<result
property=
"secondCardSlot"
column=
"second_card_slot"
jdbcType=
"OTHER"
/>
<result
property=
"sysScreenCapture"
column=
"sys_screen_capture"
jdbcType=
"OTHER"
/>
<result
property=
"sysScreenRecorder"
column=
"sys_screen_recorder"
jdbcType=
"OTHER"
/>
<result
property=
"shearPlate"
column=
"shear_plate"
jdbcType=
"OTHER"
/>
<result
property=
"sysUpgrade"
column=
"sys_upgrade"
jdbcType=
"OTHER"
/>
<result
property=
"apn"
column=
"apn"
jdbcType=
"OTHER"
/>
<result
property=
"secondCardWork"
column=
"second_card_work"
jdbcType=
"OTHER"
/>
<result
property=
"vpn"
column=
"vpn"
jdbcType=
"OTHER"
/>
<result
property=
"networkSetting"
column=
"network_setting"
jdbcType=
"OTHER"
/>
<result
property=
"apkSourceInstallation"
column=
"apk_source_installation"
jdbcType=
"OTHER"
/>
<result
property=
"recoveryStage"
column=
"recovery_stage"
jdbcType=
"OTHER"
/>
<result
property=
"addUsers"
column=
"add_users"
jdbcType=
"OTHER"
/>
<result
property=
"stopSign"
column=
"stop_sign"
jdbcType=
"OTHER"
/>
<result
property=
"settingApp"
column=
"setting_app"
jdbcType=
"OTHER"
/>
<result
property=
"sysInstallBrowser"
column=
"sys_install_browser"
jdbcType=
"OTHER"
/>
<result
property=
"roamingData"
column=
"roaming_data"
jdbcType=
"OTHER"
/>
<result
property=
"networkSharingMenu"
column=
"network_sharing_menu"
jdbcType=
"OTHER"
/>
<result
property=
"editWlanSetting"
column=
"edit_wlan_setting"
jdbcType=
"OTHER"
/>
<result
property=
"bluetoothNetworkSharingMenu"
column=
"bluetooth_network_sharing_menu"
jdbcType=
"OTHER"
/>
<result
property=
"visiblePassword"
column=
"visible_password"
jdbcType=
"OTHER"
/>
<result
property=
"usbNetworkSharingMenu"
column=
"usb_network_sharing_menu"
jdbcType=
"OTHER"
/>
<result
property=
"changeSysTime"
column=
"change_sys_time"
jdbcType=
"OTHER"
/>
<result
property=
"changeWallPaper"
column=
"change_wall_paper"
jdbcType=
"OTHER"
/>
<result
property=
"installUnknownSourceApp"
column=
"install_unknown_source_app"
jdbcType=
"OTHER"
/>
<result
property=
"uninstallApp"
column=
"uninstall_app"
jdbcType=
"OTHER"
/>
<result
property=
"installApp"
column=
"install_app"
jdbcType=
"OTHER"
/>
<result
property=
"wechatShake"
column=
"wechat_shake"
jdbcType=
"OTHER"
/>
<result
property=
"wechatNearbyPeople"
column=
"wechat_nearby_people"
jdbcType=
"OTHER"
/>
<result
property=
"qqViewNearby"
column=
"qq_view_nearby"
jdbcType=
"OTHER"
/>
<result
property=
"createTime"
column=
"create_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"updateTime"
column=
"update_time"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<select
id=
"selectStrategyInfoByStrategyId"
resultType=
"com.skr.mdm.bean.vo.strategy.RailStrategyInfoVO"
>
SELECT FROM rail_strategy_info
WHERE strategy_id = #{strategyId}
</select>
</mapper>
\ No newline at end of file
mdm_dao/src/main/resources/mapper/RailStrategyUserDao.xml
0 → 100644
View file @
589d2fcc
<?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.skr.mdm.dao.RailStrategyUserDao"
>
<resultMap
id=
"BaseResultMap"
type=
"com.skr.mdm.entity.RailStrategyUserDO"
>
<!--@Table rail_strategy_user-->
<result
property=
"id"
column=
"id"
jdbcType=
"INTEGER"
/>
<result
property=
"strategyId"
column=
"strategy_id"
jdbcType=
"INTEGER"
/>
<result
property=
"equipmentId"
column=
"equipment_id"
jdbcType=
"INTEGER"
/>
<result
property=
"state"
column=
"state"
jdbcType=
"INTEGER"
/>
<result
property=
"mdmStatus"
column=
"mdm_status"
jdbcType=
"INTEGER"
/>
<result
property=
"createTime"
column=
"create_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"updateTime"
column=
"update_time"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<delete
id=
"deleteByEquipmentIdList"
>
delete from rail_strategy_user where equipment_id in
<foreach
collection=
"equipmentIdList"
open=
"("
close=
")"
separator=
","
item=
"equipmentId"
>
#{equipmentId}
</foreach>
</delete>
<insert
id=
"insertBatch"
>
insert into rail_strategy_user(strategy_id, equipment_id, state, issued_time) VALUES
<foreach
collection=
"list"
separator=
","
item=
"item"
>
(#{item.strategyId}, #{item.equipmentId}, #{item.state}, #{item.issuedTime})
</foreach>
</insert>
<select
id=
"listStrategyUser"
resultType=
"com.skr.mdm.bean.vo.strategy.StrategyUserVO"
>
select t1.id, t2.user_name, t1.equipment_id, t2.equipment_name, t2.equipment_model, t2.department_name,
t1.state, t1.issued_time
from rail_strategy_user t1
join device_equipment t2 on t1.equipment_id = t2.id
where t1.strategy_id = #{strategyId}
<if
test=
"searchType == 1"
>
and t2.user_name like concat(concat('%', #{searchValue}), '%')
</if>
<if
test=
"searchType == 2"
>
and t2.equipment_name like concat(concat('%', #{searchValue}), '%')
</if>
<if
test=
"searchType == 3"
>
and t2.department_name like concat(concat('%', #{searchValue}), '%')
</if>
<if
test=
"searchType == 4"
>
and t2.imei like concat(concat('%', #{searchValue}), '%')
</if>
<if
test=
"searchType == 5"
>
and t1.state = #{searchValue}
</if>
order by t1.issued_time desc, t1.id
</select>
<select
id=
"listEquipmentIdByStrategyIds"
resultType=
"java.lang.Integer"
>
select equipment_id from rail_strategy_user where strategy_id in
<foreach
collection=
"list"
open=
"("
close=
")"
separator=
","
item=
"strategyId"
>
#{strategyId}
</foreach>
</select>
<select
id=
"queryRailStrategyStatisticsList"
resultType=
"integer"
>
SELECT rsu.state
FROM rail_strategy rs
JOIN rail_strategy_user rsu ON rs.id = rsu.strategy_id
WHERE rs.company_id = #{companyId}
<if
test=
"startTime != null and startTime != '' "
>
AND rsu.update_time
>
= #{startTime}
</if>
<if
test=
"endTime != null and endTime != '' "
>
AND rsu.update_time
<
= #{endTime}
</if>
</select>
</mapper>
\ No newline at end of file
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