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
b060b896
Commit
b060b896
authored
Oct 30, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into test
parents
d81f6dbf
0d730371
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
42 additions
and
13 deletions
+42
-13
RedisTask.java
share-quartz/src/main/java/share/quartz/task/RedisTask.java
+25
-0
MonthlyCardConf.java
...em/src/main/java/share/system/domain/MonthlyCardConf.java
+2
-3
MonthlyCardLog.java
...tem/src/main/java/share/system/domain/MonthlyCardLog.java
+2
-3
SecondaryCardConf.java
.../src/main/java/share/system/domain/SecondaryCardConf.java
+2
-3
SecondaryCardLog.java
...m/src/main/java/share/system/domain/SecondaryCardLog.java
+2
-3
ConsumerMonthlyCardServiceImpl.java
...e/system/service/impl/ConsumerMonthlyCardServiceImpl.java
+9
-1
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+0
-0
No files found.
share-quartz/src/main/java/share/quartz/task/RedisTask.java
View file @
b060b896
...
...
@@ -802,6 +802,31 @@ public class RedisTask {
logger
.
debug
(
"AutomaticallyMonthlyCard:自动结束月卡结束"
);
}
//每日00:00:00增加时长
@XxlJob
(
"AutoMonthlyCardTime"
)
public
void
AutoMonthlyCardTime
()
{
logger
.
debug
(
"AutoMonthlyCardTime:自动增加月卡时长开始"
);
Set
<
String
>
keys
=
redisTemplate
.
keys
(
ReceiptRdeisEnum
.
MONTHLY_CARD
.
getValue
()
+
"*"
);
if
(
keys
.
size
()
==
0
)
return
;
List
<
ConsumerMonthlyCard
>
consumerMonthlyCards
=
new
ArrayList
<>();
String
monthlyCardTime
=
sysConfigService
.
selectConfigByKey
(
"monthlyCardTime"
);
keys
.
stream
().
forEach
(
key
->
{
String
value
=
redisUtil
.
get
(
String
.
valueOf
(
key
));
JSONObject
jsonObject
=
new
JSONObject
(
value
);
Date
expirationTime
=
jsonObject
.
getDate
(
"expirationTime"
);
Long
consumerMonthlyCardId
=
jsonObject
.
getLong
(
"consumerMonthlyCardId"
);
if
(
expirationTime
.
getTime
()
>
new
Date
().
getTime
())
{
ConsumerMonthlyCard
consumerMonthlyCard
=
new
ConsumerMonthlyCard
();
consumerMonthlyCard
.
setFreeDuration
(
new
BigDecimal
(
monthlyCardTime
));
consumerMonthlyCard
.
setId
(
consumerMonthlyCardId
);
consumerMonthlyCards
.
add
(
consumerMonthlyCard
);
}
});
if
(!
CollectionUtils
.
isEmpty
(
consumerMonthlyCards
))
consumerMonthlyCardService
.
updateBatchById
(
consumerMonthlyCards
);
logger
.
debug
(
"AutoMonthlyCardTime:自动增加月卡时长结束"
);
}
@XxlJob
(
"AutomaticallySecondaryCard"
)
public
void
AutomaticallySecondaryCard
()
{
logger
.
debug
(
"AutomaticallySecondaryCard:自动结束次卡开始"
);
...
...
share-system/src/main/java/share/system/domain/MonthlyCardConf.java
View file @
b060b896
package
share
.
system
.
domain
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableLogic
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.*
;
import
lombok.Data
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
...
...
@@ -25,6 +23,7 @@ public class MonthlyCardConf extends BaseEntity {
/**
* 主键
*/
@TableId
(
type
=
IdType
.
AUTO
)
private
Long
id
;
/**
...
...
share-system/src/main/java/share/system/domain/MonthlyCardLog.java
View file @
b060b896
package
share
.
system
.
domain
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableLogic
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.*
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
...
...
@@ -27,6 +25,7 @@ public class MonthlyCardLog extends BaseEntity {
/**
* 主键
*/
@TableId
(
type
=
IdType
.
AUTO
)
private
Long
id
;
/**
...
...
share-system/src/main/java/share/system/domain/SecondaryCardConf.java
View file @
b060b896
package
share
.
system
.
domain
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableLogic
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.*
;
import
lombok.Data
;
import
share.common.annotation.Excel
;
import
share.common.core.domain.BaseEntity
;
...
...
@@ -23,6 +21,7 @@ public class SecondaryCardConf extends BaseEntity {
/**
* 主键
*/
@TableId
(
type
=
IdType
.
AUTO
)
private
Long
id
;
/**
...
...
share-system/src/main/java/share/system/domain/SecondaryCardLog.java
View file @
b060b896
package
share
.
system
.
domain
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableLogic
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.*
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
...
...
@@ -26,6 +24,7 @@ public class SecondaryCardLog extends BaseEntity {
/**
* 主键
*/
@TableId
(
type
=
IdType
.
AUTO
)
private
Long
id
;
/**
...
...
share-system/src/main/java/share/system/service/impl/ConsumerMonthlyCardServiceImpl.java
View file @
b060b896
...
...
@@ -130,7 +130,7 @@ public class ConsumerMonthlyCardServiceImpl extends ServiceImpl<ConsumerMonthlyC
if
(
ObjectUtil
.
isNotEmpty
(
consumerMember
))
{
SRoom
room
=
roomService
.
getById
(
monthlyCardRequest
.
getRoomId
());
consumerMonthlyCard
=
baseMapper
.
selectOne
(
new
LambdaQueryWrapper
<
ConsumerMonthlyCard
>().
eq
(
ConsumerMonthlyCard:
:
getConsumerId
,
user
.
getId
()));
consumerMonthlyCard
=
baseMapper
.
selectOne
(
new
LambdaQueryWrapper
<
ConsumerMonthlyCard
>().
eq
(
ConsumerMonthlyCard:
:
getConsumerId
,
user
.
getId
())
.
gt
(
ConsumerMonthlyCard:
:
getFreeDuration
,
0
)
);
consumerSecondaryCard
=
consumerSecondaryCardService
.
list
(
new
LambdaQueryWrapper
<
ConsumerSecondaryCard
>().
eq
(
ConsumerSecondaryCard:
:
getConsumerId
,
user
.
getId
()).
orderByAsc
(
ConsumerSecondaryCard:
:
getNumber
));
if
(!
ObjectUtils
.
isEmpty
(
monthlyCardRequest
.
getRoomLabelId
()))
{
RoomLabel
roomLabel
=
roomLabelService
.
selectRoomLabelById
(
monthlyCardRequest
.
getRoomLabelId
());
...
...
@@ -165,6 +165,10 @@ public class ConsumerMonthlyCardServiceImpl extends ServiceImpl<ConsumerMonthlyC
}
});
}
if
(
ObjectUtil
.
isNotEmpty
(
consumerMonthlyCard
)
&&
consumerMonthlyCard
.
getFreeDuration
().
compareTo
(
new
BigDecimal
(
byId
.
getDuration
()))
==
0
)
{
consumerMonthlyCardList
.
add
(
consumerMonthlyCard
.
getId
());
map
.
put
(
"consumerMonthlyCard"
,
consumerMonthlyCardList
);
}
return
map
;
//标签绑定了套餐,套餐没开启,小时
}
else
{
...
...
@@ -188,6 +192,10 @@ public class ConsumerMonthlyCardServiceImpl extends ServiceImpl<ConsumerMonthlyC
}
});
}
if
(
ObjectUtil
.
isNotEmpty
(
consumerMonthlyCard
)
&&
consumerMonthlyCard
.
getFreeDuration
().
compareTo
(
new
BigDecimal
(
pack
.
getDuration
()))
==
0
)
{
consumerMonthlyCardList
.
add
(
consumerMonthlyCard
.
getId
());
map
.
put
(
"consumerMonthlyCard"
,
consumerMonthlyCardList
);
}
}
}
return
new
HashMap
<>();
...
...
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
b060b896
This diff is collapsed.
Click to expand it.
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