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
d085da08
Commit
d085da08
authored
Nov 23, 2023
by
YG8999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页查询过慢,bug修复
parent
161f230d
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
96 additions
and
20 deletions
+96
-20
SRoomController.java
...ain/java/share/web/controller/system/SRoomController.java
+3
-3
SRoomController.java
...ain/java/share/web/controller/system/SRoomController.java
+1
-1
Device.java
share-system/src/main/java/share/system/domain/Device.java
+3
-0
DeviceGateway.java
...stem/src/main/java/share/system/domain/DeviceGateway.java
+3
-0
DeviceLog.java
...e-system/src/main/java/share/system/domain/DeviceLog.java
+3
-0
Protocol.java
share-system/src/main/java/share/system/domain/Protocol.java
+3
-0
SCleanRecords.java
...stem/src/main/java/share/system/domain/SCleanRecords.java
+3
-0
SConsumer.java
...e-system/src/main/java/share/system/domain/SConsumer.java
+4
-1
SConsumerCoupon.java
...em/src/main/java/share/system/domain/SConsumerCoupon.java
+4
-0
SConsumptionRecords.java
...rc/main/java/share/system/domain/SConsumptionRecords.java
+4
-0
SCoupon.java
share-system/src/main/java/share/system/domain/SCoupon.java
+4
-0
SOrder.java
share-system/src/main/java/share/system/domain/SOrder.java
+3
-0
SPack.java
share-system/src/main/java/share/system/domain/SPack.java
+3
-0
SRoom.java
share-system/src/main/java/share/system/domain/SRoom.java
+7
-1
SRoomPack.java
...e-system/src/main/java/share/system/domain/SRoomPack.java
+3
-0
SStore.java
share-system/src/main/java/share/system/domain/SStore.java
+3
-0
SOrderVo.java
...system/src/main/java/share/system/domain/vo/SOrderVo.java
+3
-0
RoomPackMapper.java
...tem/src/main/java/share/system/mapper/RoomPackMapper.java
+1
-0
SRoomMapper.java
...system/src/main/java/share/system/mapper/SRoomMapper.java
+1
-0
ISRoomService.java
...tem/src/main/java/share/system/service/ISRoomService.java
+1
-1
SRoomServiceImpl.java
...main/java/share/system/service/impl/SRoomServiceImpl.java
+11
-11
SStoreServiceImpl.java
...ain/java/share/system/service/impl/SStoreServiceImpl.java
+25
-2
No files found.
share-admin/src/main/java/share/web/controller/system/SRoomController.java
View file @
d085da08
...
@@ -44,7 +44,7 @@ public class SRoomController extends BaseController
...
@@ -44,7 +44,7 @@ public class SRoomController extends BaseController
public
TableDataInfo
list
(
SRoom
sRoom
)
public
TableDataInfo
list
(
SRoom
sRoom
)
{
{
startPage
();
startPage
();
List
<
SRoom
Vo
>
list
=
sRoomService
.
selectSRoomList
(
sRoom
);
List
<
SRoom
>
list
=
sRoomService
.
selectSRoomList
(
sRoom
);
return
getDataTable
(
list
);
return
getDataTable
(
list
);
}
}
...
@@ -56,8 +56,8 @@ public class SRoomController extends BaseController
...
@@ -56,8 +56,8 @@ public class SRoomController extends BaseController
@PostMapping
(
"/export"
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
SRoom
sRoom
)
public
void
export
(
HttpServletResponse
response
,
SRoom
sRoom
)
{
{
List
<
SRoom
Vo
>
list
=
sRoomService
.
selectSRoomList
(
sRoom
);
List
<
SRoom
>
list
=
sRoomService
.
selectSRoomList
(
sRoom
);
ExcelUtil
<
SRoom
Vo
>
util
=
new
ExcelUtil
<
SRoomVo
>(
SRoomVo
.
class
);
ExcelUtil
<
SRoom
>
util
=
new
ExcelUtil
<
SRoom
>(
SRoom
.
class
);
util
.
exportExcel
(
response
,
list
,
"房间数据"
);
util
.
exportExcel
(
response
,
list
,
"房间数据"
);
}
}
...
...
share-front/src/main/java/share/web/controller/system/SRoomController.java
View file @
d085da08
...
@@ -46,7 +46,7 @@ public class SRoomController extends BaseController {
...
@@ -46,7 +46,7 @@ public class SRoomController extends BaseController {
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
SRoom
sRoom
)
{
public
TableDataInfo
list
(
SRoom
sRoom
)
{
startPage
();
startPage
();
List
<
SRoom
Vo
>
list
=
sRoomService
.
selectSRoomList
(
sRoom
);
List
<
SRoom
>
list
=
sRoomService
.
selectSRoomList
(
sRoom
);
return
getDataTable
(
list
);
return
getDataTable
(
list
);
}
}
...
...
share-system/src/main/java/share/system/domain/Device.java
View file @
d085da08
package
share
.
system
.
domain
;
package
share
.
system
.
domain
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
share.common.annotation.Excel
;
import
share.common.annotation.Excel
;
...
@@ -19,6 +21,7 @@ public class Device extends BaseEntity
...
@@ -19,6 +21,7 @@ public class Device extends BaseEntity
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/** $column.columnComment */
/** $column.columnComment */
@TableId
(
type
=
IdType
.
AUTO
)
private
Long
id
;
private
Long
id
;
/** 设备名称 */
/** 设备名称 */
...
...
share-system/src/main/java/share/system/domain/DeviceGateway.java
View file @
d085da08
package
share
.
system
.
domain
;
package
share
.
system
.
domain
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
share.common.annotation.Excel
;
import
share.common.annotation.Excel
;
...
@@ -19,6 +21,7 @@ public class DeviceGateway extends BaseEntity
...
@@ -19,6 +21,7 @@ public class DeviceGateway extends BaseEntity
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/** $column.columnComment */
/** $column.columnComment */
@TableId
(
type
=
IdType
.
AUTO
)
private
Long
id
;
private
Long
id
;
/** 设备名称 */
/** 设备名称 */
...
...
share-system/src/main/java/share/system/domain/DeviceLog.java
View file @
d085da08
package
share
.
system
.
domain
;
package
share
.
system
.
domain
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
share.common.annotation.Excel
;
import
share.common.annotation.Excel
;
...
@@ -19,6 +21,7 @@ public class DeviceLog extends BaseEntity
...
@@ -19,6 +21,7 @@ public class DeviceLog extends BaseEntity
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/** 主键 */
/** 主键 */
@TableId
(
type
=
IdType
.
AUTO
)
private
Long
id
;
private
Long
id
;
/** 设备mac */
/** 设备mac */
...
...
share-system/src/main/java/share/system/domain/Protocol.java
View file @
d085da08
package
share
.
system
.
domain
;
package
share
.
system
.
domain
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
share.common.annotation.Excel
;
import
share.common.annotation.Excel
;
...
@@ -19,6 +21,7 @@ public class Protocol extends BaseEntity
...
@@ -19,6 +21,7 @@ public class Protocol extends BaseEntity
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/** 协议ID */
/** 协议ID */
@TableId
(
type
=
IdType
.
AUTO
)
private
Long
id
;
private
Long
id
;
/** 协议标题 */
/** 协议标题 */
...
...
share-system/src/main/java/share/system/domain/SCleanRecords.java
View file @
d085da08
...
@@ -2,7 +2,9 @@ package share.system.domain;
...
@@ -2,7 +2,9 @@ package share.system.domain;
import
java.util.Date
;
import
java.util.Date
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
...
@@ -20,6 +22,7 @@ public class SCleanRecords extends BaseEntity
...
@@ -20,6 +22,7 @@ public class SCleanRecords extends BaseEntity
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/** ID */
/** ID */
@TableId
(
type
=
IdType
.
AUTO
)
private
Long
id
;
private
Long
id
;
/** 门店ID */
/** 门店ID */
...
...
share-system/src/main/java/share/system/domain/SConsumer.java
View file @
d085da08
...
@@ -4,7 +4,9 @@ import java.io.Serializable;
...
@@ -4,7 +4,9 @@ import java.io.Serializable;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
com.fasterxml.jackson.databind.ser.std.ToStringSerializer
;
import
com.fasterxml.jackson.databind.ser.std.ToStringSerializer
;
...
@@ -19,12 +21,13 @@ import share.common.core.domain.BaseEntity;
...
@@ -19,12 +21,13 @@ import share.common.core.domain.BaseEntity;
* @date 2023-09-27
* @date 2023-09-27
*/
*/
@Data
@Data
public
class
SConsumer
public
class
SConsumer
implements
Serializable
{
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/** 会员用户ID */
/** 会员用户ID */
@JsonSerialize
(
using
=
ToStringSerializer
.
class
)
@JsonSerialize
(
using
=
ToStringSerializer
.
class
)
@TableId
(
type
=
IdType
.
AUTO
)
private
Long
id
;
private
Long
id
;
@ApiModelProperty
(
value
=
"用户账号"
)
@ApiModelProperty
(
value
=
"用户账号"
)
...
...
share-system/src/main/java/share/system/domain/SConsumerCoupon.java
View file @
d085da08
...
@@ -2,6 +2,9 @@ package share.system.domain;
...
@@ -2,6 +2,9 @@ package share.system.domain;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
...
@@ -22,6 +25,7 @@ public class SConsumerCoupon extends BaseEntity
...
@@ -22,6 +25,7 @@ public class SConsumerCoupon extends BaseEntity
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/** ID */
/** ID */
@TableId
(
type
=
IdType
.
AUTO
)
private
Long
id
;
private
Long
id
;
/** 用户ID */
/** 用户ID */
...
...
share-system/src/main/java/share/system/domain/SConsumptionRecords.java
View file @
d085da08
package
share
.
system
.
domain
;
package
share
.
system
.
domain
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
share.common.annotation.Excel
;
import
share.common.annotation.Excel
;
...
@@ -17,6 +20,7 @@ public class SConsumptionRecords extends BaseEntity
...
@@ -17,6 +20,7 @@ public class SConsumptionRecords extends BaseEntity
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/** ID */
/** ID */
@TableId
(
type
=
IdType
.
AUTO
)
private
Long
id
;
private
Long
id
;
/** 会员用户ID */
/** 会员用户ID */
...
...
share-system/src/main/java/share/system/domain/SCoupon.java
View file @
d085da08
...
@@ -2,6 +2,9 @@ package share.system.domain;
...
@@ -2,6 +2,9 @@ package share.system.domain;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
lombok.Data
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
...
@@ -21,6 +24,7 @@ public class SCoupon extends BaseEntity
...
@@ -21,6 +24,7 @@ public class SCoupon extends BaseEntity
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/** 优惠券ID */
/** 优惠券ID */
@TableId
(
type
=
IdType
.
AUTO
)
private
Long
id
;
private
Long
id
;
/** 优惠券名称 */
/** 优惠券名称 */
...
...
share-system/src/main/java/share/system/domain/SOrder.java
View file @
d085da08
...
@@ -3,7 +3,9 @@ package share.system.domain;
...
@@ -3,7 +3,9 @@ package share.system.domain;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableLogic
;
import
com.baomidou.mybatisplus.annotation.TableLogic
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
...
@@ -27,6 +29,7 @@ public class SOrder extends BaseEntity
...
@@ -27,6 +29,7 @@ public class SOrder extends BaseEntity
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/** 订单ID */
/** 订单ID */
@TableId
(
type
=
IdType
.
AUTO
)
private
Long
id
;
private
Long
id
;
/** 订单流水号 */
/** 订单流水号 */
...
...
share-system/src/main/java/share/system/domain/SPack.java
View file @
d085da08
...
@@ -2,6 +2,8 @@ package share.system.domain;
...
@@ -2,6 +2,8 @@ package share.system.domain;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
share.common.annotation.Excel
;
import
share.common.annotation.Excel
;
...
@@ -21,6 +23,7 @@ public class SPack extends BaseEntity {
...
@@ -21,6 +23,7 @@ public class SPack extends BaseEntity {
/**
/**
* ID
* ID
*/
*/
@TableId
(
type
=
IdType
.
AUTO
)
private
Long
id
;
private
Long
id
;
/**
/**
...
...
share-system/src/main/java/share/system/domain/SRoom.java
View file @
d085da08
package
share
.
system
.
domain
;
package
share
.
system
.
domain
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
...
@@ -22,6 +25,7 @@ public class SRoom extends BaseEntity
...
@@ -22,6 +25,7 @@ public class SRoom extends BaseEntity
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/** 房间ID */
/** 房间ID */
@TableId
(
type
=
IdType
.
AUTO
)
private
Long
id
;
private
Long
id
;
/** 门店ID */
/** 门店ID */
...
@@ -107,6 +111,8 @@ public class SRoom extends BaseEntity
...
@@ -107,6 +111,8 @@ public class SRoom extends BaseEntity
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
Long
recordsId
;
private
Long
recordsId
;
/** 门店名称 */
@TableField
(
exist
=
false
)
private
String
storeName
;
}
}
share-system/src/main/java/share/system/domain/SRoomPack.java
View file @
d085da08
package
share
.
system
.
domain
;
package
share
.
system
.
domain
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
share.common.annotation.Excel
;
import
share.common.annotation.Excel
;
...
@@ -20,6 +22,7 @@ public class SRoomPack extends BaseEntity {
...
@@ -20,6 +22,7 @@ public class SRoomPack extends BaseEntity {
/**
/**
* ID
* ID
*/
*/
@TableId
(
type
=
IdType
.
AUTO
)
private
Long
id
;
private
Long
id
;
/**
/**
...
...
share-system/src/main/java/share/system/domain/SStore.java
View file @
d085da08
package
share
.
system
.
domain
;
package
share
.
system
.
domain
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
...
@@ -21,6 +23,7 @@ public class SStore extends BaseEntity
...
@@ -21,6 +23,7 @@ public class SStore extends BaseEntity
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/** 门店ID */
/** 门店ID */
@TableId
(
type
=
IdType
.
AUTO
)
private
Long
id
;
private
Long
id
;
/** 门店名称 */
/** 门店名称 */
...
...
share-system/src/main/java/share/system/domain/vo/SOrderVo.java
View file @
d085da08
package
share
.
system
.
domain
.
vo
;
package
share
.
system
.
domain
.
vo
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
...
@@ -27,6 +29,7 @@ public class SOrderVo
...
@@ -27,6 +29,7 @@ public class SOrderVo
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/** 订单ID */
/** 订单ID */
@TableId
(
type
=
IdType
.
AUTO
)
private
Long
id
;
private
Long
id
;
/** 订单流水号 */
/** 订单流水号 */
...
...
share-system/src/main/java/share/system/mapper/RoomPackMapper.java
View file @
d085da08
...
@@ -61,4 +61,5 @@ public interface RoomPackMapper extends BaseMapper<SRoomPack> {
...
@@ -61,4 +61,5 @@ public interface RoomPackMapper extends BaseMapper<SRoomPack> {
public
int
deleteRoomPackByIds
(
Long
[]
ids
);
public
int
deleteRoomPackByIds
(
Long
[]
ids
);
List
<
Long
>
selectPackListByRoomId
(
Long
id
);
List
<
Long
>
selectPackListByRoomId
(
Long
id
);
}
}
share-system/src/main/java/share/system/mapper/SRoomMapper.java
View file @
d085da08
...
@@ -4,6 +4,7 @@ import java.util.List;
...
@@ -4,6 +4,7 @@ import java.util.List;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
share.system.domain.SRoom
;
import
share.system.domain.SRoom
;
import
share.system.domain.vo.SRoomVo
;
/**
/**
* 房间Mapper接口
* 房间Mapper接口
...
...
share-system/src/main/java/share/system/service/ISRoomService.java
View file @
d085da08
...
@@ -31,7 +31,7 @@ public interface ISRoomService extends IService<SRoom>
...
@@ -31,7 +31,7 @@ public interface ISRoomService extends IService<SRoom>
* @param sRoom 房间
* @param sRoom 房间
* @return 房间集合
* @return 房间集合
*/
*/
public
List
<
SRoom
Vo
>
selectSRoomList
(
SRoom
sRoom
);
public
List
<
SRoom
>
selectSRoomList
(
SRoom
sRoom
);
/**
/**
* 新增房间
* 新增房间
...
...
share-system/src/main/java/share/system/service/impl/SRoomServiceImpl.java
View file @
d085da08
...
@@ -3,6 +3,7 @@ package share.system.service.impl;
...
@@ -3,6 +3,7 @@ package share.system.service.impl;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
cn.hutool.core.util.StrUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
...
@@ -60,9 +61,12 @@ public class SRoomServiceImpl extends ServiceImpl<SRoomMapper, SRoom> implements
...
@@ -60,9 +61,12 @@ public class SRoomServiceImpl extends ServiceImpl<SRoomMapper, SRoom> implements
SRoom
sRoom
=
sRoomMapper
.
selectSRoomById
(
id
);
SRoom
sRoom
=
sRoomMapper
.
selectSRoomById
(
id
);
sRoom
.
setPackIds
(
roomPackService
.
selectPackListByRoomId
(
id
).
stream
().
map
(
String:
:
valueOf
).
collect
(
Collectors
.
joining
(
","
)));
sRoom
.
setPackIds
(
roomPackService
.
selectPackListByRoomId
(
id
).
stream
().
map
(
String:
:
valueOf
).
collect
(
Collectors
.
joining
(
","
)));
if
(
Objects
.
nonNull
(
sRoom
)
&&
sRoom
.
getId
()
!=
null
)
{
if
(
Objects
.
nonNull
(
sRoom
)
&&
sRoom
.
getId
()
!=
null
)
{
return
convertVoList
(
new
ArrayList
<
SRoom
>()
{{
SRoom
room
=
convertVoList
(
new
ArrayList
<
SRoom
>()
{{
add
(
sRoom
);
add
(
sRoom
);
}}).
get
(
0
);
}}).
get
(
0
);
SRoomVo
sRoomVo
=
new
SRoomVo
();
BeanUtils
.
copyProperties
(
room
,
sRoomVo
);
return
sRoomVo
;
}
}
return
new
SRoomVo
();
return
new
SRoomVo
();
}
}
...
@@ -74,7 +78,7 @@ public class SRoomServiceImpl extends ServiceImpl<SRoomMapper, SRoom> implements
...
@@ -74,7 +78,7 @@ public class SRoomServiceImpl extends ServiceImpl<SRoomMapper, SRoom> implements
* @return 房间
* @return 房间
*/
*/
@Override
@Override
public
List
<
SRoom
Vo
>
selectSRoomList
(
SRoom
sRoom
)
{
public
List
<
SRoom
>
selectSRoomList
(
SRoom
sRoom
)
{
List
<
SRoom
>
roomList
=
sRoomMapper
.
selectSRoomList
(
sRoom
);
List
<
SRoom
>
roomList
=
sRoomMapper
.
selectSRoomList
(
sRoom
);
roomList
.
forEach
(
o
->
{
roomList
.
forEach
(
o
->
{
List
<
Long
>
roomId
=
roomPackService
.
selectPackListByRoomId
(
o
.
getId
());
List
<
Long
>
roomId
=
roomPackService
.
selectPackListByRoomId
(
o
.
getId
());
...
@@ -84,23 +88,19 @@ public class SRoomServiceImpl extends ServiceImpl<SRoomMapper, SRoom> implements
...
@@ -84,23 +88,19 @@ public class SRoomServiceImpl extends ServiceImpl<SRoomMapper, SRoom> implements
return
convertVoList
(
roomList
);
return
convertVoList
(
roomList
);
}
}
private
List
<
SRoomVo
>
convertVoList
(
List
<
SRoom
>
roomList
)
{
private
List
<
SRoom
>
convertVoList
(
List
<
SRoom
>
roomList
)
{
List
<
SRoomVo
>
voList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
roomList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
roomList
))
{
List
<
Long
>
storeIds
=
roomList
.
stream
().
map
(
SRoom:
:
getStoreId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
storeIds
=
roomList
.
stream
().
map
(
SRoom:
:
getStoreId
).
collect
(
Collectors
.
toList
());
List
<
Map
>
storeList
=
sStoreService
.
optionList
(
storeIds
);
List
<
Map
>
storeList
=
sStoreService
.
optionList
(
storeIds
);
roomList
.
stream
().
forEach
(
sRoom
->
{
roomList
.
stream
().
forEach
(
sRoom
->
{
SRoomVo
vo
=
new
SRoomVo
();
BeanUtils
.
copyProperties
(
sRoom
,
vo
);
storeList
.
stream
().
forEach
(
store
->
{
storeList
.
stream
().
forEach
(
store
->
{
if
(
vo
.
getStoreId
().
compareTo
(
Long
.
parseLong
(
store
.
get
(
"id"
).
toString
()))
==
0
)
{
if
(
sRoom
.
getStoreId
().
compareTo
(
Long
.
parseLong
(
store
.
get
(
"id"
).
toString
()))
==
0
)
{
vo
.
setStoreName
(
store
.
getOrDefault
(
"name"
,
""
).
toString
());
sRoom
.
setStoreName
(
store
.
getOrDefault
(
"name"
,
""
).
toString
());
}
}
});
});
voList
.
add
(
vo
);
});
});
}
}
return
vo
List
;
return
room
List
;
}
}
/**
/**
...
@@ -148,7 +148,7 @@ public class SRoomServiceImpl extends ServiceImpl<SRoomMapper, SRoom> implements
...
@@ -148,7 +148,7 @@ public class SRoomServiceImpl extends ServiceImpl<SRoomMapper, SRoom> implements
@Override
@Override
public
int
updateSRoom
(
SRoom
sRoom
)
{
public
int
updateSRoom
(
SRoom
sRoom
)
{
//判断套餐ID
//判断套餐ID
if
(!
sRoom
.
getPackIds
().
isEmpty
(
))
{
if
(!
StrUtil
.
isEmpty
(
sRoom
.
getPackIds
()
))
{
//判断套餐ID
//判断套餐ID
List
<
SPack
>
SPackList
=
packService
.
selectPackListByIds
(
Arrays
.
asList
(
sRoom
.
getPackIds
().
split
(
","
)).
stream
().
map
(
Long:
:
valueOf
).
collect
(
Collectors
.
toList
()));
List
<
SPack
>
SPackList
=
packService
.
selectPackListByIds
(
Arrays
.
asList
(
sRoom
.
getPackIds
().
split
(
","
)).
stream
().
map
(
Long:
:
valueOf
).
collect
(
Collectors
.
toList
()));
if
(
CollectionUtils
.
isEmpty
(
SPackList
))
{
if
(
CollectionUtils
.
isEmpty
(
SPackList
))
{
...
...
share-system/src/main/java/share/system/service/impl/SStoreServiceImpl.java
View file @
d085da08
...
@@ -231,10 +231,33 @@ public class SStoreServiceImpl extends ServiceImpl<SStoreMapper, SStore> impleme
...
@@ -231,10 +231,33 @@ public class SStoreServiceImpl extends ServiceImpl<SStoreMapper, SStore> impleme
if
(
CollectionUtils
.
isNotEmpty
(
voList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
voList
))
{
List
<
Long
>
storeIds
=
voList
.
stream
().
map
(
SStoreVo:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
storeIds
=
voList
.
stream
().
map
(
SStoreVo:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
SRoomVo
>
roomVoList
=
sRoomService
.
listByStoreIds
(
storeIds
);
List
<
SRoomVo
>
roomVoList
=
sRoomService
.
listByStoreIds
(
storeIds
);
List
<
Long
>
roomIds
=
new
ArrayList
<>();
roomVoList
.
stream
().
forEach
(
sRoomVo
->
{
roomIds
.
add
(
sRoomVo
.
getId
());
});
List
<
SRoomPack
>
roomPacks
=
roomPackMapper
.
selectBatchIds
(
roomIds
);
List
<
Long
>
packIds
=
new
ArrayList
<>();
roomPacks
.
stream
().
forEach
(
sRoomPack
->
{
packIds
.
add
(
sRoomPack
.
getPackId
());
});
List
<
SPack
>
packs
=
packService
.
selectPackListByIds
(
packIds
);
Map
<
Long
,
SPack
>
map
=
new
HashMap
<>();
packs
.
stream
().
forEach
(
sPack
->
{
map
.
put
(
sPack
.
getId
(),
sPack
);
});
roomVoList
.
stream
().
forEach
(
sRoomVo
->
{
List
<
SPack
>
sPacks
=
new
ArrayList
<>();
roomPacks
.
stream
().
forEach
(
sRoomPack
->
{
if
(
Long
.
compare
(
sRoomVo
.
getId
(),
sRoomPack
.
getRoomId
())
==
0
)
{
sPacks
.
add
(
map
.
get
(
sRoomPack
.
getPackId
()));
}
});
sRoomVo
.
setPackList
(
sPacks
);
});
voList
.
stream
().
forEach
(
storeVo
->
{
voList
.
stream
().
forEach
(
storeVo
->
{
storeVo
.
setRoomVoList
(
roomVoList
.
stream
().
filter
(
roomVo
->
{
storeVo
.
setRoomVoList
(
roomVoList
.
stream
().
filter
(
roomVo
->
{
List
<
Long
>
roomId
=
roomPackMapper
.
selectPackListByRoomId
(
roomVo
.
getId
());
//
List<Long> roomId = roomPackMapper.selectPackListByRoomId(roomVo.getId());
roomVo
.
setPackList
(
packService
.
selectPackListByIds
(
roomId
));
//
roomVo.setPackList(packService.selectPackListByIds(roomId));
if
(
Long
.
compare
(
roomVo
.
getStoreId
(),
storeVo
.
getId
())
==
0
)
{
if
(
Long
.
compare
(
roomVo
.
getStoreId
(),
storeVo
.
getId
())
==
0
)
{
return
true
;
return
true
;
}
}
...
...
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