Fixing .gitignore

This commit is contained in:
wangjinlei
2023-09-19 18:24:19 +08:00
parent 06e2f68ad9
commit ae15750e6a
581 changed files with 67226 additions and 67275 deletions

View File

@@ -1,98 +1,98 @@
/**
* Copyright (c) 2016-2019 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有,侵权必究!
*/
package com.peanut.common.utils;
import lombok.Data;
import lombok.experimental.Accessors;
import org.apache.http.HttpStatus;
import java.util.HashMap;
import java.util.Map;
/**
* 返回数据
*
* @author Mark sunlightcs@gmail.com
*/
@Data
//@Accessors(chain = true)
public class R extends HashMap<String, Object> {
private static final long serialVersionUID = 1L;
public R() {
put("code", 0);
put("msg", "success");
}
public static R error() {
// return error(HttpStatus.SC_INTERNAL_SERVER_ERROR, "未知异常,请联系管理员");
return error(HttpStatus.SC_INTERNAL_SERVER_ERROR, "");
}
public static R error(String msg) {
return error(HttpStatus.SC_INTERNAL_SERVER_ERROR, msg);
}
/**
* int SC_NOT_IMPLEMENTED = 501;
* int SC_BAD_GATEWAY = 502;
* int SC_SERVICE_UNAVAILABLE = 503;
* int SC_GATEWAY_TIMEOUT = 504;
* @param
* @param msg
* @return
*/
public static R error1(String msg) {
return error(HttpStatus.SC_NOT_IMPLEMENTED, msg);
}
public static R error2() {
return error(HttpStatus.SC_BAD_GATEWAY,"");
}
public static R error3(String msg) {
return error(HttpStatus.SC_SERVICE_UNAVAILABLE, msg);
}
public static R error4(String msg) {
return error(HttpStatus.SC_GATEWAY_TIMEOUT, msg);
}
public static R error(int code, String msg) {
R r = new R();
r.put("code", code);
r.put("msg", msg);
return r;
}
public static R ok(String msg) {
R r = new R();
r.put("msg", msg);
return r;
}
public static R ok(Map<String, Object> map) {
R r = new R();
r.putAll(map);
return r;
}
public static R ok() {
return new R();
}
public R put(String key, Object value) {
super.put(key, value);
return this;
}
}
/**
* Copyright (c) 2016-2019 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有,侵权必究!
*/
package com.peanut.common.utils;
import lombok.Data;
import lombok.experimental.Accessors;
import org.apache.http.HttpStatus;
import java.util.HashMap;
import java.util.Map;
/**
* 返回数据
*
* @author Mark sunlightcs@gmail.com
*/
@Data
//@Accessors(chain = true)
public class R extends HashMap<String, Object> {
private static final long serialVersionUID = 1L;
public R() {
put("code", 0);
put("msg", "success");
}
public static R error() {
// return error(HttpStatus.SC_INTERNAL_SERVER_ERROR, "未知异常,请联系管理员");
return error(HttpStatus.SC_INTERNAL_SERVER_ERROR, "");
}
public static R error(String msg) {
return error(HttpStatus.SC_INTERNAL_SERVER_ERROR, msg);
}
/**
* int SC_NOT_IMPLEMENTED = 501;
* int SC_BAD_GATEWAY = 502;
* int SC_SERVICE_UNAVAILABLE = 503;
* int SC_GATEWAY_TIMEOUT = 504;
* @param
* @param msg
* @return
*/
public static R error1(String msg) {
return error(HttpStatus.SC_NOT_IMPLEMENTED, msg);
}
public static R error2() {
return error(HttpStatus.SC_BAD_GATEWAY,"");
}
public static R error3(String msg) {
return error(HttpStatus.SC_SERVICE_UNAVAILABLE, msg);
}
public static R error4(String msg) {
return error(HttpStatus.SC_GATEWAY_TIMEOUT, msg);
}
public static R error(int code, String msg) {
R r = new R();
r.put("code", code);
r.put("msg", msg);
return r;
}
public static R ok(String msg) {
R r = new R();
r.put("msg", msg);
return r;
}
public static R ok(Map<String, Object> map) {
R r = new R();
r.putAll(map);
return r;
}
public static R ok() {
return new R();
}
public R put(String key, Object value) {
super.put(key, value);
return this;
}
}