| | |
| | | package com.ruoyi.common.core.domain;
|
| | |
|
| | | import java.util.HashMap;
|
| | | import java.util.Objects;
|
| | | import com.ruoyi.common.constant.HttpStatus;
|
| | | import com.ruoyi.common.utils.StringUtils;
|
| | |
|
| | |
| | | }
|
| | |
|
| | | /**
|
| | | * 是否为成功消息
|
| | | *
|
| | | * @return 结果
|
| | | */
|
| | | public boolean isSuccess()
|
| | | {
|
| | | return Objects.equals(HttpStatus.SUCCESS, this.get(CODE_TAG));
|
| | | }
|
| | |
|
| | | /**
|
| | | * 是否为警告消息
|
| | | *
|
| | | * @return 结果
|
| | | */
|
| | | public boolean isWarn()
|
| | | {
|
| | | return Objects.equals(HttpStatus.WARN, this.get(CODE_TAG));
|
| | | }
|
| | |
|
| | | /**
|
| | | * 是否为错误消息
|
| | | *
|
| | | * @return 结果
|
| | | */
|
| | | public boolean isError()
|
| | | {
|
| | | return Objects.equals(HttpStatus.ERROR, this.get(CODE_TAG));
|
| | | }
|
| | |
|
| | | /**
|
| | | * 方便链式调用
|
| | | *
|
| | | * @param key 键
|