Browse Source

Merge branch 'develop' of gitadmin/tuoheng_freeway into release

tags/v1.1.0^2
chengwang 1 year ago
parent
commit
1218b9301b
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/road/RoadInformationServiceImpl.java

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

} }
if (StringUtils.isEmpty(entity.getId())) { if (StringUtils.isEmpty(entity.getId())) {
//新增 //新增
if (this.getInformationListByCode(entity)) return JsonResult.error("公路代号存在不能重复");
if (this.getInformationListByCode(entity)) return JsonResult.error("公路已存在");
entity.setCreateUser(userId); entity.setCreateUser(userId);
entity.setCreateTime(DateUtils.now()); entity.setCreateTime(DateUtils.now());
entity.setTenantId(CurrentUserUtil.getTenantId()); entity.setTenantId(CurrentUserUtil.getTenantId());
} else { } else {
//更新 //更新
if (this.getInformationListByCode(entity)) return JsonResult.error("公路代号存在不能重复");
if (this.getInformationListByCode(entity)) return JsonResult.error("公路已存在");
entity.setUpdateUser(userId); entity.setUpdateUser(userId);
entity.setUpdateTime(DateUtils.now()); entity.setUpdateTime(DateUtils.now());
entity.setTenantId(CurrentUserUtil.getTenantId()); entity.setTenantId(CurrentUserUtil.getTenantId());

Loading…
Cancel
Save