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
5f97e321
Commit
5f97e321
authored
Jul 01, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改计算订单价格
parent
e396b965
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
78 additions
and
16 deletions
+78
-16
PayTypeEnum.java
...-common/src/main/java/share/common/enums/PayTypeEnum.java
+11
-1
ActivityController.java
.../java/share/web/controller/system/ActivityController.java
+1
-1
BalanceLogController.java
...ava/share/web/controller/system/BalanceLogController.java
+1
-1
ConsumerMemberController.java
...share/web/controller/system/ConsumerMemberController.java
+1
-1
ConsumerWalletController.java
...share/web/controller/system/ConsumerWalletController.java
+6
-1
EquityMembersOrderConfigController.java
...controller/system/EquityMembersOrderConfigController.java
+1
-1
EquityMembersOrderController.java
...e/web/controller/system/EquityMembersOrderController.java
+1
-1
IntegralLogController.java
...va/share/web/controller/system/IntegralLogController.java
+1
-1
MemberConfigController.java
...a/share/web/controller/system/MemberConfigController.java
+1
-1
RechargeConfController.java
...a/share/web/controller/system/RechargeConfController.java
+1
-1
RechargeController.java
.../java/share/web/controller/system/RechargeController.java
+1
-1
RechargeCouponConfController.java
...e/web/controller/system/RechargeCouponConfController.java
+1
-1
RechargeRefundController.java
...share/web/controller/system/RechargeRefundController.java
+1
-1
ConsumerWalletMapper.java
...c/main/java/share/system/mapper/ConsumerWalletMapper.java
+2
-0
ConsumerWalletService.java
...main/java/share/system/service/ConsumerWalletService.java
+2
-0
ConsumerWalletServiceImpl.java
.../share/system/service/impl/ConsumerWalletServiceImpl.java
+13
-0
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+5
-3
ConsumerWalletMapper.xml
...src/main/resources/mapper/system/ConsumerWalletMapper.xml
+28
-0
No files found.
share-common/src/main/java/share/common/enums/PayTypeEnum.java
View file @
5f97e321
...
...
@@ -10,7 +10,17 @@ public enum PayTypeEnum {
WECHAT
(
1
,
"wechat"
,
"微信支付"
),
ALIPAY
(
2
,
"alipay"
,
"支付宝"
),
SAOBEI
(
3
,
"saobei"
,
"扫呗"
);
SAOBEI
(
3
,
"saobei"
,
"扫呗"
),
//时长
DURATION
(
4
,
"duration"
,
"时长"
),
//积分
INTEGRAL
(
5
,
"integral"
,
"积分"
),
//余额
BALANCE
(
6
,
"balance"
,
"余额"
),
//余额+微信支付
BALANCE_WECHAT
(
7
,
"balance_wechat"
,
"余额+微信支付"
),
//时长+微信支付
DURATION_WECHAT
(
8
,
"duration_wechat"
,
"时长+微信支付"
);
private
Integer
code
;
private
String
value
;
...
...
share-front/src/main/java/share/web/controller/system/ActivityController.java
View file @
5f97e321
...
...
@@ -21,7 +21,7 @@ import java.util.List;
* @date 2024-06-24
*/
@RestController
@RequestMapping
(
"/
system/
activity"
)
@RequestMapping
(
"/activity"
)
public
class
ActivityController
extends
BaseController
{
@Autowired
private
ActivityService
activityService
;
...
...
share-front/src/main/java/share/web/controller/system/BalanceLogController.java
View file @
5f97e321
...
...
@@ -21,7 +21,7 @@ import java.util.List;
* @date 2024-06-24
*/
@RestController
@RequestMapping
(
"/
system/
balanceLog"
)
@RequestMapping
(
"/balanceLog"
)
public
class
BalanceLogController
extends
BaseController
{
@Autowired
private
BalanceLogService
balanceLogService
;
...
...
share-front/src/main/java/share/web/controller/system/ConsumerMemberController.java
View file @
5f97e321
...
...
@@ -22,7 +22,7 @@ import java.util.List;
* @date 2024-06-24
*/
@RestController
@RequestMapping
(
"/
system/
member"
)
@RequestMapping
(
"/member"
)
public
class
ConsumerMemberController
extends
BaseController
{
@Autowired
private
ConsumerMemberService
consumerMemberService
;
...
...
share-front/src/main/java/share/web/controller/system/ConsumerWalletController.java
View file @
5f97e321
...
...
@@ -22,7 +22,7 @@ import java.util.List;
* @date 2024-06-24
*/
@RestController
@RequestMapping
(
"/
system/
wallet"
)
@RequestMapping
(
"/wallet"
)
public
class
ConsumerWalletController
extends
BaseController
{
@Autowired
private
ConsumerWalletService
consumerWalletService
;
...
...
@@ -37,6 +37,11 @@ public class ConsumerWalletController extends BaseController {
return
getDataTable
(
list
);
}
@GetMapping
(
"/query"
)
public
ConsumerWalletVo
selectByConsumerId
()
{
return
consumerWalletService
.
selectByConsumerId
();
}
/**
* 导出会员钱包列表
*/
...
...
share-front/src/main/java/share/web/controller/system/EquityMembersOrderConfigController.java
View file @
5f97e321
...
...
@@ -21,7 +21,7 @@ import java.util.List;
* @date 2024-06-24
*/
@RestController
@RequestMapping
(
"/
system/
equityMembersOrderConfig"
)
@RequestMapping
(
"/equityMembersOrderConfig"
)
public
class
EquityMembersOrderConfigController
extends
BaseController
{
@Autowired
private
EquityMembersOrderConfigService
equityMembersOrderConfigService
;
...
...
share-front/src/main/java/share/web/controller/system/EquityMembersOrderController.java
View file @
5f97e321
...
...
@@ -22,7 +22,7 @@ import java.util.List;
* @date 2024-06-24
*/
@RestController
@RequestMapping
(
"/
system/
equityMembersOrder"
)
@RequestMapping
(
"/equityMembersOrder"
)
public
class
EquityMembersOrderController
extends
BaseController
{
@Autowired
private
EquityMembersOrderService
equityMembersOrderService
;
...
...
share-front/src/main/java/share/web/controller/system/IntegralLogController.java
View file @
5f97e321
...
...
@@ -21,7 +21,7 @@ import java.util.List;
* @date 2024-06-24
*/
@RestController
@RequestMapping
(
"/
system/
integralLog"
)
@RequestMapping
(
"/integralLog"
)
public
class
IntegralLogController
extends
BaseController
{
@Autowired
private
IntegralLogService
integralLogService
;
...
...
share-front/src/main/java/share/web/controller/system/MemberConfigController.java
View file @
5f97e321
...
...
@@ -22,7 +22,7 @@ import java.util.List;
* @date 2024-06-24
*/
@RestController
@RequestMapping
(
"/
system/
memberConfig"
)
@RequestMapping
(
"/memberConfig"
)
public
class
MemberConfigController
extends
BaseController
{
@Autowired
private
MemberConfigService
memberConfigService
;
...
...
share-front/src/main/java/share/web/controller/system/RechargeConfController.java
View file @
5f97e321
...
...
@@ -21,7 +21,7 @@ import java.util.List;
* @date 2024-06-24
*/
@RestController
@RequestMapping
(
"/
system/
rechargeConf"
)
@RequestMapping
(
"/rechargeConf"
)
public
class
RechargeConfController
extends
BaseController
{
@Autowired
private
RechargeConfService
rechargeConfService
;
...
...
share-front/src/main/java/share/web/controller/system/RechargeController.java
View file @
5f97e321
...
...
@@ -21,7 +21,7 @@ import java.util.List;
* @date 2024-06-24
*/
@RestController
@RequestMapping
(
"/
system/
recharge"
)
@RequestMapping
(
"/recharge"
)
public
class
RechargeController
extends
BaseController
{
@Autowired
private
RechargeService
rechargeService
;
...
...
share-front/src/main/java/share/web/controller/system/RechargeCouponConfController.java
View file @
5f97e321
...
...
@@ -21,7 +21,7 @@ import java.util.List;
* @date 2024-06-24
*/
@RestController
@RequestMapping
(
"/
system/
rechargeCouponConf"
)
@RequestMapping
(
"/rechargeCouponConf"
)
public
class
RechargeCouponConfController
extends
BaseController
{
@Autowired
private
RechargeCouponConfService
rechargeCouponConfService
;
...
...
share-front/src/main/java/share/web/controller/system/RechargeRefundController.java
View file @
5f97e321
...
...
@@ -21,7 +21,7 @@ import java.util.List;
* @date 2024-06-24
*/
@RestController
@RequestMapping
(
"/
system/
rechargeRefund"
)
@RequestMapping
(
"/rechargeRefund"
)
public
class
RechargeRefundController
extends
BaseController
{
@Autowired
private
RechargeRefundService
rechargeRefundService
;
...
...
share-system/src/main/java/share/system/mapper/ConsumerWalletMapper.java
View file @
5f97e321
...
...
@@ -60,4 +60,6 @@ public interface ConsumerWalletMapper extends BaseMapper<ConsumerWallet> {
* @return 结果
*/
public
int
deleteConsumerWalletByIds
(
Long
[]
ids
);
ConsumerWalletVo
selectByConsumerId
(
ConsumerWalletVo
consumerWallet
);
}
share-system/src/main/java/share/system/service/ConsumerWalletService.java
View file @
5f97e321
...
...
@@ -60,4 +60,6 @@ public interface ConsumerWalletService extends IService<ConsumerWallet> {
* @return 结果
*/
public
int
deleteConsumerWalletById
(
Long
id
);
ConsumerWalletVo
selectByConsumerId
();
}
share-system/src/main/java/share/system/service/impl/ConsumerWalletServiceImpl.java
View file @
5f97e321
...
...
@@ -5,9 +5,11 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
share.common.utils.DateUtils
;
import
share.system.domain.ConsumerWallet
;
import
share.system.domain.SConsumer
;
import
share.system.domain.vo.ConsumerWalletVo
;
import
share.system.mapper.ConsumerWalletMapper
;
import
share.system.service.ConsumerWalletService
;
import
share.system.service.SConsumerService
;
import
java.util.List
;
...
...
@@ -22,6 +24,9 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
@Autowired
private
ConsumerWalletMapper
consumerWalletMapper
;
@Autowired
private
SConsumerService
sConsumerService
;
/**
* 查询会员钱包
*
...
...
@@ -89,4 +94,12 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
public
int
deleteConsumerWalletById
(
Long
id
)
{
return
consumerWalletMapper
.
deleteConsumerWalletById
(
id
);
}
@Override
public
ConsumerWalletVo
selectByConsumerId
()
{
SConsumer
info
=
sConsumerService
.
getInfo
();
ConsumerWalletVo
consumerWallet
=
new
ConsumerWalletVo
();
consumerWallet
.
setConsumerId
(
info
.
getId
());
return
consumerWalletMapper
.
selectByConsumerId
(
consumerWallet
);
}
}
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
5f97e321
...
...
@@ -1854,7 +1854,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
// 计算各种价格
ComputedOrderPriceResponse
priceResponse
=
new
ComputedOrderPriceResponse
();
Activity
activity
;
ConsumerMember
consumerMember
=
n
ew
ConsumerMember
()
;
ConsumerMember
consumerMember
=
n
ull
;
LambdaQueryWrapper
<
Activity
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
if
(
ObjectUtil
.
isNotEmpty
(
user
))
{
consumerMember
=
consumerMemberService
.
getOne
(
new
LambdaQueryWrapper
<
ConsumerMember
>().
eq
(
ConsumerMember:
:
getConsumerId
,
user
.
getId
()));
...
...
@@ -1946,15 +1946,17 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
}
private
BigDecimal
getBigDecimal
(
OrderComputedPriceRequest
request
,
Activity
activity
,
BigDecimal
payPrice
,
SConsumer
user
)
{
if
(
ObjectUtil
.
isNotEmpty
(
activity
))
{
if
(
ObjectUtil
.
isNotEmpty
(
activity
)
&&
ObjectUtil
.
isNotEmpty
(
user
)
)
{
CronParser
cronParser
=
new
CronParser
(
CronDefinitionBuilder
.
instanceDefinitionFor
(
CronType
.
QUARTZ
));
Cron
cron
=
cronParser
.
parse
(
activity
.
getCronExpression
());
ExecutionTime
executionTime
=
ExecutionTime
.
forCron
(
cron
);
LambdaQueryWrapper
<
SOrder
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
SOrder:
:
getConsumerId
,
user
.
getId
());
queryWrapper
.
in
(
SOrder:
:
getStatus
,
OrderStatusEnum
.
get
Unfinish
OrderStatus
());
queryWrapper
.
in
(
SOrder:
:
getStatus
,
OrderStatusEnum
.
get
Valid
OrderStatus
());
queryWrapper
.
eq
(
SOrder:
:
getPayStatus
,
YesNoEnum
.
yes
.
getIndex
());
queryWrapper
.
ne
(
SOrder:
:
getPayPrice
,
new
BigDecimal
(
0
));
//预约结束时间大于等于今天的年月日
queryWrapper
.
ge
(
SOrder:
:
getPreEndDate
,
DateUtils
.
parseDate
(
DateUtils
.
parseDateToStr
(
DateUtils
.
YYYY_MM_DD
,
new
Date
())));
queryWrapper
.
isNull
(
SOrder:
:
getCouponId
);
List
<
SOrder
>
orderList
=
list
(
queryWrapper
);
if
(
CollectionUtils
.
isEmpty
(
orderList
))
{
...
...
share-system/src/main/resources/mapper/system/ConsumerWalletMapper.xml
View file @
5f97e321
...
...
@@ -69,6 +69,34 @@
<include
refid=
"selectConsumerWalletVo"
/>
where id = #{id}
</select>
<select
id=
"selectByConsumerId"
resultType=
"share.system.domain.vo.ConsumerWalletVo"
>
select w.id,
w.consumer_id,
c.nick_name,
c.phone,
c.avatar,
w.balance,
w.remaining_duration,
w.remaining_integral,
w.is_delete,
w.create_by,
w.create_time,
w.update_by,
w.update_time,
w.remark
from s_consumer_wallet w join s_consumer c on w.consumer_id = c.id
<where>
<if
test=
"nickName != null and nickName != ''"
>
and c.nick_name like concat('%', #{nickName},'%')
</if>
<if
test=
"phone != null and phone != ''"
>
and c.phone like concat('%', #{phone},'%')
</if>
<if
test=
"consumerId != null "
>
and w.consumer_id = #{consumerId}
</if>
<if
test=
"balance != null "
>
and w.balance = #{balance}
</if>
<if
test=
"remainingDuration != null "
>
and w.remaining_duration = #{remainingDuration}
</if>
<if
test=
"remainingIntegral != null "
>
and w.remaining_integral = #{remainingIntegral}
</if>
<if
test=
"isDelete != null "
>
and w.is_delete = #{isDelete}
</if>
</where>
</select>
<insert
id=
"insertConsumerWallet"
parameterType=
"ConsumerWallet"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into s_consumer_wallet
...
...
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