作者 RuoYi

调整响应成功状态码与全局保持一致

1 package com.ruoyi.common.core.domain; 1 package com.ruoyi.common.core.domain;
2 2
3 import java.io.Serializable; 3 import java.io.Serializable;
  4 +import com.ruoyi.common.constant.HttpStatus;
4 5
5 /** 6 /**
6 * 响应信息主体 7 * 响应信息主体
@@ -12,10 +13,10 @@ public class R<T> implements Serializable @@ -12,10 +13,10 @@ public class R<T> implements Serializable
12 private static final long serialVersionUID = 1L; 13 private static final long serialVersionUID = 1L;
13 14
14 /** 成功 */ 15 /** 成功 */
15 - public static final int SUCCESS = 200; 16 + public static final int SUCCESS = HttpStatus.SUCCESS;
16 17
17 /** 失败 */ 18 /** 失败 */
18 - public static final int FAIL = 500; 19 + public static final int FAIL = HttpStatus.ERROR;
19 20
20 private int code; 21 private int code;
21 22