Commit 37b360e0 authored by Matija Obreza's avatar Matija Obreza
Browse files

Use user#id instead of user#uuid for lastModifiedBy, createdBy

parent 7d056d0e
......@@ -31,26 +31,24 @@ public abstract class AuditedModel extends BusinessModel {
private static final long serialVersionUID = -5927214471682331909L;
@CreatedBy
@Column(length = 36)
private String createdBy;
private Long createdBy;
@CreatedDate
@Column(name = "createdDate")
private Date createdDate;
@LastModifiedBy
@Column(length = 36)
private String lastModifiedBy;
private Long lastModifiedBy;
@LastModifiedDate
@Column(name = "lastModifiedDate")
private Date lastModifiedDate;
public String getCreatedBy() {
public Long getCreatedBy() {
return createdBy;
}
public void setCreatedBy(String createdBy) {
public void setCreatedBy(Long createdBy) {
this.createdBy = createdBy;
}
......@@ -62,11 +60,11 @@ public abstract class AuditedModel extends BusinessModel {
this.createdDate = createdDate;
}
public String getLastModifiedBy() {
public Long getLastModifiedBy() {
return lastModifiedBy;
}
public void setLastModifiedBy(String lastModifiedBy) {
public void setLastModifiedBy(Long lastModifiedBy) {
this.lastModifiedBy = lastModifiedBy;
}
......
......@@ -24,12 +24,12 @@ import org.springframework.data.domain.AuditorAware;
import org.springframework.stereotype.Component;
@Component("auditorAware")
public class SpringSecurityAuditorAware implements AuditorAware<String> {
public class SpringSecurityAuditorAware implements AuditorAware<Long> {
public static final Log LOG = LogFactory.getLog(SpringSecurityAuditorAware.class);
@Override
public String getCurrentAuditor() {
public Long getCurrentAuditor() {
User user = SecurityContextUtil.getCurrentUser();
return user == null ? null : user.getUuid();
return user == null ? null : user.getId();
}
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment