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
0bace13c
Commit
0bace13c
authored
Jul 14, 2022
by
liucx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
清零
parent
3d979df7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
76 additions
and
3 deletions
+76
-3
CommunicationRecordStatisticalLogService.java
...llowAccount/CommunicationRecordStatisticalLogService.java
+15
-0
CommunicationRecordStatisticalLogServiceImpl.java
...nt/impl/CommunicationRecordStatisticalLogServiceImpl.java
+32
-0
TimedTaskController.java
...ech/telmarket/task/communication/TimedTaskController.java
+29
-3
No files found.
src/main/java/com/zfxftech/telmarket/service/followAccount/CommunicationRecordStatisticalLogService.java
View file @
0bace13c
...
@@ -21,4 +21,19 @@ public interface CommunicationRecordStatisticalLogService {
...
@@ -21,4 +21,19 @@ public interface CommunicationRecordStatisticalLogService {
* 更新周数据
* 更新周数据
*/
*/
void
saveOrUpdateWeek
();
void
saveOrUpdateWeek
();
/**
* 每天清零
*/
void
dayCommunicationReset
();
/**
* 每周清零
*/
void
weekCommunicationReset
();
/**
* 每月清零
*/
void
mothCommunicationReset
();
}
}
src/main/java/com/zfxftech/telmarket/service/followAccount/impl/CommunicationRecordStatisticalLogServiceImpl.java
View file @
0bace13c
...
@@ -114,6 +114,38 @@ public class CommunicationRecordStatisticalLogServiceImpl extends ServiceImpl<Co
...
@@ -114,6 +114,38 @@ public class CommunicationRecordStatisticalLogServiceImpl extends ServiceImpl<Co
this
.
updateAndSave
(
list
,
"week"
);
this
.
updateAndSave
(
list
,
"week"
);
}
}
@Override
public
void
dayCommunicationReset
()
{
List
<
CommunicationRecordStatisticalLog
>
list
=
baseMapper
.
selectAll
();
for
(
CommunicationRecordStatisticalLog
communicationRecordStatisticalLog
:
list
)
{
CommunicationRecordStatisticalLog
update
=
new
CommunicationRecordStatisticalLog
();
update
.
setDayConut
(
0
);
update
.
setId
(
communicationRecordStatisticalLog
.
getId
());
updateById
(
update
);
}
}
@Override
public
void
weekCommunicationReset
()
{
List
<
CommunicationRecordStatisticalLog
>
list
=
baseMapper
.
selectAll
();
for
(
CommunicationRecordStatisticalLog
communicationRecordStatisticalLog
:
list
)
{
CommunicationRecordStatisticalLog
update
=
new
CommunicationRecordStatisticalLog
();
update
.
setWeekConut
(
0
);
update
.
setId
(
communicationRecordStatisticalLog
.
getId
());
updateById
(
update
);
}
}
@Override
public
void
mothCommunicationReset
()
{
List
<
CommunicationRecordStatisticalLog
>
list
=
baseMapper
.
selectAll
();
for
(
CommunicationRecordStatisticalLog
communicationRecordStatisticalLog
:
list
)
{
CommunicationRecordStatisticalLog
update
=
new
CommunicationRecordStatisticalLog
();
update
.
setMonthConut
(
0
);
update
.
setId
(
communicationRecordStatisticalLog
.
getId
());
updateById
(
update
);
}
}
}
}
src/main/java/com/zfxftech/telmarket/task/communication/TimedTaskController.java
View file @
0bace13c
package
com
.
zfxftech
.
telmarket
.
task
.
communication
;
package
com
.
zfxftech
.
telmarket
.
task
.
communication
;
import
com.zfxftech.telmarket.common.annotation.tokenAnnotation.JwtPassAnnotation
;
import
com.zfxftech.telmarket.common.bean.CommonResult
;
import
com.zfxftech.telmarket.common.bean.CommonResult
;
import
com.zfxftech.telmarket.service.followAccount.CommunicationRecordStatisticalLogService
;
import
com.zfxftech.telmarket.service.followAccount.CommunicationRecordStatisticalLogService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -29,21 +30,21 @@ public class TimedTaskController {
...
@@ -29,21 +30,21 @@ public class TimedTaskController {
@ApiOperation
(
value
=
"日统计沟通记录次数"
,
notes
=
"日统计沟通记录次数 "
,
httpMethod
=
"GET"
)
@ApiOperation
(
value
=
"日统计沟通记录次数"
,
notes
=
"日统计沟通记录次数 "
,
httpMethod
=
"GET"
)
@GetMapping
(
"
/
dayCommunication"
)
@GetMapping
(
"dayCommunication"
)
@Scheduled
(
cron
=
"0 25 12,15 * * ?"
)
@Scheduled
(
cron
=
"0 25 12,15 * * ?"
)
public
CommonResult
dayCommunicationCount
()
{
public
CommonResult
dayCommunicationCount
()
{
communicationRecordStatisticalLogService
.
saveOrUpdateDay
();
communicationRecordStatisticalLogService
.
saveOrUpdateDay
();
return
CommonResult
.
success
(
"日统计沟通记录次数成功"
);
return
CommonResult
.
success
(
"日统计沟通记录次数成功"
);
}
}
@ApiOperation
(
value
=
"周统计沟通记录次数"
,
notes
=
"周统计沟通记录次数 "
,
httpMethod
=
"GET"
)
@ApiOperation
(
value
=
"周统计沟通记录次数"
,
notes
=
"周统计沟通记录次数 "
,
httpMethod
=
"GET"
)
@GetMapping
(
"
/
weekCommunication"
)
@GetMapping
(
"weekCommunication"
)
@Scheduled
(
cron
=
"0 15 12,16 * * ?"
)
@Scheduled
(
cron
=
"0 15 12,16 * * ?"
)
public
CommonResult
weekCommunicationCount
()
{
public
CommonResult
weekCommunicationCount
()
{
communicationRecordStatisticalLogService
.
saveOrUpdateWeek
();
communicationRecordStatisticalLogService
.
saveOrUpdateWeek
();
return
CommonResult
.
success
(
"日统计沟通记录次数成功"
);
return
CommonResult
.
success
(
"日统计沟通记录次数成功"
);
}
}
@ApiOperation
(
value
=
"月统计沟通记录次数"
,
notes
=
"月统计沟通记录次数 "
,
httpMethod
=
"GET"
)
@ApiOperation
(
value
=
"月统计沟通记录次数"
,
notes
=
"月统计沟通记录次数 "
,
httpMethod
=
"GET"
)
@GetMapping
(
"
/
mothCommunication"
)
@GetMapping
(
"mothCommunication"
)
@Scheduled
(
cron
=
"0 20 12,16 * * ?"
)
@Scheduled
(
cron
=
"0 20 12,16 * * ?"
)
public
CommonResult
monthCommunicationCount
()
{
public
CommonResult
monthCommunicationCount
()
{
communicationRecordStatisticalLogService
.
saveOrUpdateMonth
();
communicationRecordStatisticalLogService
.
saveOrUpdateMonth
();
...
@@ -60,5 +61,30 @@ public class TimedTaskController {
...
@@ -60,5 +61,30 @@ public class TimedTaskController {
}
}
//---------------清零
@ApiOperation
(
value
=
"日清零"
,
notes
=
"日清零 "
,
httpMethod
=
"GET"
)
@GetMapping
(
"dayCommunicationReset"
)
@JwtPassAnnotation
@Scheduled
(
cron
=
"59 59 23 * * ? "
)
public
CommonResult
dayCommunicationReset
()
{
communicationRecordStatisticalLogService
.
dayCommunicationReset
();
return
CommonResult
.
success
(
"日统计记录清零成功"
);
}
@ApiOperation
(
value
=
"周清零"
,
notes
=
"周清零 "
,
httpMethod
=
"GET"
)
@GetMapping
(
"weekCommunicationReset"
)
@Scheduled
(
cron
=
"0 0 23 ? * 1"
)
public
CommonResult
weekCommunicationReset
()
{
communicationRecordStatisticalLogService
.
weekCommunicationReset
();
return
CommonResult
.
success
(
"日统计记录清零成功"
);
}
@ApiOperation
(
value
=
"月清零"
,
notes
=
"月清零 "
,
httpMethod
=
"GET"
)
@GetMapping
(
"mothCommunicationReset"
)
@Scheduled
(
cron
=
"0 0 23 L * ?"
)
public
CommonResult
mothCommunicationReset
()
{
communicationRecordStatisticalLogService
.
mothCommunicationReset
();
return
CommonResult
.
success
(
"日统计记录清零成功"
);
}
}
}
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