package com.ruoyi.system.utils;

import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

public class AddPush {
    public Boolean gopush(String cid,String title, String content){

        String url = "https://fc-mp-20ccbe79-10f8-41d7-a06c-c42581f351c1.next.bspapp.com/push?cid="+cid+
                "&title="+title+"&content="+content;
        String res="";
        res = HttpUtil.get(url);
        JSONObject jsonObject =  JSON.parseObject(res);
        if(jsonObject.getString("errMsg").equals("success")){
            return true;
        }else {
            return false;
        }
    }
}
