DeviceFreqController.java
1.48 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
40
41
42
43
44
45
46
47
48
package cn.com.glsx.stdinterface.modules.controller;
import cn.com.glsx.stdinterface.api.DeviceFreqClient;
import cn.com.glsx.stdinterface.dto.ActiveAdjFreqBO;
import cn.com.glsx.stdinterface.dto.ResetAdjFreqBO;
import cn.com.glsx.stdinterface.modules.service.DeviceFreqService;
import com.glsx.plat.core.web.R;
import lombok.extern.slf4j.Slf4j;
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 xiangyanlin
* @date 2022/9/9
*/
@Slf4j
@RestController
@RequestMapping(value = "/freq")
public class DeviceFreqController implements DeviceFreqClient {
@Autowired
private DeviceFreqService deviceFreqService;
@PostMapping(value = "/resetAdjFreq")
@Override
public R<Void> resetAdjFreq(@RequestBody ResetAdjFreqBO resetAdjFreqBO) {
deviceFreqService.resetAdjFreq(resetAdjFreqBO);
return R.ok();
}
@PostMapping(value = "/activeDeviceFreq")
@Override
public R<Void> activeDeviceFreq(ActiveAdjFreqBO activeAdjFreqBO) {
deviceFreqService.activeDeviceFreq(activeAdjFreqBO);
return R.ok();
}
@PostMapping(value = "/closeDeviceFreq")
@Override
public R<Void> toCloseDeviceFreq() {
deviceFreqService.toCloseDeviceFreq();
return R.ok();
}
}