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
4695f84b
Commit
4695f84b
authored
Oct 31, 2023
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增接口,通过房间ID查询套餐
parent
ab4b6f46
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
52 additions
and
3 deletions
+52
-3
RoomPackController.java
.../java/share/web/controller/system/RoomPackController.java
+1
-1
SRoomController.java
...ain/java/share/web/controller/system/SRoomController.java
+10
-0
WebConfig.java
...-front/src/main/java/share/web/core/config/WebConfig.java
+1
-0
SCoupon.java
share-system/src/main/java/share/system/domain/SCoupon.java
+1
-1
RoomPackMapper.java
...tem/src/main/java/share/system/mapper/RoomPackMapper.java
+2
-0
IPackService.java
...stem/src/main/java/share/system/service/IPackService.java
+2
-0
IRoomPackService.java
.../src/main/java/share/system/service/IRoomPackService.java
+2
-0
ISRoomService.java
...tem/src/main/java/share/system/service/ISRoomService.java
+3
-0
PackServiceImpl.java
.../main/java/share/system/service/impl/PackServiceImpl.java
+5
-0
RoomPackServiceImpl.java
...n/java/share/system/service/impl/RoomPackServiceImpl.java
+5
-0
SRoomServiceImpl.java
...main/java/share/system/service/impl/SRoomServiceImpl.java
+15
-0
SStoreServiceImpl.java
...ain/java/share/system/service/impl/SStoreServiceImpl.java
+0
-1
RoomPackMapper.xml
...ystem/src/main/resources/mapper/system/RoomPackMapper.xml
+5
-0
No files found.
share-admin/src/main/java/share/web/controller/system/RoomPackController.java
View file @
4695f84b
...
...
@@ -29,7 +29,7 @@ import share.common.core.page.TableDataInfo;
* @date 2023-10-31
*/
@RestController
@RequestMapping
(
"/system/
p
ack"
)
@RequestMapping
(
"/system/
roomP
ack"
)
public
class
RoomPackController
extends
BaseController
{
@Autowired
private
IRoomPackService
roomPackService
;
...
...
share-front/src/main/java/share/web/controller/system/SRoomController.java
View file @
4695f84b
...
...
@@ -16,6 +16,7 @@ import share.common.core.controller.BaseController;
import
share.common.core.domain.AjaxResult
;
import
share.common.core.domain.R
;
import
share.common.enums.BusinessType
;
import
share.system.domain.Pack
;
import
share.system.domain.SRoom
;
import
share.system.domain.vo.RoomStatusVo
;
import
share.system.domain.vo.SRoomVo
;
...
...
@@ -86,5 +87,14 @@ public class SRoomController extends BaseController {
return
R
.
ok
(
sRoomService
.
openDoor
(
id
));
}
/**
* 通过房间ID查询套餐
*/
@ApiOperation
(
value
=
"通过房间ID查询套餐"
)
@RequestMapping
(
value
=
"/roomId"
,
method
=
RequestMethod
.
GET
)
public
R
<
List
<
Pack
>>
getPackByRoomId
(
@RequestParam
(
"id"
)
Long
id
)
{
return
R
.
ok
(
sRoomService
.
getPackByRoomId
(
id
));
}
}
share-front/src/main/java/share/web/core/config/WebConfig.java
View file @
4695f84b
...
...
@@ -71,6 +71,7 @@ public class WebConfig implements WebMvcConfigurer {
"/front/room/list"
,
"/front/room/info"
,
"/front/room/roomStatus"
,
"/front/room/roomId"
,
"**"
).
addPathPatterns
(
"/**"
);
}
...
...
share-system/src/main/java/share/system/domain/SCoupon.java
View file @
4695f84b
...
...
@@ -54,7 +54,7 @@ public class SCoupon extends BaseEntity
private
String
roomType
;
/** 优惠券类型(1:折扣券,2,团购券,3:满减券,4:核销券,5:充值送金额) */
@Excel
(
name
=
"优惠券类型(1:折扣券,2,团购券,3:满减券,4:核销券,5:充值送金额)"
)
@Excel
(
name
=
"优惠券类型(1:折扣券,2,团购券,3:满减券,4:核销券,5:充值送金额
,6:套餐劵
)"
)
private
Integer
couponType
;
/** 门槛时长 */
...
...
share-system/src/main/java/share/system/mapper/RoomPackMapper.java
View file @
4695f84b
...
...
@@ -59,4 +59,6 @@ public interface RoomPackMapper extends BaseMapper<RoomPack> {
* @return 结果
*/
public
int
deleteRoomPackByIds
(
Long
[]
ids
);
List
<
Long
>
selectPackListByRoomId
(
Long
id
);
}
share-system/src/main/java/share/system/service/IPackService.java
View file @
4695f84b
...
...
@@ -59,4 +59,6 @@ public interface IPackService extends IService<Pack> {
* @return 结果
*/
public
int
deletePackById
(
Long
id
);
List
<
Pack
>
selectPackListByIds
(
List
<
Long
>
packIds
);
}
share-system/src/main/java/share/system/service/IRoomPackService.java
View file @
4695f84b
...
...
@@ -59,4 +59,6 @@ public interface IRoomPackService extends IService<RoomPack> {
* @return 结果
*/
public
int
deleteRoomPackById
(
Long
id
);
List
<
Long
>
selectPackListByRoomId
(
Long
id
);
}
share-system/src/main/java/share/system/service/ISRoomService.java
View file @
4695f84b
...
...
@@ -3,6 +3,7 @@ package share.system.service;
import
java.util.List
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
share.system.domain.Pack
;
import
share.system.domain.SRoom
;
import
share.system.domain.vo.SRoomVo
;
...
...
@@ -83,4 +84,6 @@ public interface ISRoomService extends IService<SRoom>
String
openDoor
(
Long
id
);
List
<
Pack
>
getPackByRoomId
(
Long
id
);
}
share-system/src/main/java/share/system/service/impl/PackServiceImpl.java
View file @
4695f84b
...
...
@@ -88,4 +88,9 @@ public class PackServiceImpl extends ServiceImpl<PackMapper, Pack> implements IP
public
int
deletePackById
(
Long
id
)
{
return
packMapper
.
deletePackById
(
id
);
}
@Override
public
List
<
Pack
>
selectPackListByIds
(
List
<
Long
>
packIds
)
{
return
packMapper
.
selectBatchIds
(
packIds
);
}
}
share-system/src/main/java/share/system/service/impl/RoomPackServiceImpl.java
View file @
4695f84b
...
...
@@ -88,4 +88,9 @@ public class RoomPackServiceImpl extends ServiceImpl<RoomPackMapper, RoomPack> i
public
int
deleteRoomPackById
(
Long
id
)
{
return
roomPackMapper
.
deleteRoomPackById
(
id
);
}
@Override
public
List
<
Long
>
selectPackListByRoomId
(
Long
id
)
{
return
roomPackMapper
.
selectPackListByRoomId
(
id
);
}
}
share-system/src/main/java/share/system/service/impl/SRoomServiceImpl.java
View file @
4695f84b
...
...
@@ -11,11 +11,14 @@ import share.common.enums.RoleTypeEnum;
import
share.common.utils.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
share.system.domain.Pack
;
import
share.system.domain.SConsumer
;
import
share.system.domain.vo.FrontTokenComponent
;
import
share.system.domain.vo.SRoomVo
;
import
share.system.mapper.SRoomMapper
;
import
share.system.domain.SRoom
;
import
share.system.service.IPackService
;
import
share.system.service.IRoomPackService
;
import
share.system.service.ISRoomService
;
import
share.system.service.ISStoreService
;
...
...
@@ -34,6 +37,12 @@ public class SRoomServiceImpl extends ServiceImpl<SRoomMapper,SRoom> implements
@Autowired
private
ISStoreService
sStoreService
;
@Autowired
private
IPackService
packService
;
@Autowired
private
IRoomPackService
roomPackService
;
/**
* 查询房间
*
...
...
@@ -174,6 +183,12 @@ public class SRoomServiceImpl extends ServiceImpl<SRoomMapper,SRoom> implements
}
}
@Override
public
List
<
Pack
>
getPackByRoomId
(
Long
id
)
{
List
<
Long
>
packIds
=
roomPackService
.
selectPackListByRoomId
(
id
);
return
packService
.
selectPackListByIds
(
packIds
);
}
private
List
<
SRoomVo
>
convertDoListToVoList
(
List
<
SRoom
>
roomList
){
List
<
SRoomVo
>
voList
=
new
ArrayList
<>();
...
...
share-system/src/main/java/share/system/service/impl/SStoreServiceImpl.java
View file @
4695f84b
...
...
@@ -266,7 +266,6 @@ public class SStoreServiceImpl extends ServiceImpl<SStoreMapper, SStore> impleme
idList
.
forEach
(
item
->
{
storeList
.
add
(
sStoreMapper
.
selectById
(
item
));
});
//转换VO
storeList
.
forEach
(
item
->
{
item
.
setRoolList
(
sRoomService
.
selectSroomListByStroeId
(
item
.
getId
()));
});
...
...
share-system/src/main/resources/mapper/system/RoomPackMapper.xml
View file @
4695f84b
...
...
@@ -39,6 +39,11 @@
<include
refid=
"selectRoomPackVo"
/>
where id = #{id}
</select>
<select
id=
"selectPackListByRoomId"
resultType=
"java.lang.Long"
>
select pack_id
from s_room_pack
where room_id = #{roomId}
</select>
<insert
id=
"insertRoomPack"
parameterType=
"RoomPack"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into s_room_pack
...
...
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