CarHomePushController.java
1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package com.glsx.modules.notify.controller;
import com.glsx.modules.notify.model.BaseRequest;
import com.glsx.modules.notify.model.param.NotifyReqParam;
import com.glsx.modules.notify.service.CarHomePushService;
import com.glsx.plat.core.web.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @author fengzhi
* @date 2021/4/8 14:14
*/
@RestController
@RequestMapping("/push/smartHome")
@Api(value = "车家智能推送API", tags = {"通知或者消息推送"})
public class CarHomePushController {
@Autowired
private CarHomePushService pushService;
/**
* 推送通知给终端
* pushNotify
* @return R
*/
@ApiOperation(value="推送通知")
@PostMapping("notify")
public R pushNotify(@RequestBody NotifyReqParam request){
BaseRequest baseRequest = new BaseRequest();
BeanUtils.copyProperties(request,baseRequest);
return pushService.pushNotify(baseRequest);
}
}