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
480ec261
Commit
480ec261
authored
Sep 06, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户信息增加次卡,月卡,订单表增加次卡,月卡id
parent
4b7ff02e
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
54 additions
and
13 deletions
+54
-13
SOrder.java
share-system/src/main/java/share/system/domain/SOrder.java
+6
-0
SConsumerVo.java
...tem/src/main/java/share/system/domain/vo/SConsumerVo.java
+6
-0
ConsumerMonthlyCardMapper.java
...n/java/share/system/mapper/ConsumerMonthlyCardMapper.java
+1
-1
ConsumerMonthlyCardService.java
...java/share/system/service/ConsumerMonthlyCardService.java
+1
-1
ConsumerMonthlyCardServiceImpl.java
...e/system/service/impl/ConsumerMonthlyCardServiceImpl.java
+1
-1
SConsumerServiceImpl.java
.../java/share/system/service/impl/SConsumerServiceImpl.java
+15
-6
ConsumerMonthlyCardMapper.xml
...ain/resources/mapper/system/ConsumerMonthlyCardMapper.xml
+1
-2
ConsumerSecondaryCardMapper.xml
...n/resources/mapper/system/ConsumerSecondaryCardMapper.xml
+1
-2
SOrderMapper.xml
...-system/src/main/resources/mapper/system/SOrderMapper.xml
+22
-0
No files found.
share-system/src/main/java/share/system/domain/SOrder.java
View file @
480ec261
...
...
@@ -81,6 +81,12 @@ public class SOrder extends BaseEntity
@Excel
(
name
=
"优惠券金额"
)
private
BigDecimal
couponPrice
;
@Excel
(
name
=
"次卡ID"
)
private
Long
secondaryCardId
;
@Excel
(
name
=
"月卡ID"
)
private
Long
monthlyCardId
;
@Excel
(
name
=
"订单总价"
)
private
BigDecimal
totalPrice
;
...
...
share-system/src/main/java/share/system/domain/vo/SConsumerVo.java
View file @
480ec261
...
...
@@ -5,6 +5,8 @@ import share.system.domain.ConsumerMember;
import
share.system.domain.ConsumerWallet
;
import
share.system.domain.SConsumer
;
import
java.util.List
;
/**
* @className: share.system.domain.vo.SConsumerVo
* @description: 会员
...
...
@@ -40,4 +42,8 @@ public class SConsumerVo extends SConsumer {
private
MemberConfigVo
memberConfig
;
private
List
<
ConsumerMonthlyCardVo
>
monthlyCardList
;
private
List
<
ConsumerSecondaryCardVo
>
secondaryCardList
;
}
share-system/src/main/java/share/system/mapper/ConsumerMonthlyCardMapper.java
View file @
480ec261
...
...
@@ -61,5 +61,5 @@ public interface ConsumerMonthlyCardMapper extends BaseMapper<ConsumerMonthlyCar
*/
public
int
deleteConsumerMonthlyCardByIds
(
Long
[]
ids
);
ConsumerMonthlyCardVo
selectByConsumerId
(
ConsumerMonthlyCardVo
consumerMemberVo
);
List
<
ConsumerMonthlyCardVo
>
selectByConsumerId
(
ConsumerMonthlyCardVo
consumerMemberVo
);
}
share-system/src/main/java/share/system/service/ConsumerMonthlyCardService.java
View file @
480ec261
...
...
@@ -61,5 +61,5 @@ public interface ConsumerMonthlyCardService extends IService<ConsumerMonthlyCard
*/
public
int
deleteConsumerMonthlyCardById
(
Long
id
);
ConsumerMonthlyCardVo
selectByConsumerId
();
List
<
ConsumerMonthlyCardVo
>
selectByConsumerId
();
}
share-system/src/main/java/share/system/service/impl/ConsumerMonthlyCardServiceImpl.java
View file @
480ec261
...
...
@@ -95,7 +95,7 @@ public class ConsumerMonthlyCardServiceImpl extends ServiceImpl<ConsumerMonthlyC
}
@Override
public
ConsumerMonthlyCardVo
selectByConsumerId
()
{
public
List
<
ConsumerMonthlyCardVo
>
selectByConsumerId
()
{
SConsumer
info
=
sConsumerService
.
getInfo
();
ConsumerMonthlyCardVo
vo
=
new
ConsumerMonthlyCardVo
();
vo
.
setConsumerId
(
info
.
getId
());
...
...
share-system/src/main/java/share/system/service/impl/SConsumerServiceImpl.java
View file @
480ec261
...
...
@@ -22,9 +22,7 @@ import share.common.utils.BaseUtil;
import
share.common.utils.DateUtil
;
import
share.common.utils.DateUtils
;
import
share.system.domain.*
;
import
share.system.domain.vo.FrontTokenComponent
;
import
share.system.domain.vo.MemberConfigVo
;
import
share.system.domain.vo.SConsumerVo
;
import
share.system.domain.vo.*
;
import
share.system.mapper.SConsumerMapper
;
import
share.system.mapper.SStoreConsumerMapper
;
import
share.system.request.RegisterThirdSConsumerRequest
;
...
...
@@ -60,6 +58,10 @@ public class SConsumerServiceImpl extends ServiceImpl<SConsumerMapper, SConsumer
private
MemberConfigService
memberConfigService
;
@Autowired
private
MemberProgressLogService
memberProgressLogService
;
@Autowired
private
ConsumerSecondaryCardService
consumerSecondaryCardService
;
@Autowired
private
ConsumerMonthlyCardService
consumerMonthlyCardService
;
/**
* 查询会员用户
...
...
@@ -188,6 +190,9 @@ public class SConsumerServiceImpl extends ServiceImpl<SConsumerMapper, SConsumer
@Override
public
SConsumerVo
getSConsumer
()
{
SConsumer
currentUser
=
getInfo
();
if
(
ObjectUtil
.
isNull
(
currentUser
))
{
throw
new
BaseException
(
"您的登录已过期,请先登录"
);
}
SConsumerCoupon
sConsumerCoupon
=
new
SConsumerCoupon
();
sConsumerCoupon
.
setConsumerId
(
currentUser
.
getId
());
sConsumerCoupon
.
setUseStatus
(
ConsumerCouponUseStatusEnum
.
WAIT_USE
.
getCode
());
...
...
@@ -199,6 +204,8 @@ public class SConsumerServiceImpl extends ServiceImpl<SConsumerMapper, SConsumer
BeanUtils
.
copyProperties
(
currentUser
,
vo
);
ConsumerMember
consumerMember
=
consumerMemberService
.
getOne
(
new
LambdaQueryWrapper
<
ConsumerMember
>().
eq
(
ConsumerMember:
:
getConsumerId
,
currentUser
.
getId
()));
ConsumerWallet
consumerWallet
=
consumerWalletService
.
getOne
(
new
LambdaQueryWrapper
<
ConsumerWallet
>().
eq
(
ConsumerWallet:
:
getConsumerId
,
currentUser
.
getId
()));
List
<
ConsumerSecondaryCardVo
>
consumerSecondaryCardVos
=
consumerSecondaryCardService
.
selectByConsumerId
();
List
<
ConsumerMonthlyCardVo
>
consumerMonthlyCardVo
=
consumerMonthlyCardService
.
selectByConsumerId
();
if
(
ObjectUtil
.
isNotEmpty
(
consumerMember
))
{
vo
.
setConsumerMember
(
consumerMember
);
MemberConfig
memberConfig
=
memberConfigService
.
getById
(
consumerMember
.
getMemberConfigId
());
...
...
@@ -253,9 +260,11 @@ public class SConsumerServiceImpl extends ServiceImpl<SConsumerMapper, SConsumer
}
else
{
vo
.
setIsManage
(
true
);
}
if
(
ObjectUtil
.
isNull
(
currentUser
))
{
throw
new
BaseException
(
"您的登录已过期,请先登录"
);
if
(!
CollectionUtils
.
isEmpty
(
consumerSecondaryCardVos
))
{
vo
.
setSecondaryCardList
(
consumerSecondaryCardVos
);
}
if
(!
CollectionUtils
.
isEmpty
(
consumerMonthlyCardVo
))
{
vo
.
setMonthlyCardList
(
consumerMonthlyCardVo
);
}
return
vo
;
}
...
...
share-system/src/main/resources/mapper/system/ConsumerMonthlyCardMapper.xml
View file @
480ec261
...
...
@@ -93,8 +93,7 @@
c.remark
from s_consumer_monthly_card c
join s_consumer c2 on c.consumer_id = c2.id
where c.is_delete = 0
and c.consumer_id = #{consumerId}
where c.consumer_id = #{consumerId}
</select>
<insert
id=
"insertConsumerMonthlyCard"
parameterType=
"ConsumerMonthlyCard"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
...
...
share-system/src/main/resources/mapper/system/ConsumerSecondaryCardMapper.xml
View file @
480ec261
...
...
@@ -98,8 +98,7 @@
c.remark
from s_consumer_secondary_card c
join s_consumer m on c.consumer_id = m.id
where c.is_delete = 0
and c.consumer_id = #{consumerId}
where c.consumer_id = #{consumerId}
</select>
<insert
id=
"insertConsumerSecondaryCard"
parameterType=
"ConsumerSecondaryCard"
useGeneratedKeys=
"true"
...
...
share-system/src/main/resources/mapper/system/SOrderMapper.xml
View file @
480ec261
...
...
@@ -21,6 +21,8 @@
<result
property=
"packPrice"
column=
"pack_price"
/>
<result
property=
"couponId"
column=
"coupon_id"
/>
<result
property=
"couponPrice"
column=
"coupon_price"
/>
<result
property=
"secondaryCardId"
column=
"secondary_card_id"
/>
<result
property=
"monthlyCardId"
column=
"monthly_card_id"
/>
<result
property=
"totalPrice"
column=
"total_price"
/>
<result
property=
"duration"
column=
"duration"
/>
<result
property=
"balance"
column=
"balance"
/>
...
...
@@ -63,6 +65,8 @@
pack_price,
coupon_id,
coupon_price,
secondary_card_id,
monthly_card_id,
total_price,
pay_price,
duration,
...
...
@@ -106,6 +110,8 @@
pack_price,
coupon_id,
coupon_price,
secondary_card_id,
monthly_card_id,
total_price,
pay_price,
duration,
...
...
@@ -149,6 +155,8 @@
<if
test=
"packPrice != null and packPrice != ''"
>
and pack_price = #{packPrice}
</if>
<if
test=
"couponId != null and couponId != ''"
>
and coupon_id = #{couponId}
</if>
<if
test=
"couponPrice != null and couponPrice != ''"
>
and coupon_price = #{couponPrice}
</if>
<if
test=
"secondaryCardId != null and secondaryCardId != ''"
>
and secondary_card_id = #{secondaryCardId}
</if>
<if
test=
"monthlyCardId != null and monthlyCardId != ''"
>
and monthly_card_id = #{monthlyCardId}
</if>
<if
test=
"totalPrice != null and totalPrice != ''"
>
and total_price = #{totalPrice}
</if>
<if
test=
"payPrice != null and payPrice != ''"
>
and pay_price = #{payPrice}
</if>
<if
test=
"duration != null and duration != ''"
>
and duration = #{duration}
</if>
...
...
@@ -230,6 +238,8 @@
s.pack_price,
s.coupon_id,
s.coupon_price,
s.secondary_card_id,
s.monthly_card_id,
s.total_price,
s.pay_price,
s.discount_ratio,
...
...
@@ -278,6 +288,8 @@
s.pack_price,
s.coupon_id,
s.coupon_price,
s.secondary_card_id,
s.monthly_card_id,
s.total_price,
s.pay_price,
s.discount_ratio,
...
...
@@ -339,6 +351,8 @@
<if
test=
"packPrice != null and packPrice != ''"
>
and pack_price = #{packPrice}
</if>
<if
test=
"couponId != null and couponId != ''"
>
and coupon_id = #{couponId}
</if>
<if
test=
"couponPrice != null and couponPrice != ''"
>
and coupon_price = #{couponPrice}
</if>
<if
test=
"secondaryCardId != null and secondaryCardId != ''"
>
and secondary_card_id = #{secondaryCardId}
</if>
<if
test=
"monthlyCardId != null and monthlyCardId != ''"
>
and monthly_card_id = #{monthlyCardId}
</if>
<if
test=
"totalPrice != null and totalPrice != ''"
>
and total_price = #{totalPrice}
</if>
<if
test=
"payPrice != null and payPrice != ''"
>
and pay_price = #{payPrice}
</if>
<if
test=
"duration != null and duration != ''"
>
and duration = #{duration}
</if>
...
...
@@ -401,6 +415,8 @@
<if
test=
"packPrice != null and packPrice != ''"
>
and pack_price = #{packPrice}
</if>
<if
test=
"couponId != null and couponId != ''"
>
and coupon_id = #{couponId}
</if>
<if
test=
"couponPrice != null and couponPrice != ''"
>
and coupon_price = #{couponPrice}
</if>
<if
test=
"secondaryCardId != null and secondaryCardId != ''"
>
and secondary_card_id = #{secondaryCardId}
</if>
<if
test=
"monthlyCardId != null and monthlyCardId != ''"
>
and monthly_card_id = #{monthlyCardId}
</if>
<if
test=
"totalPrice != null and totalPrice != ''"
>
and total_price = #{totalPrice}
</if>
<if
test=
"payPrice != null and payPrice != ''"
>
and pay_price = #{payPrice}
</if>
<if
test=
"duration != null and duration != ''"
>
and duration = #{duration}
</if>
...
...
@@ -480,6 +496,8 @@
<if
test=
"discountRatio != null and discountRatio != ''"
>
discount_ratio,
</if>
<if
test=
"duration != null and duration != ''"
>
duration,
</if>
<if
test=
"balance != null and balance != '' "
>
balance,
</if>
<if
test=
"secondaryCardId != null and secondaryCardId != ''"
>
secondary_card_id,
</if>
<if
test=
"monthlyCardId != null and monthlyCardId != ''"
>
monthly_card_id,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"orderNo != null"
>
#{orderNo},
</if>
...
...
@@ -517,6 +535,8 @@
<if
test=
"discountRatio != null"
>
#{discountRatio},
</if>
<if
test=
"duration != null"
>
#{duration},
</if>
<if
test=
"balance != null"
>
#{balance},
</if>
<if
test=
"secondaryCardId != null"
>
#{secondary_card_id},
</if>
<if
test=
"monthlyCardId != null"
>
#{monthly_card_id},
</if>
</trim>
</insert>
...
...
@@ -559,6 +579,8 @@
<if
test=
"discountRatio != null"
>
discount_ratio = #{discountRatio},
</if>
<if
test=
"duration != null"
>
duration = #{duration},
</if>
<if
test=
"balance != null"
>
balance = #{balance},
</if>
<if
test=
"monthlyCardId != null"
>
monthly_card_id = #{monthlyCardId},
</if>
<if
test=
"secondaryCardId != null"
>
secondary_card_id = #{secondaryCardId},
</if>
</trim>
where id = #{id}
</update>
...
...
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