Browse Source

Merge branch 'develop' of gitadmin/tuoheng_freeway into release

tags/v1.0.0^2
chengwang 1 year ago
parent
commit
97693c91ea
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/section/SectionServiceImpl.java

+ 6
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/section/SectionServiceImpl.java View File

@@ -204,14 +204,20 @@ public class SectionServiceImpl extends BaseServiceImpl<SectionMapper, Section>
public JsonResult editInfo(Section entity) {
//超级管理员可以进行新增和编辑,普通用户不能进行此操作,部门管理员可以进行修改经纬度
String userId = CurrentUserUtil.getUserId();
String tenantId = CurrentUserUtil.getTenantId();
if(StringUtils.isEmpty(tenantId)){
return JsonResult.error("租户id为空");
}
if (StringUtils.isEmpty(entity.getId())) {
//新增
entity.setCreateTime(DateUtils.now());
entity.setCreateUser(userId);
entity.setTenantId(tenantId);
} else {
//更新
entity.setUpdateTime(DateUtils.now());
entity.setUpdateUser(userId);
entity.setTenantId(tenantId);
}
super.edit(entity);


Loading…
Cancel
Save