Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
S
stockPriceTack
Project
Project
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
刘长帅
stockPriceTack
Commits
b48c7b47
Commit
b48c7b47
authored
Jun 08, 2022
by
liucx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改时间
parent
9c06710c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
65 deletions
+0
-65
FollowAccountYieldsRecordTask.java
...ket/task/followAccount/FollowAccountYieldsRecordTask.java
+0
-65
No files found.
src/main/java/com/zfxftech/telmarket/task/followAccount/FollowAccountYieldsRecordTask.java
deleted
100644 → 0
View file @
9c06710c
package
com
.
zfxftech
.
telmarket
.
task
.
followAccount
;
import
com.zfxf.tools.wechat.helper.api.TemplateKeyWordBuilder
;
import
com.zfxftech.telmarket.common.config.CommonConfig
;
import
com.zfxftech.telmarket.common.enums.followAccount.FollowAccountOrderTypeEnum
;
import
com.zfxftech.telmarket.common.enums.remind.InformTypeEnums
;
import
com.zfxftech.telmarket.common.pojo.dao.followAccount.FollowAccount
;
import
com.zfxftech.telmarket.common.pojo.dao.followAccount.FollowAccountStockOrder
;
import
com.zfxftech.telmarket.common.pojo.dao.followAccount.FollowAccountYieldsRecord
;
import
com.zfxftech.telmarket.common.pojo.dao.permission.UsAdmin
;
import
com.zfxftech.telmarket.common.util.DateUtil
;
import
com.zfxftech.telmarket.service.UsAdminService
;
import
com.zfxftech.telmarket.service.business.WeChatTemplateMessageService
;
import
com.zfxftech.telmarket.service.followAccount.FollowAccountPositionInfoService
;
import
com.zfxftech.telmarket.service.followAccount.FollowAccountService
;
import
com.zfxftech.telmarket.service.followAccount.FollowAccountYieldsRecordService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.concurrent.CompletableFuture
;
/**
* Create time: 2022/2/3
*/
@EnableScheduling
@Component
@Slf4j
public
class
FollowAccountYieldsRecordTask
{
@Resource
FollowAccountService
followAccountService
;
@Resource
FollowAccountYieldsRecordService
followAccountYieldsRecordService
;
@Resource
CommonConfig
commonConfig
;
@Scheduled
(
cron
=
"0 05 15 ? * MON-FRI"
)
private
void
followAccountYieldsRecordRunTask
()
{
if
(
commonConfig
.
getFollowAccountDayRecordsTaskSwitch
()
!=
null
&&
commonConfig
.
getFollowAccountDayRecordsTaskSwitch
().
equals
(
"run"
))
{
try
{
log
.
info
(
"开始计算并生成跟投账户每日盈亏记录"
);
Date
startTime
=
new
Date
();
List
<
FollowAccount
>
list
=
followAccountService
.
getAllFollowAccount
();
for
(
FollowAccount
followAccount
:
list
)
{
followAccountYieldsRecordService
.
addFollowAccountYieldsRecord
(
followAccount
);
}
log
.
info
(
"跟投账户每日盈亏记录生成完成————开始计算每日月评分各项指标排名及评分"
);
followAccountYieldsRecordService
.
orderFollowAccountYieldsRecord
();
log
.
info
(
"每日月评分各项指标排名计算完成————开始计算每日月评分 共耗时:"
+
DateUtil
.
calculateTimeGapSecond
(
startTime
,
new
Date
()));
}
catch
(
Exception
e
)
{
log
.
error
(
"跟投账户每日盈亏记录生成失败"
,
e
);
}
}
}
}
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