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
5acd6ba5
Commit
5acd6ba5
authored
Nov 06, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单增加月卡,次卡信息
parent
3eab2782
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
118 additions
and
35 deletions
+118
-35
ConsumerMonthlyCard.java
...rc/main/java/share/system/domain/ConsumerMonthlyCard.java
+8
-0
ConsumerSecondaryCard.java
.../main/java/share/system/domain/ConsumerSecondaryCard.java
+8
-0
ConsumerMonthlyCardVo.java
...in/java/share/system/domain/vo/ConsumerMonthlyCardVo.java
+0
-6
ConsumerSecondaryCardVo.java
.../java/share/system/domain/vo/ConsumerSecondaryCardVo.java
+0
-6
SOrderVo.java
...system/src/main/java/share/system/domain/vo/SOrderVo.java
+18
-4
ConsumerMonthlyCardService.java
...java/share/system/service/ConsumerMonthlyCardService.java
+3
-0
ConsumerSecondaryCardService.java
...va/share/system/service/ConsumerSecondaryCardService.java
+3
-0
IPackService.java
...stem/src/main/java/share/system/service/IPackService.java
+1
-1
ISConsumerCouponService.java
...in/java/share/system/service/ISConsumerCouponService.java
+1
-1
ISRoomService.java
...tem/src/main/java/share/system/service/ISRoomService.java
+1
-1
ConsumerMonthlyCardServiceImpl.java
...e/system/service/impl/ConsumerMonthlyCardServiceImpl.java
+11
-0
ConsumerSecondaryCardServiceImpl.java
...system/service/impl/ConsumerSecondaryCardServiceImpl.java
+13
-0
MonthlyCardOrderServiceImpl.java
...hare/system/service/impl/MonthlyCardOrderServiceImpl.java
+2
-0
PackServiceImpl.java
.../main/java/share/system/service/impl/PackServiceImpl.java
+1
-1
SConsumerCouponServiceImpl.java
...share/system/service/impl/SConsumerCouponServiceImpl.java
+1
-1
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+31
-3
SRoomServiceImpl.java
...main/java/share/system/service/impl/SRoomServiceImpl.java
+1
-1
SecondaryCardOrderServiceImpl.java
...re/system/service/impl/SecondaryCardOrderServiceImpl.java
+2
-0
ConsumerMonthlyCardMapper.xml
...ain/resources/mapper/system/ConsumerMonthlyCardMapper.xml
+7
-5
ConsumerSecondaryCardMapper.xml
...n/resources/mapper/system/ConsumerSecondaryCardMapper.xml
+6
-5
No files found.
share-system/src/main/java/share/system/domain/ConsumerMonthlyCard.java
View file @
5acd6ba5
...
@@ -34,6 +34,14 @@ public class ConsumerMonthlyCard extends BaseEntity {
...
@@ -34,6 +34,14 @@ public class ConsumerMonthlyCard extends BaseEntity {
@Excel
(
name
=
"月卡配置表id"
)
@Excel
(
name
=
"月卡配置表id"
)
private
Long
monthlyCardConfId
;
private
Long
monthlyCardConfId
;
//配置名称
@Excel
(
name
=
"月卡配置名称"
)
private
String
confName
;
//月卡金额
@Excel
(
name
=
"月卡金额"
)
private
BigDecimal
confAmount
;
/**
/**
* 用户ID
* 用户ID
*/
*/
...
...
share-system/src/main/java/share/system/domain/ConsumerSecondaryCard.java
View file @
5acd6ba5
...
@@ -32,6 +32,14 @@ public class ConsumerSecondaryCard extends BaseEntity {
...
@@ -32,6 +32,14 @@ public class ConsumerSecondaryCard extends BaseEntity {
@Excel
(
name
=
"次卡配置表id"
)
@Excel
(
name
=
"次卡配置表id"
)
private
Long
secondaryCardConfId
;
private
Long
secondaryCardConfId
;
//配置名称
@Excel
(
name
=
"次卡配置名称"
)
private
String
confName
;
//月卡金额
@Excel
(
name
=
"次卡金额"
)
private
BigDecimal
confAmount
;
/**
/**
* 用户ID
* 用户ID
*/
*/
...
...
share-system/src/main/java/share/system/domain/vo/ConsumerMonthlyCardVo.java
View file @
5acd6ba5
...
@@ -3,16 +3,10 @@ package share.system.domain.vo;
...
@@ -3,16 +3,10 @@ package share.system.domain.vo;
import
lombok.Data
;
import
lombok.Data
;
import
share.system.domain.ConsumerMonthlyCard
;
import
share.system.domain.ConsumerMonthlyCard
;
import
java.math.BigDecimal
;
@Data
@Data
public
class
ConsumerMonthlyCardVo
extends
ConsumerMonthlyCard
{
public
class
ConsumerMonthlyCardVo
extends
ConsumerMonthlyCard
{
//用户昵称
//用户昵称
private
String
nickName
;
private
String
nickName
;
//用户头像
//用户头像
private
String
avatar
;
private
String
avatar
;
//配置名称
private
String
confName
;
//月卡金额
private
BigDecimal
confAmount
;
}
}
share-system/src/main/java/share/system/domain/vo/ConsumerSecondaryCardVo.java
View file @
5acd6ba5
...
@@ -3,18 +3,12 @@ package share.system.domain.vo;
...
@@ -3,18 +3,12 @@ package share.system.domain.vo;
import
lombok.Data
;
import
lombok.Data
;
import
share.system.domain.ConsumerSecondaryCard
;
import
share.system.domain.ConsumerSecondaryCard
;
import
java.math.BigDecimal
;
@Data
@Data
public
class
ConsumerSecondaryCardVo
extends
ConsumerSecondaryCard
{
public
class
ConsumerSecondaryCardVo
extends
ConsumerSecondaryCard
{
//用户昵称
//用户昵称
private
String
nickName
;
private
String
nickName
;
//用户头像
//用户头像
private
String
avatar
;
private
String
avatar
;
//配置名称
private
String
confName
;
//次卡金额
private
BigDecimal
confAmount
;
//是否适用当前套餐
//是否适用当前套餐
private
Integer
isUse
;
private
Integer
isUse
;
//原因
//原因
...
...
share-system/src/main/java/share/system/domain/vo/SOrderVo.java
View file @
5acd6ba5
...
@@ -103,6 +103,24 @@ public class SOrderVo
...
@@ -103,6 +103,24 @@ public class SOrderVo
@Excel
(
name
=
"优惠卷促销价"
)
@Excel
(
name
=
"优惠卷促销价"
)
private
BigDecimal
couponPayPrice
;
private
BigDecimal
couponPayPrice
;
@Excel
(
name
=
"次卡ID"
)
private
Long
secondaryCardId
;
@Excel
(
name
=
"次卡名称"
)
private
String
secondaryCardName
;
@Excel
(
name
=
"次卡金额"
)
private
BigDecimal
secondaryCardAmount
;
@Excel
(
name
=
"月卡ID"
)
private
Long
monthlyCardId
;
@Excel
(
name
=
"月卡名称"
)
private
String
monthlyCardName
;
@Excel
(
name
=
"月卡金额"
)
private
BigDecimal
monthlyCardAmount
;
@ApiModelProperty
(
value
=
"订单总价"
)
@ApiModelProperty
(
value
=
"订单总价"
)
@Excel
(
name
=
"订单总价"
)
@Excel
(
name
=
"订单总价"
)
private
BigDecimal
totalPrice
;
private
BigDecimal
totalPrice
;
...
@@ -283,11 +301,7 @@ public class SOrderVo
...
@@ -283,11 +301,7 @@ public class SOrderVo
@ApiModelProperty
(
name
=
"是否可以申请退款"
)
@ApiModelProperty
(
name
=
"是否可以申请退款"
)
private
Boolean
isRefund
;
private
Boolean
isRefund
;
@Excel
(
name
=
"次卡ID"
)
private
Long
secondaryCardId
;
@Excel
(
name
=
"月卡ID"
)
private
Long
monthlyCardId
;
@Excel
(
name
=
"历史订单号"
)
@Excel
(
name
=
"历史订单号"
)
private
String
historicalOrderNo
;
private
String
historicalOrderNo
;
...
...
share-system/src/main/java/share/system/service/ConsumerMonthlyCardService.java
View file @
5acd6ba5
...
@@ -5,6 +5,7 @@ import share.system.domain.ConsumerMonthlyCard;
...
@@ -5,6 +5,7 @@ import share.system.domain.ConsumerMonthlyCard;
import
share.system.domain.vo.ConsumerMonthlyCardVo
;
import
share.system.domain.vo.ConsumerMonthlyCardVo
;
import
share.system.request.MonthlyCardRequest
;
import
share.system.request.MonthlyCardRequest
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -66,4 +67,6 @@ public interface ConsumerMonthlyCardService extends IService<ConsumerMonthlyCard
...
@@ -66,4 +67,6 @@ public interface ConsumerMonthlyCardService extends IService<ConsumerMonthlyCard
List
<
ConsumerMonthlyCardVo
>
selectByConsumerId
();
List
<
ConsumerMonthlyCardVo
>
selectByConsumerId
();
Map
<
String
,
List
<
Long
>>
queryCardType
(
MonthlyCardRequest
monthlyCardRequest
);
Map
<
String
,
List
<
Long
>>
queryCardType
(
MonthlyCardRequest
monthlyCardRequest
);
List
<
ConsumerMonthlyCard
>
confNameByIds
(
ArrayList
<
Long
>
longs
);
}
}
share-system/src/main/java/share/system/service/ConsumerSecondaryCardService.java
View file @
5acd6ba5
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import
share.system.domain.ConsumerSecondaryCard
;
import
share.system.domain.ConsumerSecondaryCard
;
import
share.system.domain.vo.ConsumerSecondaryCardVo
;
import
share.system.domain.vo.ConsumerSecondaryCardVo
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -64,4 +65,6 @@ public interface ConsumerSecondaryCardService extends IService<ConsumerSecondary
...
@@ -64,4 +65,6 @@ public interface ConsumerSecondaryCardService extends IService<ConsumerSecondary
List
<
ConsumerSecondaryCardVo
>
selectByConsumerId
();
List
<
ConsumerSecondaryCardVo
>
selectByConsumerId
();
List
<
ConsumerSecondaryCardVo
>
selectByPaclId
(
Long
packId
);
List
<
ConsumerSecondaryCardVo
>
selectByPaclId
(
Long
packId
);
List
<
ConsumerSecondaryCard
>
confNameByIds
(
ArrayList
<
Long
>
longs
);
}
}
share-system/src/main/java/share/system/service/IPackService.java
View file @
5acd6ba5
...
@@ -66,5 +66,5 @@ public interface IPackService extends IService<SPack> {
...
@@ -66,5 +66,5 @@ public interface IPackService extends IService<SPack> {
List
<
SPack
>
pageList
(
SPack
sPack
);
List
<
SPack
>
pageList
(
SPack
sPack
);
List
<
SPack
>
store
NameByIds
(
List
<
Long
>
longs
);
List
<
SPack
>
pack
NameByIds
(
List
<
Long
>
longs
);
}
}
share-system/src/main/java/share/system/service/ISConsumerCouponService.java
View file @
5acd6ba5
...
@@ -90,7 +90,7 @@ public interface ISConsumerCouponService extends IService<SConsumerCoupon>
...
@@ -90,7 +90,7 @@ public interface ISConsumerCouponService extends IService<SConsumerCoupon>
SConsumerCoupon
selectSConsumerCouponByCode
(
String
code
);
SConsumerCoupon
selectSConsumerCouponByCode
(
String
code
);
List
<
SConsumerCoupon
>
store
NameByIds
(
List
<
Long
>
longs
);
List
<
SConsumerCoupon
>
coupon
NameByIds
(
List
<
Long
>
longs
);
List
<
SConsumerCoupon
>
selectOrderList
();
List
<
SConsumerCoupon
>
selectOrderList
();
...
...
share-system/src/main/java/share/system/service/ISRoomService.java
View file @
5acd6ba5
...
@@ -109,5 +109,5 @@ public interface ISRoomService extends IService<SRoom>
...
@@ -109,5 +109,5 @@ public interface ISRoomService extends IService<SRoom>
List
<
SRoomVo
>
convertDoListToVoList
(
List
<
SRoom
>
roomList
);
List
<
SRoomVo
>
convertDoListToVoList
(
List
<
SRoom
>
roomList
);
List
<
SRoom
>
store
NameByIds
(
List
<
Long
>
longs
);
List
<
SRoom
>
room
NameByIds
(
List
<
Long
>
longs
);
}
}
share-system/src/main/java/share/system/service/impl/ConsumerMonthlyCardServiceImpl.java
View file @
5acd6ba5
...
@@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollectionUtil;
...
@@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollectionUtil;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
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.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
...
@@ -223,4 +224,14 @@ public class ConsumerMonthlyCardServiceImpl extends ServiceImpl<ConsumerMonthlyC
...
@@ -223,4 +224,14 @@ public class ConsumerMonthlyCardServiceImpl extends ServiceImpl<ConsumerMonthlyC
}
}
return
new
HashMap
<>();
return
new
HashMap
<>();
}
}
@Override
public
List
<
ConsumerMonthlyCard
>
confNameByIds
(
ArrayList
<
Long
>
longs
)
{
LambdaQueryWrapper
<
ConsumerMonthlyCard
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
select
(
ConsumerMonthlyCard:
:
getId
,
ConsumerMonthlyCard:
:
getConfName
);
if
(
CollectionUtils
.
isNotEmpty
(
longs
))
{
queryWrapper
.
in
(
ConsumerMonthlyCard:
:
getId
,
longs
);
}
return
list
(
queryWrapper
);
}
}
}
share-system/src/main/java/share/system/service/impl/ConsumerSecondaryCardServiceImpl.java
View file @
5acd6ba5
package
share
.
system
.
service
.
impl
;
package
share
.
system
.
service
.
impl
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
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.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
share.common.exception.base.BaseException
;
import
share.common.exception.base.BaseException
;
...
@@ -15,6 +17,7 @@ import share.system.service.ConsumerSecondaryCardService;
...
@@ -15,6 +17,7 @@ import share.system.service.ConsumerSecondaryCardService;
import
share.system.service.IPackService
;
import
share.system.service.IPackService
;
import
share.system.service.SConsumerService
;
import
share.system.service.SConsumerService
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.function.Function
;
import
java.util.function.Function
;
...
@@ -134,4 +137,14 @@ public class ConsumerSecondaryCardServiceImpl extends ServiceImpl<ConsumerSecond
...
@@ -134,4 +137,14 @@ public class ConsumerSecondaryCardServiceImpl extends ServiceImpl<ConsumerSecond
// });
// });
return
consumerSecondaryCardVos
;
return
consumerSecondaryCardVos
;
}
}
@Override
public
List
<
ConsumerSecondaryCard
>
confNameByIds
(
ArrayList
<
Long
>
longs
)
{
LambdaQueryWrapper
<
ConsumerSecondaryCard
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
select
(
ConsumerSecondaryCard:
:
getId
,
ConsumerSecondaryCard:
:
getConfName
);
if
(
CollectionUtils
.
isNotEmpty
(
longs
))
{
queryWrapper
.
in
(
ConsumerSecondaryCard:
:
getId
,
longs
);
}
return
list
(
queryWrapper
);
}
}
}
share-system/src/main/java/share/system/service/impl/MonthlyCardOrderServiceImpl.java
View file @
5acd6ba5
...
@@ -179,6 +179,8 @@ public class MonthlyCardOrderServiceImpl extends ServiceImpl<MonthlyCardOrderMap
...
@@ -179,6 +179,8 @@ public class MonthlyCardOrderServiceImpl extends ServiceImpl<MonthlyCardOrderMap
ConsumerMember
consumerMember
=
consumerMemberService
.
getOne
(
new
LambdaQueryWrapper
<
ConsumerMember
>().
eq
(
ConsumerMember:
:
getConsumerId
,
monthlyCardOrder
.
getConsumerId
()));
ConsumerMember
consumerMember
=
consumerMemberService
.
getOne
(
new
LambdaQueryWrapper
<
ConsumerMember
>().
eq
(
ConsumerMember:
:
getConsumerId
,
monthlyCardOrder
.
getConsumerId
()));
MonthlyCardConf
byId
=
monthlyCardConfService
.
getById
(
monthlyCardOrder
.
getMonthlyCardConfId
());
MonthlyCardConf
byId
=
monthlyCardConfService
.
getById
(
monthlyCardOrder
.
getMonthlyCardConfId
());
consumerMonthlyCard
.
setMonthlyCardConfId
(
byId
.
getId
());
consumerMonthlyCard
.
setMonthlyCardConfId
(
byId
.
getId
());
consumerMonthlyCard
.
setConfName
(
byId
.
getName
());
consumerMonthlyCard
.
setConfAmount
(
byId
.
getMonthlyCardAmount
());
consumerMonthlyCard
.
setConsumerId
(
monthlyCardOrder
.
getConsumerId
());
consumerMonthlyCard
.
setConsumerId
(
monthlyCardOrder
.
getConsumerId
());
consumerMonthlyCard
.
setPhone
(
monthlyCardOrder
.
getPhone
());
consumerMonthlyCard
.
setPhone
(
monthlyCardOrder
.
getPhone
());
consumerMonthlyCard
.
setExpirationDate
(
DateUtils
.
addDays
(
new
Date
(),
byId
.
getMonthlyCardDays
().
intValue
()));
consumerMonthlyCard
.
setExpirationDate
(
DateUtils
.
addDays
(
new
Date
(),
byId
.
getMonthlyCardDays
().
intValue
()));
...
...
share-system/src/main/java/share/system/service/impl/PackServiceImpl.java
View file @
5acd6ba5
...
@@ -159,7 +159,7 @@ public class PackServiceImpl extends ServiceImpl<PackMapper, SPack> implements I
...
@@ -159,7 +159,7 @@ public class PackServiceImpl extends ServiceImpl<PackMapper, SPack> implements I
}
}
@Override
@Override
public
List
<
SPack
>
store
NameByIds
(
List
<
Long
>
longs
)
{
public
List
<
SPack
>
pack
NameByIds
(
List
<
Long
>
longs
)
{
LambdaQueryWrapper
<
SPack
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
SPack
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
select
(
SPack:
:
getId
,
SPack:
:
getName
);
queryWrapper
.
select
(
SPack:
:
getId
,
SPack:
:
getName
);
if
(
org
.
apache
.
commons
.
collections4
.
CollectionUtils
.
isNotEmpty
(
longs
))
{
if
(
org
.
apache
.
commons
.
collections4
.
CollectionUtils
.
isNotEmpty
(
longs
))
{
...
...
share-system/src/main/java/share/system/service/impl/SConsumerCouponServiceImpl.java
View file @
5acd6ba5
...
@@ -591,7 +591,7 @@ public class SConsumerCouponServiceImpl extends ServiceImpl<SConsumerCouponMappe
...
@@ -591,7 +591,7 @@ public class SConsumerCouponServiceImpl extends ServiceImpl<SConsumerCouponMappe
}
}
@Override
@Override
public
List
<
SConsumerCoupon
>
store
NameByIds
(
List
<
Long
>
longs
)
{
public
List
<
SConsumerCoupon
>
coupon
NameByIds
(
List
<
Long
>
longs
)
{
LambdaQueryWrapper
<
SConsumerCoupon
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
SConsumerCoupon
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
select
(
SConsumerCoupon:
:
getId
,
SConsumerCoupon:
:
getName
);
queryWrapper
.
select
(
SConsumerCoupon:
:
getId
,
SConsumerCoupon:
:
getName
);
if
(
org
.
apache
.
commons
.
collections4
.
CollectionUtils
.
isNotEmpty
(
longs
))
{
if
(
org
.
apache
.
commons
.
collections4
.
CollectionUtils
.
isNotEmpty
(
longs
))
{
...
...
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
5acd6ba5
...
@@ -2436,6 +2436,24 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -2436,6 +2436,24 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
Set
<
Long
>
roomIds
=
orderList
.
stream
().
map
(
SOrder:
:
getRoomId
).
distinct
().
collect
(
Collectors
.
toSet
());
Set
<
Long
>
roomIds
=
orderList
.
stream
().
map
(
SOrder:
:
getRoomId
).
distinct
().
collect
(
Collectors
.
toSet
());
Set
<
Long
>
couponIds
=
orderList
.
stream
().
map
(
SOrder:
:
getCouponId
).
distinct
().
collect
(
Collectors
.
toSet
());
Set
<
Long
>
couponIds
=
orderList
.
stream
().
map
(
SOrder:
:
getCouponId
).
distinct
().
collect
(
Collectors
.
toSet
());
Set
<
Long
>
packIds
=
orderList
.
stream
().
map
(
SOrder:
:
getPackId
).
distinct
().
collect
(
Collectors
.
toSet
());
Set
<
Long
>
packIds
=
orderList
.
stream
().
map
(
SOrder:
:
getPackId
).
distinct
().
collect
(
Collectors
.
toSet
());
Set
<
Long
>
secondaryCardIds
=
orderList
.
stream
().
map
(
SOrder:
:
getSecondaryCardId
).
distinct
().
collect
(
Collectors
.
toSet
());
Set
<
Long
>
monthlyCardIds
=
orderList
.
stream
().
map
(
SOrder:
:
getMonthlyCardId
).
distinct
().
collect
(
Collectors
.
toSet
());
Map
<
Long
,
ConsumerSecondaryCard
>
secondaryCardMap
;
if
(!
secondaryCardIds
.
isEmpty
())
{
List
<
ConsumerSecondaryCard
>
consumerSecondaryCardVos
=
consumerSecondaryCardService
.
confNameByIds
(
new
ArrayList
<>(
secondaryCardIds
));
secondaryCardMap
=
consumerSecondaryCardVos
.
stream
().
collect
(
Collectors
.
toMap
(
ConsumerSecondaryCard:
:
getId
,
s
->
s
));
}
else
{
secondaryCardMap
=
new
HashMap
<>();
}
Map
<
Long
,
ConsumerMonthlyCard
>
monthlyCardMap
;
if
(!
monthlyCardIds
.
isEmpty
())
{
List
<
ConsumerMonthlyCard
>
consumerMonthlyCards
=
consumerMonthlyCardService
.
confNameByIds
(
new
ArrayList
<>(
monthlyCardIds
));
monthlyCardMap
=
consumerMonthlyCards
.
stream
().
collect
(
Collectors
.
toMap
(
ConsumerMonthlyCard:
:
getId
,
s
->
s
));
}
else
{
monthlyCardMap
=
new
HashMap
<>();
}
Map
<
Long
,
SStore
>
storeMap
;
Map
<
Long
,
SStore
>
storeMap
;
if
(!
storeIds
.
isEmpty
())
{
if
(!
storeIds
.
isEmpty
())
{
...
@@ -2447,7 +2465,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -2447,7 +2465,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
Map
<
Long
,
SRoom
>
roomMap
;
Map
<
Long
,
SRoom
>
roomMap
;
if
(!
roomIds
.
isEmpty
())
{
if
(!
roomIds
.
isEmpty
())
{
List
<
SRoom
>
rooms
=
roomService
.
store
NameByIds
(
new
ArrayList
<>(
roomIds
));
List
<
SRoom
>
rooms
=
roomService
.
room
NameByIds
(
new
ArrayList
<>(
roomIds
));
roomMap
=
rooms
.
stream
().
collect
(
Collectors
.
toMap
(
SRoom:
:
getId
,
s
->
s
));
roomMap
=
rooms
.
stream
().
collect
(
Collectors
.
toMap
(
SRoom:
:
getId
,
s
->
s
));
}
else
{
}
else
{
roomMap
=
new
HashMap
<>();
roomMap
=
new
HashMap
<>();
...
@@ -2455,7 +2473,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -2455,7 +2473,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
Map
<
Long
,
SConsumerCoupon
>
couponMap
;
Map
<
Long
,
SConsumerCoupon
>
couponMap
;
if
(!
couponIds
.
isEmpty
())
{
if
(!
couponIds
.
isEmpty
())
{
List
<
SConsumerCoupon
>
coupons
=
consumerCouponService
.
store
NameByIds
(
new
ArrayList
<>(
couponIds
));
List
<
SConsumerCoupon
>
coupons
=
consumerCouponService
.
coupon
NameByIds
(
new
ArrayList
<>(
couponIds
));
couponMap
=
coupons
.
stream
().
collect
(
Collectors
.
toMap
(
SConsumerCoupon:
:
getId
,
s
->
s
));
couponMap
=
coupons
.
stream
().
collect
(
Collectors
.
toMap
(
SConsumerCoupon:
:
getId
,
s
->
s
));
}
else
{
}
else
{
couponMap
=
new
HashMap
<>();
couponMap
=
new
HashMap
<>();
...
@@ -2463,7 +2481,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -2463,7 +2481,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
Map
<
Long
,
SPack
>
packMap
;
Map
<
Long
,
SPack
>
packMap
;
if
(!
packIds
.
isEmpty
())
{
if
(!
packIds
.
isEmpty
())
{
List
<
SPack
>
packs
=
packService
.
store
NameByIds
(
new
ArrayList
<>(
packIds
));
List
<
SPack
>
packs
=
packService
.
pack
NameByIds
(
new
ArrayList
<>(
packIds
));
packMap
=
packs
.
stream
().
collect
(
Collectors
.
toMap
(
SPack:
:
getId
,
s
->
s
));
packMap
=
packs
.
stream
().
collect
(
Collectors
.
toMap
(
SPack:
:
getId
,
s
->
s
));
}
else
{
}
else
{
packMap
=
new
HashMap
<>();
packMap
=
new
HashMap
<>();
...
@@ -2477,6 +2495,16 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -2477,6 +2495,16 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
vo
.
setStoreName
(
store
.
getName
());
vo
.
setStoreName
(
store
.
getName
());
vo
.
setAddress
(
store
.
getAddress
());
vo
.
setAddress
(
store
.
getAddress
());
}
}
ConsumerSecondaryCard
consumerSecondaryCard
=
secondaryCardMap
.
get
(
vo
.
getSecondaryCardId
());
if
(
consumerSecondaryCard
!=
null
)
{
vo
.
setSecondaryCardName
(
consumerSecondaryCard
.
getConfName
());
vo
.
setSecondaryCardAmount
(
consumerSecondaryCard
.
getConfAmount
());
}
ConsumerMonthlyCard
consumerMonthlyCard
=
monthlyCardMap
.
get
(
vo
.
getMonthlyCardId
());
if
(
consumerMonthlyCard
!=
null
)
{
vo
.
setMonthlyCardName
(
consumerMonthlyCard
.
getConfName
());
vo
.
setMonthlyCardAmount
(
consumerMonthlyCard
.
getConfAmount
());
}
SRoom
room
=
roomMap
.
get
(
vo
.
getRoomId
());
SRoom
room
=
roomMap
.
get
(
vo
.
getRoomId
());
if
(
room
!=
null
)
{
if
(
room
!=
null
)
{
vo
.
setRoomName
(
room
.
getName
());
vo
.
setRoomName
(
room
.
getName
());
...
...
share-system/src/main/java/share/system/service/impl/SRoomServiceImpl.java
View file @
5acd6ba5
...
@@ -476,7 +476,7 @@ public class SRoomServiceImpl extends ServiceImpl<SRoomMapper, SRoom> implements
...
@@ -476,7 +476,7 @@ public class SRoomServiceImpl extends ServiceImpl<SRoomMapper, SRoom> implements
}
}
@Override
@Override
public
List
<
SRoom
>
store
NameByIds
(
List
<
Long
>
longs
)
{
public
List
<
SRoom
>
room
NameByIds
(
List
<
Long
>
longs
)
{
LambdaQueryWrapper
<
SRoom
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
SRoom
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
select
(
SRoom:
:
getId
,
SRoom:
:
getName
,
SRoom:
:
getImages
,
SRoom:
:
getRoomType
);
queryWrapper
.
select
(
SRoom:
:
getId
,
SRoom:
:
getName
,
SRoom:
:
getImages
,
SRoom:
:
getRoomType
);
if
(
CollectionUtils
.
isNotEmpty
(
longs
))
{
if
(
CollectionUtils
.
isNotEmpty
(
longs
))
{
...
...
share-system/src/main/java/share/system/service/impl/SecondaryCardOrderServiceImpl.java
View file @
5acd6ba5
...
@@ -165,6 +165,8 @@ public class SecondaryCardOrderServiceImpl extends ServiceImpl<SecondaryCardOrde
...
@@ -165,6 +165,8 @@ public class SecondaryCardOrderServiceImpl extends ServiceImpl<SecondaryCardOrde
ConsumerSecondaryCard
consumerSecondaryCard
=
new
ConsumerSecondaryCard
();
ConsumerSecondaryCard
consumerSecondaryCard
=
new
ConsumerSecondaryCard
();
SecondaryCardConf
secondaryCardConf
=
secondaryCardConfService
.
getById
(
secondaryCardOrder
.
getSecondaryCardConfId
());
SecondaryCardConf
secondaryCardConf
=
secondaryCardConfService
.
getById
(
secondaryCardOrder
.
getSecondaryCardConfId
());
consumerSecondaryCard
.
setSecondaryCardConfId
(
secondaryCardOrder
.
getSecondaryCardConfId
());
consumerSecondaryCard
.
setSecondaryCardConfId
(
secondaryCardOrder
.
getSecondaryCardConfId
());
consumerSecondaryCard
.
setConfName
(
secondaryCardConf
.
getName
());
consumerSecondaryCard
.
setConfAmount
(
secondaryCardConf
.
getSecondaryCardAmount
());
consumerSecondaryCard
.
setConsumerId
(
secondaryCardOrder
.
getConsumerId
());
consumerSecondaryCard
.
setConsumerId
(
secondaryCardOrder
.
getConsumerId
());
consumerSecondaryCard
.
setPhone
(
secondaryCardOrder
.
getPhone
());
consumerSecondaryCard
.
setPhone
(
secondaryCardOrder
.
getPhone
());
consumerSecondaryCard
.
setSingleAmount
(
secondaryCardConf
.
getSingleAmount
());
consumerSecondaryCard
.
setSingleAmount
(
secondaryCardConf
.
getSingleAmount
());
...
...
share-system/src/main/resources/mapper/system/ConsumerMonthlyCardMapper.xml
View file @
5acd6ba5
...
@@ -27,6 +27,8 @@
...
@@ -27,6 +27,8 @@
<sql
id=
"selectConsumerMonthlyCardVo"
>
<sql
id=
"selectConsumerMonthlyCardVo"
>
select id,
select id,
monthly_card_conf_id,
monthly_card_conf_id,
conf_name,
conf_amount,
consumer_id,
consumer_id,
phone,
phone,
free_duration,
free_duration,
...
@@ -45,8 +47,8 @@
...
@@ -45,8 +47,8 @@
resultMap=
"ConsumerMonthlyCardResult"
>
resultMap=
"ConsumerMonthlyCardResult"
>
select c.id,
select c.id,
c.monthly_card_conf_id,
c.monthly_card_conf_id,
c
1.name as 'conf_name'
,
c
.conf_name
,
c
1.monthly_card_amount as 'conf_amount'
,
c
.conf_amount
,
c.consumer_id,
c.consumer_id,
c2.nick_name,
c2.nick_name,
c2.avatar,
c2.avatar,
...
@@ -60,7 +62,7 @@
...
@@ -60,7 +62,7 @@
c.update_by,
c.update_by,
c.update_time,
c.update_time,
c.remark
c.remark
from s_consumer_monthly_card c
join s_monthly_card_conf c1 on c.monthly_card_conf_id = c1.id
from s_consumer_monthly_card c
join s_consumer c2 on c.consumer_id = c2.id
join s_consumer c2 on c.consumer_id = c2.id
where c.is_delete = 0
where c.is_delete = 0
<if
test=
"monthlyCardConfId != null "
>
and c.monthly_card_conf_id = #{monthlyCardConfId}
</if>
<if
test=
"monthlyCardConfId != null "
>
and c.monthly_card_conf_id = #{monthlyCardConfId}
</if>
...
@@ -78,7 +80,8 @@
...
@@ -78,7 +80,8 @@
<select
id=
"selectByConsumerId"
resultMap=
"ConsumerMonthlyCardResult"
>
<select
id=
"selectByConsumerId"
resultMap=
"ConsumerMonthlyCardResult"
>
select c.id,
select c.id,
c.monthly_card_conf_id,
c.monthly_card_conf_id,
c1.name as 'conf_name', c1.monthly_card_amount as 'conf_amount',
c.conf_name,
c.conf_amount,
c.consumer_id,
c.consumer_id,
c2.nick_name,
c2.nick_name,
c2.avatar,
c2.avatar,
...
@@ -94,7 +97,6 @@
...
@@ -94,7 +97,6 @@
c.remark
c.remark
from s_consumer_monthly_card c
from s_consumer_monthly_card c
join s_consumer c2 on c.consumer_id = c2.id
join s_consumer c2 on c.consumer_id = c2.id
join s_monthly_card_conf c1 on c.monthly_card_conf_id = c1.id
where c.is_delete = 0
where c.is_delete = 0
and c.consumer_id = #{consumerId}
and c.consumer_id = #{consumerId}
</select>
</select>
...
...
share-system/src/main/resources/mapper/system/ConsumerSecondaryCardMapper.xml
View file @
5acd6ba5
...
@@ -28,6 +28,8 @@
...
@@ -28,6 +28,8 @@
<sql
id=
"selectConsumerSecondaryCardVo"
>
<sql
id=
"selectConsumerSecondaryCardVo"
>
select id,
select id,
secondary_card_conf_id,
secondary_card_conf_id,
conf_name,
conf_amount,
consumer_id,
consumer_id,
phone,
phone,
single_duration,
single_duration,
...
@@ -51,8 +53,8 @@
...
@@ -51,8 +53,8 @@
c.phone,
c.phone,
m.nick_name,
m.nick_name,
m.avatar,
m.avatar,
c
2.name as 'conf_name'
,
c
.conf_name
,
c
2.secondary_card_amount as 'conf_amount'
,
c
.conf_amount
,
c.single_duration,
c.single_duration,
c.single_amount,
c.single_amount,
c.expiration_date,
c.expiration_date,
...
@@ -64,7 +66,6 @@
...
@@ -64,7 +66,6 @@
c.update_time,
c.update_time,
c. remark
c. remark
from s_consumer_secondary_card c join s_consumer m on c.consumer_id = m.id
from s_consumer_secondary_card c join s_consumer m on c.consumer_id = m.id
join s_secondary_card_conf c2 on c.secondary_card_conf_id = c2.id
where
where
c.is_delete = 0
c.is_delete = 0
<if
test=
"secondaryCardConfId != null "
>
and c.secondary_card_conf_id = #{secondaryCardConfId}
</if>
<if
test=
"secondaryCardConfId != null "
>
and c.secondary_card_conf_id = #{secondaryCardConfId}
</if>
...
@@ -87,7 +88,8 @@
...
@@ -87,7 +88,8 @@
c.phone,
c.phone,
m.nick_name,
m.nick_name,
m.avatar,
m.avatar,
s.name as 'conf_name', s.secondary_card_amount as 'conf_amount',
c.conf_name,
c.conf_amount,
c.single_duration,
c.single_duration,
c.single_amount,
c.single_amount,
c.expiration_date,
c.expiration_date,
...
@@ -100,7 +102,6 @@
...
@@ -100,7 +102,6 @@
c.remark
c.remark
from s_consumer_secondary_card c
from s_consumer_secondary_card c
join s_consumer m on c.consumer_id = m.id
join s_consumer m on c.consumer_id = m.id
join s_secondary_card_conf s on c.secondary_card_conf_id = s.id
where c.is_delete = 0
where c.is_delete = 0
and c.number > 0
and c.number > 0
and c.consumer_id = #{consumerId}
and c.consumer_id = #{consumerId}
...
...
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