package com.ygtx.web.controller.common;

import com.ygtx.common.config.RuoYiConfig;
import com.ygtx.common.core.domain.AjaxResult;
import com.ygtx.common.utils.SecurityUtils;
import com.ygtx.common.utils.StringUtils;
import com.ygtx.common.utils.file.FileUploadUtils;
import com.ygtx.common.utils.file.FileUtils;
import com.ygtx.framework.config.ServerConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;

/**
 * 推送注册处理
 *
 * @author ruoyi
 */
@RestController
@RequestMapping("/push")
public class PushController
{
    private static final Logger log = LoggerFactory.getLogger(PushController.class);

    /**
     * 推送注册
     */
    @GetMapping("/register/{cid}")
    public AjaxResult register(@PathVariable String cid) throws Exception
    {
        try
        {
            System.out.println(SecurityUtils.getUserId() + "-注册成功-" +cid);
            return AjaxResult.success();
        }
        catch (Exception e)
        {
            return AjaxResult.error(e.getMessage());
        }
    }
}
