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
fdf6859e
Commit
fdf6859e
authored
Oct 31, 2023
by
wuwenlong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/main'
parents
343b08e7
8eaa3406
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
213 additions
and
173 deletions
+213
-173
PackController.java
...main/java/share/web/controller/system/PackController.java
+20
-10
RoomPackController.java
.../java/share/web/controller/system/RoomPackController.java
+20
-10
CouponTypeEnum.java
...mmon/src/main/java/share/common/enums/CouponTypeEnum.java
+6
-4
PackController.java
...main/java/share/web/controller/system/PackController.java
+10
-10
RoomPackController.java
.../java/share/web/controller/system/RoomPackController.java
+10
-10
SRoomController.java
...ain/java/share/web/controller/system/SRoomController.java
+2
-8
SPack.java
share-system/src/main/java/share/system/domain/SPack.java
+1
-3
SRoom.java
share-system/src/main/java/share/system/domain/SRoom.java
+2
-2
SRoomPack.java
...e-system/src/main/java/share/system/domain/SRoomPack.java
+1
-3
SRoomVo.java
...-system/src/main/java/share/system/domain/vo/SRoomVo.java
+7
-0
PackMapper.java
...-system/src/main/java/share/system/mapper/PackMapper.java
+9
-9
RoomPackMapper.java
...tem/src/main/java/share/system/mapper/RoomPackMapper.java
+9
-9
IPackService.java
...stem/src/main/java/share/system/service/IPackService.java
+10
-10
IRoomPackService.java
.../src/main/java/share/system/service/IRoomPackService.java
+11
-9
ISRoomService.java
...tem/src/main/java/share/system/service/ISRoomService.java
+2
-2
PackServiceImpl.java
.../main/java/share/system/service/impl/PackServiceImpl.java
+19
-16
RoomPackServiceImpl.java
...n/java/share/system/service/impl/RoomPackServiceImpl.java
+24
-19
SRoomServiceImpl.java
...main/java/share/system/service/impl/SRoomServiceImpl.java
+42
-31
PackMapper.xml
share-system/src/main/resources/mapper/system/PackMapper.xml
+4
-4
RoomPackMapper.xml
...ystem/src/main/resources/mapper/system/RoomPackMapper.xml
+4
-4
No files found.
share-admin/src/main/java/share/web/controller/system/PackController.java
View file @
fdf6859e
...
...
@@ -16,8 +16,9 @@ import org.springframework.web.bind.annotation.RestController;
import
share.common.annotation.Log
;
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.
S
Pack
;
import
share.system.service.IPackService
;
import
share.common.utils.poi.ExcelUtil
;
import
share.common.core.page.TableDataInfo
;
...
...
@@ -39,21 +40,30 @@ public class PackController extends BaseController {
*/
@PreAuthorize
(
"@ss.hasPermi('system:pack:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
Pack
p
ack
)
{
public
TableDataInfo
list
(
SPack
SP
ack
)
{
startPage
();
List
<
Pack
>
list
=
packService
.
selectPackList
(
p
ack
);
List
<
SPack
>
list
=
packService
.
selectPackList
(
SP
ack
);
return
getDataTable
(
list
);
}
/**
* 查询套餐列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:pack:list')"
)
@GetMapping
(
"/query"
)
public
R
<
List
<
SPack
>>
query
()
{
return
R
.
ok
(
packService
.
selectPackList
(
new
SPack
()));
}
/**
* 导出套餐列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:pack:export')"
)
@Log
(
title
=
"套餐"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
Pack
p
ack
)
{
List
<
Pack
>
list
=
packService
.
selectPackList
(
p
ack
);
ExcelUtil
<
Pack
>
util
=
new
ExcelUtil
<
Pack
>(
Pack
.
class
);
public
void
export
(
HttpServletResponse
response
,
SPack
SP
ack
)
{
List
<
SPack
>
list
=
packService
.
selectPackList
(
SP
ack
);
ExcelUtil
<
SPack
>
util
=
new
ExcelUtil
<
SPack
>(
S
Pack
.
class
);
util
.
exportExcel
(
response
,
list
,
"套餐数据"
);
}
...
...
@@ -72,8 +82,8 @@ public class PackController extends BaseController {
@PreAuthorize
(
"@ss.hasPermi('system:pack:add')"
)
@Log
(
title
=
"套餐"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
Pack
p
ack
)
{
return
toAjax
(
packService
.
insertPack
(
p
ack
));
public
AjaxResult
add
(
@RequestBody
SPack
SP
ack
)
{
return
toAjax
(
packService
.
insertPack
(
SP
ack
));
}
/**
...
...
@@ -82,8 +92,8 @@ public class PackController extends BaseController {
@PreAuthorize
(
"@ss.hasPermi('system:pack:edit')"
)
@Log
(
title
=
"套餐"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
Pack
p
ack
)
{
return
toAjax
(
packService
.
updatePack
(
p
ack
));
public
AjaxResult
edit
(
@RequestBody
SPack
SP
ack
)
{
return
toAjax
(
packService
.
updatePack
(
SP
ack
));
}
/**
...
...
share-admin/src/main/java/share/web/controller/system/RoomPackController.java
View file @
fdf6859e
...
...
@@ -16,8 +16,9 @@ import org.springframework.web.bind.annotation.RestController;
import
share.common.annotation.Log
;
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.RoomPack
;
import
share.system.domain.
S
RoomPack
;
import
share.system.service.IRoomPackService
;
import
share.common.utils.poi.ExcelUtil
;
import
share.common.core.page.TableDataInfo
;
...
...
@@ -39,9 +40,9 @@ public class RoomPackController extends BaseController {
*/
@PreAuthorize
(
"@ss.hasPermi('system:pack:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
RoomPack
r
oomPack
)
{
public
TableDataInfo
list
(
SRoomPack
SR
oomPack
)
{
startPage
();
List
<
RoomPack
>
list
=
roomPackService
.
selectRoomPackList
(
r
oomPack
);
List
<
SRoomPack
>
list
=
roomPackService
.
selectRoomPackList
(
SR
oomPack
);
return
getDataTable
(
list
);
}
...
...
@@ -51,9 +52,9 @@ public class RoomPackController extends BaseController {
@PreAuthorize
(
"@ss.hasPermi('system:pack:export')"
)
@Log
(
title
=
"包房套餐关系"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
RoomPack
r
oomPack
)
{
List
<
RoomPack
>
list
=
roomPackService
.
selectRoomPackList
(
r
oomPack
);
ExcelUtil
<
RoomPack
>
util
=
new
ExcelUtil
<
RoomPack
>(
RoomPack
.
class
);
public
void
export
(
HttpServletResponse
response
,
SRoomPack
SR
oomPack
)
{
List
<
SRoomPack
>
list
=
roomPackService
.
selectRoomPackList
(
SR
oomPack
);
ExcelUtil
<
SRoomPack
>
util
=
new
ExcelUtil
<
SRoomPack
>(
S
RoomPack
.
class
);
util
.
exportExcel
(
response
,
list
,
"包房套餐关系数据"
);
}
...
...
@@ -72,8 +73,8 @@ public class RoomPackController extends BaseController {
@PreAuthorize
(
"@ss.hasPermi('system:pack:add')"
)
@Log
(
title
=
"包房套餐关系"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
RoomPack
r
oomPack
)
{
return
toAjax
(
roomPackService
.
insertRoomPack
(
r
oomPack
));
public
AjaxResult
add
(
@RequestBody
SRoomPack
SR
oomPack
)
{
return
toAjax
(
roomPackService
.
insertRoomPack
(
SR
oomPack
));
}
/**
...
...
@@ -82,8 +83,8 @@ public class RoomPackController extends BaseController {
@PreAuthorize
(
"@ss.hasPermi('system:pack:edit')"
)
@Log
(
title
=
"包房套餐关系"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
RoomPack
r
oomPack
)
{
return
toAjax
(
roomPackService
.
updateRoomPack
(
r
oomPack
));
public
AjaxResult
edit
(
@RequestBody
SRoomPack
SR
oomPack
)
{
return
toAjax
(
roomPackService
.
updateRoomPack
(
SR
oomPack
));
}
/**
...
...
@@ -95,4 +96,13 @@ public class RoomPackController extends BaseController {
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
return
toAjax
(
roomPackService
.
deleteRoomPackByIds
(
ids
));
}
/**
* 获取包房套餐关系详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('system:pack:query')"
)
@GetMapping
(
value
=
"/getPackId/{id}"
)
public
R
<
List
<
SRoomPack
>>
getPackId
(
@PathVariable
(
"id"
)
Long
id
)
{
return
R
.
ok
(
roomPackService
.
selectRoomPackByPackId
(
id
));
}
}
share-common/src/main/java/share/common/enums/CouponTypeEnum.java
View file @
fdf6859e
package
share
.
common
.
enums
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* @Author wwl
* @Date 2023/10/19 17:06
*/
public
enum
CouponTypeEnum
{
//1:折扣券,2,团购券,3:满减券,4:核销券,5:充值送金额,6:套餐劵
DISCOUNT
(
1
,
"1"
,
"折扣券"
),
CASH
(
2
,
"2"
,
"满减券(现金券)"
),
DURATION
(
3
,
"3"
,
"时长券"
);
DURATION
(
3
,
"3"
,
"时长券"
),
VERIFICATION
(
4
,
"4"
,
"核销券"
),
RECHARGE
(
5
,
"5"
,
"充值送金额"
),
PACKAGE
(
6
,
"6"
,
"套餐劵"
),
;
private
Integer
code
;
private
String
value
;
...
...
share-front/src/main/java/share/web/controller/system/PackController.java
View file @
fdf6859e
...
...
@@ -9,7 +9,7 @@ import share.common.core.domain.AjaxResult;
import
share.common.core.page.TableDataInfo
;
import
share.common.enums.BusinessType
;
import
share.common.utils.poi.ExcelUtil
;
import
share.system.domain.Pack
;
import
share.system.domain.
S
Pack
;
import
share.system.service.IPackService
;
import
javax.servlet.http.HttpServletResponse
;
...
...
@@ -32,9 +32,9 @@ public class PackController extends BaseController {
*/
@PreAuthorize
(
"@ss.hasPermi('system:pack:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
Pack
p
ack
)
{
public
TableDataInfo
list
(
SPack
SP
ack
)
{
startPage
();
List
<
Pack
>
list
=
packService
.
selectPackList
(
p
ack
);
List
<
SPack
>
list
=
packService
.
selectPackList
(
SP
ack
);
return
getDataTable
(
list
);
}
...
...
@@ -44,9 +44,9 @@ public class PackController extends BaseController {
@PreAuthorize
(
"@ss.hasPermi('system:pack:export')"
)
@Log
(
title
=
"套餐"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
Pack
p
ack
)
{
List
<
Pack
>
list
=
packService
.
selectPackList
(
p
ack
);
ExcelUtil
<
Pack
>
util
=
new
ExcelUtil
<
Pack
>(
Pack
.
class
);
public
void
export
(
HttpServletResponse
response
,
SPack
SP
ack
)
{
List
<
SPack
>
list
=
packService
.
selectPackList
(
SP
ack
);
ExcelUtil
<
SPack
>
util
=
new
ExcelUtil
<
SPack
>(
S
Pack
.
class
);
util
.
exportExcel
(
response
,
list
,
"套餐数据"
);
}
...
...
@@ -65,8 +65,8 @@ public class PackController extends BaseController {
@PreAuthorize
(
"@ss.hasPermi('system:pack:add')"
)
@Log
(
title
=
"套餐"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
Pack
p
ack
)
{
return
toAjax
(
packService
.
insertPack
(
p
ack
));
public
AjaxResult
add
(
@RequestBody
SPack
SP
ack
)
{
return
toAjax
(
packService
.
insertPack
(
SP
ack
));
}
/**
...
...
@@ -75,8 +75,8 @@ public class PackController extends BaseController {
@PreAuthorize
(
"@ss.hasPermi('system:pack:edit')"
)
@Log
(
title
=
"套餐"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
Pack
p
ack
)
{
return
toAjax
(
packService
.
updatePack
(
p
ack
));
public
AjaxResult
edit
(
@RequestBody
SPack
SP
ack
)
{
return
toAjax
(
packService
.
updatePack
(
SP
ack
));
}
/**
...
...
share-front/src/main/java/share/web/controller/system/RoomPackController.java
View file @
fdf6859e
...
...
@@ -17,7 +17,7 @@ import share.common.annotation.Log;
import
share.common.core.controller.BaseController
;
import
share.common.core.domain.AjaxResult
;
import
share.common.enums.BusinessType
;
import
share.system.domain.RoomPack
;
import
share.system.domain.
S
RoomPack
;
import
share.system.service.IRoomPackService
;
import
share.common.utils.poi.ExcelUtil
;
import
share.common.core.page.TableDataInfo
;
...
...
@@ -39,9 +39,9 @@ public class RoomPackController extends BaseController {
*/
@PreAuthorize
(
"@ss.hasPermi('system:pack:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
RoomPack
r
oomPack
)
{
public
TableDataInfo
list
(
SRoomPack
SR
oomPack
)
{
startPage
();
List
<
RoomPack
>
list
=
roomPackService
.
selectRoomPackList
(
r
oomPack
);
List
<
SRoomPack
>
list
=
roomPackService
.
selectRoomPackList
(
SR
oomPack
);
return
getDataTable
(
list
);
}
...
...
@@ -51,9 +51,9 @@ public class RoomPackController extends BaseController {
@PreAuthorize
(
"@ss.hasPermi('system:pack:export')"
)
@Log
(
title
=
"包房套餐关系"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
RoomPack
r
oomPack
)
{
List
<
RoomPack
>
list
=
roomPackService
.
selectRoomPackList
(
r
oomPack
);
ExcelUtil
<
RoomPack
>
util
=
new
ExcelUtil
<
RoomPack
>(
RoomPack
.
class
);
public
void
export
(
HttpServletResponse
response
,
SRoomPack
SR
oomPack
)
{
List
<
SRoomPack
>
list
=
roomPackService
.
selectRoomPackList
(
SR
oomPack
);
ExcelUtil
<
SRoomPack
>
util
=
new
ExcelUtil
<
SRoomPack
>(
S
RoomPack
.
class
);
util
.
exportExcel
(
response
,
list
,
"包房套餐关系数据"
);
}
...
...
@@ -72,8 +72,8 @@ public class RoomPackController extends BaseController {
@PreAuthorize
(
"@ss.hasPermi('system:pack:add')"
)
@Log
(
title
=
"包房套餐关系"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
RoomPack
r
oomPack
)
{
return
toAjax
(
roomPackService
.
insertRoomPack
(
r
oomPack
));
public
AjaxResult
add
(
@RequestBody
SRoomPack
SR
oomPack
)
{
return
toAjax
(
roomPackService
.
insertRoomPack
(
SR
oomPack
));
}
/**
...
...
@@ -82,8 +82,8 @@ public class RoomPackController extends BaseController {
@PreAuthorize
(
"@ss.hasPermi('system:pack:edit')"
)
@Log
(
title
=
"包房套餐关系"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
RoomPack
r
oomPack
)
{
return
toAjax
(
roomPackService
.
updateRoomPack
(
r
oomPack
));
public
AjaxResult
edit
(
@RequestBody
SRoomPack
SR
oomPack
)
{
return
toAjax
(
roomPackService
.
updateRoomPack
(
SR
oomPack
));
}
/**
...
...
share-front/src/main/java/share/web/controller/system/SRoomController.java
View file @
fdf6859e
...
...
@@ -3,25 +3,19 @@ package share.web.controller.system;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Objects
;
import
javax.servlet.http.HttpServletResponse
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
share.common.annotation.Log
;
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.SPack
;
import
share.system.domain.SRoom
;
import
share.system.domain.vo.RoomStatusVo
;
import
share.system.domain.vo.SRoomVo
;
import
share.system.service.ISRoomService
;
import
share.common.utils.poi.ExcelUtil
;
import
share.common.core.page.TableDataInfo
;
import
share.system.service.RoomStatusService
;
...
...
@@ -92,7 +86,7 @@ public class SRoomController extends BaseController {
*/
@ApiOperation
(
value
=
"通过房间ID查询套餐"
)
@RequestMapping
(
value
=
"/roomId"
,
method
=
RequestMethod
.
GET
)
public
R
<
List
<
Pack
>>
getPackByRoomId
(
@RequestParam
(
"id"
)
Long
id
)
{
public
R
<
List
<
S
Pack
>>
getPackByRoomId
(
@RequestParam
(
"id"
)
Long
id
)
{
return
R
.
ok
(
sRoomService
.
getPackByRoomId
(
id
));
}
...
...
share-system/src/main/java/share/system/domain/Pack.java
→
share-system/src/main/java/share/system/domain/
S
Pack.java
View file @
fdf6859e
...
...
@@ -6,8 +6,6 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
share.common.annotation.Excel
;
import
share.common.core.domain.BaseEntity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableLogic
;
import
lombok.Data
;
/**
...
...
@@ -17,7 +15,7 @@ import lombok.Data;
* @date 2023-10-31
*/
@Data
public
class
Pack
extends
BaseEntity
{
public
class
S
Pack
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
...
...
share-system/src/main/java/share/system/domain/SRoom.java
View file @
fdf6859e
...
...
@@ -76,9 +76,9 @@ public class SRoom extends BaseEntity
private
String
params2
;
/**
* 套餐ID
数组
* 套餐ID
*/
@TableField
(
exist
=
false
)
private
Long
[]
packIds
;
private
String
packIds
;
}
share-system/src/main/java/share/system/domain/RoomPack.java
→
share-system/src/main/java/share/system/domain/
S
RoomPack.java
View file @
fdf6859e
...
...
@@ -4,8 +4,6 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
share.common.annotation.Excel
;
import
share.common.core.domain.BaseEntity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableLogic
;
import
lombok.Data
;
/**
...
...
@@ -15,7 +13,7 @@ import lombok.Data;
* @date 2023-10-31
*/
@Data
public
class
RoomPack
extends
BaseEntity
{
public
class
S
RoomPack
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
...
...
share-system/src/main/java/share/system/domain/vo/SRoomVo.java
View file @
fdf6859e
package
share
.
system
.
domain
.
vo
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -81,6 +82,12 @@ public class SRoomVo extends BaseEntity
@ApiModelProperty
(
value
=
"其他可能硬件接入参数(备用2)"
)
private
String
params2
;
/**
* 套餐ID
*/
@TableField
(
exist
=
false
)
private
String
packIds
;
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
...
...
share-system/src/main/java/share/system/mapper/PackMapper.java
View file @
fdf6859e
...
...
@@ -3,7 +3,7 @@ package share.system.mapper;
import
java.util.List
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
share.system.domain.Pack
;
import
share.system.domain.
S
Pack
;
/**
* 套餐Mapper接口
...
...
@@ -11,38 +11,38 @@ import share.system.domain.Pack;
* @author wuwenlong
* @date 2023-10-31
*/
public
interface
PackMapper
extends
BaseMapper
<
Pack
>
{
public
interface
PackMapper
extends
BaseMapper
<
S
Pack
>
{
/**
* 查询套餐
*
* @param id 套餐主键
* @return 套餐
*/
public
Pack
selectPackById
(
Long
id
);
public
S
Pack
selectPackById
(
Long
id
);
/**
* 查询套餐列表
*
* @param
p
ack 套餐
* @param
SP
ack 套餐
* @return 套餐集合
*/
public
List
<
Pack
>
selectPackList
(
Pack
p
ack
);
public
List
<
SPack
>
selectPackList
(
SPack
SP
ack
);
/**
* 新增套餐
*
* @param
p
ack 套餐
* @param
SP
ack 套餐
* @return 结果
*/
public
int
insertPack
(
Pack
p
ack
);
public
int
insertPack
(
SPack
SP
ack
);
/**
* 修改套餐
*
* @param
p
ack 套餐
* @param
SP
ack 套餐
* @return 结果
*/
public
int
updatePack
(
Pack
p
ack
);
public
int
updatePack
(
SPack
SP
ack
);
/**
* 删除套餐
...
...
share-system/src/main/java/share/system/mapper/RoomPackMapper.java
View file @
fdf6859e
...
...
@@ -3,7 +3,7 @@ package share.system.mapper;
import
java.util.List
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
share.system.domain.RoomPack
;
import
share.system.domain.
S
RoomPack
;
/**
* 包房套餐关系Mapper接口
...
...
@@ -11,38 +11,38 @@ import share.system.domain.RoomPack;
* @author wuwenlong
* @date 2023-10-31
*/
public
interface
RoomPackMapper
extends
BaseMapper
<
RoomPack
>
{
public
interface
RoomPackMapper
extends
BaseMapper
<
S
RoomPack
>
{
/**
* 查询包房套餐关系
*
* @param id 包房套餐关系主键
* @return 包房套餐关系
*/
public
RoomPack
selectRoomPackById
(
Long
id
);
public
S
RoomPack
selectRoomPackById
(
Long
id
);
/**
* 查询包房套餐关系列表
*
* @param
r
oomPack 包房套餐关系
* @param
SR
oomPack 包房套餐关系
* @return 包房套餐关系集合
*/
public
List
<
RoomPack
>
selectRoomPackList
(
RoomPack
r
oomPack
);
public
List
<
SRoomPack
>
selectRoomPackList
(
SRoomPack
SR
oomPack
);
/**
* 新增包房套餐关系
*
* @param
r
oomPack 包房套餐关系
* @param
SR
oomPack 包房套餐关系
* @return 结果
*/
public
int
insertRoomPack
(
RoomPack
r
oomPack
);
public
int
insertRoomPack
(
SRoomPack
SR
oomPack
);
/**
* 修改包房套餐关系
*
* @param
r
oomPack 包房套餐关系
* @param
SR
oomPack 包房套餐关系
* @return 结果
*/
public
int
updateRoomPack
(
RoomPack
r
oomPack
);
public
int
updateRoomPack
(
SRoomPack
SR
oomPack
);
/**
* 删除包房套餐关系
...
...
share-system/src/main/java/share/system/service/IPackService.java
View file @
fdf6859e
...
...
@@ -3,7 +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.
S
Pack
;
/**
* 套餐Service接口
...
...
@@ -11,38 +11,38 @@ import share.system.domain.Pack;
* @author wuwenlong
* @date 2023-10-31
*/
public
interface
IPackService
extends
IService
<
Pack
>
{
public
interface
IPackService
extends
IService
<
S
Pack
>
{
/**
* 查询套餐
*
* @param id 套餐主键
* @return 套餐
*/
public
Pack
selectPackById
(
Long
id
);
public
S
Pack
selectPackById
(
Long
id
);
/**
* 查询套餐列表
*
* @param
p
ack 套餐
* @param
SP
ack 套餐
* @return 套餐集合
*/
public
List
<
Pack
>
selectPackList
(
Pack
p
ack
);
public
List
<
SPack
>
selectPackList
(
SPack
SP
ack
);
/**
* 新增套餐
*
* @param
p
ack 套餐
* @param
SP
ack 套餐
* @return 结果
*/
public
int
insertPack
(
Pack
p
ack
);
public
int
insertPack
(
SPack
SP
ack
);
/**
* 修改套餐
*
* @param
p
ack 套餐
* @param
SP
ack 套餐
* @return 结果
*/
public
int
updatePack
(
Pack
p
ack
);
public
int
updatePack
(
SPack
SP
ack
);
/**
* 批量删除套餐
...
...
@@ -60,5 +60,5 @@ public interface IPackService extends IService<Pack> {
*/
public
int
deletePackById
(
Long
id
);
List
<
Pack
>
selectPackListByIds
(
List
<
Long
>
packIds
);
List
<
S
Pack
>
selectPackListByIds
(
List
<
Long
>
packIds
);
}
share-system/src/main/java/share/system/service/IRoomPackService.java
View file @
fdf6859e
...
...
@@ -3,7 +3,7 @@ package share.system.service;
import
java.util.List
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
share.system.domain.RoomPack
;
import
share.system.domain.
S
RoomPack
;
/**
* 包房套餐关系Service接口
...
...
@@ -11,38 +11,38 @@ import share.system.domain.RoomPack;
* @author wuwenlong
* @date 2023-10-31
*/
public
interface
IRoomPackService
extends
IService
<
RoomPack
>
{
public
interface
IRoomPackService
extends
IService
<
S
RoomPack
>
{
/**
* 查询包房套餐关系
*
* @param id 包房套餐关系主键
* @return 包房套餐关系
*/
public
RoomPack
selectRoomPackById
(
Long
id
);
public
S
RoomPack
selectRoomPackById
(
Long
id
);
/**
* 查询包房套餐关系列表
*
* @param
r
oomPack 包房套餐关系
* @param
SR
oomPack 包房套餐关系
* @return 包房套餐关系集合
*/
public
List
<
RoomPack
>
selectRoomPackList
(
RoomPack
r
oomPack
);
public
List
<
SRoomPack
>
selectRoomPackList
(
SRoomPack
SR
oomPack
);
/**
* 新增包房套餐关系
*
* @param
r
oomPack 包房套餐关系
* @param
SR
oomPack 包房套餐关系
* @return 结果
*/
public
int
insertRoomPack
(
RoomPack
r
oomPack
);
public
int
insertRoomPack
(
SRoomPack
SR
oomPack
);
/**
* 修改包房套餐关系
*
* @param
r
oomPack 包房套餐关系
* @param
SR
oomPack 包房套餐关系
* @return 结果
*/
public
int
updateRoomPack
(
RoomPack
r
oomPack
);
public
int
updateRoomPack
(
SRoomPack
SR
oomPack
);
/**
* 批量删除包房套餐关系
...
...
@@ -63,4 +63,6 @@ public interface IRoomPackService extends IService<RoomPack> {
List
<
Long
>
selectPackListByRoomId
(
Long
id
);
int
deleteRoomPackByRoomId
(
Long
id
);
List
<
SRoomPack
>
selectRoomPackByPackId
(
Long
id
);
}
share-system/src/main/java/share/system/service/ISRoomService.java
View file @
fdf6859e
...
...
@@ -3,7 +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.
S
Pack
;
import
share.system.domain.SRoom
;
import
share.system.domain.vo.SRoomVo
;
...
...
@@ -85,5 +85,5 @@ public interface ISRoomService extends IService<SRoom>
String
openDoor
(
Long
id
);
List
<
Pack
>
getPackByRoomId
(
Long
id
);
List
<
S
Pack
>
getPackByRoomId
(
Long
id
);
}
share-system/src/main/java/share/system/service/impl/PackServiceImpl.java
View file @
fdf6859e
...
...
@@ -2,12 +2,13 @@ package share.system.service.impl;
import
java.util.List
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
share.common.utils.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
share.system.mapper.PackMapper
;
import
share.system.domain.Pack
;
import
share.system.domain.
S
Pack
;
import
share.system.service.IPackService
;
/**
...
...
@@ -17,7 +18,7 @@ import share.system.service.IPackService;
* @date 2023-10-31
*/
@Service
public
class
PackServiceImpl
extends
ServiceImpl
<
PackMapper
,
Pack
>
implements
IPackService
{
public
class
PackServiceImpl
extends
ServiceImpl
<
PackMapper
,
S
Pack
>
implements
IPackService
{
@Autowired
private
PackMapper
packMapper
;
...
...
@@ -28,43 +29,43 @@ public class PackServiceImpl extends ServiceImpl<PackMapper, Pack> implements IP
* @return 套餐
*/
@Override
public
Pack
selectPackById
(
Long
id
)
{
public
S
Pack
selectPackById
(
Long
id
)
{
return
packMapper
.
selectPackById
(
id
);
}
/**
* 查询套餐列表
*
* @param
p
ack 套餐
* @param
SP
ack 套餐
* @return 套餐
*/
@Override
public
List
<
Pack
>
selectPackList
(
Pack
p
ack
)
{
return
packMapper
.
selectPackList
(
p
ack
);
public
List
<
SPack
>
selectPackList
(
SPack
SP
ack
)
{
return
packMapper
.
selectPackList
(
SP
ack
);
}
/**
* 新增套餐
*
* @param
p
ack 套餐
* @param
SP
ack 套餐
* @return 结果
*/
@Override
public
int
insertPack
(
Pack
p
ack
)
{
p
ack
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
packMapper
.
insertPack
(
p
ack
);
public
int
insertPack
(
SPack
SP
ack
)
{
SP
ack
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
packMapper
.
insertPack
(
SP
ack
);
}
/**
* 修改套餐
*
* @param
p
ack 套餐
* @param
SP
ack 套餐
* @return 结果
*/
@Override
public
int
updatePack
(
Pack
p
ack
)
{
p
ack
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
packMapper
.
updatePack
(
p
ack
);
public
int
updatePack
(
SPack
SP
ack
)
{
SP
ack
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
packMapper
.
updatePack
(
SP
ack
);
}
/**
...
...
@@ -90,7 +91,9 @@ public class PackServiceImpl extends ServiceImpl<PackMapper, Pack> implements IP
}
@Override
public
List
<
Pack
>
selectPackListByIds
(
List
<
Long
>
packIds
)
{
return
packMapper
.
selectBatchIds
(
packIds
);
public
List
<
SPack
>
selectPackListByIds
(
List
<
Long
>
packIds
)
{
LambdaQueryWrapper
<
SPack
>
queryWrapper
=
new
LambdaQueryWrapper
();
queryWrapper
.
in
(
SPack:
:
getId
,
packIds
);
return
packMapper
.
selectList
(
queryWrapper
);
}
}
share-system/src/main/java/share/system/service/impl/RoomPackServiceImpl.java
View file @
fdf6859e
package
share
.
system
.
service
.
impl
;
import
java.sql.Wrapper
;
import
java.util.List
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
share.common.utils.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
share.system.domain.SCleanRecords
;
import
share.system.mapper.RoomPackMapper
;
import
share.system.domain.RoomPack
;
import
share.system.domain.
S
RoomPack
;
import
share.system.service.IRoomPackService
;
/**
...
...
@@ -21,7 +18,7 @@ import share.system.service.IRoomPackService;
* @date 2023-10-31
*/
@Service
public
class
RoomPackServiceImpl
extends
ServiceImpl
<
RoomPackMapper
,
RoomPack
>
implements
IRoomPackService
{
public
class
RoomPackServiceImpl
extends
ServiceImpl
<
RoomPackMapper
,
S
RoomPack
>
implements
IRoomPackService
{
@Autowired
private
RoomPackMapper
roomPackMapper
;
...
...
@@ -32,43 +29,43 @@ public class RoomPackServiceImpl extends ServiceImpl<RoomPackMapper, RoomPack> i
* @return 包房套餐关系
*/
@Override
public
RoomPack
selectRoomPackById
(
Long
id
)
{
public
S
RoomPack
selectRoomPackById
(
Long
id
)
{
return
roomPackMapper
.
selectRoomPackById
(
id
);
}
/**
* 查询包房套餐关系列表
*
* @param
r
oomPack 包房套餐关系
* @param
SR
oomPack 包房套餐关系
* @return 包房套餐关系
*/
@Override
public
List
<
RoomPack
>
selectRoomPackList
(
RoomPack
r
oomPack
)
{
return
roomPackMapper
.
selectRoomPackList
(
r
oomPack
);
public
List
<
SRoomPack
>
selectRoomPackList
(
SRoomPack
SR
oomPack
)
{
return
roomPackMapper
.
selectRoomPackList
(
SR
oomPack
);
}
/**
* 新增包房套餐关系
*
* @param
r
oomPack 包房套餐关系
* @param
SR
oomPack 包房套餐关系
* @return 结果
*/
@Override
public
int
insertRoomPack
(
RoomPack
r
oomPack
)
{
r
oomPack
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
roomPackMapper
.
insertRoomPack
(
r
oomPack
);
public
int
insertRoomPack
(
SRoomPack
SR
oomPack
)
{
SR
oomPack
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
roomPackMapper
.
insertRoomPack
(
SR
oomPack
);
}
/**
* 修改包房套餐关系
*
* @param
r
oomPack 包房套餐关系
* @param
SR
oomPack 包房套餐关系
* @return 结果
*/
@Override
public
int
updateRoomPack
(
RoomPack
r
oomPack
)
{
r
oomPack
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
roomPackMapper
.
updateRoomPack
(
r
oomPack
);
public
int
updateRoomPack
(
SRoomPack
SR
oomPack
)
{
SR
oomPack
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
roomPackMapper
.
updateRoomPack
(
SR
oomPack
);
}
/**
...
...
@@ -100,8 +97,16 @@ public class RoomPackServiceImpl extends ServiceImpl<RoomPackMapper, RoomPack> i
@Override
public
int
deleteRoomPackByRoomId
(
Long
id
)
{
LambdaQueryWrapper
<
RoomPack
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
RoomPack:
:
getRoomId
,
id
);
LambdaQueryWrapper
<
S
RoomPack
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
S
RoomPack:
:
getRoomId
,
id
);
return
roomPackMapper
.
delete
(
queryWrapper
);
}
@Override
public
List
<
SRoomPack
>
selectRoomPackByPackId
(
Long
id
)
{
LambdaQueryWrapper
<
SRoomPack
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
SRoomPack:
:
getPackId
,
id
);
return
roomPackMapper
.
selectList
(
queryWrapper
);
}
}
share-system/src/main/java/share/system/service/impl/SRoomServiceImpl.java
View file @
fdf6859e
...
...
@@ -11,8 +11,8 @@ 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.RoomPack
;
import
share.system.domain.
S
Pack
;
import
share.system.domain.
S
RoomPack
;
import
share.system.domain.SConsumer
;
import
share.system.domain.vo.FrontTokenComponent
;
import
share.system.domain.vo.SRoomVo
;
...
...
@@ -54,6 +54,7 @@ public class SRoomServiceImpl extends ServiceImpl<SRoomMapper,SRoom> implements
public
SRoomVo
selectSRoomById
(
Long
id
)
{
SRoom
sRoom
=
sRoomMapper
.
selectSRoomById
(
id
);
sRoom
.
setPackIds
(
roomPackService
.
selectPackListByRoomId
(
id
).
stream
().
map
(
String:
:
valueOf
).
collect
(
Collectors
.
joining
(
","
)));
if
(
Objects
.
nonNull
(
sRoom
)&&
sRoom
.
getId
()!=
null
){
return
convertVoList
(
new
ArrayList
<
SRoom
>(){{
add
(
sRoom
);}}).
get
(
0
);
}
...
...
@@ -70,6 +71,9 @@ public class SRoomServiceImpl extends ServiceImpl<SRoomMapper,SRoom> implements
public
List
<
SRoomVo
>
selectSRoomList
(
SRoom
sRoom
)
{
List
<
SRoom
>
roomList
=
sRoomMapper
.
selectSRoomList
(
sRoom
);
roomList
.
forEach
(
o
->
{
o
.
setPackIds
(
roomPackService
.
selectPackListByRoomId
(
o
.
getId
()).
stream
().
map
(
String:
:
valueOf
).
collect
(
Collectors
.
joining
(
","
)));
});
return
convertVoList
(
roomList
);
}
...
...
@@ -101,25 +105,32 @@ public class SRoomServiceImpl extends ServiceImpl<SRoomMapper,SRoom> implements
@Override
public
int
insertSRoom
(
SRoom
sRoom
)
{
//判断套餐ID
if
(
sRoom
.
getPackIds
().
length
>
0
)
{
List
<
Pack
>
packList
=
packService
.
selectPackListByIds
(
Arrays
.
asList
(
sRoom
.
getPackIds
()));
if
(
CollectionUtils
.
isEmpty
(
packList
))
{
throw
new
RuntimeException
(
"套餐不存在"
);
int
i
=
0
;
try
{
sRoom
.
setCreateTime
(
DateUtils
.
getNowDate
());
i
=
sRoomMapper
.
insertSRoom
(
sRoom
);
//判断套餐ID
if
(!
sRoom
.
getPackIds
().
isEmpty
())
{
//String 转Long
List
<
SPack
>
SPackList
=
packService
.
selectPackListByIds
(
Arrays
.
asList
(
sRoom
.
getPackIds
().
split
(
","
)).
stream
().
map
(
Long:
:
valueOf
).
collect
(
Collectors
.
toList
()));
if
(
CollectionUtils
.
isEmpty
(
SPackList
))
{
throw
new
RuntimeException
(
"套餐不存在"
);
}
List
<
Long
>
list
=
Arrays
.
asList
(
sRoom
.
getPackIds
().
split
(
","
)).
stream
().
map
(
Long:
:
valueOf
).
collect
(
Collectors
.
toList
());
List
<
SRoomPack
>
SRoomPackList
=
new
ArrayList
<>();
list
.
stream
().
forEach
(
o
->
{
SRoomPack
SRoomPack
=
new
SRoomPack
();
SRoomPack
.
setPackId
(
o
);
SRoomPack
.
setRoomId
(
sRoom
.
getId
());
SRoomPack
.
setCreateTime
(
DateUtils
.
getNowDate
());
SRoomPackList
.
add
(
SRoomPack
);
});
roomPackService
.
saveBatch
(
SRoomPackList
);
}
List
<
Long
>
list
=
Arrays
.
asList
(
sRoom
.
getPackIds
());
List
<
RoomPack
>
roomPackList
=
new
ArrayList
<>();
list
.
stream
().
forEach
(
o
->
{
RoomPack
roomPack
=
new
RoomPack
();
roomPack
.
setPackId
(
o
);
roomPack
.
setRoomId
(
sRoom
.
getId
());
roomPack
.
setCreateTime
(
DateUtils
.
getNowDate
());
roomPackList
.
add
(
roomPack
);
});
roomPackService
.
saveBatch
(
roomPackList
);
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"新增房间失败"
);
}
sRoom
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
sRoomMapper
.
insertSRoom
(
sRoom
);
return
i
;
}
/**
...
...
@@ -132,24 +143,24 @@ public class SRoomServiceImpl extends ServiceImpl<SRoomMapper,SRoom> implements
public
int
updateSRoom
(
SRoom
sRoom
)
{
//判断套餐ID
if
(
sRoom
.
getPackIds
().
length
>
0
)
{
if
(
!
sRoom
.
getPackIds
().
isEmpty
()
)
{
//判断套餐ID
List
<
Pack
>
packList
=
packService
.
selectPackListByIds
(
Arrays
.
asList
(
sRoom
.
getPackIds
()));
if
(
CollectionUtils
.
isEmpty
(
p
ackList
))
{
List
<
SPack
>
SPackList
=
packService
.
selectPackListByIds
(
Arrays
.
asList
(
sRoom
.
getPackIds
().
split
(
","
)).
stream
().
map
(
Long:
:
valueOf
).
collect
(
Collectors
.
toList
()));
if
(
CollectionUtils
.
isEmpty
(
SP
ackList
))
{
throw
new
RuntimeException
(
"套餐不存在"
);
}
//删除原有套餐
roomPackService
.
deleteRoomPackByRoomId
(
sRoom
.
getId
());
List
<
Long
>
list
=
Arrays
.
asList
(
sRoom
.
getPackIds
());
List
<
RoomPack
>
r
oomPackList
=
new
ArrayList
<>();
List
<
Long
>
list
=
Arrays
.
asList
(
sRoom
.
getPackIds
()
.
split
(
","
)).
stream
().
map
(
Long:
:
valueOf
).
collect
(
Collectors
.
toList
()
);
List
<
SRoomPack
>
SR
oomPackList
=
new
ArrayList
<>();
list
.
stream
().
forEach
(
o
->
{
RoomPack
roomPack
=
new
RoomPack
();
r
oomPack
.
setPackId
(
o
);
r
oomPack
.
setRoomId
(
sRoom
.
getId
());
r
oomPack
.
setCreateTime
(
DateUtils
.
getNowDate
());
roomPackList
.
add
(
r
oomPack
);
SRoomPack
SRoomPack
=
new
S
RoomPack
();
SR
oomPack
.
setPackId
(
o
);
SR
oomPack
.
setRoomId
(
sRoom
.
getId
());
SR
oomPack
.
setCreateTime
(
DateUtils
.
getNowDate
());
SRoomPackList
.
add
(
SR
oomPack
);
});
roomPackService
.
saveBatch
(
r
oomPackList
);
roomPackService
.
saveBatch
(
SR
oomPackList
);
}
sRoom
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
sRoomMapper
.
updateSRoom
(
sRoom
);
...
...
@@ -223,7 +234,7 @@ public class SRoomServiceImpl extends ServiceImpl<SRoomMapper,SRoom> implements
}
@Override
public
List
<
Pack
>
getPackByRoomId
(
Long
id
)
{
public
List
<
S
Pack
>
getPackByRoomId
(
Long
id
)
{
List
<
Long
>
packIds
=
roomPackService
.
selectPackListByRoomId
(
id
);
return
packService
.
selectPackListByIds
(
packIds
);
}
...
...
share-system/src/main/resources/mapper/system/PackMapper.xml
View file @
fdf6859e
...
...
@@ -4,7 +4,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"share.system.mapper.PackMapper"
>
<resultMap
type=
"Pack"
id=
"PackResult"
>
<resultMap
type=
"
S
Pack"
id=
"PackResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"name"
column=
"name"
/>
<result
property=
"duration"
column=
"duration"
/>
...
...
@@ -33,7 +33,7 @@
from s_pack
</sql>
<select
id=
"selectPackList"
parameterType=
"Pack"
resultMap=
"PackResult"
>
<select
id=
"selectPackList"
parameterType=
"
S
Pack"
resultMap=
"PackResult"
>
<include
refid=
"selectPackVo"
/>
<where>
<if
test=
"name != null and name != ''"
>
and name like concat('%', #{name}, '%')
</if>
...
...
@@ -51,7 +51,7 @@
where id = #{id}
</select>
<insert
id=
"insertPack"
parameterType=
"Pack"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
<insert
id=
"insertPack"
parameterType=
"
S
Pack"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into s_pack
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"name != null"
>
name,
</if>
...
...
@@ -79,7 +79,7 @@
</trim>
</insert>
<update
id=
"updatePack"
parameterType=
"Pack"
>
<update
id=
"updatePack"
parameterType=
"
S
Pack"
>
update s_pack
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"name != null"
>
name = #{name},
</if>
...
...
share-system/src/main/resources/mapper/system/RoomPackMapper.xml
View file @
fdf6859e
...
...
@@ -4,7 +4,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"share.system.mapper.RoomPackMapper"
>
<resultMap
type=
"RoomPack"
id=
"RoomPackResult"
>
<resultMap
type=
"
S
RoomPack"
id=
"RoomPackResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"roomId"
column=
"room_id"
/>
<result
property=
"packId"
column=
"pack_id"
/>
...
...
@@ -27,7 +27,7 @@
from s_room_pack
</sql>
<select
id=
"selectRoomPackList"
parameterType=
"RoomPack"
resultMap=
"RoomPackResult"
>
<select
id=
"selectRoomPackList"
parameterType=
"
S
RoomPack"
resultMap=
"RoomPackResult"
>
<include
refid=
"selectRoomPackVo"
/>
<where>
<if
test=
"roomId != null "
>
and room_id = #{roomId}
</if>
...
...
@@ -45,7 +45,7 @@
where room_id = #{roomId}
</select>
<insert
id=
"insertRoomPack"
parameterType=
"RoomPack"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
<insert
id=
"insertRoomPack"
parameterType=
"
S
RoomPack"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into s_room_pack
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"roomId != null"
>
room_id,
</if>
...
...
@@ -67,7 +67,7 @@
</trim>
</insert>
<update
id=
"updateRoomPack"
parameterType=
"RoomPack"
>
<update
id=
"updateRoomPack"
parameterType=
"
S
RoomPack"
>
update s_room_pack
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"roomId != null"
>
room_id = #{roomId},
</if>
...
...
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