超市
This commit is contained in:
		| @ -1,14 +1,7 @@ | ||||
| package cn.iocoder.yudao.framework.common.pojo; | ||||
|  | ||||
| import cn.iocoder.yudao.framework.common.exception.ErrorCode; | ||||
| import cn.iocoder.yudao.framework.common.exception.ServiceException; | ||||
| import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants; | ||||
| import com.fasterxml.jackson.annotation.JsonIgnore; | ||||
| import lombok.Data; | ||||
| import org.springframework.util.Assert; | ||||
|  | ||||
| import java.io.Serializable; | ||||
| import java.util.Objects; | ||||
|  | ||||
| /** | ||||
|  * 通用返回 | ||||
| @ -23,7 +16,7 @@ public class StoreResult<T> { | ||||
|      * | ||||
|      * @see ErrorCode#getCode() | ||||
|      */ | ||||
|     private String statusCode; | ||||
|     private Integer statusCode; | ||||
|     /** | ||||
|      * 返回数据 | ||||
|      */ | ||||
| @ -40,7 +33,7 @@ public class StoreResult<T> { | ||||
|  | ||||
|     public static <T> StoreResult<T> success(T data) { | ||||
|         StoreResult<T> result = new StoreResult<>(); | ||||
|         result.statusCode = "200"; | ||||
|         result.statusCode = 200; | ||||
|         result.data = data; | ||||
|         result.message = "操作成功"; | ||||
|         result.success = true; | ||||
| @ -48,8 +41,8 @@ public class StoreResult<T> { | ||||
|     } | ||||
|  | ||||
|     public static <T> StoreResult<T> fail(String message) { | ||||
|         StoreResult<T> result = new StoreResult<>(); | ||||
|         result.statusCode = "300"; | ||||
|         StoreResult<T> result =new StoreResult<>(); | ||||
|         result.statusCode = 300; | ||||
|         result.message = message; | ||||
|         result.success = false; | ||||
|         return result; | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 zengtao01
					zengtao01