|
@@ -9,6 +9,8 @@ import com.diagbot.model.entity.Vital;
|
|
|
import com.diagbot.model.label.VitalLabel;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.lang.reflect.Field;
|
|
|
import java.math.BigDecimal;
|
|
@@ -23,8 +25,16 @@ import java.util.Map;
|
|
|
* @time: 2020/7/30 15:18
|
|
|
*/
|
|
|
@Slf4j
|
|
|
+@Component
|
|
|
public class CoreUtil {
|
|
|
|
|
|
+ public static Boolean debugFlag;
|
|
|
+
|
|
|
+ @Value("${debugFlag}")
|
|
|
+ public void setDebugFlag(Boolean debugFlag) {
|
|
|
+ CoreUtil.debugFlag = debugFlag;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 将列表中属性对应的值以list形式返回
|
|
|
*
|
|
@@ -603,6 +613,18 @@ public class CoreUtil {
|
|
|
debugMap.put(msg, + (end - start) / 1000.0 + "秒");
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 输出调试信息
|
|
|
+ *
|
|
|
+ * @param msg
|
|
|
+ * @param debugMap
|
|
|
+ */
|
|
|
+ public static void getDebugObject(String msg, Map<String, Object> debugMap, Object obj) {
|
|
|
+ if (debugFlag) {
|
|
|
+ debugMap.put(msg, obj);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 输出调试信息
|
|
|
*
|