Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_ht
Overview
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
pseer
gxpt_ht
Commits
311de82d
Commit
311de82d
authored
Nov 08, 2023
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除房间设备中间表
parent
14c2388e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
91 deletions
+0
-91
SRoom.java
share-system/src/main/java/share/system/domain/SRoom.java
+0
-6
RoomDeviceMapper.java
...m/src/main/java/share/system/mapper/RoomDeviceMapper.java
+0
-63
SRoomServiceImpl.java
...main/java/share/system/service/impl/SRoomServiceImpl.java
+0
-22
No files found.
share-system/src/main/java/share/system/domain/SRoom.java
View file @
311de82d
...
...
@@ -82,12 +82,6 @@ public class SRoom extends BaseEntity
@TableField
(
exist
=
false
)
private
String
packIds
;
/**
* 设备ID
*/
@TableField
(
exist
=
false
)
private
String
deviceIds
;
/**
* 套餐集合
...
...
share-system/src/main/java/share/system/mapper/RoomDeviceMapper.java
deleted
100644 → 0
View file @
14c2388e
package
share
.
system
.
mapper
;
import
java.util.List
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* 包房设备关系Mapper接口
*
* @author wuwenlong
* @date 2023-11-08
*/
public
interface
RoomDeviceMapper
extends
BaseMapper
<
RoomDevice
>
{
/**
* 查询包房设备关系
*
* @param id 包房设备关系主键
* @return 包房设备关系
*/
public
RoomDevice
selectRoomDeviceById
(
Long
id
);
/**
* 查询包房设备关系列表
*
* @param RoomDevice 包房设备关系
* @return 包房设备关系集合
*/
public
List
<
RoomDevice
>
selectRoomDeviceList
(
RoomDevice
RoomDevice
);
/**
* 新增包房设备关系
*
* @param RoomDevice 包房设备关系
* @return 结果
*/
public
int
insertRoomDevice
(
RoomDevice
RoomDevice
);
/**
* 修改包房设备关系
*
* @param RoomDevice 包房设备关系
* @return 结果
*/
public
int
updateRoomDevice
(
RoomDevice
RoomDevice
);
/**
* 删除包房设备关系
*
* @param id 包房设备关系主键
* @return 结果
*/
public
int
deleteRoomDeviceById
(
Long
id
);
/**
* 批量删除包房设备关系
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public
int
deleteRoomDeviceByIds
(
Long
[]
ids
);
List
<
Long
>
selectDeviceListByRoomId
(
Long
id
);
}
share-system/src/main/java/share/system/service/impl/SRoomServiceImpl.java
View file @
311de82d
...
...
@@ -37,11 +37,6 @@ public class SRoomServiceImpl extends ServiceImpl<SRoomMapper, SRoom> implements
@Autowired
private
IRoomPackService
roomPackService
;
@Autowired
private
DeviceService
deviceService
;
@Autowired
public
RoomDeviceService
roomDeviceService
;
/**
* 查询房间
...
...
@@ -127,23 +122,6 @@ public class SRoomServiceImpl extends ServiceImpl<SRoomMapper, SRoom> implements
});
roomPackService
.
saveBatch
(
SRoomPackList
);
}
//判断设备id
if
(!
sRoom
.
getDeviceIds
().
isEmpty
())
{
List
<
Device
>
deviceList
=
deviceService
.
selectDeviceListByIds
(
Arrays
.
asList
(
sRoom
.
getDeviceIds
().
split
(
","
)).
stream
().
map
(
Long:
:
valueOf
).
collect
(
Collectors
.
toList
()));
if
(
CollectionUtils
.
isEmpty
(
deviceList
))
{
throw
new
RuntimeException
(
"设备不存在"
);
}
List
<
Long
>
list
=
Arrays
.
asList
(
sRoom
.
getDeviceIds
().
split
(
","
)).
stream
().
map
(
Long:
:
valueOf
).
collect
(
Collectors
.
toList
());
List
<
RoomDevice
>
SRoomDeviceList
=
new
ArrayList
<>();
list
.
stream
().
forEach
(
o
->
{
RoomDevice
SRoomDevice
=
new
RoomDevice
();
SRoomDevice
.
setDeviceId
(
o
);
SRoomDevice
.
setRoomId
(
sRoom
.
getId
());
SRoomDevice
.
setCreateTime
(
DateUtils
.
getNowDate
());
SRoomDeviceList
.
add
(
SRoomDevice
);
});
roomDeviceService
.
saveBatch
(
SRoomDeviceList
);
}
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"新增房间失败"
);
}
...
...
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