This commit is contained in:
wangliwen 2022-08-08 14:47:15 +08:00
parent 33c2b30a60
commit f7af710466
1 changed files with 3 additions and 1 deletions

View File

@ -683,7 +683,9 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
resourceDao.update(entity, updateWrapper); resourceDao.update(entity, updateWrapper);
Integer num = jdbcTemplate.queryForObject("SELECT round(tb_data_resource_assignmark.total) FROM tb_data_resource_assignmark WHERE id =" + id, Integer.class); Integer num = jdbcTemplate.queryForObject("SELECT round(tb_data_resource_assignmark.total) FROM tb_data_resource_assignmark WHERE id =" + id, Integer.class);
if (num == null) {
return;
}
String sql = String.format("update tb_data_resource SET total = %d WHERE id = %s", num.intValue(), id.toString()); String sql = String.format("update tb_data_resource SET total = %d WHERE id = %s", num.intValue(), id.toString());
jdbcTemplate.update(sql); jdbcTemplate.update(sql);