From d52ece745ebe19f97d24d807d64e9a7a601b77ce Mon Sep 17 00:00:00 2001 From: KonBAI <1527468660@qq.com> Date: 星期六, 22 一月 2022 15:00:58 +0800 Subject: [PATCH] !132 优化查询是否存在的方法,替换魔法值为已定义的常量 * fix 替换查询所有子部门数中魔法值为已定义的常量 * fix 1.修改查询是否存在的方法改为baseMapper.exists()方法查询。 2.将部分魔法值改为已定义的常量 --- ruoyi-common/src/main/java/com/ruoyi/common/annotation/Log.java | 30 +++++++++++++++--------------- 1 files changed, 15 insertions(+), 15 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/annotation/Log.java b/ruoyi-common/src/main/java/com/ruoyi/common/annotation/Log.java index eb05dc7..32c39a3 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/annotation/Log.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/annotation/Log.java @@ -1,41 +1,41 @@ package com.ruoyi.common.annotation; -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.OperatorType; +import java.lang.annotation.*; + /** * 鑷畾涔夋搷浣滄棩蹇楄褰曟敞瑙� - * - * @author ruoyi * + * @author ruoyi */ -@Target({ ElementType.PARAMETER, ElementType.METHOD }) +@Target({ElementType.PARAMETER, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) @Documented -public @interface Log -{ +public @interface Log { /** - * 妯″潡 + * 妯″潡 */ - public String title() default ""; + String title() default ""; /** * 鍔熻兘 */ - public BusinessType businessType() default BusinessType.OTHER; + BusinessType businessType() default BusinessType.OTHER; /** * 鎿嶄綔浜虹被鍒� */ - public OperatorType operatorType() default OperatorType.MANAGE; + OperatorType operatorType() default OperatorType.MANAGE; /** * 鏄惁淇濆瓨璇锋眰鐨勫弬鏁� */ - public boolean isSaveRequestData() default true; + boolean isSaveRequestData() default true; + + /** + * 鏄惁淇濆瓨鍝嶅簲鐨勫弬鏁� + */ + boolean isSaveResponseData() default true; } -- Gitblit v1.9.3