java110
2020-10-24 5eb884b52dbd5a01a6fd6af7eaf9b284c6534dc9
java110-bean/src/main/java/com/java110/vo/ResultVo.java
@@ -1,6 +1,7 @@
package com.java110.vo;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
@@ -154,7 +155,7 @@
    @Override
    public String toString() {
        return JSONObject.toJSONString(this);
        return JSONObject.toJSONString(this, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteDateUseDateFormat);
    }
@@ -171,6 +172,16 @@
    }
    /**
     * 成功通用回复
     * @return
     */
    public static ResponseEntity<String> success() {
        ResultVo resultVo = new ResultVo(CODE_OK, MSG_OK);
        ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
        return responseEntity;
    }
    /**
     * 创建ResponseEntity对象
     *
     * @param records 页数