package com.fs.gtPush.service.impl;

import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONUtil;
import com.fs.common.core.domain.R;
import com.fs.gtPush.domain.PushReqBean;
import com.fs.gtPush.domain.PushResult;
import com.fs.gtPush.service.uniPush2Service;
import org.springframework.stereotype.Service;

@Service
public class uniPush2ServiceImpl implements uniPush2Service {
    private static final String url = "https://fc-mp-de6e03a9-c1a3-439b-9eec-d0dc3c565e4e.next.bspapp.com/push";
    @Override
    public PushResult pushMessage(PushReqBean push) {
        String result = HttpUtil.post(url, push.toString());
        PushResult pushResult = JSONUtil.toBean(result, PushResult.class);
        return pushResult;
    }
}
