Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
platform
/
finance_serv
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 522ff038
authored
Sep 11, 2018
by
王军业
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[定时器]
1 parent
c7027851
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletions
code/finance_serv/src/main/java/com/vion/financial/handler/Timer.java
code/finance_serv/src/main/java/com/vion/financial/mapper/ContractMapper.java
code/finance_serv/src/main/java/com/vion/financial/mapping/ContractMapper.xml
code/finance_serv/src/main/java/com/vion/financial/handler/Timer.java
View file @
522ff03
...
...
@@ -2,15 +2,20 @@ package com.vion.financial.handler;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
import
com.vion.financial.mapper.ContractMapper
;
@Component
public
class
Timer
{
@Autowired
ContractMapper
contractMapper
;
private
final
Logger
logger
=
LoggerFactory
.
getLogger
(
Timer
.
class
);
@Scheduled
(
fixedRate
=
7200000
)
public
void
start
()
{
contractMapper
.
timeUpdate
();
}
}
code/finance_serv/src/main/java/com/vion/financial/mapper/ContractMapper.java
View file @
522ff03
...
...
@@ -22,4 +22,5 @@ public interface ContractMapper {
Boolean
isDelete
(
String
contract_unid
);
List
<
ExportModel
>
exportContracts
(
SelectVo
selectVo
);
void
actualDeleteOne
(
String
contract_unid
);
String
timeUpdate
();
}
code/finance_serv/src/main/java/com/vion/financial/mapping/ContractMapper.xml
View file @
522ff03
...
...
@@ -744,4 +744,8 @@
<delete
id=
"actualDeleteOne"
parameterType=
"String"
>
delete from tb_contract where contract_unid = #{contract_unid}
</delete>
<select
id=
"timeUpdate"
resultType=
"String"
>
select timing_update_amount_state()
</select>
</mapper>
Write
Preview
Markdown
is supported
Attach a file
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 post a comment