Commit 3e06b5af7c00ad4354d5b83487679e00b6308394
1 parent
ad153921
线路版本更新日志
Showing
2 changed files
with
9 additions
and
10 deletions
src/main/java/com/bsth/data/LineVersionsData.java
| 1 | 1 | package com.bsth.data; |
| 2 | 2 | |
| 3 | -import java.util.HashMap; | |
| 4 | -import java.util.List; | |
| 5 | -import java.util.Map; | |
| 6 | - | |
| 3 | +import com.bsth.entity.LineVersions; | |
| 4 | +import com.bsth.service.LineVersionsService; | |
| 5 | +import com.bsth.service.StationRouteService; | |
| 7 | 6 | import org.slf4j.Logger; |
| 8 | 7 | import org.slf4j.LoggerFactory; |
| 9 | 8 | import org.springframework.beans.factory.annotation.Autowired; |
| 10 | -import org.springframework.boot.CommandLineRunner; | |
| 11 | 9 | import org.springframework.core.annotation.Order; |
| 12 | 10 | import org.springframework.stereotype.Component; |
| 13 | 11 | |
| 14 | -import com.bsth.entity.LineVersions; | |
| 15 | -import com.bsth.service.LineVersionsService; | |
| 16 | -import com.bsth.service.StationRouteService; | |
| 12 | +import java.util.HashMap; | |
| 13 | +import java.util.List; | |
| 14 | +import java.util.Map; | |
| 17 | 15 | |
| 18 | 16 | /** |
| 19 | 17 | * @ClassName: LineVersionsData |
| ... | ... | @@ -25,10 +23,9 @@ public class LineVersionsData extends Thread { |
| 25 | 23 | |
| 26 | 24 | static Logger logger = LoggerFactory.getLogger(LineVersionsData.class); |
| 27 | 25 | |
| 28 | - | |
| 29 | 26 | @Autowired |
| 30 | 27 | LineVersionsService lineVersionsService; |
| 31 | - | |
| 28 | + | |
| 32 | 29 | @Autowired |
| 33 | 30 | StationRouteService stationRouteService; |
| 34 | 31 | ... | ... |
src/main/java/com/bsth/service/impl/LineVersionsServiceImpl.java
| ... | ... | @@ -202,6 +202,8 @@ public class LineVersionsServiceImpl extends BaseServiceImpl<LineVersions, Integ |
| 202 | 202 | // 更新线路版本 |
| 203 | 203 | repository.updateOdlVersions(lineId, lineCode); |
| 204 | 204 | repository.updateNewVersions(lineId,lineCode,versions); |
| 205 | + // 记录版本更新日志 | |
| 206 | + jdbcTemplate.update("INSERT into bsth_c_line_versions_enablog(line_code,`line_versions`,`t`) VALUES (?,?,?)",lineCode,versions, lineVersions.getStartDate().getTime()); | |
| 205 | 207 | } |
| 206 | 208 | } |
| 207 | 209 | return list; | ... | ... |