Browse Source

Merge branch 'develop' of gitadmin/tuoheng_freeway into release

tags/v1.0.0^2
chengwang 1 year ago
parent
commit
fa258f8198
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/structure/StructureServiceImpl.java

+ 4
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/structure/StructureServiceImpl.java View File

if(StringUtils.isEmpty(entity.getRoadId()) && StringUtils.isEmpty(entity.getSectionId())){ if(StringUtils.isEmpty(entity.getRoadId()) && StringUtils.isEmpty(entity.getSectionId())){
return JsonResult.error("公路和路段为空"); return JsonResult.error("公路和路段为空");
} }
//获取租户id
String tenantId = CurrentUserUtil.getTenantId();
//查询用户信息 //查询用户信息
if(StringUtils.isEmpty(entity.getId())){ if(StringUtils.isEmpty(entity.getId())){
//新增 //新增
entity.setCreateTime(DateUtils.now()); entity.setCreateTime(DateUtils.now());
entity.setCreateUser(userId); entity.setCreateUser(userId);
entity.setTenantId(tenantId);
}else { }else {
//更新 //更新
entity.setUpdateTime(DateUtils.now()); entity.setUpdateTime(DateUtils.now());
entity.setUpdateUser(userId); entity.setUpdateUser(userId);
entity.setTenantId(tenantId);
} }
super.edit(entity); super.edit(entity);



Loading…
Cancel
Save