package cn.gistack.alerts.push.controller;
|
|
|
import cn.gistack.alerts.push.service.IPushService;
|
import cn.gistack.alerts.push.vo.PushVO;
|
import lombok.AllArgsConstructor;
|
import org.springblade.core.tool.api.R;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RestController;
|
|
@RestController
|
@AllArgsConstructor
|
@RequestMapping("/push/push")
|
public class PushController {
|
private final IPushService pushService;
|
|
/**
|
* 保存cid
|
* @param userId
|
* @param cId
|
* @return
|
*/
|
@PostMapping("/saveCId")
|
public R saveCId(String userId,String cId){
|
return R.data(pushService.saveCId(userId,cId));
|
}
|
|
/**
|
* 消息推送
|
* @param pushVO
|
* @return
|
*/
|
@PostMapping("/pushMessage")
|
public R pushMessage(PushVO pushVO){
|
return R.data(pushService.pushMessage(pushVO));
|
}
|
|
}
|