Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Genesys PGR
Genesys Backend
Commits
37b360e0
Commit
37b360e0
authored
Jan 09, 2014
by
Matija Obreza
Browse files
Use user#id instead of user#uuid for lastModifiedBy, createdBy
parent
7d056d0e
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/genesys2/server/model/AuditedModel.java
View file @
37b360e0
...
...
@@ -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
Stri
ng
getCreatedBy
()
{
public
Lo
ng
getCreatedBy
()
{
return
createdBy
;
}
public
void
setCreatedBy
(
Stri
ng
createdBy
)
{
public
void
setCreatedBy
(
Lo
ng
createdBy
)
{
this
.
createdBy
=
createdBy
;
}
...
...
@@ -62,11 +60,11 @@ public abstract class AuditedModel extends BusinessModel {
this
.
createdDate
=
createdDate
;
}
public
Stri
ng
getLastModifiedBy
()
{
public
Lo
ng
getLastModifiedBy
()
{
return
lastModifiedBy
;
}
public
void
setLastModifiedBy
(
Stri
ng
lastModifiedBy
)
{
public
void
setLastModifiedBy
(
Lo
ng
lastModifiedBy
)
{
this
.
lastModifiedBy
=
lastModifiedBy
;
}
...
...
src/main/java/org/genesys2/server/service/audit/SpringSecurityAuditorAware.java
View file @
37b360e0
...
...
@@ -24,12 +24,12 @@ import org.springframework.data.domain.AuditorAware;
import
org.springframework.stereotype.Component
;
@Component
(
"auditorAware"
)
public
class
SpringSecurityAuditorAware
implements
AuditorAware
<
Stri
ng
>
{
public
class
SpringSecurityAuditorAware
implements
AuditorAware
<
Lo
ng
>
{
public
static
final
Log
LOG
=
LogFactory
.
getLog
(
SpringSecurityAuditorAware
.
class
);
@Override
public
Stri
ng
getCurrentAuditor
()
{
public
Lo
ng
getCurrentAuditor
()
{
User
user
=
SecurityContextUtil
.
getCurrentUser
();
return
user
==
null
?
null
:
user
.
get
Uui
d
();
return
user
==
null
?
null
:
user
.
get
I
d
();
}
}
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment