|
|
@ -29,10 +29,9 @@ public class ReactionRecordDBService { |
|
|
|
AppDebugHelperService appDebugHelperService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostConstruct |
|
|
|
void init() { |
|
|
|
if(appDebugHelperService.isDebug()) { |
|
|
|
if (appDebugHelperService.isDebug()) { |
|
|
|
ZSqliteJdbcHelper.forceDeleteTable(jdbcTemplate, tableName); |
|
|
|
ZSqliteJdbcHelper.createTable(jdbcTemplate, tableName, tClass); |
|
|
|
} |
|
|
@ -53,6 +52,10 @@ public class ReactionRecordDBService { |
|
|
|
ZSqliteJdbcHelper.addObj(jdbcTemplate, tableName, tClass, record); |
|
|
|
} |
|
|
|
|
|
|
|
public ReactionResultRecord findById(int recordid) { |
|
|
|
return jdbcTemplate.queryForObject("select * from " + tableName + " where id = ?", this::rowMapper, recordid); |
|
|
|
} |
|
|
|
|
|
|
|
public void update(ReactionResultRecord record) { |
|
|
|
ZSqliteJdbcHelper.updateObj(jdbcTemplate, tableName, tClass, record); |
|
|
|
} |
|
|
|