updated code
This commit is contained in:
@@ -197,6 +197,7 @@ public class CompanyDocumentDao {
|
|||||||
DocumentCategoryEntity categoryEntity = categoryDao.validateCategory(companyDocumentRequest.getCategoryId());
|
DocumentCategoryEntity categoryEntity = categoryDao.validateCategory(companyDocumentRequest.getCategoryId());
|
||||||
setIfUpdated(companyDocumentEntity::getCategoryEntity, companyDocumentEntity::setCategoryEntity, categoryEntity);
|
setIfUpdated(companyDocumentEntity::getCategoryEntity, companyDocumentEntity::setCategoryEntity, categoryEntity);
|
||||||
}
|
}
|
||||||
|
setIfUpdated(companyDocumentEntity::getName, companyDocumentEntity::setName, companyDocumentRequest.getName());
|
||||||
companyDocumentRepository.save(companyDocumentEntity);
|
companyDocumentRepository.save(companyDocumentEntity);
|
||||||
|
|
||||||
/** This code is responsible for adding a version history log for the "updating company document" operation. **/
|
/** This code is responsible for adding a version history log for the "updating company document" operation. **/
|
||||||
|
|||||||
@@ -8,5 +8,6 @@ import java.time.LocalDateTime;
|
|||||||
@Data
|
@Data
|
||||||
public class CompanyDocumentRequest {
|
public class CompanyDocumentRequest {
|
||||||
private Long categoryId;
|
private Long categoryId;
|
||||||
|
private String name ;
|
||||||
private LocalDateTime expirationDate;
|
private LocalDateTime expirationDate;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user