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
e084d814
Commit
e084d814
authored
Sep 19, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'refs/heads/dev' into test
parents
36557988
34be0465
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
80 additions
and
12 deletions
+80
-12
EquityFundTypeEnum.java
.../src/main/java/share/common/enums/EquityFundTypeEnum.java
+40
-0
SharingActivitiesController.java
...re/web/controller/system/SharingActivitiesController.java
+14
-0
RedisTask.java
share-quartz/src/main/java/share/quartz/task/RedisTask.java
+12
-8
SharingActivitiesService.java
...n/java/share/system/service/SharingActivitiesService.java
+1
-0
CallbackServiceImpl.java
...n/java/share/system/service/impl/CallbackServiceImpl.java
+4
-4
SConsumerServiceImpl.java
.../java/share/system/service/impl/SConsumerServiceImpl.java
+1
-0
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+0
-0
SharingActivitiesServiceImpl.java
...are/system/service/impl/SharingActivitiesServiceImpl.java
+8
-0
No files found.
share-common/src/main/java/share/common/enums/EquityFundTypeEnum.java
0 → 100644
View file @
e084d814
package
share
.
common
.
enums
;
public
enum
EquityFundTypeEnum
{
RECHARGE
(
"0"
,
"充值"
),
RIGHTS
(
"1"
,
"权益购买"
),
ORDER
(
"2"
,
"订单消费"
),
ORDER_REFUND
(
"3"
,
"订单消费退款"
),
WITHDRAW_BALANCE
(
"4"
,
"权益金提现到余额"
),
WITHDRAW_WX
(
"5"
,
"权益金提现到微信"
),
;
EquityFundTypeEnum
()
{
}
EquityFundTypeEnum
(
String
code
,
String
name
)
{
this
.
code
=
code
;
this
.
name
=
name
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
private
String
code
;
private
String
name
;
}
share-front/src/main/java/share/web/controller/system/SharingActivitiesController.java
View file @
e084d814
...
@@ -50,4 +50,18 @@ public class SharingActivitiesController extends BaseController {
...
@@ -50,4 +50,18 @@ public class SharingActivitiesController extends BaseController {
return
success
(
list
);
return
success
(
list
);
}
}
/**
* 查询下级数量
* @param sharingActivities
* @return
*/
@GetMapping
(
"/countNum"
)
public
AjaxResult
countNum
(
SharingActivities
sharingActivities
){
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
sharingActivities
.
setUid
(
user
.
getId
());
return
success
(
sharingActivitiesService
.
selectSharingActivitiesCount
(
sharingActivities
));
}
}
}
share-quartz/src/main/java/share/quartz/task/RedisTask.java
View file @
e084d814
...
@@ -361,7 +361,7 @@ public class RedisTask {
...
@@ -361,7 +361,7 @@ public class RedisTask {
if
(
ObjectUtil
.
isNotEmpty
(
consumerWallet
))
{
if
(
ObjectUtil
.
isNotEmpty
(
consumerWallet
))
{
//添加时长
//添加时长
BigDecimal
anHour
=
new
BigDecimal
(
1.0
);
BigDecimal
anHour
=
new
BigDecimal
(
1.0
);
BigDecimal
accumulateEquityFund
=
consumerWallet
.
getAccumulateEquityFund
()
!=
null
?
consumerWallet
.
getAccumulateEquityFund
()
:
BigDecimal
.
ZERO
;
BigDecimal
accumulateEquityFund
=
ObjectUtil
.
isNotEmpty
(
consumerWallet
.
getAccumulateEquityFund
())
?
consumerWallet
.
getAccumulateEquityFund
()
:
BigDecimal
.
ZERO
;
consumerWallet
.
setRemainingDuration
(
accumulateEquityFund
.
add
(
anHour
));
consumerWallet
.
setRemainingDuration
(
accumulateEquityFund
.
add
(
anHour
));
consumerWallet
.
setUpdateTime
(
DateUtils
.
getNowDate
());
consumerWallet
.
setUpdateTime
(
DateUtils
.
getNowDate
());
consumerWalletService
.
updateConsumerWallet
(
consumerWallet
);
consumerWalletService
.
updateConsumerWallet
(
consumerWallet
);
...
@@ -402,11 +402,15 @@ public class RedisTask {
...
@@ -402,11 +402,15 @@ public class RedisTask {
newConsumerMemberQueryWrapper
.
eq
(
ConsumerMember:
:
getConsumerId
,
sharingActivities
.
getNewUid
());
newConsumerMemberQueryWrapper
.
eq
(
ConsumerMember:
:
getConsumerId
,
sharingActivities
.
getNewUid
());
ConsumerMember
newConsumerMember
=
consumerMemberService
.
getOne
(
newConsumerMemberQueryWrapper
);
ConsumerMember
newConsumerMember
=
consumerMemberService
.
getOne
(
newConsumerMemberQueryWrapper
);
//判断是否为权益会员和会员是否有效
//判断是否为权益会员和会员是否有效
if
(
YesNoEnum
.
yes
.
getIndex
().
equals
(
consumerMember
.
getIsRights
())
&&
new
Date
().
getTime
()
<
consumerMember
.
getExpirationDate
().
getTime
()
if
(
YesNoEnum
.
yes
.
getIndex
().
equals
(
consumerMember
.
getIsRights
())
&&
YesNoEnum
.
yes
.
getIndex
().
equals
(
newConsumerMember
.
getIsRights
())
&&
new
Date
().
getTime
()
<
newConsumerMember
.
getExpirationDate
().
getTime
())
{
&&
new
Date
().
getTime
()
<
consumerMember
.
getExpirationDate
().
getTime
()
&&
((
YesNoEnum
.
yes
.
getIndex
().
equals
(
newConsumerMember
.
getIsRights
())
&&
new
Date
().
getTime
()
<
newConsumerMember
.
getExpirationDate
().
getTime
())
||
(
newConsumerMember
.
getIsRecharge
().
equals
(
YesNoEnum
.
yes
.
getIndex
())))
)
{
Boolean
aBoolean
=
redisTemplate
.
hasKey
(
ReceiptRdeisEnum
.
EQUITY_MEMBERS_TIME
.
getValue
()
+
sharingActivities
.
getUid
().
toString
());
Boolean
aBoolean
=
redisTemplate
.
hasKey
(
ReceiptRdeisEnum
.
EQUITY_MEMBERS_TIME
.
getValue
()
+
sharingActivities
.
getUid
().
toString
());
Boolean
newAboolean
=
redisTemplate
.
hasKey
(
ReceiptRdeisEnum
.
EQUITY_MEMBERS_TIME
.
getValue
()
+
sharingActivities
.
getNewUid
().
toString
());
Boolean
newAboolean
=
redisTemplate
.
hasKey
(
ReceiptRdeisEnum
.
EQUITY_MEMBERS_TIME
.
getValue
()
+
sharingActivities
.
getNewUid
().
toString
());
if
(
aBoolean
&&
newAboolean
)
{
if
(
aBoolean
&&
(
newAboolean
||
newConsumerMember
.
getIsRecharge
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
)
{
LambdaQueryWrapper
<
ConsumerWallet
>
consumerWalletLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
ConsumerWallet
>
consumerWalletLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
consumerWalletLambdaQueryWrapper
.
eq
(
ConsumerWallet:
:
getConsumerId
,
sharingActivities
.
getUid
());
consumerWalletLambdaQueryWrapper
.
eq
(
ConsumerWallet:
:
getConsumerId
,
sharingActivities
.
getUid
());
ConsumerWallet
consumerWallet
=
consumerWalletService
.
getOne
(
consumerWalletLambdaQueryWrapper
);
ConsumerWallet
consumerWallet
=
consumerWalletService
.
getOne
(
consumerWalletLambdaQueryWrapper
);
...
@@ -414,11 +418,11 @@ public class RedisTask {
...
@@ -414,11 +418,11 @@ public class RedisTask {
if
(
payPrice
.
signum
()
>
0
)
{
if
(
payPrice
.
signum
()
>
0
)
{
String
equityFund
=
sysConfigService
.
selectConfigByKey
(
"sys.equityFundLog.equityFund"
);
String
equityFund
=
sysConfigService
.
selectConfigByKey
(
"sys.equityFundLog.equityFund"
);
BigDecimal
addEquityFund
=
payPrice
.
multiply
(
new
BigDecimal
(
equityFund
)).
setScale
(
2
,
RoundingMode
.
HALF_UP
);
BigDecimal
addEquityFund
=
payPrice
.
multiply
(
new
BigDecimal
(
equityFund
)).
setScale
(
2
,
RoundingMode
.
HALF_UP
);
// BigDecimal addEquityFund = new BigDecimal(99).multiply(new BigDecimal(equityFund)).setScale(2, RoundingMode.HALF_UP);
// BigDecimal addEquityFund = new BigDecimal(99).multiply(new BigDecimal(equityFund)).setScale(2, RoundingMode.HALF_UP);
BigDecimal
aEquityFund
=
consumerWallet
.
getEquityFund
()
!=
null
?
consumerWallet
.
getEquityFund
()
:
BigDecimal
.
ZERO
;
BigDecimal
aEquityFund
=
ObjectUtil
.
isNotEmpty
(
consumerWallet
.
getEquityFund
())
?
consumerWallet
.
getEquityFund
()
:
BigDecimal
.
ZERO
;
consumerWallet
.
setEquityFund
(
aEquityFund
.
add
(
addEquityFund
));
consumerWallet
.
setEquityFund
(
aEquityFund
.
add
(
addEquityFund
));
BigDecimal
accumulateEquityFund
=
consumerWallet
.
getAccumulateEquityFund
()
!=
null
?
consumerWallet
.
getAccumulateEquityFund
()
:
BigDecimal
.
ZERO
;
BigDecimal
accumulateEquityFund
=
ObjectUtil
.
isNotEmpty
(
consumerWallet
.
getAccumulateEquityFund
())
?
consumerWallet
.
getAccumulateEquityFund
()
:
BigDecimal
.
ZERO
;
consumerWallet
.
setAccumulateEquityFund
(
accumulateEquityFund
.
consumerWallet
.
setAccumulateEquityFund
(
accumulateEquityFund
.
add
(
addEquityFund
));
add
(
addEquityFund
));
consumerWallet
.
setUpdateTime
(
DateUtils
.
getNowDate
());
consumerWallet
.
setUpdateTime
(
DateUtils
.
getNowDate
());
...
@@ -430,7 +434,7 @@ public class RedisTask {
...
@@ -430,7 +434,7 @@ public class RedisTask {
SConsumer
consumer
=
consumerService
.
getById
(
sharingActivities
.
getUid
());
SConsumer
consumer
=
consumerService
.
getById
(
sharingActivities
.
getUid
());
EquityFundLog
equityFundLog
=
new
EquityFundLog
();
EquityFundLog
equityFundLog
=
new
EquityFundLog
();
equityFundLog
.
setEquityFund
(
addEquityFund
);
equityFundLog
.
setEquityFund
(
addEquityFund
);
equityFundLog
.
setEquityFundType
(
"1"
);
equityFundLog
.
setEquityFundType
(
EquityFundTypeEnum
.
ORDER
.
getCode
()
);
equityFundLog
.
setOutTradeNo
(
sOrder
.
getOrderNo
());
equityFundLog
.
setOutTradeNo
(
sOrder
.
getOrderNo
());
equityFundLog
.
setTerminalTrace
(
sOrder
.
getOutTradeNo
());
equityFundLog
.
setTerminalTrace
(
sOrder
.
getOutTradeNo
());
equityFundLog
.
setUid
(
sharingActivities
.
getUid
());
equityFundLog
.
setUid
(
sharingActivities
.
getUid
());
...
...
share-system/src/main/java/share/system/service/SharingActivitiesService.java
View file @
e084d814
...
@@ -62,4 +62,5 @@ public interface SharingActivitiesService extends IService<SharingActivities>
...
@@ -62,4 +62,5 @@ public interface SharingActivitiesService extends IService<SharingActivities>
public
int
deleteSharingActivitiesById
(
Long
id
);
public
int
deleteSharingActivitiesById
(
Long
id
);
int
selectSharingActivitiesCount
(
SharingActivities
sharingActivities
);
}
}
share-system/src/main/java/share/system/service/impl/CallbackServiceImpl.java
View file @
e084d814
...
@@ -471,7 +471,7 @@ public class CallbackServiceImpl implements CallbackService {
...
@@ -471,7 +471,7 @@ public class CallbackServiceImpl implements CallbackService {
wechatPayInfoService
.
updateById
(
wechatInfo
);
wechatPayInfoService
.
updateById
(
wechatInfo
);
//新增权益金日志
//新增权益金日志
addEquityFundLog
(
recharge
.
getConsumerId
(),
addEquityFundLog
(
recharge
.
getConsumerId
(),
recharge
.
getRechargeAmount
(),
recharge
.
getRechargeNo
(),
recharge
.
getTerminalTrace
(),
"0"
);
recharge
.
getRechargeAmount
(),
recharge
.
getRechargeNo
(),
recharge
.
getTerminalTrace
(),
EquityFundTypeEnum
.
RECHARGE
.
getCode
()
);
aFalse
=
Boolean
.
TRUE
;
aFalse
=
Boolean
.
TRUE
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"微信支付回调出错"
);
logger
.
error
(
"微信支付回调出错"
);
...
@@ -553,7 +553,7 @@ public class CallbackServiceImpl implements CallbackService {
...
@@ -553,7 +553,7 @@ public class CallbackServiceImpl implements CallbackService {
wechatPayInfoService
.
updateById
(
equityPayInfo
);
wechatPayInfoService
.
updateById
(
equityPayInfo
);
//新增权益金日志
//新增权益金日志
addEquityFundLog
(
equityMembersOrder
.
getConsumerId
(),
addEquityFundLog
(
equityMembersOrder
.
getConsumerId
(),
equityMembersOrder
.
getPayPrice
(),
equityMembersOrder
.
getEquityOrderNo
(),
equityMembersOrder
.
getTerminalTrace
(),
"1"
);
equityMembersOrder
.
getPayPrice
(),
equityMembersOrder
.
getEquityOrderNo
(),
equityMembersOrder
.
getTerminalTrace
(),
EquityFundTypeEnum
.
RIGHTS
.
getCode
()
);
aBoolean
=
Boolean
.
TRUE
;
aBoolean
=
Boolean
.
TRUE
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"微信支付回调出错"
);
logger
.
error
(
"微信支付回调出错"
);
...
@@ -788,9 +788,9 @@ public class CallbackServiceImpl implements CallbackService {
...
@@ -788,9 +788,9 @@ public class CallbackServiceImpl implements CallbackService {
ConsumerWallet
consumerWallet
=
consumerWalletService
.
getOne
(
new
LambdaQueryWrapper
<
ConsumerWallet
>()
ConsumerWallet
consumerWallet
=
consumerWalletService
.
getOne
(
new
LambdaQueryWrapper
<
ConsumerWallet
>()
.
eq
(
ConsumerWallet:
:
getConsumerId
,
sharingActivities
.
getUid
()));
.
eq
(
ConsumerWallet:
:
getConsumerId
,
sharingActivities
.
getUid
()));
if
(
ObjectUtil
.
isNotEmpty
(
consumerWallet
))
{
if
(
ObjectUtil
.
isNotEmpty
(
consumerWallet
))
{
BigDecimal
aEquityFund
=
consumerWallet
.
getEquityFund
()
!=
null
?
consumerWallet
.
getEquityFund
()
:
BigDecimal
.
ZERO
;
BigDecimal
aEquityFund
=
ObjectUtil
.
isNotEmpty
(
consumerWallet
.
getEquityFund
())
?
consumerWallet
.
getEquityFund
()
:
BigDecimal
.
ZERO
;
consumerWallet
.
setEquityFund
(
aEquityFund
.
add
(
addEquityFund
));
consumerWallet
.
setEquityFund
(
aEquityFund
.
add
(
addEquityFund
));
BigDecimal
accumulateEquityFund
=
consumerWallet
.
getAccumulateEquityFund
()
!=
null
?
consumerWallet
.
getAccumulateEquityFund
()
:
BigDecimal
.
ZERO
;
BigDecimal
accumulateEquityFund
=
ObjectUtil
.
isNotEmpty
(
consumerWallet
.
getAccumulateEquityFund
())
?
consumerWallet
.
getAccumulateEquityFund
()
:
BigDecimal
.
ZERO
;
consumerWallet
.
setAccumulateEquityFund
(
accumulateEquityFund
.
consumerWallet
.
setAccumulateEquityFund
(
accumulateEquityFund
.
add
(
addEquityFund
));
add
(
addEquityFund
));
consumerWallet
.
setUpdateTime
(
DateUtils
.
getNowDate
());
consumerWallet
.
setUpdateTime
(
DateUtils
.
getNowDate
());
...
...
share-system/src/main/java/share/system/service/impl/SConsumerServiceImpl.java
View file @
e084d814
...
@@ -254,6 +254,7 @@ public class SConsumerServiceImpl extends ServiceImpl<SConsumerMapper, SConsumer
...
@@ -254,6 +254,7 @@ public class SConsumerServiceImpl extends ServiceImpl<SConsumerMapper, SConsumer
vo
.
setIsManage
(
true
);
vo
.
setIsManage
(
true
);
}
}
if
(
ObjectUtil
.
isNull
(
currentUser
))
{
if
(
ObjectUtil
.
isNull
(
currentUser
))
{
throw
new
BaseException
(
"您的登录已过期,请先登录"
);
throw
new
BaseException
(
"您的登录已过期,请先登录"
);
}
}
...
...
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
e084d814
This diff is collapsed.
Click to expand it.
share-system/src/main/java/share/system/service/impl/SharingActivitiesServiceImpl.java
View file @
e084d814
...
@@ -60,6 +60,7 @@ public class SharingActivitiesServiceImpl extends ServiceImpl<SharingActivitiesM
...
@@ -60,6 +60,7 @@ public class SharingActivitiesServiceImpl extends ServiceImpl<SharingActivitiesM
@Override
@Override
public
List
<
SharingActivities
>
selectSharingActivitiesList
(
SharingActivities
sharingActivities
)
public
List
<
SharingActivities
>
selectSharingActivitiesList
(
SharingActivities
sharingActivities
)
{
{
return
sharingActivitiesMapper
.
selectSharingActivitiesList
(
sharingActivities
);
return
sharingActivitiesMapper
.
selectSharingActivitiesList
(
sharingActivities
);
}
}
...
@@ -118,6 +119,13 @@ public class SharingActivitiesServiceImpl extends ServiceImpl<SharingActivitiesM
...
@@ -118,6 +119,13 @@ public class SharingActivitiesServiceImpl extends ServiceImpl<SharingActivitiesM
return
sharingActivitiesMapper
.
deleteSharingActivitiesById
(
id
);
return
sharingActivitiesMapper
.
deleteSharingActivitiesById
(
id
);
}
}
@Override
public
int
selectSharingActivitiesCount
(
SharingActivities
sharingActivities
)
{
return
sharingActivitiesMapper
.
selectCount
(
new
LambdaQueryWrapper
<
SharingActivities
>()
.
eq
(
SharingActivities:
:
getUid
,
sharingActivities
.
getUid
())
.
eq
(
SharingActivities:
:
getIsDelete
,
YesNoEnum
.
no
.
getIndex
()));
}
}
}
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