FakeOfflineChangeController.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 cn.com.glsx.stdinterface.modules.controller;
import cn.com.glsx.stdinterface.api.FakeOfflineChangeClient;
import cn.com.glsx.stdinterface.dto.FakeOfflineChangeFrequentlyDTO;
import cn.com.glsx.stdinterface.modules.service.FakeOfflineChangeService;
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/15
*/
@Slf4j
@RestController
@RequestMapping(value = "/fakeOfflineChange")
public class FakeOfflineChangeController implements FakeOfflineChangeClient {
@Autowired
private FakeOfflineChangeService fakeOfflineChangeService;
@PostMapping(value = "/save")
@Override
public R<Void> save(@RequestBody FakeOfflineChangeFrequentlyDTO fakeOfflineChangeFrequentlyDTO) {
fakeOfflineChangeService.save(fakeOfflineChangeFrequentlyDTO);
return R.ok();
}
@PostMapping(value = "/updateStatus")
@Override
public R<Void> updateStatus() {
fakeOfflineChangeService.updateStatus();
return R.ok();
}
}