From 5190cd48673c7250828484265daefae3f6c4e25b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E7=90=A6=E6=B6=9B?= Date: Mon, 13 Mar 2023 14:08:21 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90fix=20sonar=E3=80=91AuthColumnVO?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/online/auth/vo/AuthColumnVO.java | 32 +++++++++++++------ 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/jero-boot/jero-boot-base/jero-boot-base-generater/src/main/java/com/jero/generater/modules/online/auth/vo/AuthColumnVO.java b/jero-boot/jero-boot-base/jero-boot-base-generater/src/main/java/com/jero/generater/modules/online/auth/vo/AuthColumnVO.java index a71d1f30..2f003b08 100644 --- a/jero-boot/jero-boot-base/jero-boot-base-generater/src/main/java/com/jero/generater/modules/online/auth/vo/AuthColumnVO.java +++ b/jero-boot/jero-boot-base/jero-boot-base-generater/src/main/java/com/jero/generater/modules/online/auth/vo/AuthColumnVO.java @@ -1,7 +1,10 @@ package com.jero.generater.modules.online.auth.vo; import java.io.Serializable; +import java.util.Objects; + import com.jero.generater.modules.online.cgform.entity.OnlCgformField; +import org.jetbrains.annotations.Nullable; public class AuthColumnVO implements Serializable { private static final long serialVersionUID = 5445993027926933917L; @@ -48,49 +51,58 @@ public class AuthColumnVO implements Serializable { if (getSwitchFlag() != authColumnVO.getSwitchFlag()) { return false; } + Boolean x = getaBoolean(authColumnVO); + if (x != null) { + return x; + } + return false; + } + + @Nullable + private Boolean getaBoolean(AuthColumnVO authColumnVO) { Integer type2 = getType(); Integer type3 = authColumnVO.getType(); - if (type2 != null ? !type2.equals(type3) : type3 != null) { + if (!Objects.equals(type2, type3)) { return false; } Integer status2 = getStatus(); Integer status3 = authColumnVO.getStatus(); - if (status2 != null ? !status2.equals(status3) : status3 != null) { + if (!Objects.equals(status2, status3)) { return false; } Integer isShowForm2 = getIsShowForm(); Integer isShowForm3 = authColumnVO.getIsShowForm(); - if (isShowForm2 != null ? !isShowForm2.equals(isShowForm3) : isShowForm3 != null) { + if (!Objects.equals(isShowForm2, isShowForm3)) { return false; } Integer isShowList2 = getIsShowList(); Integer isShowList3 = authColumnVO.getIsShowList(); - if (isShowList2 != null ? !isShowList2.equals(isShowList3) : isShowList3 != null) { + if (!Objects.equals(isShowList2, isShowList3)) { return false; } String id2 = getId(); String id3 = authColumnVO.getId(); - if (id2 != null ? !id2.equals(id3) : id3 != null) { + if (!Objects.equals(id2, id3)) { return false; } String cgformId2 = getCgformId(); String cgformId3 = authColumnVO.getCgformId(); - if (cgformId2 != null ? !cgformId2.equals(cgformId3) : cgformId3 != null) { + if (!Objects.equals(cgformId2, cgformId3)) { return false; } String code2 = getCode(); String code3 = authColumnVO.getCode(); - if (code2 != null ? !code2.equals(code3) : code3 != null) { + if (!Objects.equals(code2, code3)) { return false; } String title2 = getTitle(); String title3 = authColumnVO.getTitle(); - if (title2 != null ? !title2.equals(title3) : title3 != null) { + if (!Objects.equals(title2, title3)) { return false; } String tableName2 = getTableName(); String tableName3 = authColumnVO.getTableName(); - if (tableName2 != null ? !tableName2.equals(tableName3) : tableName3 != null) { + if (!Objects.equals(tableName2, tableName3)) { return false; } String tableNameTxt2 = getTableNameTxt(); @@ -102,7 +114,7 @@ public class AuthColumnVO implements Serializable { } else if (tableNameTxt2.equals(tableNameTxt3)) { return true; } - return false; + return null; } public int hashCode() {