Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cust-api
Project
Project
Details
Activity
Releases
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
李伟
cust-api
Commits
e33fb70c
Commit
e33fb70c
authored
Jan 22, 2025
by
gaoyingwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 定时
parent
bc9e1526
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
659 additions
and
740 deletions
+659
-740
CmsOrderServiceImpl.java
...t/business/cmsOrder/service/impl/CmsOrderServiceImpl.java
+599
-0
ActivitySyncSchedule.java
.../java/org/rcisoft/core/schedule/ActivitySyncSchedule.java
+0
-46
OrderSyncSchedule.java
...ain/java/org/rcisoft/core/schedule/OrderSyncSchedule.java
+0
-694
ScheduleTasks.java
src/main/java/org/rcisoft/core/schedule/ScheduleTasks.java
+60
-0
No files found.
src/main/java/org/rcisoft/business/cmsOrder/service/impl/CmsOrderServiceImpl.java
View file @
e33fb70c
This diff is collapsed.
Click to expand it.
src/main/java/org/rcisoft/core/schedule/ActivitySyncSchedule.java
deleted
100644 → 0
View file @
bc9e1526
package
org
.
rcisoft
.
core
.
schedule
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
lombok.extern.slf4j.Slf4j
;
import
org.rcisoft.business.cmsActivity.dao.CmsActivityRepository
;
import
org.rcisoft.business.cmsActivity.entity.CmsActivity
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Isolation
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.Date
;
import
java.util.List
;
@Component
@Slf4j
public
class
ActivitySyncSchedule
{
@Autowired
private
CmsActivityRepository
activityInfoRepository
;
//定时同步活动状态结束
// @Scheduled(cron = "0 0/10 * * * ?")
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
public
void
execute
()
{
// 查询DB中的未删除的活动
QueryWrapper
<
CmsActivity
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
eq
(
"del_flag"
,
0
);
List
<
CmsActivity
>
list
=
activityInfoRepository
.
selectList
(
wrapper
);
for
(
CmsActivity
activityInfo
:
list
)
{
//如果活动结束时间已过,改状态为已过期
if
(
activityInfo
.
getEndTime
().
before
(
new
Date
()))
{
CmsActivity
info
=
new
CmsActivity
();
info
.
setBusinessId
(
activityInfo
.
getBusinessId
());
// info.setStatus(2);
// activityInfoRepository.updateById(info);
}
}
}
}
src/main/java/org/rcisoft/core/schedule/OrderSyncSchedule.java
deleted
100644 → 0
View file @
bc9e1526
This diff is collapsed.
Click to expand it.
src/main/java/org/rcisoft/core/schedule/ScheduleTasks.java
View file @
e33fb70c
package
org
.
rcisoft
.
core
.
schedule
;
import
lombok.extern.slf4j.Slf4j
;
import
org.jdom.JDOMException
;
import
org.rcisoft.business.cmsOrder.service.impl.CmsOrderServiceImpl
;
import
org.rcisoft.business.memInfo.bean.MemberInfoRedisBean
;
import
org.rcisoft.business.memInfo.dao.MemInfoRepository
;
import
org.rcisoft.business.memInfo.entity.MemLikeDTO
;
...
...
@@ -13,6 +15,8 @@ import org.springframework.scheduling.annotation.EnableScheduling;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
import
java.io.IOException
;
import
java.security.NoSuchAlgorithmException
;
import
java.util.Map
;
import
java.util.Set
;
...
...
@@ -23,6 +27,8 @@ public class ScheduleTasks {
@Autowired
private
MemInfoServiceImpl
memInfoService
;
@Autowired
private
CmsOrderServiceImpl
orderService
;
/**
* 用户点赞数据定时任务 将点赞数据同步到对应的表中
...
...
@@ -32,4 +38,58 @@ public class ScheduleTasks {
public
void
userLikeSchedule
()
{
memInfoService
.
userLikeSchedule
();
}
/**
* redis订单落库
*/
@Scheduled
(
cron
=
"0 0/1 * * * ?"
)
public
void
executeInsertOrder
()
throws
NoSuchAlgorithmException
{
orderService
.
executeInsertOrder
();
}
/**
* redis订单关闭
*/
@Scheduled
(
cron
=
"0 0/1 * * * ?"
)
public
void
executeCloseOrder
()
throws
NoSuchAlgorithmException
{
orderService
.
executeCloseOrder
();
}
/**
* 支付确认补救
*/
@Scheduled
(
cron
=
"0 0/15 * * * ?"
)
public
void
executePayOrder
()
throws
IOException
,
JDOMException
{
orderService
.
executePayOrder
();
}
/**
* 退款接口调用补救
*/
@Scheduled
(
cron
=
"0 0/30 * * * ?"
)
public
void
executeRefundOrder
()
{
orderService
.
executeRefundOrder
();
}
/**
* 退款确认补救
*/
@Scheduled
(
cron
=
"0 0/30 * * * ?"
)
public
void
executeRefundConfirmOrder
()
throws
IOException
,
JDOMException
{
orderService
.
executeRefundConfirmOrder
();
}
/**
* 订单缓存清除
*/
@Scheduled
(
cron
=
"0 0 1 * * ?"
)
public
void
executeDeleteOrder
()
{
orderService
.
executeDeleteOrder
();
}
}
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