Browse Source

根据租户信息

tags/v1.0.0^2
chengwang 1 year ago
parent
commit
51d0f05f1a
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/road/RoadInformationServiceImpl.java

+ 5
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/road/RoadInformationServiceImpl.java View File

@@ -115,14 +115,19 @@ public class RoadInformationServiceImpl extends BaseServiceImpl<RoadInformationM
if(StringUtils.isEmpty(userId)){
throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL);
}
if(StringUtils.isEmpty(CurrentUserUtil.getTenantId())){
throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL);
}
if (StringUtils.isEmpty(entity.getId())) {
//新增
entity.setCreateUser(userId);
entity.setCreateTime(DateUtils.now());
entity.setTenantId(CurrentUserUtil.getTenantId());
} else {
//更新
entity.setUpdateUser(userId);
entity.setUpdateTime(DateUtils.now());
entity.setTenantId(CurrentUserUtil.getTenantId());
}
super.edit(entity);


Loading…
Cancel
Save