|
|
|
@ -20,12 +20,12 @@ public class BaseServiceImpl<M extends BaseMapper<T>, T extends BaseEntity> exte |
|
|
|
|
user.setCustomerId(Long.parseLong("3009473735814009")); |
|
|
|
|
if (user != null) { |
|
|
|
|
entity.setCreatedBy(user.getCustomerId()); |
|
|
|
|
entity.setUpdateBy(user.getCustomerId()); |
|
|
|
|
entity.setUpdatedBy(user.getCustomerId()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Date now = new Date(); |
|
|
|
|
entity.setCreateAt(now); |
|
|
|
|
entity.setUpdateAt(now); |
|
|
|
|
entity.setCreatedAt(now); |
|
|
|
|
entity.setUpdatedAt(now); |
|
|
|
|
if (entity.getStatus() == null) { |
|
|
|
|
entity.setStatus(1); |
|
|
|
|
} |
|
|
|
@ -37,10 +37,10 @@ public class BaseServiceImpl<M extends BaseMapper<T>, T extends BaseEntity> exte |
|
|
|
|
public boolean updateById(T entity) { |
|
|
|
|
Customer user = new Customer(); |
|
|
|
|
if (user != null) { |
|
|
|
|
entity.setUpdateBy(user.getCustomerId()); |
|
|
|
|
entity.setUpdatedBy(user.getCustomerId()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
entity.setUpdateAt(new Date()); |
|
|
|
|
entity.setUpdatedAt(new Date()); |
|
|
|
|
return super.updateById(entity); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|