Parcourir la source

Merge branch 'develop' of http://192.168.11.14:51037/gitadmin/tuoheng_freeway into develop

tags/v1.1.0^2
wanjing il y a 1 an
Parent
révision
75f7ce1e69
1 fichiers modifiés avec 7 ajouts et 1 suppressions
  1. +7
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/road/RoadInformationServiceImpl.java

+ 7
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/road/RoadInformationServiceImpl.java Voir le fichier

@@ -127,7 +127,13 @@ public class RoadInformationServiceImpl extends BaseServiceImpl<RoadInformationM
entity.setTenantId(CurrentUserUtil.getTenantId());
} else {
//更新
if (this.getInformationListByCode(entity)) return JsonResult.error("公路已存在");
RoadInformation roadInformation = this.getOne(Wrappers.<RoadInformation>lambdaQuery().eq(RoadInformation::getId, entity.getId()));
String code = entity.getCode();
//当前公路的code是否重复判断
if(!code.equals(roadInformation.getCode())){
//code如果不存在则查询数据库中公路列表是否有重复的code
if (this.getInformationListByCode(entity)) return JsonResult.error("公路已存在");
}
entity.setUpdateUser(userId);
entity.setUpdateTime(DateUtils.now());
entity.setTenantId(CurrentUserUtil.getTenantId());

Chargement…
Annuler
Enregistrer