|
|
|
@ -1,19 +1,20 @@ |
|
|
|
package cn.chjyj.szwh.utils; |
|
|
|
|
|
|
|
import com.alibaba.fastjson2.JSONArray; |
|
|
|
import com.alibaba.fastjson2.JSONObject; |
|
|
|
|
|
|
|
public class AjaxResult { |
|
|
|
/** |
|
|
|
* 接口返回数据 |
|
|
|
* @param msg |
|
|
|
* @param resultJson |
|
|
|
* @param jsonArray |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public static JSONObject success(String msg,JSONObject resultJson){ |
|
|
|
public static JSONObject success(String msg, JSONArray jsonArray){ |
|
|
|
JSONObject result = new JSONObject(); |
|
|
|
result.put("code",200); |
|
|
|
result.put("msg",msg); |
|
|
|
result.put("data",resultJson); |
|
|
|
result.put("data",jsonArray); |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
|