|
|
@@ -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); |
|
|
|
|