Commit 522ff038 by 王军业

[定时器]

1 parent c7027851
......@@ -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();
}
}
......@@ -22,4 +22,5 @@ public interface ContractMapper {
Boolean isDelete(String contract_unid);
List<ExportModel> exportContracts(SelectVo selectVo);
void actualDeleteOne(String contract_unid);
String timeUpdate();
}
......@@ -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>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!