|
|
@ -44,10 +44,10 @@ public class JPAEntityListener {
|
|
|
|
@PrePersist
|
|
|
|
@PrePersist
|
|
|
|
public void setCreatedOn(JPABasePojo jpaBasePojo) {
|
|
|
|
public void setCreatedOn(JPABasePojo jpaBasePojo) {
|
|
|
|
log.info("Setting created on {}", jpaBasePojo);
|
|
|
|
log.info("Setting created on {}", jpaBasePojo);
|
|
|
|
jpaBasePojo.setCreateUser(getCurrentUser().getUserId());
|
|
|
|
jpaBasePojo.setCreateUser(getCurrentUser() != null ? getCurrentUser().getUserId() : "system");
|
|
|
|
jpaBasePojo.setUpdateUser(getCurrentUser().getUserId());
|
|
|
|
jpaBasePojo.setUpdateUser(getCurrentUser() != null ? getCurrentUser().getUserId() : "system");
|
|
|
|
jpaBasePojo.setCreateUserName(getCurrentUser().getNickName());
|
|
|
|
jpaBasePojo.setCreateUserName(getCurrentUser() != null ? getCurrentUser().getNickName() : "system");
|
|
|
|
jpaBasePojo.setUpdateUserName(getCurrentUser().getNickName());
|
|
|
|
jpaBasePojo.setUpdateUserName(getCurrentUser() != null ? getCurrentUser().getNickName() : "system");
|
|
|
|
jpaBasePojo.setCreateTime(LocalDateTime.now());
|
|
|
|
jpaBasePojo.setCreateTime(LocalDateTime.now());
|
|
|
|
jpaBasePojo.setUpdateTime(LocalDateTime.now());
|
|
|
|
jpaBasePojo.setUpdateTime(LocalDateTime.now());
|
|
|
|
jpaBasePojo.setId(String.valueOf(idWorkerStatic.nextId()));
|
|
|
|
jpaBasePojo.setId(String.valueOf(idWorkerStatic.nextId()));
|
|
|
@ -57,8 +57,8 @@ public class JPAEntityListener {
|
|
|
|
@PreUpdate
|
|
|
|
@PreUpdate
|
|
|
|
public void setUpdatedOn(JPABasePojo jpaBasePojo) {
|
|
|
|
public void setUpdatedOn(JPABasePojo jpaBasePojo) {
|
|
|
|
log.info("Setting updated on {}", jpaBasePojo);
|
|
|
|
log.info("Setting updated on {}", jpaBasePojo);
|
|
|
|
jpaBasePojo.setUpdateUser(getCurrentUser().getUserId());
|
|
|
|
jpaBasePojo.setUpdateUser(getCurrentUser() != null ? getCurrentUser().getUserId() : "system");
|
|
|
|
jpaBasePojo.setUpdateUserName(getCurrentUser().getNickName());
|
|
|
|
jpaBasePojo.setUpdateUserName(getCurrentUser() != null ? getCurrentUser().getNickName() : "system");
|
|
|
|
jpaBasePojo.setUpdateTime(LocalDateTime.now());
|
|
|
|
jpaBasePojo.setUpdateTime(LocalDateTime.now());
|
|
|
|
|
|
|
|
|
|
|
|
if(jpaBasePojo.getDelFlag() == 2) {
|
|
|
|
if(jpaBasePojo.getDelFlag() == 2) {
|
|
|
|