imdg частичный revert c1de35e101

This commit is contained in:
AKurakin 2023-01-18 13:10:41 +03:00
parent ecab3cbee2
commit e00969fa4b

View file

@ -100,7 +100,7 @@ public class CompanyMapStore extends BusinessObjectMapStore<Company> {
if (id == null)
return null;
List<CompanyInfo> results = jdbcTemplate.query(
"SELECT * FROM COMPANY_INFO WHERE company_id = ?", new Object[]{id}, // todo id=comapny.id? Или сделать отдельный ID?
"SELECT * FROM COMPANY_INFO WHERE id = ?", new Object[]{id}, // id=comapny_id
(rs, rowNum) -> {
CompanyInfo companyInfo = new CompanyInfo();
companyInfo.setId(rs.getObject("Id", Long.class));
@ -126,7 +126,8 @@ public class CompanyMapStore extends BusinessObjectMapStore<Company> {
if (onceObject == null) {
log.warn("No row in table COMPANY_INFO where id={}. Create empty ", id);
onceObject = new CompanyInfo();
onceObject.setCompanyId(id); // чтобы не потерять id
onceObject.setId(id); // чтобы не потерять id
onceObject.setCompanyId(id);
}
return onceObject;
}